Module crypto

Source
Expand description

Types, abstractions and utilities for lower-level cryptography.

Structs§

Random32Bytes
A convenience wrapper for generating and encoding/decoding cryptographically secure random values.
Secp256k1Order
Signature
A signature (e.g a ECDSA/secp256k1/SHA-256 signature).
VerifyingKey
A verifying key (e.g an ECDSA/secp256k1 public key).

Enums§

EllipticCurve
An elliptic curve.
KeyEncoding
A key encoding format.
MessageDigest
A cryptographic message digest/hash function.
SignatureAlgorithm
A signature algorithm.
SignatureEncoding
A signature encoding format.

Functions§

verify_signature
Returns an Ok result for valid signature for the message, or an appropriate Err result otherwise.