Trait cryptraits::key::KeyPair

source ·
pub trait KeyPair: Clone + Zeroize {
    type SK: SecretKey;

    fn public(&self) -> &<Self::SK as SecretKey>::PK;
    fn to_public(&self) -> <Self::SK as SecretKey>::PK;
    fn secret(&self) -> &Self::SK;
}
Expand description

Trait represents a keypair.

Required Associated Types§

Required Methods§

Get a PublicKey of KeyPair.

Derives the PublicKey corresponding to KeyPair SK;

Get a SecretKey of KeyPair.

Implementors§