Optimize the partial-sum key guessing order for the integral attack on the cipher SKINNY
Optimize the partial sum guessing order
Usage:
pso.py [-h] [-s [STEPS]] tweakey_setting final_round start_round tweakey_cell balanced_cell input_active scale
tweakey_setting: Specify version of Skinny usedfinal_round: Final round of the key recoverystart_round: Start round of the key recoverytweakey_cell: Specify which tweakey cell is controlled by the attackerbalanced_cell: Specify the balanced cell from the output of the distinguisherinput_active: Specify how many cell are active at the input of the distinguisherscale: Scale the time complexity, must be used since many solver only support limited data typess [STEPS], --steps [STEPS] Specify the maximum number of steps, default are the involved subtweakey cells
Example:
python pso.py 1 18 13 14 0 4 52
Visualize the partial sum recovery steps
Usage:
psvisu.py [-h] [-c] [-s] [-n] [-m] [-p] input [input ...]
-c, --color Use different color for every step-s, --steps Visualize each step individually-n, --step-number Put the step number in each cell except the stk-m, --memory Mark which states have to be stored in memory-p, --pdf Run latex and output pdfinput: json file with key guess order (output of autopsy2)
Example:
python psvisu.py 3_25_17_14_1_4.json -n -p
or
python psvisu.py 3_25_17_14_1_4.json -s -m -p
Output:
Partial Sum Key Recovery Visualization stored in 3_25_17_14_1_4.pdf
Compiling the file requires the various cipher *.sty files in the top-level directory. If using latexmk to compile, this path is included automatically by the .latexmkrc file; otherwise, please copy to the same directory as the tex file.
Find partial sum recovery steps
Usage:
autopsy2.py [-h] tweaky_setting final_round start_round tweaky_cell balanced_cell input_active
Example:
python autopsy2.py 3 25 17 14 1 4
Output:
Best key guess order is stored in 3_25_17_14_1_4.json