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

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>,
    },
}

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

impl Inputs<'_>[src]

pub fn key_derivation(&self) -> KeyDerivation[src]

Retrieve key derivation algorithm without inputs

Trait Implementations

impl<'a> Clone for Inputs<'a>[src]

impl<'a> Copy for Inputs<'a>[src]

impl<'a> Debug for Inputs<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Inputs<'a>[src]

impl<'a> Send for Inputs<'a>[src]

impl<'a> Sync for Inputs<'a>[src]

impl<'a> Unpin for Inputs<'a>[src]

impl<'a> UnwindSafe for Inputs<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.