Code Monkey home page Code Monkey logo

volepsi's Introduction

Vole-PSI

Vole-PSI implements the protocols described in VOLE-PSI: Fast OPRF and Circuit-PSI from Vector-OLE and Blazing Fast PSI from Improved OKVS and Subfield VOLE. The library implements standard Private Set Intersection (PSI) along with a variant called Circuit PSI where the result is secret shared between the two parties.

The library is cross platform (win,linux,mac) and depends on libOTe, sparsehash, Coproto.

Build

The library can be cloned and built with networking support as

git clone https://github.com/Visa-Research/volepsi.git
cd volepsi
python3 build.py -DVOLE_PSI_ENABLE_BOOST=ON

If TCP/IP support is not required, then a minimal version of the library can be build by calling python3 build.py. See below and the cmake/python output for additional options. The user can manually call cmake as well.

The output library volePSI and executable frontend will be written to out/build/<platform>/. The frontend can perform PSI based on files as input sets and communicate via sockets. See the output of frontend for details. There is also two example on how to perform networking or manually get & send the protocol messages.

Compile Options

Options can be set as -D NAME=VALUE. For example, -D VOLE_PSI_NO_SYSTEM_PATH=true. See the output of the build for default/current value. Options include :

  • VOLE_PSI_NO_SYSTEM_PATH, values: true,false. When looking for dependencies, do not look in the system install. Instead use CMAKE_PREFIX_PATH and the internal dependency management.
  • CMAKE_BUILD_TYPE, values: Debug,Release,RelWithDebInfo. The build type.
  • FETCH_AUTO, values: true,false. If true, dependencies will first be searched for and if not found then automatically downloaded.
  • FETCH_SPARSEHASH, values: true,false. If true, the dependency sparsehash will always be downloaded.
  • FETCH_LIBOTE, values: true,false. If true, the dependency libOTe will always be downloaded.
  • FETCH_LIBDIVIDE, values: true,false. If true, the dependency libdivide will always be downloaded.
  • VOLE_PSI_ENABLE_SSE, values: true,false. If true, the library will be built with SSE intrinsics support.
  • VOLE_PSI_ENABLE_PIC, values: true,false. If true, the library will be built -fPIC for shared library support.
  • VOLE_PSI_ENABLE_ASAN, values: true,false. If true, the library will be built ASAN enabled.
  • VOLE_PSI_ENABLE_GMW, values: true,false. If true, the GMW protocol will be compiled. Only used for Circuit PSI.
  • VOLE_PSI_ENABLE_CPSI, values: true,false. If true, the circuit PSI protocol will be compiled.
  • VOLE_PSI_ENABLE_OPPRF, values: true,false. If true, the OPPRF protocol will be compiled. Only used for Circuit PSI.
  • VOLE_PSI_ENABLE_BOOST, values: true,false. If true, the library will be built with boost networking support. This support is managed by libOTe.
  • VOLE_PSI_ENABLE_OPENSSL, values: true,false. If true,the library will be built with OpenSSL networking support. This support is managed by libOTe. If enabled, it is the responsibility of the user to install openssl to the system or to a location contained in CMAKE_PREFIX_PATH.
  • VOLE_PSI_ENABLE_BITPOLYMUL, values: true,false. If true, the library will be built with quasicyclic codes for VOLE which are more secure than the alternative. This support is managed by libOTe.
  • VOLE_PSI_ENABLE_SODIUM, values: true,false. If true, the library will be built libSodium for doing elliptic curve operations. This or relic must be enabled. This support is managed by libOTe.
  • VOLE_PSI_SODIUM_MONTGOMERY, values: true,false. If true, the library will use a non-standard version of sodium that enables slightly better efficiency.
  • VOLE_PSI_ENABLE_RELIC, values: true,false. If true, the library will be built relic for doing elliptic curve operations. This or sodium must be enabled. This support is managed by libOTe.

Installing

The library and any fetched dependencies can be installed.

python3 build.py --install

or

python3 build.py --install=install/prefix/path

if a custom install prefix is perfected. Install can also be performed via cmake.

Linking

libOTe can be linked via cmake as

find_package(volepsi REQUIRED)
target_link_libraries(myProject visa::volepsi)

To ensure that cmake can find volepsi, you can either install volepsi or build it locally and set -D CMAKE_PREFIX_PATH=path/to/volepsi or provide its location as a cmake HINTS, i.e. find_package(volepsi HINTS path/to/volepsi).

To link a non-cmake project you will need to link volepsi, libOTe,coproto, macoro, (sodium or relic), optionally boost and openss if enabled. These will be installed to the install location and staged to ./out/install/<platform>.

Dependency Management

By default the dependencies are fetched automatically. This can be turned off by using cmake directly or adding -D FETCH_AUTO=OFF. For other options see the cmake output or that of python build.py --help.

If the dependency is installed to the system, then cmake should automatically find it if VOLE_PSI_NO_SYSTEM_PATH is false. If they are installed to a specific location, then you call tell cmake about them as

python3 build.py -D CMAKE_PREFIX_PATH=install/prefix/path

volepsi's People

Contributors

mingatvisa avatar rindalvisa avatar schoppmp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

volepsi's Issues

How do I run this program?

Hi Professor, I am having some problems reproducing this program as described below:
First, I can build the whole program. Here are the parameter settings :

image

Then I can also pass all the unit tests. like this:

image

But at the moment I can only run the -u command and the -perf command. All other commands print out usage information. I've tried several commands to run the PSI protocol, but they always output usage information without actually running the PSI protocol. I'm not very proficient with the code and I can't find out what the problem is, I wonder if the professor can give a set of running examples so that I can determine what's wrong.

n must be smaller than the index type max value

Professor, I recently learned to run OKVS in RR22. When I run the function perfPaxosImpl<8>. I use -n 1000000 to try to build an OKVS with n=1000000. But it told me: n must be smaller than the index type max value. How to solve this?

Circuit PSI with associated data benchmarking

Hi and thanks for this great work!

I have a few questions, I'm adding numbers so it'll be easier to respond :)

  1. I want to run a circuit PSI example with associated data between two parties each of which has a set of 10^6 elements (party_0.csv and party_1.csv). Are the following commands correct?
./frontend -cpsi -v -nt 1 -t 1 -in party_0.csv -r 0
./frontend -cpsi -v -nt 1 -t 1 -in party_1.csv -r 1

My two sets contain one value per line and have an intersection of 50%. For instance party_0.csv:

vCoS1hU3O19TnaAM
ZQOOOZ9dG0bLRutA
Iyw6AAc1v32JhBHl
...

The reason I'm asking is that I saw in your paper in Table 2 that for 2^20 (which is a little above 1M) it takes 4-5 seconds in LAN but when I run it, it runs in less than 2 seconds on my laptop:

reading set... 276ms
connecting as server at address localhost:1212 56ms
Validating set sizes... 0ms
running PSI... 1642ms
  1. Also, is there a way to choose between the IKNP and the SilentOT versions?

  2. On a different note, is there a way to provide the associated data or is this not supported yet? If it's supported, is there a way to provide multiple columns of associated data? Like, party A has dataset X and associated data A_0, B_0, C_0 and party B has dataset Y with associated data A_1, B_1, C_1. Each of A_0, B_0, C_0 has as many elements as the corresponding dataset of the party.

  3. Finally, just to clarify, to get the runtime for one PSI the number of trials -t parameter should be 1, right?

Sorry for the multiple questions and thank you!
Dimitris

Failed to build on Ubuntu 22.04

Hi authors, I ran into some error when trying to run python3 build.py on Ubuntu 22.04.1 LTS with AMD Ryzen 9 5900X.
But I'm not sure if this is a problem building the dependency (cryptoTools) or not.

Below are the logs:

====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux  -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DPARALLEL_FETCH=24 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux   --parallel 24 
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv


-- vole-psi options
=======================================================
-- Option: FETCH_AUTO        = ON
-- Option: FETCH_SPARSEHASH  = 
-- Option: FETCH_LIBOTE      = 
-- Option: FETCH_LIBDIVIDE   = 
-- Option: VERBOSE_FETCH     = ON


-- Option: VOLE_PSI_ENABLE_SSE      = ON
-- Option: VOLE_PSI_PIC             = OFF
-- Option: VOLE_PSI_ENABLE_GMW      = ON
-- Option: VOLE_PSI_ENABLE_CPSI     = ON
-- Option: VOLE_PSI_ENABLE_OPPRF    = ON

-- Option: COPROTO_ENABLE_BOOST     = ON
-- Option: COPROTO_ENABLE_OPENSSL   = ON
-- Option: LIBOTE_ENABLE_BITPOLYMUL = ON
-- VOLEPSI_THIRDPARTY_DIR=/home/jason/volepsi/out/install/linux
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/home/jason/volepsi/out/install/linux/include
============= Building libOTe =============
libOTe Checkout 3d1ecb211a2421a670f787131ea1fb2d477ff128 
'/usr/bin/git' 'checkout' '3d1ecb211a2421a670f787131ea1fb2d477ff128'
HEAD is now at 3d1ecb2 version bump
libOTe submodule
'/usr/bin/git' 'submodule' 'update' '--recursive'
libOTe Configure
'/usr/bin/cmake' '-S' '/home/jason/volepsi/out/libOTe' '-B' '/home/jason/volepsi/out/libOTe/out/build/linux' '-DCMAKE_INSTALL_PREFIX=/usr/local' '-DCMAKE_PREFIX_PATH=/home/jason/volepsi/out/install/linux;' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DFETCH_AUTO=ON' '-DVERBOSE_FETCH=ON' '-DENABLE_CIRCUITS=ON' '-DENABLE_MRR=ON' '-DENABLE_IKNP=ON' '-DENABLE_SOFTSPOKEN_OT=ON' '-DENABLE_BITPOLYMUL=ON' '-DENABLE_SILENTOT=ON' '-DENABLE_SILENT_VOLE=ON' '-DENABLE_SODIUM=ON' '-DENABLE_MRR_TWIST=ON' '-DENABLE_SSE=ON' '-DCOPROTO_ENABLE_BOOST=ON' '-DCOPROTO_ENABLE_OPENSSL=ON' '-DOC_PIC=OFF' '-DOC_THIRDPARTY_CLONE_DIR=/home/jason/volepsi/out'
-- cryptoTools options
=======================================================
-- Option: FETCH_AUTO        = ON
-- Option: VERBOSE_FETCH     = ON

-- Option: FETCH_SPAN_LITE   = 
-- Option: FETCH_RELIC       = 
-- Option: FETCH_SODIUM      = 
-- Option: FETCH_BOOST       = 

