Falcon Signature WASM (Rust)
Don't use an equal random seed to generate keypair and signature
This library provides fully sync wasm version of Falcon signature functions. Thanks to this Github repo
Usage:
Generating random 48 bytes array:
const randomSeed = crypto.getRandomValues(new Uint8Array(48));
Generating keypair:
import { falconKeypair } from "rust-falcon";
const keypair = falconKeypair(randomSeed);
Signing message:
import { sign } from "rust-falcon";
const keypair = falconKeypair(randomSeed);
const message = new TextEncoder().encode("message");
const signature = sign(message, keypair.secret, anotherRandomSeed).sign;
Verifying message:
import { verify } from "rust-falcon";
const result = verify(signature, message, keypair.public); // True