Home Mathematics Attack on Kayawood protocol: uncloaking private keys
Article Open Access

Attack on Kayawood protocol: uncloaking private keys

  • Matvei Kotov , Anton Menshov and Alexander Ushakov
Published/Copyright: December 1, 2020

Abstract

We analyze security properties of a two-party key-agreement protocol recently proposed by I. Anshel, D. Atkins, D. Goldfeld, and P. Gunnels, called Kayawood protocol. At the core of the protocol is an action (called E-multiplication) of a braid group on some finite set. The protocol assigns a secret element of a braid group to each party (private key). To disguise those elements, the protocol uses a so-called cloaking method that multiplies private keys on the left and on the right by specially designed elements (stabilizers for E-multiplication).

We present a heuristic algorithm that allows a passive eavesdropper to recover Alice’s private key by removing cloaking elements. Our attack has 100% success rate on randomly generated instances of the protocol for the originally proposed parameter values and for recent proposals that suggest to insert many cloaking elements at random positions of the private key. Implementation of the attack is available on GitHub.

MSC 2010: 94A60; 68W30

1 Introduction

Braid group cryptography received significant attention since invention of the first braid-based key-agreement protocols in 1999: Ko-Lee protocol [1] and Anshel-Anshel-Goldefeld protocol [2]. Both protocols use conjugation as main operation, and both were found vulnerable to linear attacks (such as [3] and [4]) and heuristic length-based attacks (such as [5, 6, 7, 8, 9]).

Kayawood protocol (and other protocols from its family: Algebraic Eraser proposed in [10], WalnutDSA proposed in [11], and Ironwood proposed in [12]) uses a different type of action, called E-multiplication, and utilizes commuting actions of non-commuting braids. This is what in our opinion distinguishes Kayawood from “classic” braid-based schemes such as Ko-Lee.

1.1 Kayawood protocol

The Kayawood protocol is a two-party (Alice and Bob) key-agreement protocol recently proposed by I. Anshel, D. Atkins, D. Goldfeld, and P. Gunnells in [13]. The design of the protocol is very similar to the design of the digital signature algorithm WalnutDSA [11]. At the core of the protocol is an action (called E-multiplication) of the group Bn of braids on n strands on some finite set which is claimed to be a suitable primitive for use within lightweight cryptography.

By design, Alice and Bob’s private keys are braids from two commuting subgroups of Bn. To disguise the private keys, the (original version of the) protocol uses a so-called cloaking method that multiplies the keys on the left and on the right by specially designed elements (stabilizers for E-multiplication) and applies a certain rewriting procedure to obfuscate the result. Recently, after a series of attacks on WalnutDSA ([14, 15, 16, 17]), the authors proposed several changes to the protocol including changes to the cloaking procedure (see [18, D. Atkins on May 23, 2018]). Namely, they suggested to use several cloaking elements inserted into the private keys at random positions.

1.2 Our contribution

In this paper, we show that the cloaking elements can be efficiently identified and removed from public keys, and private keys can be reconstructed. Furthermore, following the suggestion from [18, D. Atkins on May 23, 2018], we show that private keys can be reconstructed even when many cloaking elements are inserted at random positions. The attack applies heuristics and techniques developed in authors’ attacks on other braid-based protocols, thus Section 6.2 uses ideas described in [19] and [20] to find a secret conjugator, and Section 7 utilizes heuristics developed in [16] to remove cloaking elements. Our attack has 100% success rate on randomly generated instances of the protocol, and its implementation is available on GitHub [21].

1.3 Outline

In Section 2 we review the colored Burau representation, E-multiplication, and cloaking elements. Next, in Section 3, the Kayawood protocol is introduced. In Section 4 we show that in many cases the design of the protocol allows to recover the shared key directly from public keys. In Sections 5, 6, and 7 we describe our attack. Section 8 defines the parameters we used to test our attack and describes the obtained results. We conclude the paper in Section 9.

2 Action of colored Burau group on some finite set

Here we review one non-faithful representation of a braid group called the colored Burau group.

2.1 Braid group

In this section we follow the exposition of [22, Section 5.1]. A braid is obtained by laying down a number of parallel pieces of strands and intertwining them, without loosing track of the fact that they run essentially in the same direction. In our pictures the direction is horizontal. We number strands at each horizontal position from the top down. See Figure 1 for example.

Figure 1 A 4-strand braid.
Figure 1

A 4-strand braid.

If we put down two braids u and v in a row, so that the end of u matches the beginning of v, we get another braid denoted by uv, i.e., concatenation of n-strand braids is a product. We consider two braids equivalent if there exists an isotopy between them, i.e., it is possible to move the strands of one of the braids in space (without moving the endpoints of strands and moving strands through each other) to get the other braid. We distinguish a special n-strand braid which contains no crossings and call it a trivial braid. Clearly, the trivial braid behaves as left and right identity relative to the defined multiplication. The set Bn of isotopy classes of n-strand braids has a group structure, because if we concatenate a braid with its mirror image in a vertical plane, the result is isotopic to the trivial braid.

