Public Key Cryptography

Slides:



Advertisements
Similar presentations
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
Advertisements

CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Public Key Encryption Algorithm
Session 4 Asymmetric ciphers.
Dr. Lo’ai Tawalbeh Summer 2007 Chapter 9 – Public Key Cryptography and RSA Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
Public Key Cryptography
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Public Key Cryptography and the RSA Algorithm
Cryptography & Number Theory
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 School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Public Key Algorithms 4/17/2017 M. Chatterjee.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
RSA Ramki Thurimella.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Improving Encryption Algorithms Betty Huang Computer Systems Lab
Darci Miyashiro Math 480 April 29, 2013
Public-Key Encryption
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
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 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
RSA The algorithm was publicly described in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT Partly used for PGP (Pretty Good Privacy) to encrypt.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
POON TENG HIN.  RSA  Shamir’s Three-Pass Protocol  Other issues.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Revision. Cryptography depends on some properties of prime numbers. One of these is that it is rather easy to generate large prime numbers, but much harder.
Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption.
Public Key Encryption Major topics The RSA scheme was devised in 1978
Public Key Encryption.
Attacks on Public Key Encryption Algorithms
Visit for more Learning Resources
Asymmetric-Key Cryptography
Lecture 5 RSA DR. Nermin Hamza.
Public-key Cryptography
The RSA Algorithm JooSeok Song Tue.
Chap 6: Security and Protection
Private-Key Cryptography
Rivest, Shamir and Adleman
The RSA Algorithm JooSeok Song Tue.
Analysis of the RSA Encryption Algorithm
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Introduction to Elliptic Curve Cryptography
Essential Public Key Crypto Methods Credit: Prof. Dr. Peng Ning
CSCI284 Spring 2009 GWU Sections 5.1, 5.2.2, 5.3
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9
Introduction to Cryptography
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
The RSA Public-Key Encryption Algorithm
Presentation transcript:

Public Key Cryptography Dr. X Slides adopted by Prof. William Enck, NCSU

Private-key crypto is like a door lock

Encryption and Message Authenticity

Public Key Crypto (10,000 ft view) Separate keys for encryption and decryption Public key: anyone can know this Private key: kept confidential Anyone can encrypt a message to you using your public key The private key (kept confidential) is required to decrypt the communication Alice and Bob no longer have to have a priori shared a secret key

Public Key Cryptography Each key pair consists of a public and private component: k+ (public key), k- (private key) Dk- (Ek+ (m)) = m Public keys are distributed (typically) through public key certificates Anyone can communicate secretly with you if they have your certificate

Modular Arithmetic Integers Zn = {0, 1, 2, ..., n-1} x mod n = remainder of x divided by n 5 mod 13 = 5 13 mod 5 = 3 y is modular inverse of x iff xy mod n = 1 4 is inverse of 3 in Z11 If n is prime, then Zn has modular inverses for all integers except 0

RSA (Rivest, Shamir, Adelman) The dominant public key algorithm The algorithm itself is conceptually simple Why it is secure is very deep (number theory) Uses properties of exponentiation modulo a product of large primes

Euler’s Totient Function coprime: having no common positive factors other than 1 (also called relatively prime) 16 and 25 are coprime 6 and 27 are not coprime Euler’s Totient Function: Φ(n) = number of integers less than or equal to n that are coprime with n where product ranges over distinct primes dividing n If m and n are coprime, then Φ(mn) = Φ(m)Φ(n) If m is prime, then Φ(m) = m - 1 Euler’s Totient Function

Euler’s Totient Function

RSA Key Generation Choose distinct primes p and q Compute n = pq Compute Φ(n) = Φ(pq) = (p-1)(q-1) WHY? Randomly choose 1<e< Φ(pq) such that e and Φ(pq) are coprime. e is the public key exponent Compute de=1 mod(Φ(pq)). d is the private key exponent Example: let p=3, q=11, n=33 … find e, d

Public Key Encryption & Decryption Public key k+ is {e,n} and private key k- is {d,n} Encryption and Decryption Ek+(M) : ciphertext = plaintexte mod n Dk-(ciphertext) : plaintext = ciphertextd mod n Example Public key (7,33), Private Key (3,33) M = 4 …

Why does it work? Difficult to find Φ(n) or d using only e and n. Finding d is equivalent in difficulty to factoring n as p*q No efficient integer factorization algorithm is known Example: Took 18 months to factor a 200 digit number into its 2 prime factors It is feasible to encrypt and decrypt because: It is possible to find large primes. It is possible to find co-primes and their inverses. Modular exponentiation is feasible.

Is RSA secure? {e,n} is public information If you could factor n into p*q, then could compute φ(n) =(p-1)(q-1) could compute d = e-1 mod φ(n) would know the private key <d,n>! But: factoring large integers is hard! classical problem worked on for centuries; no known reliable, fast method

RSA Security At present, key sizes of 1024 bits are considered to be secure, but 2048 bits is better Tips for making n difficult to factor 1. p and q lengths should be similar (ex.: ~500 bits each if key is 1024 bits) 2. both (p-1) and (q-1) should contain a “large” prime factor 3. gcd(p-1, q-1) should be “small” 4. d should be larger than n1/4

Attacks Against RSA Brute force: try all possible private keys can be defeated by using a large enough key space (e.g., 1024 bit keys or larger) Mathematical attacks 1. factor n (possible for special cases of n) 2. determine d directly from e, without computing φ(n) – at least as difficult as factoring n http://crypto.stackexchange.com/questions/3043/how-much- computing-resource-is-required-to-brute-force-rsa

Attacks Probable-message attack (using {e,n}) encrypt all possible plaintext messages with {e, n} Intercept a message (ciphertext) try to find a match between the ciphertext and one of the encrypted messages (i.e., collision!) only works for small plaintext message sizes This can intercept a secret key that was sent with public key crypto Solution: pad plaintext message with random text before encryption

Timing Attacks Against RSA Recovers the private key from the running time of the decryption algorithm Computing m = cd mod n using repeated squaring algorithm:

Timing Attacks The attack proceeds bit by bit Attacker assumed to know c,m • Attacker is able to determine bit i of d because for some c and m, the highlighted step is extremely slow if di =1 http://www.cs.sjsu.edu/faculty/stamp/students/article.html

Countermeasures to Timing Attacks 1. Delay the result if the computation is too fast disadvantage: ? 2. Add a random delay disadvantage? 3. Blinding: multiply the ciphertext by a random number before performing decryption