LE
levyfan/SecureID
A fast implementation of ECC-based Private Set Intersection
SecureID
A faster implementation of ECC-based DID intersection than SecureUnionID.
The elliptic curve behind is chosen to be bn254 (aka Fp254BNb).
INSTALL
First, you should build and install mcl into system path
git clone https://github.com/herumi/mcl.git --depth 1 --branch v1.76
cd mcl
mkdir build
cd build
cmake ..
make
sudo make installThen follow language guides below:
C++
mkdir build
cd build
cmake ..
make testGo
cd go && go test SecureID -tags bn256Java
mvn clean testPython
python secure_id_test.pyAPI
Checkout the unit tests for API usage.
ECC-based PSI explained
G: base point, defined by curve
r: random number, generated by PublicKey holder
| PublicKey: Q = d*G | SecretKey: d | |
|---|---|---|
| hash | P = hash_to_curve(msg) | P = hash_to_curve(msg) |
| sign1 | S1 = d*P | |
| blind | B = P + r*G | |
| sign2 | S2 = d*B | |
| unblind | U = S2 - r*Q |
U = d*(P + rG) - rd*G = S1
Benchmark Result
Apple M1 Pro
BenchmarkSign1-10 17118 68549 ns/op
Benchmark Mode Cnt Score Error Units
SecureIDBenchmark.bmSign1 avgt 5 67765.119 ± 1689.184 ns/op
On this page
Contributors
MIT License
Created December 21, 2022
Updated December 26, 2022