Docsity

RSA Algorithm: Understanding the Security and Progress in Factoring Large Numbers, Study notes of Cryptography and System Security

Partial preview of the text

Download RSA Algorithm: Understanding the Security and Progress in Factoring Large Numbers and more Study notes Cryptography and System Security in PDF only on Docsity!

RSA – Genesis, operation &

security

ECE 646 - Lecture 10

Public Key (Asymmetric) Cryptosystems

Public key of Bob - KB Private key of Bob -^ kB

Alice Bob

Network

Encryption Decryption

Trap-door one-way function

X f(X) Y

f-1(Y)

Whitfield Diffie and Martin Hellman

“ New directions in cryptography ,” 1976

PUBLIC KEY

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:

Public key: N = 114381625757 88886766923577997614 661201021829672124236256256184293 570693524573389783059712356395870 5058989075147599290026879543541

e = 9007 ( 129 decimal digits )

Award 100 $

1977

RSA as a trap-door one-way function

M C = f(M) = Me^ mod N C

M = f-1(C) = Cd^ mod N

PUBLIC KEY

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

e ⋅ d ≡ 1 mod ((P-1)(Q-1))

P, Q - large prime numbers

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 1 e1⋅ P 2 e2^ ⋅ P 3 e3^ ⋅ … ⋅ Ptet

ϕ(N) = ∏ Piei-1^ ⋅ (Pi-1)

i=

t

Euler’s Theorem

Leonard Euler, 1707-

a: gcd(a, N) = 1

a ϕϕϕϕ (N)^ ≡≡≡≡ 1 (mod N)

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

S = { 3⋅1 mod 10, 3 ⋅3 mod 10, 3⋅7 mod 10, 3 ⋅9 mod 10 } = {3, 9, 1, 7} (^) = 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

x 1 ⋅x 2 ⋅x 3 ⋅x 4 ≡ a^4 ⋅ x 1 ⋅x 2 ⋅x 3 ⋅x 4 mod N

a^4 ≡ 1 (mod N)

∏ i=

ϕ(N) xi ≡^ ∏ i=

ϕ(N) a ⋅ xi (mod N)

∏ i=

ϕ(N) xi ≡^ aϕ(N)^ ⋅^ ∏ i=

ϕ(N) xi (mod N)

a ϕ(N)^ ≡ 1 (mod N)

Lehmer Sieve

Computer Museum, Mountain View, CA

Supercomputer Cray

Computer Museum, Mountain View, CA

Early records in factoring large numbers

Years

Number of decimal digits

Number of bits

Required computational power (in MIPS-years)

1974

1984

1991

1992

1993

45

71

100

110

120

149

235

332

365

398

7

75

830

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)

Elements affecting the progress

in factoring large numbers

  • computational power
  • computer networks
  • ••• better algorithms

1977-1993 increase of about 1500 times

Internet

Factoring methods

General purpose Special purpose

QS - Quadratic Sieve

GNFS - General Number Field Sieve

ECM - Elliptic Curve Method

Time of factoring depends only on the size of N

Time of factoring is much shorter if N or factors of N are of the special form

Pollard’s p-1 method

Cyclotomic polynomial method

SNFS - Special Number Field Sieve

Continued Fraction Method (historical)

Running time of factoring algorithms

Lq[α, c] = exp ((c+ o (1))·(ln q)α·(ln ln q)1-^ α)

For αααα = Lq[0, c] = (ln q)(c+o(1))

Algorithm polynomial as a function of the number of bits of q

For αααα = Lq[1, c] = exp((c+ o (1))·(ln q))

Algorithm exponential as a function of the number of bits of q

For 0 < αααα < 1 Algorithm^ subexponential as a function of the number of bits of q

f (n) = o (1) if for any positive constant c >0 there exist a constant n 0 >0, such that 0 ≤ f (n) < c, for all n ≥ n 0

General purpose factoring methods

size of the factored number N in decimal digits (D)

100D 130D

QS more efficient

NFS more efficient

Expected running time

QS NFS

L N [1/2, 1] = exp ((1 + o (1))·(ln N )1/2^ ))·(ln ln N )1/2)

L N [1/3, 1.92] = exp ((1.92 + o (1))·(ln N )1/3^ ))·(ln ln N )2/3)

110D 120D

Factoring RSA-

When?

Who?

Announced: December 3, 2003 roku

J. Franke and T. Kleinjung Bonn University Max Planck Institute for Mathematics in Bonn Experimental Mathematics Institute in Essen

P. Montgomery and H. te Riele - CWI F. Bahr, D. Leclair, Paul Leyland and R. Wackerbarth

German Federal Agency for Information Technology Security (BIS)

TWINKLE

“The Weizmann INstitute Key Locating Engine”

Adi Shamir , Eurocrypt, May 1999

CHES, August 1999

Electrooptical device capable to speed-up

the first phase of factorization from 100 to 1000 times

If ever built it would increase the size of the key

that can be broken from 100 to 200 bits

Cost of the device (assuming that the prototype was

earlier built) - $

Recommended key sizes for RSA

Old standard:

New standard:

Individual users

Individual users

Organizations (short term)

Organizations (long term)

512 bits (155 decimal digits)

768 bits (231 decimal digits)

1024 bits (308 decimal digits)

2048 bits (616 decimal digits)

Keylengths in public key cryptosystems that provide the same level of security as AES and other secret-key ciphers

Arjen K. Lenstra, Eric R. Verheul

„ Selecting Cryptographic Key Sizes ”

Journal of Cryptology

Arjen K. Lenstra „Unbelievable Security: Matching AES Security Using Public Key Systems ” ASIACRYPT’ 2001

DES

3 DES (2K)

3 DES (3K)

AES-

AES-

AES-

year

Keylengths in RSA providing the same level of security as selected secret-key cryptosystems

March 2002, Financial Cryptography Conference

Nicko van Someren, CTO nCipher Inc. announced that his company developed software capable of breaking 512-bit RSA key within 6 weeks using computers available in a single office

Practical progress in factorization

Bernstein’s Machine (1)

Fall 2001

Daniel Bernstein , professor of mathematics

at University of Illinois in Chicago

submits a grant application to NSF

and publishes fragments of this application

as an article on the web

D. Bernstein, Circuits for Integer Factorization: A Proposal

http://cr.yp.to/papers.html#nfscircuit

March 2002

  • Bernstein’s article “discovered” during

Financial Cryptography Conference

  • Informal panel devoted to analysis of consequences

of the Bernstein’s discovery

  • Nicko Van Someren (nCipher) estimates that machine

costing $ 1 bilion is able to break 1024-bit RSA within several minuts

Bernstein’s Machine (2)