@subatomiq/ntru
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

WASM wrapper for NTRU

Test and Build

import NTRU from "@subatomiq/ntru";

const run = async () => {
  const n = await NTRU();
  const kp = await n.keyPair();
  const message = "my message";
  const encrypted = await n.encryptString(message, kp.publicKey);
  const c = await n.decryptString(encrypted, kp.privateKey);
  console.log("Decrypted message == message: " + (c === message));
};

run();

EMScripten references

Rerferences

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @subatomiq/ntru

    Weekly Downloads

    1

    Version

    0.0.7

    License

    BSD-2-Clause

    Unpacked Size

    91.5 kB

    Total Files

    14

    Last publish

    Collaborators

    • subatomiq