Presentation is loading. Please wait.

Presentation is loading. Please wait.

COSC 4P03 Week 91 Public Key Cryptography Slides courtesy of Professor Sheridan Houghten.

Similar presentations


Presentation on theme: "COSC 4P03 Week 91 Public Key Cryptography Slides courtesy of Professor Sheridan Houghten."— Presentation transcript:

1 COSC 4P03 Week 91 Public Key Cryptography Slides courtesy of Professor Sheridan Houghten

2 COSC 4P03 Week 92 Public Key Cryptography – History For many years, the idea was attributed to Diffie and Hellman, who presented the idea at a conference in 1976 and published the idea the same year A recent report indicates the idea was first proposed by J.H.Ellis at CESG in the UK in 1970, but classified as “top secret” The scheme now known as RSA (named for Rivest, Shamir & Adleman who “invented” it in 1977) was first proposed by C.Cocks in a CESG report in 1973

3 COSC 4P03 Week 93 Multiplicative Inverse – Algorithm 5.3 MultiplicativeInverse(a,b)// Find b -1 mod a { a0 = a; b0 = b; t0 = 0; t = 1; q = floor(a0/b0);// quotient r = a0 – q * b0;// remainder while(r > 0) { temp = (t0 – q * t) mod a; t0 = t; t = temp; a0 = b0; b0 = r; q = floor(a0/b0); r = a0 – q * b0; } if (b0 != 1) b has no inverse mod a else b -1 = t; }

4 COSC 4P03 Week 94 Multiplicative Inverse Example – find inverse of 28 mod 75 Iterationtempa0b0t0tqr Start752801219 173281917319 2319973321 367913 90

5 COSC 4P03 Week 95 Square and Multiply – Algorithm 5.5 SquareAndMultiply(x,c,n) { z = 1; for(i = l-1; i >= 0; i--) { z = z*z mod n; if(c[i] == 1) z = z*x mod n; }

6 COSC 4P03 Week 96 Square and Multiply Example n = 11413 and b = 3533 (binary: 110111001101 (so l = 12)) Plaintext: 9726 ib[i]z 1111 2 * 9726 mod 11413 = 9726 1019726 2 * 9726 mod 11413 = 2659 902659 2 mod 11413 = 5634 815634 2 * 9726 mod 11413 = 9167 719167 2 * 9726 mod 11413 = 4958 614958 2 * 9726 mod 11413 = 7783 507783 2 mod 11413 = 6298 406298 2 mod 11413 = 4629 314629 2 * 9726 mod 11413 = 10185 2110185 2 * 9726 mod 11413 = 105 10105 2 mod 11413 = 11025 0111025 2 * 9726 mod 11413 = 5761


Download ppt "COSC 4P03 Week 91 Public Key Cryptography Slides courtesy of Professor Sheridan Houghten."

Similar presentations


Ads by Google