Struct dusk_pki::SecretSpendKey[][src]

pub struct SecretSpendKey { /* fields omitted */ }

Secret pair of a and b defining a SecretSpendKey

Implementations

impl SecretSpendKey[src]

pub fn new(a: JubJubScalar, b: JubJubScalar) -> Self[src]

This method is used to construct a new SecretSpendKey from the given secret pair of a and b.

pub fn a(&self) -> &JubJubScalar[src]

Gets a

pub fn b(&self) -> &JubJubScalar[src]

Gets b

pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self[src]

Deterministically create a new SecretSpendKey from a random number generator

pub fn sk_r(&self, sa: &StealthAddress) -> SecretKey[src]

Generates a SecretKey using the StealthAddress given. With the formula: sk_r = H(a · R) + b

pub fn public_spend_key(&self) -> PublicSpendKey[src]

Derive the secret to deterministically construct a PublicSpendKey

pub fn view_key(&self) -> ViewKey[src]

Derive the secret to deterministically construct a ViewKey

Trait Implementations

impl Clone for SecretSpendKey[src]

impl ConstantTimeEq for SecretSpendKey[src]

impl Copy for SecretSpendKey[src]

impl Debug for SecretSpendKey[src]

impl Eq for SecretSpendKey[src]

impl From<&'_ SecretSpendKey> for PublicSpendKey[src]

impl From<&'_ SecretSpendKey> for ViewKey[src]

impl From<SecretSpendKey> for PublicSpendKey[src]

impl From<SecretSpendKey> for ViewKey[src]

impl LowerHex for SecretSpendKey[src]

impl PartialEq<SecretSpendKey> for SecretSpendKey[src]

impl Serializable<64_usize> for SecretSpendKey[src]

type Error = Error

The type returned in the event of a conversion error.

impl StructuralEq for SecretSpendKey[src]

impl UpperHex for SecretSpendKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, const N: usize> DeserializableSlice<N> for T where
    T: Serializable<N>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, const N: usize> ParseHexStr<N> for T where
    T: Serializable<N>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.