EasyDC: A Domain-Specific Language for Security Analysis of Block Ciphers against Differential Cryptanalysis
This repository is for parsing the input EasyDC programs of block ciphers and then performing the security analysis of block ciphers against differential cryptanalysis by solving MILP instances generated from the preprocessed programs of inputs. It also support the modelings of S-boxes separately, which generate IL constraints of DDTs of the given S-boxes.
used for EasyDC language and parser for preprocessing.
2. Gurobi :
used for solving MILP instances which characterize the relation between input and output differences of initial input programs.
3. Z3 :
used for computing branch number of various operators, checking if a given S-box is injective, minimizing the number of Boolean variables used for encoding the probabilities of differential propagations in DDTs (MaxSMT).
- root
- benchmarks
- data
- differential
- sbox
- ARX : the modelings and results of arithmetic addition.
- AS : the modelings and results of look-up table S-boxes without the probabilities of possible differential propagations in DDTs.
- DC : the modelings and results of look-up table S-boxes with the probabilities of possible differential propagations in DDTs.
- include : head files.
- lib : source files.
- main.cpp
-
comand : "./EasyDC argv[1] argv[2] argv[3] argv[4] " :
argv[1] argv[2] argv[3] argv[4] Remark name of S-box S-box mode of modelings, taking probabilities of possible differential propagations in DDTs into account or not choosing reduction methods Options "AS"; "DC" "1" : T1; "2" : T2; "3" : T3; "4" : T4; "5" : T5; "6" : T6; "7" : T7; "8" : T8 E.g.,
$ ./EasyDC Present 4,15,3,8,13,10,12,0,11,5,7,14,2,6,1,9 AS 1
-
set paramters via parameters.txt file. E.g., parametersSboxDemo.txt
$ cat parametersSboxDemo.txt Present 4,15,3,8,13,10,12,0,11,5,7,14,2,6,1,9 AS 1
-
comand : "./EasyDC argv[1] argv[2] argv[3] argv[4] argv[5] argv[6] argv[7] argv[8] argv[9] argv[10] argv[11] argv[12] argv[13] " :
argv[1] argv[2] argv[3] argv[4] argv[5] argv[6]/argv[8]/argv[10]/argv[12] argv[7]/argv[9]/argv[11]/argv[13] Remark num of parameters EasyDC program file path modeling approach mode of modelings for S-boxes choosing reduction methods for S-boxes Options "w" : word-wise approach; "b" : bit-wise approach; "d" : extended bit-wise approach "AS"; "DC" "1" : T1; "2" : T2; "3" : T3; "4" : T4; "5" : T5; "6" : T6; "7" : T7; "8" : T8 startRound or allRounds or timer(second) or threadsNum startRound or allRounds or timer(second) or threadsNum E.g.,
$ ./EasyDC 7 ../benchmarks/BlockCipher/PRESENT.cl b AS 1 allRounds 5
-
set paramters via parameters.txt file. E.g., parametersMILPDemo.txt
$ cat parametersMILPDemo.txt 7 ../benchmarks/BlockCipher/PRESENT.cl b AS 1 allRounds 5