ncp-hash / public-phash

Using Paillier AHE and ZKP to turn a secret key PHash algorithm into a public key one.
GNU General Public License v3.0
1 stars 1 forks source link

Tcp refactor #15

Closed dahadaller closed 5 years ago

dahadaller commented 5 years ago

FINALLY DONE (except for one minor bug.) After the server receives the hash, the prompt

message received:

message received:

message received:

message received:

message received:

image

is printed over and over again. But, the hash is sent over tcp successfully.

dahadaller commented 5 years ago

also the compiling command is different now that I've changed the code. On linux, it's now

g++ -o client client.cpp /usr/local/lib/libgmp.a /usr/local/lib/libpaillier.a -O2 -lm -lpthread -I/home/david/Libraries/gmp-6.1.2/ -std=c++11 -lgmp -I/home/david/Libraries/CImg-2.5.7 -lX11 -fpermissive

g++ -o server server.cpp /usr/local/lib/libgmp.a /usr/local/lib/libpaillier.a -O2 -lm -lpthread -I/home/david/Libraries/gmp-6.1.2/ -std=c++11 -lgmp -I/home/david/Libraries/CImg-2.5.7 -lX11 -fpermissive

On mac, the compile commands should be

g++ -o server server.cpp /usr/local/opt/gmp/lib/libgmp.a /usr/local/lib/libpaillier.a -O2 -lm -lpthread -I/usr/X11R6/include -L/usr/X11R6/lib -lm -lpthread -lX11
g++ -o client client.cpp /usr/local/opt/gmp/lib/libgmp.a /usr/local/lib/libpaillier.a -O2 -lm -lpthread -I/usr/X11R6/include -L/usr/X11R6/lib -lm -lpthread -lX11

but I haven't tried to compile on a mac.