[package] # Metadata about the package. authors = ["The kyberlib contributors "] build = "build.rs" categories = ["algorithms", "cryptography", "wasm", "no-std"] description = "A Robust Rust Library for CRYSTALS-Kyber Post-Quantum Cryptography." documentation = "https://docs.rs/kyberlib" edition = "2018" exclude = [ "/.git/*", "/.github/*", "/.gitignore", "/.vscode/*" ] homepage = "https://kyberlib.com" include = [ "/CONTRIBUTING.md", "/LICENSE-APACHE", "/LICENSE-MIT", "/benches/**", "/build.rs", "/Cargo.toml", "/examples/**", "/README.md", "/src/**", "/tests/**", ] keywords = ["kyber", "kem", "key-exchange", "kex", "post-quantum"] license = "MIT OR Apache-2.0" name = "kyberlib" readme = "README.md" repository = "https://github.com/sebastienrousseau/kyberlib" version = "0.0.6" [dependencies] # Dependencies for the library aes = { version = "0.8.4", optional = true } ctr = { version = "0.9.2", optional = true } pqc_core = { version = "0.3.0", features = ["zero"]} rand = { version = "0.8.5", default-features = false, features = ["getrandom"] } rand_core = { version = "0.6.4", default-features = false } rlg = "0.0.4" sha2 = { version = "0.10.8", optional = true } tokio = { version = "1.37.0", optional = true } wasm-bindgen = "0.2.92" zeroize = { version = "1.7.0", features = ["derive"] } [dev-dependencies] # Dependencies for testing criterion = "0.5.1" wasm-bindgen-test = "0.3.42" # benchmarking = ["criterion"] [build-dependencies] # Dependencies for the build script cc = {version = "1.0.97", optional = true } nasm-rs = {version = "0.3.0", optional = true } [lib] # Metadata about the library crate-type = ["cdylib", "rlib", "staticlib"] name = "kyberlib" path = "src/lib.rs" # [[bench]] # name = "bench" # harness = false # path = "benches/bench.rs" [features] ### Security Levels ### # Defaults to "kyber768" if none selected # Will throw a compile-time error if more than one level is chosen default = ["kyber768"] # kyber512 = [] kyber768 = [] # kyber1024 = [] [package.metadata.docs.rs] all-features = true ### Export IND-CPA primitives # **WARNING** use with caution hazmat = [] ### Additional features ### # 90s mode uses AES256-CTR and SHA2 as primitives instead # Uses a bitslice implementation 90s = ["sha2"] # Fixslice RustCrypto AES implementation offers some additional sidechannel # attack resistance. Suggest benchmarking for comparison. 90s-fixslice = ["90s", "aes", "ctr"] # Use avx2 intrinsics on x86 architectures # Wont compile if the platform doesn't support it avx2 = ["cc"] # For compiling to wasm targets wasm = ["wasm-bindgen", "getrandom", "rand"] # Uses Netwide Assembler avx2 code instead of GAS, this offers increased # portability, you will need a nasm compiler installed. # Can be downloaded from https://www.nasm.us/ nasm = ["nasm-rs", "avx2"] # Enable std library support std = [] # Linting config [lints.rust] ## Warn # box_pointers = "warn" missing_copy_implementations = "warn" missing_docs = "warn" unstable_features = "warn" # unused_crate_dependencies = "warn" # unused_extern_crates = "warn" unused_results = "warn" ## Allow bare_trait_objects = "allow" elided_lifetimes_in_paths = "allow" non_camel_case_types = "allow" non_upper_case_globals = "allow" trivial_bounds = "allow" unsafe_code = "allow" ## Forbid missing_debug_implementations = "forbid" non_ascii_idents = "forbid" unreachable_pub = "forbid" ## Deny dead_code = "deny" deprecated_in_future = "deny" ellipsis_inclusive_range_patterns = "deny" explicit_outlives_requirements = "deny" future_incompatible = { level = "deny", priority = -1 } keyword_idents = "deny" macro_use_extern_crate = "deny" meta_variable_misuse = "deny" missing_fragment_specifier = "deny" noop_method_call = "deny" pointer_structural_match = "deny" rust_2018_idioms = { level = "deny", priority = -1 } rust_2021_compatibility = { level = "deny", priority = -1 } single_use_lifetimes = "deny" trivial_casts = "deny" trivial_numeric_casts = "deny" unused = { level = "deny", priority = -1 } unused_features = "deny" unused_import_braces = "deny" unused_labels = "deny" unused_lifetimes = "deny" unused_macro_rules = "deny" unused_qualifications = "deny" variant_size_differences = "deny" [package.metadata.clippy] warn-lints = ["clippy::all", "clippy::pedantic", "clippy::cargo", "clippy::nursery"] [profile.dev] codegen-units = 256 debug = true debug-assertions = true incremental = true lto = false opt-level = 0 overflow-checks = true panic = 'unwind' rpath = false strip = false [profile.release] codegen-units = 1 debug = false debug-assertions = false incremental = false lto = true opt-level = "s" overflow-checks = false panic = "abort" rpath = false strip = "symbols" [profile.test] codegen-units = 256 debug = true debug-assertions = true incremental = true lto = false opt-level = 0 overflow-checks = true rpath = false strip = false