Hidden Field Equations Explained

Fq

of different size to disguise the relationship between the private key and public key. HFE is in fact a family which consists of basic HFE and combinatorial versions of HFE. The HFE family of cryptosystems is based on the hardness of the problem of finding solutions to a system of multivariate quadratic equations (the so-called MQ problem) since it uses private affine transformations to hide the extension field and the private polynomials. Hidden Field Equations also have been used to construct digital signature schemes, e.g. Quartz and Sflash.[1]

Mathematical background

One of the central notions to understand how Hidden Field Equations work is to see that for two extension fields

F
qn

F
qm

over the same base field

Fq

one can interpret a system of

m

multivariate polynomials in

n

variables over

Fq

as a function
F
qn

\to

F
qm

by using a suitable basis of
F
qn

over

Fq

. In almost all applications the polynomials are quadratic, i.e. they have degree 2.[2] We start with the simplest kind of polynomials, namely monomials, and show how they lead to quadratic systems of equations.

Fq

, where

q

is a power of 2, and an extension field

K

. Let

0<h<qn

such that

h=q\theta+1

for some

\theta

and gcd

(h,qn-1)=1

. The condition gcd

(h,qn-1)=1

is equivalent to requiring that the map

u\touh

on

K

is one to one and its inverse is the map

u\touh'

where

h'

is the multiplicative inverse of

h\bmodqn-1

.

Take a random element

u\in

F
qn
. Define

w\in

F
qn
by

w=uh=

q\theta
u

u    (1)

Let

\beta1,...,\betan

to be a basis of

K

as an

Fq

vector space. We represent

u

with respect to the basis as

u=(u1,...,un)

and

w=(w1,...,wn)

. Let

A(k)

(k)
={a
ij
} be the matrix of the linear transformation

u\to

qk
u

with respect to the basis

\beta1,...,\betan

, i.e. such that
qk
\beta
i
n
=\sum
j=1
k
a
ij

\betaj

k
,  a
ij

\inFq

for

1\lei,k\len

. Additionally, write all products of basis elements in terms of the basis, i.e.:

\betai\betaj=\sum

n
l=1

mijl\betal,  mijl\inFq

for each

1\lei,j\len

. The system of

n

equations which is explicit in the

wi

and quadratic in the

uj

can be obtained by expanding (1) and equating to zero the coefficients of the

\betai

.

Choose two secret affine transformations

S

and

T

, i.e. two invertible

n x n

matrices

MS=\{Sij\}

and

MT=\{Tij\}

with entries in

Fq

and two vectors

vS

and

vT

of length

n

over

Fq

and define

x

and

y

via:

u=Sx=MSx+vS    w=Ty=MTy+vT    (2)

By using the affine relations in (2) to replace the

uj,wi

with

xk,yl

, the system of

n

equations is linear in the

yl

and of degree 2 in the

xk

. Applying linear algebra it will give

n

explicit equations, one for each

yl

as polynomials of degree 2 in the

xk

.[3]

Multivariate cryptosystem

P

in one unknown

x

over some finite field
F
qn

(normally value

q=2

is used). This polynomial can be easily inverted over
F
qn

, i.e. it is feasible to find any solutions to the equation

P(x)=y

when such solution exist. The secret transformation either decryption and/or signature is based on this inversion. As explained above

P

can be identified with a system of

n

equations

(p1,...,pn)

using a fixed basis. To build a cryptosystem the polynomial

(p1,...,pn)

must be transformed so that the public information hides the original structure and prevents inversion. This is done by viewing the finite fields
F
qn

as a vector space over

Fq

and by choosing two linear affine transformations

S

and

T

. The triplet

(S,P,T)

constitute the private key. The private polynomial

P

is defined over
F
qn

.[1] [4] The public key is

(p1,...,pn)

. Below is the diagram for MQ-trapdoor

(S,P,T)

in HFE

inputx\tox=(x1,...,xn)\overset{secret:S}{\to}x'\overset{secret:P}{\to}y'\overset{secret:T}{\to}outputy

HFE polynomial

P

with degree

d

over
F
qn

is an element of
F
qn

[x]

. If the terms of polynomial

P

have at most quadratic terms over

Fq

then it will keep the public polynomial small.[1] The case that

P

consists of monomials of the form
si
q
ti
+q
x
, i.e. with 2 powers of

q

in the exponentis the basic version of HFE, i.e.

P

is chosen as

P(x)=\sumci

si
q
ti
+q
x

The degree

d

