Understanding Cryptography by Christof Paar and Jan Pelzl www.crypto-textbook.com These slides were prepared by Christof Paar and Jan Pelzl Chapter 8 –

Slides:



Advertisements
Similar presentations
The Diffie-Hellman Algorithm
Advertisements

Public Key Cryptography INFSCI 1075: Network Security – Spring 2013 Amir Masoumzadeh.
7. Asymmetric encryption-
Public Key Algorithms …….. RAIT M. Chatterjee.
Cryptography1 CPSC 3730 Cryptography Chapter 10 Key Management.
Dr. Lo’ai Tawalbeh Fall 2005 Chapter 10 – Key Management; Other Public Key Cryptosystems Dr. Lo’ai Tawalbeh Computer Engineering Department Jordan University.
Public Key Cryptography and the RSA Algorithm
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
The Diffie-Hellman Algorithm Riley Lochridge April 11, 2003.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
ASYMMETRIC CIPHERS.
Cryptography and Network Security Chapter 13
Computer Science Public Key Management Lecture 5.
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Bob can sign a message using a digital signature generation algorithm
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 10 – Digital Signatures.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cyrtographic Security Identity-based Encryption 1Dennis Kafura – CS5204 – Operating Systems.
Chapter 21 Public-Key Cryptography and Message Authentication.
Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both sender and receiver  if this key is disclosed.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Cryptography and Network Security Chapter 13 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Public key ciphers 2 Session 6.
Symmetric Cryptography, Asymmetric Cryptography, and Digital Signatures.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography and Network Security Key Management and Other Public Key Cryptosystems.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 11 – Hash Functions.
Scott CH Huang COM 5336 Lecture 7 Other Public-Key Cryptosystems Scott CH Huang COM 5336 Cryptography Lecture 7.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Tim Güneysu, Christof Paar and Jan Pelzl.
1 Chapter 10: Key Management in Public key cryptosystems Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Modified by Prof. M. Singhal,
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
Understanding Cryptography by Christof Paar and Jan Pelzl Chapter 13 – Key Establishment ver. Jan 7, 2010 These slides were prepared.
Public Key Cryptosystem Introduced in 1976 by Diffie and Hellman [2] In PKC different keys are used for encryption and decryption 1978: First Two Implementations.
Key Management Network Systems Security Mort Anvari.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 7 – The RSA Cryptosystem.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Cryptography and Network Security Chapter 10 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Understanding Cryptography by Christof Paar and Jan Pelzl Chapter 4 – The Advanced Encryption Standard (AES) ver. October 28, 2009.
1 Cryptanalysis Lab Elliptic Curves. Cryptanalysis Lab Elliptic Curves 2 Outline [1] Elliptic Curves over R [2] Elliptic Curves over GF(p) [3] Properties.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
Cryptography and Network Security Chapter 13
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 6 – Introduction.
Chapter 9 – Elliptic Curve Cryptography ver. November 3rd, 2009
Public Key Cryptosystem
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 10 – Digital Signatures.
El Gamal and Diffie Hellman
El Gamal and Diffie Hellman
CSCE 715: Network Systems Security
Presentation transcript:

Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Christof Paar and Jan Pelzl Chapter 8 – Public-Key Cryptosystems Based on the Discrete Logarithm Problem ver. February 22, 2010

 The slides can used free of charge. All copyrights for the slides remain with Christof Paar and Jan Pelzl.  The title of the accompanying book “Understanding Cryptography” by Springer and the author’s names must remain on each slide.  If the slides are modified, appropriate credits to the book authors and the book title must remain within the slides.  It is not permitted to reproduce parts or all of the slides in printed form whatsoever without written consent by the authors.  Some legal stuff (sorry): Terms of Use 2/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Diffie–Hellman Key Exchange  The Discrete Logarithm Problem  Security of the Diffie–Hellman Key Exchange  The Elgamal Encryption Scheme  Content of this Chapter 3/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Proposed in 1976 by Whitfield Diffie and Martin Hellman  Widely used, e.g. in Secure Shell (SSH), Transport Layer Security (TLS), and Internet Protocol Security (IPSec)  The Diffie–Hellman Key Exchange (DHKE) is a key exchange protocol and not used for encryption (For the purpose of encryption based on the DHKE, ElGamal can be used.)  Diffie–Hellman Key Exchange: Overview 4/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Diffie–Hellman Key Exchange: Set-up 1. Choose a large prime p. 2. Choose an integer α ∈ {2,3,..., p−2}. 3. Publish p and α. 5/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

