Dear all,
There seems to be a mistake in the
dme_implementation document. The irreducible polynomial S^3 + c
S^2 + d S + e defined at page 3 is in fact not irreducible.
The constants c and d in the document
do not agree with the value in the reference implementation
(which are likely the correct values because they do define an
irreducible polynomial).
Kind regards,
Ward
Dear Ignacio, Dear all,
TL;DR: I the new parameters of the DME scheme are not secure. The
following describes an attack that reduces the security in the
exponent by more than half.
Recall that the attack on DME that I proposed earlier consisted
of 2 steps.
1) Represent the public key map over F_2, wich will make it a polynomial map of degree 4. Decompose this polynomial map into the composition of two quadratic polynomial maps.
2) We know each of the quadratic components is isomorphic to a known quadratic map (the representation of G_1 and G_2 over F_2) which we know how to invert. The second step is to recover this isomorhpism with an IP solver.
The complexity of the first step with the algorithm of [1] is
O(n^9), where n is the number of variables of the decomposed map,
or equivalently the number of bits of a ciphertext.
The complexity of the second with the algorithm of [2] is
O(2^{n/2}).
The adaptations proposed by Ignacio increase n enough to make the
second step infeasible. But the complexity of the first step
remains much lower than the targeted security level.
I did some experiments and it turns out that the degree of
regularity of the quadratic components is very low. In fact, in
all experiments the highest degree reached during a GB computation
was 3. This means that once a decomposition is found, the public
map can be efficiently inverted by doing a GB computations on each
component. This means that the complexity of the attack is
dominated by the complexity of the first step.
Ignacio also proposed to use 3 (instead of 2) nonzero entries in
the rows of matrix of the first exponentiation. With this
adaptation, if we represent the public key over F_2 it becomes a
degree 6 polynomial map which is the composition of a degree 2
with a degree 3 map. I believe (correct me if I am wrong) that the
complexity of decomposing this map with the algorithm of [1] is
O(n^15).
According to my experiments the degree of regularity of the cubic component map is 4, so preimages for this map can still be found efficiently with a GB computation, and again we can say that the complexity of the attack is dominated by the complexity of decomposing the public key.
For the different parametrizations of Ignacio I estimate the complexity of the attack as :
DME(4,2,64) -> (4*2*64)^9 ~ 2^81
DME(6,2,44) -> (6*2*44)^9 ~ 2^81
DME3(4,2,36) -> (4*2*36)^15 ~2^122
So none of the proposed parameter sets seem to reach the claimed security level of 256 bits.
I'll finish with a note on the experiments I did. I did not
implement the algorithm for decomposing the public key. I
generated the two components L_3 o G_2 o L2 and G_1 o L_1,
represented them over F_2, composed these quadratic maps with
random invertible linear maps over F_2. This is what the output of
the decomposition algorithm [1] would output. Then I used the
PolyBoRi library [3] to find an inverse for a random point in
GF(2)^{6*e}. The highest degree encountered during the GB
computation was 3, except in the DME3 case, where the degree was
4. As expected I always found a unique solution.
Finding an inverse for one of the components of DME(3,2,24) (which
was originally proposed to have 128 bits of security) took only
565 seconds.
Kind regards,
Ward
[1] Faugère, Jean-Charles, and Ludovic Perret. "An efficient
algorithm
for decomposing multivariate polynomials and its applications to
cryptography." Journal of Symbolic Computation 44.12 (2009):
1676-1689.
[2] Bouillaguet, Charles, Pierre-Alain Fouque, and Amandine Véber.
"Graph-theoretic algorithms for the “isomorphism of polynomials”
problem." Annual International Conference on the Theory and
Applications
of Cryptographic Techniques. Springer, Berlin, Heidelberg, 2013.
[3] http://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/pbori.html
Sage code for the experiments on the first component of
DME(3,2,24), the code for the second component and the experiments
for DME3 is very similar. (This was my first time working with
Sage, so I apologize if my code is not very clean. )
from time import time
e = 24;
KS= GF(2);
K = GF(2^e);
R = PolynomialRing(K,'X');
R.inject_variables();
#Find irreducible polynomial
while True:
a = K.random_element();
b = K.random_element();
IP = X^2 + a*X + b;
if IP.is_irreducible():
break;
#multiplication over a degree 2 extension field of K
def mulK2(A,B):
t0 = A[0]*B[0];
t1 = A[1]*B[0] + A[0]*B[1];
t2 = A[1]*B[1];
return (t0 + b*t2 , t1 + a*t2)
#squaring an element of a degree 2 extension of K a total of n
times
def squareK2(A,n):
if n==0:
return A;
B = mulK2(A,A);
return squareK2(B,n-1);
#find values of Eij such that the exponentiation map is bijective
(for vectors with nonzero entries)
while True:
E11 = ZZ.random_element(0,2*e);
E12 = ZZ.random_element(0,2*e);
E21 = ZZ.random_element(0,2*e);
E23 = ZZ.random_element(0,2*e);
E32 = ZZ.random_element(0,2*e);
E33 = ZZ.random_element(0,2*e);
det = -2^(E11+E23+E32)-2^(E12+E21+E33);
if gcd(det, 2^(2*e)-1) == 1 :
break;
#Find L1
while True:
L1 = matrix([[K.random_element(),K.random_element(),0,0,0,0],
[K.random_element(),K.random_element(),0,0,0,0],
[0,0,K.random_element(),K.random_element(),0,0],
[0,0,K.random_element(),K.random_element(),0,0],
[0,0,0,0,K.random_element(),K.random_element()],
[0,0,0,0,K.random_element(),K.random_element()]]);
if L1.is_invertible():
break;
# matrix M for conversion between GF(2^e) qnd GF(2)^e
t = K.gen()
M = matrix([[ (t^j)^(2^i) for j in range(0,e)] for i in
range(0,e)]);
Minv = M^-1
MM = matrix(K,6,6*e);
Mrow0 = M.matrix_from_rows([0]);
for i in range(0,6):
MM.set_block(i,e*i,Mrow0);
def G1L1(x):
x = L1*x;
y = matrix(K,6,1);
y[0],y[1] =
mulK2(squareK2((x[0],x[1]),E11),squareK2((x[2],x[3]),E12));
y[2],y[3] =
mulK2(squareK2((x[0],x[1]),E21),squareK2((x[4],x[5]),E23));
y[4],y[5] =
mulK2(squareK2((x[2],x[3]),E32),squareK2((x[4],x[5]),E33));
return y;
def G1L1Decomposed(x):
return G1L1(MM*x);
R = BooleanPolynomialRing(e*6,'x')
X = R.gens()
polynomials = [0] * 6*e
#calculating the coefficients of representation of G_1 o L_1 over
F_2
for i in range(0,6*e):
for j in range(i,6*e):
vec = matrix(K,6*e,1)
vec[i] = 1;
vec[j] = 1;
Q = G1L1Decomposed(vec);
for k in range(0,6):
Powers = matrix([ [ (Q[k][0])^(2^n) ] for n in
range(0,e)]);
outVec = Minv * Powers;
for l in range(0,e):
if outVec[l,0] != 0:
polynomials[e*k+l] += X[i]*X[j];
#Pick a random element to forge a signature for
for i in range(0,6*e):
if (ZZ.random_element(2) == 0):
#print(i)
polynomials[i] = polynomials[i] + 1
I = R.ideal(polynomials)
start = time()
GB = I.groebner_basis(prot = True);
print("GB computation took",time()-start,"seconds")
for x in GB:
print(x)
--
You received this message because you are subscribed to the Google Groups "pqc-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pqc-forum+unsubscribe@list.nist.gov.
Visit this group at https://groups.google.com/a/list.nist.gov/group/pqc-forum/.
Dear Ignacio,
Are you suggesting that the decomposition algorithm of [1] will
not work on the PK of DME over F_2?
I am really not an expert on this functional decomposition stuff,
but quoting the results of [2] as saying that the algorithm does
not work over F_2 seems far-fetched. They prove that, given a
random decomposable system of polynomials, the algorithm succeeds
with probability close to one when the finite field is large
enough. This is really not the same as saying that the algorithm
does not work over F_2. Even if the algorithm of [1] only works
for a small fraction of the public keys, this would still be a
huge problem for DME.
Of course, the best way to find out is to run the algorithm and
see if it works. I'll try to do this when I get the time.
Kind regards,
Ward.
--
You received this message because you are subscribed to the Google Groups "pqc-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pqc-forum+...@list.nist.gov.