Struct redjubjub::VerificationKey[][src]

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

A valid RedJubJub verification key.

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

Consensus properties

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

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

Implementations

impl VerificationKey<SpendAuth>[src]

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

Randomize this verification key with the given randomizer.

Randomization is only supported for SpendAuth keys.

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

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

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

Trait Implementations

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

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

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

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

impl<'a, T: SigType> From<&'a SigningKey<T>> for VerificationKey<T>[src]

impl<T: SigType> From<VerificationKey<T>> for VerificationKeyBytes<T>[src]

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

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

type Error = Error

The type returned in the event of a conversion error.

impl<T: SigType> TryFrom<VerificationKeyBytes<T>> for VerificationKey<T>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for VerificationKey<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: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.