mesur-io / dilithium Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pq-crystals/dilithium
Home Page: https://mesur-io.github.io/dilithium/spec
License: Other
This project forked from pq-crystals/dilithium
Home Page: https://mesur-io.github.io/dilithium/spec
License: Other
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.