Giter Site home page Giter Site logo

seasox / grafting-trees-attack Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 151.54 MB

Grafting Trees Attack against the SPHINCS PQC signature framework

License: Creative Commons Zero v1.0 Universal

C 82.74% Makefile 16.99% HTML 0.01% JavaScript 0.03% Shell 0.01% CSS 0.01% Batchfile 0.05% Assembly 0.01% C++ 0.06% GDB 0.02% Python 0.08%

grafting-trees-attack's Introduction

SPHINCS - Fault Injection Attacks

This work was accepted to Kangacrypt 2018: Aymeric Genêt, Matthias J. Kannwischer, Hervé Pelletier, Andrew McLauchlan, "Practical Fault Injection Attacks on SPHINCS", Kangacrypt 2018

Contents of this repository

Glitch attack

Injecting a glitch in the power supply during the subtree construction results in a faulty signature that contains secret values unintended to be revealed. Exploiting these values results in a universal forgery that we are going to describe here.

SPHINCS-256 full signature

We ran the standard SPHINCS-256 procedure as described in the original paper (see https://sphincs.cr.yp.to/) with the following message, keys, and masks:

parameter value
secret key Cé qu'è lainô, le Maitre dé bataille, Que se moqué et se ri dé c
masks anaille, A bin fai vi, pè on desande nai, Qu'il étivé patron dé Genevoi. I son vegnu le doze de dessanbro, Pè onna nai asse naire que d'ancro; Y étivé l'an mil si san et dou, Qu'i veniron parla ou pou troi tou. Pè onna nai qu'étive la pe naire, I veniron; y n'étai pas pè bairè: Y étivé pè pilli nou maison, Et no tüa sans aucuna raison Petis et grans, ossis an sevegnance: Pè on matin d'onna bella demanze, Et pè on zeur qu'y fassive bin frai, Sans le bon Di, nos étivon to prai! On vo dera qu'étai cela canaille. - Lou Savoyar contre noutra mouraille Trai eitiellé on dressia et plianta, Et par iqué dou san y son monta. Etian antra, veniron u courdegarda, Yo i firon onna ruda montada. Is avion tenaillé et marté Qu'étivon fai avoi du boun acié, Pè arraci lou cliou et lé saraille, To lou verreu et tota la féraille Qu'on rancontré an dé pari andrai, Et qu'on bouté pè n'eitre pas surprai. On eitablio is avivon forcia; Et d'on petar qu'is avivon teria, I coudavon deiza eitre à sevau: I n'étivon pas assé monta yo. Sen A

Let a message M = Flowers are meant to bloom, not to dry up. That's what I choose to believe.. The full SPHINCS signature corresponding to this message can be found in full_sphincs_signature.txt.

Target subtree

Let the first subtree of the signature, at address 07c1d4f115363236, be the fault attack target. The 67 secret values from the first W-OTS+ signature, which corresponds to the root of the first subtree, can be independently found in wotsp_valid_sigma.txt.

By glitching the Arduino Due, we managed to collect 85 different signatures for this particular signature. They can all be found in wotsp_faulty_sigma.txt.

The python script attack.py was made to run with SPHINCS-py (https://github.com/joostrijneveld/SPHINCS-py) from Joost Rijneveld. It was however adapted such that it does not require its code.

The forged signature can be found in wotsp_sigma_prime.txt. It is the correct signature for the spoofed message M' = aren't there some flowers that never bloom?.

License

The entire code in this repository is in the public domain

References

grafting-trees-attack's People

Contributors

seasox avatar

Watchers

 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.