This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest

Similar documents
1. Diffie-Hellman Key Exchange

Key Management and Distribution

Cryptography and Network Security

Cryptography and Network Security Chapter 10. Fourth Edition by William Stallings

Key Management and Elliptic Curves

Elliptic Curve Public Key Cryptography

CS669 Network Security

Public Key Cryptography

Chapter 9. Public Key Cryptography, RSA And Key Management

The most important development from the work on public-key cryptography is the digital signature. Message authentication protects two parties who

Chapter 7 Public Key Cryptography and Digital Signatures

ECC Elliptic Curve Cryptography. Foundations of Cryptography - ECC pp. 1 / 31

Understanding Cryptography by Christof Paar and Jan Pelzl. Chapter 9 Elliptic Curve Cryptography

Abhijith Chandrashekar and Dushyant Maheshwary

UNIT III 3.1DISCRETE LOGARITHMS

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Public Key Algorithms

Chapter 9 Public Key Cryptography. WANG YANG

Public Key Cryptography and RSA

Lecture 2 Applied Cryptography (Part 2)

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Computer Security: Principles and Practice

Public Key Algorithms

Computer Security 3/23/18

PUBLIC KEY CRYPTO. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Lecture 6: Overview of Public-Key Cryptography and RSA

Number Theory and RSA Public-Key Encryption

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

Cryptography and Network Security. Sixth Edition by William Stallings

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Public Key Cryptography

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

Elliptic Curve Cryptography

CSC 474/574 Information Systems Security

CSC/ECE 774 Advanced Network Security

Public Key Algorithms

Introduction to Cryptography Lecture 7

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

T Cryptography and Data Security

Spring 2010: CS419 Computer Security

Elliptic Curves as Tool for Public Key Cryptography

T Cryptography and Data Security

Overview. Public Key Algorithms I

Implementation and Benchmarking of Elliptic Curve Cryptography Algorithms

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Keywords Session key, asymmetric, digital signature, cryptosystem, encryption.

Prime Field over Elliptic Curve Cryptography for Secured Message Transaction

Public-key encipherment concept

Encryption. INST 346, Section 0201 April 3, 2018

RSA. Public Key CryptoSystem

CSC 774 Network Security

Chapter 3 Public Key Cryptography

Elliptic Curve Cryptography (ECC) Elliptic Curve Cryptography. Elliptic Curves. Elliptic Curve Cryptography (ECC) Elliptic curve

Cryptography and Network Security

10.1 Introduction 10.2 Asymmetric-Key Cryptography Asymmetric-Key Cryptography 10.3 RSA Cryptosystem

CS 161 Computer Security

Chapter 3. Principles of Public-Key Cryptosystems

Other Topics in Cryptography. Truong Tuan Anh

CPSC 467b: Cryptography and Computer Security

PROTECTING CONVERSATIONS

Cryptography Lecture 9 Key distribution and trust, Elliptic curve cryptography

Lecture 6 - Cryptography

Intro to Public Key Cryptography Diffie & Hellman Key Exchange

Notes for Lecture 10

Crypto Basics. Recent block cipher: AES Public Key Cryptography Public key exchange: Diffie-Hellmann Homework suggestion

Cryptography and Network Security. Sixth Edition by William Stallings

Elliptic Curve Cryptography

CS 161 Computer Security

Key Exchange. Secure Software Systems

Diffie-Hellman. Part 1 Cryptography 136

CSE 127: Computer Security Cryptography. Kirill Levchenko

Acronyms. International Organization for Standardization International Telecommunication Union ITU Telecommunication Standardization Sector

KALASALINGAM UNIVERSITY

Lecture 1 Applied Cryptography (Part 1)

Elliptic Curve Cryptosystem

CPSC 467: Cryptography and Computer Security

Digital Signature. Raj Jain

Sankalchand Patel College of Engineering, Visnagar Department of Computer Engineering & Information Technology. Question Bank

