Trait tari_crypto::keys::PublicKey[][src]

pub trait PublicKey: ByteArray + Add<Output = Self> + Clone + PartialOrd + Ord + Default + Serialize + DeserializeOwned {
    type K: SecretKey;
    fn from_secret_key(k: &Self::K) -> Self;
fn key_length() -> usize;
fn batch_mul(scalars: &[Self::K], points: &[Self]) -> Self; fn random_keypair<R: Rng + CryptoRng>(rng: &mut R) -> (Self::K, Self) { ... } }
Expand description

A trait specifying common behaviour for representing PublicKeys. Specific elliptic curve implementations need to implement this trait for them to be used in Tari.

See SecretKey for an example.

Associated Types

Required methods

Calculate the public key associated with the given secret key. This should not fail; if a failure does occur (implementation error?), the function will panic.

Provided methods

Implementors