8.4 Public Key Cryptography (1970) The Key made public because an unrealistic computer time is required to find a decrypting transformation D from the encryption transformation E
Procedure K= public key E(K)= Encryption function; retained private by the sender and obtained from according to specific rules Sender: plaintext= P E(K) C= Ciphertext D(K)= Decryption function that cannot be found from K in a realistic time by anyone other than the receiver. Receiver: C D(K) P Most popular: RSA (chapter 8), others in chapter 10
In practice Not extensively used for general purpose encryption because E(K) and D(K) require too much time and memory on computers Solution: combine symmetric/secret key with public key systems - Use secret key as based for the cryptosystem with a key K - Use Public Key to send the key K (securely transmitted) Examples: Digital Signature (8.6), Electronic Commerce, passwords, etc.
RSA n= modulo; with p & q LARGE primes: n= p q ф ( n )= (p-1)(q-1) = cardinal{ k≤n: (k,n)=1} Public Key = (e,n) with (e, ф ( n ) ) = 1 Encryption: P C=P e (mod n) Private key (d,n) with e d= 1 (mod ф ( n ) ) Euler’s theorem: d= e ф ( ф ( n ))-1 (mod ф ( n ) ) Decryption: C P=C d (mod n)
Reminder: Properties of ф ( n ) Euler Theorem (page 235): m positive & (a,m)=1 a ф ( m ) = 1 (mod m) Theorem 7.2 (page 240): p prime ↔ ф ( p ) = p-1 Theorem 7.4 (page 241): p,q primes ф ( p q ) = ф ( p ) ф ( q ) Theorem 7.5 (page 242): n=p,q primes ф ( p q ) = ф ( p ) ф ( q )
Simplified Computations Where a i is the 2m digits representing a block of m letters. For the encryption C=P e (mod n) & decryption P=C d (mod n) On derive: MOD(A L, n) On Maple: Mod(A L, n) d= e ф ( ф ( n ))-1 (mod ф ( n ) ) use Mod(e ф(ф(n))-1,ф ( n ))
Example: Encryption P= BEST WISHES, e=3 n=2669 m=2 use blocks of two letters= four digits P C=P e (mod n) =1215, =1224, =1471, =23, =116 (mod 2669). 71= 2(26) + 19 = 19 (mod 26) Ciphertext = MPMYOTAXBQ
Example: Decryption C= 1109 n=2881 = 43 * 67 p = 43 & q = 67 ф(2881) = (p-1)(q-1)=42 * 66 = 2772 e=5, d? With e d= 1 (mod ф ( n ) ) d=1109 P =C 1109 (mod 2881) to each 4-digit block For instance =0400 (mod 2881). Similarly we find 1902, 0714, 0214, 1100, 1904, 0200, 1004 P= EA TC HO CO LA TE CA KE.