Cargo Features

cosmian_kyber has no features set by default.

[dependencies]
cosmian_kyber = { version = "0.1.0", features = ["kyber512", "kyber768", "kyber1024", "hazmat", "90s", "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, poly::poly_getnoise_eta2

hazmat

Export IND-CPA primitives WARNING use with caution

90s = sha2

Additional features
90s mode uses AES-CTR and SHA2 as primitives instead

Affects cbd::poly_cbd_eta1_90s

avx2 nasm? = cc

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

wasm = getrandom, rand, wasm-bindgen

For compiling to wasm targets

Affects cosmian_kyber::wasm

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
cc build avx2?
nasm-rs build nasm?

Enables nasm-rs ^0.2.4

rand wasm?
criterion benchmarking?

Enables criterion ^0.4.0