pub struct PrivateKeyBip32<C: CurveArithmetic>(/* private fields */);Available on crate feature
bip32 only.Expand description
A newtype wrapper for elliptic_curve::SecretKey implementing bip32 traits.
Trait Implementations§
Source§impl<C: CurveArithmetic> AsRef<SecretKey<C>> for PrivateKeyBip32<C>
impl<C: CurveArithmetic> AsRef<SecretKey<C>> for PrivateKeyBip32<C>
Source§impl<C: Clone + CurveArithmetic> Clone for PrivateKeyBip32<C>
impl<C: Clone + CurveArithmetic> Clone for PrivateKeyBip32<C>
Source§fn clone(&self) -> PrivateKeyBip32<C>
fn clone(&self) -> PrivateKeyBip32<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug + CurveArithmetic> Debug for PrivateKeyBip32<C>
impl<C: Debug + CurveArithmetic> Debug for PrivateKeyBip32<C>
Source§impl<C: CurveArithmetic> From<PrivateKeyBip32<C>> for SecretKey<C>
impl<C: CurveArithmetic> From<PrivateKeyBip32<C>> for SecretKey<C>
Source§fn from(source: PrivateKeyBip32<C>) -> Self
fn from(source: PrivateKeyBip32<C>) -> Self
Converts to this type from the input type.
Source§impl<C: CurveArithmetic> From<SecretKey<C>> for PrivateKeyBip32<C>
impl<C: CurveArithmetic> From<SecretKey<C>> for PrivateKeyBip32<C>
Source§impl<C: PartialEq + CurveArithmetic> PartialEq for PrivateKeyBip32<C>
impl<C: PartialEq + CurveArithmetic> PartialEq for PrivateKeyBip32<C>
Source§impl<C> PrivateKey for PrivateKeyBip32<C>where
C: Curve + CurveArithmetic,
C::AffinePoint: ToEncodedPoint<C> + FromEncodedPoint<C>,
C::FieldBytesSize: ModulusSize,
C::Scalar: ReduceNonZero<C::Uint>,
impl<C> PrivateKey for PrivateKeyBip32<C>where
C: Curve + CurveArithmetic,
C::AffinePoint: ToEncodedPoint<C> + FromEncodedPoint<C>,
C::FieldBytesSize: ModulusSize,
C::Scalar: ReduceNonZero<C::Uint>,
Source§type PublicKey = PublicKeyBip32<C>
type PublicKey = PublicKeyBip32<C>
Public key type which corresponds to this private key.
Source§fn from_bytes(bytes: &PrivateKeyBytes) -> Result<Self, Error>
fn from_bytes(bytes: &PrivateKeyBytes) -> Result<Self, Error>
Initialize this key from bytes.
Source§fn to_bytes(&self) -> PrivateKeyBytes
fn to_bytes(&self) -> PrivateKeyBytes
Serialize this key as bytes.
Source§fn derive_child(&self, other: PrivateKeyBytes) -> Result<Self, Error>
fn derive_child(&self, other: PrivateKeyBytes) -> Result<Self, Error>
Derive a child key from a parent key and the a provided tweak value,
i.e. where
other is referred to as “I sub L” in BIP32 and sourced
from the left half of the HMAC-SHA-512 output.Source§fn public_key(&self) -> Self::PublicKey
fn public_key(&self) -> Self::PublicKey
Get the
Self::PublicKey that corresponds to this private key.impl<C: Eq + CurveArithmetic> Eq for PrivateKeyBip32<C>
impl<C: CurveArithmetic> StructuralPartialEq for PrivateKeyBip32<C>
Auto Trait Implementations§
impl<C> Freeze for PrivateKeyBip32<C>
impl<C> RefUnwindSafe for PrivateKeyBip32<C>
impl<C> Send for PrivateKeyBip32<C>
impl<C> Sync for PrivateKeyBip32<C>
impl<C> Unpin for PrivateKeyBip32<C>
impl<C> UnwindSafe for PrivateKeyBip32<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more