5.1. Factoring Attacks
The essential idea behind these attacks is to forge a signature for any given message m solving a factorization problem in groups, defined as follows:
Definition 7 (Factorization problem in groups)
. Let G be a group; let be a generating set for G; and let . Find an integer L and sequences and such that: A solution to a specific instance of this problem has been exploited by several authors [
19,
20] to construct a new valid signature from several valid signatures, in order to violate UF-CMA. More precisely, Hart et al. presented in [
19] an efficient method to compute, given a couple of signatures on random messages, a new signature on an arbitrary message. However, these forged signatures were significantly longer than those constructed by the honest signer. The design of
WalnutDSA was modified by the authors in order to defeat this attack, yet a refinement of this method, presented in Section 3 of [
20], rendered this modification insufficient.
5.1.1. Factoring For Universal Forgeries: The Attacks by Hart Et Al., and Beullens and Blackburn
The strategy behind [
19] allows for constructing a valid signature for any arbitrary message
m (and is thus a universal forgery). More precisely, Proposition 4 in [
19] states that, given a finite set of signatures:
and taking
as the matrix part of
for all
it holds that, if the matrix part
h of
can be factored with respect to the generating set
then constructing the very same
word replacing each
with the corresponding braids
from
yields a valid signature for
Beullens and Blackburn explained how to exploit this malleability property through the following simple theorem:
Theorem 1 (Theorem 1 from [
20])
. Consider the version of WalnutDSA, where it holds that Suppose m, , are three messages. Let h, , be the matrix part of , , , respectively. Then,- 1.
If and is a valid signature for , then is a valid signature for m.
- 2.
If and , are valid signatures for and , respectively, then is a valid signature for m.
However, the above result is only valid if the public braids
and
coincide, which was only the case in the first versions of the proposal [
11]. All in all, a simple variant of the above theorem, presented in [
20], evidences that choosing
does not amend the strong malleability inherent to
WalnutDSA:
Theorem 2 ([
20])
. Suppose m, , are three messages. Let h, , be the matrix part of , , , respectively. Let , , be three braids. Then,- 1.
If and is a valid signature for under the public key , then is a valid signature for m under the public key .
- 2.
If and are valid signatures for and under the public keys and , respectively, then is a valid signature for m under the public key .
Note that the above theorems do not impose a practical restriction on the forged message m, for suitable can be constructed for any m in order to mount the UF attack. Still, the forged signatures obtained through these factoring strategies are many orders of magnitude longer than legitimate signatures; thus, imposing length limits on the output signatures (as the authors did in the implementation submitted to the NIST PQCstandardization call) is enough to dodge these attacks.
5.1.2. Factoring Using the Garside Normal Form
Recently, in [
21], it was noticed that whenever a product of braids
is represented in the Garside normal form, parts of the corresponding form of the individual factors
, and
C are somewhat easy to extract. In particular, the authors of this paper presented an algorithm for recovering, given
B, elements
and
such that:
Note that the center of the group
is a cyclic group generated by the square of the so-called
Garside’s fundamental braid, which is the only positive braid for which any two strands cross exactly once (see [
14,
22] for a classical introduction and a comprehensive survey on braid groups). This decomposition strategy allows for constructing a universal forgery, as stated in the following result:
Theorem 3 ([
21])
. Let be a valid signature for some message m, and let , such that , , and . Then,is a valid signature for any message . Note that since the replaced braids and are in principle independent of the message the forged signature need not be longer than a legitimate signature. Furthermore, the complexity of this procedure is essentially that of computing Garside normal forms, which can be done in time , where k is the number of Artin generators encoding the input braid.
Furthermore, this method fends off the colored Burau representation used in the implementation of
WalnutDSA; thus, it cannot be prevented by modifying the size of the underlying finite field. The authors of this cryptanalysis suggest that the only way to dodge this attack is to add many concealed cloaking elements to the encoding, which has a significant cost both in signature length and computing time for the generation of signatures. Furthermore, in [
23], the authors of the scheme claimed to have experimentally demonstrated that inserting cloaking elements every 7–12 generators into the braid
blocked this attack. However, no details were given on how this strategy was theoretically or empirically assessed.
5.2. Collision Attacks
Imposing implicit limits on the output signature sizes is indeed a valid strategy for preventing factoring attacks, and so, it was promptly noticed by the authors of
WalnutDSA. However, in Section 4 of [
20], it was demonstrated that, through a simple collision method, it was possible to compute
short forged signatures, yet not on arbitrary messages.
In Section 4 of [
20], it was observed that if there exist two messages
,
such that
, then a valid signature for
is valid for
and vice versa. Breaking the EUF-CMA security notion (see Definition 4) is as simple as finding such two messages
and
, since an adversary could query a signature for
and then obtain a signature for
.
A generic collision attack is expected to require evaluations of function . In order to evaluate the feasibility of this attack, it is necessary to estimate the size of . The authors of WalnutDSA considered a conservative lower bound for values of . For 128-bit and 256-bit security levels, these values were and , respectively, so it is expected to find a collision after and evaluations of . Hence, a generic collision attack is not practical.
In [
20], it was shown (by means of computer experiments) that
is at most
(lying in an affine subspace over
), so a collision is expected to be found after
evaluations of
. With this new estimate,
and
evaluations of
are necessary for 128-bit and 256-bit security levels, respectively. Therefore, collision attack is practical in this case.
In order to implement this attack, the authors used a generic collision finding algorithm: the distinguished point algorithm of Van Oorschot and Wiener [
24].
This algorithm finds collisions in any function
that behaves like a random function [
24]. The time complexity for finding a single collision is
. A distinguished point is an element of
S satisfying some easily testable property (e.g., a fixed number of leading zero bits). The distinguished point algorithm selects a starting point
at random and produces a chain of points
for
, until a distinguished point is reached. Then, the starting point
, the distinguished point
, and the length of the chain are stored. It is expected that after
, the current chain will collide with one of the stored chains. Following the chain from that point, the same distinguished point will be reached.
In [
20], this algorithm was applied to the function
instead of to
, where
g is a function that crafts plausible messages, given an output of
. However, no implementation or description of how to build the function
g was provided.
Using a standard PC, the algorithm found a collision after
evaluations of
f (
evaluations were expected). This took approximately one hour. The two messages found by the algorithm were
In order to mitigate this practical attack, Beullens and Blackburn [
20] recommended to increase the value of
q up to
and
to accomplish 128-bit and 256-bit security levels, respectively. With these new parameters, the size of the public key is five-times larger and the verification algorithm is 25-times slower for 256 bit.
A better mitigation of this attack is to change the encoding algorithm to output pure braids not restricted to the subgroup generated by
,
,
, and
. This change would require
evaluations of
, and only a minor increase of parameters is needed. It was pointed out in [
20] that a 256-bit security level could be accomplished by setting
and
, making the key size 50%, the signature size 25% larger, and the verification algorithm two-times slower.
The authors of
WalnutDSA pointed out that any braid output by the encoding mechanism
E (see
Section 4.1.2) is a product of the image (under
) of the encoding braids used, and thus, it is essential that the subspace spanned by said images is sufficiently large [
23]. They further depicted two design strategies towards defeating this attack (see
Table 1).
5.3. Reversing E-Multiplication
A fundamental hard problem underlying the security of the
Walnut signature scheme is to break the one-wayness of the function:
Here, we write
instead of
with the understanding that the set
of non-zero elements is arbitrary, but fixed.
More precisely, the underlying problem is defined as follows.
Definition 8 (Reversing E-Multiplication (REM) problem [
20])
. Given a pair , such that for some braid , find a braid such that . Observe that if brute force is used to solve the REM problem, then it would take E-multiplications to find a solution, where is the size of the orbit of .
Recall that the private key consists of two braids
, and the corresponding public key consists of
and
, the matrix component of
. In [
20], it was observed that a valid signature
for a message
m also satisfies:
Therefore, not knowing the permutation component of
poses no problem to the attacker since it can be recovered from the permutation component of (
3) without necessarily knowing the encrypted message (no message attack). Indeed, since cloaking elements and
are required to be pure braids, we have:
Once
has been computed, an attacker can solve two instances of the REM problem by finding two braids
such that
and
, which can be used to sign any message (universal forgery). Hence, solving the REM problem means that UF-NMA security (Definition 2) can be violated.
In this section, we describe two algorithms proposed in [
20] that solve the REM problem. The first algorithm is a generic birthday attack, while the second exploits the structure of the braid group
and is more efficient than the first one.
5.3.1. Generic Birthday Attack
Given a pair
, if we can find two braids
such that:
then the solution of the REM problem is
. In [
20], it was argued that a naive way of finding
and
by constructing tables with values
and checking if
for random
lying in the table would take
E-multiplications, making this method more efficient than a brute force approach. Nevertheless, a naive approach may require too much storage memory.
This inconvenience can be circumvented by using a distinguished point algorithm (see
Section 5.2). In this case, the algorithm is applied to the function:
where
and
are hash functions that take elements in the orbit of
as input and output a bit or a braid, respectively.
The idea is to find collisions:
Hence, if a collision is found such that
, then
and
. In this case, a solution of the REM problem is
. On the other hand, if
, then a solution of the REM problem is
.
As noted in [
23], this attack is exponential in running time and can be thwarted by choosing the correct parameters for
WalnutDSA, in this case
,
for 128-bit security, and
,
for 256-bit security.
5.3.2. Subgroup Chain Attack
This attack exploits the fact that the restriction of
to pure braids is a group homomorphism, which maps the chain of subgroups:
to a nice chain of subgroups of
. Here,
denotes the intersection of the subgroup of pure braids in
and the subgroup generated by
, that is the subgroup of pure braids such that only the first
k strands cross over each other. More precisely, for each
,
is a homomorphism from
into the subgroup:
In contrast to the birthday attack, this method solves the REM problem for a pair
, by finding in iterative steps a braid
such that
, as follows. First, choose any braid
such that
. Therefore,
. Next, find a pure braid
such that
. The iterative step consists of randomly choosing a target matrix
and then finding a pure braid
such that:
Notice that in each iterative step, the permutation component is
since
is a pure braid, and thus,
. This process yields a braid
such that
. Then, the solution to the REM problem is
.
In [
20], it was pointed out that if
for some
, then it is not possible to complete the attack, and thus, assuming:
for each
, guarantees that the attack will work. This assumption is not too restrictive since it seems to hold for the proposed parameters for
WalnutDSA. With (
4) in mind, the
iterative step of this attack can be solved by performing a collision search in the space cosets of
in
with a cost of
E-multiplications (see Sections 5.2 and 5.3 of [
20] for details).
In [
20], the running time of this attack was estimated to be
whenever E-multiplication uses the set of invertible elements
with
for some
(see
Section 4.2.2). It was noted in [
23] that if
and
are chosen such that
, then the running time of the attack is increased to at least
, where
for
and
for
. Moreover, this attack is defeated by taking
,
for 128-bit security, and
,
for 256-bit security.
5.4. Uncloaking Signatures
Kotov, Menshov, and Ushakov presented in [
25] a powerful attack against
WalnutDSA. It is a heuristic attack that works exclusively with braids and does not need to take into account E-multiplication. The authors reported experiments with one hundred random protocol instances with a 100% success rate. It is worth pointing out that the experiments were carried out for three different settings: the 128 and 256-bit security levels from the official specification [
26] (where
) and the 256-bit security version with
, proposed in [
27].
In a nutshell, the attack works as follows: An adversary, which collects several arbitrary pairs of messages and valid signatures, is able to compute an alternative secret key such that, when used to sign any message, it produces the same signature as the real secret key. Therefore, this is a very strong attack as it violates a rather weak security notion for signatures (UF-RMA; see Definition 3), that is an adversary with access to signatures for random messages (not adversarially chosen) can produce a valid signature for any message of its choice; that is, it achieves a universal forgery.
Next, we provide a high-level description of the attack:
Step 1. The attacker collects
k pairs
where each
is a valid signature for
computed with the same secret key
. Each signature is a braid with the form:
where
are cloaking elements.
Step 2. The attacker, using a heuristic procedure described in [
25], is able to remove the cloaking elements from the signatures, that is compute braids
. It is worth pointing out that Kotov, Menshov, and Ushakov reported a high success rate for their uncloaking algorithm, close to 80% or 100%, depending on the type of cloaking elements used (see
Table 2).
Step 3. The attacker computes the
products
. Note that these are:
obtaining a system of conjugacy equations in
where only
is unknown. In [
25], another heuristic algorithm to obtain a solution
of the system (not necessarily equal to
) was developed.
Step 4. The attacker sets for i of its choice. Under certain conditions, works as an alternative secret key to , in the sense that it produces a valid signature for any message. Moreover, as a braid word, this signature equals the one produced with the original key. This implies that the attack cannot be avoided by limiting the size of accepted signatures. In order to decide if the alternative key works as intended, Kotov, Menshov, and Ushakov generated signatures for 10 random messages and checked their validity.
In [
25], a 100% success rate of the full attack was reported. One interesting fact is that the attack did not need many message/signature pairs in order to succeed: Kotov, Menshov, and Ushakov affirmed that, in all their experiments, six successfully uncloaked signatures were enough to get five conjugacy equations and a valid alternative secret key. Average running times for the full attack are shown in
Table 3.
With respect to possible countermeasures against their attack, Kotov, Menshov, and Ushakov themselves made several proposals. The first one is to artificially introduce many so-called
critical letters in the secret braids (locating critical letters is one of the main ingredients in the uncloaking algorithm). In addition, they proposed using many more cloaking elements (around 30) on each side of the signature. Nevertheless, they pointed out that it is not even clear if this measure would be useful as it does not neutralize their attack [
28] against Kayawood [
29], another braid-based protocol. Finally, Kotov et al. recommended short conjugators for constructing cloaking elements, making them less visible.
The proponents of
WalnutDSA recognize the weakness of their original implementation against the uncloaking attack and put forward in [
23] a countermeasure against it. Namely, they introduced the concept of concealed cloaking elements and proposed to add six of them to the computation of each signature, which translated into a 6.7% increase of the signature size. Kotov, Menshov, and Ushakov questioned the effectiveness of the approach in the NIST PQC project discussion forum [
27], pointing out that their algorithms were designed taking into account the existence of precisely three cloaking elements, but could be modified to deal with more of them.