iota_types::crypto

Trait IotaSignatureInner

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

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

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

Provided Associated Constants§

Source

const LENGTH: usize = _

Source

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

Required Associated Types§

Source

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

Source

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

Source

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

Provided Methods§

Source

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

Returns the deserialized signature and deserialized pubkey.

Source

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§

Source§

impl IotaSignatureInner for Ed25519IotaSignature

Source§

const LENGTH: usize = 97usize

Source§

type Sig = Ed25519Signature

Source§

type PubKey = Ed25519PublicKey

Source§

type KeyPair = Ed25519KeyPair

Source§

impl IotaSignatureInner for Secp256k1IotaSignature

Source§

const LENGTH: usize = 98usize

Source§

type Sig = Secp256k1Signature

Source§

type PubKey = Secp256k1PublicKey

Source§

type KeyPair = Secp256k1KeyPair

Source§

impl IotaSignatureInner for Secp256r1IotaSignature

Source§

const LENGTH: usize = 98usize

Source§

type Sig = Secp256r1Signature

Source§

type PubKey = Secp256r1PublicKey

Source§

type KeyPair = Secp256r1KeyPair