referrerpolicy=no-referrer-when-downgrade

Trait ProofOfPossessionGenerator

Source
pub trait ProofOfPossessionGenerator: Pair{
    // Required method
    fn generate_proof_of_possession(
        &mut self,
        owner: &[u8],
    ) -> Self::ProofOfPossession;
}
Expand description

Pair which is able to generate proof of possession.

This is implemented in different trait to provide default behavior.

Required Methods§

Source

fn generate_proof_of_possession( &mut self, owner: &[u8], ) -> Self::ProofOfPossession

Generate proof of possession.

This is usually done by signing the owner’s identifier, this is prevent front runner to claim ownership of public keys of other entities.

However, for aggregatable signature the proof of possession generator is supposed to produce a “signature” with unique hash context that should never be used in other signatures. While this proves that the secret key is known to the prover, it prevents malicious actors to trick an honest party to sign an unpossessed public key resulting in a rogue key attack (See: Section 4.3 of - Ristenpart, T., & Yilek, S. (2007). The power of proofs-of-possession: Securing multiparty signatures against rogue-key attacks. In , Annual {{International Conference}} on the {{Theory}} and {{Applications}} of {{Cryptographic Techniques} (pp. 228–245). : Springer).

As such, for aggregatable signatures, proof of possession consists of two signatures one regular signature signing the owner identity and the second one with unique context which signs the correspoding public key (and nothing else).

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§

Source§

impl<LeftPair: PairT + ProofOfPossessionGenerator, RightPair: PairT + ProofOfPossessionGenerator, const PUBLIC_KEY_LEN: usize, const SIGNATURE_LEN: usize, const POP_LEN: usize, SubTag: PairedCryptoSubTagBound> ProofOfPossessionGenerator for sp_core::paired_crypto::Pair<LeftPair, RightPair, PUBLIC_KEY_LEN, SIGNATURE_LEN, POP_LEN, SubTag>
where Pair<LeftPair, RightPair, PUBLIC_KEY_LEN, SIGNATURE_LEN, POP_LEN, SubTag>: CryptoType, Public<PUBLIC_KEY_LEN, SubTag>: PublicT, Signature<SIGNATURE_LEN, SubTag>: SignatureT, ProofOfPossession<POP_LEN, SubTag>: SignatureT, LeftPair::Seed: From<[u8; 32]> + Into<[u8; 32]>, RightPair::Seed: From<[u8; 32]> + Into<[u8; 32]>,

Source§

impl<T> ProofOfPossessionGenerator for T
where T: NonAggregatable<ProofOfPossession = Self::Signature>,

Source§

impl<T: BlsBound> ProofOfPossessionGenerator for sp_core::bls::Pair<T>