Ranking, Order Statistics, and Sorting under CKKS, using OpenFHE.
379
This repository provides a library for performing ranking, order statistics, and sorting operations using the CKKS (Cheon-Kim-Kim-Song) homomorphic encryption scheme. Our code is built on top of the OpenFHE library.
Pull the docker image with:
docker pull mazzonef/openfhe-statistics
and run it with
docker run -it mazzonef/openfhe-statistics
The executables (ranking, minimum, median, and sorting) can be used to benchmark the runtime of the library under various configurations. These executables generate random input vectors, set up the CKKS encryption scheme, and perform the respective operations. By default, the CKKS parameters and approximation degrees are selected automatically, but you may modify them to optimize performance for specific scenarios.
Each executable accepts specific arguments as follows:
./build/ranking <vector_length> [<tie_correction>] [<single_thread>]
1 to enable tie correction or 0 to disable it (default: 0).1 to run in single-threaded mode or 0 to use multi-threading (default: 0).Example:
./build/ranking 32 0 1
./build/minimum <vector_length> [<single_thread>]
1 to run in single-threaded mode or 0 to use multi-threading (default: 0).Example:
./build/minimum 32 1
./build/median <vector_length> [<single_thread>]
1 to run in single-threaded mode or 0 to use multi-threading (default: 0).Example:
./build/median 32 0
./build/sorting <vector_length> [<single_thread>]
1 to run in single-threaded mode or 0 to use multi-threading (default: 0).Example:
./build/sorting 32 1
We also provide a shell script benchmark.sh, which automatically benchmarks a given functionality for vector length going from 8 to 16384, in both single-threaded and multi-threaded setting. The runtime and memory consumption are stored in a csv file benchmark.out, while the log files are stored in the folder logs.
sh ./benchmark.sh <algorithm>
For additional information, please refer to the readme file at /app/README.md.
Content type
Image
Digest
sha256:7e8d3c862…
Size
210 MB
Last updated
over 1 year ago
docker pull mazzonef/openfhe-statistics