Git Product home page Git Product logo

easydc's Introduction

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.

Preparatory Environment:

1. flex, bison and jsoncpp :

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).

Project Structure

  • root
    • benchmarks
    • data
      • differential
        • BitWiseMILP
          • dc : the saved differential characteristics of bit-wise MILP instances and extended bit-wise MILP instances.
          • models : the constructed bit-wise and extended bit-wise MILP instances.
          • results : the solving results of bit-wise and extended bit-wise MILP instances.
        • WordWiseMILP
          • models : the constructed word-wise MILP instances.
          • results : the solving results of word-wise MILP instances.
      • 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

Usage:

1. Modeling possible differential propagations in DDTs of S-boxes

  • 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
    

2. Security analysis of block ciphers against differential cryptanalysis

  • 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
    

Advanced Usage

Example

Citations

easydc's People

Watchers

Pu Sun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.