Diamond iO implementation https://eprint.iacr.org/2025/236
Diamond iO implementation https://eprint.iacr.org/2025/236
[!IMPORTANT] ⚠️ This repository is ARCHIVED and no longer maintained.
The latest Diamond iO implementation now lives in the mxx repository.
All active development, bug fixes, and new features happen there. Please use mxx instead of this repository. The code here is kept only for historical reference.
Implementation of Diamond iO, a straightforward construction of indistinguishability obfuscation (iO).
/usr/local/lib), make sure to install our fork in /feat/improve_determinant branchYou can run evaluation experiments with e2e parameters with dio cli tooling.
After installing the prerequisites, you can build the project using:
cargo build --releasecargo test -r --test test_io_dummy_param --no-default-features -- --nocapturecargo test -r --test test_io_real_param --no-default-features -- --ignored --nocaptureuv run memory_profile.py cargo test -r --test test_io_dummy_param --no-default-featuresWe currently support two different matrix implementations:
--features disk): Uses the mmap() syscall to store matrices on disk.Our simulator only targets circuits used for our benchmarks.
dio binary beforesimulator/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.max_d: the maximum value of the number of the secret polynomials denoted by d.min_base_bits: the minimum value of the base bits for decomposition denoted by base_bits.max_base_bits: the maximum value of base_bits.crt_bits: the bits of each moduli of CRT.max_crt_depth: the maximum number of moduli.input_size: the evaluator's input bit size.input_width: the number of bits inserted at each diamond. The larger value of input_width increase the number of preimages but decrease the required modulus size.add_num: the number of addition gates for the evaluator's input bits.mul_num: the number of multiplication gates for the evaluator's input bits.sage main.py under the simulator directory.If the script is completed without any error, the found parameters are added to the last line in simulator/params.log.
Among the parameters, crt_depth denotes the minimum number of moduli satisfying correctness and security, and d, hardcoded_key_sigma, p_sigma, and switched_modulus can be used for ObfuscationParams.
We would like to sincerely thank the developers of OpenFHE and 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), in which our earliest implementation was developed. Any remaining errors are entirely our own responsibility.
No open issues yet, or sync has not completed.