Coder Social home page Coder Social logo

mesur-io / dilithium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pq-crystals/dilithium

0.0 0.0 1.0 1.85 MB

Home Page: https://mesur-io.github.io/dilithium/spec

License: Other

C 81.41% Makefile 4.83% Gnuplot 0.33% Assembly 9.48% Shell 0.33% CMake 1.28% Pawn 0.14% HTML 0.65% JavaScript 1.53%

dilithium's People

Contributors

baentsch avatar bhess avatar bwesterb avatar cryptojedi avatar gregorseiler avatar jschanck avatar mkannwischer avatar mprorock avatar oittaa avatar or13 avatar tlepoint avatar vincenthz avatar zanxu-blackhorse avatar

dilithium's Issues

sign and verify interface

currently:

      const privateKeyJwk = await api.generate();
      const message = "hello";
      const signature = await api.sign(message, privateKeyJwk);
      const verified = await api.verify(message, signature, privateKeyJwk);

in the future:

message needs to be a Uint8Array.
publicKey and privateKey also need to be Uint8Array

publicKey = base64url.decode(privateKeyJwk.x)
privateKey = base64url.decode(privateKeyJwk.d)

lowest level crypto should avoid passing around string encoded keys, signatures... serialization to string should happen only at an app boundary.

ideally these interface would also be type checked.

dilithium deterministic key gen

 async generate() {
    const keyPtr = this.instance._dilithiumGenerate();
    const keyPair = this.getCString(keyPtr, KEYPAIR_BYTES_B64 * 2, true);
    return JSON.parse(keyPair);
  }

it would be nice to be able to pass a secureRandom function that we could link up to mnemonics or other dangerous sources of low entropy... for testing purposes.

transmute-industries/verifiable-data#159

JWK base64 vs base64url

Need to use base64url.. but handle normal base64 safely as well.

ideally there would be a cross test that hows issuance and verification working, where one side if base64url and the other is base64.

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.