-- Option: CMAKE_BUILD_TYPE  = Release
	Release
	Debug
	RelWithDebInfo
-- Option: ENABLE_SPAN_LITE  = ON
-- Option: ENABLE_RELIC      = OFF
-- Option: ENABLE_SODIUM     = ON
-- Option: ENABLE_BOOST      = OFF

-- Option: ENABLE_CIRCUITS   = ON
-- Option: ENABLE_NET_LOG    = OFF
-- Option: ENABLE_WOLFSSL    = OFF
-- Option: ENABLE_SSE        = ON
-- Option: ENABLE_AVX        = ON
-- Option: ENABLE_BOOST      = OFF


span-lite already fetched (cryptoTools).
sodium already fetched.
-- SODIUM_INCLUDE_DIRS:  /usr/include
-- SODIUM_LIBRARIES:  /usr/lib/x86_64-linux-gnu/libsodium.a
-- SODIUM_MONTGOMERY:  ON

-- General Options
=======================================================
-- Option: VERBOSE_FETCH         = ON
-- Option: FETCH_BITPOLYMUL      = ON
-- Option: FETCH_COPROTO         = ON

-- Option: ENABLE_ALL_OT         = ON/OFF
-- Option: ENABLE_BITPOLYMUL     = ON
-- Option: LIBOTE_CPP_VER        = 14
-- Option: COPROTO_ENABLE_BOOST  = ON
-- Option: COPROTO_ENABLE_OPENSSL= ON


-- Base OT protocols
=======================================================
-- Option: ENABLE_SIMPLESTOT     = OFF
-- Option: ENABLE_SIMPLESTOT_ASM = OFF
-- Option: ENABLE_MRR            = ON
-- Option: ENABLE_MRR_TWIST      = ON
-- Option: ENABLE_MR             = OFF
-- Option: ENABLE_MR_KYBER       = OFF
-- 1-out-of-2 OT Extension protocols
=======================================================
-- Option: ENABLE_KOS            = OFF
-- Option: ENABLE_IKNP           = ON
-- Option: ENABLE_SILENTOT       = ON


-- Option: ENABLE_SOFTSPOKEN_OT  = ON


-- 1-out-of-2 Delta-OT Extension protocols
=======================================================
-- Option: ENABLE_DELTA_KOS      = OFF


-- Vole protocols
=======================================================
-- Option: ENABLE_SILENT_VOLE      = ON


-- 1-out-of-N OT Extension protocols
=======================================================
-- Option: ENABLE_OOS            = OFF
-- Option: ENABLE_KKRT           = OFF


-- other 
=======================================================
-- Option: NO_SILVER_WARNING    = OFF


-- Option: NO_KOS_WARNING       = OFF


bitpolymul already fetched.
-- bitpolymul_INCLUDE_DIRS=/home/jason/volepsi/out/libOTe/out/install/linux/include
-- bitpolymul_LIBRARIES=/home/jason/volepsi/out/libOTe/out/install/linux/lib/libbitpolymul.a

coprotoConfig.cmake : /home/jason/volepsi/out/libOTe/out/install/linux/lib/cmake/coproto/coprotoConfig.cmake
macoroConfig.cmake : /home/jason/volepsi/out/libOTe/out/install/linux/lib/cmake/macoro/macoroConfig.cmake
-- Boost_LIB: Boost::system;Boost::thread;Boost::regex
-- Boost_INC: /home/jason/volepsi/out/libOTe/out/install/linux/include


OPENSSL_INCLUDE_DIR=/usr/include
OPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so
OPENSSL_LIBRARIES  =/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
OPENSSL_VERSION    =3.0.2
coproto already fetched.
coprotoConfig.cmake : /home/jason/volepsi/out/libOTe/out/install/linux/lib/cmake/coproto/coprotoConfig.cmake
-- Option: COPROTO_STAGE = /home/jason/volepsi/out/libOTe/out/install/linux
-- Option: COPROTO_STAGE = /home/jason/volepsi/out/libOTe/out/install/linux
macoroConfig.cmake : /home/jason/volepsi/out/libOTe/out/install/linux/lib/cmake/macoro/macoroConfig.cmake
-- Boost_LIB: Boost::system;Boost::thread;Boost::regex
-- Boost_INC: /home/jason/volepsi/out/libOTe/out/install/linux/include


OPENSSL_INCLUDE_DIR=/usr/include
OPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so
OPENSSL_LIBRARIES  =/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
OPENSSL_VERSION    =3.0.2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jason/volepsi/out/libOTe/out/build/linux
libOTe Build
'/usr/bin/cmake' '--build' '/home/jason/volepsi/out/libOTe/out/build/linux' '--config' 'Release'
Consolidate compiler generated dependencies of target cryptoTools
[  1%] Building CXX object cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/Crypto/SodiumCurve.cpp.o
/home/jason/volepsi/out/libOTe/cryptoTools/cryptoTools/Crypto/SodiumCurve.cpp: In function ‘osuCrypto::Sodium::Monty25519 osuCrypto::Sodium::operator*(const osuCrypto::Sodium::Scalar25519&, const osuCrypto::Sodium::Monty25519&)’:
/home/jason/volepsi/out/libOTe/cryptoTools/cryptoTools/Crypto/SodiumCurve.cpp:147:9: error: ‘crypto_scalarmult_noclamp’ was not declared in this scope; did you mean ‘crypto_scalarmult_base’?
  147 |     if (crypto_scalarmult_noclamp(prod.data, a.data, b.data) < 0)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         crypto_scalarmult_base
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/build.make:286: cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/Crypto/SodiumCurve.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:203: cryptoTools/cryptoTools/CMakeFiles/cryptoTools.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
libOTe Install
'/usr/bin/cmake' '--install' '/home/jason/volepsi/out/libOTe/out/build/linux' '--config' 'Release' '--prefix' '/home/jason/volepsi/out/install/linux'
'/usr/bin/cmake' '--install' '/home/jason/volepsi/out/span-lite/build/linux' '--config' 'Release' '--prefix' '/home/jason/volepsi/out/install/linux'
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/span-lite/span-lite-targets.cmake
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/span-lite/span-lite-config.cmake
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/span-lite/span-lite-config-version.cmake
-- Up-to-date: /home/jason/volepsi/out/install/linux/include
-- Up-to-date: /home/jason/volepsi/out/install/linux/include/nonstd
-- Up-to-date: /home/jason/volepsi/out/install/linux/include/nonstd/span.hpp
'mkdir' '-p' '/home/jason/volepsi/out/install/linux/lib/'
'mkdir' '-p' '/home/jason/volepsi/out/install/linux/include'
'mkdir' '-p' '/home/jason/volepsi/out/install/linux/include/sodium'
'cp' '/home/jason/volepsi/out/libOTe/cmake/../out/install/linux/lib/libsodium.a' '/home/jason/volepsi/out/install/linux/lib/'
'cp' '/home/jason/volepsi/out/libOTe/cmake/../out/install/linux/include/sodium.h' '/home/jason/volepsi/out/install/linux/include/'
'cp' '-r' '/home/jason/volepsi/out/libOTe/cmake/../out/install/linux/include/sodium' '/home/jason/volepsi/out/install/linux/include/'
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/cryptoTools/cryptoToolsConfig.cmake
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/cryptoTools/cryptoToolsConfigVersion.cmake
-- Up-to-date: /home/jason/volepsi/out/install/linux/lib/cmake/cryptoTools/cryptoToolsDepHelper.cmake
CMake Error at out/build/linux/cryptoTools/cmake_install.cmake:101 (file):
  file INSTALL cannot find
  "/home/jason/volepsi/out/libOTe/out/build/linux/cryptoTools/cryptoTools/libcryptoTools.a":
  No such file or directory.
Call Stack (most recent call first):
  out/build/linux/cmake_install.cmake:47 (include)


log /home/jason/volepsi/thirdparty/log-libOTe.txt
==========================================
CMake Error at cmake/findDependancies.cmake:57 (find_package):
  By not providing "FindlibOTe.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "libOTe", but
  CMake did not find one.

  Could not find a package configuration file provided by "libOTe" with any
  of the following names:

    libOTeConfig.cmake
    libote-config.cmake

  Add the installation prefix of "libOTe" to CMAKE_PREFIX_PATH or set
  "libOTe_DIR" to a directory containing one of the above files.  If "libOTe"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  cmake/findDependancies.cmake:71 (FIND_LIBOTE)
  CMakeLists.txt:14 (include)


-- Configuring incomplete, errors occurred!
See also "/home/jason/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'.  Stop.

When I tried to rebuild it, an error occurred.

It worked the first time I compiled it. But I want to change some fixed parameters in frontend. That is, I want to test the efficiency of PSI when n=2^20, so I plan to rebuild it. Then I rerun “python3 build.py” the following error occurred. Can you tell me why? Thank you very much!

/usr/bin/ld: CMakeFiles/frontend.dir/main.cpp.o: in function main': main.cpp:(.text.startup+0x0): multiple definition of main'; CMakeFiles/frontend.dir/build/CMakeFiles/3.24.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:CMakeCXXCompilerId.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [frontend/CMakeFiles/frontend.dir/build.make:137:frontend/frontend] error 1
make[1]: *** [CMakeFiles/Makefile2:187:frontend/CMakeFiles/frontend.dir/all] error 2
make: *** [Makefile:136:all] error 2

arm cmake err

macoroConfig.cmake : /volepsi/out/install/linux/lib/cmake/macoro/macoroConfig.cmake
CMake Error at /cmake-3.22.0-linux-aarch64/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/cmake-3.22.0-linux-aarch64/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/cmake-3.22.0-linux-aarch64/share/cmake-3.22/Modules/FindThreads.cmake:238 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/volepsi/out/install/linux/lib/cmake/macoro/macoroFindDeps.cmake:71 (find_package)
/volepsi/out/install/linux/lib/cmake/macoro/macoroConfig.cmake:19 (include)
/volepsi/out/install/linux/lib/cmake/coproto/coprotoFindDeps.cmake:77 (find_package)
/volepsi/out/install/linux/lib/cmake/coproto/coprotoFindDeps.cmake:87 (FIND_MACORO)
/volepsi/out/install/linux/lib/cmake/coproto/coprotoConfig.cmake:15 (include)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:215 (find_package)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:221 (FIND_COPROTO)
cryptoTools/CMakeLists.txt:154 (include)

