This is a demonstration of ciphertext sorting using the HESEA library. In this demo program, you need to enter the sequence of plaintexts you want to be sorted. Then, the program encrypts the plaintext sequence into the corresponding ciphertext sequence, and sorts the sequence by comparing ciphertext sequence. Then decrypt the ciphertext sequence and output the sorted plaintext sequence.
Dependencies:
after installed the HESEA lib, run with the command:
gcc -xc++ -lstdc++ -shared-libgcc compare.cpp -o compare_demo -I /usr/local/include/hesea -L /usr/local/lib -libHESEApke.so
./compare_demo
or you can build this demo by camke as follow
mkdir build
cd build
cmake ..
make
./compare_demo
This is a demostration for comparison and sorting using FHE. Please do not use it in any mature product.