Key Recovery Attack for ZHFE Daniel Cabarcas 1 Daniel Smith-Tone 2 , - - PowerPoint PPT Presentation

key recovery attack for zhfe
SMART_READER_LITE
LIVE PREVIEW

Key Recovery Attack for ZHFE Daniel Cabarcas 1 Daniel Smith-Tone 2 , - - PowerPoint PPT Presentation

Key Recovery Attack for ZHFE Daniel Cabarcas 1 Daniel Smith-Tone 2 , 3 Javier A. Verbel 1 1 Universidad Nacional de Colombia, Sede Medell n, Colombia 2 University of Louisville, USA 3 National Institute of Standards and Technology, USA


slide-1
SLIDE 1

Key Recovery Attack for ZHFE

Daniel Cabarcas1 Daniel Smith-Tone2,3 Javier A. Verbel1

1Universidad Nacional de Colombia, Sede Medell´

ın, Colombia

2 University of Louisville, USA 3National Institute of Standards and Technology, USA

PQCrypto June 28, 2017

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 1 / 23

slide-2
SLIDE 2

Context

MPK encryption schemes viable in PQ world Some of them based MQ problem HFE, multi HFE - broken by MinRank attack ZHFE

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 2 / 23

slide-3
SLIDE 3

Our contribution and related work

Our contribution

Show the existence of a low rank equivalent private key Show a detailed how recover a fully functional private key for ZHFE from the public key. Estimate the complexity of this attack

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 3 / 23

slide-4
SLIDE 4

Our contribution and related work

Our contribution

