From this folder:
npm install
npm run start
The demo is at localhost:8080
import * as dilithium from "pqc_dilithium";
// Generate Keypair
let keys = dilithium.keypair();
const pubKey = keys.pubkey;
const privKey = keys.secret;
// Sign a message
const msg = new TextEncoder().encode("message")
let sign = keys.sign(msg);
// Verify a signature
let result = dilithium.verify(sign, msg, pubKey)
var assert = require('assert');
assert.equal(result, true)
// Valid input lengths are found in the `Params` class
assert.equal(pubKey.length, kyber.Params.publicKeyBytes);
assert.equal(privKey.length, kyber.Params.secretKeyBytes);
assert.equal(sign.length, kyber.Params.signBytes);