Presentation is loading. Please wait.

Presentation is loading. Please wait.

7/30/2019 Computer Security Ch10: Key management & Other Public Key Cryptosystems Howon Kim 2019.

Similar presentations


Presentation on theme: "7/30/2019 Computer Security Ch10: Key management & Other Public Key Cryptosystems Howon Kim 2019."— Presentation transcript:

1 7/30/2019 Computer Security Ch10: Key management & Other Public Key Cryptosystems Howon Kim 2019.

2 Agenda Review Key Management Diffie-Hellman Key Exchange
Elliptic Curve Cryptography 2

3 Public-Key Cryptography
public-key/two-key/asymmetric cryptography involves the use of two keys: a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures a private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures is asymmetric because those who encrypt messages or verify signatures cannot decrypt messages or create signatures

4 RSA It is possible to find values of e, d, n such that Med mod n = M for all M < n. From the Euler function, aø(n)+1 = a (mod n), where gcd(a,n)=1, ed=ø(n)+1  ed mod ø(n)= 1 This is equivalent to saying. ed = 1 mod ø(n). d=e-1 mod ø(n) That is, e and d are multiplicative inverses mod ø(n). Note that, according to the rules of modular arithmetic, e is relatively prime to ø(n). that is, gcd(ø(n),e)=1. Also, equivalently, gcd(ø(n),d)=1.

5 RSA Now, we ready to state the RSA scheme
p,q, two prime numbers  private, chosen n = pq  public, calculated e, with gcd(ø(n),e)=1; 1<e<ø(n) public, chosen d=e-1( mod ø(n)) private, calculated ※ Private key PR= {d,p,q},public key PU= {e,n}

6 RSA Key Setup each user generates a public/private key pair by:
selecting two large primes at random p, q computing their system modulus n=pq note ø(N)=(p-1)(q-1) selecting at random the encryption key e where 1<e<ø(n), gcd(e,ø(n))=1 solve following equation to find decryption key d ed=1 mod ø(n) and 0≤d≤n publish their public encryption key: PU={e,n} keep secret private decryption key: PR={d,p,q}

7 RSA En/Decryption - Example
Example of RSA encryption/decryption. Key : PU={7,187}, PR={23,17,11} Given message M = 88 (note, 88<187) Encryption: C = 887 mod 187 = 11 Decryption: M = 1123 mod 187 = 88

8 Agenda Review Key Management Diffie-Hellman Key Exchange
Elliptic Curve Cryptography 8

9 Key Management We have studied private key distributions in Ch. 7.
Public-key encryption helps address key distribution problems Here, there are two aspects to use the PKC in this regard: The distribution of public keys The use of public-key encryption to distribute secret keys One of the major roles of public-key encryption has been to address the problem of key distribution, with two distinct aspects: the distribution of public keys, and the use of public-key encryption to distribute secret keys.

10 Distribution of Public Keys
can be considered as using one of: public announcement publicly available directory public-key authority public-key certificates Several techniques have been proposed for the distribution of public keys, which can mostly be grouped into the categories shown.

11 Public Announcement users distribute public keys to recipients or broadcast to community at large eg. append PGP keys to messages or post to news groups, list major weakness is forgery Anyone can forge such a public announcement That is, some user could pretend to be user A and send a public key to another participant or broadcast such a public key Until such time as user A discovers the forgery and alerts other participants, the forger is able to read all encrypted messages intended for A and can use the forged keys for authentication The point of public-key encryption is that the public key is public, hence any participant can send his or her public key to any other participant, or broadcast the key to the community at large. Its major weakness is forgery, anyone can create a key claiming to be someone else and broadcast it, and until the forgery is discovered they can masquerade as the claimed user.

12 Public Announcement Uncontrolled key distribution:
The point of public-key encryption is that the public key is public, hence any participant can send his or her public key to any other participant, or broadcast the key to the community at large. Its major weakness is forgery, anyone can create a key claiming to be someone else and broadcast it, and until the forgery is discovered they can masquerade as the claimed user.

