pub struct VerifyingKey { /* private fields */ }Expand description
Taproot Schnorr verifying key.
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn from_bytes(x_bytes: &FieldBytes) -> Result<Self>
pub fn from_bytes(x_bytes: &FieldBytes) -> Result<Self>
Parse verifying key from big endian-encoded x-coordinate.
§Errors
Returns an error if a curve point could not be reconstructed from x_bytes.
Sourcepub fn from_slice(x_bytes: &[u8]) -> Result<Self>
pub fn from_slice(x_bytes: &[u8]) -> Result<Self>
Parse verifying key from big endian-encoded x-coordinate.
§Errors
Returns an error if x_bytes is not 32-bytes long or if a valid curve point could not
be reconstructed.
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<()>
pub fn verify_raw(&self, message: &[u8], signature: &Signature) -> Result<()>
Compute Schnorr signature.
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.
§Errors
Returns Error if signature is not valid for message.
Trait Implementations§
Source§impl AsRef<VerifyingKey> for SigningKey
impl AsRef<VerifyingKey> for SigningKey
Source§fn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
Source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for VerifyingKey
Source§impl Debug for VerifyingKey
impl Debug for VerifyingKey
Source§impl<D> DigestVerifier<D, Signature> for VerifyingKey
impl<D> DigestVerifier<D, Signature> for VerifyingKey
impl Eq for VerifyingKey
Source§impl From<&VerifyingKey> for AffinePoint
impl From<&VerifyingKey> for AffinePoint
Source§fn from(vk: &VerifyingKey) -> AffinePoint
fn from(vk: &VerifyingKey) -> AffinePoint
Source§impl From<&VerifyingKey> for PublicKey
impl From<&VerifyingKey> for PublicKey
Source§fn from(vk: &VerifyingKey) -> PublicKey
fn from(vk: &VerifyingKey) -> PublicKey
Source§impl From<VerifyingKey> for AffinePoint
impl From<VerifyingKey> for AffinePoint
Source§fn from(vk: VerifyingKey) -> AffinePoint
fn from(vk: VerifyingKey) -> AffinePoint
Source§impl From<VerifyingKey> for PublicKey
impl From<VerifyingKey> for PublicKey
Source§fn from(vk: VerifyingKey) -> PublicKey
fn from(vk: VerifyingKey) -> PublicKey
Source§impl MultipartVerifier<Signature> for VerifyingKey
impl MultipartVerifier<Signature> for VerifyingKey
Source§fn multipart_verify(&self, msg: &[&[u8]], signature: &Signature) -> Result<()>
fn multipart_verify(&self, msg: &[&[u8]], signature: &Signature) -> Result<()>
Verifier::verify() but the message is provided in non-contiguous byte
slices. Read moreSource§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
Source§impl PrehashVerifier<Signature> for VerifyingKey
impl PrehashVerifier<Signature> for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Source§impl TryFrom<&[u8]> for VerifyingKey
impl TryFrom<&[u8]> for VerifyingKey
Source§impl TryFrom<AffinePoint> for VerifyingKey
impl TryFrom<AffinePoint> for VerifyingKey
Source§fn try_from(point: AffinePoint) -> Result<VerifyingKey>
fn try_from(point: AffinePoint) -> Result<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 UnsafeUnpin for VerifyingKey
impl UnwindSafe for VerifyingKey
Blanket Implementations§
Source§impl<S, T> AsyncMultipartVerifier<S> for Twhere
T: MultipartVerifier<S>,
impl<S, T> AsyncMultipartVerifier<S> for Twhere
T: MultipartVerifier<S>,
Source§async fn multipart_verify_async(
&self,
msg: &[&[u8]],
signature: &S,
) -> Result<(), Error>
async fn multipart_verify_async( &self, msg: &[&[u8]], signature: &S, ) -> Result<(), Error>
MultipartVerifier::multipart_verify() where the
message is provided in non-contiguous byte slices.