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 Input
s
Variants§
Hkdf
Fields
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
.
HKDF algorithm.
Tls12Prf
Fields
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
.
TLS-1.2 PRF algorithm.
Tls12PskToMs
Fields
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
.
TLS-1.2 PSK-to-MasterSecret algorithm.
Implementations§
source§impl Inputs<'_>
impl Inputs<'_>
sourcepub fn key_derivation(&self) -> KeyDerivation
pub fn key_derivation(&self) -> KeyDerivation
Retrieve key derivation algorithm without inputs