Crate phoenix_core

source ·
Expand description

Phoenix’s Core library types and behaviors



  • Crossover Fee module contains the logic related to Crossover structure
  • Phoenix’s Core Errors
  • Fee Fee module contains the logic related to Fee and Remainder structure
  • Transparent and Obfuscated Notes


  • Public (Spend) Key Public pair of a·G and b·G defining a PublicKey
  • Secret (Spend) Key Secret pair of a and b defining a SecretKey
  • Stealth Address To obfuscate the identity of the participants, we utilizes a Stealth Address system. A StealthAddress is composed by a one-time note-public-key (the actual address) and a random point R.
  • ViewKey Pair of a secret a and public b·G


  • Encryption and decryption methods Size of the extra encryption data required by the cipher: the nonce (12 bytes) and the tag (16 bytes)


  • Stealth Address The trait Ownable is required by any type that wants to prove its ownership.


  • Encryption and decryption methods Decrypts an encryption (nonce + ciphertext) given a shared DH secret key, returning the plaintext
  • Encryption and decryption methods Encrypts a plaintext given a shared DH secret key, returning a vector containing a nonce and the ciphertext (which includes the tag)
  • Hash function Hashes a JubJub’s ExtendedPoint into a JubJub’s Scalar using the JubJub’s hash to scalar function