Quickstart
Pick your language. Each quickstart takes you from install
to a verified composite signature in under five minutes. No
prior threshold-cryptography knowledge required.
Pick your language
| Language | Best for | Quickstart |
|---|---|---|
| Python | Web apps, data pipelines, scripts | pip install confium |
| Ruby | Rails, Sinatra, ops automation | gem install confium |
| Rust | Embedded use, max performance, the engine itself | cargo add confium-core |
| WASM (browser) | In-browser verification — ship to clients | npm install @confium/confium-wasm |
| JSON-RPC daemon | Any language — Go, Java, shell, anything that speaks HTTP | cargo install confium-daemon |
Python
1. Install
pip install confium
Pre-built wheels for CPython 3.9+ on Linux (amd64/arm64), macOS (amd64/arm64), Windows (amd64).
2. Verify a composite signature
import confium
# A composite signature you received from a Confium signer
message = b"hello, world"
signature_bytes = bytes.fromhex("...")
public_key_bytes = bytes.fromhex("...")
result = confium.CompositeSignature.verify(
message=message,
signature=signature_bytes,
public_key=public_key_bytes,
)
print("valid:", result.valid) # → True
3. Sign one yourself
# Sign with an Ed25519 secret key
secret = bytes.fromhex("...") # your Ed25519 secret key
sig = confium.CompositeSignature.sign_ed25519(
message=message,
secret_key=secret,
)
print(sig.signature.hex())
4. Next
- Python signing service use case — embed signing in a Django/Flask app.
- Python binding reference — full API surface.
Ruby
1. Install
gem install confium
The native extension compiles at install time. Prerequisites:
Ruby ≥ 3.1, Rust stable 1.85+, a C toolchain (cc, make).
2. Verify a composite signature
require "confium"
message = "hello, world"
signature_bytes = [sig_hex].pack("H*")
public_key_bytes = [pubkey_hex].pack("H*")
result = Confium::Composite.verify(
message: message,
signature: signature_bytes,
public_key: public_key_bytes,
)
puts "valid: #{result.valid?}" # → true
3. Anchor the verification in a transparency log
tree = Confium::Transparency::MerkleTree.new
seq = tree.append(
artifact_type: :composite_signature,
artifact_hash: Digest::SHA256.digest(signature_bytes),
)
puts "anchored at sequence #{seq}, root #{tree.root.unpack1('H*')}"
4. Next
- OpenPGP integration use case — Ruby’s hard-bundled OpenPGP (RNP).
- Ruby binding reference — full API surface.
Rust
1. Add the dependency
cargo add confium-core
cargo add confium-composite
2. Verify a composite signature
use confium_composite::{CompositeSignature, ed25519_verifier};
let message = b"hello, world";
let signature: &[u8] = /* composite signature bytes */;
let public_key: &[u8] = /* public key bytes */;
let result = CompositeSignature::verify(message, signature)
.map(|sig| sig.verify_with(message, &[ed25519_verifier(public_key)]))
.expect("parse + verify");
println!("valid: {}", result.is_ok());
3. Next
- Components — the 46-crate workspace map.
- Architecture — how the engine fits together.
WASM (browser)
1. Install
npm install @confium/confium-wasm
2. Verify a composite signature in the browser
import init, { CompositeSignature } from "@confium/confium-wasm";
await init(); // load the WASM module
const message = new TextEncoder().encode("hello, world");
const signature = new Uint8Array(/* signature bytes */);
const publicKey = new Uint8Array(/* pubkey bytes */);
const result = CompositeSignature.verify(message, signature, publicKey);
console.log("valid:", result.valid); // → true
3. Tree-shake to just what you need
npm install @confium/confium-wasm-composite # verify-composite only
The package has per-subsystem features (verify-composite,
verify-transparency, verify-attributes, verify-pki).
Ship only what your browser code calls.
4. Next
- @confium/confium-wasm on npm.
- WASM is verifier-only by design. Browsers verify; servers sign.
JSON-RPC daemon
For Go, Java, shell, or any language without a native Confium binding.
1. Install + run
cargo install confium-daemon --locked
confiumd --listen unix:///var/run/confium.sock
2. Verify a composite signature via curl
curl --unix-socket /var/run/confium.sock \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "composite_verify",
"params": {
"message": "'$(base64 -w0 message.bin)'",
"signature": "'$(base64 -w0 sig.bin)'",
"public_key": "'$(base64 -w0 pubkey.bin)'"
}
}' \
http://localhost/
3. Next
- Polyglot verification use case — when to use the daemon vs a native binding.
- Daemon reference — full JSON-RPC method table.
What to read next
| If you want to | Read |
|---|---|
| Understand the threshold-crypto math | Threshold crypto 101 |
| See how Confium fits into existing PKI | TLS analogy |
| Pick a deployment shape | Deployment modes |
| See real-world deployments | Use cases — 26 scenarios |
| Run it in production | Deployment — Docker, Helm, Grafana |
See also
- Getting started — the original install-focused page (kept for backward links).
- Components — every crate in the workspace.
- Architecture — how it all fits together.