[package]
edition = "2024"
name = "sntrup"
version = "0.1.0"
authors = ["Michael Lodder <redmike7@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust implementation of the Streamlined NTRU Prime KEM for all parameter sizes"
documentation = "https://docs.rs/crate/sntrup"
readme = "README.md"
keywords = [
"cryptography",
"hashing",
"NTRU",
"post-quantum",
]
categories = [
"algorithms",
"cryptography",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/mikelodder7/sntrup"
[features]
alloc = []
dcap = []
default = [
"kgen",
"ecap",
"dcap",
]
ecap = []
force-scalar = []
js = ["getrandom/wasm_js"]
kgen = []
serde = [
"dep:serdect",
"dep:serde",
]
std = []
[lib]
name = "sntrup"
path = "src/lib.rs"
[[test]]
name = "kat"
path = "tests/kat.rs"
[[test]]
name = "kem"
path = "tests/kem.rs"
[[test]]
name = "roundtrip"
path = "tests/roundtrip.rs"
[[test]]
name = "serde"
path = "tests/serde.rs"
[[test]]
name = "sizes"
path = "tests/sizes.rs"
[[bench]]
name = "mod"
path = "benches/mod.rs"
harness = false
[dependencies.getrandom]
version = "0.4"
optional = true
[dependencies.hex]
version = "0.4"
[dependencies.rand]
version = "0.10.0"
[dependencies.rand_chacha]
version = "0.10.0"
[dependencies.serde]
version = "1"
optional = true
default-features = false
[dependencies.serdect]
version = "0.4"
optional = true
[dependencies.subtle]
version = "2"
[dependencies.thiserror]
version = "2.0"
[dependencies.zeroize]
version = "1"
features = ["derive"]
[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[dev-dependencies.serde_json]
version = "1"
[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies.sha2]
version = "0.10"
features = ["asm"]
[target.'cfg(not(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")))'.dependencies.sha2]
version = "0.10"
[lints.clippy]
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
mod_module_files = "warn"
panic = "warn"
panic_in_result_fn = "warn"
unwrap_used = "deny"
[lints.rust]
missing_debug_implementations = "deny"
missing_docs = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unstable_features = "deny"
unused_extern_crates = "deny"
unused_import_braces = "deny"
unused_lifetimes = "deny"
unused_parens = "deny"
unused_qualifications = "deny"