Skip to main content

Crate commonware_cryptography

Crate commonware_cryptography 

Source
Expand description

Generate keys, sign arbitrary messages, and deterministically verify signatures.

§Randomness

Cryptographic operations that accept an RNG require a cryptographically secure and unpredictable source unless documented otherwise. A weak or predictable RNG may compromise security.

§Status

Stability varies by primitive. See README for details.

Re-exports§

pub use crate::bloomfilter::BloomFilter;
pub use crate::keccak256::CoreKeccak256;
pub use crate::keccak256::Keccak256;
pub use crate::lthash::LtHash;
pub use crate::sha512::CoreSha512;
pub use crate::sha512::Sha512;
pub use crate::secret::Secret;
pub use crate::sha256::CoreSha256;
pub use crate::sha256::Sha256;
pub use crate::blake3::Blake3;
pub use crate::blake3::CoreBlake3;
pub use crate::crc32::Crc32;
pub use crate::chacha20_poly1305::ChaCha20Poly1305;

Modules§

banderwagon
blake3
BLAKE3 implementation of the Hasher trait.
bloomfilter
An implementation of a Bloom Filter.
bls12381
Distributed Key Generation (DKG), Resharing, Signatures, and Threshold Signatures over the BLS12-381 curve.
certificate
Cryptographic primitives for generating and verifying certificates.
chacha20_poly1305
ChaCha20-Poly1305 Cipher with an implicit counter nonce.
crc32
CRC32C implementation of the Hasher trait.
ed25519
Ed25519 implementation of the crate::Verifier and crate::Signer traits.
handshake
Authenticated key exchange protocols.
keccak256
Keccak-256 implementation of the Hasher trait.
lthash
A homomorphic hash function that enables efficient incremental updates.
reed_solomon
Encode and reconstruct shards using Reed-Solomon erasure coding over GF(2^16).
secp256r1
Secp256r1 implementation of the crate::Verifier and crate::Signer traits.
secret
A wrapper type for secret values that prevents accidental leakage.
sha256
SHA-256 implementation of the Hasher trait.
sha512
SHA-512 implementation of the Hasher trait.
transcript
This module provides a Transcript abstraction.
zk

Macros§

impl_certificate_bls12381_multisig
Generates a BLS12-381 multisig signing scheme wrapper for a specific protocol.
impl_certificate_bls12381_threshold
Generates a BLS12-381 threshold signing scheme wrapper for a specific protocol.
impl_certificate_ed25519
Generates an Ed25519 signing scheme wrapper for a specific protocol.
impl_certificate_secp256r1
Generates a Secp256r1 signing scheme wrapper for a specific protocol.

Structs§

BatchEntry
A borrowed view of one signature and the message it authenticates.
Digested
A shared value paired with its Digest.

Traits§

BatchVerifier
A PublicKey that supports batch verification of Signatures.
Cipher
Authenticated encryption of an ordered sequence of messages.
Committable
An object that can produce a commitment of itself.
Digest
Specializes the commonware_utils::Array trait with the Copy trait for cryptographic digests (which should be cheap to clone).
Digestible
An object that can be uniquely represented as a Digest.
Hasher
Interface that commonware crates rely on for hashing.
PrivateKey
A Signer that can be serialized/deserialized.
PublicKey
A PublicKey, able to verify Signatures.
Recoverable
An extension of Signature that supports public key recovery.
Signature
A Signature over a message.
Signer
Produces Signatures over messages that can be verified with a corresponding PublicKey.
Verifier
Verifies Signatures over messages.

Type Aliases§

DigestOf