sui_types::crypto

Trait SigningKey

pub trait SigningKey:
    ToFromBytes
    + Serialize
    + DeserializeOwned
    + Send
    + Sync
    + 'static {
    type PubKey: VerifyingKey<PrivKey = Self>;
    type Sig: Authenticator<PrivKey = Self>;

    const LENGTH: usize;
}
Expand description

Trait impl’d by private (secret) keys in asymmetric cryptography.

The trait bounds are implemented so as to be symmetric and equivalent to the ones on its associated types for public key and signature material.

Required Associated Constants§

const LENGTH: usize

Required Associated Types§

type PubKey: VerifyingKey<PrivKey = Self>

type Sig: Authenticator<PrivKey = Self>

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§

§

impl SigningKey for BLS12381PrivateKey

§

const LENGTH: usize = 32usize

§

type PubKey = BLS12381PublicKey

§

type Sig = BLS12381Signature

§

impl SigningKey for BLS12381PrivateKey

§

const LENGTH: usize = 32usize

§

type PubKey = BLS12381PublicKey

§

type Sig = BLS12381Signature

§

impl SigningKey for Ed25519PrivateKey

§

const LENGTH: usize = 32usize

§

type PubKey = Ed25519PublicKey

§

type Sig = Ed25519Signature

§

impl SigningKey for Secp256k1PrivateKey

§

const LENGTH: usize = 32usize

§

type PubKey = Secp256k1PublicKey

§

type Sig = Secp256k1Signature

§

impl SigningKey for Secp256r1PrivateKey

§

const LENGTH: usize = 32usize

§

type PubKey = Secp256r1PublicKey

§

type Sig = Secp256r1Signature