SECYAN c++ implementation
Project description
Secure Yannakakis: Join-Aggregate Queries over Private Data
More Docs are under /docs folder
Requirements
For Debian Linux
- build-essential (gcc >= 8)
- cmake >= 3.12
- libssl-dev
- libgmp-dev
- libboost-all-dev (Boost >= 1.66)
For macOS
- brew install cmake
- brew install openssl
- brew install gmp
- brew install boost
- brew install pybind11
CMAKE-flag -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib
Run the example in Docker
First install docker on your local machine, and then in the main folder, run
docker-compose build dev
dokcer-compose up dev
And now you can ssh into the container like
ssh user@localhost -p 2222
Configure and Compile
git clone --recurse-submodules https://github.com/Aqua-Dream/SECYAN
cd SECYAN
mkdir Release
cd Release
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 8
Run Demo
Switch to the output folder Release/src/example
.
# Server
> ./secyandemo
Who are you? [0. Server, 1. Client]: 0
Establishing connection... Finished!
Which query to run? [0. Q3, 1. Q10, 2. Q18, 3. Q8, 4. Q9]: 2
Which TPCH data size to use? [0. 1MB, 1. 3MB, 2. 10MB, 3. 33MB, 4. 100MB]: 2
Start running query...
Dummy Relation!
Running time: 5277ms
Communication cost: 266.873 MB
Finished!
# Client
> ./secyandemo
Who are you? [0. Server, 1. Client]: 1
Establishing connection... Finished!
Which query to run? [0. Q3, 1. Q10, 2. Q18, 3. Q8, 4. Q9]: 2
Which TPCH data size to use? [0. 1MB, 1. 3MB, 2. 10MB, 3. 33MB, 4. 100MB]: 2
Start running query...
row_num o_custkey o_orderkey o_orderdate o_totalprice c_name annotation
1 667 29158 1995-10-21 439687.19 00000667 305
2 178 6882 1997-04-09 422359.62 00000178 303
Running time: 3714ms
Communication cost: 266.41 MB
Finished!
Run Benchmark
Switch to the output folder Release/src/example
.
> ./benchmark
Usage: ./benchmark
-r [Role: 0/1, default: 0 (SERVER), required]
-a [IP-address, default: 127.0.0.1, optional]
-p [Port (will use port & port+1), default: 7766, optional]
-n [Number of test runs, default: 3, optional]
-q [Query ID (3,10,18,8,9,0), default: 0, i.e. test all queries. , optional]
Program exiting
> ./benchmark -r 0 -p 7706 > result_server.txt &
> ./benchmark -r 1 -p 7706 -q 3> result_client.txt &
Remark
- SECYAN only read the last 8 digits of string from data file. For example, the the first row of column
c_name
incustomer.tbl
isCustomer#000000001
, but it will be outputted as00000001
. - To use your own data, please refer to the format of files under
data
folder. SECYAN currently cannot generate annotations automatically. You need to write the annotation columns on your own. - To run your own query, please refer to the file
data/TPCH.cpp
. SECYAN currently cannot generate codes from SQL automatically. You need to rewrite your query into combinations of operators (Aggregation
,SemiJoin
,Join
,etc.).
Acknowledgment
Thank SixSiebenUno for helping writing the code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
secyan_python-0.0.1.tar.gz
(20.4 MB
view details)
Built Distributions
File details
Details for the file secyan_python-0.0.1.tar.gz
.
File metadata
- Download URL: secyan_python-0.0.1.tar.gz
- Upload date:
- Size: 20.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca40326ad91a2a63c59a0dd7e66f2537975b61bcda6d5ce9cebd0eb55153dcf |
|
MD5 | b55ec1d52469be35171b0e89e9acf306 |
|
BLAKE2b-256 | bc0a24f63669317d3f3157325098ed068ab39ed52b2158ccbe5834b0e415f3b6 |
File details
Details for the file secyan_python-0.0.1-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: secyan_python-0.0.1-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 848.3 kB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ae1e06481e4340d486acf8fbe4da1fc0dc2422e9f58427f6aa29fa92510d1d |
|
MD5 | 4a706eef705dd98b211f73655b010867 |
|
BLAKE2b-256 | 5f569e14e75f4dd5c509f6bf72608d015ad3939bfdfbe24d0f4f667a5dfd9d0a |
File details
Details for the file secyan_python-0.0.1-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: secyan_python-0.0.1-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 848.3 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b82f1e67411449ea34bf57f575bdad31a1edeae0ad151774ddb8ccccfc5ecfe4 |
|
MD5 | 332ae7fe5436b847258b89fefabfc6db |
|
BLAKE2b-256 | 82cb9d3d6884eb93c2bcca194cea71bba707957b36f937fced56fe1dd547cc5c |