Skip to main content

CryptoScheme

Trait CryptoScheme 

Source
pub trait CryptoScheme:
    Synchronous<I = CryptoIn, O = CryptoOut>
    + Default
    + Clone {
    const SHARE_BEATS: usize;
    const SCHEME: u8;
}
Expand description

A signature scheme’s compile-time shape. The replica takes SB = C::SHARE_BEATS as a const generic (kernels cannot read associated constants), and its constructor asserts they agree.

Required Associated Constants§

Source

const SHARE_BEATS: usize

64-byte beats in one certify share (Ed25519 1, DSig 26). Shares sit at certify[(slot·N + node)·16·SHARE_BEATS]; the share stream (sig) carries this many beats and then the tag beat, and a verify request is header, message, then this many share beats.

Source

const SCHEME: u8

Scheme number reported in SHAPE (1 Ed25519, 2 DSig).

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§

Source§

impl<const NV: usize> CryptoScheme for Ed25519Crypto<NV>

Source§

impl<const SB: usize> CryptoScheme for External<SB>