Enum psa_crypto::types::key_derivation::Inputs
source · [−]pub enum Inputs<'a> {
Hkdf {
hash_alg: Hash,
salt: Option<Input<'a>>,
secret: InputSecret<'a>,
info: Input<'a>,
},
Tls12Prf {
hash_alg: Hash,
seed: Input<'a>,
secret: InputSecret<'a>,
label: Input<'a>,
},
Tls12PskToMs {
hash_alg: Hash,
seed: Input<'a>,
secret: InputSecret<'a>,
label: Input<'a>,
},
}Expand description
Wrapper around KeyDerivation to enforce correct Inputs
Variants
Hkdf
Fields
hash_alg: HashA hash algorithm to use
salt: Option<Input<'a>>Salt, used in the “extract” step. It is optional; if omitted, the derivation uses an empty salt.
Typically a direct input, can also be a key of type RawData.
secret: InputSecret<'a>Secret, used in the “extract” step. This is typically a key of type Derive , or the shared secret
resulting from a key agreement, using Input::KeyAgreement.
Must be a key or key agreement input if used with psa_key_derivation_output_key.
info: Input<'a>Info, used in the “expand” step. Typically a direct input, can also be a key of type RawData.
HKDF algorithm.
Tls12Prf
Fields
hash_alg: HashA hash algorithm to use.
seed: Input<'a>Seed, typically a direct input, can also be a key of type RawData.
secret: InputSecret<'a>Secret, used in the “extract” step. This is typically a key of type Derive , or the shared secret
resulting from a key agreement, using Input::KeyAgreement.
Must be a key or key agreement input if used with psa_key_derivation_output_key.
label: Input<'a>Label. Typically a direct input, can also be a key of type RawData.
TLS-1.2 PRF algorithm.
Tls12PskToMs
Fields
hash_alg: HashA hash algorithm to use.
seed: Input<'a>Seed, typically a direct input, can also be a key of type RawData.
secret: InputSecret<'a>Secret, used in the “extract” step. This is typically a key of type Derive , or the shared secret
resulting from a key agreement, using Input::KeyAgreement.
Must be a key or key agreement input if used with psa_key_derivation_output_key.
Must not be larger than PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE.
label: Input<'a>Label. Typically a direct input, can also be a key of type RawData.
TLS-1.2 PSK-to-MasterSecret algorithm.
Implementations
sourceimpl Inputs<'_>
impl Inputs<'_>
sourcepub fn key_derivation(&self) -> KeyDerivation
pub fn key_derivation(&self) -> KeyDerivation
Retrieve key derivation algorithm without inputs
Trait Implementations
sourceimpl From<Inputs<'_>> for psa_algorithm_t
impl From<Inputs<'_>> for psa_algorithm_t
impl<'a> Copy for Inputs<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Inputs<'a>
impl<'a> Send for Inputs<'a>
impl<'a> Sync for Inputs<'a>
impl<'a> Unpin for Inputs<'a>
impl<'a> UnwindSafe for Inputs<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more