Quantum algorithms for computing short discrete logarithms and - - PowerPoint PPT Presentation

quantum algorithms for computing short discrete
SMART_READER_LITE
LIVE PREVIEW

Quantum algorithms for computing short discrete logarithms and - - PowerPoint PPT Presentation

Quantum algorithms for computing short discrete logarithms and factoring RSA integers PQCrypto 2017, 8th International Workshop, Utrecht, June 26-28, 2017 Martin Eker 1 , 2 Johan Hstad 1 1 KTH Royal Institute of Technology, SE-100 44


slide-1
SLIDE 1

Quantum algorithms for computing short discrete logarithms and factoring RSA integers

Martin Ekerå 1,2 Johan Håstad 1

1 KTH Royal Institute of Technology, SE-100 44 Stockholm, Sweden 2 Swedish NCSA, Swedish Armed Forces, SE-107 85 Stockholm, Sweden

PQCrypto 2017, 8th International Workshop, Utrecht, June 26-28, 2017

slide-2
SLIDE 2

Introduction

Our contribution

▶ We modify Shor’s algorithms to more efficiently solve

▶ the short discrete logarithm problem ▶ the RSA integer factoring problem

▶ The main hurdle is to exponentiate group elements. We shorten the exponents.

slide-3
SLIDE 3

The integer factoring problem

The integer factoring problem (IFP)

▶ Given an integer N compute its prime factors.

slide-4
SLIDE 4

The integer factoring problem

The integer factoring problem (IFP)

▶ Given an integer N compute its prime factors.

The RSA integer factoring problem (RSA IFP)

▶ N = pq where p and q ̸= p are two large primes of similar size

slide-5
SLIDE 5

The integer factoring problem

The integer factoring problem (IFP)

▶ Given an integer N compute its prime factors.

The RSA integer factoring problem (RSA IFP)

▶ N = pq where p and q ̸= p are two large primes of similar size ▶ We focus on the RSA IFP since it is of cryptographic significance.

slide-6
SLIDE 6

The discrete logarithm problem

The discrete logarithm problem (DLP)

▶ Given a generator g of some group G and x = gd compute d = logg x.

slide-7
SLIDE 7

The discrete logarithm problem

The discrete logarithm problem (DLP)

▶ Given a generator g of some group G and x = gd compute d = logg x.

The short discrete logarithm problem (short DLP)

▶ d ≪ r where r is the order of G ▶ r may be assumed known or unknown

slide-8
SLIDE 8

Reasons for studying the short DLP

Reasons for studying the short DLP

  • 1. The RSA IFP may be reduced to the short DLP.
  • 2. The short DLP arises in some parameterizations of DLP-based schemes.
slide-9
SLIDE 9

Reducing RSA IFP to a short DLP [HSS93]

  • 1. Let N = pq be the RSA integer to be factored.
  • 2. Pick a random g ∈ Z∗
  • N. Compute

x = gN ≡ g p+q−1 since the order of Z∗

N is

pq − p − q + 1.

  • 3. Compute d = p + q − 1 given g and x.
  • 4. Solve N = pq and d = p + q − 1 for p and q.

▶ An RSA IFP may be reduced to a short DLP in a group of unknown order.

slide-10
SLIDE 10

Domain parameters for DLP-based schemes

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

∗ ballpark figure — various models exist for estimating these security levels

▶ The short DLP arises when short exponents are used with safe-prime groups. ▶ Important to understand quantum implications of parameterization choices.

slide-11
SLIDE 11

Shor’s algorithms [Shor94]

Shor’s algorithms

▶ Shor’s algorithms solve the IFP and the DLP in F∗ p. ▶ May be generalized to solve the DLP in any finite cyclic group.

slide-12
SLIDE 12

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size r.
  • 3. Observe frequencies j and k.
  • 4. Solve dj + k ≡ 0

(mod r).

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

slide-13
SLIDE 13

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ≡ g (a−bd) mod r ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size r.
  • 3. Observe frequencies j and k.
  • 4. Solve dj + k ≡ 0