Network Security. Chapter 4 Public Key Cryptography. Public Key Cryptography (4) Public Key Cryptography

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Published by: PIONEER RESEARCH & DEVELOPMENT GROUP ( 158

Analysis, demands, and properties of pseudorandom number generators

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Introduction to Cryptography ECE 597XX/697XX

SEC 1: Elliptic Curve Cryptography

Introduction to Cryptography Lecture 7

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Public-Key Cryptography

Applied Cryptography and Computer Security CSE 664 Spring 2018

Elliptic Curve Cryptography (ECC) Elliptic Curve Cryptography. Elliptic Curves. Elliptic Curve Cryptography (ECC) Elliptic curve

Acronyms. International Organization for Standardization International Telecommunication Union ITU Telecommunication Standardization Sector

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Introduction. Cambridge University Press Mathematics of Public Key Cryptography Steven D. Galbraith Excerpt More information

2.1 Basic Cryptography Concepts

Public Key Encryption. Modified by: Dr. Ramzi Saifan

Public Key (asymmetric) Cryptography

Transcription:

1

2

3

This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest PKCS, Diffie- Hellman key exchange. This first published public-key algorithm appeared in the seminal paper by Diffie and Hellman that defined public-key cryptography [DIFF76b] and is generally referred to as Diffie-Hellman key exchange. The concept had been previously described in a classified report in 1970 by Williamson (UK CESG) - and subsequently declassified in 1987, see [ELLI99]. 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. A number of commercial products employ this key exchange technique. 4

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. 5

6

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. 7

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. 8

Here is an example of Diffie-Hellman from the text using prime q=353, showing how each computes its public key, and then how after they exchange public keys, each can compute the common secret key.i n this simple example, it would be possible by brute force to determine the secret key 160. In particular, an attacker E can determine the common key by discovering a solution to the equation 3 a mod 353 = 40 or the equation 3 b mod 353 = 248. The brute-force approach is to calculate powers of 3 modulo 353, stopping when the result equals either 40 or 248. The desired answer is reached with the exponent value of 97, which provides 3 97 mod 353 = 40. With larger numbers, the problem becomes impractical. 9

10

11

12

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 X A, calculate Y A, and send that to user B. User B responds by generating a private value X B, calculating Y B, and sending Y B 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. 13

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: 1.Darth prepares for the attack by generating two random private keys X D1 and X D2 and then computing the corresponding public keys Y D1 and Y D2 2. Alice transmits Y A to Bob. 3. Darth intercepts Y A and transmits Y D1 to Bob. Darth also calculates K2 = (Y A )^ X D2 mod q 4.Bob receives Y D1 and calculates K1=(Y D1 )^ X B mod q 5.Bob transmits Y B to Alice. 6.Darth intercepts Y B and transmits Y D2 to Alice. Darth calculates K1=(Y B )^ X D1 mod q 7.Alice receives Y D2 and calculates K2=(Y D2 )^ X A 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: 1.Alice sends an encrypted message M: E(K2, M). 2.Darth intercepts the encrypted message and decrypts it, to recover M. 3.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. 14

15

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. The principal attraction of ECC, compared to RSA, is that it appears to offer equal security for a far smaller key size, thereby reducing processing overhead. 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. 16

An elliptic curve is defined by an equation in two variables, with coefficients. For cryptography, the variables and coefficients are restricted to elements in a finite field, which results in the definition of a finite abelian group (see Ch 4 for details of an abelian group). Before looking at this, we first look at elliptic curves in which the variables and coefficients are real numbers. This case is perhaps easier to visualize. Elliptic curves are not ellipses. They are so named because they are described by cubic equations, similar to those used for calculating the circumference of an ellipse. For our purpose, we can consider cubic equations for elliptic curves of the form shown here. Also included in the definition of an elliptic curve is a single element denoted O and called the point at infinity or the zero point. Now, consider the set of points E(a, b) consisting of all of the points (x, y) that satisfy this equation together with the element O. Using a different value of the pair (a, b) results in a different set E(a, b). 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. 17

Stallings Figure 10.4b Example of Elliptic Curves, illustrates the geometric interpretation of elliptic curve addition, as follows: If three points on an elliptic curve lie on a straight line, their sum is O. hence define addition as: 1.O serves as the additive identity. Thus O = O; for any point P on the elliptic curve, P + O = P. In what follows, we assume P <> O and Q <> O. 2.The negative of a point P is the point with the same x coordinate but the negative of the y coordinate; that is, if P = (x, y), then P = (x, y). These two points can be joined by a vertical line & that P + ( P) = P P = O. 3.To add two points P and Q with different x coordinates, draw a straight line between them and find the third point of intersection R. There is a unique point R that is the point of intersection (unless the line is tangent to the curve at either P or Q, in which case we take R = P or R = Q, respectively). To form a group structure, we need to define addition on these three points as follows: P + Q = R. ie. P + Q to be the mirror image (with respect to the x axis) of the third point of intersection as shown on slide. 4.The geometric interpretation of the preceding item also applies to two points, P and P, with the same x coordinate. The points are joined by a vertical line, which can be viewed as also intersecting the curve at the infinity point. We therefore have P + ( P) = O, consistent with item (2). 5.To double a point Q, draw the tangent line and find the other point of intersection S. Then Q + Q = 2Q = S. With the preceding list of rules, it can be shown that the set E(a, b) is an abelian group. 18

19

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 Z p (best for software use), and binary curves over GF(2 m ) (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. 20

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. We give an example taken from the Certicom Web site (www.certicom.com). Consider the group E 23 (9, 17). This is the group defined by the equation y 2 mod 23 = (x 3 + 9x + 17) mod 23. What is the discrete logarithm k of Q = (4, 5) to the base P = (16, 5)? The brute-force method is to compute multiples of P until Q is found. Thus 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). Because 9P = (4, 5) = Q, the discrete logarithm Q = (4, 5) to the base P = (16, 5) is k = 9. In a real application, k would be so large as to make the brute-force approach infeasible. 21

22

Illustrate here the elliptic curve analog of Diffie-Hellman key exchange, which is a close analogy given elliptic curve multiplication equates to modulo exponentiation. Key exchange using elliptic curves can be done in the following manner. First pick a large integer q, which is either a prime number p or an integer of the form 2 m and elliptic curve parameters a and b for Equation (10.5) or Equation (10.7). This defines the elliptic group of points E q (a, b). Next, pick a base point G = (x 1, y 1 ) in E q (a, b) whose order is a very large value n. The order n of a point G on an elliptic curve is the smallest positive integer n such that ng = O. So E q (a, b) and G are parameters of the cryptosystem known to all participants. A key exchange between users A and B can then be accomplished as shown. To break this scheme, an attacker would need to be able to compute k given G and kg, which is assumed hard. 23

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 P m (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. 24

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. 25

Stallings Table 10.3 - Comparable Key Sizes in Terms of Computational Effort for Cryptanalysis ompares various algorithms by showing comparable key sizes in terms of computational effort for cryptanalysis. As can be seen, a considerably smaller key size can be used for ECC compared to RSA. Furthermore, for equal key lengths, the computational effort required for ECC and RSA is comparable. Thus, there is a computational advantage to using ECC with a shorter key length than a comparably secure RSA. 26

We noted in Chapter 7 that, because a symmetric block cipher produces an apparently random output, it can serve as the basis of a pseudorandom number generator (PRNG). Similarly, an asymmetric encryption algorithm produces apparently random output and can be used to build a PRNG. Because asymmetric algorithms are typically much slower than symmetric algorithms, asymmetric algorithms are not used to generate open-ended PRNG bit streams. Rather, the asymmetric approach is useful for creating a pseudorandom function (PRF) for generating a short pseudorandom bit sequence. In this section, we examine two PRNG designs based on pseudorandom functions. 27

For a sufficient key length, the RSA algorithm is considered secure and is a good candidate to form the basis of a PRNG. Such a PRNG, known as the Micali-Schnorr PRNG is recommended in the ANSI standard X9.82 (Random Number Generation) and in the ISO standard 18031 (Random Bit Generation). The PRNG is illustrated in Stallings Figure 10.8. This PRNG has much the same structure as the output feedback (OFB) mode used as a PRNG but using RSA instead of a block cipher. We can define the PRNG as follows: SETUP Select parameters per normal RSA key setup, with r + k =bitlength of n SEED Select a random seed x of bitlength the same as n GENERATE a pseudorandom sequence of length k x m using the loop: for i from 1 to m do the following: y i = x e i-1 mod n x i = r most significant bits of y i z i = k least significant bits of y i OUTPUT The output sequence is z 1 z 2 z m The parameters n, r, e, and k are selected to satisfy the six conditions detailed in the text. There is clearly a tradeoff between r and k. Because RSA is computationally intensive, we would like to generate as many pseudorandom bits per iteration as possible, and therefore would like a large value of k. However, for cryptographic strength, we would like r to be as large as possible. 28

In this subsection, we briefly summarize a technique developed by the U.S. National Security Agency known as dual elliptic curve PRNG (DEC PRNG). This technique is recommended in NIST SP 800-90, the ANSI standard X9.82 and in the ISO standard 18031. There has been some controversy regarding both the security and inefficiency of this algorithm compared to other alternatives. Can summarize the algorithm as follows: Let P and Q be two known points on a given elliptic curve. The seed of the DEC PRNG is a random integer s 0 Let x denote a function that gives the x-coordinate of a point of the curve. Let lsb i (s) denote the i least significant bits of an integer s. The DEC PRNG transforms the seed into the pseudorandom sequence of length 240k, k > 0, as follows. for i = 1 to k do set s i = x(s i-1 P ) set r i = lsb 240 (x(s i Q)) end for return r 1,..., r k Given the security concerns expressed for this PRNG, the only motivation for its use would be that it is used in a system that already implements ECC but does not implement any other symmetric, asymmetric, or hash cryptographic algorithm that could be used to build a PRNG. 29

Chapter 10 summary. 30