pub trait KeyPair: From<Self::PrivKey> + Signer<Self::Sig> + EncodeDecodeBase64 + FromStr {
    type PubKey: VerifyingKey
    where
        <Self::PubKey as VerifyingKey>::PrivKey == Self::PrivKey,
        <Self::PubKey as VerifyingKey>::Sig == Self::Sig
; type PrivKey: SigningKey
    where
        <Self::PrivKey as SigningKey>::PubKey == Self::PubKey,
        <Self::PrivKey as SigningKey>::Sig == Self::Sig
; type Sig: Authenticator
    where
        <Self::Sig as Authenticator>::PubKey == Self::PubKey,
        <Self::Sig as Authenticator>::PrivKey == Self::PrivKey
; fn public(&self) -> &Self::PubKey; fn private(self) -> Self::PrivKey; fn copy(&self) -> Self; fn generate<R>(rng: &mut R) -> Self
    where
        R: CryptoRng + RngCore
; }
Expand description

Trait impl’d by a public / private key pair in asymmetric cryptography.

Required Associated Types

Required Methods

Implementors