Alice  Diffie–Hellman Key Exchange Bob Choose random private key k prA =a ∈ {1,2,…,p-1} Choose random private key k prB =b ∈ {1,2,…,p-1} Compute corresponding public key k pubA = A = α a mod p Compute correspondig public key k pubB = B = α b mod p Compute common secret k AB = B a = (α a ) b mod p Compute common secret k AB = A b = (α b ) a mod p A B y y = AES kAB (x)x = AES -1 kAB (y) 6/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl We can now use the joint key k AB for encryption, e.g., with AES

Alice  Diffie–Hellman Key Exchange: Example Bob Choose random private key k prA = a = 5 Choose random private key k prB =b = 12 Compute corresponding public key k pubA = A = 2 5 = 3 mod 29 Compute correspondig public key k pubB = B = 2 12 = 7 mod 29 Compute common secret k AB = B a = 7 5 = 16 mod 29 Compute common secret k AB = A b = 3 12 = 16 mod 29 A B Domain parameters p=29, α=2 7/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl Proof of correctness: Alice computes: B a = (α b ) a mod p Bob computes: A b = (α a ) b mod p i.e., Alice and Bob compute the same key k AB !

Discrete Logarithm Problem (DLP) in Z p *  Given is the finite cyclic group Z p * of order p−1 and a primitive element α ∈ Z p * and another element β ∈ Z p *.  The DLP is the problem of determining the integer 1 ≤ x ≤ p−1 such that α x ≡ β mod p  This computation is called the discrete logarithm problem (DLP) x = log α β mod p  Example: Compute x for 5 x ≡ 41 mod 47 Remark: For the coverage of groups and cylcic groups, we refer to Chapter 8 of Understanding Cryptography  The Discrete Logarithm Problem 8/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Given is a finite cyclic group G with the group operation ◦ and cardinality n.  We consider a primitive element α ∈ G and another element β ∈ G.  The discrete logarithm problem is finding the integer x, where 1 ≤ x ≤ n, such that: β = α ◦ α ◦ α ◦...◦ α = α x  The Generalized Discrete Logarithm Problem x times 9/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

The following discrete logarithm problems have been proposed for use in cryptography 1. The multiplicative group of the prime field Z p or a subgroup of it. For instance, the classical DHKE uses this group (cf. previous slides), but also Elgamal encryption or the Digital Signature Algorithm (DSA). 2. The cyclic group formed by an elliptic curve (see Chapter 9) 3. The multiplicative group of a Galois field GF(2 m ) or a subgroup of it. Schemes such as the DHKE can be realized with them. 4. Hyperelliptic curves or algebraic varieties, which can be viewed as generalization of elliptic curves. Remark: The groups 1. and 2. are most often used in practice.  The Generalized Discrete Logarithm Problem 10/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Security of many asymmetric primitives is based on the difficulty of computing the DLP in cyclic groups, i.e., Compute x for a given α and β such that β = α ◦ α ◦ α ◦...◦ α = α x  The following algorithms for computing discrete logarithms exist Generic algorithms: Work in any cyclic group  Brute-Force Search  Shanks‘ Baby-Step-Giant-Step Method  Pollard‘s Rho Method  Pohlig-Hellman Method Non-generic Algorithms: Work only in specific groups, in particular in Z p  The Index Calculus Method  Remark: Elliptic curves can only be attacked with generic algorithms which are weaker than non-generic algorithms. Hence, elliptic curves are secure with shorter key lengths than the DLP in prime fields Z p  Attacks against the Discrete Logarithm Problem 11/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