13 Publicly Available Directory
We can obtain greater security by registering public 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 A greater degree of security can be achieved by maintaining a publicly available dynamic directory of public keys. Maintenance and distribution of the public directory would have to be the responsibility of some trusted entity or organization. This scheme is clearly more secure than individual public announcements but still has vulnerabilities to tampering or forgery.

14 Publicly Available Directory
Public key publication A greater degree of security can be achieved by maintaining a publicly available dynamic directory of public keys. Maintenance and distribution of the public directory would have to be the responsibility of some trusted entity or organization. This scheme is clearly more secure than individual public announcements but still has vulnerabilities to tampering or forgery. < Public Key Publication>

15 Public-Key Authority It improves security by tightening control over distribution of keys from directory It assumes that a central authority maintains a dynamic directory of public keys of all participants In addition, each participant reliably knows the public key of the authority and only the authority knows the corresponding private key. Users interact with directory to obtain any desired public key securely does require real-time access to directory when keys are needed Stronger security for public-key distribution can be achieved by providing tighter control over the distribution of public keys from the directory. It requires users to know the public key for the directory, and that they interact with directory in real-time to obtain any desired public key securely. Note that a total of seven messages are required, as shown next.

16 < Public Key Distribution Scenario >
Public-Key Authority (1) A는 기관에 B의 공개키 요구함(with Time stamp) (4,5) 기관으로부터 A의 공개키 PUa를 얻음 (2) PRauth (기관의 개인키) 로 암호화해서 A로 전송. A는 기관의 공개키로 복호화해서 해당 정보 얻음 (3)얻은 B의 공개키 PUb로 B에게 보내는 정보 암호화 Stallings Figure 10.3 “Public-Key Authority” illustrates a typical protocol interaction. See text for details of steps in protocol. (7) B가 보낸 nonce 값 N2를 A가 자신의 비밀키 PRa로 풀어서 이를 PUb로 암호화해서 B로 보냄. B의 통신 상대자가 A임을 확인시켜줌 (6) 얻은 A의 공개키 PUa로 암호화해서 보냄(N1은 B만이 PRb로 풀 수 있었기 때문에, N1을 A로 다시 보냄으로서 A의 통신대상자가 B임을 확인시켜줌) < Public Key Distribution Scenario >

17 Public-Key Certificates
Weakness of the public key authority: Public key authority can be a bottleneck in the system Also, the directory of names and public keys maintained by the authority is vulnerable to tampering. An further improvement is to use certificates, which can be used to exchange keys without contacting a public-key authority, in a way that is as reliable as if the keys were obtained directly from a public-key authority. A certificate binds an identity to public key, with all contents signed by a trusted Public-Key or Certificate Authority (CA). This can be verified by anyone who knows the public-key authorities public-key. One scheme has become universally accepted for formatting public-key certificates: the X.509 standard. X.509 certificates are used in most network security applications, including IP security, secure sockets layer (SSL), secure electronic transactions (SET), and S/MIME. Will discuss it in much more detail later.

18 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 information such as period of validity, rights of use etc with all contents signed by a trusted Public-Key or Certificate Authority (CA) can be verified by anyone who knows the public-key authoritie’s public-key An further improvement is to use certificates, which can be used to exchange keys without contacting a public-key authority, in a way that is as reliable as if the keys were obtained directly from a public-key authority. A certificate binds an identity to public key, with all contents signed by a trusted Public-Key or Certificate Authority (CA). This can be verified by anyone who knows the public-key authorities public-key. One scheme has become universally accepted for formatting public-key certificates: the X.509 standard. X.509 certificates are used in most network security applications, including IP security, secure sockets layer (SSL), secure electronic transactions (SET), and S/MIME. Will discuss it in much more detail later.

