ECE 646 Lecture 9. RSA: Genesis, operation & security

Similar documents
ECE 646 Lecture 8. RSA: Genesis, Security, Implementation & Key Generation

RSA: Genesis, Security, Implementation & Key Generation

ECE297:11 Lecture 12

RSA: Genesis, operation & security. Factoring in Software & Hardware.

ECE 646 Lecture 8. RSA: Genesis, operation & security. Factorization in Software & Hardware. Trap-door one-way function

Definition: For a positive integer n, if 0<a<n and gcd(a,n)=1, a is relatively prime to n. Ahmet Burak Can Hacettepe University

THE RSA CRYPTOSYSTEM

Security Issues in Cloud Computing Modern Cryptography II Asymmetric Cryptography

Public Key Cryptography

Cryptography and RSA. Group (1854, Cayley) Upcoming Interview? Outline. Commutative or Abelian Groups

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013

Attacks on RSA & Using Asymmetric Crypto

RSA. Ramki Thurimella

RSA RSA public key cryptosystem

Number Theory & Modern Cryptography

Public Key 9/17/2018. Symmetric Cryptography Review. Symmetric Cryptography: Shortcomings (1) Symmetric Cryptography: Analogy

RSA Key Generation. Required Reading. W. Stallings, "Cryptography and Network-Security, Chapter 8.3 Testing for Primality

CIS 551 / TCOM 401 Computer and Network Security

Cryptography. pieces from work by Gordon Royle

10 Public Key Cryptography : RSA

Public-Key Cryptosystems CHAPTER 4

Chapter 8 Public-key Cryptography and Digital Signatures

Lecture 1: Introduction to Public key cryptography

Cryptography. Course 1: Remainder: RSA. Jean-Sébastien Coron. September 21, Université du Luxembourg

Ma/CS 6a Class 3: The RSA Algorithm

CRYPTOGRAPHY AND NUMBER THEORY

8.1 Principles of Public-Key Cryptosystems

My brief introduction to cryptography

Cryptography IV: Asymmetric Ciphers

Solution to Midterm Examination

Topics in Cryptography. Lecture 5: Basic Number Theory

Lecture V : Public Key Cryptography

Introduction to Cryptography. Lecture 6

Theme : Cryptography. Instructor : Prof. C Pandu Rangan. Speaker : Arun Moorthy CS

Analysis of the RSA Encryption Algorithm

Mathematics of Cryptography

ECE646 Lecture 11 Required Reading Chapter 8.3 Testing for Primality RSA Key Generation

ECE596C: Handout #11

Final Exam Math 105: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 30 April :30 11:00 a.m.

Hans Delfs & Helmut Knebl: Kryptographie und Informationssicherheit WS 2008/2009. References. References

and Other Fun Stuff James L. Massey

Lemma 1.2. (1) If p is prime, then ϕ(p) = p 1. (2) If p q are two primes, then ϕ(pq) = (p 1)(q 1).

RSA Cryptosystem and Factorization

Chapter 4 Asymmetric Cryptography

Asymmetric Cryptography

Asymmetric Encryption

Powers in Modular Arithmetic, and RSA Public Key Cryptography

Algorithmic Number Theory and Public-key Cryptography

Discrete mathematics I - Number theory

CPSC 467b: Cryptography and Computer Security

Foundations of Network and Computer Security

during transmission safeguard information Cryptography: used to CRYPTOGRAPHY BACKGROUND OF THE MATHEMATICAL

An Introduction to Probabilistic Encryption

RSA Algorithm. Factoring, EulerPhi, Breaking RSA. Çetin Kaya Koç Spring / 14

Logic gates. Quantum logic gates. α β 0 1 X = 1 0. Quantum NOT gate (X gate) Classical NOT gate NOT A. Matrix form representation

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Introduction to Cryptography. Lecture 8

University of Tokyo: Advanced Algorithms Summer Lecture 6 27 May. Let s keep in mind definitions from the previous lecture:

dit-upm RSA Cybersecurity Cryptography

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems

Cryptosystem. Traditional Cryptosystems: The two parties agree on a secret (one to one) function f. To send a message M, thesendersendsthemessage

Ti Secured communications

Aspect of Prime Numbers in Public Key Cryptosystem

Outline. Available public-key technologies. Diffie-Hellman protocol Digital Signature. Elliptic curves and the discrete logarithm problem

Number Theory for Asymmetric Crypto

1 What are Physical Attacks. 2 Physical Attacks on RSA. Today:

Math.3336: Discrete Mathematics. Mathematical Induction

The RSA Cipher and its Algorithmic Foundations

Public-key Cryptography and elliptic curves

1 Number Theory Basics

Introduction to Public-Key Cryptosystems:

Public Key Cryptography

