# stay_points **Repository Path**: locomotive_crypto/stay_points ## Basic Information - **Project Name**: stay_points - **Description**: The goal of this library is to implement travel recommendation in a privacy-preserving way. - **Primary Language**: C++ - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-04-18 - **Last Updated**: 2024-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: Cpp, Cryptography, Privacy-preserving ## README # Privacy-preserving travel recommendation Our code will be uploaded in the future. #### Description The goal of this library is to implement travel recommendation in a privacy-preserving way. #### Installation To build this project, the following tools must be installed: ``` 1. g++ 2. make 3. cmake ``` This library is built upon [NTL](https://libntl.org/) and [Boost.Asio](https://www.boost.org/), so you have to install these library before compiling our project. In order to complie this library, you should perform the below commands in sequences: ``` 1. mkdir build (if not exist.) 2. cd build 3. cmake .. 4. make 5. sudo make install (if use it in third-party applications) ``` #### Tutorial After compiling this library, you can see some executables in ./bin directory. You can run them with some specific command arguments. The command argument allowed by each executable program can be found in ./test/test_xx.cpp. For testing the correctness of secure division protocol `sec_div_run`, you can run ./bin/sec_div_run without any arguments as follows: ``` $ ../bin/sec_div_run ``` The output may be: ``` $ ../bin/sec_div_run ---------------------------------------------------------- --------------------------------------------------- -----1) Run for correctness: ./program-------------------- -----2) Run for performance: ./program cnt---------------- -----3) Run as SB: ./program port ------------------------ -----4) Run as SA: ./program port ipaddr------------------ ---------------------------------------------------------- N = 1743765862285873308969633784433136874728236445391306059248720428672298695036572192962190379996818017258244067428636115711 x = 588365 y = 23318 x/y (normal division result) = 25.23222403 cdiv (division result in encrypted format) = 433441672438818375413963673944938407597639591594149240681160315997981886178551212946190080861290184194744588723945184683481022328749577215247393285850515725982906424258780130801176476733098807947409909072489637842864736914297924641949562338 ddiv (division result in plaintext) = 25 ``` You can evaluate the computation cost with the following commands: ``` $ ../bin/sec_div_run 10 ``` The output may be: ``` ---------------------------------------------------------- --------------------------------------------------- -----1) Run for correctness: ./program-------------------- -----2) Run for performance: ./program cnt---------------- -----3) Run as SB: ./program port ------------------------ -----4) Run as SA: ./program port ipaddr------------------ ---------------------------------------------------------- The key length for this test is: 1024 The time for 10 SecDiv is : 192 The key length for this test is: 1024 The time for 10 SecDiv is : 171 The key length for this test is: 1024 The time for 10 SecDiv is : 233 The key length for this test is: 1024 The time for 10 SecDiv is : 223 The key length for this test is: 1024 The time for 10 SecDiv is : 181 The key length for this test is: 2048 The time for 10 SecDiv is : 728 The key length for this test is: 2048 The time for 10 SecDiv is : 741 The key length for this test is: 2048 The time for 10 SecDiv is : 970 The key length for this test is: 2048 The time for 10 SecDiv is : 1278 The key length for this test is: 2048 The time for 10 SecDiv is : 1126 The key length for this test is: 3072 The time for 10 SecDiv is : 4536 The key length for this test is: 3072 The time for 10 SecDiv is : 3926 The key length for this test is: 3072 The time for 10 SecDiv is : 3994 The key length for this test is: 3072 The time for 10 SecDiv is : 4824 The key length for this test is: 3072 The time for 10 SecDiv is : 3664 ``` You can also evaluate the communication cost with the following commands in two different terminals: ``` $ ../bin/sec_div_run sb 13333 (run as server) and $ ../bin/sec_div_run sa 13333 127.0.01 100 (run as client) ``` #### E-mail You can contact with me: locomotive_crypto@163.com