Skip to content

Lavendes/SALUS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SALUS: Large-Scale Homomorphic Circuit Synthesis via Logic-Aware LUT Optimization

This code is the implementation of the paper "SALUS: Large-Scale Homomorphic Circuit Synthesis via Logic-Aware LUT Optimization".

Requirements

To build and run this project, you will need:

  • git
  • make
  • gcc or clang
  • rust and cargo
  • python3

Third-Party Dependencies

This repository uses two third-party dependencies under third_party:

After cloning the repository, initialize the submodules with:

git submodule update --init --recursive

Build the vendored ABC binary with:

make -C third_party/abc

Building SALUS

Build the Rust binaries with:

cargo build --release

Generating a Homomorphic Circuit

cargo run --release --bin generate_circuit -- <input.{v|blif}> <output_dir> [--with-merge]

Options:

  • --with-merge
    • enable LUT merging for hybrid / multi execution
  • --max-abc-iters N
    • limit the number of repeated mapping iterations

Example: generate a preprocessed circuit from testcircuit/c7552.v

make -C third_party/abc
cargo run --release --bin generate_circuit -- testcircuit/c7552.v HomCircuit/c7552 --with-merge

Executing a Preprocessed Circuit

cargo run --release --bin execute_circuit -- <preprocessed_dir> [input_bits] [--single-lut-mode|--hybrid-lut-mode|--multi-lut-mode] [--repeat-random N]

Execution modes:

  • --single-lut-mode
    • only single-output HomLUT
  • --multi-lut-mode
    • only multi-output HomLUT
  • --hybrid-lut-mode
    • both single-output and multi-output HomLUT

Examples:

cargo run --release --bin execute_circuit -- HomCircuit/c7552 --hybrid-lut-mode --repeat-random 1
cargo run --release --bin execute_circuit -- HomCircuit/divisor --hybrid-lut-mode --repeat-random 1

Example Workflow

cargo run --release --bin generate_circuit -- testcircuit/c7552.v HomCircuit/c7552 --with-merge
cargo run --release --bin execute_circuit -- HomCircuit/c7552 --hybrid-lut-mode --repeat-random 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors