Closed prvsousa closed 7 years ago
Hi,
If you want a two-party protocol, use the yao protocol (semi honest or malicious). If you want a multi-party protocol, use the gmw protocol.
For both protocols you need to provide a circuit that gets the strings and compare them.
You can find the protocols at https://github.com/cryptobiu/libscapi/tree/dev/protocols.
Could you give me more hints about the comparison of strings? in GMW
When I'm trying to make "make" on the YaoSingleExecution I got:
[ 25%] Building CXX object CMakeFiles/yaosingleexecution.dir/YaoSEParty.cpp.o
In file included from /home/patriciarvsousa/libscapi/protocols/YaoSingleExecution/YaoSEParty.cpp:5:0:
/home/patriciarvsousa/libscapi/protocols/YaoSingleExecution/YaoSEParty.h:8:53: fatal error: libscapi/include/CryptoInfra/Protocol.hpp: No such file or directory
compilation terminated.
CMakeFiles/yaosingleexecution.dir/build.make:62: recipe for target 'CMakeFiles/yaosingleexecution.dir/YaoSEParty.cpp.o' failed
make[2]: *** [CMakeFiles/yaosingleexecution.dir/YaoSEParty.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/yaosingleexecution.dir/all' failed
make[1]: *** [CMakeFiles/yaosingleexecution.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Regrading the comparison, you should create a circuit file that does that. The circuit file should follow the following format:
for each party:
for each party:
for each gate:
For example:
1 //One gate 2 //two parties 1 1 1 2 1 2 1 1 3 2 1 3 2 1 1 2 3 0001
You can take a look at the AES circuit (at https://github.com/cryptobiu/libscapi/blob/dev/protocols/GMW/NigelAes3Parties.txt) as an example.
After you have the circuit file, you can pass it to the GMW protocol. See README file (at https://github.com/cryptobiu/libscapi/blob/dev/protocols/GMW/README) to detailed explanaitions on the execution.
Hi,
I tried to reproduce your bug, but the code compiles fine.
Please try to do git pull
, build libscapi
, and then build the protocol again.
Let me know what is the output.
The error stills the same and the output is the same error.
Regarding the comparison @moriyaw , thank's for the help. I'm trying to make something similar to milionaire's problem, but I'm not certain if I should use this one, because it requires a lot of information to the circuit . What is the simplest way to make this? We can think in millionaire's problem
You have some "samples" such as MaliciousOT or something... What is the difference to the "protocols"?
2017-03-05 6:51 GMT+00:00 liorbiu notifications@github.com:
Hi,
I tried to reproduce your bug, but the code compiles fine. Please try to do git pull, build libscapi, and then build the protocol again.
Let me know what is the output.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/cryptobiu/libscapi/issues/7#issuecomment-284209780, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ8WEgaetOQSIfD_Eo-IRflVZ5vfGOhbks5rilt8gaJpZM4L5UPq .
-- Patrícia Sousa
PhD Student Member: Competence Centre for Cyber Security and Privacy (C3P) Researcher: INESC-TEC / CRACS Phone: +351 220 402 985 <+351%2022%20040%202929> R.Campo Alegre,1021/1055 4169 - 007 Porto - Portugal
You use any tool to generate the AES circuit (at https://github.com/cryptobiu/libscapi/blob/dev/protocols/GMW/NigelAes3Parties.txt, for example) ?
I change the paths according to my situation but the error presists. There are some problem in the CMakeLists.txt
I think.
In this case, I want to use GMW. But, where I can find more information about circuits? If I found a comparison circuit I need to provide the strings and I don't know how can I modify the circuits. I liked using this lib, it sounds good but I needed some support in this part. As I understand, I only have to provide to the circuits the input strings and the comparison... But now you say that depends of the protocol and "toher special needs"... @moriyaw
Can you please attach a screenshot of the commands you are doing in order to compile? At my machine it's compiling without any problems.
@liorbiu my problem is in YaoSingleExecution
and not in GMW
. I can sent you a print if you don't get any error in YaoSingleExecution
too.
@patricia93sousa YaoSingleExecution compiles without any problems too.
Here is my screenshot. @liorbiu Really, I don't need YaoSingleExecution, only need GMW but i'm reporting to you be able to correct if there are any errors.
@moriyaw , If you can help me with the the doubt of the circuits, i would be grateful.
libscapi needs to be installed at the home directory. If you will open YaoSingleExecution
CMakeLists.txt you will see that in theINCLUDE_DIRECTORIES
function.
Since you installed libscapi
underwork/MPCFrameworks
, you need to add this line to INCLUDE_DIRECTORIES
function:
$ENV{HOME}/work/MPCFrameworks/
I include this. I can show you the CMakeLists.txt.
cmake_minimum_required(VERSION 3.5) project(YaoSingleExecution) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -maes -mpclmul -msse4.1 -fPIC -Wall -march=native -O3") SET (BOOST_ROOT $ENV{HOME}/work/MPCFrameworks/boost_1_60_0/) SET (BOOST_INCLUDEDIR $ENV{HOME}/work/MPCFrameworks/boost_1_60_0/) SET (BOOST_LIBRARYDIR $ENV{HOME}/work/MPCFrameworks/boost_1_60_0/stage/lib) find_package(Boost COMPONENTS system thread REQUIRED)
INCLUDE_DIRECTORIES($ENV{HOME} ${BOOST_INCLUDEDIR} $ENV{HOME}/work/MPCFrameworks/libscapi/lib/OTExtensionBristol $ENV{HOME}/libscapi/lib/ $ENV{HOME}/work/MPCFrameworks/libscapi/build/EMP /usr/local/include/emp-tool/ /usr/local/include/emp-ot/) link_directories(/usr/ssl/lib/ /usr/local/lib $ENV{HOME}/work/MPCFrameworks/libscapi/install/lib ${BOOST_LIBRARYDIR}) set(SOURCE_FILES YaoSEParty.cpp ) add_executable(YaoSingleExecution ${SOURCE_FILES}) TARGET_LINK_LIBRARIES(YaoSingleExecution $ENV{HOME}/work/MPCFrameworks/libscapi/scapi.a boost_system boost_thread pthread crypto dl ssl z relic gmp emp-tool)
2017-03-13 11:40 GMT+00:00 liorbiu notifications@github.com:
libscapi needs to be installed at the home directory. If you will open YaoSingleExecution CMakeLists.txt https://github.com/cryptobiu/libscapi/blob/master/protocols/YaoSingleExecution/CMakeLists.txt you will see that in theINCLUDE_DIRECTORIES function. Since you installed libscapi underwork/MPCFrameworks, you need to add this line to INCLUDE_DIRECTORIES function: $ENV{HOME}/work/MPCFrameworks/
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cryptobiu/libscapi/issues/7#issuecomment-286084343, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ8WEpj3U5Mbr4cbftoKHAgMqisLnulSks5rlStHgaJpZM4L5UPq .
-- Patrícia Sousa
PhD Student Member: Competence Centre for Cyber Security and Privacy (C3P) Researcher: INESC-TEC / CRACS Phone: +351 220 402 985 <+351%2022%20040%202929> R.Campo Alegre,1021/1055 4169 - 007 Porto - Portugal
in the INCLUDE_DIRECTORIES
you are not including the MPCFrameworks
directory.
Hi,
You should create a compare circuit. It is not hard, just follow the format I gave you in a previous comment. In order to build that circuit you should think how to insert two strings as input to the circuit and which gates you need to do the compare.
We will be able to build the circuit for you, but we are full of work until May. In may we will have time to build the circuit, let me know if it will help you.
Good Luck!
I already understand how to make the circuits, I think! Thank you so much.
I've already been able to do that. Thank you for your help.
In the problem that I report, @liorbiu, stills the same even correcting this error. Maybe you want that I create another issue? In order to not mix matters and we close this issue?
Your GMW protocol in this library is securely against malicious adversaries?
Hi,
Can you give me some guidance about how can I do comparison of two strings securely and privately using this library?
Thanks