Trait diem_sdk::crypto::VerifyingKey [−][src]
pub trait VerifyingKey: PublicKey<PrivateKeyMaterial = Self::SigningKeyMaterial> + ValidCryptoMaterial + Sealed { type SigningKeyMaterial: SigningKey; type SignatureMaterial: Signature; fn verify_struct_signature<T>(
&self,
message: &T,
signature: &Self::SignatureMaterial
) -> Result<(), Error>
where
T: CryptoHash + Serialize, { ... } fn batch_verify<T>(
message: &T,
keys_and_signatures: Vec<(Self, Self::SignatureMaterial), Global>
) -> Result<(), Error>
where
T: CryptoHash + Serialize, { ... } }
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.
Associated Types
type SigningKeyMaterial: SigningKey
[src]
Expand description
The associated signing key type for this verifying key.
type SignatureMaterial: Signature
[src]
Expand description
The associated signature type for this verifying key.
Provided methods
fn verify_struct_signature<T>(
&self,
message: &T,
signature: &Self::SignatureMaterial
) -> Result<(), Error> where
T: CryptoHash + Serialize,
[src]
&self,
message: &T,
signature: &Self::SignatureMaterial
) -> Result<(), Error> where
T: CryptoHash + Serialize,
Expand description
We provide the striaghtfoward implementation which dispatches to the signature.
fn batch_verify<T>(
message: &T,
keys_and_signatures: Vec<(Self, Self::SignatureMaterial), Global>
) -> Result<(), Error> where
T: CryptoHash + Serialize,
[src]
message: &T,
keys_and_signatures: Vec<(Self, Self::SignatureMaterial), Global>
) -> Result<(), Error> where
T: CryptoHash + Serialize,
Expand description
We provide the implementation which dispatches to the signature.
Implementors
impl VerifyingKey for Ed25519PublicKey
[src]
impl VerifyingKey for Ed25519PublicKey
[src]impl VerifyingKey for MultiEd25519PublicKey
[src]
impl VerifyingKey for MultiEd25519PublicKey
[src]We deduce VerifyingKey from pointing to the signature material
we get the ability to do pubkey.validate(msg, signature)