This repository accompanies the paper Exploring the Six Worlds of Gröbner Basis Cryptanalysis: Application to Anemoi. It contains the code used to generate the models, create Magma scripts, and evaluate results.
Overview and evaluation of results: results.ipynb
Other important files:
-
anemoi.sage
: Implementation of Anemoi, following the one provided by the authors here. -
attack.sage
: Attack script calling Magma functions.- Parsing log output from attack:
parseResults.sage
(saves toresults_Fp.sobj
andresults_F2n.sobj
)
- Parsing log output from attack:
-
constants.py
: Relevant constants, such as large named primes. -
models.sage
: Implementation of the algebraic models$F_{CICO}$ and$P_{CICO}$ and 3 variable orderings for every model.- File for testing model implementation:
models_poc.ipynb
- File for testing model implementation:
-
SystemAnalysis.sage
: Bézout bound, multihomogeneous Bézout bound, etc. -
modelBounds.sage
: All derived formulas for theoretical bounds and experimental conjectures.
For specifications and constraints, see Anemoi paper, page 10.
Prime | ||||||
---|---|---|---|---|---|---|
65537 = 0x10001 | yes | yes | yes | yes | yes | |
4294967087 = 0xffffff2f | yes | yes | yes | yes | yes | |
18446744073709551263 = 0xfffffffffffffe9f | yes | yes | yes | yes | yes | |
PALLAS_BASEFIELD | no | yes | yes | no | yes | |
VESTA_BASEFIELD | no | yes | yes | no | yes | |
BLS12_377_SCALARFIELD | no | no | no | no | yes | |
BLS12_381_SCALARFIELD | no | yes | yes | no | no | |
BN_254_SCALARFIELD | no | yes | yes | no | yes |
3 | 5 | 9 | |
---|---|---|---|
yes | yes | no | |
yes | yes | yes | |
yes | yes | yes | |
yes | yes | no | |
yes | yes | yes | |
yes | yes | yes | |
yes | yes | no | |
yes | yes | yes |
Note: