GithubHelp home page GithubHelp logo

drheli / breakingrainbow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wardbeullens/breakingrainbow

0.0 0.0 0.0 193 KB

Scripts for the 'Breaking Rainbow takes a Weekend on a Laptop' paper

C++ 62.11% Python 1.04% C 26.41% Makefile 0.90% Sage 9.55%

breakingrainbow's Introduction

BreakingRainbow

Scripts for the 'Breaking Rainbow takes a Weekend on a Laptop' paper.

We have the following scripts:

  • SimpleAttack.sage: Contains an implementation of the simple attack. Only constructs the \hat{P} system. You can use the block wiedemann XL implementation of Niederhagen to find a solution. http://polycephaly.org/projects/xl
  • SimpleAttackRankExp.sage: Script to reproduce tables 2 and 3.
  • CombinedAttackRankExp.sage: Script to reproduce table 4.
  • SimpleAttackStatistics.sage: Counts how many guesses are good.
  • Rainbow.sage: Used by the other scripts to generate a Rainbow public key

Demonstration of the full attack

The "Attack_demo" folder contains two sage scripts that demonstrate the full attack.

Running KeyGen.sage creates a rainbow key pair and writes the public key to a file. By default a toy parameter set is used, but the parameters can be changed in the script.

Running Full_Attack.sage compiles the WXL algorithm, and repeatedly makes a guess x, builds an MQ system and tries to solve it. Once a solution is found it completes the key recovery attack, writes the recovered secret key to a file, and compares it to the original secret key to verify that the attack was succesful.

using the wiedemann XL implmentation of Niederhagen et al.

The SimpleAttack.sage script creates a file named 'systemN-M.txt' for some values of N, M. You need to compile the wiedemann XL implementation with these values of N,M. For example, the NIST SL 1 parameters result in 'system63-30.txt'. (N is one less than the value N in the paper, because the homogenous system with N variables is converted to a inhomogenous system by putting x_N = 1.)

So in the XL Makefile you should set

Q = 16
M = 63
N = 30

After compiling, you can then run the XL algorithm with:

./xl --challenge system63-30.txt --all

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.