[][src]Struct redjubjub::PublicKey

pub struct PublicKey<T: SigType> { /* fields omitted */ }

A valid RedJubJub public key.

This type holds decompressed state used in signature verification; if the public key may not be used immediately, it is probably better to use PublicKeyBytes, which is a refinement type for [u8; 32].

Consensus properties

The TryFrom<PublicKeyBytes> conversion performs the following Zcash consensus rule checks:

  1. The check that the bytes are a canonical encoding of a public key;
  2. The check that the public key is not a point of small order.

Methods

impl PublicKey<SpendAuth>[src]

pub fn randomize(&self, randomizer: &Randomizer) -> PublicKey<SpendAuth>[src]

Randomize this public key with the given randomizer.

Randomization is only supported for SpendAuth keys.

impl<T: SigType> PublicKey<T>[src]

pub fn verify(&self, msg: &[u8], signature: &Signature<T>) -> Result<(), Error>[src]

Verify a purported signature over msg made by this public key.

Trait Implementations

impl<T: Clone + SigType> Clone for PublicKey<T>[src]

impl<T: Copy + SigType> Copy for PublicKey<T>[src]

impl<T: Debug + SigType> Debug for PublicKey<T>[src]

impl<'de, T: SigType> Deserialize<'de> for PublicKey<T> where
    T: SigType
[src]

impl<'a, T: SigType> From<&'a SecretKey<T>> for PublicKey<T>[src]

impl<T: SigType> From<PublicKey<T>> for PublicKeyBytes<T>[src]

impl<T: SigType> From<PublicKey<T>> for [u8; 32][src]

impl<T: SigType> Serialize for PublicKey<T> where
    T: SigType
[src]

impl<T: SigType> TryFrom<[u8; 32]> for PublicKey<T>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<T: SigType> TryFrom<PublicKeyBytes<T>> for PublicKey<T>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<T> RefUnwindSafe for PublicKey<T> where
    T: RefUnwindSafe

impl<T> Send for PublicKey<T> where
    T: Send

impl<T> Sync for PublicKey<T> where
    T: Sync

impl<T> Unpin for PublicKey<T> where
    T: Unpin

impl<T> UnwindSafe for PublicKey<T> where
    T: UnwindSafe

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

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.