Each braid is uniquely defined by a sequence of strand crossings. A crossing is called positive if the front strand has a positive slope, otherwise it is called negative. There are exactly n − 1 crossing types for n-strand braids, we denote them by x1, . . . , xn−1, where xi is a positive crossing of ith and (i + 1)st strands. As we mentioned above, any braid is a sequence of crossings, and the set {x1, . . . , xn−1} generates Bn. It is easy to see that crossings x1, . . . , xn−1 are subject to the relations

xixj=xjxi for i,j such that |ij|>1xixi+1xi=xi+1xixi+1 for 1in2.

In fact, it can be shown that the relations above define equivalence relation on braids and, hence, Bn has the following combinatorial presentation:

B n x 1 , , x n 1 x i x j = x j x i  for  | i j | > 1 , x i x i + 1 x i = x i + 1 x i x i + 1 .

It easily follows from the presentation above that elements in the subgroups Ln = 〈x1, . . . , xm−1〉 and Un = 〈xm+1, . . . , xn−1〉 pairwise commute, where m= n2 .

A braid word is a word w = w(x1, . . . , xn−1) in the generators of Bn and their inverses:

(1) w=xi1ε1xikεk,

where 1 ≤ ijn − 1 and εj = ±1. The length of the braid word (1) is k, denoted by |w|. If u¯=(u1,,uk) is a k-tuple of braid words, then the total length |u¯| of u¯ is defined as i=1k| ui |.

Every braid w naturally defines a permutation σw, which is a permutation of the endpoints of the involved strands. The corresponding map wσw is an epimorphism. If σw is trivial, then w is called a pure braid.

Recall that the commutator of braid words u and v is the braid word [u, v] = u−1v−1uv. For a set of braids u1, . . . , uk define a set

C(u1,,uk)={ cBn[ c,ui ]=1 for every 1ik },

called the centralizer of u1, . . . , uk. It is easy to check that a centralizer is a subgroup of Bn.

The group Bn has a cyclic center generated by the element Δ2, where Δ is the element, called the half twist, defined as follows:

Δ=(x1xn1)(x1xn2)(x1).

2.2 Geodesic braid approximation

Let w be a word in generators of Bn. The algorithmic problem to find a shortest braid word representing the same element as w, called geodesic, is known to be computationally hard (see [23]). In this paper, following [7, 8], we use a geodesic-braid approximation method to estimate the geodesic length of a braid. The algorithm attempts to minimize the given braid word exploiting the property of Dehornoy’s form D(w) (introduced in [24]) that for a “generic” braid word w one has |D(w)| < |w|.

2.3 Colored matrices

Fix a finite field 𝔽q and denote by Rn the ring of Laurent polynomials in variables {t1, . . . , tn} with coefficients in 𝔽q. Let GLn(Rn) be the group of invertible matrices over Rn. The symmetric group Sn naturally acts on GLn(Rn) by permuting the variables {t1, . . . , tn}. The result of action of σSn on MGLn(Rn) is denoted by M σ. Recall that the semidirect product of GLn(Rn) and S n is a group

G L n R n S n = ( M , π ) M G L n R n  and  π S n ,

equipped with the operation

(M1,σ1)(M2,σ2)=(M1M2σ1,σ1σ2).

Define n − 1 n × n-matrices over polynomials in variables {t1, . . . , tn}:

C 1 ( t 1 ) = t 1 1 0 0 1 0 0 0 I n 2  and  C i ( t i ) = I i 2 0 0 0 0 0 1 0 0 0 0 t i t i 1 0 0 0 0 1 0 0 0 0 0 I n i 1

for 2 ≤ in − 1.

Lemma

A map φ on the generators x1, . . . , xn−1 of Bn:

xiφ(Ci(ti),πi),

where πi = (i, i + 1) ∈ Sn, extends to a group homomorphism.

The group 〈(C1(t1), π1), . . . , (Cn−1(tn−1), πn−1)〉 is called the colored Burau representation of Bn and is denoted by CBn.

2.4 Action of CBn on a certain finite set

Fix n nontrivial elements τ1, . . . , τn ∈ 𝔽q, termed t-values, and define an evaluation map

ϵ:GLn(Rn)GLn(Fq),

that for each i replaces ti with the value τi. Observe that the map ϵ is well defined on the matrices coming from the colored Burau representation. For (M, σ) ∈ GLn(𝔽q) × Sn and (C, ρ) ∈ CBn define the following element:

(M,σ)(C,ρ)=(Mϵ(Cσ),σρ).

