Trait LmsMode

Source
pub trait LmsMode: Typecode + Clone {
    type Hasher: Digest;
    type OtsMode: LmsOtsMode;
    type TreeLen: ArrayLength<Output<Self::Hasher>>;
    type HLen: ArrayLength<Output<Self::Hasher>>;

    const M: usize;
    const H: usize;
    const LEAVES: u32;
    const TREE_NODES: u32;
}
Expand description

The basic trait that must be implemented for any valid LMS mode

Required Associated Constants§

Source

const M: usize

The length of the hash function output as a type

Source

const H: usize

h as a usize

Source

const LEAVES: u32

The number of leaves as a u32, computed as 2^h

Source

const TREE_NODES: u32

TreeLen as a u32, 2^(h+1)-1

Required Associated Types§

Source

type Hasher: Digest

The underlying hash function

Source

type OtsMode: LmsOtsMode

The underlying LM-OTS mode

Source

type TreeLen: ArrayLength<Output<Self::Hasher>>

Length of the internal Merkle tree, computed as 2^(h+1)-1

Source

type HLen: ArrayLength<Output<Self::Hasher>>

h as a type

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§