ml-dsa 0.1.2

Pure Rust implementation of ML-DSA (formerly known as CRYSTALS-Dilithium) as described in FIPS-204 (final)
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 = "2024"
rust-version = "1.87"
name = "ml-dsa"
version = "0.1.2"
build = false
exclude = [
    "tests/key-gen.json",
    "tests/key-gen.rs",
    "tests/proptests.proptest-regressions",
    "tests/sig-gen.json",
    "tests/sig-gen.rs",
    "tests/sig-ver.json",
    "tests/sig-ver.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Pure Rust implementation of ML-DSA (formerly known as CRYSTALS-Dilithium) as
described in FIPS-204 (final)
"""
homepage = "https://github.com/RustCrypto/signatures/tree/master/ml-dsa"
readme = "README.md"
keywords = [
    "crypto",
    "signature",
]
categories = ["cryptography"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/signatures"
resolver = "2"

[package.metadata.docs.rs]
all-features = true

[features]
alloc = [
    "hybrid-array/alloc",
    "module-lattice/alloc",
    "pkcs8?/alloc",
    "signature/alloc",
]
default = [
    "alloc",
    "getrandom",
    "pkcs8",
]
getrandom = [
    "common/getrandom",
    "rand_core",
]
pkcs8 = [
    "dep:const-oid",
    "dep:pkcs8",
]
rand_core = [
    "common/rand_core",
    "signature/rand_core",
]
zeroize = [
    "dep:zeroize",
    "hybrid-array/zeroize",
    "module-lattice/zeroize",
    "shake/zeroize",
]

[lib]
name = "ml_dsa"
path = "src/lib.rs"

[[test]]
name = "key-cache"
path = "tests/key-cache.rs"

[[test]]
name = "pkcs8"
path = "tests/pkcs8.rs"

[[test]]
name = "proptests"
path = "tests/proptests.rs"

[[test]]
name = "stack"
path = "tests/stack.rs"

[[test]]
name = "wycheproof"
path = "tests/wycheproof.rs"

[[bench]]
name = "ml_dsa"
path = "benches/ml_dsa.rs"
harness = false
required-features = ["getrandom"]

[dependencies.common]
version = "0.2"
default-features = false
package = "crypto-common"

[dependencies.const-oid]
version = "0.10"
features = ["db"]
optional = true

[dependencies.ctutils]
version = "0.4.7"
default-features = false

[dependencies.hybrid-array]
version = "0.4"
features = ["extra-sizes"]

[dependencies.module-lattice]
version = "0.2.4"
features = ["ctutils"]

[dependencies.pkcs8]
version = "0.11"
optional = true
default-features = false

[dependencies.shake]
version = "0.1"
default-features = false

[dependencies.signature]
version = "3"
features = ["digest"]
default-features = false

[dependencies.zeroize]
version = "1.8.1"
optional = true
default-features = false

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

[dev-dependencies.getrandom]
version = "0.4"
features = ["sys_rng"]

[dev-dependencies.hex]
version = "0.4"
features = ["serde"]

[dev-dependencies.hex-literal]
version = "1"

[dev-dependencies.pkcs8]
version = "0.11"
features = ["pem"]

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

[dev-dependencies.serde]
version = "1.0.215"
features = ["derive"]

[dev-dependencies.serde_json]
version = "1.0.132"

[lints.clippy]
as_conversions = "warn"
borrow_as_ptr = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
from_iter_instead_of_collect = "warn"
implicit_saturating_sub = "warn"
integer_division_remainder_used = "warn"
manual_assert = "warn"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
ptr_as_ptr = "warn"
redundant_closure_for_method_calls = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
trivially_copy_pass_by_ref = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_used = "warn"

[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
unused_lifetimes = "warn"
unused_qualifications = "warn"