identity_iota_interaction::types::crypto

Trait IotaSignatureInner

pub trait IotaSignatureInner:
    Sized
    + ToFromBytes
    + PartialEq
    + Eq
    + Hash {
    type Sig: Authenticator<PubKey = Self::PubKey>;
    type PubKey: VerifyingKey<Sig = Self::Sig> + IotaPublicKey;
    type KeyPair: KeyPair<PubKey = Self::PubKey, Sig = Self::Sig>;

    const LENGTH: usize = _;
    const SCHEME: SignatureScheme = <Self::PubKey>::SIGNATURE_SCHEME;

    // Provided methods
    fn get_verification_inputs(
        &self,
    ) -> Result<(Self::Sig, Self::PubKey), IotaError> { ... }
    fn new(kp: &Self::KeyPair, message: &[u8]) -> Self { ... }
}

Provided Associated Constants§

const LENGTH: usize = _

const SCHEME: SignatureScheme = <Self::PubKey>::SIGNATURE_SCHEME

Required Associated Types§

type Sig: Authenticator<PubKey = Self::PubKey>

type PubKey: VerifyingKey<Sig = Self::Sig> + IotaPublicKey

type KeyPair: KeyPair<PubKey = Self::PubKey, Sig = Self::Sig>

Provided Methods§

fn get_verification_inputs( &self, ) -> Result<(Self::Sig, Self::PubKey), IotaError>

Returns the deserialized signature and deserialized pubkey.

fn new(kp: &Self::KeyPair, message: &[u8]) -> 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 IotaSignatureInner for Ed25519IotaSignature

§

const LENGTH: usize = 97usize

§

type Sig = Ed25519Signature

§

type PubKey = Ed25519PublicKey

§

type KeyPair = Ed25519KeyPair

§

impl IotaSignatureInner for Secp256k1IotaSignature

§

const LENGTH: usize = 98usize

§

type Sig = Secp256k1Signature

§

type PubKey = Secp256k1PublicKey

§

type KeyPair = Secp256k1KeyPair

§

impl IotaSignatureInner for Secp256r1IotaSignature

§

const LENGTH: usize = 98usize

§

type Sig = Secp256r1Signature

§

type PubKey = Secp256r1PublicKey

§

type KeyPair = Secp256r1KeyPair