https://github.com/kuleuven-cosic/gc-fast-sbox-eval

https://github.com/kuleuven-cosic/gc-fast-sbox-eval

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.3%) to scientific vocabulary
Last synced: 4 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: KULeuven-COSIC
  • License: other
  • Language: C++
  • Default Branch: main
  • Size: 26.4 MB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
License

https://github.com/KULeuven-COSIC/gc-fast-sbox-eval/blob/main/

This is a fork of [MP-SPDZ](https://github.com/data61/MP-SPDZ), forked at v0.2.7 ([08388f9](https://github.com/data61/MP-SPDZ/commit/08388f9ab9d6e15d737f3a49d25c2465e4a717a5)).

# Changes
Support for projection gates and _n_-bit wires for Yao's Garbled Circuits.

- `sbits` type now has a method `sbits.proj` to express a projection gate.
- New virtual machine instructions `PROJS (0x24a)`, `REVEALN (0x250)` and `XORMN (0x24b)`
- The `yao-party.x` virtual machine supports the new instructions

MPC programs

- `Programs/Source/aes_proj.mpc`: AES implementation using projection gates
- `Programs/Source/skinny.mpc`: Implementation of the [SKINNY](https://eprint.iacr.org/2016/660) cipher for binary circuits
- `Programs/Source/skinny_n_proj.mpc`: Implementation of SKINNY using projection gates

The changes are licensed under the MIT license (see [License.txt](License.txt) for more details).

# Garbling Scheme Benchmark
To run the benchmark, first install MP-SPDZ requirements (`apt-get install automake cmake build-essential git libboost-dev libboost-thread-dev libntl-dev libsodium-dev libssl-dev libtool m4 python3 texinfo yasm`, for more info see below), then

1. Compile MOTION (you need `C++20` build tools, e.g., `g++-10, libstdc++-10-dev`): `cd MOTION && mkdir build && cd build && cmake -DMOTION_BUILD_EXE=On .. && make -j4 bristol-evaluator`
2. Go back: `cd ../..`
3. Compile MP-SPDZ `echo "USE_GF2N_LONG = 0" >> CONFIG.mine && make -j4 mpir && make -j4 yao`
4. Pull circuits `git submodule update --init Programs/Circuits`

The benchmark is managed via the script `garbling-benchmark.py`. Calling `python garbling-benchmark.py --help` yields usage information.

```
usage: garbling-benchmark.py [-h] [--simd SIMD] [--iters ITERS] [--zre15]
                             [--rr21] [--proj] [--csv CSV]
                             circuit [circuit ...]

positional arguments:
  circuit        The circuits to execute, options are ['all', 'skinny64_64',
                 'skinny64_128', 'skinny64_192', 'skinny128_128',
                 'skinny128_256', 'skinny128_384', 'mantis7', 'twine80',
                 'twine128', 'aes128']

options:
  -h, --help     show this help message and exit
  --simd SIMD    The number of SIMD, i.e., parallel invocations of the circuit
  --iters ITERS  The number of repetitions
  --zre15        Use ZRE15 garbling scheme (HalfGates)
  --rr21         Use RR21 garbling scheme (ThreeHalves)
  --proj         Use projection gates garbling scheme
  --csv CSV      Generate a csv file with the data.
```
The benchmarks for the paper were run by

- `python garbling-benchmark.py --simd 1000 --iters 10 --zre15 --rr21 --proj --csv "garbling-benchmark-simd1000.csv" skinny64_64 skinny64_128 skinny64_192 mantis7 twine80 twine128 aes128`
- `python garbling-benchmark.py --simd 500 --iters 10 --zre15 --rr21 --proj --csv "garbling-benchmark-simd500.csv" skinny128_128 skinny128_256 skinny128_384`

which runs the benchmark of all three garbling schemes and saves the resulting garbling time, evaluation time and circuit size in two csv files. The script stores the raw benchmark log files in directories named `benchmark-

Owner

  • Name: KU Leuven - COSIC
  • Login: KULeuven-COSIC
  • Kind: organization

GitHub Events

Total
Last Year