Number Theory. Modular Arithmetic

Overview. Background / Context. CSC 580 Cryptography and Computer Security. March 21, 2017

Mathematical Foundations of Public-Key Cryptography

Lecture 19: Public-key Cryptography (Diffie-Hellman Key Exchange & ElGamal Encryption) Public-key Cryptography

Public Key Cryptography

Question: Total Points: Score:

NUMBER THEORY FOR CRYPTOGRAPHY

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

10 Modular Arithmetic and Cryptography

Public Key Cryptography

Biomedical Security. Overview 9/15/2017. Erwin M. Bakker

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

An Introduction to Cryptography

The RSA cryptosystem and primality tests

RSA Key Extraction via Low- Bandwidth Acoustic Cryptanalysis. Daniel Genkin, Adi Shamir, Eran Tromer

Great Theoretical Ideas in Computer Science

Cryptanalysis on An ElGamal-Like Cryptosystem for Encrypting Large Messages

Implementation Tutorial on RSA

Encryption: The RSA Public Key Cipher

Public Key Algorithms

Factoring integers, Producing primes and the RSA cryptosystem. December 14, 2005

Circuit Complexity. Circuit complexity is based on boolean circuits instead of Turing machines.

Introduction to Modern Cryptography. Lecture RSA Public Key CryptoSystem 2. One way Trapdoor Functions

Introduction. What is RSA. A Guide To RSA by Robert Yates. Topics

2. Cryptography 2.5. ElGamal cryptosystems and Discrete logarithms

Introduction to Cryptography. Susan Hohenberger

University of Regina Department of Mathematics & Statistics Final Examination (April 21, 2009)

Cryptanalysis of a Public Key Cryptosystem Proposed at ACISP 2000

Transcription:

ECE 646 Lecture 9 RSA: Genesis, operation & security

Required Reading (1) W. Stallings, "Cryptography and Network-Security," Chapter 8.1 Prime Numbers Chapter 8.2 Fermat's and Euler's Theorems Chapter 9.2 The RSA Algorithm Description of the Algorithm The Security of RSA The Factoring Problem Appendix 9A Proof of the RSA Algorithm Appendix 9B The Complexity of Algorithms

Required Reading (2) A. Menezes, P. van Oorschot, and S. Vanstone, Handbook of Applied Cryptography Chapter 2.4 Number Theory 2.4.1 The integers Chapter 8.2 RSA public-key encryption 8.2.1 Description 8.2.2 Security of RSA Chapter 2.3 Complexity theory 2.3.1 Basic definitions 2.3.2 Asymptotic notation 2.3.3 Complexity classes (until 2.61 Example)

Recommended Reading Adi Shamir and Eran Tromer, "On the Cost of Factoring RSA-1024," CryptoBytes, Summer 2003 http://www.cs.tau.ac.il/~tromer/papers/cbtwirl.pdf Factorization Announcements http://www.crypto-world.com/factorannouncements.html Steven Levy, "Crypto: How the Code Rebels Beat the Government - Saving Privacy in the Digital Age," Viking 2001, Chapter: "Prime Time".

Public Key (Asymmetric) Cryptosystems Public key of Bob - K B Private key of Bob - k B Network Alice Encryption Decryption Bob

Trap-door one-way function Whitfield Diffie and Martin Hellman New directions in cryptography, 1976 PUBLIC KEY X f(x) Y f -1 (Y) PRIVATE KEY

Professional (NSA) vs. amateur (academic) approach to designing ciphers 1. Know how to break Russian ciphers 2. Use only well-established proven methods 3. Hire 50,000 mathematicians 4. Cooperate with an industry giant 5. Keep as much as possible secret 1. Know nothing about cryptology 2. Think of revolutionary ideas 3. Go for skiing 4. Publish in Scientific American 5. Offer a $100 award for breaking the cipher

Challenge published in Scientific American Ciphertext: 9686 9613 7546 2206 1477 1409 2225 4355 8829 0575 9991 1245 7431 9874 6951 2093 0816 2982 2514 5708 3569 3147 6622 8839 8962 8013 3919 9055 1829 9451 5781 5145 Public key: N = 114381625757 88886766923577997614 661201021829672124236256256184293 570693524573389783059712356395870 5058989075147599290026879543541 e = 9007 Award $100 (129 decimal digits) 1977

Rivest estimation - 1977 The best known algorithm for factoring a 129-digit number requires: 40 000 trilion years = 40 10 15 years assuming the use of a supercomputer being able to perform 1 multiplication of 129 decimal digit numbers in 1 ns Rivest s assumption translates to the delay of a single logic gate 10 ps Estimated age of the universe: 100 bln years = 10 11 years

Lehmer Sieve Bicycle chain sieve [D. H. Lehmer, 1928] Computer Museum, Mountain View, CA

