Cargo Features

[dependencies]
aranya-crypto = { version = "0.2.1", default-features = false, features = ["alloc", "bearssl", "committing-aead", "clone-aead", "ed25519_batch", "fs-keystore", "getrandom", "hazmat", "proptest", "rand_compat", "std", "test_util", "trng"] }
default = getrandom

The getrandom feature is set by default whenever aranya-crypto is added without default-features = false somewhere in the dependency tree.

alloc ed25519_batch? fs-keystore? proptest? std? test_util?

Enable allocations.

Enables alloc of aes-gcm, aranya-buggy, der, ecdsa, postcard, optional rand, rand_core, optional rustix, and zeroize

rand_core:

rand_core is required by the rust backend.

bearssl

Enable BearSSL.

Enables aranya-bearssl-sys

committing-aead

Enable committing AEAD implementations.

Enables aes

clone-aead

Implement Clone for the built-in AEADs.

ed25519_batch = alloc

Enable Ed25519 batch signature verification.

NB: this is NOT supported on big-endian architectures.

This is its own feature because of a weird interaction between cargo, ed25519-dalek, and VxWorks.

ed25519-dalek's batch feature requires alloc, so normally we'd put "ed25519-dalek/batch" behind our alloc feature.

However, ed25519-dalek's batch feature does not build for vxworks/ppc because its merlin dependency does not support big-endian architectures.

Cargo does not support target-specific features, so we're unable to express "enable ed25519-dalek/batch only if alloc is enabled and the current architecture is little-endian."

Enables batch of ed25519-dalek

fs-keystore = alloc

Enable the file system backed KeyStore.

Enables ciborium, ciborium-io, and rustix

getrandom default std?

Enable getrandom support.

NB: getrandom does not support VxWorks < 7.

Enables getrandom, getrandom of rand_core

hazmat

Enable cryptographically hazardous code.

proptest test_util? = alloc

Enable proptest::arbitrary::Arbitrary implemenations

Enables proptest and proptest-derive

rand_compat

Enable compat with the rand, rand_core, etc. crates.

Enables rand

std = alloc, getrandom

Use std.

Enables use-std of postcard, std and std_rng of rand, std of optional proptest, std of rand_core, serde, sha2, siphasher, subtle, zeroize, optional rustix, optional serde_json, and optional spin, std of aes-gcm, aranya-base58, aranya-buggy, byteorder, crypto-common, der, ecdsa, ed25519-dalek, elliptic-curve, p256, p384, optional ciborium, optional ciborium-io, and optional getrandom

test_util = alloc, proptest

Include testing utilities.

Enables serde_json, serde_repr, and wycheproof

wycheproof:

Only pulled into non-dev builds if test_util is enabled. It won't bloat release builds, though, since users of this crate should only use this feature inside [dev-dependencies].

trng

Use a system provided TRNG for the default CSPRNG.

Enables aes, lazy_static, and spin