Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/benchmark-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ jobs:
echo "installed=false" >> $GITHUB_OUTPUT
fi

- name: Checkout OpenFHE
if: steps.openfhe-check.outputs.installed == 'false'
uses: actions/checkout@v4
with:
repository: MachinaIO/openfhe-development
ref: feat/improve_determinant
path: openfhe
# this not working as we anonymize the forked repo
# - name: Checkout OpenFHE
# if: steps.openfhe-check.outputs.installed == 'false'
# uses: actions/checkout@v4
# with:
# repository: anonymous/openfhe-development
# path: openfhe

- name: Build & install OpenFHE
if: steps.openfhe-check.outputs.installed == 'false'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential cmake libgmp-dev libasound2-dev

- name: Checkout OpenFHE
uses: actions/checkout@v4
with:
repository: MachinaIO/openfhe-development
ref: feat/improve_determinant
path: openfhe
# this not working as we anonymize the forked repo
# - name: Checkout OpenFHE
# uses: actions/checkout@v4
# with:
# repository: anonymous/openfhe-development
# path: openfhe


- name: Build OpenFHE
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cpu = []
tokio = { version = "1", features = ["fs", "rt-multi-thread", "macros"] }
futures = "0.3"
libc = { version = "0.2", optional = true }
openfhe = { git = "https://github.com/MachinaIO/openfhe-rs.git", branch = "exp/reimpl_trapdoor" }
openfhe = { path = "../openfhe-rs" }
digest = "0.10"
num-bigint = { version = "0.4", features = ["serde"] }
num-traits = "0.2"
Expand Down
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
MIT License

Copyright (c) 2024 MachinaIO

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# diamond-io

Implementation of [Diamond iO](https://eprint.iacr.org/2025/236), a straightforward construction of indistinguishability obfuscation (iO).
Implementation of Diamond iO, a straightforward construction of indistinguishability obfuscation (iO).

## Installation

### Prerequisites
- A Unix-based OS (MacOS, Linux, etc.)
- [Rust](https://www.rust-lang.org/tools/install) (Using `rustup` is recommended)
- [OpenFHE](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/installation.html) (System install required in `/usr/local/lib`)
- [Rust](https://www.rust-lang.org/tools/install) 1.87 nightly
- [OpenFHE](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/installation.html) (System install required in `/usr/local/lib`), make sure to install our [fork](https://anonymous.4open.science/r/openfhe-development-B612/README.md)
- openFHE-rs, clone our [fork](https://anonymous.4open.science/r/openfhe-rs-0BB7/README.md) and point `Cargo.toml` to the local path

### Building

Expand All @@ -17,6 +17,10 @@ After installing the prerequisites, you can build the project using:
cargo build --release
```

## Experiments

You can run evaluation experiments with [e2e](./e2e/) parameters with [dio](./dio/) cli tooling.

## Test iO (End-To-End)

- **Dummy parameters**
Expand Down Expand Up @@ -47,7 +51,7 @@ We currently support two different matrix implementations:

Our simulator only targets circuits used for our benchmarks.

1. Make sure to install [`dio`](/dio/) binary before
1. Make sure to install [`dio`](./dio/) binary before
2. Change the following values hardcoded in `simulator/main.py` after the line `if __name__ == "__main__":`:
- `secpar`: the minimum security parameter you want to guarantee.
- `log2_n`: a log2 value of the ring dimension.
Expand All @@ -68,5 +72,3 @@ Among the parameters, `crt_depth` denotes the minimum number of moduli satisfyin


## Acknowledgments

*We would like to sincerely thank the developers of [OpenFHE](https://github.com/openfheorg/openfhe-development) and [openfhe-rs](https://github.com/fairmath/openfhe-rs), open-source lattice and FHE libraries, whose optimized implementations of trapdoor sampling, RLWE primitives, and Rust bindings played a crucial role in helping us implement Diamond iO. We are also grateful to Prof. Yuriy Polyakov for his valuable advice on preimage sampling and his insightful feedback on optimizing our implementation. We greatefully acknowledge [Community Privacy Residency (2025)](https://community-privacy.github.io/partners/), in which our earliest implementation was developed. Any remaining errors are entirely our own responsibility.*
1 change: 0 additions & 1 deletion simulator/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,3 @@ dependencies:
- wcwidth==0.2.13
- webencodings==0.5.1
- zict==3.0.0
prefix: /Users/suegamisora/miniforge3
4 changes: 0 additions & 4 deletions src/poly/dcrt/poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,6 @@ mod tests {
#[test]
fn test_dcrtpoly_coeffs() {
let mut rng = rand::rng();
/*
todo: if x=0, n=1: libc++abi: terminating due to uncaught exception of type lbcrypto::OpenFHEException: /Users/piapark/Documents/GitHub/openfhe-development/src/core/include/math/nbtheory.h:l.156:ReverseBits(): msbb value not handled:0
todo: if x=1, n=2: value mismatch from_coeffs & coeffs
*/
let x = rng.random_range(12..20);
let size = rng.random_range(1..20);
let n = 2_i32.pow(x) as u32;
Expand Down
Loading