osu-crypto / bark-oprf Goto Github PK
View Code? Open in Web Editor NEWEfficient Batched Oblivious PRF with Applications to Private Set Intersection (CCS 2016)
Home Page: http://eprint.iacr.org/2016/799
License: The Unlicense
Efficient Batched Oblivious PRF with Applications to Private Set Intersection (CCS 2016)
Home Page: http://eprint.iacr.org/2016/799
License: The Unlicense
Hi.
I'm trying to build BaRK-OPRF on a fresh Ubuntu install. Here are the commands I executed:
$ git clone https://github.com/osu-crypto/BaRK-OPRF
$ cd BaRK-OPRF/thirdparty/
$ bash all_linux.get
[Get sudo prompt. Enter user (admin)'s password.]
$ cd ..
$ make
I then get the following error:
g++ -ggdb -ffunction-sections -O3 -Wall -std=c++11 -maes -msse2 -msse4.1 -mpclmul -Wfatal-errors -pthread -Wno-narrowing -I./bOPRFlib -I./thirdparty/linux -I./thirdparty/linux/boost/includes -I./thirdparty/linux/miracl -I./thirdparty/linux/mpir -I./thirdparty/linux/cryptopp -std=c++11 -DNDEBUG -DRELEASE -c bOPRFlib/Crypto/PRNG.cpp -o Release/./bOPRFlib/Crypto/PRNG.o -MD -MF Release/./bOPRFlib/Crypto/PRNG.dep
bOPRFlib/Crypto/PRNG.cpp: In member function ‘void bOPRF::PRNG::refillBuffer()’:
bOPRFlib/Crypto/PRNG.cpp:152:50: error: ‘_mm_cvtsi64_si128’ was not declared in this scope
mIndexArray[i] = _mm_cvtsi64_si128(mBlockIdx++);
^
compilation terminated due to -Wfatal-errors.
makefile:119: recipe for target 'Release/./bOPRFlib/Crypto/PRNG.o' failed
make: *** [Release/./bOPRFlib/Crypto/PRNG.o] Error 1
Any idea what is going wrong here? Or how I can fix it?
I am having trouble with the mpir dependency and was wondering if you had run into this issue previously. When I run make
, I get the following output:
g++ -ggdb -ffunction-sections -O3 -Wall -std=c++11 -maes -msse2 -msse4.1 -mpclmul -Wfatal-errors -pthread -Wno-narrowing -I./bOPRFlib -I./thirdparty/linux -I./thirdparty/linux/boost/includes -I./thirdparty/linux/miracl -I./thirdparty/linux/mpir -I./thirdparty/linux/cryptopp -std=c++11 -DNDEBUG -DRELEASE -c bOPRFlib/Common/ByteStream.cpp -o Release/./bOPRFlib/Common/ByteStream.o -MD -MF Release/./bOPRFlib/Common/ByteStream.dep In file included from ./bOPRFlib/OT/Base/Math/modp.h:17:0, from ./bOPRFlib/Crypto/PRNG.h:2, from ./bOPRFlib/Crypto/Commit.h:5, from bOPRFlib/Common/ByteStream.cpp:5: ./bOPRFlib/OT/Base/Math/bigint.h:14:25: fatal error: mpir/mpirxx.h: No such file or directory #include "mpir/mpirxx.h" ^ compilation terminated. make: *** [Release/./bOPRFlib/Common/ByteStream.o] Error 1
Thanks for providing the source code.
I found an error when compilating the code. as follow
./bOPRFlib/Network/BtSocket.h:75:3: error: invalid use of template-name ‘boost::asio::strand’ without an argument list
boost::asio::strand mSendStrand, mRecvStrand;
compilation terminated due to -Wfatal-errors.
makefile:119: recipe for target 'Release/./bOPRFlib/Network/BtEndpoint.o' failed
make: *** [Release/./bOPRFlib/Network/BtEndpoint.o] Error 1
How can i do?
Hi
I'm trying to install BaRK-OPRF on an Ubuntu system on which I do not have sudo privileges. Is this possible?
Here is what I tried. I looked at thirdparty/all_linux.get. I saw that it uses sudo to install certain libraries. Most of these were already installed:
$ which bzip2
/bin/bzip2
$ which unzip
/usr/bin/unzip
$ which m4
/usr/bin/m4
I assume the command "sudo apt-get install gcc-c++" installs g++ and/or gcc, both of which are installed.
$ gcc --version
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
$ g++ --version
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
The remaining sudo command is to "apt-get install libboost-all-dev". I was not able to run this. But I saw that there seem to be some commands to install libboost locally, so I skipped over this and hoped for the best.
I ran:
$ bash all_linux.get
I then CTRL-C'ed over all of the sudo commands.
I then navigated to BaRK-OPRF path and ran:
$ make
At first I experienced something to the effect of the following error when running all_linux.get:
wake.cpp: 34:15 narrowing conversion of "38...420u" from "unsigned int" to "int" inside { } [-Wnarrowing].
When I then tried to run make this resulted in the error:
error: "cannot find -lcryptopp"
I modified the source file cryptopp/wake.cpp line 26 to make the tt[] array an unsigned int. I then ran make inside the cryptopp directory again. This solved this error.
I then experienced an error when I ran make:
error: "cannot find -lboost_filesystem".
I modified boost.get, line 15, to include --with-filesystem:
./b2 stage --with-system --with-thread --with-filesystem link=static -mt
I removed the boost directory and re-ran boost.get
$ bash boost.get
This fixed this error.
However when I ran make again I got the following error:
/usr/bin/ld: ./thirdparty/linux/miracl/miracl_osmt/source/libmiracl.a(mrcore.o): relocation R_X86_64_32 against symbol `mr_key' can not be used when making a shared object; recompile with -fPIC
For this one I am at a loss. Any ideas what I need to do? Is what I'm trying to do possible?
Note: The reason in my previous question I asked about installing on a vm is that I was having trouble installing on this environment in which I don't have sudo privileges, so I tried first to install on an environment where I did have sudo privileges (a vm).
Hi.
Running on Ubuntu 16.04 gcc 5.3. I needed to do two tweaks to link correctly:
mpir.get failed silently. when I ran it directly from a console, i saw m4 was missing. best if you state m4 as a requirement and avoid failing silently
boost installation also fails silently.
Best,
Assi
Hello~I study the BaRK-OPRF this time. But when I build the project at ubuntu-20.04 gcc-9.5 cmake-3.20:
when I git clone the package and type python build.py in terminal:
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:858: libmpir.la] Error 1
make[2]: Leaving directory '/home/starkirby/BaRK-OPRF/BaRK-OPRF/thirdparty/linux/mpir'
make[1]: *** [Makefile:948: all-recursive] Error 1
make[1]: Leaving directory '/home/starkirby/BaRK-OPRF/BaRK-OPRF/thirdparty/linux/mpir'
make: *** [Makefile:744: all] Error 2
all done!
How to solve that? Thank you!
g++ -o Release/bOPRFmain.exe -Wl,-gc-sections -pthread -LRelease -L/root/compile/kkrt16/bark-oprf/Release -L./thirdparty/linux/boost/stage/lib -L./thirdparty/linux/cryptopp -L./thirdparty/linux/miracl/miracl_osmt/source -L./thirdparty/linux/miracl/miracl/source -L./thirdparty/linux/mpir/.libs -L./thirdparty/linux/ntl/src -L./bin/ -Wl,--start-group Release/./bOPRFlib/Common/BitIterator.o Release/./bOPRFlib/Common/BitVector.o Release/./bOPRFlib/Common/ByteStream.o Release/./bOPRFlib/Common/Defines.o Release/./bOPRFlib/Common/Log.o Release/./bOPRFlib/Common/Timer.o Release/./bOPRFlib/Crypto/AES.o Release/./bOPRFlib/Crypto/Commit.o Release/./bOPRFlib/Crypto/PRNG.o Release/./bOPRFlib/Crypto/sha1.o Release/./bOPRFlib/PSI/BopPsiReceiver.o Release/./bOPRFlib/PSI/BopPsiSender.o Release/./bOPRFlib/PSI/CuckooHasher.o Release/./bOPRFlib/PSI/SimpleHasher.o Release/./bOPRFlib/OT/BaseSSOT.o Release/./bOPRFlib/OT/IknpOtExtReceiver4k.o Release/./bOPRFlib/OT/IknpOtExtSender4k.o Release/./bOPRFlib/OT/SSOTReceiver.o Release/./bOPRFlib/OT/SSOTSender.o Release/./bOPRFlib/OT/Base/BaseOT.o Release/./bOPRFlib/OT/Base/naor-pinkas.o Release/./bOPRFlib/OT/Base/PvwBaseOT.o Release/./bOPRFlib/OT/Base/Tools.o Release/./bOPRFlib/OT/Base/Math/bigint.o Release/./bOPRFlib/OT/Base/Math/DMC.o Release/./bOPRFlib/OT/Base/Math/modp.o Release/./bOPRFlib/OT/Base/Math/Zp_Data.o Release/./bOPRFlib/OT/Base/crypto/crypto.o Release/./bOPRFlib/OT/Base/crypto/ecc-pk-crypto.o Release/./bOPRFlib/Network/BtAcceptor.o Release/./bOPRFlib/Network/BtChannel.o Release/./bOPRFlib/Network/BtEndpoint.o Release/./bOPRFlib/Network/BtIOService.o Release/./bOPRFlib/Network/Channel.o Release/./bOPRFmain/main.o
-Wl,-Bstatic -lmiracl -lboost_system -lboost_filesystem -lboost_thread -lmpir -lcryptopp -lbOPRF -lmiracl
-Wl,-Bdynamic -lpthread -lrt
-Wl,--as-needed -Wl,--end-group
/usr/bin/ld: Release/./bOPRFlib/OT/Base/BaseOT.o: in function Miracl::Miracl(int, unsigned int)': /root/compile/kkrt16/bark-oprf/./thirdparty/linux/miracl/miracl/include/big.h:129: undefined reference to
mirsys'
/usr/bin/ld: Release/./bOPRFlib/OT/Base/BaseOT.o: in function _GLOBAL__sub_I__ZN5bOPRF10precision2E': /root/compile/kkrt16/bark-oprf/bOPRFlib/OT/Base/BaseOT.cpp:10: undefined reference to
mr_init_threading'
/usr/bin/ld: Release/./bOPRFlib/OT/Base/crypto/ecc-pk-crypto.o: in function ecc_num::set_si(int)': /root/compile/kkrt16/bark-oprf/bOPRFlib/OT/Base/crypto/ecc-pk-crypto.cpp:231: undefined reference to
convert'
/usr/bin/ld: Release/./bOPRFlib/OT/Base/crypto/ecc-pk-crypto.o: in function Big::Big()': /root/compile/kkrt16/bark-oprf/./thirdparty/linux/miracl/miracl/include/big.h:173: undefined reference to
mirvar'
/usr/bin/ld: /root/compile/kkrt16/bark-oprf/./thirdparty/linux/miracl/miracl/include/big.h:173: undefined reference to mirvar' /usr/bin/ld: /root/compile/kkrt16/bark-oprf/./thirdparty/linux/miracl/miracl/include/big.h:173: undefined reference to
mirvar'
/usr/bin/ld: Release/./bOPRFlib/OT/Base/crypto/ecc-pk-crypto.o: in function Big::operator=(int)': /root/compile/kkrt16/bark-oprf/./thirdparty/linux/miracl/miracl/include/big.h:202: undefined reference to
convert'
/usr/bin/ld: Release/./bOPRFlib/OT/Base/crypto/ecc-pk-crypto.o: in function ecc_field::init(securitylevel, unsigned char*)': /root/compile/kkrt16/bark-oprf/bOPRFlib/OT/Base/crypto/ecc-pk-crypto.cpp:53: undefined reference to
irand'
thanks.
Hi Dear,
What's the main diff between libPSI and this? if I want to use a high performance one, which repo will you suggest?
Thx!
This is what I got. I suppose boost is messed up somehow but can't quite fix it.
Exception calling "ExtractToDirectory" with "2" argument(s): "Could not find a part of the path 'C:\Users\haoche\Source
\Repos\BaRK-OPRF\thirdparty\win\boost_1_63_0\libs\geometry\doc\html\geometry\reference\spatial_indexes\boost__geometry_
_index__rtree\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.htm
l'."
At C:\Users\haoche\Source\Repos\BaRK-OPRF\thirdparty\win\getBoost.ps1:34 char:5
+ [io.compression.zipfile]::ExtractToDirectory($destination, $PWD)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : DirectoryNotFoundException
Thanks for your open source code!
When I read this code, I found that there is a batch processing in the SSOTSender.cpp(SSOTReceiver.cpp). Instead of sending a message of m length, this code send BASE_OT_COUNT length for each batches. But the "mGens" is always same in each batches, which means that there will be a lot of identical outputs of the OPRF. Did I miss any details that make me got this false conclusion? Or it's some trick of achieving the fast implementation?
Hello! I'm trying to modify the file main.cpp for inputting my own datasets. However, I find the input datatype in BopTest() to be "block". So what does the type "block" refer to? And how to change other data types( for example, string) to "block"? Thank you!
Thanks for providing the source code.
However, I got this error when I tried to compile the code. Any idea on how to fix it?
/usr/bin/ld: ./thirdparty/linux/miracl/miracl_osmt/source/libmiracl.a(mrcore.o): relocation R_X86_64_32 against symbol `mr_key' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ./thirdparty/linux/miracl/miracl_osmt/source/libmiracl.a(mrgf2m.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
I used: g++ (GCC) 10.2.0
Hello,
I set senderSize = (1 << 3)
and recverSize = (1 << 3)
, and run BopTest()
, the output recvPSIs.mIntersection
is [6, 3]
, not the elements in sendSet
and recvSet
. What is the meaning of [6, 3]
, how to understand the output intersection?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.