(mod r).

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

slide-14
SLIDE 14

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ≡ g (a−bd) mod r ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size 2l.
  • 3. Observe frequencies j and k.
  • 4. Solving for d yields

d ≡ ⌊kr 2l ⌉ z −1 (mod r) where z = {jr}2l − jr 2l ∈ Z.

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

slide-15
SLIDE 15

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ≡ g (a−bd) mod r ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size 2l.
  • 3. Observe frequencies j and k.
  • 4. Solving for d yields

d ≡ ⌊kr 2l ⌉ z −1 (mod r) where z = {jr}2l − jr 2l ∈ Z.

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

slide-16
SLIDE 16

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ≡ g (a−bd) mod r ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size 2l.
  • 3. Observe frequencies j and k.
  • 4. Solving for d yields

d ≡ ⌊kr 2l ⌉ z −1 (mod r) where z = {jr}2l − jr 2l ∈ Z.

| j ⟩ | k ⟩ l l t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a l x −b x −b x −b x −b l

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

slide-17
SLIDE 17

Shor’s algorithm for the DLP [Shor94]

  • 1. Compute the superposition

1 r

r − 1

a = 0 r − 1

b = 0

  • a, b, g a x −b ≡ g (a−bd) mod r ⟩

where ⟨ g ⟩ = G of order r ∼ 2l.

  • 2. Compute two QFTs of size 2l.
  • 3. Observe frequencies j and k.
  • 4. Solving for d yields

d ≡ ⌊kr 2l ⌉ z −1 (mod r) where z = {jr}2l − jr 2l ∈ Z.

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

slide-18
SLIDE 18

Our algorithm for the short DLP

Our improvements

  • 1. We make the exponent length depend on d.
  • 2. We enable tradeoffs between the exponent length and the number of runs.

▶ This parallels Seifert’s modification [Seifert01] of Shor’s order finding algorithm. ▶ We provide a full analysis of the algorithm and rigorous proofs.

slide-19
SLIDE 19

Our algorithm for the short DLP [Ekerå16] — single pair

  • 1. Compute the superposition

1 √ 23m

22m − 1

a = 0 2m − 1

b = 0

  • a, b, g a x −b = g a−bd ⟩

where ⟨ g ⟩ = G of order r and d < 2m ≪ r.

  • 2. Compute QFTs of size 22m and 2m.
  • 3. Observe frequencies j and k.
  • 4. Solve | {dj + 2mk}22m | ≤ 2m−2 for d.

The probability of a good pair is ≥ 1/8. Need a single good pair to solve for d. The order r may be unknown.

| j ⟩ | k ⟩ 2m m t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a 2m x −b x −b x −b x −b m H H | 0 ⟩ | 0 ⟩ | identity in G ⟩

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

slide-20
SLIDE 20

Our algorithm for the short DLP — multiple pairs

  • 1. Compute the superposition

1 √ 22ℓ+m

2ℓ+m − 1

a = 0 2ℓ − 1

b = 0

  • a, b, g a x −b = g a−bd ⟩

where d < 2m ≪ r and ℓ ≈ m/s for small s.

  • 2. Compute QFTs of size 2ℓ+m and 2ℓ.
  • 3. Observe frequencies j and k.

Expect | {dj + 2mk}2ℓ+m | ≤ 2m−2 . The probability of a good pair is ≥ 1/8. Need at least s good pairs to solve for d. The order r may be unknown.

| j ⟩ | k ⟩ ℓ + m ℓ t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a ℓ + m x −b x −b ℓ H H | 0 ⟩ | 0 ⟩ | identity in G ⟩

Group Prime p Order r Exponent d Classical security Elliptic curve E(Fp) 200 200 200 100 Safe-prime G ⊂ F∗

p

2048 2047 2047

∗ 100

— short d 2048 2047 200

∗ 100

Schnorr G ⊂ F∗

p

2048 200 200

∗ 100

slide-21
SLIDE 21

Classical post-processing

j d k

Classical post-processing