19 Public-Key Certificates
각 가입자 A,B는 인증기관에 자신의 공개키를 제공하면서 인증서(CA,CB) 발급 요청 인증기관의 비밀키 PRauth로 암호화되어 전송됨 A는 다른 가입자에게 인증서 제공  해당 가입자는 기관의 공개키 PUauth로 복호 가능  Time, IDA, PUa 정보 얻음 Stallings Figure 10.4 “Public-Key Certificates” illustrates such a scheme. See text for details of steps in protocol. < Exchange of Public Key Certificates >

20 Distribution of Secret Keys Using PKC
For channel encryption, few people use the PKC for their secure communications Because public-key algorithms are slow so usually want to use private-key encryption to protect message contents So public-key encryption provides for the distribution of secret keys to be used for conventional encryption Once public keys have been distributed or have become accessible, secure communication that thwarts eavesdropping, tampering, or both, is possible. However, few users will wish to make exclusive use of public-key encryption for communication because of the relatively slow data rates that can be achieved. Accordingly, public-key encryption provides for the distribution of secret keys to be used for conventional encryption.

21 Simple Secret Key Distribution
proposed by Merkle in 1979 A generates a new temporary public key pair {PUa, PRa} A sends B the public key and their identity B generates a session key Ks sends it to A encrypted using the supplied public key A decrypts the session key and both (A,B) can use this key This protocol is insecure against an adversary who can intercept messages and then either relay the intercepted message or substitute another message (man-in-the-middle attack) An extremely simple scheme was put forward by Merkle [MERK79]. But it is insecure against an adversary who can intercept messages and then either relay the intercepted message or substitute another message. Such an attack is known as a man-in-the-middle attack [RIVE84]. < Simple use public-key encryption to establish a session key >

22 Man-in-the-middle Attack
A generates a public/private key pair {PUa, PRa} and transmits a message intended for B consisting of PUa and an identifier of A, IDA. E intercepts the message, creates its own public/private key pair {PUe, PRe} and transmits PUe||IDA to B. B generates a secret key, Ks, and transmits E(PUe, Ks). E intercepts the message, and learns Ks by computing D(PRe, E(PUe, Ks)). E transmits E(PUa, Ks) to A E {PUa, PRa} (1) PUa || IDA {PUe, PRe} (2) PUe || IDA {Ks} (3)E{PUe,Ks} (5)E{PUa,Ks} (4) D{PRe, E{PUe, Ks}} < Man-in-the-middle attack> An extremely simple scheme was put forward by Merkle [MERK79]. But it is insecure against an adversary who can intercept messages and then either relay the intercepted message or substitute another message. Such an attack is known as a man-in-the-middle attack [RIVE84]. * A & B know the Ks and are unaware that Ks has also revealed to E

23 Secret Key Distribution with Confidentiality and Authentication
(1) A uses B's public key to encrypt a message to B containing an identifier of A (IDA) and a nonce (N1), which is used to identify this transaction uniquely. (2) B sends a message to A encrypted with PUa and containing A's nonce (N1) & a new nonce generated by B (N2) because only B could have decrypted message(1). The presence of N1 in message (2) assures A that the correspondent is B. Stallings Figure 10.6 “Public-Key Distribution of Secret Keys” illustrates such an exchange. See text for details of steps in protocol. Note that these steps correspond to final 3 of Figure 10.3, hence can get both secret key exchange and authentication in a single protocol.

24 Secret Key Distribution with Confidentiality and Authentication
(3) A returns N2 encrypted using B's public key, to assure B that its correspondent is A (4) A selects a secret key Ks and sends M = E(PUb, E(PRa, Ks)) to B. Encryption of this message with B's public key ensures that only B can read it; encryption with A's private key ensures that only A could have sent it. * B computes D(PUa, D(PRb, M)) to recover the secret key. Stallings Figure 10.6 “Public-Key Distribution of Secret Keys” illustrates such an exchange. See text for details of steps in protocol. Note that these steps correspond to final 3 of Figure 10.3, hence can get both secret key exchange and authentication in a single protocol.

