Lamport one-time signature scheme library.
npm install lite-lamport
const LiteLamport = require('lite-lamport');
let lamport = new LiteLamport();
// Generate private key and public key
let { privateKey, publicKey } = lamport.generateKeys();
let message = 'hello world';
// Sign message
let signature = lamport.sign(message, privateKey);
// Verify message; returns true or false
lamport.verify(message, signature, publicKey);
const LiteLamport = require('lite-lamport');
let lamport = new LiteLamport();
// Generate random secret seed
let seed = lamport.generateSeed();
// Generate private key and public key from a seed with index as second argument
let { privateKey, publicKey } = lamport.generateKeysFromSeed(seed, 0);
Works on Node.js and in the browser.
MIT