Skip to content

Commit

Permalink
Bring back constants
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykoren committed May 20, 2024
1 parent b8bd2a1 commit 17046ee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ pub const MEMO_SIZE: usize = 512;
/// The size of the authentication tag used for note encryption.
pub const AEAD_TAG_SIZE: usize = 16;

/// The size of a compact note.
pub const COMPACT_NOTE_SIZE: usize = 1 + // version
11 + // diversifier
8 + // value
32; // rseed (or rcm prior to ZIP 212)
/// The size of [`NotePlaintextBytes`].
pub const NOTE_PLAINTEXT_SIZE: usize = COMPACT_NOTE_SIZE + 512;
/// The size of an encrypted note plaintext.
pub const ENC_CIPHERTEXT_SIZE: usize = NOTE_PLAINTEXT_SIZE + AEAD_TAG_SIZE;

/// The size of [`OutPlaintextBytes`].
pub const OUT_PLAINTEXT_SIZE: usize = 32 + // pk_d
32; // esk
Expand Down

0 comments on commit 17046ee

Please sign in to comment.