[package] name = "commonware-cryptography" edition.workspace = true publish = true version.workspace = true license.workspace = true description = "Generate keys, sign arbitrary messages, and deterministically verify signatures." readme = "README.md" homepage.workspace = true repository = "https://github.com/commonwarexyz/monorepo/tree/main/cryptography" documentation = "https://docs.rs/commonware-cryptography" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(full_bench)'] } [dependencies] commonware-codec = { workspace = true } commonware-utils = { workspace = true } bytes = { workspace = true } thiserror = { workspace = true } rand = { workspace = true } rand_core = { workspace = true } sha2 = { workspace = true } blake3 = { workspace = true, features = ["zeroize"] } rayon = { workspace = true, optional = true } zeroize = { workspace = true, features = ["zeroize_derive"] } ed25519-consensus = { version = "2.1.0", default-features = false } blst = { workspace = true, features = ["no-threads"] } p256 = { workspace = true, features = ["ecdsa"] } rand_chacha = { workspace = true } cfg-if = { workspace = true } x25519-dalek = { workspace = true, features = ["zeroize"] } chacha20poly1305 = { workspace = true, default-features = false, features = ["alloc"] } # Enable "js" feature when WASM is target [target.'cfg(target_arch = "wasm32")'.dependencies.getrandom] version = "0.2.15" features = ["js"] [dev-dependencies] criterion = { workspace = true } [lib] bench = false crate-type = ["rlib", "cdylib"] [features] parallel = ["blake3/rayon", "rayon"] default = ["std"] std = [ "commonware-codec/std", "commonware-utils/std", "rand/std", "rand/std_rng", "thiserror/std", "rayon", "ed25519-consensus/std", "p256/std", "chacha20poly1305/std", "chacha20poly1305/getrandom", ] [[bench]] name = "bls12381" harness = false path = "src/bls12381/benches/bench.rs" [[bench]] name = "ed25519" harness = false path = "src/ed25519/benches/bench.rs" [[bench]] name = "secp256r1" harness = false path = "src/secp256r1/benches/bench.rs" [[bench]] name = "sha256" harness = false path = "src/sha256/benches/bench.rs" [[bench]] name = "blake3" harness = false path = "src/blake3/benches/bench.rs" [[bench]] name = "lthash" harness = false path = "src/lthash/benches/bench.rs" [[bench]] name = "handshake" harness = false path = "src/handshake/benches/bench.rs"