-- Configuring incomplete, errors occurred!
See also "/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeOutput.log".
See also "/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeError.log".
CMake Error at thirdparty/fetch.cmake:22 (file):
file failed to open for reading (No such file or directory):

/volepsi/thirdparty/log-libOTe.txt

Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

CMake Error at thirdparty/fetch.cmake:23 (message):
libOTe Configure failed (1).
Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

-- Configuring incomplete, errors occurred!
See also "/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'. Stop.

The performance described in the paper is not achieved

here are my test result:

截屏2022-12-09 下午8 06 06

execute commands:
csv:
./frontend -in data_A_csv.csv -r 0 -out data_out_A_csv.csv -csv
./frontend -in data_B_csv.csv -r 1 -out data_out_B_csv.csv -csv

bin:
./frontend -in data_A_bin -r 0 -out data_out_A_bin -bin
./frontend -in data_B_bin -r 1 -out data_out_B_bin -bin

build vole psi error: Missing components: no_asan;no_pic;sodium_montgomery

Hello professor!

@ladnir I have locally install libOTE with the following build options:

 python build.py --all --boost --relic -D ENABLE_SILENTOT=ON -D ENABLE_ASAN=ON -D SODIUM_MONTGOMERY=ON -D OC_PIC=ON -D ENABLE_CIRCUITS=ON

python build.py --install=/usr/local/libOTe

And all unit case of the libOTe library were passed.

But when I build volepsi, the following error was produced. How can i fix it?
Build command

python build.py -D FETCH_AUTO=false -D VOLE_PSI_NO_SYSTEM_PATH=true -D CMAKE_PREFIX_PATH=/usr/local/libOTe -DFETCH_LIBOTE=false

Error log:

====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux  -D FETCH_AUTO=false -D VOLE_PSI_NO_SYSTEM_PATH=true -D CMAKE_PREFIX_PATH=/usr/local/libOTe -DFETCH_LIBOTE=false -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DVOLE_PSI_NO_SYSTEM_PATH=true -DPARALLEL_FETCH=40 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux   --parallel 40 
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv


-- vole-psi options
=======================================================
-- Option: VOLE_PSI_NO_SYSTEM_PATH    = true
-- Option: CMAKE_BUILD_TYPE           = Release

-- Option: FETCH_AUTO                 = ON
-- Option: FETCH_SPARSEHASH           = 
-- Option: FETCH_LIBOTE               = false


-- Option: VOLE_PSI_ENABLE_SSE        = ON
-- Option: VOLE_PSI_ENABLE_PIC        = OFF
-- Option: VOLE_PSI_ENABLE_ASAN       = OFF
-- Option: VOLE_PSI_STD_VER           = 17
-- Option: VOLE_PSI_ENABLE_GMW        = ON
-- Option: VOLE_PSI_ENABLE_CPSI       = ON
-- Option: VOLE_PSI_ENABLE_OPPRF      = ON

-- Option: VOLE_PSI_ENABLE_BOOST      = ON
-- Option: VOLE_PSI_ENABLE_OPENSSL    = OFF
-- Option: VOLE_PSI_ENABLE_BITPOLYMUL = ON
-- Option: VOLE_PSI_ENABLE_SODIUM     = ON
-- Option: VOLE_PSI_SODIUM_MONTGOMERY = ON
-- Option: VOLE_PSI_ENABLE_RELIC      = OFF
-- VOLEPSI_THIRDPARTY_DIR=/projects/volepsi/out/install/linux
-- CLONE DIR: /projects/volepsi/thirdparty/sparsehash-c11
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/projects/volepsi/out/install/linux/include



libOTe_options=silentot;silent_vole;circuits;sse;boost;bitpolymul;no_asan;no_pic;sodium;sodium_montgomery
Found incompatible libOTe at /usr/local/libOTe/lib64/cmake/libOTe. Missing components: no_asan;no_pic;sodium_montgomery
Found incompatible libOTe at /usr/local/libOTe/lib64/cmake/libOTe. Missing components: no_asan;no_pic;sodium_montgomery
CMake Error at cmake/findDependancies.cmake:104 (find_package):
  Could not find a configuration file for package "libOTe" that is compatible
  with requested version "".

  The following configuration files were considered but not accepted:

    /usr/local/libOTe/lib64/cmake/libOTe/libOTeConfig.cmake, version: 2.0.4

Call Stack (most recent call first):
  cmake/findDependancies.cmake:119 (FIND_LIBOTE)
  CMakeLists.txt:16 (include)


-- Configuring incomplete, errors occurred!
See also "/projects/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
gmake: *** No targets specified and no makefile found.  Sto

build macoro wrong

my gcc version is 11.2.0

[ 5%] Building CXX object macoro/CMakeFiles/macoro.dir/detail/stop_callback.cpp.o
c++: error: unrecognized command line option ‘-std=c++17’
gmake[2]: *** [macoro/CMakeFiles/macoro.dir/detail/stop_callback.cpp.o] Error 1
gmake[1]: *** [macoro/CMakeFiles/macoro.dir/all] Error 2
gmake: *** [all] Error 2
CMake Error at thirdparty/fetch.cmake:28 (message):
Build failed (2).
Call Stack (most recent call first):
thirdparty/getMacoro.cmake:51 (run)
cmake/coprotoFindDeps.cmake:85 (include)
CMakeLists.txt:21 (include)

-- Configuring incomplete, errors occurred!
See also "/data1/jhjiang/iflearner_psi_new/volepsi/out/coproto/out/build/linux/CMakeFiles/CMakeOutput.log".
CMake Error at cryptoTools/thirdparty/fetch.cmake:21 (message):
Configure failed (1).
Call Stack (most recent call first):
cryptoTools/thirdparty/getCoproto.cmake:50 (run)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:222 (include)
cryptoTools/CMakeLists.txt:154 (include)

-- Configuring incomplete, errors occurred!
See also "/data1/jhjiang/iflearner_psi_new/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeOutput.log".
libOTe Build

'/usr/local/bin/cmake' '--build' '/data1/jhjiang/iflearner_psi_new/volepsi/out/libOTe/out/build/linux' '--config' 'Release'
gmake: Makefile: No such file or directory
gmake: *** No rule to make target `Makefile'. Stop.
libOTe Install

'/usr/local/bin/cmake' '--install' '/data1/jhjiang/iflearner_psi_new/volepsi/out/libOTe/out/build/linux' '--config' 'Release' '--prefix' '/data1/jhjiang/iflearner_psi_new/volepsi/out/install/linux'
log /data1/jhjiang/iflearner_psi_new/volepsi/thirdparty/log-libOTe.txt

libOTe_options=silentot;silent_vole;circuits;sse;boost;bitpolymul;no_asan;no_pic;sodium;sodium_montgomery

libOTe_options=REQUIRED;NO_DEFAULT_PATH;PATHS;/data1/jhjiang/iflearner_psi_new/volepsi/out/install/linux
CMake Error at cmake/findDependancies.cmake:105 (find_package):
Could not find a package configuration file provided by "libOTe" with any
of the following names:

libOTeConfig.cmake
libote-config.cmake

Add the installation prefix of "libOTe" to CMAKE_PREFIX_PATH or set
"libOTe_DIR" to a directory containing one of the above files. If "libOTe"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/findDependancies.cmake:119 (FIND_LIBOTE)
CMakeLists.txt:15 (include)

-- Configuring incomplete, errors occurred!
See also "/data1/jhjiang/iflearner_psi_new/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
gmake: Makefile: No such file or directory
gmake: *** No rule to make target `Makefile'. Stop.
You have mail in /var/spool/mail/root

Circuit-PSI with different dataset sizes

Hi,

I tried modifying perf.cpp to separate n to n_sender and n_receiver. More specifically I changed lines 464 and 465 as well as 468.

It crashes at line 483 with:

terminate called without an active exception
[1]    32658 IOT instruction (core dumped)

Is this something that can be supported by the protocol?

how to get a dynamic link library about volepsi

I want to get a dynamic link library. I modifed STATIC to SHARED at the file of volepsi/volePSI/cmakelists.txt.
it report error as follow:

/usr/bin/ld: /home/cc/VOLE/volepsi-main/out/install/linux/lib/liblibOTe.a(Mtx.cpp.o): relocation R_X86_64_PC32 against symbol `_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

too much undefined reference

when I run
python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON
there are all undefined reference like this

/usr/local/include/libOTe/TwoChooseOne/Iknp/IknpOtExtSender.h:43: undefined reference to vtable for osuCrypto::IknpOtExtSender' /usr/local/include/libOTe/TwoChooseOne/Iknp/IknpOtExtSender.h:43: undefined reference to vtable for osuCrypto::IknpOtExtSender'
../volePSI/libvolePSI.a(RsCpsi.cpp.o): In function volePSI::RsCpsiSender::send(nonstd::span_lite::span<osuCrypto::block, 18446744073709551615ul>, osuCrypto::MatrixView<unsigned char>, volePSI::RsCpsiSender::Sharing&, coproto::Socket&)::{lambda(macoro::FrameBase<macoro::detail::task_promise<void, true> >*)#1}::operator()(macoro::FrameBase<macoro::detail::task_promise<void, true> >*)': /home/test/Desktop/volepsi/volePSI/RsCpsi.cpp:130: undefined reference to osuCrypto::BetaCircuit::~BetaCircuit()'
/home/test/Desktop/volepsi/volePSI/RsCpsi.cpp:130: undefined reference to `osuCrypto::BetaCircuit::~BetaCircuit()'

Some benchmarking problem

Hello, professor. I've recently built volepsi on my machine.
When using ./frontend -perf -psi -nn 20 -v -nt 1 -t 5 for testing, the message below appeared.

t 1 fakeBase 0 n 1048576
coproto::code::remoteClosed: The connection has been closed by the remote party.
coproto::code::badCoprotoMessageHeader: Received a corrupted/invalid protocol message header
coproto::code::remoteClosed: The connection has been closed by the remote party.
coproto::code::badCoprotoMessageHeader: Received a corrupted/invalid protocol message header
coproto::code::remoteClosed: The connection has been closed by the remote party.
coproto::code::badCoprotoMessageHeader: Received a corrupted/invalid protocol message header
coproto::code::remoteClosed: The connection has been closed by the remote party.
coproto::code::badCoprotoMessageHeader: Received a corrupted/invalid protocol message header
Label     Time (ms)  diff (ms)
__________________________________
end           725.1    725.075  **********
begin         729.0      3.881  **
end           932.8    203.815  ********
begin         932.8      0.006  
end          1116.3    183.533  ********
begin        1116.3      0.006  
end          1300.7    184.335  ********
begin        1300.7      0.006  
end          1481.3    180.622  ********

