[][src]Module private_currency::crypto

Cryptographic primitives used in the service.

Commitments and range proofs

See Commitment and SimpleRangeProof docs for details on cryptographic commitments. Commitments are used in the service instead of plaintext account balances and transfer amounts. Proofs are present in Transfer transactions, allowing to assert that the transferred amount is positive (i.e., the sender cannot create tokens for herself out of thin air by "transferring" negative amount to somebody), and that the sender has enough tokens to perform the transfer.

Public-key encryption

enc module re-exports necessary primitives to encrypt data within Transfers.

Modules

enc

Reexports from the box module (i.e., public-key encryption with Curve25519 keys) in the sodiumoxide crate.

Structs

Commitment

Pedersen commitment to an integer value.

Opening

Opening for a Pedersen commitment.

SimpleRangeProof

Range proof for a single value in the range [0; 1 << 64).