Trait crypto::keys::ternary::PrivateKeyGenerator [−][src]
pub trait PrivateKeyGenerator { type PrivateKey: PrivateKey; type Error; fn generate_from_entropy(
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>; fn generate_from_seed(
&self,
seed: &Seed,
index: usize
) -> Result<Self::PrivateKey, Self::Error> { ... } }
ternary_keys
only.Generates a ternary private key.
Associated Types
type PrivateKey: PrivateKey
[src]
Generated private keys type.
type Error
[src]
Errors occuring while generating private keys.
Required methods
fn generate_from_entropy(
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
[src]
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
Deterministically generates and returns a private key from ternary entropy.
Arguments
entropy
Entropy to deterministically derive a private key from.
Provided methods
fn generate_from_seed(
&self,
seed: &Seed,
index: usize
) -> Result<Self::PrivateKey, Self::Error>
[src]
&self,
seed: &Seed,
index: usize
) -> Result<Self::PrivateKey, Self::Error>
Deterministically generates and returns a private key from a seed and an index.
Arguments
seed
A seed to deterministically derive a private key from.index
An index to deterministically derive a private key from.
Implementors
impl<S: Sponge + Default> PrivateKeyGenerator for WotsShakePrivateKeyGenerator<S>
[src]
impl<S: Sponge + Default> PrivateKeyGenerator for WotsShakePrivateKeyGenerator<S>
[src]wots_deprecated_do_not_use
only.type PrivateKey = WotsPrivateKey<S>
type Error = Error
fn generate_from_entropy(
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
[src]
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
Derives a private key from entropy using the SHAKE256 extendable-output function. The entropy must be a slice of exactly 243 trits where the last trit is zero. Derives its security assumptions from the properties of the underlying SHAKE function.
impl<S: Sponge + Default> PrivateKeyGenerator for WotsSpongePrivateKeyGenerator<S>
[src]
impl<S: Sponge + Default> PrivateKeyGenerator for WotsSpongePrivateKeyGenerator<S>
[src]wots_deprecated_do_not_use
only.type PrivateKey = WotsPrivateKey<S>
type Error = Error
fn generate_from_entropy(
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
[src]
&self,
entropy: &Trits<T1B1>
) -> Result<Self::PrivateKey, Self::Error>
Derives a private key from entropy using the provided ternary sponge construction. The entropy must be a slice of exactly 243 trits where the last trit is zero. Deprecated: only generates secure keys for sponge constructions, but Kerl is not a true sponge construction. Consider using shake instead or sponge with Curl. In case that Kerl must be used in sponge, it must be assured that no chunk of the private key is ever revealed, as this would allow the reconstruction of successive chunks (also known as “M-bug”). Provides compatibility to the currently used key derivation.