Trait tor_llcrypto::pk::ValidatableSignature

source ·
pub trait ValidatableSignature {
    // Required method
    fn is_valid(&self) -> bool;

    // Provided method
    fn as_ed25519(&self) -> Option<&ValidatableEd25519Signature> { ... }
}
Expand description

A type for a validatable signature.

It necessarily includes the signature, the public key, and (a hash of?) the document being checked.

Having this trait enables us to write code for checking a large number of validatable signatures in a way that permits batch signatures for Ed25519.

To be used with validate_all_sigs.

Required Methods§

source

fn is_valid(&self) -> bool

Check whether this signature is a correct signature for the document.

Provided Methods§

source

fn as_ed25519(&self) -> Option<&ValidatableEd25519Signature>

Return this value as a validatable Ed25519 signature, if it is one.

Implementors§