pub trait ProofOfPossessionVerifier: Pairwhere
Self::Public: CryptoType,{
// Required method
fn verify_proof_of_possession(
proof_of_possession: &Self::Signature,
allegedly_possessesd_pubkey: &Self::Public,
) -> bool;
}
Expand description
Pair which is able to verify proof of possession.
While you don’t need a keypair to verify a proof of possession (you only need a public key) we constrain on Pair to use the Public and Signature types associated to Pair. This is implemented in different trait (than Public Key) to provide default behavior.
Required Methods§
Sourcefn verify_proof_of_possession(
proof_of_possession: &Self::Signature,
allegedly_possessesd_pubkey: &Self::Public,
) -> bool
fn verify_proof_of_possession( proof_of_possession: &Self::Signature, allegedly_possessesd_pubkey: &Self::Public, ) -> bool
Verify proof of possession.
The proof of possession verifier is supposed to to verify a signature with unique hash context that is produced solely for this reason. This proves that that the secret key is known to the prover.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<LeftPair: PairT + ProofOfPossessionVerifier, RightPair: PairT + ProofOfPossessionVerifier, const PUBLIC_KEY_LEN: usize, const SIGNATURE_LEN: usize, SubTag: PairedCryptoSubTagBound> ProofOfPossessionVerifier for sp_core::paired_crypto::Pair<LeftPair, RightPair, PUBLIC_KEY_LEN, SIGNATURE_LEN, SubTag>
This requires that the proof_of_possession of LEFT is of LeftPair::Signature. This is the case for current implemented cases but does not holds in general.