1 CIS 5371 Cryptography 8. Asymmetric encryption-.

Slides:



Advertisements
Similar presentations
Data Security 1 El_Gamal Cryptography. Data Security2 Introduction El_Gamal is a public-key cryptosystem technique El_Gamal is a public-key cryptosystem.
Advertisements

Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Asymmetric-Key Cryptography
7. Asymmetric encryption-
Great Theoretical Ideas in Computer Science.
Session 4 Asymmetric ciphers.
CNS2010handout 8 :: introduction to number theory1 computer and network security matt barrie.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the orderQuestions? Review.
Pass in HW6 now Can use up to 2 late days Can use up to 2 late days But one incentive not to burn them all: teams will get to pick their presentation day.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
Electronic Payment Systems Lecture 5: ePayment Security II
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
1 CIS 5371 Cryptography 9. Data Integrity Techniques.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
ASYMMETRIC CIPHERS.
Lecture 6: Public Key Cryptography
0x1A Great Papers in Computer Security
Asymmetric encryption. Asymmetric encryption, often called "public key" encryption, allows Alice to send Bob an encrypted message without a shared secret.
Public Key Model 8. Cryptography part 2.
The RSA Algorithm Based on the idea that factorization of integers into their prime factors is hard. ★ n=p . q, where p and q are distinct primes Proposed.
8. Data Integrity Techniques
Rachana Y. Patil 1 1.
ElGamal Public Key Cryptography CS 303 Alg. Number Theory & Cryptography Jeremy Johnson Taher ElGamal, "A Public-Key Cryptosystem and a Signature Scheme.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
The RSA Algorithm Rocky K. C. Chang, March
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2014 Nitesh Saxena.
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
Cryptography Lecture 8 Stefan Dziembowski
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Great Theoretical Ideas in Computer Science.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the order Teams mostly.
RSA Ramki Thurimella.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
By Yernar.  Background  Key generation  Encryption  Decryption  Preset Bits  Example.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
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 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.
1 Number Theory and Advanced Cryptography 5. Cryptanalysis of RSA Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
PUBLIC KEY CRYPTOGRAPHY ALGORITHM Concept and Example 1IT352 | Network Security |Najwa AlGhamdi.
Scott CH Huang COM 5336 Lecture 7 Other Public-Key Cryptosystems Scott CH Huang COM 5336 Cryptography Lecture 7.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
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.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Ryan Henry I 538 /B 609 : Introduction to Cryptography.
11 RSA Variants.  Scheme ◦ Select s.t. p and q = 3 mod 4 ◦ n=pq, public key =n, private key =p,q ◦ y= e k (x)=x (x+b) mod n ◦ x=d k (y)=  y mod n.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Great Theoretical Ideas in Computer Science.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
Topic 26: Discrete LOG Applications
B504/I538: Introduction to Cryptography
RSA and El Gamal Cryptosystems
Topic 24: Finding Prime Numbers, RSA
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Cryptography Lecture 21.
Presentation transcript:

1 CIS 5371 Cryptography 8. Asymmetric encryption-

Public Key Cryptography Alice Bob Alice and Bob want to exchange a private key in public.

Public Key Cryptography The Diffie-Hellman protocol

Alice g a mod p Bob g b mod p The private key is: g ab mod p where p is a prime and g is a generator of Z p *

Example  p = 43, g = 3,  Alice and Bob share (p,g) = (43,3).  Alice picks her (secret) exponent: a random a = 8  U [0:42].  Alice sends Bob: 3 8  25 (mod 43).  Bob picks his (secret) exponent: a random b = 37  U [0:42].  Bob sends Alice: 3 37  20 (mod 43).  The secret key agreed between the two is: 9  20 8  (mod 43).

Man-in-the-middle attack Alice picks a  U Z p * and sends Malice (“Bob”): g a (mod p) Malice (“Alice”) picks m  Z p * and sends Bob: g m (mod p) Bob picks b  U Z p * and sends Malice (“Bob) Bob: g b (mod p) Malice (“Bob”) sends Alice: g m (mod p) Alice computes: k 1  (g m ) a (mod p) Bob computes: k 2  (g m ) b (mod p)

The Computational Diffie-Hellman Problem, CDH

The Computational Diffie-Hellman Assumption A CDH solver is a PPT algorithm that solves the CDH problem. The CDH Assumption is that, for any CDH solver there exists a negligible function negl such that: ―for an arbitrary instance of the CDH problem, the CDH solver will succeed with probability  negl for all sufficiently large inputs.

The Decisional Diffie-Hellman Problem, DDH INPUT –The description of a finite cyclic group G of prime order q –A generator element g of G – g a, g b, g c  G, for some integers 0 < a,b,c< q. OUTPUT –1 ---Decision that g c = g ab or –0 ---Decision that g c  g ab

The Decisional Diffie-Hellman Assumption A DDH solver is a PPT algorithm that solves the DDH problem. The DDH Assumption is that, for any DDH solver, there exists a negligible function negl such that: ―for an arbitrary instance of the DDH problem, the DDH solver will succeed with probability  negl for all sufficiently large inputs.

The Discrete Logarithm Problem The Discrete Logarithm Problem -- DL INPUT –The description of a finite cyclic group G of order q (say Z p * ) –A generator element g of G – h  G. OUTPUT –The unique integer a < p such that h = g a mod p. We call the integer a the discrete logarithm of h in base g and write: a = log g h mod p.

The Discrete Logarithm Assumption A DL solver is a PPT algorithm that solves the DL problem. The DL Assumption is that, for any DL solver, there exists a negligible function negl such that: ―for an arbitrary instance of the DL problem, the DDH solver will succeed with probability  negl for all sufficiently large inputs.

