- Notifications
You must be signed in to change notification settings - Fork0
A fast implementation of ECC-based Private Set Intersection
License
NotificationsYou must be signed in to change notification settings
levyfan/SecureID
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A faster implementation of ECC-based DID intersection thanSecureUnionID.The elliptic curve behind is chosen to bebn254 (aka Fp254BNb).
First, you should build and installmcl into system path
git clone https://github.com/herumi/mcl.git --depth 1 --branch v1.76cd mclmkdir buildcd buildcmake ..makesudo make install
Then follow language guides below:
mkdir buildcd buildcmake ..maketest
cd go&& gotest SecureID -tags bn256
mvn cleantest
python secure_id_test.py
Checkout the unit tests for API usage.
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
Apple M1 Pro
BenchmarkSign1-10 17118 68549 ns/opBenchmark Mode Cnt Score Error UnitsSecureIDBenchmark.bmSign1 avgt 5 67765.119 ± 1689.184 ns/op