pub struct VerifyingKey { /* private fields */ }
Expand description
Taproot Schnorr verifying key.
Implementations§
source§impl VerifyingKey
impl VerifyingKey
sourcepub fn as_affine(&self) -> &AffinePoint
pub fn as_affine(&self) -> &AffinePoint
Borrow the inner AffinePoint
this type wraps.
sourcepub fn to_bytes(&self) -> FieldBytes
pub fn to_bytes(&self) -> FieldBytes
Serialize as bytes.
sourcepub fn verify_raw(
&self,
message: &[u8],
signature: &Signature,
) -> Result<(), Error>
pub fn verify_raw( &self, message: &[u8], signature: &Signature, ) -> Result<(), Error>
Compute Schnorr signature.
§⚠️ Warning
This is a low-level interface intended only for unusual use cases involving verifying pre-hashed messages, or “raw” messages where the message is not hashed at all prior to being used to generate the Schnorr signature.
The preferred interfaces are the DigestVerifier
or PrehashVerifier
traits.
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Parse verifying key from big endian-encoded x-coordinate.
Trait Implementations§
source§impl AsRef<VerifyingKey> for SigningKey
impl AsRef<VerifyingKey> for SigningKey
source§fn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VerifyingKey
impl Debug for VerifyingKey
source§impl<D> DigestVerifier<D, Signature> for VerifyingKey
impl<D> DigestVerifier<D, Signature> for VerifyingKey
source§impl From<&VerifyingKey> for AffinePoint
impl From<&VerifyingKey> for AffinePoint
source§fn from(vk: &VerifyingKey) -> AffinePoint
fn from(vk: &VerifyingKey) -> AffinePoint
Converts to this type from the input type.
source§impl From<&VerifyingKey> for PublicKey
impl From<&VerifyingKey> for PublicKey
source§fn from(vk: &VerifyingKey) -> PublicKey
fn from(vk: &VerifyingKey) -> PublicKey
Converts to this type from the input type.
source§impl From<VerifyingKey> for AffinePoint
impl From<VerifyingKey> for AffinePoint
source§fn from(vk: VerifyingKey) -> AffinePoint
fn from(vk: VerifyingKey) -> AffinePoint
Converts to this type from the input type.
source§impl From<VerifyingKey> for PublicKey
impl From<VerifyingKey> for PublicKey
source§fn from(vk: VerifyingKey) -> PublicKey
fn from(vk: VerifyingKey) -> PublicKey
Converts to this type from the input type.
source§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
source§impl PrehashVerifier<Signature> for VerifyingKey
impl PrehashVerifier<Signature> for VerifyingKey
source§impl Verifier<Signature> for VerifyingKey
impl Verifier<Signature> for VerifyingKey
impl Copy for VerifyingKey
impl Eq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)