23693261 10690853

There're two questions:

  1. Why there're remoteClosed and badCoprotoMessageHeader message taking place?
  2. The 2nd to 4th rounds are much faster than the first round. It is because these failures? (I mean, the remoteClosed and badCoprotoMessageHeader errors.)

MACOSX build err

python3 build.py -DVOLE_PSI_ENABLE_BOOST=ON

-- Configured operating system: MACOSX
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Compiler flags: -Wall -pipe -std=c99 -O2 -funroll-loops -fomit-frame-pointer -pthread
-- Linker flags: -L/volepsi/out/relic/src/low/easy/
-- Configured /volepsi/out/relic/include/relic_conf.h.in with backend easy
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /volepsi/out/relic/build/osx
Build
'/Applications/CMake.app/Contents/bin/cmake' '--build' '/volepsi/out/relic/build/osx' '--config' 'Release'
[ 0%] Built target arith_objs
[ 1%] Building C object src/CMakeFiles/relic.dir/relic_err.c.o
In file included from /volepsi/out/relic/src/relic_err.c:37:
In file included from /volepsi/out/relic/include/relic_core.h:44:
In file included from /volepsi/out/relic/include/relic_err.h:43:
In file included from /volepsi/out/relic/include/relic_util.h:39:
In file included from /volepsi/out/relic/include/relic_arch.h:39:
/volepsi/out/relic/include/relic_types.h:43:32: error: invalid token at start of a preprocessor expression
#if defined(_MSC_VER) && WSIZE == 64
^
/volepsi/out/relic/include/relic_types.h:59:5: error: expected value in expression
#if RLC_DIG == 8
^
/volepsi/out/relic/include/relic_types.h:54:25: note: expanded from macro 'RLC_DIG'
#define RLC_DIG (WSIZE)
^
/volepsi/out/relic/include/relic_types.h:61:7: error: expected value in expression
#elif RLC_DIG == 16
^
/volepsi/out/relic/include/relic_types.h:54:25: note: expanded from macro 'RLC_DIG'
#define RLC_DIG (WSIZE)
^
/volepsi/out/relic/include/relic_types.h:63:7: error: expected value in expression
#elif RLC_DIG == 32
^
/volepsi/out/relic/include/relic_types.h:54:25: note: expanded from macro 'RLC_DIG'
#define RLC_DIG (WSIZE)
^
/volepsi/out/relic/include/relic_types.h:65:7: error: expected value in expression
#elif RLC_DIG == 64
^
/volepsi/out/relic/include/relic_types.h:54:25: note: expanded from macro 'RLC_DIG'
#define RLC_DIG (WSIZE)
^
/volepsi/out/relic/include/relic_types.h:81:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 8
^
/volepsi/out/relic/include/relic_types.h:83:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 16
^
/volepsi/out/relic/include/relic_types.h:85:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 32
^
/volepsi/out/relic/include/relic_types.h:87:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 64
^
/volepsi/out/relic/include/relic_types.h:94:11: error: invalid token at start of a preprocessor expression
#if WSIZE == 8
^
/volepsi/out/relic/include/relic_types.h:96:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 16
^
/volepsi/out/relic/include/relic_types.h:98:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 32
^
/volepsi/out/relic/include/relic_types.h:100:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 64
^
/volepsi/out/relic/include/relic_types.h:109:11: error: invalid token at start of a preprocessor expression
#if WSIZE == 8
^
/volepsi/out/relic/include/relic_types.h:111:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 16
^
/volepsi/out/relic/include/relic_types.h:113:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 32
^
/volepsi/out/relic/include/relic_types.h:115:13: error: invalid token at start of a preprocessor expression
#elif WSIZE == 64
^
In file included from /volepsi/out/relic/src/relic_err.c:37:
In file included from /volepsi/out/relic/include/relic_core.h:44:
In file included from /volepsi/out/relic/include/relic_err.h:43:
In file included from /volepsi/out/relic/include/relic_util.h:39:
/volepsi/out/relic/include/relic_arch.h:96:19: error: a parameter list without types is only allowed in a function definition
uint_t arch_lzcnt(dig_t);
^
In file included from /volepsi/out/relic/src/relic_err.c:37:
In file included from /volepsi/out/relic/include/relic_core.h:44:
In file included from /volepsi/out/relic/include/relic_err.h:43:
/volepsi/out/relic/include/relic_util.h:280:21: error: unknown type name 'dig_t'
char util_conv_char(dig_t i);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/CMakeFiles/relic.dir/relic_err.c.o] Error 1
make[1]: *** [src/CMakeFiles/relic.dir/all] Error 2
make: *** [all] Error 2
CMake Error at cryptoTools/thirdparty/fetch.cmake:21 (message):
Build failed (2).
Call Stack (most recent call first):
cryptoTools/thirdparty/getRelic.cmake:48 (run)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:72 (include)
cryptoTools/CMakeLists.txt:154 (include)

-- Configuring incomplete, errors occurred!
See also "/volepsi/out/libOTe/out/build/osx/CMakeFiles/CMakeOutput.log".
See also "/volepsi/out/libOTe/out/build/osx/CMakeFiles/CMakeError.log".
CMake Error at thirdparty/fetch.cmake:22 (file):
file failed to open for reading (No such file or directory):

/volepsi/thirdparty/log-libOTe.txt

Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

CMake Error at thirdparty/fetch.cmake:23 (message):
libOTe Configure failed (1).
Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

-- Configuring incomplete, errors occurred!
See also "/volepsi/out/build/osx/CMakeFiles/CMakeOutput.log".
See also "/volepsi/out/build/osx/CMakeFiles/CMakeError.log".
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.

Get error when build

I cloned and build this project as:
sudo python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON
and the error infomation is:

==========================================
CMake Error at cmake/findDependancies.cmake:57 (find_package):
  By not providing "FindlibOTe.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "libOTe", but
  CMake did not find one.

  Could not find a package configuration file provided by "libOTe" with any
  of the following names:

    libOTeConfig.cmake
    libote-config.cmake

  Add the installation prefix of "libOTe" to CMAKE_PREFIX_PATH or set
  "libOTe_DIR" to a directory containing one of the above files.  If "libOTe"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  cmake/findDependancies.cmake:71 (FIND_LIBOTE)
  CMakeLists.txt:14 (include)


-- Configuring incomplete, errors occurred!

I see the issue#11 , and add -DSODIUM_MONTGOMERY=false into volepsi/thirdparty/getLibOTe.cmake
but the error still occurs

fileBased.cpp/std::vector<block> readSet(const std::string& path, FileType ft, bool debug)

Hello, Professor. I am having a problem reading .csv files using readSet. The result of encrypting the same input is different when the .csv is in the format of figure a and the .csv is in the format of figure b?
image

image

image

image

For example enter = 990235009163719316. The first code encrypted is: ba943fbe42b9fa9a1d4c2d9b5dc9efb6 The second code is encrypted as f3f0977179abee1e55fa6abadbd3ac9a Why?

malicious PSI protocol

Blazing Fast PSI from Improved OKVS and Subfield VOLE,Where is the malicious PSI protocol embodied?

Errors in build

Hello professor, sorry to disturb you. I run the build command on my macbook, and an error happens. I tried to switch to another previous version of volepsi, but the same error appeared again.
The error information is as follows.


[100%] Linking CXX executable frontend_libOTe
Undefined symbols for architecture x86_64:
"coproto::internal::SockScheduler::initLocalSlot(coproto::SessionID const&, coproto::internal::ExecutorRef const&, std::__1::unique_lockstd::__1::mutex&)", referenced from:
void coproto::internal::SockScheduler::initcoproto::LocalAsyncSocket::Sock(coproto::LocalAsyncSocket::Sock*, coproto::SessionID) in main.cpp.o
void coproto::internal::SockScheduler::init<coproto::detail::AsioSocket<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::any_io_executor> >::Sock>(coproto::detail::AsioSocket<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::any_io_executor> >::Sock*, coproto::SessionID) in main.cpp.o
void coproto::internal::SockScheduler::initcoproto::BufferingSocket::SockImpl(coproto::BufferingSocket::SockImpl*, coproto::SessionID) in main.cpp.o
void coproto::internal::SockScheduler::initcoproto::LocalAsyncSocket::Sock(coproto::LocalAsyncSocket::Sock*, coproto::SessionID) in liblibOTe_Tests.a(SilentOT_Tests.cpp.o)
void coproto::internal::SockScheduler::initcoproto::LocalAsyncSocket::Sock(coproto::LocalAsyncSocket::Sock*, coproto::SessionID) in liblibOTe_Tests.a(Vole_Tests.cpp.o)
void coproto::internal::SockScheduler::initcoproto::BufferingSocket::SockImpl(coproto::BufferingSocket::SockImpl*, coproto::SessionID) in liblibOTe_Tests.a(Vole_Tests.cpp.o)
void coproto::internal::SockScheduler::initcoproto::LocalAsyncSocket::Sock(coproto::LocalAsyncSocket::Sock*, coproto::SessionID) in liblibOTe_Tests.a(OT_Tests.cpp.o)
...
"coproto::internal::SockScheduler::send(coproto::SessionID, coproto::internal::SendBuffer&&, macoro::coroutine_handle, macoro::stop_token&&, bool)", referenced from:
auto macoro::await_suspend<coproto::internal::MoveSendProto, macoro::detail::blocking_promise >(coproto::internal::MoveSendProto&, macoro::coroutine_handle<macoro::detail::blocking_promise >, std::__1::enable_if<(!(has_void_await_suspend<coproto::internal::MoveSendProto&, std::__1>::value)) && (!(has_bool_await_suspend<coproto::internal::MoveSendProto&, std::__1>::value)), macoro::empty_state>::type) in main.cpp.o
macoro::coroutine_handle coproto::internal::MoveSendProto<std::__1::vector<osuCrypto::FeistelRistPopf::PopfFunc, std::__1::allocatorosuCrypto::FeistelRistPopf::PopfFunc > >::await_suspend<macoro::coroutine_handle<macoro::detail::task_promise<void, true> > >(macoro::coroutine_handle<macoro::detail::task_promise<void, true> > const&) in main.cpp.o
macoro::coroutine_handle coproto::internal::MoveSendProto<std::__1::vector<unsigned char, std::__1::allocator > >::await_suspend<macoro::coroutine_handle<macoro::detail::task_promise<void, true> > >(macoro::coroutine_handle<macoro::detail::task_promise<void, true> > const&) in main.cpp.o
macoro::coroutine_handle coproto::internal::MoveSendProto<std::__1::vector<osuCrypto::FeistelMulRistPopf::PopfFunc, std::__1::allocatorosuCrypto::FeistelMulRistPopf::PopfFunc > >::await_suspend<macoro::coroutine_handle<macoro::detail::task_promise<void, true> > >(macoro::coroutine_handle<macoro::detail::task_promise<void, true> > const&) in main.cpp.o
auto macoro::await_suspend<coproto::internal::RefSendProto, macoro::detail::task_promise<void, true> >(coproto::internal::RefSendProto&, macoro::coroutine_handle<macoro::detail::task_promise<void, true> >, std::__1::enable_if<(!(has_void_await_suspend<coproto::internal::RefSendProto&, std::__1>::value)) && (!(has_bool_await_suspend<coproto::internal::RefSendProto&, std::__1>::value)), macoro::empty_state>::type) in util.cpp.o
auto macoro::await_suspend<coproto::internal::MoveSendProto, macoro::detail::task_promise<void, true> >(coproto::internal::MoveSendProto&, macoro::coroutine_handle<macoro::detail::task_promise<void, true> >, std::__1::enable_if<(!(has_void_await_suspend<coproto::internal::MoveSendProto&, std::__1>::value)) && (!(has_bool_await_suspend<coproto::internal::MoveSendProto&, std::__1>::value)), macoro::empty_state>::type) in util.cpp.o
macoro::coroutine_handle coproto::internal::MoveSendProto<std::__1::vector<osuCrypto::FeistelRistPopf::PopfFunc, std::__1::allocatorosuCrypto::FeistelRistPopf::PopfFunc > >::await_suspend<macoro::coroutine_handle<macoro::detail::task_promise<void, true> > >(macoro::coroutine_handle<macoro::detail::task_promise<void, true> > const&) in liblibOTe.a(OTExtInterface.cpp.o)
...
ld: symbol(s) not found for architecture x86_64
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [frontend/frontend_libOTe] Error 1
make[1]: *** [frontend/CMakeFiles/frontend_libOTe.dir/all] Error 2
make: *** [all] Error 2
CMake Error at thirdparty/fetch.cmake:22 (file):
file failed to open for reading (No such file or directory):

