Architecture
Confium is open-source infrastructure for distributed cryptographic trust. One repository holds everything: a 66-crate Rust workspace with the engine and its plugin contract, the threshold-cryptography foundations, six products built on those foundations, and the services and bindings that carry them to applications — plus a few deliberately non-Rust edges (a Go package, a Go Terraform provider, a Cloudflare Worker log edge, and a standalone Python build).
The Rust workspace is a strictly layered graph — dependencies
point downward only and there are no cycles. Every crate carries
#![forbid(unsafe_code)]; the single exception is confium-core,
whose job is the C ABI and where all unsafe code is centralized.
The layer map
| Layer | What lives there | Crates |
|---|---|---|
| Surfaces | What applications touch: CLIs, daemons, language bindings, adapters for industry-standard APIs. | confium-cli, confium-daemon, confium-signerd, confium-node, confium-python (standalone build), confium-wasm, confium-ruby (sibling repo), confium-go (Go package), confium-terraform-provider (Go), confium-operator |
| Products | Facades that compose foundations into a story you can install. Three products ship dedicated facade crates (confium-threshold, confium-keyless, confium-verify); Transparency, PKI, and Privacy are served by their foundation crates directly. |
confium-threshold, confium-keyless, confium-verify, confium-transparency, confium-pki, confium-privacy |
| Services | Long-running things: coordination, transparency-log serving and monitoring, verification endpoints, registries. | confium-coordinator, confium-log-server, confium-log-monitor (Rust), confium-log-edge (Cloudflare Worker), confium-verify-server, confium-registry, confium-oidc |
| Foundations | The cryptographic substance: threshold schemes, PKI, transparency, composite signatures, policy. | confium-tc-core, confium-tc-keys, the confium-tc-* scheme crates, confium-crypto-vss, confium-crypto-zk, confium-privacy, confium-pki, confium-pki-tc, confium-composite, confium-attributes, confium-transparency, confium-patterns, confium-signatif, confium-observability |
| Engine & platform | The plugin engine and the boring-but-critical substrate. | confium-core, confium-api, confium-macros, confium-net-*, confium-store-*, confium-sandbox-*, confium-deployment |
Six products on shared foundations
The products are the public story; each has its own minisite and composes the same foundations differently:
- Threshold — eliminate single points of failure in signing. FROST, CMP20, GG18 over Ed25519, P-256, and ML-DSA; async ceremonies that complete across hours or days.
- Transparency — tamper-evident audit trails: RFC 6962 append-only Merkle logs, inclusion and consistency proofs, OpenTimestamps anchoring, RFC 4998 evidence-record archival. The public reference log runs at log.confium.org.
- PKI — run a CA without a single trusted key: threshold certificate issuance, delegation, path validation, and drop-in adapters (PKCS#11 server, OpenSSL 3.0 provider, JCE, TLS 1.3 signer) so existing consumers keep working unchanged.
- Keyless — sign releases without managing keys: OIDC-identity-bound ephemeral threshold ceremonies for CI and artifact signing.
- Privacy — privacy-preserving primitives: PSI, PIR, differential privacy, oblivious transfer, ring and blind signatures, VRFs and VDFs.
- Verify — verify threshold artifacts anywhere:
a verification pipeline over trusted artifacts and trust graphs
(the SIGNATIF framework layer), shipped to browsers via WASM, to
any HTTP consumer via
confium-verify-server, and to Rust, Ruby, Python, Node, and Go.
The engine and the plugin contract
confium-core is a configurable engine: it loads plugins,
negotiates per-interface versions, and routes calls. A plugin is a
cdylib exporting a small bootstrap surface — the cfmp_*
contract:
| Symbol | Role |
|---|---|
cfmp_interface_version |
Plugin-contract ABI version. |
cfmp_initialize / cfmp_finalize |
One-time setup and teardown. |
cfmp_query_interfaces |
name\0version\0 pairs naming the interface types and versions implemented. |
cfmp_metadata (optional) |
Name, version, vendor, license for the registry. |
cfmp_query_dependencies (optional) |
Dependencies resolved before cfmp_initialize. |
Shipped interfaces: hash, rng, cipher, aead, kdf, kem,
keyfmt, signature. Adding an interface type means writing a
module that registers itself — no edits to existing code
(link-time registration via inventory).
Bindings do not go through the C ABI
The cfm_* C ABI serves plugins and adapters, not
applications. Every language binding wraps the Rust crates
directly through its own native-extension mechanism:
| Surface | Mechanism | Notes |
|---|---|---|
| Rust | confium-api |
The canonical public API. |
| Ruby | magnus + rb_sys | Wraps the confium-* crates directly; prebuilt gems for seven platforms, no C toolchain. |
| Python | PyO3 | Composite, transparency, PKI, attributes. |
| Node | confium-node |
Native bindings. |
| WASM | wasm-bindgen | Verifier-only by design — browsers verify, servers sign. |
| Go | confium-go |
cgo bindings linked against the Rust crates. |
| PKCS#11 / OpenSSL / JCE / TLS | adapter crates | Industry-standard APIs translated into threshold operations. |
Threshold signing, end to end
A signing ceremony flows through the stack like this:
- Key generation — a DKG or dealer protocol in the scheme
crate (
confium-tc-frost-*,confium-tc-cmp20,confium-tc-gg18) produces N share blobs and a quorum public key. Shares live in stores (confium-store-*: PKCS#11, TPM, cloud KMS, OpenPGP cards) or portable share files. - Coordination —
confium-coordinatorruns async sessions: parties submit commitments and shares at their own pace; the session state machine tracks progress; the combine runs once the threshold is met.confium-signerdis the daemon signers run;confium-operatorruns ceremonies on Kubernetes. - Verification — verifiers check the resulting signature with
plain crypto (Ed25519, ECDSA-P256) or a composite verifier, and
anchor trust in transparency logs and trust graphs
(
confium-signatif).
One signer submitting twice never counts twice toward a threshold; identities are load-bearing from the coordinator down to the binding-level session objects.
Transparency and verification
Every product can anchor its artifacts into an append-only log:
confium-transparency implements RFC 6962 inclusion and
consistency proofs; confium-log-server serves a public log (the
log.confium.org reference
implementation), confium-log-edge is the ingest path, and
confium-log-monitor is the third-party watch for fork attempts.
On top, confium-signatif implements the verification pipeline —
trusted artifacts, trust graphs, coverage reports, and graduated
verdicts — which confium-verify-server and the WASM package
expose to browsers and HTTP consumers.
Principles that shape every crate
- OCP via traits — new backends register; existing code is never edited to enumerate them.
- MECE crate boundaries — each crate owns one concern; the layering is enforced, not aspirational.
- Type-safe errors —
thiserror/snafuenums everywhere; bindings surface typed, structured errors. - No unsafe code —
#![forbid(unsafe_code)]in every crate; FFI is centralized and minimal. - Standards-only integrations — PKCS#11, OpenSSL 3.0, JCE, CMS, X.509, RFC 6962, RFC 4998, RFC 9580. No vendor SDKs.
Where to go next
- Components — every crate, one line each.
- Security model — the threat model.
- Rust API and WASM API.
- The six product pages: Threshold, Transparency, PKI, Keyless, Privacy, Verify.