Git Product home page Git Product logo

sign0's Introduction

Post-quantum signature

Features

Sign0 is a simple implementation of the Lamport signature scheme. It is maybe not the best or the most eficient but it was designed for security and simplicity.

Sign0's security is only based on the security of SHA-512. Almost every signature system's security is based on the security of a hash function. Sign0 is only based on it.

Assumptions

Sign0 scrurely works only if the following assumptions are true.

  • Any environment that "can see" private keys is safe (no possible unauthorized access to data, no malwares, no backdoors, no TEMPEST...).
  • One private key is used once and ONLY ONCE (this is a limitation of the Lamport system).
  • Random number generation is cryptographically secure.
  • SHA-512 is secure.

Changelog

Versions of sign0 are composed of 3 numbers X.Y.Z.

X is increased when major changes that can break retro-compatibility happen.

Y is increased when new features are added.

Z is increased when for minor changes such as bug fixes or code clean-ups.

  • 0.0.0
    • Initial release

License

All the work related to sign0 is Copyright 2015, Piotr Chmielnicki. The code is under GNU GPL version 3.

User guide

Crypt0 is a set of tools:

  • gensigkeys0: the command-line command for key generation
  • sign0: the command-line command for signing
  • verify0: the command-line command for signature verification

Usages

gensigkeys0

Usage:

form 1: gensigkeys0 privkey-file
form 2: gensigkeys0 number

privkey-file: a .priv.lkey file to generate. If the file exists, only the public key will be generated.
number      : a number of private keys to generate
Environment:

CSTRNG: cryptographically secure true random number generator. Readable file expected (multiple files can be supplied separated by ':')
PRNG  : pseudo-random number generator. Readable file expected (multiple files can be supplied separated by ':')

Return values:

0: success
9: error

Public keys can be concatenated into a single .pub.lkey file. You can bundle 1024 public keys in 64 Kio.

sign0

Usage:

sign0 privkey-file file-to-sign
privkey-file: a valid .priv.lkey file to generate.

Return values:

0: success
9: error

verify0

Usage:

verify0 pubkey-file signature [signed-file]
pubkey-file: a valid .pub.lkey file
signature: a valid signature
signed-file: the signed file (if not specified, signature = signed-file.lsig)

Return values:

0: success
1: bad signature
9: other error

Internals

There is only a little diffrence between a basic Lamport public key and a .pub.lkey file: the .pub.lkey actualy contains the SHA-512 fingerprint of public key. This is for making the public key smaller (the size is divided by 1024).

The .lsig file is the concatenation of the full Lamport public key (checked against its fingerprint) and the Lamport signature.

Building sign0

You will need a Go compiler. The reference compiler will always be the latest stable release of the official Go compiler. On Linux a makefile is available, make all will compile the project and make install will install it for an unprivileged user. Other options are available. The makefile is easy to read.

sign0's People

Contributors

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