/Users/yc/vvolepsi/thirdparty/log-libOTe.txt

Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:63 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

CMake Error at thirdparty/fetch.cmake:23 (message):
libOTe Build failed (2).
Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:63 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

-- Configuring incomplete, errors occurred!
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.

Failed to build on Ubuntu

Hi authors, I ran into some error when trying to run python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON on Ubuntu.
`root@docker-desktop:/volepsi# python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON

====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DPARALLEL_FETCH=6 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux --parallel 6
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- vole-psi options

-- Option: FETCH_AUTO = ON
-- Option: FETCH_SPARSEHASH =
-- Option: FETCH_LIBOTE =
-- Option: FETCH_LIBDIVIDE =
-- Option: VERBOSE_FETCH = ON

-- Option: VOLE_PSI_ENABLE_SSE = ON
-- Option: VOLE_PSI_PIC = OFF
-- Option: VOLE_PSI_ENABLE_GMW = ON
-- Option: VOLE_PSI_ENABLE_CPSI = ON
-- Option: VOLE_PSI_ENABLE_OPPRF = ON

-- Option: COPROTO_ENABLE_BOOST = ON
-- Option: COPROTO_ENABLE_OPENSSL = ON
-- Option: LIBOTE_ENABLE_BITPOLYMUL = ON
-- VOLEPSI_THIRDPARTY_DIR=/volepsi/out/install/linux
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/usr/local/include
-- SODIUM_INCLUDE_DIRS: /usr/local/include
-- SODIUM_LIBRARIES: /usr/local/lib/libsodium.a
-- SODIUM_MONTGOMERY: ON

-- Option: COPROTO_STAGE =
macoroConfig.cmake : /usr/local/lib/cmake/macoro/macoroConfig.cmake
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/local/lib/cmake/Boost-1.77.0/BoostConfig.cmake (found suitable version "1.77.0", minimum required is "1.77.0") found components: system thread regex

Boost_LIB: Boost::system;Boost::thread;Boost::regex
-- Boost_INC: /usr/local/include

-- bitpolymulConfig.cmake : /usr/local/lib/cmake/bitpolymul
libOTe already fetched.
-- SODIUM_INCLUDE_DIRS: /usr/local/include
-- SODIUM_LIBRARIES: /usr/local/lib/libsodium.a
-- SODIUM_MONTGOMERY: ON

-- Option: COPROTO_STAGE =
macoroConfig.cmake : /usr/local/lib/cmake/macoro/macoroConfig.cmake

Boost_LIB: Boost::system;Boost::thread;Boost::regex
-- Boost_INC: /usr/local/include

-- bitpolymulConfig.cmake : /usr/local/lib/cmake/bitpolymul
============= Building libdivide =============
Cloning https://github.com/ridiculousfish/libdivide.git
'/usr/bin/git' 'clone' 'https://github.com/ridiculousfish/libdivide.git'
Cloning into 'libdivide'...
Checkout b322221677351ebb11f0a42fe9a9a2794da5bfe5
'/usr/bin/git' 'checkout' 'b322221677351ebb11f0a42fe9a9a2794da5bfe5'
Note: switching to 'b322221677351ebb11f0a42fe9a9a2794da5bfe5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at b322221 Stop passing multiple targets to cmake build
Install
log /volepsi/thirdparty/log-libdivide.txt

-- LIBDIVIDE_INCLUDE_DIRS: /volepsi/out/install/linux/include
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

PARALLEL_FETCH

-- Build files have been written to: /volepsi/out/build/linux
[ 4%] Building CXX object volePSI/CMakeFiles/volePSI.dir/RsOprf.cpp.o
[ 9%] Building CXX object volePSI/CMakeFiles/volePSI.dir/RsPsi.cpp.o
[ 13%] Building CXX object volePSI/CMakeFiles/volePSI.dir/SimpleIndex.cpp.o
[ 18%] Building CXX object volePSI/CMakeFiles/volePSI.dir/fileBased.cpp.o
[ 22%] Building CXX object volePSI/CMakeFiles/volePSI.dir/GMW/Gmw.cpp.o
[ 27%] Building CXX object volePSI/CMakeFiles/volePSI.dir/GMW/Circuit.cpp.o
In file included from /volepsi/volePSI/GMW/Circuit.cpp:1:
/volepsi/volePSI/GMW/Circuit.h:18:19: error: static assertion failed: ENABLE_CIRCUITS not defined in cryptoTools
18 | static_assert(0, "ENABLE_CIRCUITS not defined in cryptoTools");
| ^
compilation terminated due to -Wfatal-errors.
make[2]: *** [volePSI/CMakeFiles/volePSI.dir/build.make:132: volePSI/CMakeFiles/volePSI.dir/GMW/Circuit.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /volepsi/volePSI/GMW/Gmw.h:14,
from /volepsi/volePSI/GMW/Gmw.cpp:1:
/volepsi/volePSI/../volePSI/GMW/Circuit.h:18:19: error: static assertion failed: ENABLE_CIRCUITS not defined in cryptoTools
18 | static_assert(0, "ENABLE_CIRCUITS not defined in cryptoTools");
| ^
compilation terminated due to -Wfatal-errors.
make[2]: *** [volePSI/CMakeFiles/volePSI.dir/build.make:146: volePSI/CMakeFiles/volePSI.dir/GMW/Gmw.cpp.o] Error 1
/volepsi/volePSI/fileBased.cpp: In function ‘void volePSI::writeOutput(std::string, volePSI::FileType, const std::vector&, bool, std::string’:
/volepsi/volePSI/fileBased.cpp:203:23: warning: comparison of integer expressions of different signedness: ‘volePSI::u64’ {aka ‘long unsigned int’} and ‘std::streamoff’ {aka ‘long int’} [-Wsign-compare]
203 | for (u64 i = 0; i < size; ++i)
| ~~^~~~~~
make[1]: *** [CMakeFiles/Makefile2:134: volePSI/CMakeFiles/volePSI.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
`

some problem about your OPPRF

Hi,

For a project, I need to implement the malicious OPPRF that is against both malicious sender and receiver, I was going to use the PAXOS and OOS OT to implement that using the cryptobiu/PaXoS_PSI before, their code is very clear, but I'm unfamiliar with their programming style

And I have always used your library libPSI and very like your programming style. And your reply to the issues is very timely. Today, I see this paper vole-psi, which achieves malicious security, but I have not read the paper completely for time concern, it seems that your RSOPPRF can satisfy my needs, I want to first confirm that whether your RSOPPRF.h is malicious against both malicious sender and receiver, can I use that to achieve my aim. I'm sorry to bother you before I have fully read the paper.

Thank you!

perform [manually]

Hi authors, I recently tried to run the example on how to perform [manually] get & send the protocol messages.
And I want to obtain the intersection results from the recevier, however it shows that the intersection size is 0 when I use ./frontend -messagePassing.

Code:
// that it need to receive a message from the other party.
auto protocol = recevier.run(set, sock) | macoro::make_eager();
// Perform the communication and complete the protocol.
communicate(protocol, false, sock, verbose);
std::cout << "size:"<< recevier.mIntersection.size()<<std::endl;
std::cout << "recver done\n";

Output:
sender done
size:0
recver done

I think its size should be 100, but it is 0. I dont know whither I made a mistake?

aarch64 cmake error

# lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: 0x48
Model: 0
Stepping: 0x1
CPU max MHz: 2600.0000
CPU min MHz: 2600.0000
BogoMIPS: 200.00
L1d cache: 256 KiB
L1i cache: 256 KiB
L2 cache: 2 MiB
L3 cache: 32 MiB
NUMA node0 CPU(s): 0-3
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Vulnerable
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
build parames:
python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DVOLE_PSI_ENABLE_BITPOLYMUL=false -DVOLE_PSI_ENABLE_SSE=false -DVOLE_PSI_ENABLE_GMW=false -DVOLE_PSI_ENABLE_CPSI=false

