销售营销网站,个人如何注册微信公众号怎么创建,关于美食网站的问卷调查怎么做,网站每年续费费用一、简介 APSI——Asymmetric PSI#xff1a; 私用集交集#xff08;PSI#xff09;是指这样一种功能#xff0c;即双方都持有一组私用项#xff0c;可以在不向对方透露任何其他信息的情况下检查他们有哪些共同项。集合大小的上限被假定为公共信息#xff0c;不受保护。 …一、简介 APSI——Asymmetric PSI 私用集交集PSI是指这样一种功能即双方都持有一组私用项可以在不向对方透露任何其他信息的情况下检查他们有哪些共同项。集合大小的上限被假定为公共信息不受保护。
APSI不对称PSI库基于eprint.iacr.org/2021/1116中描述的协议为不对称集合大小提供PSI功能。例如在许多情况下一方可能持有数百万条记录的大型数据集而另一方希望了解数据集中是出现了单个特定记录还是出现了少量记录。我们称之为未标记模式下的APSI。
然而在许多情况下查询器还希望为每个匹配的记录检索一些信息。这可以被视为具有隐私保护批量查询功能的键值存储。我们使用术语项和标签来指代这样一个键值存储中的键和值并在标记模式下调用此APSI。
注意除非实际需要标记模式否则使用未标记模式会更有效率在通信和计算方面。
二、安装教程 若是简单测试可以尝试使用vcpkg安装
./vcpkg install apsi
开发者模式安装确定安装需要的依赖
Dependencyvcpkg nameMicrosoft SEALseal[no-throw-tran]Microsoft KukukukuLog4cpluslog4cpluscppzmqcppzmq (needed only for ZeroMQ networking support)FlatBuffersflatbuffersjsoncppjsoncppGoogle Testgtest (needed only for building tests)TCLAPtclap (needed only for building CLI)
接下来我们要逐个安装依赖里面会出现需要手动调时的东西加油 1.seal 4.1 :
git clone https://github.com/microsoft/SEAL.git
git checkout https://github.com/microsoft/SEAL.git
cd SEAL
git checkout origin/4.1.0cmake -S . -B build -DSEAL_THROW_ON_TRANSPARENT_CIPHERTEXTOFF
cmake --build build
sudo cmake --install build可以指定安装路径--prefix /Users/admin/git/SEAL-4.1.0/seal_4.12.kuku
git clone https://github.com/microsoft/Kuku.git
cd Kuku
cmake -S . -B build
cmake --build build
sudo cmake --install build3.Log4cplus
git clone --recurse-submodules https://github.com/log4cplus/log4cplus
cd log4cplus
cmake -S . -B build
cmake --build build
sudo cmake --install build4.cppzmq
git clone https://github.com/zeromq/cppzmq.git
cd cppzmq
pip install Zeromq
cmake -S . -B build
cmake --build build
sudo cmake --install build5.FlatBuffers
git clone https://github.com/google/flatbuffers.git
cd flatbuffers
cmake -S . -B build
cmake --build build
sudo cmake --install build6.jsoncpp
git clone https://github.com/open-source-parsers/jsoncpp.git
cd jsoncpp
cmake -S . -B build
cmake --build build
sudo cmake --install build7.Google Test
git clone https://github.com/google/googletest.git
cd googletest
cmake -S . -B build -DCMAKE_CXX_COMPILERc -DCMAKE_CXX_FLAGS-stdc14 -stdliblibc
cmake --build build
sudo cmake --install build8.TCLAP
下载https://sourceforge.net/projects/tclap/
解压
cd tclap
cmake -S . -B build -DCMAKE_CXX_COMPILERc -DCMAKE_CXX_FLAGS-stdc14 -stdliblibc
cmake --build build
sudo cmake --install build如果你可以走到这一步距离大功告成仅差最后一步啦
上述过程中会出现很多bug欢迎将问题和解决方案留在评论区
cmake适配 1.使用clion打开APSI
git clone https://github.com/microsoft/APSI.git
2.打开CMakeList.txt 197行option(APSI_BUILD_TESTS ${APSI_BUILD_TESTS_OPTION_STR} OFF) 改成 option(APSI_BUILD_TESTS ${APSI_BUILD_TESTS_OPTION_STR} ON) 若出现下面这个错误 Linking CXX executable bin/unit_tests
Undefined symbols for architecture arm64:log4cplus::Logger::getInstance(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const), referenced from:apsi::Log::Configure() in libapsi-0.11.a(log.cpp.o)apsi::Log::SetLogLevel(apsi::Log::Level) in libapsi-0.11.a(log.cpp.o)apsi::Log::DoLog(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar, apsi::Log::Level) in libapsi-0.11.a(log.cpp.o)log4cplus::Logger::log(int, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, char const*, int, char const*) const, referenced from:apsi::Log::DoLog(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar, apsi::Log::Level) in libapsi-0.11.a(log.cpp.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)#在其中增加依赖位置
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
这时打开test/unit/src/unit_tests_runner.cpp 仍会出现编译失败的问题
gtest-port.h:281:2: error: C versions less than C14 are not supported.
#error C versions less than C14 are not supported.
确定自己使用的是C14 以上版本删除cmake-build-debug重新编译。