of the polynomial is also known as security parameter and the bigger its value the better for security since the resulting set of quadratic equations resembles a randomly chosen set of quadratic equations. On the other side large

d

slows down the deciphering. Since

P

is a polynomial of degree at most

d

the inverse of

P

, denoted by

P-1

can be computed in

d2(lnd)O(1)n2Fq

operations.[5]

Encryption and decryption

The public key is given by the

n

multivariate polynomials

(p1,...,pn)

over

Fq

. It is thus necessary to transfer the message

M

from
F
qn

\to

n
F
q
in order to encrypt it, i.e. we assume that

M

is a vector

(x1,...,xn)\in

n
F
q
. To encrypt message

M

we evaluate each

pi

at

(x1,...,xn)

. The ciphertext is

(p1(x1,...,xn),p2(x1,...,xn),...,pn(x1,...,xn))\in

n
F
q
.

To understand decryption let us express encryption in terms of

S,T,P

. Note that these are not available to the sender. By evaluating the

pi

at the message we first apply

S

, resulting in

x'

. At this point

x'

is transferred from
F
qn

\to

F
qn

so we can apply the private polynomial

P

which is over
F
qn

and this result is denoted by

y'\in

F
qn

. Once again,

y'

is transferred to the vector

(y1',...,yn')

and the transformation

T

is applied and the final output

y\in

F
qn

is produced from

(y1,...,yn)\in

n
F
q
.

To decrypt

y

, the above steps are done in reverse order. This is possible if the private key

(S,P,T)

is known. The crucial step in the deciphering is not the inversion of

S

and

T

but rather the computations of the solution of

P(x')=y'

. Since

P

is not necessary a bijection, one may find more than one solution to this inversion (there exist at most d different solutions

X'=(x1',...,xd')\inF

qn

since

P

is a polynomial of degree d). The redundancy denoted as

r

is added at the first step to the message

M

in order to select the right

M

from the set of solutions

X'

.[1] [3] [6] The diagram below shows the basic HFE for encryption.

M\overset{+r}{\to}x\overset{secret:S}{\to}x'\overset{secret:P}{\to}y'\overset{secret:T}{\to}y

HFE variations

Hidden Field Equations has four basic variations namely +,-,v and f and it is possible to combine them in various way. The basic principle is the following:

01. The + sign consists of linearity mixing of the public equations with some random equations.

02. The - sign is due to Adi Shamir and intends to remove the redundancy 'r' of the public equations.

03. The f sign consists of fixing some

f

input variables of the public key.

04. The v sign is defined as a construction and sometimes quite complex such that the inverse of the function can be found only if some v of the variables called vinegar variables are fixed. This idea is due to Jacques Patarin.

The operations above preserve to some extent the trapdoor solvability of the function.

HFE- and HFEv are very useful in signature schemes as they prevent from slowing down the signature generation and also enhance the overall security of HFE whereas for encryption both HFE- and HFEv will lead to a rather slow decryption process so neither too many equations can be removed (HFE-) nor too many variables should be added (HFEv). Both HFE- and HFEv were used to obtain Quartz.

For encryption, the situation is better with HFE+ since the decryption process takes the same amount of time, however the public key has more equations than variables.[1] [2]

HFE attacks

There are two famous attacks on HFE:

Recover the Private Key (Shamir-Kipnis): The key point of this attack is to recover the private key as sparse univariate polynomials over the extension field

F
qn

. The attack only works for basic HFE and fails for all its variations.

Fast Gröbner Bases (Faugère): The idea of Faugère's attacks is to use fast algorithm to compute a Gröbner basis of the system of polynomial equations. Faugère broke the HFE challenge 1 in 96 hours in 2002, and in 2003 Faugère and Joux worked together on the security of HFE.[1]

References

Notes and References

  1. https://eprint.iacr.org/2004/072.pdf Christopher Wolf and Bart Preneel, Asymmetric Cryptography: Hidden Field Equations
  2. http://eprint.iacr.org/2001/029.pdf Nicolas T. Courtois On Multivariate Signature-only public key cryptosystems
  3. http://eprint.iacr.org/2003/061.pdf Ilia Toli Hidden Polynomial Cryptosystems
  4. [Jean-Charles Faugère]
  5. Nicolas T. Courtois, "The Security of Hidden Field Equations"
  6. http://www.cryptosystem.net/hfe.pdf Jacques Patarin, Hidden Field Equations (HFE) and Isomorphic Polynomial (IP): two new families of asymmetric algorithm