▶ Solve s good pairs ( j, k ) for d using lattice-based techniques. ▶ For provable success, execute cs times and solve all subsets of s pairs. ▶ In practice the condition on ( j, k ) may be relaxed. May trade radius for dimension.

slide-22
SLIDE 22

Our advantage when solving an m bit short DLP

Our result

| j ⟩ | k ⟩ ℓ + m ℓ t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a ℓ + m x −b x −b ℓ H H | 0 ⟩ | 0 ⟩ | identity in G ⟩

Shor

| j ⟩ | k ⟩ l qubits l qubits t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a l operations x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b x −b l operations

1 √ r

∑ r − 1

a = 0 | a ⟩ 1 √ r

∑ r − 1

b = 0 | b ⟩

| identity in G ⟩

slide-23
SLIDE 23

Short m = 200 bit DLP in safe-prime group G ⊂ F∗

p for p ≈ 22048

Shor Ekerå Ekerå-Håstad qubits arithmetic qubits control qubits

  • perations

t t + m t + 3m t + 2l m = 200 3m = 600 2l ≈ 4094

slide-24
SLIDE 24

Short m = 200 bit DLP in safe-prime group G ⊂ F∗

p for p ≈ 22048

Shor

with uniform initialization see e.g. [Ekerå16]

Ekerå Ekerå-Håstad Mosca and Ekert [ME99] single control qubit optimization qubits arithmetic qubits control qubits

  • perations

t t + m t + 3m t + 2l m = 200 3m = 600 2l ≈ 4094

slide-25
SLIDE 25

Shor’s algorithm for the IFP [Shor94]

Shor’s algorithm for the IFP

▶ Factors N by computing the order r of a random element g ∈ Z∗ N.

slide-26
SLIDE 26

Shor’s order finding algorithm [Shor94] – factoring N ∈ Z

  • 1. Compute the superposition

1 2n

22n−1

a = 0

  • a, g a ⟩

where g ∈ Z∗

N and n ∼ log2 N.

  • 2. Compute a QFT of size 22n.
  • 3. Observe frequency j.
  • 4. Expect

z r ≈ j 22n for some z ∈ Z. Solve via continued fractions expansion.

| j ⟩ 2n qubits t qubits QFT

  • g a ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a 2n operations H | 0 ⟩ | 1 ⟩

slide-27
SLIDE 27

Our advantage when solving an n bit RSA IFP

Our result

| j ⟩ | k ⟩ n/2 + n/2s n/2s t qubits QFT QFT

  • ga x−b ⟩

g a g a g a g a g a g a g a g a g a n/2 + n/2s x −b x −b n/2s H H | 0 ⟩ | 0 ⟩ | identity in G ⟩

Shor

| j ⟩ 2n qubits t qubits QFT

  • g a ⟩

g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a g a 2n operations H | 0 ⟩ | 1 ⟩

slide-28
SLIDE 28

Our advantage when solving an n bit RSA IFP

Shor Seifert Ekerå-Håstad Mosca and Ekert [ME99] single control qubit optimization qubits arithmetic qubits control qubits

  • perations

t t + n/2 t + n t + 2n n/2 n 2n

slide-29
SLIDE 29

Summary and conclusion

Solving short m bit DLP

▶ Exponent reduced to m + 2m/s bits for small s ≥ 1. ▶ The group order may be unknown.

Factoring n bit RSA integers

▶ Exponent reduced from 2n bits to n/2 + n/s bits for small s ≥ 2. ▶ Reduced number of group operations, circuit depth, execution and coherence times. ▶ May result in a reduced number of control qubits.

slide-30
SLIDE 30

Summary and conclusion

Implications for parameterization

▶ Safe-prime groups with short d ∼ 2m yield m + 2m/s bit exponents. ▶ Schnorr groups of order r ∼ 2m yield 2m bit exponents.

▶ Expect reduction to m + 2m/s using tradeoffs.

▶ Not a reason to prefer safe-prime groups with short d over Schnorr groups.

Additional contributions

▶ We provide a full analysis of the algorithm and rigorous proofs.

slide-31
SLIDE 31