-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleValues.txt
More file actions
132 lines (64 loc) · 7.28 KB
/
ExampleValues.txt
File metadata and controls
132 lines (64 loc) · 7.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Example 1
p=
20988936657440586486151264256610222593863921
q=
67280421310721
e=
170141183460469231731687303715884105727
---------------------------
e=
170141183460469231731687303715884105727
d=
985454112357167467429163972702478706096504080466280382463
n=
1412144501176638828411764202430394790097061596178732397041
m=
I am Ibrahim Almuqrin
c=
271981221447626856147031078113379849731885521623311770675
------------------------------------------------------------
Example 2
p=
12131072439211271897323671531612440428472427633701410925634549312301964373042085619324197365322416866541017057361365214171711713797974299334871062829803541
q=
12027524255478748885956220793734512128733387803682075433653899983955179850988797899869146900809131611153346817050832096022160146366346391812470987105415233
e=
65537
---------------------------
e=
65537
d=
89489425009274444368228545921773093919669586065884257445497854456487674839629818390934941973262879616797970608917283679875499331574161113854088813275488110588247193077582527278437906504015680623423550067240042466665654232383502922215493623289472138866445818789127946123407807725702626644091036502372545139713
n=
145906768007583323230186939349070635292401872375357164399581871019873438799005358938369571402670149802121818086292467422828157022922076746906543401224889672472407926969987100581290103199317858753663710862357656510507883714297115637342788911463535102712032765166518411726859837988672111837205085526346618740053
m=
I am Ibrahim Almuqrin
c=
108148004855167721798238282136450261964704334768314439176419260497636329162967948555571880548807590856786649823031141960140784982003187032371857120677973232678590436999943125406977799943178594924561255243224197294071276454530328020584484752119647256731463725247358276197012747902502534615773160882535852437129
----------------------------------------------------
Example 3
p=
10407932194664399081925240327364085538615262247266704805319112350403608059673360298012239441732324184842421613954281007791383566248323464908139906605677320762924129509389220345773183349661583550472959420547689811211693677147548478866962501384438260291732348885311160828538416585028255604666224831890918801847068222203140521026698435488732958028878050869736186900714720710555703168729087
q=
531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127
e=
170141183460469231731687303715884105727
---------------------------
PU = ( 170141183460469231731687303715884105727 , 5528048215247058624254415259689847588928676596533339281030986244475071218720173572370886535402451701006674489960306085377295895977182006421158616342693528281349424656272877344066915958935327464981249668836473958229246544359818418032805532670342384141077830961231107329808095072636863169699920169700311808282152050164230463370382928959814000922145068026479686431910968858463493166592748409808940341191410846502068217702527925803220564569234339514552808773464030218124682050822477306362062774956957519042442289294612283802507303478668697021844667557623718572791900930049 ), PR = ( 5088330706297348843242025265342403060092794061360719905362950990249447210413941166619626789461873280821265280369297754301343700581838814540413321833726358527426212488796929248162290732066924430390878730067721417717943138756926966323702641061144688799468842900009056541996882961109725794453018665991995831118879404309747011830101920213015187581762070982132667794359665085602249427012602056269124430910386933437746100679814284483638130457913305300731286229046706359250425600477349074656575160109758676303743823206271112812473420342790439637898398362644930267981489813315 , 5528048215247058624254415259689847588928676596533339281030986244475071218720173572370886535402451701006674489960306085377295895977182006421158616342693528281349424656272877344066915958935327464981249668836473958229246544359818418032805532670342384141077830961231107329808095072636863169699920169700311808282152050164230463370382928959814000922145068026479686431910968858463493166592748409808940341191410846502068217702527925803220564569234339514552808773464030218124682050822477306362062774956957519042442289294612283802507303478668697021844667557623718572791900930049 )
Message=
We implemented this system to demonstrate our understanding of RSA, using BigInteger to store the values enabled us to encrypt long texts. Also, using modPow() function made possible to do the calculations in a reasonable time.
Decrypted text:
We implemented this system to demonstrate our understanding of RSA, using BigInteger to store the values enabled us to encrypt long texts. Also, using modPow() function made possible to do the calculations in a reasonable time.
Cipher text:
1980308545235750069085503098245764339341704819333164905514842536052799280275050170119767522244335702046267936115601623731481130897132783968460888009225516363738505642237380081206600157709980272143428381830989783052634151098474342198364668747931640331380874006960590831126148386382900535327504594798617667235044021689073884304331793193917293878635189164526015017985175392947898839723513266307640514019007317702328491452246718371073070805054053300673014304934825146334478742472829432462532692178942835921027576078388203131604571056615042466631585461171433640266699033030
e=
170141183460469231731687303715884105727
n=
5528048215247058624254415259689847588928676596533339281030986244475071218720173572370886535402451701006674489960306085377295895977182006421158616342693528281349424656272877344066915958935327464981249668836473958229246544359818418032805532670342384141077830961231107329808095072636863169699920169700311808282152050164230463370382928959814000922145068026479686431910968858463493166592748409808940341191410846502068217702527925803220564569234339514552808773464030218124682050822477306362062774956957519042442289294612283802507303478668697021844667557623718572791900930049
d=
5088330706297348843242025265342403060092794061360719905362950990249447210413941166619626789461873280821265280369297754301343700581838814540413321833726358527426212488796929248162290732066924430390878730067721417717943138756926966323702641061144688799468842900009056541996882961109725794453018665991995831118879404309747011830101920213015187581762070982132667794359665085602249427012602056269124430910386933437746100679814284483638130457913305300731286229046706359250425600477349074656575160109758676303743823206271112812473420342790439637898398362644930267981489813315
Message=
We implemented this system to demonstrate our understanding of RSA, using BigInteger to store the values enabled us to encrypt long texts. Also, using modPow() function made possible to do the calculations in a reasonable time.
c=
103614440917569644934550918014540082214235858410101061485704297816119789456338078555702288848742429135390450797618824596350634060468463812812234485397121623041346846399205444384475479698210552891293454932125425972776431946698878548392091715078315697017849155498326097500414387632212423691011610736891149068912087261574404124013839391725688861529865853639205743865026809688634930844004937026681137697117551947369390901144788680292290542767757483435566431556468049982247169603102380688774312068306084344613341517043066038166195606188604556546415347312828479047705761757
----------------------------------------------------