25 Hybrid Key Distribution
Another way to use public-key encryption to distribute secret keys is a hybrid approach : The use of KDC(Key Distribution Center) (used on IBM mainframe computer) It shares secret master key with each user public-key used to distribute master keys especially useful with widely distributed users distributes session key using master key Feature of this scheme Performance : The session key exchange by public-key encryption could degrade overall system. With this scheme, the public-key encryption is used only to update the master key b/w a user and the KDC Backward compatibility : this hybrid scheme is easily overlaid on existing KDC scheme. Yet another way to use public-key encryption to distribute secret keys is a hybrid approach in use on IBM mainframes [LE93]. 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 encrypted with the master key. A public key scheme is used to distribute the master keys. The addition of a public-key layer provides a secure, efficient means of distributing master keys. This is an advantage in a configuration in which a single KDC serves a widely distributed set of users.

26 Agenda Review Key Management Diffie-Hellman Key Exchange
Elliptic Curve Cryptography 26

27 Diffie-Hellman Key Exchange
first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts note: now know that Williamson (UK) secretly proposed the concept in 1970 is a practical method for public exchange of a secret key used in a number of commercial products The idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1977 by Diffie & Hellman. The concept had been previously described in a classified report in 1970 by Williamson (UK CESG) - and subsequently declassified in 1987, see [ELLI99].

28 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 a finite field (modulo a prime or a polynomial) - easy security relies on the difficulty of computing discrete logarithms (similar to factoring) – hard The purpose of the algorithm is to enable two users to securely exchange a key that can then be used for subsequent encryption of messages. The algorithm itself is limited to the exchange of secret values, which depends on the value of the public/private keys of the participants. The Diffie-Hellman algorithm uses exponentiation in a finite (Galois) field (modulo a prime or a polynomial), and depends for its effectiveness on the difficulty of computing discrete logarithms.

29 Discrete Logarithm We can define the discrete logarithm in the following way First, we define a primitive root of a prime number p as one whose powers modulo p generate all the integers from 1 to p-1 That is, if a is a primitive root of the prime number p, then the numbers a mod p, a2 mod p,..., ap-1 mod p are distinct and consist of the integers from 1 through p-1 in some permutation. For any integer b and a primitive root a of prime number p, we can find a unique exponent i such that b= ai (mod p) where 0 <= i<= (p-1) The exponent i is referred to as the discrete logarithm of b for the base a, mod p dloga,p (b) The purpose of the algorithm is to enable two users to securely exchange a key that can then be used for subsequent encryption of messages. The algorithm itself is limited to the exchange of secret values, which depends on the value of the public/private keys of the participants. The Diffie-Hellman algorithm uses exponentiation in a finite (Galois) field (modulo a prime or a polynomial), and depends for its effectiveness on the difficulty of computing discrete logarithms.

30 Diffie-Hellman Setup all users agree on global parameters:
large prime integer or polynomial q a being a primitive root mod q each user (eg. A) generates their key chooses a secret key (number): xA < q compute their public key: yA = axA mod q each user makes his key (e.g. yA) in public In the Diffie-Hellman key exchange algorithm, there are two publicly known numbers: a prime number q and an integer a that is a primitive root of q. The prime q and primitive root a can be common to all using some instance of the D-H scheme. Note that the primitive root a is a number whose powers successively generate all the elements mod q. Users Alice and Bob choose random secrets x's, and then "protect" them using exponentiation to create their public y's. For an attacker monitoring the exchange of the y's to recover either of the x's, they'd need to solve the discrete logarithm problem, which is hard.

31 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-key encryption scheme between Alice and Bob if 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 The actual key exchange for either party consists of raising the others "public key' to power of their private key. The resulting number (or as much of as is necessary) is used as the key for a block cipher or other private key scheme. For an attacker to obtain the same value they need at least one of the secret numbers, which means solving a discrete log, which is computationally infeasible given large enough numbers. Note that if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public-keys.

