Struct redjubjub::VerificationKey [−][src]
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:
- The check that the bytes are a canonical encoding of a verification key;
- 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]
fn clone(&self) -> VerificationKey<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: SigType,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a, T: SigType> From<&'a SigningKey<T>> for VerificationKey<T>
[src]
fn from(sk: &'a SigningKey<T>) -> VerificationKey<T>
[src]
impl<T: SigType> From<VerificationKey<T>> for VerificationKeyBytes<T>
[src]
fn from(pk: VerificationKey<T>) -> VerificationKeyBytes<T>
[src]
impl<T: SigType> Serialize for VerificationKey<T> where
T: SigType,
[src]
T: SigType,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: SigType> TryFrom<[u8; 32]> for VerificationKey<T>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(bytes: [u8; 32]) -> Result<Self, Self::Error>
[src]
impl<T: SigType> TryFrom<VerificationKeyBytes<T>> for VerificationKey<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for VerificationKey<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for VerificationKey<T> where
T: Send,
T: Send,
impl<T> Sync for VerificationKey<T> where
T: Sync,
T: Sync,
impl<T> Unpin for VerificationKey<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for VerificationKey<T> where
T: UnwindSafe,
T: 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,