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/