[package]
edition = "2021"
rust-version = "1.74"
name = "kyberlib"
version = "0.0.7"
authors = ["The kyberlib contributors <contact@kyberlib.com>"]
build = "build.rs"
include = [
"/CHANGELOG.md",
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/README.md",
"/SECURITY.md",
"/build.rs",
"/Cargo.toml",
"/examples/**",
"/src/**",
"/tests/*.rs",
"/benches/**",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A robust, audit-friendly Rust implementation of FIPS 203 ML-KEM (the standardised CRYSTALS-Kyber post-quantum KEM)."
homepage = "https://kyberlib.com"
documentation = "https://docs.rs/kyberlib"
readme = "README.md"
keywords = [
"ml-kem",
"kyber",
"kem",
"post-quantum",
"fips203",
]
categories = [
"algorithms",
"cryptography",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/sebastienrousseau/kyberlib"
[package.metadata.docs.rs]
features = [
"kyber768",
"std",
"hazmat",
]
rustdoc-args = [
"--cfg",
"docsrs",
]
[package.metadata.clippy]
warn-lints = [
"clippy::all",
"clippy::pedantic",
"clippy::cargo",
"clippy::nursery",
]
[features]
90s = ["dep:sha2"]
90s-fixslice = [
"90s",
"dep:aes",
"dep:ctr",
]
avx2 = ["dep:cc"]
benchmarking = []
default = [
"kyber768",
"std",
]
fips = []
hazmat = []
kyber1024 = []
kyber512 = []
kyber768 = []
nasm = [
"dep:nasm-rs",
"avx2",
]
std = ["zeroize/std"]
verified = []
[lib]
name = "kyberlib"
crate-type = ["rlib"]
path = "src/lib.rs"
[[example]]
name = "ake"
path = "examples/ake.rs"
[[example]]
name = "deterministic_seed"
path = "examples/deterministic_seed.rs"
[[example]]
name = "kem"
path = "examples/kem.rs"
[[example]]
name = "no_std_demo"
path = "examples/no_std_demo.rs"
[[example]]
name = "typed_kem"
path = "examples/typed_kem.rs"
[[example]]
name = "uake"
path = "examples/uake.rs"
[[test]]
name = "test_acvp"
path = "tests/test_acvp.rs"
[[test]]
name = "test_api"
path = "tests/test_api.rs"
[[test]]
name = "test_coverage_gaps"
path = "tests/test_coverage_gaps.rs"
[[test]]
name = "test_error"
path = "tests/test_error.rs"
[[test]]
name = "test_kat"
path = "tests/test_kat.rs"
[[test]]
name = "test_kem"
path = "tests/test_kem.rs"
[[test]]
name = "test_kex"
path = "tests/test_kex.rs"
[[test]]
name = "test_lib"
path = "tests/test_lib.rs"
[[test]]
name = "test_macros"
path = "tests/test_macros.rs"
[[test]]
name = "test_params"
path = "tests/test_params.rs"
[[test]]
name = "test_properties"
path = "tests/test_properties.rs"
[[test]]
name = "test_rng"
path = "tests/test_rng.rs"
[[test]]
name = "test_snapshots"
path = "tests/test_snapshots.rs"
[[test]]
name = "test_symmetric"
path = "tests/test_symmetric.rs"
[[bench]]
name = "api"
path = "benches/api.rs"
harness = false
[[bench]]
name = "dudect"
path = "benches/dudect.rs"
harness = false
[dependencies.aes]
version = "0.8.4"
optional = true
default-features = false
[dependencies.ctr]
version = "0.9.2"
optional = true
default-features = false
[dependencies.rand_core]
version = "0.6.4"
default-features = false
[dependencies.sha2]
version = "0.10.8"
optional = true
default-features = false
[dependencies.zeroize]
version = "1.8.2"
features = ["derive"]
default-features = false
[dev-dependencies.criterion]
version = "0.5.1"
[dev-dependencies.dudect-bencher]
version = "0.7"
[dev-dependencies.insta]
version = "1.40"
features = ["yaml"]
[dev-dependencies.proptest]
version = "1.5"
[dev-dependencies.rand]
version = "0.8.6"
features = [
"std",
"std_rng",
"getrandom",
]
default-features = false
[dev-dependencies.rand_chacha]
version = "0.3"
[dev-dependencies.serde]
version = "1.0"
features = [
"derive",
"std",
]
default-features = false
[dev-dependencies.serde_json]
version = "1.0"
features = [
"alloc",
"std",
]
default-features = false
[build-dependencies.cc]
version = "1.2.62"
optional = true
[build-dependencies.nasm-rs]
version = "0.3.2"
optional = true
[lints.clippy]
assertions_on_constants = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
doc_lazy_continuation = "allow"
doc_markdown = "allow"
explicit_iter_loop = "allow"
items_after_statements = "allow"
large_types_passed_by_value = "allow"
manual_rotate = "allow"
many_single_char_names = "allow"
missing_const_for_fn = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_pass_by_ref_mut = "allow"
needless_pass_by_value = "allow"
needless_return = "allow"
no_effect_underscore_binding = "allow"
option_if_let_else = "allow"
ptr_arg = "allow"
redundant_pub_crate = "allow"
semicolon_if_nothing_returned = "allow"
similar_names = "allow"
too_long_first_doc_paragraph = "allow"
too_many_lines = "allow"
uninlined_format_args = "allow"
unnecessary_wraps = "allow"
unreadable_literal = "allow"
unused_result_ok = "allow"
use_self = "allow"
used_underscore_binding = "allow"
wildcard_imports = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
bare_trait_objects = "allow"
elided_lifetimes_in_paths = "allow"
missing_copy_implementations = "warn"
non_camel_case_types = "allow"
non_upper_case_globals = "allow"
trivial_bounds = "allow"
unsafe_code = "allow"
unstable_features = "warn"
unused_results = "allow"
[lints.rust.dead_code]
level = "deny"
priority = 1
[lints.rust.deprecated_in_future]
level = "deny"
priority = 1
[lints.rust.ellipsis_inclusive_range_patterns]
level = "deny"
priority = 1
[lints.rust.explicit_outlives_requirements]
level = "deny"
priority = 1
[lints.rust.future_incompatible]
level = "deny"
priority = -1
[lints.rust.keyword_idents]
level = "deny"
priority = -1
[lints.rust.macro_use_extern_crate]
level = "deny"
priority = 1
[lints.rust.meta_variable_misuse]
level = "deny"
priority = 1
[lints.rust.missing_debug_implementations]
level = "forbid"
priority = 1
[lints.rust.non_ascii_idents]
level = "forbid"
priority = 1
[lints.rust.noop_method_call]
level = "deny"
priority = 1
[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1
[lints.rust.rust_2021_compatibility]
level = "deny"
priority = -1
[lints.rust.single_use_lifetimes]
level = "deny"
priority = 1
[lints.rust.trivial_casts]
level = "deny"
priority = 1
[lints.rust.trivial_numeric_casts]
level = "deny"
priority = 1
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(KYBER_SECURITY_PARAMETERat)",
"cfg(fuzzing)",
"cfg(docsrs)",
'cfg(feature, values("kyber512", "kyber1024", "benchmarking"))',
"cfg(wasm_bindgen_unstable_test_coverage)",
]
[lints.rust.unreachable_pub]
level = "forbid"
priority = 1
[lints.rust.unused]
level = "deny"
priority = -1
[lints.rust.unused_features]
level = "deny"
priority = 1
[lints.rust.unused_import_braces]
level = "deny"
priority = 1
[lints.rust.unused_labels]
level = "deny"
priority = 1
[lints.rust.unused_lifetimes]
level = "deny"
priority = 1
[lints.rust.unused_macro_rules]
level = "deny"
priority = 1
[lints.rust.unused_qualifications]
level = "deny"
priority = 1
[lints.rust.variant_size_differences]
level = "deny"
priority = 1