Cargo Features

pqc_sphincsplus has no features set by default.

[dependencies]
pqc_sphincsplus = { version = "0.2.0", features = ["haraka", "sha2", "shake", "f128", "f256", "s128", "s256", "simple", "robust", "KAT"] }

Must enable only one from each of the groups below otherwise library will throw a compilation error

haraka

Hash

Affects context::SpxCtx.tweaked512_rc64, context::SpxCtx.tweaked256_rc32, params::SPX_ADDR_BYTES

sha2 = sha256

Affects context::SpxCtx.state_seeded, context::SpxCtx.state_seeded_512, sha2_robust::thash_512, sha2_simple::thash_512

shake = sha3

Affects params::SPX_ADDR_BYTES

f128

Security level
Considered equivalent to 128, 192 and 256 bit
NIST levels 1, 3 & 5 respectively
Additionally there is a fast signature mode (f)
and a small signature mode (s)
See the readme and benchmarks for comparison.

Affects sha2::SPX_SHA256_BLOCK_BYTES, sha2::SPX_SHAX_OUTPUT_BYTES, sha2::SPX_SHAX_BLOCK_BYTES

f192 f256
s128

Affects sha2::SPX_SHA256_BLOCK_BYTES, sha2::SPX_SHAX_OUTPUT_BYTES, sha2::SPX_SHAX_BLOCK_BYTES

s192 s256
simple

Tree Hash
SPHINCS+ splits the signatures schemes into a simple and a robust variant for each choice of hash function. The robust variant is comes with all the conservative security guarantees given in SPHNICS.
The simple variants are pure random oracle instantiations. These instantiations achieve about a factor three speed-up compared to the robust counterparts. This comes at the cost of a purely heuristic security argument.

robust

Affects haraka::add_round_key32, haraka::shift_rows32, haraka::mix_columns32, haraka::haraka256, sha2::mgf1_256, sha2::mgf1_512

KAT

Exposes inner api methods
Do not use except for running test vectors

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.

sha3 shake?
sha256 sha2?

Enables sha2