Trait sui_crypto::Verifier

pub trait Verifier<S> {
    // Required method
    fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>;
}
Expand description

Verify the provided message bytestring using Self (e.g. a public key)

Required Methods§

fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>

Use Self to verify that the provided signature for a given message bytestring is authentic.

Returns Error if it is inauthentic, or otherwise returns ().

Implementations on Foreign Types§

§

impl Verifier<Signature> for SigningKey

§

fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this signing key’s public key.

§

impl Verifier<Signature> for VerifyingKey

§

fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

Verify a signature on a message with this keypair’s public key.

§Return

Returns Ok(()) if the signature is valid, and Err otherwise.

§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>
where C: PrimeCurve + CurveArithmetic + DigestPrimitive, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>, <<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,

§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>
where C: PrimeCurve + CurveArithmetic + DigestPrimitive, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,

§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

Implementors§

source§

impl Verifier<SimpleSignature> for Ed25519Verifier

Available on crate feature ed25519 only.
source§

impl Verifier<SimpleSignature> for Ed25519VerifyingKey

Available on crate feature ed25519 only.
source§

impl Verifier<SimpleSignature> for Secp256k1Verifier

Available on crate feature secp256k1 only.
source§

impl Verifier<SimpleSignature> for Secp256k1VerifyingKey

Available on crate feature secp256k1 only.
source§

impl Verifier<SimpleSignature> for Secp256r1Verifier

Available on crate feature secp256r1 only.
source§

impl Verifier<SimpleSignature> for Secp256r1VerifyingKey

Available on crate feature secp256r1 only.
source§

impl Verifier<SimpleSignature> for SimpleVerifier

Available on crate features ed25519 or secp256r1 or secp256k1 or zklogin only.
source§

impl Verifier<SimpleSignature> for SimpleVerifiyingKey

Available on (crate features ed25519 or secp256r1 or secp256k1) and (crate features ed25519 or secp256r1 or secp256k1 or zklogin) only.
source§

impl Verifier<UserSignature> for Ed25519Verifier

Available on crate feature ed25519 only.
source§

impl Verifier<UserSignature> for Ed25519VerifyingKey

Available on crate feature ed25519 only.
source§

impl Verifier<UserSignature> for MultisigVerifier

Available on crate features ed25519 or secp256r1 or secp256k1 or zklogin only.
source§

impl Verifier<UserSignature> for Secp256k1Verifier

Available on crate feature secp256k1 only.
source§

impl Verifier<UserSignature> for Secp256k1VerifyingKey

Available on crate feature secp256k1 only.
source§

impl Verifier<UserSignature> for Secp256r1Verifier

Available on crate feature secp256r1 only.
source§

impl Verifier<UserSignature> for Secp256r1VerifyingKey

Available on crate feature secp256r1 only.
source§

impl Verifier<UserSignature> for SimpleVerifier

Available on crate features ed25519 or secp256r1 or secp256k1 or zklogin only.
source§

impl Verifier<UserSignature> for SimpleVerifiyingKey

Available on (crate features ed25519 or secp256r1 or secp256k1) and (crate features ed25519 or secp256r1 or secp256k1 or zklogin) only.
source§

impl Verifier<UserSignature> for UserSignatureVerifier

Available on crate features ed25519 or secp256r1 or secp256k1 or zklogin only.
source§

impl Verifier<UserSignature> for ZkloginVerifier

Available on crate feature zklogin only.
source§

impl Verifier<Ed25519Signature> for Ed25519VerifyingKey

Available on crate feature ed25519 only.
source§

impl Verifier<MultisigAggregatedSignature> for MultisigVerifier

Available on crate features ed25519 or secp256r1 or secp256k1 or zklogin only.
source§

impl Verifier<Secp256k1Signature> for Secp256k1VerifyingKey

Available on crate feature secp256k1 only.
source§

impl Verifier<Secp256r1Signature> for Secp256r1VerifyingKey

Available on crate feature secp256r1 only.
source§

impl Verifier<ZkLoginAuthenticator> for ZkloginVerifier

Available on crate feature zklogin only.