[−][src]Struct snarkos_objects::account::account_private_key::AccountPrivateKey
Fields
seed: [u8; 32]
sk_sig: <C::AccountSignature as SignatureScheme>::PrivateKey
sk_prf: <C::PRF as PRF>::Seed
r_pk: <C::AccountCommitment as CommitmentScheme>::Randomness
r_pk_counter: u16
is_dummy: bool
Implementations
impl<C: DPCComponents> AccountPrivateKey<C>
[src]
pub fn new<R: Rng>(
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment,
rng: &mut R
) -> Result<Self, AccountError>
[src]
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment,
rng: &mut R
) -> Result<Self, AccountError>
Creates a new account private key.
pub fn from_seed(
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment,
seed: &[u8; 32]
) -> Result<Self, AccountError>
[src]
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment,
seed: &[u8; 32]
) -> Result<Self, AccountError>
Derives the account private key from a given seed and verifies it is well-formed.
pub fn from_seed_and_counter_unchecked(
seed: &[u8; 32],
r_pk_counter: u16
) -> Result<Self, AccountError>
[src]
seed: &[u8; 32],
r_pk_counter: u16
) -> Result<Self, AccountError>
Derives the account private key from a given seed and counter without verifying if it is well-formed.
pub fn is_valid(
&self,
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment
) -> bool
[src]
&self,
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment
) -> bool
Returns true
if the private key is well-formed. Otherwise, returns false
.
pub fn to_decryption_key(
&self,
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment
) -> Result<<C::AccountEncryption as EncryptionScheme>::PrivateKey, AccountError>
[src]
&self,
signature_parameters: &C::AccountSignature,
commitment_parameters: &C::AccountCommitment
) -> Result<<C::AccountEncryption as EncryptionScheme>::PrivateKey, AccountError>
Returns the decryption key for the account view key.
pub fn pk_sig(
&self,
signature_parameters: &C::AccountSignature
) -> Result<<C::AccountSignature as SignatureScheme>::PublicKey, AccountError>
[src]
&self,
signature_parameters: &C::AccountSignature
) -> Result<<C::AccountSignature as SignatureScheme>::PublicKey, AccountError>
Returns the signature public key for deriving the account view key.
Trait Implementations
impl<C: DPCComponents> Clone for AccountPrivateKey<C> where
C: DPCComponents,
[src]
C: DPCComponents,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: DPCComponents> Debug for AccountPrivateKey<C>
[src]
impl<C: DPCComponents> Default for AccountPrivateKey<C> where
C: DPCComponents,
[src]
C: DPCComponents,
impl<C: DPCComponents> Display for AccountPrivateKey<C>
[src]
impl<C: DPCComponents> Eq for AccountPrivateKey<C> where
C: DPCComponents,
[src]
C: DPCComponents,
impl<C: DPCComponents> FromStr for AccountPrivateKey<C>
[src]
type Err = AccountError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
Reads in an account private key string.
impl<C: DPCComponents> PartialEq<AccountPrivateKey<C>> for AccountPrivateKey<C> where
C: DPCComponents,
[src]
C: DPCComponents,
Auto Trait Implementations
impl<C> RefUnwindSafe for AccountPrivateKey<C> where
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: RefUnwindSafe,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: RefUnwindSafe,
<<C as DPCComponents>::PRF as PRF>::Seed: RefUnwindSafe,
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: RefUnwindSafe,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: RefUnwindSafe,
<<C as DPCComponents>::PRF as PRF>::Seed: RefUnwindSafe,
impl<C> Send for AccountPrivateKey<C> where
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Send,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Send,
<<C as DPCComponents>::PRF as PRF>::Seed: Send,
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Send,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Send,
<<C as DPCComponents>::PRF as PRF>::Seed: Send,
impl<C> Sync for AccountPrivateKey<C> where
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Sync,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Sync,
<<C as DPCComponents>::PRF as PRF>::Seed: Sync,
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Sync,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Sync,
<<C as DPCComponents>::PRF as PRF>::Seed: Sync,
impl<C> Unpin for AccountPrivateKey<C> where
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Unpin,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Unpin,
<<C as DPCComponents>::PRF as PRF>::Seed: Unpin,
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: Unpin,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: Unpin,
<<C as DPCComponents>::PRF as PRF>::Seed: Unpin,
impl<C> UnwindSafe for AccountPrivateKey<C> where
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: UnwindSafe,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: UnwindSafe,
<<C as DPCComponents>::PRF as PRF>::Seed: UnwindSafe,
<<C as DPCComponents>::AccountSignature as SignatureScheme>::PrivateKey: UnwindSafe,
<<C as DPCComponents>::AccountCommitment as CommitmentScheme>::Randomness: UnwindSafe,
<<C as DPCComponents>::PRF as PRF>::Seed: 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,
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
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,