Module exonum::crypto
[−]
[src]
Cryptography related types and functions.
Sodium library is used under the hood through sodiumoxide rust bindings.
Structs
Hash |
SHA-256 hash. |
HashStream |
This structure provides a possibility to calculate a SHA-256 hash digest for a stream of data. |
PublicKey |
Ed25519 public key used to verify digital signatures. |
SecretKey |
Ed25519 secret key used to create digital signatures over messages. |
Seed |
Ed25519 seed that can be used for deterministic keypair generation. |
SignStream |
This structure provides a possibility to create and/or verify Ed25519 digital signatures for a stream of data. |
Signature |
Ed25519 digital signature. |
Constants
HASH_SIZE |
Number of bytes in a |
PUBLIC_KEY_LENGTH |
Number of bytes in a |
SECRET_KEY_LENGTH |
Number of bytes in a |
SEED_LENGTH |
Number of bytes in a |
SIGNATURE_LENGTH |
Number of bytes in a |
Traits
CryptoHash |
A common trait for the ability to compute a cryptographic hash. |
Functions
gen_keypair |
Generates a secret key and a corresponding public key using a cryptographically secure pseudo-random number generator. |
gen_keypair_from_seed |
Computes a secret key and a corresponding public key from a |
hash |
Calculates an SHA-256 hash digest of a bytes slice. |
init |
Initializes the sodium library and chooses faster versions of the primitives if possible. |
sign |
Signs slice of bytes using the signer's secret key. Returns the resulting |
verify |
Verifies that |