It is straightforward to check that the map * defines an action of CBn on GLn(𝔽qSn. By E-multiplication we understand the induced action of Bn on GLn(𝔽qSn.

2.5 Cloaking elements

Let G be a group acting on a set X, xX, and xgX denotes the result of the action of gG on x. The stabilizer of x is the set

Stab(x)={ gGxg=x }.

It is easy to check that Stab(x) is a subgroup of G. The protocol [13] requires braids stabilizing some (M, σ) ∈ GLn(𝔽qS n through the right action of the braid group via E-multiplication. Such braids are called cloaking elements in [13, Definition 2.1]. Observe that these elements depend on t-values that are used to define E-multiplication. The following way of constructing cloaking elements was proposed in [13].

Proposition 2.1

([13, Proposition 2.2]). Fix (M, σ) ∈ GLn(𝔽qSn and assume that a, b, i ∈ N and wBn satisfy the following conditions:

1a<bn and τa=τb=1,1i<n and σw(i)=σ1(a),σw(i+1)=σ1(b).

Then wxi±2w1 Stab((M, σ)).

The main purpose of a cloaking element is to “cloak” a braid A that acts on a given pair (M, σ), multiplication of A on the left by a cloaking element hides some structure of A without changing the way it acts. Observe that the property of a braid to cloak (M, σ) depends on σ only. Hence, we can denote the subgroup of Stab((M, σ)) generated by cloaking elements from Proposition 2.1 by C σ.

The following naturally follows from Proposition 2.1.

Corollary 2.2

If σ, ρSn are such that σ−1(a) = ρ−1(a) and σ−1(b) = ρ−1(b), then Cσ = Cρ.

Remark 2.3

Geometrically, conditions of Proposition 2.1 define a braid that:

  1. intertwists strands getting strands a and b next to each other using w,

  2. double twists a and b using xi2,

  3. intertwists strands backwards using w−1.

The obtained braid has the structure as shown in Figure 2.

Figure 2 Cloaking element.
Figure 2

Cloaking element.

Another way to generate cloaking elements was suggested in [18, D. Atkins on April 4, 2018], see [16, Proposition 2.3]. We do not consider elements of this type here since they are similar to elements of Proposition 2.1, and cryptanalysis [16] showed they are less secure.

2.6 Braid word obfuscation

An obfuscation procedure R for braids is an algorithm that rewrites a braid word w into a braid word R(w) satisfying w =Bn R(w). The main goal of an obfuscation procedure is to modify and hide information in the public keys generated by Alice and Bob. There are several methods suggested in [13].

  1. Stochastic rewriting process described in [13, Section 7].

  2. Dehornoy form [24].

  3. BKL normal forms [25].

  4. Garside normal forms [26, Chapter 9].

BKL normal forms and Garside normal forms provide a unique form for a given braid (i.e., if u = v in Bn, then their normal forms are the same) and, hence, are the strongest possible obfuscation algorithms for braids.

3 Kayawood protocol

Kayawood protocol is a two-party, Alice and Bob, key-agreement protocol that uses E-multiplication defined in Section 2.4. The following initial public information is generated by one of the parties or by another entity (and distributed to each party):

  1. The braid group Bn, where n ≥ 16 is even.

  2. Obfuscation procedures R.

  3. A finite field 𝔽q.

  4. Integers a and b satisfying 1 ≤ a < bn.

  5. Non-zero elements τ1, . . . , τn ∈ 𝔽q such that τa = τb = 1.

Then Alice generates the following private data:

  1. β1, . . . , βrUn = 〈xm+1, . . . , xn−1〉 such that σβ1,,σβr have high order. Recall that m= n2 .

  2. zBn such that |σz({1, . . . , m}) ∩ {1, . . . , m}| ≈ m/2.

  3. Her private key is A = zαz−1, where αLn = 〈x1, . . . , xm−1〉.

Key establishment:

  1. Alice sends to Bob {𝓡(1z−1), . . . , 𝓡(rz−1)} and σA.

  2. Bob performs the following:

    1. Generates his private key B as a random product of elements 𝓡(1z−1), . . . , 𝓡(rz−1) and their inverses.

    2. Generates random v1, v2Bn cloaking σA and σAσB respectively.

    3. Sends his public key PB = 𝓡(v1Bv2) to Alice.

  3. Alice performs the following:

    1. Computes σB = σPB.

    2. Generates random u1, u2Bn cloaking σB and σBσA respectively.

    3. Sends her public key PA = 𝓡(u1Au2) to Bob.

  4. Finally, the shared key is

(I,1)AB

computed by Alice as (I, 1) * A * PB and by Bob as (I, 1) * B * PA.

We say that a protocol is secure against a passive eavesdropper if there is no probabilistic polynomial time algorithm that can compute the shared key (I, 1) * A * B based on the public information exchanged by the parties, namely:

n , q , a , b , τ 1 , , τ n , R z β 1 z 1 , , R z β r z 1 , P A , P B

The corresponding computational problem can be approached on two different levels: matrices and braids.

4 Finding the shared key using public keys

Testing out our generating procedures, we discovered a very surprising property of random keys. In about 60% of the cases one of the following equalities was satisfied:

(2) (I,1)PAPB=(I,1)APB,
(3) (I,1)PBPA=(I,1)BPA,

i.e., the shared key could be obtained using public keys. After a thorough check of our implementation we realized that our observation is not a result of an error, but a feature of the design of the protocol. We suspect that the authors are unaware of this problem, otherwise it would be mentioned in the description of Kayawood.

Proposition 4.1

Let n ∈ N be even. In the notation of Kayawood protocol:

  1. If σA(a) = a and σA(b) = b, then (3) holds.

  2. If σB(a) = a and σB(b) = b, then (2) holds.

  3. If σz1(a),σz1(b)>n/2, then σA(a) = a and σA(b) = b.

  4. If σz1(a),σz1(b)n/2, then σB(a) = a and σB(b) = b.

  5. Assuming that σzSn has uniform distribution:

Pr[(2) or (3)]n22(n1).

Proof

Observe that (1) and (2) are particular cases of Corollary 2.2. Indeed, if σA(a) = a and σA(b) = b, then C1 = CσA, so PB = v1Bv2B−1B, where v1, Bv2B−1C1. Similarly, (2) holds. Item (3) holds since A = zαz−1 and αLn, so σα acts trivially on n2+1,,n. Similarly, (4) holds since β1, . . . , βrUn. Finally, notice that n22(n1) is the probability that σz1(a),σz1(b){ 1,,n2 } or σz1(a), σz1(b){ n2+1,,n } . Hence (5) holds. □

The lower bound in item (5) of Proposition 4.1 is not very precise as it takes into account only two particular cases for (2) or (3) to be true. Yet, for n = 16, it estimates the chance of (2) or (3) as 46.7% which is relatively close to our observations.

We note that we did not filter cases (1) and (2) of Proposition 4.1 when generating random protocol instances, since they do not affect the behavior of our attack in any way.

5 Passive attack: finding Alice’s private key

In [13, Section 5] the authors show that the problem of computing the shared key based on public data is polynomial-time equivalent to the cloaking problem formulated as follows.

Cloaking problem. Given a braid β = R(v1β0v2),where v1, v2 are cloaking elements for known permutations and β0 is a braid in an unknown subgroup of Bn, find the element (I, id) * β0.

The authors of [13] claim that there is no known approach to the problem and even brute-force enumeration will result in a collection of possible pairs (I, id) * β0 and there is no a priori way to decide which β0 is correct. In this section we show that the last statement is incorrect and reduce security of Kayawood protocol to some clearly stated problem of computational group theory.

Proposition 5.1

Consider PA, PBBn and σA, σBSn as defined in Section 3. Suppose that u1CσB and u2CσBσA satisfy the system:

(4) { [ u1PAu2,zβ1z1 ]=1[ u1PAu2,zβrz1 ]=1

Then the shared key is equal to (I,id)(u1PAu2)PB.

Proof

Straightforward check:

( I , 1 ) u 1 P A u 2 P B = ( I , 1 ) u 1 P A u 2 v 1 1 P B v 2 1 (by definition of  v 1 , v 2 = ( I , 1 ) v 1 1 P B v 2 1 u 1 P A u 2  (since  v 1 1 P B v 2 1 , u 1 P A u 2 = 1 = ( I , 1 ) B u 1 P A u 2  (since  v 1 1 P B v 2 1 = B
=(I,1)BA (by definition of  u1,u2 ).

Observe that [ v11PBv21,u1PAu2 ]=1 since v11PBv21=B is a product of iz−1 and their inverses. □

Proposition 5.1 implies that the element u1PAu2 can be used instead of Alice’s private key in communication with Bob. By definition of P A such u1 and u2 exist, namely u11and u21. Furthermore, the next proposition claims that we may assume u2=1.

Proposition 5.2

If u 1 C σ B a n d u 2 C σ B σ A ,  then

u1Au2=u1Au2A1A,

where u1Au2A1CσB.

Proof

Clearly, (I, id) * B * A * u2 = (I, id) * B * A. Hence, Au2A1CσB.

In other words, multiplying A on the right by an element cloaking σBσA is the same as multiplying A on the left by an element cloaking σB. The same is true if we insert a cloaking element in the middle of A = A 1 A 2 :

A 1 A 2 A 1 u A 2 ,

where u cloaks σBσA1. Insertion of u can be viewed as multiplication of A on the left by an element cloaking σB.

Corollary 5.3

The intersection

(5) CσBPAC(zβ1z1,,zβrz1)

is not empty. Each of its elements plays the role of Alice’s private key.

Proof

Proposition 5.2 implies that CσBPACσBσA=CσBPA, so the intersection (5) satisfies the system (4), and (5) is not empty since it contains A. □

Corollary 5.3 allows us to reformulate the cloaking problem as the following algorithmic question.

Cloaking problem for Alice (CPA). Given braids b1, . . . , br commuting with an unknown braid A, a permutation σB associated with an unknown braid B ∈ 〈b1, . . . , br〉, and a braid PACσBA, find any element in the intersection CσBPAC(b1,,br).

An instance of CPA can be viewed as a tuple

(6) (b1,,br,σB,PA)

satisfying the conditions mentioned in the statement of the problem. A solution for that instance is any element from the intersection

CσBPAC(b1,,br).

This defines the basic idea of our attack: we uncloak Alice’s public key (solving the CPA problem) and obtain a substitute for her private key.

6 Conjugating instances of the cloaking problem: search for the secret conjugator z

In this section we show that design of the Kayawood protocol leaves us some freedom to manipulate with the secret conjugator z efficiently reducing its length to much smaller values (see Tables 1 and 2). We would like to stress from the beginning that it is pointless and impossible to find the exact element z based on the available public data (see Section 6.2), and we never approach that problem. Instead, we are looking for a “sufficiently good” substitute for z.

Table 1

Results for the original versions of the protocol

128-bit 256-bit
Average running time 12 s 40 s
Average |z−1c| 25 34
Original private key recovered 83% 75%
All c−1iz−1c are in generators of Un 95% 91%
c−1zαz−1c is in generators of Ln 71% 81%
Table 2

Results for versions using multiple cloaking elements

128-bit 256-bit
Average running time 14 s 56 s
Average |z−1c| 25 34
Original private key recovered 75% 76%
All c−1iz−1c are in generators of Un 95% 91%
c−1zαz−1c is in generators of Ln 71% 81%

Remark 6.1

The original proposal [13] does not address the importance of the element z, it simply prescribes to use some randomly generated z of length [150, 400]. It is not explained why it is not secure to use z of length, say, 50 (or even 0). The only possible explanation is that the attack [9] (recently improved in [20] for conjugators of length 1000) does not work for elements of length greater than 150. But [9] attempts to solve a different problem, namely, conjugacy separation of braid-tuples modulo Δ2, where Δ2-recovery is the hardest part.

6.1 Conjugating an instance of CPA

Given a CPA instance (6), and conjugating CσBPAC(b1,,br) by some element cBn, we get

c 1 C σ B P A C b 1 , , b r c = c 1 C σ B P A c c 1 C b 1 , , b r c = C σ B σ c c 1 P A c C c 1 b 1 c , , c 1 b r c ,

which proves the following proposition.

Proposition 6.2

ABn is a solution of the instance (b1, . . . , br, σB, PA) if and only if c−1Ac is a solution of the instance (c1b1c,,c1brc,σBσc,c1PAc).

Notice that conjugating the instance

(7) (zβ1z1,,zβrz1,σB,u1zαz1u2)

by c = z produces the instance

(8) (β1,,βr,σBσz,(z1u1z)α(z1u2z))

with (unknown) cloaking elements z−1u1z and z−1u2z. In particular, knowledge of z allows to “drop” it from consideration. Also, observe that α is a solution to the latter instance.

In our experiments we were never able to find the exact z, but we were able to find an element c such that δ = z−1c is a relatively short braid (relative to |z|) in the standard word metric on Bn. Conjugating (7) by c = produces an instance

(9) (δ1β1δ,,δ1βrδ,σBσc,δ1z1u1zαz1u2zδ)

instead of (8). Observe that

  1. the instance (7) has a solution zαz−1.

  2. the instance (9) has a solution δαδ−1, which is much shorter than zαz−1.

Hence, the new instance (9) is more advantageous for a heuristic solver described in Section 7 than the instance (7). Below we describe how we find an appropriate element c such that δ = z−1c is short.

6.2 Heuristic search for z

A part of the public data available to the eavesdropper Eve includes the elements β1,,βr:

{ β1=zβ1z1,βr=zβrz1,

where β1, . . . , βrLn and z are unknown. Based on this data it is impossible to recover the original element z. Even if the elements β1, . . . , βr are given, we can only find z modulo the centralizer of β1, . . . , βr. But, as we mentioned before, it is not our goal to find the exact z. Instead, we attempt to find an element c such that |z−1c| is relatively small. This task is approached heuristically using ideas described in [19] and its advanced version [20].

Below we outline a procedure that for a given tuple (β1,,βr) searches for y that minimizes the total length of the conjugate tuple:

i=1r| y1βiy |min.

The procedure constructs a set of conjugates of the tuple (β1,,βr). Initially, the set contains (β1,,βr) only. On each iteration it chooses an unchecked tuple, let us call it (γ1, . . . , γr), of the least total length and conjugates the tuple by each generator and its inverse x1±1,,xn1±1:

(xi±1γ1xi1,,xi±1γrxi1),

All words are minimized using the braid minimization procedure and new tuples are saved as unchecked conjugates of (β1,,βr). We say that an iteration is successful if the total length of one of the new tuples is less than the total length of any checked tuple. We terminate the procedure after 20 unsuccessful iterations. The output is a checked tuple of the least total length. The described procedure does not fail, but, in principle, it can produce a poor result.

To accelerate convergence to a (local) minimum, we perform the following trick (cf. [20, Section 4.4]). On each iteration, if |γ1| > 50, then we take the initial segment c of γ1 of length 50 and add the tuple (c1γ1c,,c1γrc), with braid-minimized entries, to the set of unchecked tuples. This trick dramatically improves running time of the procedure.

7 Cσ-coset enumeration

One way to find a solution for the instance (6) is to enumerate elements in the coset CσBPA until an element commuting with b1, . . . , br is found. A straightforward approach to coset enumeration requires to find a generating set for the subgroup CσB and enumerate its elements. Instead, we developed a different way to solve (6) that attempts to directly identify and remove cloaking elements from PA. Our algorithm is based on the following rather informally stated observations.

  1. As mentioned in Remark 2.3, the letters xi in the word wxi±2w1 from Proposition 2.1 twist two particular strands σ1(a) and σ1(b).

  2. Replacement wxiεxiεw1wxiεxiεw1, where ε = ±1, produces the trivial braid.

  3. Replacement of a single letter xi±1 that twists strands σ−1(a) and σ−1(b) with xi1 in a braid word w1xi±1w2 corresponds to multiplication of the word on the left by cloaking element w1xi2w11.

  4. Multiplying a braid word with cloaking elements on the left or on the right (or inserting a cloaking element into a random position) usually increases the length of the braid.

  5. Even though obfuscation of a cloaked braid word changes the way the word looks, it preserves the isotopy type of the braid and the result of obfuscation typically twists strands σ−1(a) and σ−1(b) at the crossing corresponding to the middle of wxi±2w1.

  6. By tracing strands in a given braid, we can algorithmically find all letters that twist strands σ−1(a) and σ−1(b). We call those letters critical letters for the corresponding strands.

Recall that we switch from the instance (7) to an instance (9), so we need to enumerate the coset CσBσcc1PAc. Instead of total coset enumeration, our algorithm attempts to decrease the length of the element c−1PAc by flipping powers of the critical letters and applying braid-minimization to the result expecting the length to decrease.

In more detail, the algorithm iteratively constructs a subset of CσBσcc1PA c starting from the set {c−1PAc}. On each iteration it picks a shortest unprocessed word w and performs the following manipulations for each critical letter xi±1 in w that twists strands (σBσc)−1(a) and (σBσc)−1(b):

  1. compute a new word by replacing xi±1 with its inverse xi1;

  2. shorten the obtained braid word using geodesic-braid minimization algorithm;

  3. add the result to the current set.

We say that the algorithm is successful if it finds a word that commutes with δ−1β1δ, . . . , δ−1 βrδ. We admit failure if the algorithm is unable to find such a word, and there is no length decrease on the last 100 iterations.

In case of a failure, we randomly reset the instance. To do that, we choose a shortest word in the set of checked words, cloak it by 3 cloaking elements on the left and on the right respectively, apply the normal form and the braid minimization procedure, and start CσBσcc1PAc enumeration from the resulting braid word. If coset enumeration fails 3 times, we admit failure for the whole attack.

8 Tested parameter values and the results

The paper [13] does not describe the precise procedure to generate cloaking elements from Proposition 2.1, but such a description can be found in [27], see also [16, Section 2]. In particular, for security reasons, the conjugator w in a cloaking element is augmented with L random pure braid generators. Since values of L for 128- and 256-bit security levels are not mentioned in [13], we choose the corresponding values from [27].

For 128-bit security level we use the following parameters:

  1. n = 16.

  2. q = 32.

  3. r = 32.

  4. L = 15.

  5. |B| = 22 (in terms of generators R(1z−1), . . . , R(rz−1)).

  6. |z| ∈ [180, 250], |α| ∈ [300, 400], |βi| ∈ [50, 100].

For 256-bit security level the parameters are:

  1. n = 16.

  2. q = 256.

  3. r = 32.

  4. L = 30.

  5. |B| = 43.

  6. |z| ∈ [300, 400], |α| ∈ [300, 400], |βi| ∈ [100, 200].

As mentioned in Introduction, after a series of attacks on WalnutDSA the authors proposed several changes to the protocol including changes to the cloaking procedure (see [18, D. Atkins on May 23, 2018]). It was suggested to use several cloaking element inserted into the private keys at random positions. We implemented and tested this idea as well. For cloaking elements we use conjugators w of lengths in the range [30, 50] and insert 30 (for 128-bit level) and 60 (for 256-bit level) such cloaking elements into random positions inside private keys. These insertions are made iteratively, so randomly chosen positions may also be inside previously inserted cloaking elements.

Overall, we tested four versions of the Kayawood protocol, two original versions for 128- and 256-bit security levels and two versions using multiple cloaking elements to mask private keys (with the other parameters corresponding to 128- and 256-bit levels). We used Garside normal form followed by the braid minimization reduction to obfuscate iz−1 and stochastic rewriting to obfuscate public keys. For each version of the protocol we performed 100 experiments consisting of the following steps:

  1. Generate a random protocol instance.

  2. Generate random Alice’s private data.

  3. Run key establishment protocol.

  4. Run heuristic search for z as described in Section 6.2.

  5. Run coset enumeration to find a substitute for Alice’s private key as described in Section 7.

Our algorithm solved all randomly generated instances, i.e., our attack had 100% success rate. Moreover, in most cases we found the original private key. Also, we investigated the behavior of heuristic search for z and, for the recovered conjugator c, collected the lengths |z−1c|. For words c−11z−1c, . . . , c−1rz−1c we checked whether they are actually written in the generators of Un, and for c−1zαz−1c we checked whether it is written in the generators of Ln.

All experiments were performed on a machine with two 8-core 3.1 GHz Intel Xeon CPU E5-2687W and 64GB RAM. The results are provided in Tables 1 and 2.

9 Conclusion

Kayawood protocol, described in [13], does not provide the claimed level of security. It suffers from poor choice of cloaking elements. By design, cloaking elements have very specific geometric type defined by a fixed pair of strands that can be algorithmically recognized and removed. Thus, the definition of cloaking elements seems to be the weak part of the protocol. We doubt that security can be improved simply by increasing parameter values. Nevertheless, we believe that stabilizers for E-multiplication have very rich and algebraically interesting structure and using better cloaking elements (not simply conjugates of squares) can make the protocol more secure.



Acknowledgement

Matvei Kotov and Anton Menshov were supported by Mathematical Center in Akademgorodok, the agreement with the Ministry of Science and Higher Education of the Russian Federation number 075-15-2019-1613.

References

[1] K. H. Ko, S. J. Lee, J. H. Cheon, J. W. Han, J. Kang, and C. Park. New public-key cryptosystem using braid groups. In Advances in Cryptology – CRYPTO 2000, volume 1880 of Lecture Notes Comp. Sc., pages 166–183, Berlin, 2000. Springer.10.1007/3-540-44598-6_10Search in Google Scholar

[2] I. Anshel, M. Anshel, and D. Goldfeld. An algebraic method for public-key cryptography. Math. Res. Lett., 6(3-4):287–291, 1999.10.4310/MRL.1999.v6.n3.a3Search in Google Scholar

[3] J. H. Cheon and B. Jun. A polynomial time algorithm for the braid diffie-hellman conjugacy problem. In Advances in Cryptology – CRYPTO 2003, volume 2729 of Lecture Notes Comp. Sc., pages 212–225, Berlin, 2003. Springer.10.1007/978-3-540-45146-4_13Search in Google Scholar

[4] B. Tsaban. Polynomial-Time Solutions of Computational Problems in Noncommutative-Algebraic Cryptography. J. Cryptology, 28:601–622, 2012.10.1007/s00145-013-9170-9Search in Google Scholar

[5] D. Hofheinz and R. Steinwandt. A practical attack on some braid group based cryptographic primitives. In Advances in Cryptology – PKC 2003, volume 2567 of Lecture Notes Comp. Sc., pages 187–198, Berlin, 2003. Springer.10.1007/3-540-36288-6_14Search in Google Scholar

[6] D. Garber, S. Kaplan, M. Teicher, B. Tsaban, and U. Vishne. Length-based conjugacy search in the braid group. In Algebraic Methods in Cryptography, volume 418 of Contemp. Math., pages 75–88. Amer. Math. Soc., 2006.10.1090/conm/418/07947Search in Google Scholar

[7] A. G. Miasnikov, V. Shpilrain, and A. Ushakov. A practical attack on some braid group based cryptographic protocols. In Advances in Cryptology – CRYPTO 2005, volume 3621 of Lecture Notes Comp. Sc., pages 86–96, Berlin, 2005. Springer.10.1007/11535218_6Search in Google Scholar

[8] A. G. Miasnikov, V. Shpilrain, and A. Ushakov. Random subgroups of braid groups: an approach to cryptanalysis of a braid group based cryptographic protocol. In Advances in Cryptology – PKC 2006, volume 3958 of Lecture Notes Comp. Sc., pages 302–314, Berlin, 2006. Springer.10.1007/11745853_20Search in Google Scholar

[9] A. D. Myasnikov and A. Ushakov. Length based attack and braid groups: Cryptanalysis of Anshel-Anshel-Goldfeld key exchange protocol. In Advances in Cryptology – PKC 2007, volume 4450 of Lecture Notes Comp. Sc., pages 76–88. Springer, 2007.10.1007/978-3-540-71677-8_6Search in Google Scholar

[10] I. Anshel, M. Anshel, D. Goldfeld, and S. Lemieux. Key agreement, the algebraic eraserTM and lightweight cryptography. In Algebraic Methods in Cryptography, volume 418 of Contemporary Mathematics, pages 1–34. American Mathematical Society, 2006.10.1090/conm/418/07943Search in Google Scholar

[11] I. Anshel, D. Atkins, and P. Goldfeld, D. Gunnels. WalnutDSA(TM): A Quantum-Resistant Digital Signature Algorithm. Preprint. Available at https://eprint.iacr.org/2017/058 2017.Search in Google Scholar

[12] I. Anshel, D. Atkins, and P. Goldfeld, D. Gunnels. Ironwood Meta Key Agreement and Authentication Protocol. Preprint. Available at https://arxiv.org/abs/1702.02450 2017.Search in Google Scholar

[13] I. Anshel, D. Atkins, and P. Goldfeld, D. Gunnels. Kayawood, a Key Agreement Protocol. Preprint. Available at https://eprint.iacr.org/2017/1162 2017.Search in Google Scholar

[14] D. Hart, D. Kim, G. Micheli, G. P. Perez, C. Petit, and Y. Quek. A Practical Cryptanalysis ofWalnutDSA. In Public-Key Cryptography – PKC 2018, pages 381–406. Springer International Publishing, 2018.10.1007/978-3-319-76578-5_13Search in Google Scholar

[15] W. Beullens and S. Blackburn. Practical attacks against the walnut digital signature scheme. In Advances in Cryptology – ASIACRYPT 2018, volume 11272 of Lecture Notes in Computer Science, pages 35–61. Springer, 2018.10.1007/978-3-030-03326-2_2Search in Google Scholar

[16] M. Kotov, A. Menshov, and A. Ushakov. An attack on the walnut digital signature algorithm. Designs, Codes and Cryptography, 87(10):2231–2250, 2019.10.1007/s10623-019-00615-ySearch in Google Scholar

[17] S. Merz and C. Petit. Factoring products of braids via garside normal form. In Public-Key Cryptography – PKC 2019, volume 11443 of Lecture Notes in Computer Science, pages 646–678. Springer, 2019.10.1007/978-3-030-17259-6_22Search in Google Scholar

[18] NIST PQC forum. Available at https://groups.google.com/a/list.nist.gov/forum/#!forum/pqc-forum accessed: June 10, 2018.Search in Google Scholar

[19] A. D. Myasnikov and A. Ushakov. Cryptanalysis of Anshel-Anshel-Goldfeld-Lemieux key agreement protocol. Groups Complex. Cryptol., 1:263–275, 2009.10.1515/GCC.2009.63Search in Google Scholar

[20] M. Kotov, A. Menshov, A. Myasnikov, Panteleev. D., and A. Ushakov. Conjugacy separation problem in braids: an attack on the original Colored Burau key agreement protocol. Available at https://eprint.iacr.org/2018/491Search in Google Scholar

[21] CRyptography And Groups (CRAG) C++ Library. Available at https://github.com/stevens-crag/cragSearch in Google Scholar

[22] A. G. Miasnikov, V. Shpilrain, and A. Ushakov. Non-Commutative Cryptography and Complexity of Group-Theoretic Problems. Mathematical Surveys and Monographs. AMS, 2011.10.1090/surv/177Search in Google Scholar

[23] M. Paterson and A. Razborov. The set of minimal braids is co-NP-complete. J. Algorithms, 12:393–408, 1991.10.1016/0196-6774(91)90011-MSearch in Google Scholar

[24] P. Dehornoy. A fast method for comparing braids. Adv. Math., 125:200–235, 1997.10.1006/aima.1997.1605Search in Google Scholar

[25] J. S. Birman, K. H. Ko, and S. J. Lee. A new approach to the word and conjugacy problems in the braid groups. Adv. Math., 139:322–353, 1998.10.1006/aima.1998.1761Search in Google Scholar

[26] D. B. A. Epstein, J. W. Cannon, D. F. Holt, S. V. F. Levy, M. S. Paterson, and W. P. Thurston. Word processing in groups. Jones and Bartlett Publishers, 1992.10.1201/9781439865699Search in Google Scholar

[27] I. Anshel, D. Atkins, and P. Goldfeld, D. Gunnels. The Walnut digital signature algorithm(TM) specification. Submitted to NIST PQC project (2017). Available at https://csrc.nist.gov/projects/post-quantum-cryptography/round-1-submissions accessed: June 10, 2018.Search in Google Scholar

Received: 2019-04-26
Accepted: 2020-03-04
Published Online: 2020-12-01

© 2020 M. Kotov et al., published by De Gruyter

This work is licensed under the Creative Commons Attribution 4.0 International License.

Articles in the same Issue

  1. Regular Articles
  2. Secret sharing and duality
  3. On the condition number of the Vandermonde matrix of the nth cyclotomic polynomial
  4. On the equivalence of authentication codes and robust (2, 2)-threshold schemes
  5. Pseudo-free families of computational universal algebras
  6. Lattice Sieving in Three Dimensions for Discrete Log in Medium Characteristic
  7. Attack on Kayawood protocol: uncloaking private keys
  8. The circulant hash revisited
  9. On cryptographic properties of (n + 1)-bit S-boxes constructed by known n-bit S-boxes
  10. Improved cryptanalysis of a ElGamal Cryptosystem Based on Matrices Over Group Rings
  11. Remarks on a Tropical Key Exchange System
  12. A note on secure multiparty computation via higher residue symbols
  13. Using Inclusion / Exclusion to find Bent and Balanced Monomial Rotation Symmetric Functions
  14. The Oribatida v1.3 Family of Lightweight Authenticated Encryption Schemes
  15. Isogenies on twisted Hessian curves
  16. Quantum algorithms for computing general discrete logarithms and orders with tradeoffs
  17. Stochastic methods defeat regular RSA exponentiation algorithms with combined blinding methods
  18. Sensitivities and block sensitivities of elementary symmetric Boolean functions
  19. Constructing Cycles in Isogeny Graphs of Supersingular Elliptic Curves
  20. Revocable attribute-based proxy re-encryption
  21. MathCrypt 2019
  22. Editor’s Preface for the Second Annual MathCrypt Proceedings Volume
  23. A trade-off between classical and quantum circuit size for an attack against CSIDH
  24. Towards Isogeny-Based Password-Authenticated Key Establishment
  25. Algebraic approaches for solving isogeny problems of prime power degrees
  26. Discretisation and Product Distributions in Ring-LWE
  27. Approximate Voronoi cells for lattices, revisited
  28. (In)Security of Ring-LWE Under Partial Key Exposure
  29. Towards a Ring Analogue of the Leftover Hash Lemma
  30. The Eleventh Power Residue Symbol
  31. Factoring with Hints
  32. One Bit is All It Takes: A Devastating Timing Attack on BLISS’s Non-Constant Time Sign Flips
  33. A framework for reducing the overhead of the quantum oracle for use with Grover’s algorithm with applications to cryptanalysis of SIKE
Downloaded on 27.12.2025 from https://www.degruyterbrill.com/document/doi/10.1515/jmc-2019-0015/html
Scroll to top button