Machine à Congruences [E. O. Carissan, 1919]

Supercomputer Cray Computer Museum, Mountain View, CA

Early records in factoring large numbers Years 1974 Number of decimal digits 45 Number of bits 149 Required computational power (in MIPS-years) 0.001 1984 71 235 0.1 1991 100 332 7 1992 110 365 75 1993 120 398 830

Number of bits vs. number of decimal digits 10 #digits = 2 #bits #digits = (log 10 2) #bits 0.30 #bits 256 bits = 77 D 384 bits = 116 D 512 bits = 154 D 768 bits = 231 D 1024 bits = 308 D 2048 bits = 616 D

How to factor for free? A. Lenstra & M. Manasse, 1989 Using the spare time of computers, (otherwise unused) Program and results sent by e-mail (later using WWW)

Practical implementations of attacks Factorization, RSA Year Number of bits of N Number of decimal digits of N Method Estimated amount of computations 1994 430 129 QS 5000 MIPS-years 1996 433 130 GNFS 750 MIPS-years 1998 467 140 GNFS 2000 MIPS-years 1999 467 140 GNFS 8000 MIPS-years

Breaking RSA-129 When: Who: How: August 1993 - April 1, 1994, 8 months D. Atkins, M. Graff, A. K. Lenstra, P. Leyland + 600 volunteers from the entire world 1600 computers from Cray C90, through 16 MHz PC, to fax machines Only 0.03% computational power of the Internet Results of cryptanalysis: The magic words are squeamish ossifrage An award of $100 donated to Free Software Foundation

Elements affecting the progress in factoring large numbers computational power 1977-1993 increase of about 1500 times computer networks Internet better algorithms

RSA as a trap-door one-way function PUBLIC KEY M C = f(m) = M e mod N C M = f -1 (C) = C d mod N PRIVATE KEY N = P Q P, Q - large prime numbers e d 1 mod ((P-1)(Q-1))

RSA keys PUBLIC KEY PRIVATE KEY { e, N } { d, P, Q } N = P Q P, Q - large prime numbers e d 1 mod ((P-1)(Q-1))

Why does RSA work? (1)? M = C d mod N = (M e mod N) d mod N = M decrypted message original message e d 1 mod ((P-1)(Q-1)) e d 1 mod ϕ(n) Euler s totient function

Euler s totient (phi) function (1) ϕ(n) - number of integers in the range from 1 to N-1 that are relatively prime with N Special cases: 1. P is prime ϕ(p) = P-1 Relatively prime with P: 1, 2, 3,, P-1 2. N = P Q P, Q are prime ϕ(n) = (P-1) (Q-1) Relatively prime with N: {1, 2, 3,, P Q-1} {P, 2P, 3P,, (Q-1)P} {Q, 2Q, 3Q,, (P-1)Q}

Euler s totient (phi) function (2) Special cases: 3. N = P 2 P is prime ϕ(n) = P (P-1) Relatively prime with N: {1, 2, 3,, P 2-1} {P, 2P, 3P,, (P-1)P} In general If N = P e1 1 P e2 2 P e3 3 P et t t ϕ(n) = P i ei-1 (P i -1) i=1

The first 1000 values of φ(n)

Euler s Theorem Leonard Euler, 1707-1783 a ϕ(n) 1 (mod N) a: gcd(a, N) = 1

Euler s Theorem - Justification (1) For N=10 For arbitrary N R = {1, 3, 7, 9} R = {x 1, x 2,, x ϕ(n) } Let a=3 S = { 3 1 mod 10, 3 3mod 10, 3 7 mod 10, 3 9 mod 10 } = {3, 9, 1, 7} Let us choose arbitrary a, such that gcd(a, N) = 1 S = {a x 1 mod N, a x 2 mod N,, a x ϕ(n) mod N} = rearranged set R

Euler s Theorem - Justification (2) For N=10 For arbitrary N R = S R = S x 1 x 2 x 3 x 4 (a x 1 ) (a x 2 ) (a x 3 ) (a x 4 ) mod N ϕ(n) i=1 ϕ(n) x i i=1 a x i (mod N) x 1 x 2 x 3 x 4 a 4 x 1 x 2 x 3 x 4 mod N ϕ(n) i=1 ϕ(n) x i a ϕ(n) i=1 x i (mod N) a 4 1 (mod N) a ϕ(n) 1 (mod N)

Why does RSA work? (2) M = C d mod N = (M e mod N) d mod N = = M e d mod N = e d 1 mod ϕ(n) e d = 1 + k ϕ(n) = = M 1+k ϕ(n) mod N = M (M ϕ(n) ) k mod N = = M (M ϕ(n) mod N) k mod N = = M 1 k mod N = M