Crate tari_crypto

Crate tari_crypto 

Source
Expand description

Tari-Crypto

Re-exports§

pub use tari_utilities;

Modules§

commitment
A commitment is like a sealed envelope. You put some information inside the envelope, and then seal (commit) it. You can’t change what you’ve said, but also, no-one knows what you’ve said until you’re ready to open (open) the envelope and reveal its contents. Also it’s a special envelope that can only be opened by a special opener that you keep safe in your drawer.
compressed_commitment
A commitment is like a sealed envelope. You put some information inside the envelope, and then seal (commit) it. You can’t change what you’ve said, but also, no-one knows what you’ve said until you’re ready to open (open) the envelope and reveal its contents. Also it’s a special envelope that can only be opened by a special opener that you keep safe in your drawer.
compressed_key
This stores a public key in compressed form, keeping it in compressed form until the point is needed, only then decompressing it back down to a public key
deterministic_randomizer
A deterministic randomizer with utility functions for operating on numbers and arrays in a reproducible and platform-indepdent way.
dhke
The robotic innards of a Diffie-Hellman key exchange (DHKE) producing a shared secret. Even though the result of a DHKE is the same type as a public key, it is typically treated as a secret value. To make this work more safely, we ensure that a DHKE result is cleared after use (but beware of subsequent copies or moves). Because a DHKE shared secret is intended to be used in further key derivation, the only visibility into it is as a byte array; it’s not possible to directly extract the underlying public key type, and you probably shouldn’t clone the byte array without a very good reason. If you need the underlying public key itself, you probably should be using something else.
errors
Errors used in the Tari Crypto crate
extended_range_proof
Extended range proofs
hashing
The Hashing API
keys
General definition of public-private key pairs for use in Tari. The traits and structs defined here are used in the Tari domain logic layer exclusively (as opposed to any specific implementation of ECC curve). The idea being that we can swap out the underlying implementation without worrying too much about the impact on upstream code.
range_proof
Range proofs are used to determine if a value lies inside a particular range. Most commonly, we want to prove in zero knowledge that a value is non-negative.
ristretto
This module contains implementations using the Ristretto curve.
signatures
This module defines generic traits for handling the digital signature operations, agnostic of the underlying elliptic curve implementation

Macros§

hash_domain
Creates a DomainSeparation struct for a given domain.
hasher
Creates a domain separated hasher type and domain in one