Module crypto

Source
Expand description

Define the cryptographic primitives used by the Linera protocol.

Structs§

CryptoHash
A Keccak256 value.
CryptoHashVec
A vector of cryptographic hashes. This is used to represent a hash of a list of hashes.
Ed25519PublicKey
An Ed25519 signature public key.
Ed25519SecretKey
An Ed25519 secret key.
Ed25519Signature
An Ed25519 signature.
EvmPublicKey
A secp256k1 public key.
EvmSecretKey
A secp256k1 secret key.
EvmSignature
A secp256k1 signature.
InMemorySigner
In-memory signer.
Secp256k1PublicKey
A secp256k1 public key.
Secp256k1SecretKey
A secp256k1 secret key.
Secp256k1Signature
A secp256k1 signature.
TestString
A BCS-signable struct for testing.

Enums§

AccountPublicKey
The public key of a chain owner. The corresponding private key is allowed to propose blocks on the chain and transfer account’s tokens.
AccountSecretKey
The private key of a chain owner.
AccountSignature
The signature of a chain owner.
CryptoError
Error type for cryptographic errors.
SignatureScheme
Signature scheme used for the public key.

Traits§

BcsHashable
Activate the blanket implementation of Hashable based on serde and BCS.
BcsSignable
Activate the blanket implementation of Signable based on serde and BCS.
CryptoRng
Wrapper around rand::CryptoRng and rand::RngCore.
HasTypeName
Something that we know how to hash and sign.
Hashable
Something that we know how to hash.
Signer
A trait for signing keys.

Functions§

u64_array_to_be_bytes
Returns the bytes that represent the integers in big-endian.

Type Aliases§

ValidatorKeypair
The key pair of a validator.
ValidatorPublicKey
The public key of a validator.
ValidatorSecretKey
The private key of a validator.
ValidatorSignature
The signature of a validator.