Crate phoenix_core
source ·Expand description
Phoenix’s Core library types and behaviors
Re-exports§
pub use crossover::Crossover;
pub use error::Error;
pub use fee::Fee;
pub use fee::Remainder;
pub use note::Note;
pub use note::NoteType;
Modules§
- Crossover Fee module contains the logic related to
Crossover
structure - Phoenix’s Core Errors
- Fee Fee module contains the logic related to
Fee
andRemainder
structure - Transparent and Obfuscated Notes
Structs§
- 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 pointR
. - ViewKey Pair of a secret
a
and publicb·G
Constants§
- Encryption and decryption methods Size of the extra encryption data required by the cipher: the nonce (12 bytes) and the tag (16 bytes)
Traits§
- Stealth Address The trait
Ownable
is required by any type that wants to prove its ownership.
Functions§
- 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