280 likes | 499 Views
PART II Asymmetric Ciphers CHAPTER 10 Key Management ; Other Public Key Cryptosystems 10.1 Key Management 10.2 Diffie-Hellman Key Exchange 10.3 Elliptic Curve Arithmetic 10.4 Elliptic Curve Cryptography. 10.1 Key Management.
E N D
PART II Asymmetric Ciphers CHAPTER 10Key Management; Other Public Key Cryptosystems 10.1 Key Management 10.2 Diffie-Hellman Key Exchange 10.3 Elliptic Curve Arithmetic 10.4 Elliptic Curve Cryptography
10.1 Key Management • Public-key encryption helps address key distributionproblems • have two aspects of this: • distribution of public keys • use of public-key encryption to distribute secret keys Distribution of Public Keys • Techniques for the distribution of public keys • public announcement • publicly available directory • public-key authority • public-key certificates
10.1 Key Management Distribution of Public Keys Public Announcement • Users distribute public keys to recipients or broadcast to community at large : Append PGP keys to email messages or post to news groups or email list • major weakness is forgery • anyone can create a key claiming to be someone else and broadcast it; • until forgery is discovered canmasquerade as claimed user
10.1 Key Management Distribution of Public Keys Publicly Available Directory • Can obtain greater security by registering keys with a public directory • Directory must be trusted with properties: • contains {name,public-key} entries • participants register securely with directory • participants can replace key at any time • directory is periodically published • directory can be accessed electronically • Still vulnerable to tampering or forgery
10.1 Key Management Distribution of Public Keys Public-Key Authority • Improve security by tightening control over distribution of keys from directory • Has properties of directory; and requires users to know public key for the directory; then users interact with directory to obtain any desired public key securely. • A typical scenario is illustrated in Fig. 10.3
10.1 Key Management Distribution of Public Keys Public-Key Authority Fig. 10.3 Public-Key Distribution Scenario
10.1 Key Management Distribution of Public Keys Public-Key Certificates • Certificates allow key exchange without real-time access to public-key authority • A certificate binds identity to public key; usually with other info such as period of validity, rights of use etc • With all contents signed by a trusted private-key or Certificate Authority (CA) • Can be verified by anyone who knows the authorities public-key
10.1 Key Management Distribution of Public Keys Public-Key Certificates Fig. 10.4 Exchange of Public-Key Certificate
10.1 Key Management Distribution of Secret Keys Using Public-Key Cryptography • Use previous methods to obtain public-key. • Can use for secrecy or authentication; but public-key algorithms are slow; so usually want to use private-key encryption to protect message contents. Hence, a session key isneeded. • Have several alternatives for negotiating a suitable session. Simple Secret Key Distribution • proposed by Merkle in 1979
10.1 Key Management Distribution of Secret Keys Using Public-Key Cryptography Simple Secret Key Distribution • Problem is that an opponent can intercept and impersonate both halves of protocol; man-in-the-Middle attack Fig. 10. 5 Simple Use of Public-Key Encryption to Establish a Session Key
10.1 Key Management Distribution of Secret Keys Using Public-Key Cryptography Secret Key Distribution with Confidentiality & Auth. Fig. 10.6 Public-Key Distribution of Secret Keys
10.1 Key Management Distribution of Secret Keys Using Public-Key Cryptography A Hybrid Scheme • This scheme retains the use of a key distribution center (KDC) that shares a secret master key with each user and distributes secret session keys with the master key • A public-key scheme is used to distribute master keys • The rationale is provided for using this three-level approach: • Performance : frequently distribution of session keys by public-key : slow --- occasionally distribution of master key by public-key; then session key distribution by master key • Backward compatibility : overlaid on an existing KDC scheme
10.2 Diffie-Hellman Key Exchange • Thefirst public-key type scheme proposed. • a public-key distribution scheme • cannot be used to exchange an arbitrary message • rather it can establish a common key • known only to the two participants • By Diffie & Hellman in 1976 along with the exposition of public key concepts; Note: now know that Williamson (UK CESG) secretly proposed the concept in 1970 • Is a practical method for public exchange of a secret key • Used in a number of commercial products • security relies on the difficulty of computing discretelogarithms (similar to factoring) – hard
10.2 Diffie-Hellman Key Exchange The Algorithm & Key Exchange Protocol Global Public Elements q : prime number : < q and :primitive root of q User B Select private XB Compute public YB= XB mod q User A Select private XA Compute public YA= XA mod q YA K = (YA)XB mod q YB K = (YB)XA mod q KAB = (YB)XA mod q = XBXA mod q = XAXB mod q = (YA)XB mod q
YD2 YB YB YD2 10.2 Diffie-Hellman Key Exchange Man-in-the-Middle Attack • Both of these are vulnerable to a meet-in-the-Middle Attack; Authentication of the keys is needed Bob XB YB = XB mod q Darth XD1, XD2 YD1 = XD1 modq YD2 = XD2 modq YA YD1 Alice XA YA = XA mod q YA K = (YD1)XB mod q = XD1XB modq K = (YA)D2 mod q = XAXD2 mod q K = (YD2)XA mod q = XD2XA mod q K = (YD1)XB mod q = XD1XB modq
10.3 Elliptic Curve Arithmetic • Majority of public-key crypto (RSA, D-H) use either integer or polynomial arithmetic with very large numbers/polynomials • Imposes a significant load in storing and processing keys and messages • An alternative is to use elliptic curves; • In 1985, Neal Koblitz and Victor Miller proposed ECC • Offers same security with smaller bit sizes • Newer, but not as well analyzed, • Elliptic curve cryptography (ECC) is showing up in standardization efforts, IEEE P1363 standard for Public- key Cryptography
10.3 Elliptic Curve Arithmetic Elliptic Curves over Real Numbers • An elliptic curve is defined by an equation in two variables x & y, with coefficients a, b, c, d, e y2 + axy + by = x3 + cx2 + dx + e : Weierstrass equation • Consider a cubic elliptic curve of form; y2 = x3 + ax + b (4a3 + 27b2 0 ) • Consider the set of points E(a, b) consisting of all of the points (x, y) that satisfy the equation y2 = x3 + ax + b, with the elements O called the point at infinity or the zero point. E = { E(a, b) } { O } : additive abelian group operation( + ) : addition of two points identity elements of + : the point at infinity O
10.3 Elliptic Curve Arithmetic Elliptic Curves over Real Numbers Geometric Description of Addition Fig. 10.9 Example of Elliptic Curves
10.3 Elliptic Curve Arithmetic Elliptic Curves over Real Numbers Algebraic Description of Addition • For two distinct points P = (xP, yP) and Q = (xQ, yQ) Point addition : R (xR, yR) = P + Q = (yQ – yP)/(xQ – xP) : slope of the line that join them xR = 2 – xP – xQ yR = –yP + (xP – xR) • Doubling : R = P + P = 2P
10.3 Elliptic Curve Arithmetic Elliptic Curves over Zp • prime curvesEp(a,b) defined over Zp={0, 1, …, p1} • use integers modulo primep; best in software y2 mod p = (x3 + ax + b ) mod p y y2 mod 23 = (x3 + x +1) mod 23 Fig. 10.10 The Elliptic CurveE23(1,1) x
10.3 Elliptic Curve Arithmetic Elliptic Curves over Zp • If P = (xP, yP) and Q = (xQ, yQ) with P – Q R (xR, yR) = P + Q xR = (2 – xP – xQ)mod p yR = ( (xP – xR)–yP ) mod p where • If P = (xP, yP), then – P = (xP, – yP),
10.3 Elliptic Curve Arithmetic Elliptic Curves over GF(2m) • Binary curvesE2m(a,b) defined over GF(2m) • use polynomials with binary coefficients; best in hardware. y2 + xy= x3 + ax + b GF(2m) = F[x]/(x4 + x + 1) y x y2 + xy= x3 + g4x +1 Fig. 10.10 The Elliptic CurveE24(g4,1)
10.3 Elliptic Curve Arithmetic Elliptic Curves over GF(2m) • If P = (xP, yP) and Q = (xQ, yQ) with P – Q and P Q R (xR, yR) = P + Q xR = 2 + + xP + xQ + a yR = (xP + xR)+ xR+yP • If P = (xP, yP) then R = 2P xR = 2 + + a yR = x2P + ( + 1)xR • IfP = (xP, yP), then – P = (xP, xP+ yP) where where
10.4 Elliptic Curve Cryptography • ECC addition is analog of modulo multiply • ECC repeated addition is analog of modulo exponentiation • “hard” problem equivalent to discrete logarithm • Q=kP, where Q,P belong to a prime curve • is “easy” to compute Q given k,P • but “hard” to find k given Q,P • known as the elliptic curve discrete logarithm problem • Example: E23(9,17) : y2 mod 23 = (x3 + 9x + 17) mod 23 What is k of Q = kP, where P = (16, 5), Q = (4, 5) Brute-force method: P = (16, 5), 2P = (20, 20), 3P = (14, 14), 4P = (19, 20), 5P = (13, 10), 6P = (7, 3) 7P = (8, 7), 8P = (12, 17), 9P = (4, 5)
10.4 Elliptic Curve Cryptography Analog of Diffie-Hellman Key Exchange • Can do key exchange analogous to D-H • Select a suitable curve Ep(a,b) Select base point G=(x1,y1) with large order n s.t. nG=O • A & B select private keys nA<n andnB<n,respectively • Both compute public keys: PA=nAG, PB=nBG • Both compute shared key: K=nAPB,K=nBPA K=nAPB = nAnBG = nBnAG = nBPA
10.4 Elliptic Curve Cryptography EC Encryption/Decryption • Several alternatives, will consider simplest • must first encode any message M as a point on the elliptic curve Pm • Select suitable curve & point G as in D-H • Each user chooses private key nA<n; computes public key PA=nAG • To encrypt Pm : Cm={kG, Pm+kPb}, k= random • To decryptCm compute: Pm+ kPb– nB(kG) = Pm+ k(nBG) – nB(kG) = Pm
10.4 Elliptic Curve Cryptography Security of Elliptic Curve Cryptography • Relies on elliptic curve discrete logarithm problem • The fastest method is “Pollard rho method” • Compared to factoring, can use much smaller key sizes than with RSA etc • For equivalent key lengths computations are roughly equivalent • Hence for similar security ECC offers significant computational advantages
10.4 Elliptic Curve Cryptography Security of Elliptic Curve Cryptography Table 10.3 Comparable Key Sizes in terms of Computational Effort for Cryptanalysis