commonware-cryptography 2026.2.0

Generate keys, sign arbitrary messages, and deterministically verify signatures.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "commonware-cryptography"
version = "2026.2.0"
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Generate keys, sign arbitrary messages, and deterministically verify signatures."
homepage = "https://commonware.xyz"
documentation = "https://docs.rs/commonware-cryptography"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/commonwarexyz/monorepo/tree/main/cryptography"

[features]
arbitrary = [
    "commonware-codec/arbitrary",
    "commonware-math/arbitrary",
    "commonware-utils/arbitrary",
    "dep:anyhow",
    "dep:arbitrary",
    "std",
]
default = ["std"]
mocks = ["std"]
parallel = [
    "blake3/rayon",
    "commonware-parallel/std",
    "std",
]
std = [
    "anyhow?/std",
    "blake3/std",
    "bytes/std",
    "chacha20poly1305/getrandom",
    "chacha20poly1305/std",
    "commonware-codec/std",
    "commonware-macros/std",
    "commonware-math/std",
    "commonware-parallel/std",
    "commonware-utils/std",
    "crc-fast/std",
    "ecdsa/std",
    "ed25519-consensus/std",
    "getrandom/std",
    "num-rational",
    "num-traits",
    "num-traits?/std",
    "p256/std",
    "rand/std",
    "rand/std_rng",
    "rand_chacha/std",
    "rand_core/std",
    "sha2/std",
    "thiserror/std",
    "zeroize/std",
]

[lib]
name = "commonware_cryptography"
crate-type = [
    "rlib",
    "cdylib",
]
path = "src/lib.rs"
bench = false

[[bench]]
name = "blake3"
path = "src/blake3/benches/bench.rs"
harness = false

[[bench]]
name = "bloomfilter"
path = "src/bloomfilter/benches/bench.rs"
harness = false

[[bench]]
name = "bls12381"
path = "src/bls12381/benches/bench.rs"
harness = false

[[bench]]
name = "ed25519"
path = "src/ed25519/benches/bench.rs"
harness = false

[[bench]]
name = "handshake"
path = "src/handshake/benches/bench.rs"
harness = false

[[bench]]
name = "lthash"
path = "src/lthash/benches/bench.rs"
harness = false

[[bench]]
name = "secp256r1"
path = "src/secp256r1/benches/bench.rs"
harness = false

[[bench]]
name = "sha256"
path = "src/sha256/benches/bench.rs"
harness = false

[dependencies.anyhow]
version = "1.0.99"
optional = true
default-features = false

[dependencies.arbitrary]
version = "1.4.1"
features = ["derive"]
optional = true

[dependencies.blake3]
version = "1.8.2"
features = ["zeroize"]
default-features = false

[dependencies.blst]
version = "0.3.13"
features = ["no-threads"]
default-features = false

[dependencies.bytes]
version = "1.7.1"
default-features = false

[dependencies.cfg-if]
version = "1.0.0"

[dependencies.commonware-codec]
version = "2026.2.0"
default-features = false

[dependencies.commonware-macros]
version = "2026.2.0"
default-features = false

[dependencies.commonware-math]
version = "2026.2.0"
default-features = false

[dependencies.commonware-parallel]
version = "2026.2.0"
default-features = false

[dependencies.commonware-utils]
version = "2026.2.0"
default-features = false

[dependencies.crc-fast]
version = "1.10.0"
features = ["panic-handler"]
default-features = false

[dependencies.ctutils]
version = "0.3.1"

[dependencies.ecdsa]
version = "0.16.9"
default-features = false

[dependencies.ed25519-consensus]
version = "2.1.0"
default-features = false

[dependencies.num-rational]
version = "0.4.2"
features = ["num-bigint"]
optional = true

[dependencies.num-traits]
version = "0.2.19"
optional = true
default-features = false

[dependencies.p256]
version = "0.13.2"
features = ["ecdsa"]
default-features = false

[dependencies.rand]
version = "0.8.5"
default-features = false

[dependencies.rand_chacha]
version = "0.3"
default-features = false

[dependencies.rand_core]
version = "0.6.4"

[dependencies.sha2]
version = "0.10.8"
default-features = false

[dependencies.thiserror]
version = "2.0.12"
default-features = false

[dependencies.x25519-dalek]
version = "2.0.1"
features = ["zeroize"]

[dependencies.zeroize]
version = "1.5.7"
features = ["zeroize_derive"]

[dev-dependencies.anyhow]
version = "1.0.99"
default-features = false

[dev-dependencies.commonware-conformance]
version = "2026.2.0"

[dev-dependencies.commonware-math]
version = "2026.2.0"
features = ["test_strategies"]
default-features = false

[dev-dependencies.crc]
version = "3.4.0"

[dev-dependencies.criterion]
version = "0.7.0"

[dev-dependencies.proptest]
version = "1.8.0"

[dev-dependencies.rayon]
version = "1.10.0"
default-features = false

[dev-dependencies.rstest]
version = "0.26.1"

[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies.aws-lc-rs]
version = "1.15.2"

[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies.chacha20poly1305]
version = "0.10.1"
features = ["alloc"]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2.15"
features = ["js"]

[lints.clippy]
disallowed_macros = "deny"
disallowed_types = "deny"
missing-const-for-fn = "warn"
option-if-let-else = "warn"
redundant-clone = "warn"
suspicious_op_assign_impl = "allow"
undocumented_unsafe_blocks = "deny"
use-self = "warn"

[lints.rust]
rust-2018-idioms = "deny"
unused-must-use = "deny"
warnings = "deny"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(full_bench)",
    "cfg(generate_conformance_tests)",
    "cfg(commonware_stability_BETA)",
    "cfg(commonware_stability_GAMMA)",
    "cfg(commonware_stability_DELTA)",
    "cfg(commonware_stability_EPSILON)",
    "cfg(commonware_stability_RESERVED)",
]