The repository contains Python implementation of metaheuritics (simulated annearling and genetic algorithms) that are used to design/tweak two types of symmetric-key primitives (tweaked SKINNY lightweight block cipher and the fastest AES-round based constructions ).
To run the metaheuristics, go the the appropriate directory (skinny or aes-based) and run
python main.py --search 1 for search based on simulated annealing
python main.py --search 2 for search based on genetic algorithm
The code can run for very long time. To speed things up, change some of the parameters specified in parameters.py and in fitness.py. In particular, you can make the search easier (more feasible) by:
- Target lighter versions of the primitives, i.e. smaller state size. Check parameters.py for more details.
- Target lower security levels. Check parameters.py for more details.
- Use more cores: THREAD count is defined in fitness.py.
- Intel's Gurobi. In general metaheuristics not necessarily need ILP solver, but the differential analysis of SKINNY and of AES-round based constructions reduces the problem of finding the best related-tweakey trails to ILP problem which is solved with Gurobi.
The paper explaining the approach has been published at ASIACRYPT'17 and it can be found here.