《William Stallings, Cryptography and Network Security … .ppt》由会员分享,可在线阅读,更多相关《William Stallings, Cryptography and Network Security … .ppt(27页珍藏版)》请在三一办公上搜索。
1、Cryptography and Network SecurityChapter 10,Fifth Editionby William StallingsLecture slides by Lawrie Brown,Chapter 10 Other Public Key Cryptosystems,Amongst the tribes of Central Australia every man,woman,and child has a secret or sacred name which is bestowed by the older men upon him or her soon
2、after birth,and which is known to none but the fully initiated members of the group.This secret name is never mentioned except upon the most solemn occasions;to utter it in the hearing of men of another group would be a most serious breach of tribal custom.When mentioned at all,the name is spoken on
3、ly in a whisper,and not until the most elaborate precautions have been taken that it shall be heard by no one but members of the group.The native thinks that a stranger knowing his secret name would have special power to work him ill by means of magic.The Golden Bough,Sir James George Frazer,Diffie-
4、Hellman Key Exchange,first public-key type scheme proposed by Diffie&Hellman in 1976 along with the exposition of public key conceptsnote:now know that Williamson(UK CESG)secretly proposed the concept in 1970 is a practical method for public exchange of a secret keyused in a number of commercial pro
5、ducts,Diffie-Hellman Key Exchange,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 value of key depends on the participants(and their private and public key information)based on exponentiation in
6、a finite(Galois)field(modulo a prime or a polynomial)-easysecurity relies on the difficulty of computing discrete logarithms(similar to factoring)hard,Diffie-Hellman Setup,all users agree on global parameters:large prime integer or polynomial qa being a primitive root mod qeach user(eg.A)generates t
7、heir keychooses a secret key(number):xA q compute their public key:yA=axA mod q each user makes public that key yA,Diffie-Hellman Key Exchange,shared session key for users A&B is KAB:KAB=axA.xB mod q=yAxB mod q(which B can compute)=yBxA mod q(which A can compute)KAB is used as session key in private
8、-key encryption scheme between Alice and Bobif Alice and Bob subsequently communicate,they will have the same key as before,unless they choose new public-keys attacker needs an x,must solve discrete log,Diffie-Hellman Example,users Alice&Bob who wish to swap keys:agree on prime q=353 and a=3select r
9、andom secret keys:A chooses xA=97,B chooses xB=233compute respective public keys:yA=397 mod 353=40(Alice)yB=3233 mod 353=248(Bob)compute shared session key as:KAB=yBxA mod 353=24897=160(Alice)KAB=yAxB mod 353=40233=160(Bob),Key Exchange Protocols,users could create random private/public D-H keys eac
10、h time they communicateusers could create a known private/public D-H key and publish in a directory,then consulted and used to securely communicate with themboth of these are vulnerable to a Man-in-the-Middle Attackauthentication of the keys is needed,Key Exchange Protocols,Show message diagram,Man-
11、in-the-Middle Attack,Darth prepares by creating two private/public keys Alice transmits her public key to BobDarth intercepts this and transmits his first public key to Bob.Darth also calculates a shared key with AliceBob receives the public key and calculates the shared key(with Darth instead of Al
12、ice)Bob transmits his public key to Alice Darth intercepts this and transmits his second public key to Alice.Darth calculates a shared key with BobAlice receives the key and calculates the shared key(with Darth instead of Bob)Darth can then intercept,decrypt,re-encrypt,forward all messages between A
13、lice&Bob,Man-in-the-Middle Attack,Show message diagram,ElGamal Cryptography,public-key cryptosystem related to D-Huses exponentiation in a finite fieldwith security based difficulty of computing discrete logarithms,as in D-Heach user(eg.A)generates their keychooses a secret key(number):1 xA q-1 comp
14、ute their public key:yA=axA mod q,ElGamal Message Exchange,Bob encrypts a message to send to A computingrepresent message M in range 0=M=q-1longer messages must be sent as blockschose random integer k with 1=k=q-1compute one-time key K=yAk mod qencrypt M as a pair of integers(C1,C2)whereC1=ak mod q;
15、C2=KM mod qA then recovers message byrecovering key K as K=C1xA mod qcomputing M as M=C2 K-1 mod qa unique k must be used each timeotherwise result is insecure,ElGamal Example,use field GF(19)q=19 and a=10Alice computes her key:A chooses xA=5 C2=KM mod q=7.17 mod 19=5Alice recovers original message
16、by computing:recover K=C1xA mod q=115 mod 19=7compute inverse K-1=7-1=11recover M=C2 K-1 mod q=5.11 mod 19=17,Elliptic Curve Cryptography,majority of public-key crypto(RSA,D-H)use either integer or polynomial arithmetic with very large numbers/polynomialsimposes a significant load in storing and pro
17、cessing keys and messagesan alternative is to use elliptic curvesoffers same security with smaller bit sizesnewer,but not as well analysed,Real Elliptic Curves,an elliptic curve is defined by an equation in two variables x&y,with coefficientsconsider a cubic elliptic curve of formy2=x3+ax+bwhere x,y
18、,a,b are all real numbersalso define zero point Oconsider set of points E(a,b)that satisfyhave addition operation for elliptic curvegeometrically sum of P+Q is reflection of the intersection R,Real Elliptic Curve Example,Finite Elliptic Curves,Elliptic curve cryptography uses curves whose variables&
19、coefficients are finitehave two families commonly used:prime curves Ep(a,b)defined over Zp use integers modulo a primebest in softwarebinary curves E2m(a,b)defined over GF(2n)use polynomials with binary coefficientsbest in hardware,Elliptic Curve Cryptography,ECC addition is analog of modulo multipl
20、yECC repeated addition is analog of modulo exponentiationneed“hard”problem equiv to discrete logQ=kP,where Q,P belong to a prime curveis“easy”to compute Q given k,Pbut“hard”to find k given Q,Pknown as the elliptic curve logarithm problemCerticom example:E23(9,17),ECC Diffie-Hellman,can do key exchan
21、ge analogous to D-Husers select a suitable curve Eq(a,b)select base point G=(x1,y1)with large order n s.t.nG=OA&B select private keys nAn,nBncompute public keys:PA=nAG,PB=nBGcompute shared key:K=nAPB,K=nBPAsame since K=nAnBGattacker would need to find k,hard,ECC Encryption/Decryption,several alterna
22、tives,will consider simplestmust first encode any message M as a point on the elliptic curve Pmselect suitable curve&point G as in D-Heach user chooses private key nAnand computes public key PA=nAGto encrypt Pm:Cm=kG,Pm+kPb,k randomdecrypt Cm compute:Pm+kPbnB(kG)=Pm+k(nBG)nB(kG)=Pm,ECC Security,reli
23、es on elliptic curve logarithm problemfastest method is“Pollard rho method”compared to factoring,can use much smaller key sizes than with RSA etcfor equivalent key lengths computations are roughly equivalenthence for similar security ECC offers significant computational advantages,Comparable Key Siz
24、es for Equivalent Security,Pseudorandom Number Generation(PRNG)based on Asymmetric Ciphers,asymmetric encryption algorithm produce apparently random output hence can be used to build a pseudorandom number generator(PRNG)much slower than symmetric algorithmshence only use to generate a short pseudora
25、ndom bit sequence(eg.key),PRNG based on RSA,have Micali-Schnorr PRNG using RSAin ANSI X9.82 and ISO 18031,PRNG based on ECC,dual elliptic curve PRNGNIST SP 800-9,ANSI X9.82 and ISO 18031some controversy on security/inefficiencyalgorithmfor i=1 to k do set si=x(si-1 P)set ri=lsb240(x(si Q)end for return r1,.,rk only use if just have ECC,Summary,have considered:Diffie-Hellman key exchangeElGamal cryptographyElliptic Curve cryptographyPseudorandom Number Generation(PRNG)based on Asymmetric Ciphers(RSA&ECC),