32 Diffie-Hellman Key Exchange
Suppose that user A wishes to set up a connection with user B and use a secret key to encrypt messages on that connection The actual key exchange for either party consists of raising the others "public key' to power of their private key. The resulting number (or as much of as is necessary) is used as the key for a block cipher or other private key scheme. For an attacker to obtain the same value they need at least one of the secret numbers, which means solving a discrete log, which is computationally infeasible given large enough numbers. Note that if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public-keys.

33 Diffie-Hellman Example
users Alice & Bob who wish to exchange keys: agree on prime q=353 and a=3 select random secret keys: A chooses xA=97, B chooses xB=233 compute respective public keys: yA=397 mod 353 = 40 (Alice) yB=3233 mod 353 = 248 (Bob) compute shared session key as: KAB= yBxA mod 353 = = 160 (Alice) KAB= yAxB mod 353 = = 160 (Bob) Here is an example of Diffie-Hellman from the text.

34 DH Key Exchange Protocols
users could create random private/public DH keys each time they communicate users could create a known private/public DH key and publish in a directory, then consulted and used to securely communicate with them both of these are vulnerable to a meet-in-the-Middle Attack authentication of the keys is needed Now consider a simple protocol that makes use of the Diffie-Hellman calculation. Suppose that user A wishes to set up a connection with user B and use a secret key to encrypt messages on that connection. User A can generate a one-time private key XA, calculate YA, and send that to user B. User B responds by generating a private value XB, calculating YB, and sending YB to user A. Both users can now calculate the key. The necessary public values q and a would need to be known ahead of time. Alternatively, user A could pick values for q and a and include those in the first message. 34

