Enum psa_crypto::types::key_derivation::Inputs[][src]

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

HKDF algorithm.

Fields of Hkdf

hash_alg: Hash

A 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.

Tls12Prf

TLS-1.2 PRF algorithm.

Fields of Tls12Prf

hash_alg: Hash

A 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.

Tls12PskToMs

TLS-1.2 PSK-to-MasterSecret algorithm.

Fields of Tls12PskToMs

hash_alg: Hash

A 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.

Implementations

Retrieve key derivation algorithm without inputs

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.