identity_iota_interaction::types::crypto

Trait Authenticator

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

    const LENGTH: usize;
}
Expand description

Trait impl’d by signatures in asymmetric cryptography.

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

Required Associated Constants§

const LENGTH: usize

Required Associated Types§

type PubKey: VerifyingKey<Sig = Self>

type PrivKey: SigningKey<Sig = 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 Authenticator for BLS12381Signature

§

const LENGTH: usize = 48usize

§

type PubKey = BLS12381PublicKey

§

type PrivKey = BLS12381PrivateKey

§

impl Authenticator for BLS12381Signature

§

const LENGTH: usize = 96usize

§

type PubKey = BLS12381PublicKey

§

type PrivKey = BLS12381PrivateKey

§

impl Authenticator for Ed25519Signature

§

const LENGTH: usize = 64usize

§

type PubKey = Ed25519PublicKey

§

type PrivKey = Ed25519PrivateKey

§

impl Authenticator for Secp256k1Signature

§

const LENGTH: usize = 64usize

§

type PubKey = Secp256k1PublicKey

§

type PrivKey = Secp256k1PrivateKey

§

impl Authenticator for Secp256r1Signature

§

const LENGTH: usize = 64usize

§

type PubKey = Secp256r1PublicKey

§

type PrivKey = Secp256r1PrivateKey