Struct k256::schnorr::VerifyingKey
source · [−]pub struct VerifyingKey { /* private fields */ }
Available on crate feature
schnorr
only.Expand description
Taproot Schnorr verifying key.
Implementations
sourceimpl VerifyingKey
impl VerifyingKey
sourcepub fn verify_prehashed(
&self,
msg_digest: &[u8; 32],
sig: &Signature
) -> Result<()>
pub fn verify_prehashed(
&self,
msg_digest: &[u8; 32],
sig: &Signature
) -> Result<()>
Verify Schnorr signature.
⚠️ Warning
This is a low-level interface intended only for unusual use cases involving verifying pre-hashed messages.
The preferred interface is the [Verifier
] trait.
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 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
sourceimpl Clone for VerifyingKey
impl Clone for VerifyingKey
sourcefn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for VerifyingKey
impl Debug for VerifyingKey
sourceimpl<D> DigestVerifier<D, Signature> for VerifyingKeywhere
D: Digest + FixedOutput<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature> for VerifyingKeywhere
D: Digest + FixedOutput<OutputSize = U32>,
sourcefn verify_digest(&self, digest: D, signature: &Signature) -> Result<()>
fn verify_digest(&self, digest: D, signature: &Signature) -> Result<()>
Verify the signature against the given [
Digest
] output.sourceimpl From<&VerifyingKey> for AffinePoint
impl From<&VerifyingKey> for AffinePoint
sourcefn from(vk: &VerifyingKey) -> AffinePoint
fn from(vk: &VerifyingKey) -> AffinePoint
Converts to this type from the input type.
sourceimpl From<&VerifyingKey> for PublicKey
impl From<&VerifyingKey> for PublicKey
sourcefn from(vk: &VerifyingKey) -> PublicKey
fn from(vk: &VerifyingKey) -> PublicKey
Converts to this type from the input type.
sourceimpl From<VerifyingKey> for AffinePoint
impl From<VerifyingKey> for AffinePoint
sourcefn from(vk: VerifyingKey) -> AffinePoint
fn from(vk: VerifyingKey) -> AffinePoint
Converts to this type from the input type.
sourceimpl From<VerifyingKey> for PublicKey
impl From<VerifyingKey> for PublicKey
sourcefn from(vk: VerifyingKey) -> PublicKey
fn from(vk: VerifyingKey) -> PublicKey
Converts to this type from the input type.
sourceimpl PartialEq<VerifyingKey> for VerifyingKey
impl PartialEq<VerifyingKey> for VerifyingKey
sourcefn eq(&self, other: &VerifyingKey) -> bool
fn eq(&self, other: &VerifyingKey) -> bool
sourceimpl TryFrom<&PublicKey<Secp256k1>> for VerifyingKey
impl TryFrom<&PublicKey<Secp256k1>> for VerifyingKey
sourceimpl TryFrom<PublicKey<Secp256k1>> for VerifyingKey
impl TryFrom<PublicKey<Secp256k1>> for VerifyingKey
sourceimpl Verifier<Signature> for VerifyingKey
impl Verifier<Signature> for VerifyingKey
impl Copy for VerifyingKey
impl Eq for VerifyingKey
impl StructuralEq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Auto Trait Implementations
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more