rust-falcon
TypeScript icon, indicating that this package has built-in type declarations

0.2.6 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.6
    3
    • latest

Version History

Package Sidebar

Install

npm i rust-falcon

Weekly Downloads

3

Version

0.2.6

License

MIT

Unpacked Size

177 kB

Total Files

6

Last publish

Collaborators

  • kield
  • kirill.22