Struct schnorrkel::derive::ExtendedKey [−][src]
A convenience wraper that combines derivable key and a chain code.
Fields
key: K
Appropriate key type
chaincode: ChainCode
We cannot assume the original public key is secret and additional
inputs might have low entropy, like i
in BIP32. As in BIP32,
chain codes fill this gap by being a high entropy secret shared
between public and private key holders. These are produced by
key derivations and can be incorporated into subsequence key
derivations.
Implementations
impl<K: Derivation> ExtendedKey<K>
[src]
pub fn derived_key<T>(&self, t: T) -> ExtendedKey<K> where
T: SigningTranscript,
[src]
T: SigningTranscript,
Derive key with subkey identified by a byte array presented as a hash, and a chain code.
pub fn derived_key_simple<B: AsRef<[u8]>>(&self, i: B) -> ExtendedKey<K>
[src]
Derive key with subkey identified by a byte array and a chain code in the extended key.
impl ExtendedKey<SecretKey>
[src]
pub fn hard_derive_mini_secret_key<B: AsRef<[u8]>>(
&self,
i: B,
mode: ExpansionMode
) -> ExtendedKey<SecretKey>
[src]
&self,
i: B,
mode: ExpansionMode
) -> ExtendedKey<SecretKey>
Vaguely BIP32-like “hard” derivation of a MiniSecretKey
from a SecretKey
We do not envision any “good reasons” why these “hard”
derivations should ever be used after the soft Derivation
trait. We similarly do not believe hard derivations
make any sense for ChainCode
s or ExtendedKey
s types.
Yet, some existing BIP32 workflows might do these things,
due to BIP32’s de facto stnadardization and poor design.
In consequence, we provide this method to do “hard” derivations
in a way that should work with all BIP32 workflows and any
permissible mutations of SecretKey
. This means only that
we hash the SecretKey
’s scalar, but not its nonce becuase
the secret key remains valid if the nonce is changed.
Trait Implementations
impl<K: Clone> Clone for ExtendedKey<K>
[src]
fn clone(&self) -> ExtendedKey<K>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<K: Copy> Copy for ExtendedKey<K>
[src]
impl<K: Debug> Debug for ExtendedKey<K>
[src]
impl<K: Eq> Eq for ExtendedKey<K>
[src]
impl<K: Hash> Hash for ExtendedKey<K>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<K: PartialEq> PartialEq<ExtendedKey<K>> for ExtendedKey<K>
[src]
fn eq(&self, other: &ExtendedKey<K>) -> bool
[src]
fn ne(&self, other: &ExtendedKey<K>) -> bool
[src]
impl<K> StructuralEq for ExtendedKey<K>
[src]
impl<K> StructuralPartialEq for ExtendedKey<K>
[src]
Auto Trait Implementations
impl<K> RefUnwindSafe for ExtendedKey<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
impl<K> Send for ExtendedKey<K> where
K: Send,
K: Send,
impl<K> Sync for ExtendedKey<K> where
K: Sync,
K: Sync,
impl<K> Unpin for ExtendedKey<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for ExtendedKey<K> where
K: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,