pub trait VerifyingKey:
PublicKey<PrivateKeyMaterial = Self::SigningKeyMaterial>
+ ValidCryptoMaterial
+ Sealed {
type SigningKeyMaterial: SigningKey<VerifyingKeyMaterial = Self>;
type SignatureMaterial: Signature<VerifyingKeyMaterial = Self>;
// Provided methods
fn verify_struct_signature<T: CryptoHash + Serialize>(
&self,
message: &T,
signature: &Self::SignatureMaterial,
) -> Result<()> { ... }
fn batch_verify<T: CryptoHash + Serialize>(
message: &T,
keys_and_signatures: Vec<(Self, Self::SignatureMaterial)>,
) -> Result<()> { ... }
}Expand description
A type family of public keys that are used for signing.
This trait has a requirement on a pub(crate) marker trait meant to
specifically limit its implementations to the present crate.
It is linked to a type of the Signature family, which carries the verification implementation.
Required Associated Types§
Sourcetype SigningKeyMaterial: SigningKey<VerifyingKeyMaterial = Self>
type SigningKeyMaterial: SigningKey<VerifyingKeyMaterial = Self>
The associated signing key type for this verifying key.
Sourcetype SignatureMaterial: Signature<VerifyingKeyMaterial = Self>
type SignatureMaterial: Signature<VerifyingKeyMaterial = Self>
The associated signature type for this verifying key.
Provided Methods§
Sourcefn verify_struct_signature<T: CryptoHash + Serialize>(
&self,
message: &T,
signature: &Self::SignatureMaterial,
) -> Result<()>
fn verify_struct_signature<T: CryptoHash + Serialize>( &self, message: &T, signature: &Self::SignatureMaterial, ) -> Result<()>
We provide the striaghtfoward implementation which dispatches to the signature.
Sourcefn batch_verify<T: CryptoHash + Serialize>(
message: &T,
keys_and_signatures: Vec<(Self, Self::SignatureMaterial)>,
) -> Result<()>
fn batch_verify<T: CryptoHash + Serialize>( message: &T, keys_and_signatures: Vec<(Self, Self::SignatureMaterial)>, ) -> Result<()>
We provide the implementation which dispatches to the signature.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl VerifyingKey for Ed25519PublicKey
impl VerifyingKey for Ed25519PublicKey
Source§impl VerifyingKey for MultiEd25519PublicKey
We deduce VerifyingKey from pointing to the signature material
impl VerifyingKey for MultiEd25519PublicKey
We deduce VerifyingKey from pointing to the signature material