#[non_exhaustive]pub enum KdfAlgorithm {
HkdfSha256,
HkdfSha384,
HkdfSha512,
OneStepSha256,
OneStepSha384,
OneStepSha512,
}Expand description
A key-derivation function.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HkdfSha256
HKDF with SHA-256 (RFC 5869; SP 800-56C Rev. 2 §5).
HkdfSha384
HKDF with SHA-384 (RFC 5869; SP 800-56C Rev. 2 §5).
HkdfSha512
HKDF with SHA-512 (RFC 5869; SP 800-56C Rev. 2 §5).
OneStepSha256
The one-step KDF with SHA-256 as its auxiliary function (SP 800-56C Rev. 2 §4.1, option 1).
OneStepSha384
The one-step KDF with SHA-384 as its auxiliary function (SP 800-56C Rev. 2 §4.1, option 1).
OneStepSha512
The one-step KDF with SHA-512 as its auxiliary function (SP 800-56C Rev. 2 §4.1, option 1).
Implementations§
Source§impl KdfAlgorithm
impl KdfAlgorithm
Sourcepub const ALL: &'static [KdfAlgorithm]
pub const ALL: &'static [KdfAlgorithm]
Every key-derivation function.
Sourcepub const fn hash(self) -> HashAlgorithm
pub const fn hash(self) -> HashAlgorithm
The hash function the KDF is built on: HKDF’s HMAC, or the one-step KDF’s auxiliary function.
Sourcepub const fn max_output_len(self) -> usize
pub const fn max_output_len(self) -> usize
The longest output in bytes. HKDF: 255 times the hash length (RFC 5869 §2.3). The one-step
KDF: 2^30 bytes, the bound AWS-LC’s SSKDF enforces on both module lines
(SSKDF_MAX_INPUT_LEN, crypto/fipsmodule/kdf/sskdf.c), inside SP 800-56C Rev. 2 §4.1’s
(2^32 − 1) × HashLen bits.
Trait Implementations§
Source§impl Clone for KdfAlgorithm
impl Clone for KdfAlgorithm
Source§fn clone(&self) -> KdfAlgorithm
fn clone(&self) -> KdfAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more