pub struct HkdfSha512;Expand description
HKDF-SHA512 (KDF id 0x0003).
Trait Implementations§
Source§impl Clone for HkdfSha512
impl Clone for HkdfSha512
impl Copy for HkdfSha512
Source§impl Debug for HkdfSha512
impl Debug for HkdfSha512
impl Eq for HkdfSha512
Source§impl Kdf for HkdfSha512
impl Kdf for HkdfSha512
Source§const HPKE_KDF_ID: u16 = 0x0003
const HPKE_KDF_ID: u16 = 0x0003
The HPKE KDF identifier (
draft-ietf-hpke-hpke-05 Section 7.2, IANA “HPKE KDF
Identifiers”), used to build the ciphersuite suite_id.Source§const OUTPUT_SIZE: usize = <Self::Hash as crypto::Hasher>::OUTPUT_SIZE
const OUTPUT_SIZE: usize = <Self::Hash as crypto::Hasher>::OUTPUT_SIZE
Output size of the extract step (the hash output size). Read more
Source§const SINGLE_STAGE: bool = false
const SINGLE_STAGE: bool = false
Whether this is a single-stage KDF (
draft-ietf-hpke-hpke-05 Section 4). Read moreSource§fn labeled_extract(
salt: &[u8],
suite_id: &[u8],
label: &[u8],
input_keying_material: &[u8],
) -> Hash
fn labeled_extract( salt: &[u8], suite_id: &[u8], label: &[u8], input_keying_material: &[u8], ) -> Hash
draft-ietf-hpke-hpke-05 Section 4.4
LabeledExtract(salt, label, input_keying_material):
Extract(salt, "HPKE-v1" || suite_id || label || input_keying_material). Read moreSource§fn labeled_expand(
out: &mut [u8],
pseudorandom_key: &[u8],
suite_id: &[u8],
label: &[u8],
info: &[u8],
) -> Result<(), HpkeError>
fn labeled_expand( out: &mut [u8], pseudorandom_key: &[u8], suite_id: &[u8], label: &[u8], info: &[u8], ) -> Result<(), HpkeError>
draft-ietf-hpke-hpke-05 Section 4.4
LabeledExpand(pseudorandom_key, label, info, L):
Expand(pseudorandom_key, I2OSP(L, 2) || "HPKE-v1" || suite_id || label || info, L),
where L == out.len(). The info string is absorbed incrementally, so
it may be arbitrarily long. Read moreSource§fn labeled_derive(
_out: &mut [u8],
_input_keying_material: &[&[u8]],
_suite_id: &[u8],
_label: &[u8],
_context: &[&[u8]],
) -> Result<(), HpkeError>
fn labeled_derive( _out: &mut [u8], _input_keying_material: &[&[u8]], _suite_id: &[u8], _label: &[u8], _context: &[&[u8]], ) -> Result<(), HpkeError>
draft-ietf-hpke-hpke-05 Section 4.4
LabeledDerive(input_keying_material, label, context, L):
Derive(input_keying_material || "HPKE-v1" || suite_id || I2OSP(len(label), 2) || label || I2OSP(L, 2) || context, L), where
L == out.len() and the elements of input_keying_material and
context are absorbed in order. Read moreSource§impl PartialEq for HkdfSha512
impl PartialEq for HkdfSha512
impl StructuralPartialEq for HkdfSha512
Auto Trait Implementations§
impl Freeze for HkdfSha512
impl RefUnwindSafe for HkdfSha512
impl Send for HkdfSha512
impl Sync for HkdfSha512
impl Unpin for HkdfSha512
impl UnsafeUnpin for HkdfSha512
impl UnwindSafe for HkdfSha512
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more