A pure-Rust port of selected components from the Haskell
cardano-base project. The workspace
provides cryptographic primitives (VRF, KES, DSIGN), Cardano-specific slotting utilities,
CBOR serialisation helpers, and strictness libraries that underpin Rust services in the
Cardano ecosystem.
- Cryptography: Ed25519 (standard and mlocked) parity complete; ECDSA secp256k1 & Schnorr
secp256k1 harnesses passing against embedded vectors (formal cross-language review pending);
Praos VRF parity complete in
cardano-crypto-classandcardano-vrf-pure. - Key Evolving Signatures:
SingleKes,Sum{0-7}Kes, andCompactSum{0-7}Keswith Blake2b hashing, structural + forward-security regressions, serde-gated vectors (tracked periods + full evolution traces), and boundary/tamper tests incardano-crypto-class. Mlocked memory security & perf benchmarking remain in progress. - VRF reference implementation ✅: Draft-03 and Draft-13 VRFs over Curve25519 in
cardano-vrf-purewith byte-for-byte parity to Cardano libsodium. SeeVRF_PARITY_COMPLETE.md. - CBOR tooling: Strict CBOR serialisation with tag-24 helpers in
cardano-binary. - Slotting primitives: Epoch and time arithmetic in
cardano-slotting. - Strictness utilities: Strict containers,
NoThunks,NFData, and deriving helpers for predictable evaluation across thecardano-strict-containers,base-deriving-via, andorphans-deriving-viacrates.
Prerequisites: Rust 1.85 or newer with cargo, installed via
rustup.
cargo build --workspace
cargo test --workspace
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warningsThe full test suite includes VRF and KES golden tests that depend on vectors in
cardano-test-vectors/test_vectors.
Refer to docs/development/testing.md for a curated list of
recommended commands, feature flags, and editor integrations. The repository’s dev
container configuration lives in the workspace-level .devcontainer/ folder when required
for CI parity; if the folder is absent, follow the documented local setup instead.
Authoritative documentation lives under docs/:
- Architecture overview
- Cryptography reference
- Development: testing checklist
- Development: release checklist
Progress across parity phases is captured in the repository root:
Security reports should follow the process described in the Cardano engineering handbook
linked from CONTRIBUTING.md; conduct expectations live in
CODE-OF-CONDUCT.md.
| Crate | Description |
|---|---|
cardano-crypto-class |
Cryptographic primitives, secure memory, hashing |
cardano-vrf-pure |
Curve25519 VRF implementations |
cardano-binary |
CBOR serialisation helpers |
cardano-slotting |
Epoch and slot arithmetic |
cardano-base |
Feature-flag wiring |
cardano-test-vectors |
Golden data consumed by crypto tests |
cardano-strict-containers |
Strict container types |
deepseq, nothunks |
Evaluation traits |
measures, heapwords |
Measurement helpers |
base-deriving-via, orphans-deriving-via |
Deriving utilities |
cardano-git-rev |
Embeds build git revision |
See docs/architecture.md for crate relationships and feature flags.
Please read CONTRIBUTING.md for workflow guidance. Pull requests
should:
- Update documentation alongside code changes where relevant.
- Pass
cargo fmt,cargo clippy, and the full test suite shown above. - Include new tests or vectors when introducing cryptographic behaviour changes.
Security-sensitive reports should follow the Cardano engineering handbook guidance linked
from CONTRIBUTING.md.
Dual-licensed under the Apache License, Version 2.0 and the MIT license. See
LICENSE and NOTICE for details.