Skip to content

Repository files navigation

opacity-ferveo

A synchronous Distributed Key Generation (DKG) and threshold decryption library over BLS12-381, used by opacity-stack.

Validators jointly generate a shared public key via publicly verifiable secret sharing; the matching private key never exists in one place. Data encrypted to the shared key can only be decrypted when a threshold of validators cooperate. The construction is described in IACR ePrint 2022/898.

This is a fork of Ferveo, originally developed by Heliax for the Anoma project and later maintained as part of the NuCypher/TACo stack. It is maintained by Opacity Labs for use in opacity-stack; general-purpose use is not a goal.

Crates

  • ferveo — the DKG protocol: transcripts, aggregation, refresh/handover, and the server/client API (ferveo::api)
  • ferveo-tdec — threshold encryption/decryption primitives
  • ferveo-common — keypairs and serialization helpers
  • subproductdomain — fast polynomial evaluation/interpolation

Build and test

mise test   # cargo test --release --workspace, plus the
            # experimental-refresh feature config

Release mode matters: the test suite runs full DKG ceremonies and is significantly slower in debug. Lints must be clean:

mise lint   # rustfmt check; clippy -D warnings in both feature
            # configs; cargo-machete

Both tasks mirror CI (.github/workflows/tests.yaml); see mise.toml for the exact commands if you don't use mise.

Wire-format stability

Everything this library serializes (keys, transcripts, ciphertexts) is consumed by deployed systems. ferveo/tests/wire_format.rs pins the serialized format against golden vectors generated by earlier builds — if it fails, your change breaks compatibility with persisted artifacts and must be treated as a wire-format break, not a test to update.

Security Warning

This library has not been independently audited. Use at your own risk.

Security Notes

Deliberate cryptographic decisions and assumptions — for example, the PVSS proof-of-knowledge (σ) soundness assumption and its reuse audit — are recorded in docs/security-notes.md.

License

GPL-3.0. See LICENSE.

Cryptography Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

This software may be subject to the U.S. Export Administration Regulations (EAR), including ECCN 5D002, which covers information security software using or performing cryptographic functions with asymmetric algorithms. The source code is publicly available and is intended to qualify for treatment under EAR §742.15 and §734.3(b)(3). Notification for the original project's source code was submitted by its maintainers to crypt@bis.doc.gov and enc@nsa.gov.

The maintainers make no representation regarding your ability to import, export, or use this software in compliance with the laws of your jurisdiction. Users are responsible for complying with all applicable laws and regulations.

About

Synchronous DKG and threshold decryption over BLS12-381 — Opacity's maintained fork of Ferveo, consumed by opacity-stack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages