Math 126   Number theory

Illustration of the RSA algorithm

Illustration of the RSA algorithm with p = 11, q = 13, and e = 7. Then n = pq = 143, and phi(n) = 120. The value of e = 7 is okay since 7 is relatively prime to 120. The inverse of e moduldo 120 is d = 103 since 7 times 103 is congruent to 1 modulo 120. The following table gives the encoding and decoding functions for each number a from 0 through n – 1. To encode a message a, raise it to the power e modulo n. To decode a message b, raise it to the power d modulo n. This table was produced by a computer program. Note that aed is congruent to a for each value of a.

aae adaed
0000
1111
2128632
342163
4821084
5471255
68576
761237
857838
9481139
10101010
1113213211
12121212
131175213
14532714
1511514115
1638116
17309517
1813811218
19467219
201365820
2110910921
22222222
23232323
241064124
25643825
2610413026
27149227
286312828
29946829
301341730
311254731
32989832
3311011033
3412212234
351397435
36754936
379311937
382510338
395211739
401057940
41245041
4281342
43434343
44999944
4511111145
46841946
4731547
48126948
493611449
504110650
511169051
52133952
53921453
54767654
55555555
56565656
5773857
582013758
59719759
601357060
617413961
6212710162
6322863
641032564
65656565
66666666
67898967
682910768
691088269
70608670
711245971
72198472
73835773
74356174
751143675
76545476
77777777
78787878
794011879
8014111580
81164281
8269482
8387383
84724684
85123685
867013586
87878787
88888888
89676789
905112990
9113010491
92275392
931023793
941072994
951713495
9611213896
975912497
98323298
99444499
100100100100
10162140101
10211993102
1033864103
1049126104
10511840105
1065024106
1076894107
108469108
1092121109
1103333110
1114545111
1121896112
1139126113
1144975114
1158015115
11612951116
1173913117
11879105118
11937102119
120120120120
121121121121
1223434122
123785123
1249771124
125531125
12611348126
12714062127
128282128
12990116129
1302691130
131131131131
1321111132
133133133133
1349530134
1358660135
13613720136
13758136137
1389618138
1396135139
140101127140
1411580141
142142142142