Expand description
Collection of encryption-related data structures and algorithms used in the Solana zk-token protocol.
The module contains implementations of the following cryptographic objects:
- Pedersen commitments that uses the prime-order Ristretto representation of Curve25519. curve25519-dalek is used for the Ristretto group implementation.
- The twisted ElGamal scheme, which converts Pedersen commitments into a public-key encryption scheme.
- Basic type-wrapper around the AES-GCM-SIV symmetric authenticated encryption scheme implemented by aes-gcm-siv crate.
Modules§
- auth_
encryption - Authenticated encryption implementation.
- discrete_
log - The discrete log implementation for the twisted ElGamal decryption.
- elgamal
- The twisted ElGamal encryption implementation.
- grouped_
elgamal - The twisted ElGamal group encryption implementation.
- pedersen
- Pedersen commitment implementation using the Ristretto prime-order group.
- pod
Constants§
- AE_
CIPHERTEXT_ LEN - Byte length of a complete authenticated encryption ciphertext component that includes the ciphertext and nonce components
- AE_
KEY_ LEN - Byte length of an authenticated encryption secret key
- DECRYPT_
HANDLE_ LEN - Byte length of a decrypt handle
- ELGAMAL_
CIPHERTEXT_ LEN - Byte length of an ElGamal ciphertext
- ELGAMAL_
KEYPAIR_ LEN - Byte length of an ElGamal keypair
- ELGAMAL_
PUBKEY_ LEN - Byte length of an ElGamal public key
- ELGAMAL_
SECRET_ KEY_ LEN - Byte length of an ElGamal secret key
- PEDERSEN_
COMMITMENT_ LEN - Byte length of a Pedersen commitment.
- PEDERSEN_
OPENING_ LEN - Byte length of a Pedersen opening.