Cargo Features
[dependencies]
askar-crypto = { version = "0.3.1", default-features = false, features = ["std", "alloc", "all_keys", "any_key", "aes", "bls", "chacha", "crypto_box", "ec_curves", "ed25519", "getrandom", "std_rng", "argon2", "arbitrary"] }
- default = all_keys, alloc, any_key, crypto_box
-
These default features are set whenever
askar-crypto
is added without
somewhere in the dependency tree.default-features = false - std = alloc, std_rng
-
Enables std of serde and serde-json-core ^0.5
serde:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library. - alloc default any_key crypto_box std?
-
Affects
jwk::ToJwk.to_jwk_thumbprint
,jwk::ToJwk.to_jwk_public
,jwk::ToJwk.to_jwk_secret
,kdf::KeyExchange.key_exchange_bytes
,repr::ToSecretBytes.to_secret_bytes
,repr::ToPublicBytes.to_public_bytes
,repr::KeypairBytes.to_keypair_bytes
,sign::KeySign.create_signature
,random::random_secret
… - all_keys default = aes, bls, chacha, ec_curves, ed25519
- any_key default = alloc
- aes all_keys = aes-core, aes-gcm, block-modes, cbc, cipher, hmac
-
Affects
alg::aes
… - bls all_keys = bls12_381, hkdf
-
Affects
alg::bls
… - chacha all_keys = chacha20poly1305
-
Affects
alg::chacha20
… - crypto_box default = alloc, crypto_box_rs, ed25519, getrandom
-
Affects
encrypt::crypto_box
… - ec_curves all_keys = elliptic-curve, k256, p256, p384
- ed25519 all_keys crypto_box = curve25519-dalek, ed25519-dalek, x25519-dalek
-
Affects
alg::ed25519
,alg::x25519
… - getrandom crypto_box std_rng?
-
rand:
Option: use getrandom package for seeding
Affects
any::AnyKeyCreate.random
,encrypt::KeyAeadMeta.random_nonce
,random::default_rng
,random::fill_random
,repr::KeyGen.random
,random::random_secret
… - std_rng std? = getrandom
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.
- aes-core aes?
-
Enables aes
- aes-gcm aes?
- argon2 implicit feature
-
Affects
kdf::argon2
… - block-modes aes?
- bls12_381 bls?
- cbc aes?
- chacha20poly1305 chacha?
- cipher aes?
- crypto_box_rs crypto_box
-
Enables crypto_box
- curve25519-dalek ed25519?
- ed25519-dalek ed25519?
- elliptic-curve ec_curves?
- hkdf bls?
- hmac aes?
- k256 ec_curves?
-
Affects
alg::k256
… - p256 ec_curves?
-
Affects
alg::p256
… - p384 ec_curves?
-
Affects
alg::p384
… - x25519-dalek ed25519?
- arbitrary implicit feature
-
Enables arbitrary
arbitrary:
The trait for generating structured data from unstructured data