fhe
Version:
A reference library for the qCrypt implementation of Fully Homomorphic Encryption (FHE) by Craig Gentry
13 lines (11 loc) • 383 B
JavaScript
var fhe = require("./index.js")();
// Explain the crypto defaults
fhe.explainParameters();
// Run a quick encrypt / decrypt cycle to check if the bit is encrypted and decrypted correctly
for (var i = 0; i < 10; i++) {
if (fhe.runTest() === false) {
throw new Error("Encryption / decryption cycle produced invalid result");
}
}
console.log();
console.log("All tests passed...");