Crate literate_crypto

Source
Expand description

Modules§

aes
AES is a commonly used block cipher.
doc
ecc
Elliptic curve cryptography.
sha2
SHA-1 and SHA-2 are hash functions specified by FIPS 180-4.
sha3
SHA-3 is a modern hash function specified by FIPS 202.

Structs§

Aes128
AES block cipher with 128-bit keys.
Aes192
AES block cipher with 192-bit keys.
Aes256
AES block cipher with 256-bit keys.
BlockSizeTooSmall
Cbc
Cipher block chaining mode is the most common mode of operation for block ciphers which combines every block with all of the previous blocks of ciphertext.
Ctr
Block counter mode is a block chaining mode which turns a block cipher into a stream cipher, and hence does not require a padding scheme.
DaviesMeyer
The Davies-Meyer construction turns a block cipher into a Merkle-Damgard compression function.
Ecb
Electronic codebook mode, a simple and insecure mode of operation.
Ecdsa
Elliptic curve digital signature algorithm.
EcdsaSignature
Fortuna
Fortuna is a CSPRNG built from a block cipher and a hash function.
Hmac
A hash-based message authentication code is a method for creating a MAC from a hash function.
InvalidPrivateKey
Error indicating that a private key is invalid.
InvalidSignature
Error indicating that a signature is invalid.
MerkleDamgard
The Merkle-Damgard construction, used as a building block for hash functions.
MultiSchnorr
A multisig scheme based on Schnorr signatures.
OneTimePad
The one-time pad is a simple cipher which XORs the input plaintext with the key.
Pkcs7
PKCS #7, a simple approach to padding.
Schnorr
Schnorr is a simple, efficient, and provably secure (under the ECDLP assumption) signature algorithm.
SchnorrRandomness
Before creating a Schnorr multisig, the actors must each commit to a secret random number $r_i$. They proceed in two rounds:
SchnorrSag
Spontaneous anonymous group signatures.
SchnorrSagSignature
SchnorrSignature
Secp256k1
Sha1
SHA-1 hash specified by FIPS 180-4.
Sha3_224
SHA-3 hash with 224-bit output.
Sha3_256
SHA-3 hash with 256-bit output.
Sha3_384
SHA-3 hash with 384-bit output.
Sha3_512
SHA-3 hash with 512-bit output.
Sha224
SHA-224 hash specified by FIPS 180-4.
Sha256
SHA-256 hash specified by FIPS 180-4.

Traits§

BlockCipher
A block cipher encrypts and decrypts data in blocks of fixed size.
BlockDecrypt
The decryption half of a block cipher.
BlockEncrypt
The encryption half of a block cipher.
BlockMode
A way to execute a block cipher on data of arbitrary length.
Cipher
A cipher encrypts and decrypts data of arbitrary length using a symmetric key.
CipherDecrypt
The decryption half of a cipher.
CipherEncrypt
The encryption half of a cipher.
CompressionFn
A compression function used internally by the Merkle-Damgard construction.
Csprng
Cryptographically secure pseudorandom number generator.
DaviesMeyerStep
The step function of the Davies-Meyer construction defines how the previous hash state is combined with the new hash state.
Entropy
A source of entropy.
Hash
A cryptographic hash function maps a preimage of arbitrary length into a fixed-size hash digest.
Mac
A message authentication code algorithm is a method for computing a keyed hash.
MerkleDamgardPad
The padding scheme used by the Merkle-Damgard construction.
MultisigScheme
A multisig scheme is similar to a regular signature, except that it is signed by multiple private keys and verified with multiple public keys.
Padding
A scheme to pad messages to be a multiple of some block size.
RingScheme
Ring signature scheme.
SignatureScheme
A signature scheme is a method by which an actor proves that he generated a message.

Functions§

shuffle
Randomly shuffle the elements of a slice.
uniform_random
Draw a uniformly random number from a range.