boost has been successfully built:
/home/vole# ll /home/vole/volepsi/out/install/linux/lib/
total 6768
drwxr-xr-x 4 root root 4096 Oct 19 09:58 ./
drwxr-xr-x 4 root root 68 Oct 19 09:53 ../
drwxr-xr-x 17 root root 4096 Oct 19 09:58 cmake/
-rw-r--r-- 1 root root 9864 Oct 19 09:55 libboost_atomic.a
lrwxrwxrwx 1 root root 25 Oct 19 09:55 libboost_atomic.so -> libboost_atomic.so.1.77.0*
-rwxr-xr-x 1 root root 18800 Oct 19 09:55 libboost_atomic.so.1.77.0*
-rw-r--r-- 1 root root 1506 Oct 19 09:55 libboost_date_time.a
lrwxrwxrwx 1 root root 28 Oct 19 09:55 libboost_date_time.so -> libboost_date_time.so.1.77.0*
-rwxr-xr-x 1 root root 7984 Oct 19 09:55 libboost_date_time.so.1.77.0*
-rw-r--r-- 1 root root 553590 Oct 19 09:55 libboost_filesystem.a
lrwxrwxrwx 1 root root 29 Oct 19 09:55 libboost_filesystem.so -> libboost_filesystem.so.1.77.0*
-rwxr-xr-x 1 root root 161432 Oct 19 09:55 libboost_filesystem.so.1.77.0*
-rw-r--r-- 1 root root 746128 Oct 19 09:55 libboost_regex.a
lrwxrwxrwx 1 root root 24 Oct 19 09:55 libboost_regex.so -> libboost_regex.so.1.77.0*
-rwxr-xr-x 1 root root 351872 Oct 19 09:55 libboost_regex.so.1.77.0*
-rw-r--r-- 1 root root 1484 Oct 19 09:55 libboost_system.a
lrwxrwxrwx 1 root root 25 Oct 19 09:55 libboost_system.so -> libboost_system.so.1.77.0*
-rwxr-xr-x 1 root root 7968 Oct 19 09:55 libboost_system.so.1.77.0*
-rw-r--r-- 1 root root 352246 Oct 19 09:55 libboost_thread.a
lrwxrwxrwx 1 root root 25 Oct 19 09:55 libboost_thread.so -> libboost_thread.so.1.77.0*
-rwxr-xr-x 1 root root 154680 Oct 19 09:55 libboost_thread.so.1.77.0*
-rw-r--r-- 1 root root 276880 Oct 19 09:56 libcoproto.a
-rw-r--r-- 1 root root 28790 Oct 19 09:52 libmacoro.a
-rw-r--r-- 1 root root 2662870 Oct 19 09:52 libsodium.a
-rwxr-xr-x 1 root root 994 Oct 19 09:52 libsodium.la*
lrwxrwxrwx 1 root root 19 Oct 19 09:52 libsodium.so -> libsodium.so.27.0.0*
lrwxrwxrwx 1 root root 19 Oct 19 09:52 libsodium.so.27 -> libsodium.so.27.0.0*
-rwxr-xr-x 1 root root 1551936 Oct 19 09:52 libsodium.so.27.0.0*
drwxr-xr-x 2 root root 26 Oct 19 09:52 pkgconfig/

/home/vole/volepsi# python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DVOLE_PSI_ENABLE_BITPOLYMUL=false -DVOLE_PSI_ENABLE_SSE=false -DVOLE_PSI_ENABLE_GMW=false -DVOLE_PSI_ENABLE_CPSI=false

====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DVOLE_PSI_ENABLE_BITPOLYMUL=false -DVOLE_PSI_ENABLE_SSE=false -DVOLE_PSI_ENABLE_GMW=false -DVOLE_PSI_ENABLE_CPSI=false -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DVOLE_PSI_NO_SYSTEM_PATH=true -DPARALLEL_FETCH=4 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux --parallel 4
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

warning, setting VOLE_PSI_ENABLE_BOOST as COPROTO_ENABLE_BOOST=ON
warning, setting VOLE_PSI_ENABLE_OPENSSL as COPROTO_ENABLE_OPENSSL=ON
-- vole-psi options

-- Option: VOLE_PSI_NO_SYSTEM_PATH = true
-- Option: CMAKE_BUILD_TYPE = Release

-- Option: FETCH_AUTO = ON
-- Option: FETCH_SPARSEHASH =
-- Option: FETCH_LIBOTE =

-- Option: VOLE_PSI_ENABLE_SSE = false
-- Option: VOLE_PSI_ENABLE_PIC = OFF
-- Option: VOLE_PSI_ENABLE_ASAN = OFF
-- Option: VOLE_PSI_STD_VER = 17
-- Option: VOLE_PSI_ENABLE_GMW = false
-- Option: VOLE_PSI_ENABLE_CPSI = false
-- Option: VOLE_PSI_ENABLE_OPPRF = ON

-- Option: VOLE_PSI_ENABLE_BOOST = ON
-- Option: VOLE_PSI_ENABLE_OPENSSL = ON
-- Option: VOLE_PSI_ENABLE_BITPOLYMUL = false
-- Option: VOLE_PSI_ENABLE_SODIUM = ON
-- Option: VOLE_PSI_SODIUM_MONTGOMERY = ON
-- Option: VOLE_PSI_ENABLE_RELIC = OFF
-- VOLEPSI_THIRDPARTY_DIR=/home/vole/volepsi/out/install/linux
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/home/vole/volepsi/out/install/linux/include

libOTe_options=silentot;silent_vole;circuits;no_sse;boost;openssl;no_asan;no_pic;sodium;sodium_montgomery
============= Building libOTe =============
libOTe Checkout 747b4fd3dcbc7618e78dbafdf975a8fb617a6bdd
'/usr/bin/git' 'checkout' '747b4fd3dcbc7618e78dbafdf975a8fb617a6bdd'
HEAD is now at 747b4fd lib divide fix
libOTe submodule
'/usr/bin/git' 'submodule' 'update' '--recursive'
libOTe Configure
'/usr/local/bin/cmake' '-S' '/home/vole/volepsi/out/libOTe' '-B' '/home/vole/volepsi/out/libOTe/out/build/linux' '-DCMAKE_INSTALL_PREFIX=/usr/local' '-DCMAKE_PREFIX_PATH=/home/vole/volepsi/out/install/linux;' '-DNO_SYSTEM_PATH=true' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DFETCH_AUTO=ON' '-DVERBOSE_FETCH=ON' '-DENABLE_CIRCUITS=ON' '-DENABLE_MRR=ON' '-DENABLE_IKNP=ON' '-DENABLE_SOFTSPOKEN_OT=ON' '-DENABLE_BITPOLYMUL=false' '-DENABLE_SILENTOT=ON' '-DENABLE_SILENT_VOLE=ON' '-DENABLE_SSE=false' '-DENABLE_BOOST=ON' '-DENABLE_OPENSSL=ON' '-DLIBOTE_STD_VER=17' '-DENABLE_PIC=OFF' '-DENABLE_ASAN=OFF' '-DOC_THIRDPARTY_CLONE_DIR=/home/vole/volepsi/out' '-DOC_THIRDPARTY_INSTALL_PREFIX=/home/vole/volepsi/out/install/linux' '-DENABLE_SODIUM=ON' '-DENABLE_RELIC=OFF' '-DSODIUM_MONTGOMERY=ON'
AVX requires SSE to be enabled.
-- cryptoTools options

-- Option: CRYPTO_TOOLS_STD_VER = 17

-- Option: NO_SYSTEM_PATH = true
-- Option: FETCH_AUTO = ON
-- Option: VERBOSE_FETCH = ON

-- Option: FETCH_RELIC =
-- Option: FETCH_SODIUM =
-- Option: FETCH_BOOST =
-- Option: FETCH_COPROTO =

-- Option: CMAKE_BUILD_TYPE = Release
Release
Debug
RelWithDebInfo
-- Option: ENABLE_SPAN_LITE = ON
-- Option: ENABLE_RELIC = OFF
-- Option: ENABLE_SODIUM = ON
-- Option: ENABLE_BOOST = ON
-- Option: ENABLE_OPENSSL = ON
-- Option: ENABLE_COPROTO = true
-- Option: ENABLE_CIRCUITS = ON
-- Option: ENABLE_SSE = false
-- Option: ENABLE_AVX = OFF
-- Option: ENABLE_PIC = OFF
-- Option: ENABLE_ASAN = OFF

sodium already fetched.
-- SODIUM_INCLUDE_DIRS: /home/vole/volepsi/out/install/linux/include
-- SODIUM_LIBRARIES: /home/vole/volepsi/out/install/linux/lib/libsodium.a
-- SODIUM_MONTGOMERY: ON

macoroConfig.cmake : /home/vole/volepsi/out/install/linux/lib/cmake/macoro/macoroConfig.cmake
CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.20/Modules/FindThreads.cmake:238 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/home/vole/volepsi/out/install/linux/lib/cmake/macoro/macoroFindDeps.cmake:71 (find_package)
/home/vole/volepsi/out/install/linux/lib/cmake/macoro/macoroConfig.cmake:19 (include)
/home/vole/volepsi/out/install/linux/lib/cmake/coproto/coprotoFindDeps.cmake:77 (find_package)
/home/vole/volepsi/out/install/linux/lib/cmake/coproto/coprotoFindDeps.cmake:87 (FIND_MACORO)
/home/vole/volepsi/out/install/linux/lib/cmake/coproto/coprotoConfig.cmake:15 (include)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:215 (find_package)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:221 (FIND_COPROTO)
cryptoTools/CMakeLists.txt:154 (include)

-- Configuring incomplete, errors occurred!
See also "/home/vole/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeOutput.log".
See also "/home/vole/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeError.log".
CMake Error at thirdparty/fetch.cmake:22 (file):
file failed to open for reading (No such file or directory):

/home/vole/volepsi/thirdparty/log-libOTe.txt

Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

CMake Error at thirdparty/fetch.cmake:23 (message):
libOTe Configure failed (1).
Call Stack (most recent call first):
thirdparty/getLibOTe.cmake:62 (run)
cmake/findDependancies.cmake:115 (include)
CMakeLists.txt:14 (include)

-- Configuring incomplete, errors occurred!
See also "/home/vole/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
make: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'. Stop.

I fixed a problem about `python3 build.py -DVOLE_PSI_ENABLE_BOOST=ON `

ERROR:
In the process of Build Boost , not found .../volepsi/out/boost_1_77_0/bootstrap.sh.

MY ENV:

  • Linux centos 7
  • x86_64
  • cmake : 3.26.3
  • gcc : 11.2.1

FIXED WAY:

  • Step 1: Go to boostorg ,and download boost_1_77_0.tar.gz.
  • Step 2: Decompress file.
tar -zxf boost_1_77_0.tzr.gz .
  • Step 3: Replace original file .
# backup(optional)
mv boost_1_77_0 boost_1_77_0_ backup

