Implementation and benchmarking of our paper1 describing the first efficient construction of registration-based encryption (RBE).
THIS IS A PROTOTYPE IMPLEMENTATION, DO NOT USE IN PRODUCTION.
We use petrelic, a Python wrapper around RELIC, to implement the scheme. For installation (Linux only) simply run pip install petrelic
(full details here).
Our RBE construction is implemented as a package in the rbe directory. We use the BLS12-381 elliptic curve with asymmetric pairings. Add the package to your path in order to use it:
# in the root directory (efficientRBE)
export PYTHONPATH=$(pwd)/rbe:$PYTHONPATH
Generate documentation for rbe
with pdoc:
cd rbe
rm -r docs # may not be necessary
pdoc -o docs -d numpy rbe
This creates HTML files with the documentation in the rbe/docs
directory.
Note that the docstrings are written using the numpy format (general tips here).
Benchmarks for algorithm runtimes can be taken via bench/bench.sh
or for individual settings of N and scheme variant (base or efficient) with
python3 bench/bench.py [-h] [-N max_parties] [-i iters] [-e]
The parameter sizes (of aux
and pp
; crs
size is printed with the benchmarks) for a full system, where all N parties are registered for N = 10k...10M, can be obtained with
python3 bench/param_sizes.py
The time per operation (group exponentiation, pairing, (de)serialization) and group element bytesizes can be benchmarked with
python3 bench-ops/ops-petrelic.py