Trait rubble::ecdh::EcdhProvider[][src]

pub trait EcdhProvider {
    type SecretKey: SecretKey;
    fn generate_keypair<R>(
        &mut self,
        rng: &mut R
    ) -> (Self::SecretKey, PublicKey)
    where
        R: RngCore + CryptoRng
; }
Expand description

Trait for ECDH providers.

Associated Types

Provider-defined secret key type.

Required methods

Generates a P-256 key pair using cryptographically strong randomness.

Implementors must ensure that they only return valid private/public key pairs from this method.

Rubble will pass a cryptographically secure random number generator rng to this function that may be used to obtain entropy for key generation. Implementations may also use their own RNG if they so choose.

Implementors