@subatomiq/ntru
v0.0.7
Published
![Test and Build](https://github.com/subatomiq-crypto/ntru/workflows/Test%20and%20Build/badge.svg)
Downloads
5
Readme
WASM wrapper for NTRU
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
- https://emscripten.org/docs/tools_reference/emcc.html
- https://github.com/emscripten-core/emscripten/blob/master/src/settings.js
Rerferences
- Ntru.js https://github.com/cyph/ntru.js/