Cargo Features

pqc_kyber has no features set by default.

[dependencies]
pqc_kyber = { version = "0.7.1", features = ["kyber512", "kyber768", "kyber1024", "hazmat", "90s", "90s-fixslice", "avx2", "wasm", "nasm", "std", "benchmarking", "zeroize"] }
kyber512

Security Levels
Defaults to "kyber768" if none selected
Will throw a compile-time error if more than one level is chosen

Affects poly::poly_compress, poly::poly_decompress, poly::poly_getnoise_eta1122_4x, poly::poly_getnoise_eta2

kyber768
kyber1024

Affects poly::poly_compress, poly::poly_decompress, params::KYBER_POLYCOMPRESSEDBYTES, params::KYBER_POLYVECCOMPRESSEDBYTES, poly::poly_getnoise_eta2

hazmat

Export IND-CPA primitives
**WARNING** use with caution

90s 90s-fixslice? = sha2

Additional features
90s mode uses AES256-CTR and SHA2 as primitives instead
Uses a bitslice implementation

Affects aes256ctr::aes256ctr_prf, cbd::poly_cbd_eta1_90s, symmetric::AES256CTR_BLOCKBYTES, symmetric::XOF_BLOCKBYTES, symmetric::XofState, symmetric::hash_h, symmetric::hash_g, symmetric::xof_absorb, symmetric::xof_squeezeblocks, symmetric::prf, symmetric::kdf

90s-fixslice = 90s, aes, ctr

Fixslice RustCrypto AES implementation offers some additional sidechannel attack resistance. Suggest benchmarking for comparison.

avx2 nasm? = cc

Use avx2 intrinsics on x86 architectures
Wont compile if the platform doesn't support it

wasm = getrandom, rand, wasm-bindgen

For compiling to wasm targets

nasm = avx2, nasm-rs

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/

std

Enable std library support

benchmarking = criterion

For benchmarking

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

wasm-bindgen wasm?
sha2 90s?
getrandom wasm?
zeroize implicit feature
aes 90s-fixslice?
ctr 90s-fixslice?
cc build avx2?
nasm-rs build nasm?

Enables nasm-rs ^0.2.4

rand wasm?
criterion benchmarking?

Enables criterion ^0.4.0

Optional dev-deps, see https://github.com/rust-lang/cargo/issues/1596