Trait LmsOtsMode

Source
pub trait LmsOtsMode: Typecode {
    type Hasher: Digest;
    type NLen: ArrayLength<u8>;
    type PLen: ArrayLength<Output<Self::Hasher>> + ArrayLength<u8>;

    const N: usize;
    const W: usize;
    const U: usize;
    const V: usize;
    const P: usize;
    const LS: usize;
    const SIG_LEN: usize;

    // Provided method
    fn expand(message: &Output<Self::Hasher>) -> GenericArray<u8, Self::PLen> { ... }
}
Expand description

The basic trait that must be implemented by any OTS mode.

Required Associated Constants§

Source

const N: usize

The length of the hash function output as a usize

Source

const W: usize

The Winternitz window, which should be a value that divides 8

Source

const U: usize

The number of W bit fields required to contain the hash of the message

Source

const V: usize

The number of W bit fields required to contain the checksum

Source

const P: usize

Computed as U + V

Source

const LS: usize

The left shift required to get the checksum bits

Source

const SIG_LEN: usize

The total length of the signature

Required Associated Types§

Source

type Hasher: Digest

The underlying hash function

Source

type NLen: ArrayLength<u8>

The length of the hash function output as a type

Source

type PLen: ArrayLength<Output<Self::Hasher>> + ArrayLength<u8>

The value of P as a type

Provided Methods§

Source

fn expand(message: &Output<Self::Hasher>) -> GenericArray<u8, Self::PLen>

Expands a message into its Winternitz coefficients and checksum

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§