Skip to main content

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 in customer.tbl is Customer#000000001, but it will be outputted as 00000001.
  • 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


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.3.7.tar.gz (20.4 MB view details)

Uploaded Source

Built Distributions

secyan_python-0.3.7-cp39-cp39-macosx_10_15_x86_64.whl (848.3 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

secyan_python-0.3.7-cp38-cp38-macosx_10_15_x86_64.whl (848.3 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

secyan_python-0.3.7-cp37-cp37m-macosx_10_15_x86_64.whl (848.3 kB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

secyan_python-0.3.7-cp36-cp36m-macosx_10_15_x86_64.whl (848.3 kB view details)

Uploaded CPython 3.6m macOS 10.15+ x86-64

File details

Details for the file secyan_python-0.3.7.tar.gz.

File metadata

  • Download URL: secyan_python-0.3.7.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.9.6

File hashes

Hashes for secyan_python-0.3.7.tar.gz
Algorithm Hash digest
SHA256 5d80c26d660f2167cce70c621a1f70e2f93af2d4fdc4ec1f6f2bf96d99277857
MD5 82a2f7f65c2aa1e2a8541f3c44614d7f
BLAKE2b-256 79acff8bb7f62504d69825ef563a788b212c2b15bd610cf2e0d939d593297717

See more details on using hashes here.

File details

Details for the file secyan_python-0.3.7-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: secyan_python-0.3.7-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

Hashes for secyan_python-0.3.7-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 70eee7d5c3def9192fc81b1ccb66a72a0bc4573b818586a406426b08bd0906c2
MD5 64446fab053e519bd77d92ef7c5563d8
BLAKE2b-256 c7317b389606bd5ec1b28dc95e25902587c2f303b195032a58111b8761582382

See more details on using hashes here.

File details

Details for the file secyan_python-0.3.7-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: secyan_python-0.3.7-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

Hashes for secyan_python-0.3.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c185e3b3a1422b36d22660110f056ca3b36385b757673e7bbc6597de4b687d82
MD5 d4184906d8c24cbab6589edfa7ec6e75
BLAKE2b-256 0c7a683345cc460b803a5e84fb842033b6123efe9e1353ce92304b99f21c1818

See more details on using hashes here.

File details

Details for the file secyan_python-0.3.7-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: secyan_python-0.3.7-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 848.3 kB
  • Tags: CPython 3.7m, 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.7.11

File hashes

Hashes for secyan_python-0.3.7-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b7f4890ece0fe46d636493ce49bc70608f203663b3810ea488d6846fef20af85
MD5 40e7e2ab258959ac6fb4800bddfc38ad
BLAKE2b-256 c2111f207aa07cff80f1bb069bca153244ebe5c31741f7d79ccaf92e8c728ec5

See more details on using hashes here.

File details

Details for the file secyan_python-0.3.7-cp36-cp36m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: secyan_python-0.3.7-cp36-cp36m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 848.3 kB
  • Tags: CPython 3.6m, 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.6.14

File hashes

Hashes for secyan_python-0.3.7-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fe7ce89b8098a32778098e139014256fd075b91f936faf316116a1351782fa0f
MD5 2af79d3f901ca227da947759922f1418
BLAKE2b-256 80ff9c20c04590b10c9e13807953665a3a6fe1cb888c932ebb25cca443249288

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page