Skip to content

A fast implementation of ECC-based Private Set Intersection

License

Notifications You must be signed in to change notification settings

levyfan/SecureID

Repository files navigation

SecureID

ci workflow

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 install

Then follow language guides below:

C++

mkdir build
cd build
cmake ..
make test

Go

cd go && go test SecureID -tags bn256

Java

mvn clean test

Python

python secure_id_test.py

API

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

About

A fast implementation of ECC-based Private Set Intersection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published