35 Man-in-the-Middle Attack
Darth prepares by creating two private / public keys Alice transmits her public key to Bob Darth intercepts this and transmits his first public key to Bob. Darth also calculates a shared key with Alice Bob receives the public key and calculates the shared key (with Darth instead of Alice) Bob transmits his public key to Alice Darth intercepts this and transmits his second public key to Alice. Darth calculates a shared key with Bob Alice receives the key and calculates the shared key (with Darth instead of Bob) Darth can then intercept, decrypt, re-encrypt, forward all messages between Alice & Bob The protocol described on the previous slide is insecure against a man-in-the-middle attack. Suppose Alice and Bob wish to exchange keys, and Darth is the adversary. The attack proceeds as follows: Darth prepares for the attack by generating two random private keys XD1 and XD2 and then computing the corresponding public keys YD1 and YD2 Alice transmits YA to Bob. Darth intercepts YA and transmits YD1 to Bob. Darth also calculates K2 = (YA )^ XD2 mod q Bob receives YD1 and calculates K1=(YD1 )^ XB mod q Bob transmits YB to Alice. Darth intercepts YB and transmits YD2 to Alice. Darth calculates K1=(YB )^ XD1 mod q Alice receives YD2 and calculates K2=(YD2 )^ XA mod q . At this point, Bob and Alice think that they share a secret key, but instead Bob and Darth share secret key K1 and Alice and Darth share secret key K2. All future communication between Bob and Alice is compromised in the following way: Alice sends an encrypted message M: E(K2, M). Darth intercepts the encrypted message and decrypts it, to recover M. Darth sends Bob E(K1, M) or E(K1, M'), where M' is any message. In the first case, Darth simply wants to eavesdrop on the communication without altering it. In the second case, Darth wants to modify the message going to Bob. The key exchange protocol is vulnerable to such an attack because it does not authenticate the participants. This vulnerability can be overcome with the use of digital signatures and public- key certificates. 35

36 ElGamal Cryptography public-key cryptosystem related to DH
so uses exponentiation in a finite (Galois) with security based difficulty of computing discrete logarithms, as in DH each user (eg. A) generates their key chooses a secret key (number): 1 < xA < q-1 compute their public key: yA = axA mod q In 1984, T. Elgamal announced a public-key scheme based on discrete logarithms, closely related to the Diffie-Hellman technique [ELGA84, ELGA85]. The ElGamal cryptosystem is used in some form in a number of standards including the digital signature standard (DSS) and the S/MIME standard. As with Diffie-Hellman, the global elements of ElGamal are a prime number q and a, which is a primitive root of q. User A generates a private/public key pair as shown. The security of ElGamal is based on the difficulty of computing discrete logarithms, to recover either x given y, or k given K (next slide). 36

37 recovering key K as K = C1xA modq = ak*xA modq
ElGamal Message Exchange Bob encrypt a message to send to A computing represent message M in range 0 <= M <= q-1 longer messages must be sent as blocks chose random integer k with 1 <= k <= q-1 compute one-time key K = yAk mod q = axA*k mod q encrypt M as a pair of integers (C1,C2) where C1 = ak mod q ; C2 = KM mod q A then recovers message by recovering key K as K = C1xA modq = ak*xA modq computing M as M = C2 K-1 mod q a unique k must be used each time otherwise result is insecure yA = axA mod q Any user B that has access to A's public key can encrypt a message as shown. These steps correspond to Figure 9.1a in that Alice generates a public/private key pair; Bob encrypts using Alice's public key; and Alice decrypts using her private key. See text for details of why these steps result in M being recovered. Note that K functions as a one-time key, used to encrypt and decrypt the message. If a message must be broken up into blocks and sent as a sequence of encrypted blocks, a unique value of k should be used for each block. If k is used for more than one block, knowledge of one block m of the message enables the user to compute other blocks as shown in the text. The basic idea with El Gamal encryption is to choose a random key, protect it, then use it to scramble the message by multiplying the message with it. Two bits of info have to be sent: the first to recover this temporary key, the second the actual scrambled message. See that El Gamal encryption involves 1 modulo exponentiation and a multiplication (vs 1 exponentiation for RSA). 37

38 ElGamal Example use field GF(19) q=19 and a=10 Alice computes her key:
A chooses xA=5 & computes yA=105 mod 19 = 3 Bob send message m=17 as (11,5) by chosing random k=6 computing K = yAk mod q = 36 mod 19 = 7 computing C1 = ak mod q = 106 mod 19 = 11; C2 = KM mod q = 7.17 mod 19 = 5 Alice recovers original message by computing: recover K = C1xA mod q = 115 mod 19 = 7 compute inverse K-1 = 7-1 = 11 recover M = C2 K-1 mod q = 5.11 mod 19 = 17 Here is an example of ElGamal from the text using the prime field GF(19); that is, q = 19. It has primitive roots {2, 3, 10, 13, 14, 15}, as shown in Table 8.3. We choose a = 10. Alice generates a key pair as shown. Suppose Bob wants to send the message with the value M = 17. Then he computes the ciphertext pair (11, 5) and sends this to Alice. Alice recovers the message by first recovering K, then computing its inverse (using the Extended Euclids Algorithm – see Ch 4), and finally recovering M. 38

39 Agenda Review Key Management Diffie-Hellman Key Exchange
Elliptic Curve Cryptography 39

40 Elliptic Curve Cryptography
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 offers same security with smaller bit sizes newer, but not as well analyzed A major issue with the use of Public-Key Cryptography, is the size of numbers used, and hence keys being stored. Recently, an alternate approach has emerged, elliptic curve cryptography (ECC), which performs the computations using elliptic curve arithmetic instead of integer or polynomial arithmetic. Already, ECC is showing up in standardization efforts, including the IEEE P1363 Standard for Public-Key Cryptography. Although the theory of ECC has been around for some time, it is only recently that products have begun to appear and that there has been sustained cryptanalytic interest in probing for weaknesses. Accordingly, the confidence level in ECC is not yet as high as that in RSA.

41 Real Elliptic Curves an elliptic curve is defined by an equation in two variables x & y, with coefficients consider a cubic elliptic curve of form y2 = x3 + ax + b where x,y,a,b are all real numbers also define zero point O have addition operation for elliptic curve geometrically sum of Q+R is reflection of intersection R First consider elliptic curves using real number values. See text for detailed rules of addition and relation to zero point O. Can derive an algebraic interpretation of addition, based on computing gradient of tangent and then solving for intersection with curve. There is also an algebraic description of additions over elliptic curves, see text.

42 Real Elliptic Curve Example
Stallings Figure 10.9b “Example of Elliptic Curves”, illustrates the geometric interpretation of elliptic curve addition.

43 Finite Elliptic Curves
Elliptic curve cryptography uses curves whose variables & coefficients are finite have two families commonly used: prime curves Ep(a,b) defined over Zp use integers modulo a prime best in software binary curves E2m(a,b) defined over GF(2n) use polynomials with binary coefficients best in hardware Elliptic curve cryptography makes use of elliptic curves in which the variables and coefficients are all restricted to elements of a finite field. Two families of elliptic curves are used in cryptographic applications: prime curves over Zp (best for software use), and binary curves over GF(2m) (best for hardware use). There is no obvious geometric interpretation of elliptic curve arithmetic over finite fields. The algebraic interpretation used for elliptic curve arithmetic over does readily carry over. See text for detailed discussion.

44 Elliptic Curve Cryptography
ECC addition is analog of modulo multiply ECC repeated addition is analog of modulo exponentiation need “hard” problem equiv to discrete log 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 logarithm problem Certicom example: E23(9,17) Elliptic Curve Cryptography uses addition as an analog of modulo multiply, and repeated addition as an analog of modulo exponentiation. The “hard” problem is the elliptic curve logarithm problem.

45 ECC Diffie-Hellman can do key exchange analogous to D-H
users 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, nB<n compute public keys: PA=nAG, PB=nBG compute shared key: K=nAPB, K=nBPA same since K=nAnBG Illustrate here the elliptic curve analog of Diffie-Hellman key exchange, which is a close analogy given elliptic curve multiplication equates to modulo exponentiation.

46 ECC 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 and computes public key PA=nAG to encrypt Pm : Cm={kG, Pm+kPb}, k random decrypt Cm compute: Pm+kPb–nB(kG) = Pm+k(nBG)–nB(kG) = Pm Several approaches to encryption/decryption using elliptic curves have been analyzed in the literature. This one is an analog of the ElGamal public-key encryption algorithm. The sender must first encode any message M as a point on the elliptic curve Pm (there are relatively straightforward techniques for this). Note that the ciphertext is a pair of points on the elliptic curve. The sender masks the message using random k, but also sends along a “clue” allowing the receiver who know the private-key to recover k and hence the message. For an attacker to recover the message, the attacker would have to compute k given G and kG, which is assumed hard.

47 ECC Security relies on elliptic curve logarithm problem
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 The security of ECC depends on how difficult it is to determine k given kP and P. This is referred to as the elliptic curve logarithm problem. The fastest known technique for taking the elliptic curve logarithm is known as the Pollard rho method. Compared to factoring integers or polynomials, can use much smaller numbers for equivalent levels of security.

48 Comparable Key Sizes for Equivalent Security
Symmetric scheme (key size in bits) ECC-based scheme (size of n in bits) RSA/DSA (modulus size in bits) 56 112 512 80 160 1024 224 2048 128 256 3072 192 384 7680 15360 Stallings Table “ Comparable Key Sizes in Terms of Computational Effort for Cryptanalysis” illustrates the relative key sizes needed for security.

49 Next… We will study on Message Authentication and Hash Functions…

50 Q&A 50


Download ppt "7/30/2019 Computer Security Ch10: Key management & Other Public Key Cryptosystems Howon Kim 2019."

Similar presentations


Ads by Google