Expand description

Collection of encryption-related data structures and algorithms used in the Safecoin 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

  • Authenticated encryption implementation.
  • The discrete log implementation for the twisted ElGamal decryption.
  • The twisted ElGamal encryption implementation.
  • Errors related to the twisted ElGamal encryption scheme.
  • Pedersen commitment implementation using the Ristretto prime-order group.