Cargo Features

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

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

alloc ed25519_batch? std? test_util?

Enable allocations.

Enables alloc of rand_core, sha3-utils ^0.3.0, and zeroize

rand_core:

rand_core is required by the rust backend.

and alloc of aes-gcm, aranya-buggy, der, ecdsa, postcard, and optional rand

postcard:

Required by aranya_crypto_derive::AlgId.

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

getrandom default std?

Enable getrandom support.

NB: getrandom does not support VxWorks < 7.

Enables getrandom, getrandom of rand_core

hazmat

Enable cryptographically hazardous code.

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 aes-gcm, aranya-buggy, crypto-common, der, ecdsa, ed25519-dalek, elliptic-curve, p256, p384, and optional getrandom and std of rand_core, serde, sha2, sha3-utils ^0.3.0, subtle, zeroize, optional serde_json, and optional spin

serde:

TODO(eric): Make this optional, it should only be needed by test_util.

test_util = alloc

Include testing utilities.

Enables more-asserts, 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