Two-level homomorphic encryption for Node.js by WebAssembly
This library supports two kinds of lifted ElGamal encryption,
For two vectors x = (x1, ..., xn) and y = (y1, ..., yn), EncG1(x1) * EncG2(y1) + ... + EncG1(xn) * EncG2(yn) = EncGT(x1 * y1 + ... + xn * yn).
see mcl
sec.decWithZkpDec(c, aux)
returns [m, zkp]
that zkp
proves dec(c) = m
for CipherTextGT c, and aux.verify(c, zkp, m)
returns the correctness where aux = pub.getAuxiliaryForZkpDecGT()
.sec.decWithZkpDec(c, pub)
returns [m, zkp]
that zkp
proves dec(c) = m
for CipherTextG1 c, and pub.verify(c, zkp, m)
returns the correctness.node test
The version v0.7.0
breaks backward compatibility of the entry point.
const she = require('she-wasm')
const she = require('she-wasm/browser')
<script src="https://herumi.github.io/she-wasm/browser/she.js"></script>
Install Emscripten.
git submodule update --init --resurcive
cd src
make
modified new BSD License http://opensource.org/licenses/BSD-3-Clause
MITSUNARI Shigeo([email protected])