# replace
mv /your/decompressed/path/boost_1_77_0  /volepsi/out/
  • Step 4: Try again.
python3 build.py -DVOLE_PSI_ENABLE_BOOST=ON

😎

How to use other ValueType?

Hi Professor, I encountered a PRNG error when transposing the data type of the key value to the string。

    Baxos paxos;
    paxos.mDebug = true;
    paxos.init(setSize, 64, 3, 40, PaxosParam::Binary, block(0, 0));
    std::vector<block> inputs(setSize);
    std::vector<std::string> values(setSize);
    std::vector<std::string> pax(paxos.size());
    paxos.solve<std::string>(inputs, oc::span<std::string>(values), oc::span<std::string>(pax), nullptr);

error:

/root/project/volepsi/volePSI/../volePSI/PxUtil.h: In instantiation of 'static void volePSI::PxVector<T>::Helper::randomize(volePSI::PxVector<T>::Helper::mut_iterator, osuCrypto::PRNG&) [with T = std::__cxx11::basic_string<char>; volePSI::PxVector<T>::Helper::mut_iterator = std::__cxx11::basic_string<char>*; volePSI::PxVector<T>::Helper::mut_value_type = std::__cxx11::basic_string<char>]':
/root/project/volepsi/volePSI/../volePSI/PaxosImpl.h:1179:5:   required from 'void volePSI::Paxos<IdxType>::encode(ConstVec&, Vec&, Helper&, volePSI::PRNG*) [with Vec = volePSI::PxVector<std::__cxx11::basic_string<char> >; ConstVec = volePSI::PxVector<const std::__cxx11::basic_string<char> >; Helper = volePSI::PxVector<std::__cxx11::basic_string<char> >::Helper; IdxType = unsigned char; volePSI::PRNG = osuCrypto::PRNG]'
/root/project/volepsi/volePSI/../volePSI/PaxosImpl.h:2616:4:   required from 'void volePSI::Baxos::implParSolve(volePSI::span<const osuCrypto::block>, ConstVec&, Vec&, volePSI::PRNG*, volePSI::u64, Helper&) [with IdxType = unsigned char; Vec = volePSI::PxVector<std::__cxx11::basic_string<char> >; ConstVec = volePSI::PxVector<const std::__cxx11::basic_string<char> >; Helper = volePSI::PxVector<std::__cxx11::basic_string<char> >::Helper; volePSI::span<const osuCrypto::block> = nonstd::span_lite::span<const osuCrypto::block, 18446744073709551615>; volePSI::PRNG = osuCrypto::PRNG; volePSI::u64 = long unsigned int]'
/root/project/volepsi/volePSI/../volePSI/PaxosImpl.h:2578:4:   required from 'void volePSI::Baxos::solve(volePSI::span<const osuCrypto::block>, ConstVec&, Vec&, volePSI::PRNG*, volePSI::u64, Helper&) [with Vec = volePSI::PxVector<std::__cxx11::basic_string<char> >; ConstVec = volePSI::PxVector<const std::__cxx11::basic_string<char> >; Helper = volePSI::PxVector<std::__cxx11::basic_string<char> >::Helper; volePSI::span<const osuCrypto::block> = nonstd::span_lite::span<const osuCrypto::block, 18446744073709551615>; volePSI::PRNG = osuCrypto::PRNG; volePSI::u64 = long unsigned int]'
/root/project/volepsi/volePSI/../volePSI/PaxosImpl.h:2527:3:   required from 'void volePSI::Baxos::solve(volePSI::span<const osuCrypto::block>, volePSI::span<const ValueType>, volePSI::span<IdxType>, volePSI::PRNG*, volePSI::u64) [with ValueType = std::__cxx11::basic_string<char>; volePSI::span<const osuCrypto::block> = nonstd::span_lite::span<const osuCrypto::block, 18446744073709551615>; volePSI::span<const ValueType> = nonstd::span_lite::span<const std::__cxx11::basic_string<char>, 18446744073709551615>; volePSI::span<IdxType> = nonstd::span_lite::span<std::__cxx11::basic_string<char>, 18446744073709551615>; volePSI::PRNG = osuCrypto::PRNG; volePSI::u64 = long unsigned int]'
/root/project/volepsi/frontend/main.cpp:206:104:   required from here
/root/project/volepsi/volePSI/../volePSI/PxUtil.h:607:5: error: no matching function for call to 'osuCrypto::PRNG::get(volePSI::PxVector<std::__cxx11::basic_string<char> >::Helper::mut_value_type*&, int)'
  607 |     prng.get(p, 1);
      |     ^~~~
