hopr_crypto_types

Module primitives

Source
Expand description

Implements low-level cryptographic primitives, such as SimpleStreamCipher, SimpleDigest and SimpleMac.

Structs§

EthDigest
Computation wrapper for a digest that’s compatible with Ethereum digests. Use new, update and finalize triplet to produce hash of arbitrary data. Currently this instance is using Keccak256.
SimpleDigest
Simple digest computation wrapper. Use new, update and finalize triplet to produce hash of arbitrary data. Currently this instance is using Blake2s256.
SimpleMac
Simple Message Authentication Code (MAC) computation wrapper Use new, update and finalize triplet to produce MAC of arbitrary data. Currently instantiated using Blake2s256 MAC.
SimpleStreamCipher
Simple stream cipher wrapper Use new and apply (or apply_copy) to XOR the keystream on the plaintext or ciphertext. Currently this instance is using ChaCha20.

Traits§

DigestLike
Generalization of digest-like operation (MAC, Digest,…) Defines the update and finalize operations to produce digest value of arbitrary data.

Type Aliases§

SecretKey
Represents a secret key of fixed length. The value is auto-zeroized on drop.