Closed wyatt-howe closed 2 years ago
BN254 can be imported by writing from oblivious.bn254 import point, scalar. Likewise, Ristretto255 can be imported by writing from oblivious.ristretto import point, scalar.
from oblivious.bn254 import point, scalar
from oblivious.ristretto import point, scalar
>>> import timeit >>> timeit.timeit('s * p', setup='from oblivious.bn254 import point, scalar; (s, p) = (scalar.random(), point.random())', number=100000) 4.401820125 >>> timeit.timeit('s * p', setup='from oblivious.ristretto import point, scalar; (s, p) = (scalar.random(), point.random())', number=100000) 4.364272208
Encryption performance is almost identical on both curves.
Deterministic scalar/ID synthesis is explained in the doctest below.
https://github.com/nthparty/oblivious/blob/20ac2925d62e755f02fd8c03401033a8e98e2c1a/oblivious/bn254.py#L803-L810
BN254 can be imported by writing
from oblivious.bn254 import point, scalar
. Likewise, Ristretto255 can be imported by writingfrom oblivious.ristretto import point, scalar
.Encryption performance is almost identical on both curves.
Deterministic scalar/ID synthesis is explained in the doctest below.
https://github.com/nthparty/oblivious/blob/20ac2925d62e755f02fd8c03401033a8e98e2c1a/oblivious/bn254.py#L803-L810