We have run CAT to obtain high-assurance predictions for the cost of
various non-quasi-cyclic ISD attacks against the following parameters:
* (24646,134), as in attacking BIKE-1 messages.
* (24646,142), as in attacking BIKE-1 keys.
* (35338,132), as in attacking HQC128.
In particular, CAT predicts the following costs (and CAT's search for
attack parameters did not find any lower costs for these attacks), all
measured in CAT's fully defined model of bit operations:
* (24646,134): 2^153.46 for isd2 with p'=2, p''=1, C=0.
* (24646,142): 2^161.22 for isd2 with p'=2, p''=1, C=0.
* (35338,132): 2^152.39 for isd2 with p'=2, p''=1, C=1.
These numbers differ somewhat from the estimates in previous literature.
The rest of this message analyzes the differences and explains how to
reproduce CAT's numbers.
1. Comparison to previous estimates
Qualitatively, one expects CAT's ISD numbers to be different from
pre-CAT estimates for the following reasons:
* CAT's numbers account for all steps in ISD, for all bit operations
in each step, and for various probability-analysis issues that are
usually neglected. In general, pre-CAT estimates should simply be
discarded once numbers from CAT are available for the same attacks.
* As noted above, CAT's numbers are for attacks without quasi-cyclic
speedups. The literature estimates that those speedups save nearly
14 bits for BIKE-1 key recovery, and between 6 and 9 bits in the
other cases.
It would be interesting to include quasi-cyclic speedups in CAT,
obtaining high assurance for the result of those speedups. One source of
quasi-cyclic speedups is having multiple targets, but it would also be
interesting to investigate speedups from replacing matrix operations
with polynomial operations.
_If_ the actual quasi-cyclic speedups match the literature's estimates
then the resulting attacks against BIKE-1 and HQC128 are
* more expensive than AES-128 brute-force search, but
* less expensive than 2^150 bit operations, the cost of attacks
against mceliece348864 messages.
This last conclusion is contrary to claims in papers at PKC 2022 and
Eurocrypt 2022, namely that BIKE-1 and HQC128 had >10 bits of extra
security compared to mceliece348864 when quasi-cyclic speedups were
ignored (e.g., 2^153 for BIKE-1 vs. 2^141), and still 4 or 5 bits of
extra security considering quasi-cyclic speedups (e.g., 2^146 for BIKE-1
vs. 2^141), also affecting precise comparisons to AES. Here are some
reasons for discrepancies:
* Those papers underestimated the number of bit operations used in
sorting. (See Appendix J.9 of the CAT paper for details.) This
tilted the comparisons between ISD and AES.
* Those papers missed various linear-algebra speedups that CAT
includes. This tilted the ISD comparisons between different
parameter sets: the linear-algebra speedups have more impact when
p' is smaller and n is larger, the situation for BIKE and HQC.
The PKC 2022 paper said that "to keep the analysis and formulas
comprehensible" it avoids optimizing linear algebra. The paper did not
observe that this omission tilts the resulting comparisons; the paper
even seems to claim the contrary ("for more recent ISD algorithms the
complexity of the Gaussian elimination procedure does not dominate").
The Eurocrypt 2022 paper similarly claimed that "modern ISD" was
"enumeration-dominated" rather than "permutation-dominated".
2. Reproducing the CAT numbers for specific attack parameters
Here is how to reproduce the numbers 2^153.46, 2^161.22, 2^152.39 above
for specific attack parameters. First download and unpack CAT:
wget
https://cat.cr.yp.to/cryptattacktester-20231020.tar.gz
tar -xf cryptattacktester-20231020.tar.gz
cd cryptattacktester-20231020
Then edit uniformmatrix.cpp as follows:
* After the line saying "while (q < N) { ++lgq; q *= 2; }", add
"bigint K = N/2; if (!selection_allows(S,"K",K.get_str())) continue;"
* Remove four lines from "bigint K = N-lgq*W;" through
"if (!selection_allows(S,"K",K.get_str())) continue;".
Then compile:
make -j8
Then run the following (this takes a few minutes):
./predictedcp N=24646 W=134 \
attack=isd2 PI=2 PIJ=1 CP=1 CS=0 FW=1 \
I=137438953472 RE=2097152 X=96 YX=44 L0=10 L1=34 \
D=90 Z=0 QU0=7 QF0=4 WI0=14 QU1=1 QF1=131072 WI1=1
./predictedcp N=24646 W=142 \
attack=isd2 PI=2 PIJ=1 CP=1 CS=0 FW=1 \
I=137438953472 RE=2097152 X=96 YX=44 L0=10 L1=34 \
D=90 Z=0 QU0=7 QF0=4 WI0=14 QU1=1 QF1=131072 WI1=1
./predictedcp N=35338 W=132 \
attack=isd2 PI=2 PIJ=1 CP=0 CS=1 FW=1 \
I=274877906944 RE=4194304 X=128 YX=46 L0=10 L1=36 \
D=85 Z=0 QU0=8 QF0=4 WI0=19 QU1=1 QF1=294912 WI1=1
The output is as follows:
predictedcp problem=uniformmatrix N=24646,K=12323,W=134 attack=isd2
I=137438953472,RE=2097152,X=96,YX=44,PIJ=1,PI=2,L0=10,L1=34,CP=1,CS=0,D=90,Z=0,QU0=7,QF0=4,WI0=14,QU1=1,QF1=131072,WI1=1,FW=1
lgratio [153.459967,153.459968]
lgratio2 [153.459967,153.459968]
cost 52628388475214842007709 lgcost [75.4782593,75.4782594]
prob [3.35093939e-24,3.3509394e-24] lgprob [-77.9817087,-77.9817086]
prob2 [3.35093939e-24,3.3509394e-24] lgprob2 [-77.9817087,-77.9817086]
predictedcp problem=uniformmatrix N=24646,K=12323,W=142 attack=isd2
I=137438953472,RE=2097152,X=96,YX=44,PIJ=1,PI=2,L0=10,L1=34,CP=1,CS=0,D=90,Z=0,QU0=7,QF0=4,WI0=14,QU1=1,QF1=131072,WI1=1,FW=1
lgratio [161.216353,161.216354]
lgratio2 [161.216353,161.216354]
cost 52628388475214842007709 lgcost [75.4782593,75.4782594]
prob [1.54975063e-26,1.54975064e-26] lgprob [-85.7380944,-85.7380943]
prob2 [1.54975063e-26,1.54975064e-26] lgprob2 [-85.7380944,-85.7380943]
predictedcp problem=uniformmatrix N=35338,K=17669,W=132 attack=isd2
I=274877906944,RE=4194304,X=128,YX=46,PIJ=1,PI=2,L0=10,L1=36,CP=0,CS=1,D=85,Z=0,QU0=8,QF0=4,WI0=19,QU1=1,QF1=294912,WI1=1,FW=1
lgratio [152.391459,152.39146]
lgratio2 [152.391459,152.39146]
cost 222803032906266248103186 lgcost [77.560115,77.5601151]
prob [2.97523076e-23,2.97523077e-23] lgprob [-74.8313447,-74.8313446]
prob2 [2.97523076e-23,2.97523077e-23] lgprob2 [-74.8313447,-74.8313446]
The "lgratio" entries show CAT's prediction for log_2(cost/probability).
3. Reproducing the CAT search for attack parameters
To reproduce the search that found the attack parameters shown above,
start with the same steps to download CAT, edit uniformmatrix.cpp, etc.
Then edit the list of problems and attacks in isdpredict1.py as follows:
problems = (
'N=24646,W=134',
'N=24646,W=142',
'N=35338,W=132',
)
attacks = (
'attack=isd0,P=0,L=0,FW=1',
'attack=isd0,P=1,L=0,FW=1',
'attack=isd0,P=2,L=0,FW=1',
'attack=isd0,P=3,L=0,FW=1',
'attack=isd0,P=4,L=0,FW=1',
'attack=isd0,P=1,FW=1',
'attack=isd0,P=2,FW=1',
'attack=isd0,P=3,FW=1',
'attack=isd0,P=4,FW=1',
'attack=isd1,PI=1,FW=1',
'attack=isd1,PI=2,FW=1',
'attack=isd1,PI=3,FW=1',
'attack=isd1,PI=4,FW=1',
'attack=isd1,PI=5,FW=1',
'attack=isd1,PI=6,FW=1',
'attack=isd2,PI=2,PIJ=1,CP=1,CS=0,FW=1',
'attack=isd2,PI=4,PIJ=2,CP=1,CS=0,FW=1',
'attack=isd2,PI=6,PIJ=3,CP=1,CS=0,FW=1',
'attack=isd2,PI=8,PIJ=4,CP=1,CS=0,FW=1',
'attack=isd2,PI=10,PIJ=5,CP=1,CS=0,FW=1',
'attack=isd2,PI=12,PIJ=6,CP=1,CS=0,FW=1',
'attack=isd2,PI=2,PIJ=2,CP=1,CS=0,FW=1',
'attack=isd2,PI=4,PIJ=3,CP=1,CS=0,FW=1',
'attack=isd2,PI=6,PIJ=4,CP=1,CS=0,FW=1',
'attack=isd2,PI=8,PIJ=5,CP=1,CS=0,FW=1',
'attack=isd2,PI=10,PIJ=6,CP=1,CS=0,FW=1',
'attack=isd2,PI=2,PIJ=1,CP=0,CS=1,FW=1',
'attack=isd2,PI=4,PIJ=2,CP=0,CS=1,FW=1',
'attack=isd2,PI=6,PIJ=3,CP=0,CS=1,FW=1',
'attack=isd2,PI=8,PIJ=4,CP=0,CS=1,FW=1',
'attack=isd2,PI=10,PIJ=5,CP=0,CS=1,FW=1',
'attack=isd2,PI=12,PIJ=6,CP=0,CS=1,FW=1',
)
Then run the parameter search (this took 2487 minutes real time on a
dual EPYC 7742 with overclocking disabled):
./isdpredict1.py > isdpredict1.out
./isdpredict2.py < isdpredict1.out > isdpredict2.out
./isdpredict-table.py < isdpredict2.out > isdpredict.tex
Copies of the output files are available here:
https://cat.cr.yp.to/isdpredict1-bikehqc-20240908.out.gz
https://cat.cr.yp.to/isdpredict2-bikehqc-20240908.out.gz
https://cat.cr.yp.to/isdpredict-bikehqc-20240908.tex
The lowest costs found are marked in blue in isdpredict.tex, and full
details of the attack parameters are in isdpredict2.out.
---D. J. Bernstein (on behalf of the CryptAttackTester team)