Summary of records for computing discrete logarithms in Z p *  Attacks against the Discrete Logarithm Problem Decimal digitsBit lengthDate /19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl In order to prevent attacks that compute the DLP, it is recommended to use primes with a length of at least 1024 bits for schemes such as Diffie-Hellman in Z p *

 Which information does Oscar have? α, p k pubA = A = α a mod p k pubB = B = α b mod p  Which information does Oscar want to have? k AB = α ba = α ab = mod p This is kown as Diffie-Hellman Problem (DHP)  The only known way to solve the DHP is to solve the DLP, i.e. 1. Compute a = log α A mod p 2. Compute k AB = B a = α ba = mod p It is conjectured that the DHP and the DLP are equivalent, i.e., solving the DHP implies solving the DLP.  To prevent attacks, i.e., to prevent that the DLP can be solved, choose p >  Security of the classical Diffie–Hellman Key Exchange 13/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Proposed by Taher Elgamal in 1985  Can be viewed as an extension of the DHKE protocol  Based on the intractability of the discrete logarithm problem and the Diffie– Hellman problem  The Elgamal Encryption Scheme: Overview 14/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 The Elgamal Encryption Scheme: Principle Alice Bob choose d = k prB ∈ {2,…,p-2} compute β = k pubB = α d mod p choose i = k prA ∈ {2,…,p-2} compute ephemeral key k E = k pubA = α i mod p compute k M = k E d mod p compute k M = β i mod p encrypt message x ∈ Z p *: y = x·k M mod p kEkE y β decrypt x = y·k M -1 mod p 15/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl This looks very similar to the DHKE! The actual Elgamal protocol re-orders the computations which helps to save one communication (cf. next slide)

 The Elgamal Encryption Protocol Alice Bob choose large prime p choose primitive element α ∈ Z p * or in a subgroup of Z p * choose d = k prB ∈ {2,…,p-2} compute β = k pubB = α d mod p choose i = k prA ∈ {2,…,p-2} compute k E = k pubA = α i mod p compute masking key k M = β i mod p compute masking key k M = k E d mod p encrypt message x ∈ Z p *: y = x·k M mod p (k E, y) k pubB = (p, α, β) decrypt x = y·k M -1 mod p 16/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Generation Generation of prime p p has to of size of at least 1024 bits cf. Section 7.6 in Understanding Cryptography for prime-finding algorithms  Encryption Requires two modular exponentiations and a modular multiplictation All operands have a bitlength of log 2 p Efficient execution requires methods such as the square-and-multiply algorithm (cf. Chapter 7)  Decryption Requires one modular exponentiation and one modulare inversion As shown in Understanding Cryptography, the inversion can be computed from the ephemeral key  Computational Aspects 17/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Passive attacks Attacker eavesdrops p, α, β = α d, k E = α i, y = x· β i and wants to recover x Problem relies on the DLP  Active attacks If the public keys are not authentic, an attacker could send an incorrect public key (cf. Chapter 13) An Attack is also possible if the secret exponent i is being used more than once (cf. Understanding Cryptography for more details on the attack)  Security 18/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl

 The Diffie–Hellman protocol is a widely used method for key exchange. It is based on cyclic groups.  The discrete logarithm problem is one of the most important one-way functions in modern asymmetric cryptography. Many public-key algorithms are based on it.  For the Diffie–Hellman protocol in Z p *, the prime p should be at least 1024 bits long. This provides a security roughly equivalent to an 80-bit symmetric cipher.  For a better long-term security, a prime of length 2048 bits should be chosen.  The Elgamal scheme is an extension of the DHKE where the derived session key is used as a multiplicative masked to encrypt a message.  Elgamal is a probabilistic encryption scheme, i.e., encrypting two identical messages does not yield two identical ciphertexts.  Lessons Learned 19/19 Chapter 8 of Understanding Cryptography by Christof Paar and Jan Pelzl