Class Notes (1,100,000)
CA (620,000)
McMaster (50,000)
MATH (3,000)
Lecture 31

MATH 1C03 Lecture Notes - Lecture 31: Euclidean Algorithm, Plaintext


Department
Mathematics
Course Code
MATH 1C03
Professor
Miroslav Lovric
Lecture
31

Page:
of 2
RSA
-
m= plaintext
RSA :p ,q -on ,okn)e,d -Gmelmodn )-0 c- .ciphertext
p.q dCpt)4D {th
gcdG,¢Cn))-Iedikmodokn ))M=Cd(mod n)
to solve ford,we use the Euclidean algorithm
(e,n)= public code
(d,n)= private code
Example :91 "e(mod 83)= ?
§s
.
mn
Start with something known :92 ;8l±
-2(mod83)P
(94¥f2Plmod 8D
9"=-128 (mod 83)
.128 -I
's
:( mod 83 )
-128=+3453 (mod 8D
-128=-38 (mod 83)
Systematic Way :9"(mod
83¥
(mod 83)P =98+4+2=98.94
.q=
92=81 -=-2(mod83)P 94.92=44 )mod83
ta "
9"±4(mod 831/2 98.9 ".9f8HDmod83
.
98=1640183 )-128
This method is called the square and multiply pattern
Question :Can every number be expressed by exponents of powers of 2?
gn= 916 "16+1=24+20
q33= 932 "32+1=25+20
q2' =916+4 "16+4+1=24+22,20
915=98+4+2 "8+4+2+1=23+22+2 '+2°
Why Does this Work ?
Thinkofthebinary system :
(1712=10001 =@
0.23+0.22+0.21+1.20=17
21=2.10+1 2=2.1+0
10=2.5+0 1=2.0+1 }Hk=g!"
got,
5=2.2+1
find more resources at oneclass.com
find more resources at oneclass.com
Example :L "3(mod 430
(
1334=10000101
133=2.66+1.4+0
2133=21232122.21 '
in -
66=2-33.10 4=2.2+0 problem noproblem
.8,0 /8=2
332.16+1 2=2.1+0
16=2 1=2.0+1
21=21 (mod 430 21133=2127.2/22.21 '
2l2i44EI1lmod430-ltl2t2llmod43D2PEIl2-I2Kmod43d-2795lfnod43O12P3tl2E1464llmod43D2ll33IIlmod43D2123-21Cmod43D2Pt-44EI1lmod43H2PE12llmod43d2P6Fl21Cmod43012PElKmod43dSignatureixcanreadAaCexinxltnemessage@B.nB
)B(EB ,nB)
For (DB ,nB )
X(ex ,nx)
(dx.mx )
Ab(a
''M)D
:B,nB )-ob
aa.it#yfnDnn,Caps,nBlb"
a(
a
'
'M )=M receives bla''M)
Tb-'(b( a
''M ))
-=a" M
find more resources at oneclass.com
find more resources at oneclass.com