Derivation

Trait Derivation 

Source
pub trait Derivation: Sized {
    // Required method
    fn derived_key<T>(&self, t: T, cc: ChainCode) -> (Self, ChainCode)
       where T: SigningTranscript;

    // Provided methods
    fn derived_key_simple<B: AsRef<[u8]>>(
        &self,
        cc: ChainCode,
        i: B,
    ) -> (Self, ChainCode) { ... }
    fn derived_key_simple_rng<B, R>(
        &self,
        cc: ChainCode,
        i: B,
        rng: R,
    ) -> (Self, ChainCode)
       where B: AsRef<[u8]>,
             R: RngCore + CryptoRng { ... }
}
Expand description

Key types that support “hierarchical deterministic” key derivation

Required Methods§

Source

fn derived_key<T>(&self, t: T, cc: ChainCode) -> (Self, ChainCode)

Derive key with subkey identified by a byte array presented via a SigningTranscript, and a chain code.

Provided Methods§

Source

fn derived_key_simple<B: AsRef<[u8]>>( &self, cc: ChainCode, i: B, ) -> (Self, ChainCode)

Derive key with subkey identified by a byte array and a chain code. We do not include a context here because the chain code could serve this purpose.

Source

fn derived_key_simple_rng<B, R>( &self, cc: ChainCode, i: B, rng: R, ) -> (Self, ChainCode)
where B: AsRef<[u8]>, R: RngCore + CryptoRng,

Derive key with subkey identified by a byte array and a chain code, and with external randomnesses.

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§