Show the existence of a low rank equivalent private key Show a detailed how recover a fully functional private key for ZHFE from the public key. Estimate the complexity of this attack Bettale, Faug` ere, Perret, (2013) “Cryptanalysis of HFE, multi-HFE and variants for odd and even characteristic” Zhang, Tang (2016) “On the security and key generation of the ZHFE encryption scheme” Perlner and Smith-Tone (2016) “Security analysis and key modification for ZHFE”

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 3 / 23

slide-5
SLIDE 5

Outline

1

ZHFE encryption scheme

2

Existence of a low rank equivalent key

3

MinRank attack to ZHFE

4

Experiments and results

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 4 / 23

slide-6
SLIDE 6

ZHFE encryption scheme

Let F be a field of size q and K an extension field of degree n of F

HFE polynomial

F(X) =

  • 0≤i≤j<n

aijX qi+qj +

n

  • i=0

biX qi + c, with aij, bi, c ∈ K

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 5 / 23

slide-7
SLIDE 7

ZHFE encryption scheme

Let F be a field of size q and K an extension field of degree n of F

HFE polynomial

F(X) =

  • 0≤i≤j<n

aijX qi+qj +

n

  • i=0

biX qi + c, with aij, bi, c ∈ K

A low degree reduction

Let F and ˜ F be high degree (and rank) HFE polynomials, where the following relation holds in K Ψ(X) = X

  • α1F q0 + · · · + αnF qn−1 + β1 ˜

F q0 + · · · + βn ˜ F qn−1 + X q αn+1F q0 + · · · + α2nF qn−1 + βn+1 ˜ F q0 + · · · + β2n ˜ F qn−1 , where deg(Ψ) ≤ D, for some small integer D.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 5 / 23

slide-8
SLIDE 8

Public and secret keys

SK A secret key is Π = (G, S, T), where G = (F, ˜ F), T ∈ End(F2n), S ∈ End(Fn). PK The public given by Π is P = T ◦ ϕ2 ◦ G ◦ ϕ−1 ◦ S, where ϕ : K → Fn be the canonical F-isomorphism and ϕ2 = ϕ × ϕ.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 6 / 23

slide-9
SLIDE 9

Public and secret keys

SK A secret key is Π = (G, S, T), where G = (F, ˜ F), T ∈ End(F2n), S ∈ End(Fn). PK The public given by Π is P = T ◦ ϕ2 ◦ G ◦ ϕ−1 ◦ S, where ϕ : K → Fn be the canonical F-isomorphism and ϕ2 = ϕ × ϕ.

Encryption and decryption

To encrypt a plaintext x ∈ Fn, evaluate P(x) To decrypt P(x), the map G needs to be inverted. So, if G(X) = (Y1, Y2) then the following relation holds: Ψ(X) = X

  • α1Y1 + α2Y q

1 + · · · + αnY qn−1 1

+ β1Y2 + · · · + βnY qn−1

2

  • +

X q αn+1Y1 + αn+2Y q

1 + · · · + α2nY qn−1 1

+ βn+1Y2 + · · · + β2nY qn−1

2

  • .

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 6 / 23

slide-10
SLIDE 10

A low rank equivalent key

Let L be the function from K2 to K2 given by L(X, Y ) = n

  • i=1

αiX qi−1 +

n

  • i=1

βiY qi−1,

n

  • i=1

αn+iX qi−1 +

n

  • i=1

βn+iY qi−1

  • .

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 7 / 23

slide-11
SLIDE 11

A low rank equivalent key

Let L be the function from K2 to K2 given by L(X, Y ) = n

  • i=1

αiX qi−1 +

n

  • i=1

βiY qi−1,

n

  • i=1

αn+iX qi−1 +

n

  • i=1

βn+iY qi−1

  • .

So, If (H, ˜ H) := L ◦ (F, ˜ F) and r = ⌈logq D⌉, then Rank(H) ≤ r + 1 H =               ∗ ∗ ∗ ∗ ∗ ∗ ∗ . . . ∗ ∗ . . . ∗ ∗ ∗ ∗ ∗ . . . ... ∗ ∗ ∗ ∗ ∗ . . . ∗               Rank(˜ H) ≤ r + 1 ˜ H =               ∗ ∗ ∗ ∗ ∗ . . . ∗ ∗ ∗ ∗ . . . ∗ ∗ ∗ ∗ ∗ . . . ... ∗ ∗ ∗ ∗ ∗ . . . ∗              

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 7 / 23

slide-12
SLIDE 12

If (H, ˜ H) = L ◦ (F, ˜ F) and L non-singular (happen with high probability), then T ◦ ϕ2 ◦ (F, ˜ F) ◦ ϕ−1 ◦ S = (T ◦ R) ◦ ϕ2 ◦

  • H, ˜

H

  • ϕ−1 ◦ S,

where R = ϕ2 ◦ L−1 ◦ ϕ−1

2 .

  • (F, ˜

F), S, T)

  • and
  • (H, ˜

H), S, (T ◦ R)

  • are equivalent

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 8 / 23

slide-13
SLIDE 13

Private key and fundamental equation

Suppose P = T ◦ ϕ2 ◦ (F, ˜ F) ◦ ϕ−1 ◦ S is a ZHFE public key.

Fundamental equation

2n−1

  • i=0

ui,0Pi+1 = WFW⊤, and

2n−1

  • i=0

ui,nPi+1 = W˜ FW⊤, where W := SMn, U := T−1M2n = [uij] Mn = ρ ◦ ϕ and M2n = Diag(Mn, Mn), ρ : K → Kn, ρ(a) = (a, aq, ..., aqn−1).

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 9 / 23

slide-14
SLIDE 14

Suppose P = T ◦ ϕ2 ◦ (F, ˜ F) ◦ ϕ−1 ◦ S is a ZHFE public key.

Fundamental equation

2n−1

  • i=0

ui,0Pi+1 = WFW⊤, and

2n−1

  • i=0

ui,nPi+1 = W˜ FW⊤, F =               ∗ ∗ ∗ ∗ ∗ ∗ ∗ . . . ∗ ∗ . . . ∗ ∗ ∗ ∗ ∗ . . . ... ∗ ∗ ∗ ∗ ∗ . . . ∗               ˜ F =               ∗ ∗ ∗ ∗ ∗ . . . ∗ ∗ ∗ ∗ . . . ∗ ∗ ∗ ∗ ∗ . . . ... ∗ ∗ ∗ ∗ ∗ . . . ∗               u = [ui,0]i and v = [ui,n]i are solution to the MinRank problem associated with (P1, ..., P2n) and r + 1.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 10 / 23

slide-15
SLIDE 15

Too many equivalent keys

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 11 / 23

slide-16
SLIDE 16

Too many equivalent keys

A big set of equivalent keys

Let A : K2 → K2 be a non-singular linear transformation represented by A∗ =

  • a00

a01 a10 a11

  • Frobk : K → K, Frobk(a) = aqk,

If G ′ = Frobk ◦ A ◦ (F, ˜ F) ◦ Frobn−k, T ′ = T ◦ ϕ2 ◦ A−1 ◦ Frobn−k ◦ ϕ−1

2 ,

S′ = ϕ ◦ Frobk ◦ ϕ−1 ◦ S, T ◦ ϕ2 ◦ G ◦ ϕ−1 ◦ S = T ′ ◦ ϕ2 ◦ G ′ ◦ ϕ−1 ◦ S′ (G, S, T) and (G ′, S′, T ′) are equivalent, where G = (F, ˜ F),

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 11 / 23

slide-17
SLIDE 17

Given a private key (G ′, S′, T ′), if G ′ := (H, ˜ H), U′ := T′−1M2n, W′ := S′Mn,

2n−1

  • i=0

u′

i,0Pi+1 = W’HW’⊤, and 2n−1

  • i=0

u′

i,nPi+1 = W’˜

HW’⊤.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 12 / 23

slide-18
SLIDE 18

Given a private key (G ′, S′, T ′), if G ′ := (H, ˜ H), U′ := T′−1M2n, W′ := S′Mn,

2n−1

  • i=0

u′

i,0Pi+1 = W’HW’⊤, and 2n−1

  • i=0

u′

i,nPi+1 = W’˜

HW’⊤. The matrices representing G ′ are H = Frobk(a00F + a01˜ F), ˜ H = Frobk(a10F + a11˜ F), Moreover,Rank(H), Rank(˜ H) ≤ r + 1 Have the shape,             ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗            

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 12 / 23

slide-19
SLIDE 19

Given a private key (G ′, S′, T ′), if G ′ := (H, ˜ H), U′ := T′−1M2n, W′ := S′Mn,

2n−1

  • i=0

u′

i,0Pi+1 = W’HW’⊤, and 2n−1

  • i=0

u′

i,nPi+1 = W’˜

HW’⊤. The matrices representing G ′ are H = Frobk(a00F + a01˜ F), ˜ H = Frobk(a10F + a11˜ F), Moreover,Rank(H), Rank(˜ H) ≤ r + 1 Have the shape,             ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗             The first and (n + 1)-th column of U′ are solutions to the MinRank problem associated with P1, ..., P2n and r + 1.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 12 / 23

slide-20
SLIDE 20

Given a private key (G ′, S′, T ′), if G ′ := (H, ˜ H), U′ := T′−1M2n, W′ := S′Mn,

2n−1

  • i=0

u′

i,0Pi+1 = W’HW’⊤, and 2n−1

  • i=0

u′

i,nPi+1 = W’˜

HW’⊤. U′ =       u′ u′q · · · u′qn−1 v′ v′q · · · v′qn−1       , u′ := [u′

i,0] = a00uqk + a01vqk v′ := [u′ i,n] = a10uqk + a11vqk

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 13 / 23

slide-21
SLIDE 21

Given a private key (G ′, S′, T ′), if G ′ := (H, ˜ H), U′ := T′−1M2n, W′ := S′Mn,

2n−1

  • i=0

u′

i,0Pi+1 = W’HW’⊤, and 2n−1

  • i=0

u′

i,nPi+1 = W’˜

HW’⊤. W′ =       w wq · · · wqn−1      

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 14 / 23

slide-22
SLIDE 22

Attack description

Finding T′

  • 1. Find a vector u′ = (u′

0, ..., u′ 2n−1) ∈ K2n such that

Rank 2n−1

  • i=0

u′

iPi+1

  • ≤ r + 1
  • 2. Compute K′ = ker

2n−1

i=0 u′ iPi+1

  • and find v′ = (v ′

0, ..., v ′ 2n−1) ∈ K2n such that

K′ 2n−1

  • i=0

x′

i Pi+1

  • = 0
  • 3. Use u′ and v′ to compute U′ = T′−1M2n

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 15 / 23

slide-23
SLIDE 23

Finding S′

2n−1

i=0 u′ iPi+1 = W′HW′⊤

ker(H) = K′W′, where K′ = ker 2n−1

i=0 u′ iPi+1

  • .

w the first column of W′ is a solution of the following overdeterminate (r(n − r − 1) equations and n variables) linear system x

  • K′|Frob(n−1)(K′)| · · · |Frob(n−r−1)(K′)
  • = 0

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 16 / 23

slide-24
SLIDE 24

Finding S′

2n−1

i=0 u′ iPi+1 = W′HW′⊤

ker(H) = K′W′, where K′ = ker 2n−1

i=0 u′ iPi+1

  • .

w the first column of W′ is a solution of the following overdeterminate (r(n − r − 1) equations and n variables) linear system x

  • K′|Frob(n−1)(K′)| · · · |Frob(n−r−1)(K′)
  • = 0

Computing the core polynomials H and ˜ H

H = W′−1 2n−1

  • i=0

u′

iPi+1

  • W′−t and ˜

H = W′−1 2n−1

  • i=0

v ′

iPi+1

  • W′−t.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 16 / 23

slide-25
SLIDE 25

Finding the low degree Ψ

Remember that H′ =             ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗             ˜ H

′ =

            ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗             Can we extract a low degree polynomial from those core polynomials which let us invert them?

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 17 / 23

slide-26
SLIDE 26

Finding the low degree Ψ

Note that aqk

11H − aqk 01 ˜

H = det(A∗)qkFrobk(F)             ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗             −aqk

10H + aqk 00 ˜

H = det(A∗)qkFrobk( ˜ F)             ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗             Define Ψ′ := X(aqk

11H − aqk 01 ˜

H) + X q(−aqk

10H + aqk 00 ˜

H) = det(A∗)qkFrobk(Ψ). Solving some linear systems we can recover a functional low degree Ψ′

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 17 / 23

slide-27
SLIDE 27

Experimental results

The experiments were performed using Magma v2.21-1 on a server with a processor Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz, running Linux CentOS release 6.6.

Minors KS q r n CPU time [s] Memory [MB] CPU time [s] Memory [MB] 7 2 8 255 4216 280 439 7 2 12 3111 59651 1272 752 7 2 16 5487 2537 17 2 8 277 5034 299 503 17 2 12 3584 68731 1330 817 17 2 16 6157 2800 Table: MinRank attack to ZHFE

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 18 / 23

slide-28
SLIDE 28

Theoretical results

A fully functional private key can be extracted from a ZHFE public key If L : K2 → K2 is singular the attack also works asymptotic complexity of the attack using minors modeling is O

  • n(r+2)ω

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 19 / 23

slide-29
SLIDE 29

Future work

Is the KS modeling more efficient than the minors modeling? What is the complexity of the KS modeling? Can we make HFE or ZHFE secure by making r a function of the security parameter?

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 20 / 23

slide-30
SLIDE 30

THANK YOU

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 21 / 23

slide-31
SLIDE 31

What about if L is singular?

If P = T ◦ ϕ2 ◦ G ◦ ϕ−1 ◦ S is the public key. Then R′ ◦ P = ϕ2 ◦ (L ◦ G) ◦ ϕ−1 ◦ S, R′ = ϕ2 ◦ L ◦ ϕ−1

2

  • T −1.

We can recover R′ and an functional private key for R′ ◦ P. Given y = P(x), compute y ′ = R′(y), and use the recovered private key to find preimages for y ′

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 22 / 23

slide-32
SLIDE 32

Finding S′′

2n−1

i=0 u′ iPi+1 = W′′H′W′′⊤

ker(H′) = K′W′′, where K′ = ker 2n−1

i=0 u′ iPi+1

  • . K′ has size (n − r − 1) × n

ker(H′) is on the form [0(n−r−1)|C]. w the first column of W′′ satisfies the next overdeterminate linear system

  • K′|Frob(n−1)(K′)| · · · |Frob(n−r−1)(K′)

⊤ w = 0

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 23 / 23

slide-33
SLIDE 33

Finding S′′

2n−1

i=0 u′ iPi+1 = W′′H′W′′⊤

ker(H′) = K′W′′, where K′ = ker 2n−1

i=0 u′ iPi+1

  • . K′ has size (n − r − 1) × n

ker(H′) is on the form [0(n−r−1)|C]. w the first column of W′′ satisfies the next overdeterminate linear system

  • K′|Frob(n−1)(K′)| · · · |Frob(n−r−1)(K′)

⊤ w = 0

Computing the core polynomials H′ and ˜ H

H′ = W′′−1 2n−1

  • i=0

u′

iPi+1

  • W′′−t and ˜

H′ = W′′−1 2n−1

  • i=0

v ′

iPi+1

  • W′′−t.

Cabarcas, Smith & Verbel Key Recovery Attack for ZHFE PQCrypto June 28, 2017 23 / 23