90 likes | 257 Views
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 N D
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: PC=Pe (mod n) • Private key (d,n) with e d= 1 (mod ф(n) ) • Euler’s theorem: d= eф(ф(n))-1(mod ф(n) ) • Decryption: CP=Cd (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 Whereai is the 2mdigits representing a block of mletters. • For the encryption C=Pe (mod n) & decryption P=Cd (mod n) On derive: MOD(AL, n) On Maple: Mod(AL, n) • d= eф(ф(n))-1(mod ф(n) ) use Mod(eф(ф(n))-1 ,ф(n))
Example: Encryption • P= BEST WISHES, • e=3 • n=2669m=2 use blocks of two letters= four digits • P 0104 1819 2208 1807 0418 • C=Pe (mod n) 1215 1224 1471 0023 0116 01043=1215, 18193=1224, 22083=1471, 18073=23, 4183=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 =C1109 (mod 2881) to each 4-digit block • For instance 05041109=0400 (mod 2881). Similarly we find 1902, 0714, 0214, 1100, 1904, 0200, 1004 • P= EA TC HO CO LA TE CA KE.