Skip to main content

ExpandedVerifyingKey

Struct ExpandedVerifyingKey 

Source
pub struct ExpandedVerifyingKey<P: MayoParameter> { /* private fields */ }
Expand description

A MAYO verifying key with cached expanded public material.

This keeps the compact public key bytes for serialization and equality, and additionally stores expanded public data used by verification.

Implementations§

Source§

impl<P: MayoParameter> ExpandedVerifyingKey<P>

Source

pub fn compact(&self) -> VerifyingKey<P>

Return the compact verifying key form.

Source

pub fn context(&self) -> VerificationContext<P>

Create a reusable verification context for this expanded key.

Trait Implementations§

Source§

impl<P: MayoParameter> AsRef<[u8]> for ExpandedVerifyingKey<P>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<P: Clone + MayoParameter> Clone for ExpandedVerifyingKey<P>

Source§

fn clone(&self) -> ExpandedVerifyingKey<P>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P: MayoParameter> Debug for ExpandedVerifyingKey<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, P: MayoParameter> Deserialize<'de> for ExpandedVerifyingKey<P>

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<P: MayoParameter> Eq for ExpandedVerifyingKey<P>

Source§

impl<P: MayoParameter> From<&ExpandedVerifyingKey<P>> for VerificationContext<P>

Source§

fn from(key: &ExpandedVerifyingKey<P>) -> Self

Converts to this type from the input type.
Source§

impl<P: MayoParameter> From<&SigningKey<P>> for ExpandedVerifyingKey<P>

Source§

fn from(sk: &SigningKey<P>) -> Self

Converts to this type from the input type.
Source§

impl<P: MayoParameter> From<&VerifyingKey<P>> for ExpandedVerifyingKey<P>

Source§

fn from(vk: &VerifyingKey<P>) -> Self

Converts to this type from the input type.
Source§

impl<P: MayoParameter> PartialEq for ExpandedVerifyingKey<P>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P: MayoParameter> Serialize for ExpandedVerifyingKey<P>

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<P: MayoParameter> TryFrom<&Vec<u8>> for ExpandedVerifyingKey<P>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: &Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<P: MayoParameter> TryFrom<&[u8]> for ExpandedVerifyingKey<P>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<P: MayoParameter> TryFrom<Box<[u8]>> for ExpandedVerifyingKey<P>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: Box<[u8]>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<P: MayoParameter> TryFrom<Vec<u8>> for ExpandedVerifyingKey<P>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<P: MayoParameter> Verifier<Signature<P>> for ExpandedVerifyingKey<P>

Source§

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

Use Self (e.g. a verifying key) to verify that the provided signature is authentic for a given message bytestring. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S, T> AsyncVerifier<S> for T
where T: Verifier<S>,

Source§

async fn verify_async(&self, msg: &[u8], signature: &S) -> Result<(), Error>

Asynchronously verify that the provided signature for a given message bytestring is authentic. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca)
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.