Docsity

Euclidean and Extended Euclidean Algorithms: Finding GCD and Multiplicative Inverses, Lecture notes of Cybercrime, Cybersecurity and Data Privacy

Partial preview of the text

Download Euclidean and Extended Euclidean Algorithms: Finding GCD and Multiplicative Inverses and more Lecture notes Cybercrime, Cybersecurity and Data Privacy in PDF only on Docsity!

Euclidean algorithm

r

1 =

a; r

2 =

b; (initialization)

while(r

2

q= r

1

/ r

2

r= r

1

- q × r

2;

r

1

= r

2

; r

2

= r

;

gcd(a,b)= r

1

  • Eve chooses a random integer X in Z n
  • Eve calculates Y=C * X e

mod n.

  • Eve sends Y to B for decrypton and get Z=Y d

mod

  • Eve can only find P

Example

• Finding Multiplicative inverse of 11 in Z

26 The gcd(26,11)=1,which means that the multiplicative inverse of 11 exists.The EE algorithm gives t 1=

The multiplicative inverse is(-7) mod 26= 19 ;