compilation terminated due to -Wfatal-errors.
frontend/CMakeFiles/frontend.dir/build.make:75: recipe for target 'frontend/CMakeFiles/frontend.dir/main.cpp.o' failed
make[2]: *** [frontend/CMakeFiles/frontend.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'frontend/CMakeFiles/frontend.dir/all' failed
make[1]: *** [frontend/CMakeFiles/frontend.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

I would greatly appreciate it if you could provide any assistance!!!

How to use it without communication connection?

If there are Server and Client, and they can't communicate directly. How to use thie library in this scene? What I am thinking about is storing the content that needs to be communicated into a file and then transferring the file. But I can't do it.

deploy this on two machines.

Hello, how can I deploy this on two machines. The sender command is as follows:
./frontend -in /volepsi/Data/DATA.csv -r 0 -out /volepsi/Data -csv -ip 127:00:00:101:4212
receiver command is as follows:
./frontend -in /volepsi1/Data/DATA.csv -out /volepsi/Data -csv -ip 127:00:00:100:1212 -r 1
But an error is reported:

image

run this repo just like libpsi?

libpsi can run through /libPSI/out/build/linux/frontend/. volepsi is also started through the executable file of this path /volepsi/out/build/linux/frontend/, right?

An error occurred while building

Hi,
The error is reported as follows:
root@606ba53156e9:~/volepsi# python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON

====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DPARALLEL_FETCH=4 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux --parallel 4
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

-- vole-psi options

-- Option: FETCH_AUTO = ON
-- Option: FETCH_SPARSEHASH =
-- Option: FETCH_LIBOTE =
-- Option: FETCH_LIBDIVIDE =
-- Option: VERBOSE_FETCH = ON

-- Option: VOLE_PSI_ENABLE_SSE = ON
-- Option: VOLE_PSI_PIC = OFF
-- Option: VOLE_PSI_ENABLE_GMW = ON
-- Option: VOLE_PSI_ENABLE_CPSI = ON
-- Option: VOLE_PSI_ENABLE_OPPRF = ON

-- Option: COPROTO_ENABLE_BOOST = ON
-- Option: COPROTO_ENABLE_OPENSSL = ON
-- Option: LIBOTE_ENABLE_BITPOLYMUL = ON
-- VOLEPSI_THIRDPARTY_DIR=/root/volepsi/out/install/linux
============= Building sparsehash-c11 =============
Checkout edd6f1180156e76facc1c0449da245208ab39503
'/usr/bin/git' 'checkout' 'edd6f1180156e76facc1c0449da245208ab39503'
HEAD is now at edd6f11 Merge pull request #36 from sparsehash/version
log /root/volepsi/thirdparty/log-sparsehash-c11.txt

SPARSEHASH_INCLUDE_DIRS=/root/volepsi/out/install/linux/include
============= Building libOTe =============
libOTe Checkout 3d1ecb211a2421a670f787131ea1fb2d477ff128
'/usr/bin/git' 'checkout' '3d1ecb211a2421a670f787131ea1fb2d477ff128'
HEAD is now at 3d1ecb2 version bump
libOTe submodule
'/usr/bin/git' 'submodule' 'update' '--recursive'
libOTe Configure
'/usr/bin/cmake' '-S' '/root/volepsi/out/libOTe' '-B' '/root/volepsi/out/libOTe/out/build/linux' '-DCMAKE_INSTALL_PREFIX=/usr/local' '-DCMAKE_PREFIX_PATH=/root/volepsi/out/install/linux;' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DFETCH_AUTO=ON' '-DVERBOSE_FETCH=ON' '-DENABLE_CIRCUITS=ON' '-DENABLE_MRR=ON' '-DENABLE_IKNP=ON' '-DENABLE_SOFTSPOKEN_OT=ON' '-DENABLE_BITPOLYMUL=ON' '-DENABLE_SILENTOT=ON' '-DENABLE_SILENT_VOLE=ON' '-DENABLE_SODIUM=ON' '-DENABLE_MRR_TWIST=ON' '-DENABLE_SSE=ON' '-DCOPROTO_ENABLE_BOOST=ON' '-DCOPROTO_ENABLE_OPENSSL=ON' '-DOC_PIC=OFF' '-DOC_THIRDPARTY_CLONE_DIR=/root/volepsi/out'
-- cryptoTools options

-- Option: FETCH_AUTO = ON
-- Option: VERBOSE_FETCH = ON

-- Option: FETCH_SPAN_LITE =
-- Option: FETCH_RELIC =
-- Option: FETCH_SODIUM =
-- Option: FETCH_BOOST =

-- Option: CMAKE_BUILD_TYPE = Release
Release
Debug
RelWithDebInfo
-- Option: ENABLE_SPAN_LITE = ON
-- Option: ENABLE_RELIC = OFF
-- Option: ENABLE_SODIUM = ON
-- Option: ENABLE_BOOST = OFF

-- Option: ENABLE_CIRCUITS = ON
-- Option: ENABLE_NET_LOG = OFF
-- Option: ENABLE_WOLFSSL = OFF
-- Option: ENABLE_SSE = ON
-- Option: ENABLE_AVX = ON
-- Option: ENABLE_BOOST = OFF

span-lite already fetched (cryptoTools).
============= Building Sodium =============
Checkout 4e825a68baebdf058543f29762c73c17b1816ec0
'/usr/bin/git' 'checkout' '4e825a68baebdf058543f29762c73c17b1816ec0'
HEAD is now at 4e825a68 Merge branch 'master' of github.com:jedisct1/libsodium
Autogen
'./autogen.sh' '-s'
libtool is required, but wasn't found on this system
CMake Error at cryptoTools/thirdparty/fetch.cmake:35 (message):
Autogen failed (1).

LOG:

vvvvvvvvvvvvv RUN Cloning https://github.com/osu-crypto/libsodium.git
vvvvvvvvvvvv

/usr/bin/git;clone;https://github.com/osu-crypto/libsodium.git

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vvvvvvvvvvvvv RUN Checkout 4e825a68baebdf058543f29762c73c17b1816ec0
vvvvvvvvvvvv

/usr/bin/git;checkout;4e825a68baebdf058543f29762c73c17b1816ec0

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vvvvvvvvvvvvv RUN Autogen vvvvvvvvvvvv

./autogen.sh;-s

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vvvvvvvvvvvvv RUN Checkout 4e825a68baebdf058543f29762c73c17b1816ec0
vvvvvvvvvvvv

/usr/bin/git;checkout;4e825a68baebdf058543f29762c73c17b1816ec0

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vvvvvvvvvvvvv RUN Autogen vvvvvvvvvvvv

./autogen.sh;-s

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Call Stack (most recent call first):
cryptoTools/thirdparty/getSodium.cmake:65 (run)
cryptoTools/cmake/cryptoToolsDepHelper.cmake:143 (include)
cryptoTools/CMakeLists.txt:134 (include)

-- Configuring incomplete, errors occurred!
See also "/root/volepsi/out/libOTe/out/build/linux/CMakeFiles/CMakeOutput.log".
libOTe Build
'/usr/bin/cmake' '--build' '/root/volepsi/out/libOTe/out/build/linux' '--config' 'Release'
make: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'. Stop.
libOTe Install
'/usr/bin/cmake' '--install' '/root/volepsi/out/libOTe/out/build/linux' '--config' 'Release' '--prefix' '/root/volepsi/out/install/linux'
CMake Error: Error processing file: /root/volepsi/out/libOTe/out/build/linux/cmake_install.cmake
log /root/volepsi/thirdparty/log-libOTe.txt

CMake Error at cmake/findDependancies.cmake:57 (find_package):
By not providing "FindlibOTe.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libOTe", but
CMake did not find one.

Could not find a package configuration file provided by "libOTe" with any
of the following names:

libOTeConfig.cmake
libote-config.cmake

Add the installation prefix of "libOTe" to CMAKE_PREFIX_PATH or set
"libOTe_DIR" to a directory containing one of the above files. If "libOTe"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/findDependancies.cmake:71 (FIND_LIBOTE)
CMakeLists.txt:14 (include)**

-- Configuring incomplete, errors occurred!
See also "/root/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
make: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'. Stop.

I changed the container and redeployed it, but the same error still occurred. The current environment is ubuntu:20.04.
Could you give me some advice?
Look forward to your reply.

An error occurred during compilation: Failed to find libsodium.

Add -DFETCH_SODIUM=ON or -DFETCH_ALL=ON doesn't work either.
The error message is as follows:

$ python3 build.py -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON


====== build.py (vole-psi) ========
mkdir -p out/build/linux
cmake -S . -B out/build/linux  -DCOPROTO_ENABLE_BOOST=ON -DCOPROTO_ENABLE_OPENSSL=ON -DSUDO_FETCH=OFF -DFETCH_AUTO=ON -DPARALLEL_FETCH=4 -DCMAKE_BUILD_TYPE=Release
cmake --build out/build/linux   --parallel 4 
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv


-- vole-psi options
=======================================================
-- Option: FETCH_AUTO        = ON
-- Option: FETCH_SPARSEHASH  = 
-- Option: FETCH_LIBOTE      = 
-- Option: FETCH_LIBDIVIDE   = 
-- Option: VERBOSE_FETCH     = ON


-- Option: VOLE_PSI_ENABLE_SSE      = ON
-- Option: VOLE_PSI_PIC             = OFF
-- Option: VOLE_PSI_ENABLE_GMW      = ON
-- Option: VOLE_PSI_ENABLE_CPSI     = ON
-- Option: VOLE_PSI_ENABLE_OPPRF    = ON

-- Option: COPROTO_ENABLE_BOOST     = ON
-- Option: COPROTO_ENABLE_OPENSSL   = ON
-- Option: LIBOTE_ENABLE_BITPOLYMUL = ON
-- VOLEPSI_THIRDPARTY_DIR=/home/zchain/volepsi/out/install/linux
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/home/zchain/volepsi/out/install/linux/include
CMake Error at /usr/local/lib/cmake/cryptoTools/cryptoToolsDepHelper.cmake:151 (message):
  Failed to find libsodium.                                                                                                                                   
                                                                                                                                                              
   Add -DFETCH_SODIUM=ON or -DFETCH_ALL=ON to auto download.                                                                                                  
Call Stack (most recent call first):                                                                                                                          
  /usr/local/lib/cmake/cryptoTools/cryptoToolsConfig.cmake:22 (include)                                                                                       
  /usr/local/lib/cmake/libOTe/libOTeConfig.cmake:25 (find_package)                                                                                            
  cmake/findDependancies.cmake:57 (find_package)                                                                                                              
  cmake/findDependancies.cmake:67 (FIND_LIBOTE)                                                                                                               
  CMakeLists.txt:14 (include)                                                                                                                                 
                                                                                                                                                              
                                                                                                                                                              
-- Configuring incomplete, errors occurred!
See also "/home/zchain/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
-- vole-psi options
=======================================================
-- Option: FETCH_AUTO        = ON
-- Option: FETCH_SPARSEHASH  = 
-- Option: FETCH_LIBOTE      = 
-- Option: FETCH_LIBDIVIDE   = 
-- Option: VERBOSE_FETCH     = ON


-- Option: VOLE_PSI_ENABLE_SSE      = ON
-- Option: VOLE_PSI_PIC             = OFF
-- Option: VOLE_PSI_ENABLE_GMW      = ON
-- Option: VOLE_PSI_ENABLE_CPSI     = ON
-- Option: VOLE_PSI_ENABLE_OPPRF    = ON

-- Option: COPROTO_ENABLE_BOOST     = ON
-- Option: COPROTO_ENABLE_OPENSSL   = ON
-- Option: LIBOTE_ENABLE_BITPOLYMUL = ON
-- VOLEPSI_THIRDPARTY_DIR=/home/zchain/volepsi/out/install/linux
sparsehash-c11 already fetched.
SPARSEHASH_INCLUDE_DIRS=/home/zchain/volepsi/out/install/linux/include
CMake Error at /usr/local/lib/cmake/cryptoTools/cryptoToolsDepHelper.cmake:151 (message):
  Failed to find libsodium.                                                                                                                                   
                                                                                                                                                              
   Add -DFETCH_SODIUM=ON or -DFETCH_ALL=ON to auto download.                                                                                                  
Call Stack (most recent call first):                                                                                                                          
  /usr/local/lib/cmake/cryptoTools/cryptoToolsConfig.cmake:22 (include)                                                                                       
  /usr/local/lib/cmake/libOTe/libOTeConfig.cmake:25 (find_package)                                                                                            
  cmake/findDependancies.cmake:57 (find_package)                                                                                                              
  cmake/findDependancies.cmake:67 (FIND_LIBOTE)                                                                                                               
  CMakeLists.txt:14 (include)                                                                                                                                 
                                                                                                                                                              
                                                                                                                                                              
-- Configuring incomplete, errors occurred!
See also "/home/zchain/volepsi/out/build/linux/CMakeFiles/CMakeOutput.log".
gmake: *** [Makefile:229:cmake_check_build_system] 错误 1

some problems about mDenseSize in PaXoS

It seems that there are some data overflow problems in the code of PaxosImpl.h , as mDenseSize is not always less than 64, for example when mWeight=2 and mDt=binary. However, some operations such as the variable denseMasks, the function decode32 and backfillBinary, appear to assume that mDenseSize is less than 64. I also noticed the assert statement, but it doesn't seem to be working due to the "-DNDEBUG" setting. When I removed this setting, I saw the following error message.
image
If you could respond to this issue, I would greatly appreciate it.

Sometimes PSI result is wrong

Env:

  • Centos 7.9
  • sender.csv / 315MB / 10,000,000
  • receiver.csv / 315MB / 10,000,000
  • sender.csv == receiver.csv, (id is 32 characters, ex: xxxxxxxxxxxxxxxxxxxxxx1000000000)

Steps:

  • Loop 100 times
  • One by one

Results:

  • 6/100 psi result is 9,999,999 lines
  • 94/100 psi result is 10,000,000 lines

Log:
=> 1 sender starting
=> 1 receiver starting
=> 1 psi done
=> 1 psi result: 9999999
=> 2 sender starting
=> 2 receiver starting
=> 2 psi done
=> 2 psi result: 9999999
=> 3 sender starting
=> 3 receiver starting
=> 3 psi done
=> 3 psi result: 10000000
=> 4 sender starting
=> 4 receiver starting
=> 4 psi done
=> 4 psi result: 10000000
=> 5 sender starting
=> 5 receiver starting
=> 5 psi done
=> 5 psi result: 10000000
...

addtion:

  • 1,000,000 psi is 100% correct
  • 100,000,000 psi occurs wrong results, the same as 10,000,000 psi

PaXoS test

Hi Professor, I would like to ask how to output the intersection result of -perf -paxos test. How do I enter my own dataset file to invoke paxos algorithm.

opprf function not implemented?

If the length of the additional attribute is not equal to 16, what is the random value used for the oprf value when the additional attribute and oprf value are dissimilar?
image

Benchmark Refs

Env

  • 64C/64GB/1TB
  • ./frontend -in ./sender.csv -r 0 -server 1 -ip localhost:1212
  • ./frontend -in ./receiver.csv -r 1 -server 0 -ip localhost:1212 -out ./out.csv

Without Silver

Lines(r/s) Size(r/s) Load(r/s) PSI Output Total
1M 31MB 473ms 3016ms 342ms 3831ms (~4s)
10M 315MB 4607ms 30408ms 2314ms 37329ms (~40s)
100M 3.1GB 49423ms 654821ms 27533ms 731777ms (~800s)
1M/10M 31MB/315MB 443ms/4720ms 5328ms 168ms 10216ms (~10s)
10M/1M 315MB/32MB 4636ms/470ms 27978ms 862ms 33476ms (~40s)
10M/100M 315MB/3.1GB 4607ms/51200ms 64723ms 1973ms 117896ms (~120s)
100M/10M 3.1GB/315MB 46850ms/4670ms 603774ms 11285ms 661909ms (~700s)

With Silver

Lines(r/s) Size(r/s) Load(r/s) PSI Output Total
10M 315MB 4711ms 8409ms 1812ms 14932ms (~15s)
100M 3.1GB 49704ms 154925ms 40401ms 245030ms (~250s)
10M/100M 315MB/3.1GB 4754ms/49035ms 39963ms 2386ms 91384ms (~100s)
100M/10M 3.1GB/315MB 46862ms/4786ms 105070ms 10750ms 162682 (~170s)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.