The RSA cryptosystem Alice performs the following steps  Choose p, q large primes with |p|  |q|.  Compute N = pq.  Compute  (N) = (p-1)(q-1).  Choose a random integer e <  (N) such that gcd(e,  (N)) = 1 and compute the integer d such that ed = 1 (mod  (N)).  Make (N,e) the public key, keep (N,d) as private key, and discard p,q and  (N).

The RSA cryptosystem

Check We have: ed = 1 (mod  (N)), so ed = 1 + t  (N). Therefore, D d (E e (m)) = (m e ) d = m ed = m t  (N)+1 = (m  (n) ) t  m = 1  m = m mod n

Example Let p = 101, q = 113. Then N =  (N) = 100 x 112 = = For encryption use e = Alice computes: d = 6531 such that ed =1 mod (using the Extended Euclidean Algorithm). Alice publishes: N = 11413, e = Suppose Bob wants to encrypt: Bob computes mod = 5761 Bob sends Alice the ciphertext To decrypt it Alice computes the plaintext: (mod 11413) = 9726

Implementation 1. Generate two large primes: p,q 2. N  pq and  (N)= (p-1)(q-1) 3. Choose random e: with 1 < e <  (N) & gcd(e,  (N))=1 4. d  e -1 mod f (n) 5. The public key is (N,e) and the private key is (N,d )

Cost In Z n : Cost of a modular multiplication (x  y) mod n is O (k 2 ), where k = |log 2 n| Cost of a modular exponentiation x z (mod n) is O (k 2 log 2 z) = O (k 2 log 2 n)

Cryptanalysis of Public-key cryptosystems Active attacks on cryptosystems Chosen-Plaintext Attack (CPA): –The attacker chooses plaintexts and obtains the corresponding ciphertexts: the task of the attacker is successful if he can decrypt a (new) target ciphertext. Chosen-Ciphertext Attack (CCA1): –The attacker chooses a number of ciphertexts and obtains the corresponding plaintexts: the task of the attacker is successful if he can decrypt a (new) target ciphertext. Adaptive Chosen-Ciphertext Attack (CCA2): –This is a CCS1 attack in which the attacker can adaptively choose ciphertexts: the task of the attacker is successful if he can decrypt a (new) target ciphertext.

The RSA Problem INPUT –N = pq with p,q prime nmbers. –e an integer such that gcd(e,(p-1)(q-1)) =1 –c  Z N. OUTPUT –The unique integer m  Z N such that m e  c (mod N )

The RSA Assumption An RSA solver is a PPT algorithm that solves the RSA problem. The RSA Assumption is that, for any RSA solver, there exists a negligible function negl such that: ―for an arbitrary instance of the RSA problem, the RSA solver will succeed with probability  negl for all sufficiently large inputs.

The Integer Factorization Problem The IF Problem (IF) INPUT –N an odd composite integer with at least two distinct prime factors. OUTPUT –A prime p such that p | N.

The IF Assumption An integer factorizer is a PPT algorithm that solves the IF problem. The IF Assumption is that, for any IF solver, there exists a negligible function negl such that: ―for an arbitrary instance of the IF problem, the IF solver will succeed with probability  negl for all sufficiently large inputs.

Security of RSA 1. Relation to IF problem Recovering the plaintext m from an RSA ciphertext c is easy if factoring is possible. 2. Relation to RSA problem Recovering the plaintext m from an RSA ciphertext c is easy if the RSA problem is easy. 3. Relation between IF and RSA problems If the IF problem is easy then the RSA problem is easy. The converse is likely not to be true.

The Rabin cryptosystem Alice performs the following steps  Choose p, q large primes with |p| = |q|.  Compute N = pq.  Pick a random integer b  U Z n *  Make (N,b) public key, keep (p,q) as private key.

The Rabin cryptosystem Encryption Let m  Z n * be the confidential message that Bob wants to send to Alice. Bob computes the ciphertext: c  m(m+b) mod N. Bob sends Alice: c Decryption To decrypt the ciphertext c Alice solves the quadratic equation: m 2 + bm –c  0 (mod N), for m < N.

The Rabin cryptosystem

Remarks Suppose p  q  3 (mod 4), n = pq. Let y  x 2 (mod n). Then: Because.

Remarks (continued) It follows that: is a square root of y modulo p. A similar argument applies for the other prime q. So we get the quadratic residues modulo p and modulo q. We then get the quadratic residue modulo n by using the Chinese Remainder Theorem.

Example Suppose n = 77. Then e (x) = x 2 mod 77 d (y) = mod 77 Suppose Bob wants to decrypt y = 23

Example, continued Using the Chinese Remainder Theorem we compute the 4 square roots of 23 modulo 77 to be:

The Rabin Problem

Security of Rabin 1. Relation to factoring. Recovering the plaintext m from a Rabin ciphertext c is easy if the IF problem is easy. 3. Relation between factoring and the Rabin problem Under CPA attacks the Rabin system is secure iff the IF problem is hard. Under CCA attacks the Rabin problem is completely insecure.

Security of Rabin

The ELGamal cryptosystem

The ElGamal cryptosystem

Example

Security of ElGamal 1. Relation to the DL Recovering the plaintext m from an ElGamal ciphertext c is easy if the DL problem is easy. 2. ELGamal and the CDH problem For messages that are uniformly distributed, the ElGamal encryption system is secure against CPAs iff the CDA problem is hard.

Security of ElGamal For messages that are uniformly distributed, the ElGamal encryption system is secure against CPAs iff the CDH problem is hard.

Security of ElGamal