goas: don't expose nullifier nonce/commitment bytes

This commit is contained in:
David Rusu 2024-08-19 21:52:33 +04:00
parent 6862f291ef
commit e38b76e020
2 changed files with 3 additions and 3 deletions

View File

@ -232,7 +232,7 @@ mod tests {
let bind = OutputWitness::public(
NoteWitness::basic(32, *common::ZONE_CL_FUNDS_UNIT),
cl::NullifierNonce([0u8; 32]),
cl::NullifierNonce::random(&mut rng),
);
let mut alice = common::new_account(&mut rng);

View File

@ -25,13 +25,13 @@ pub struct NullifierSecret(pub [u8; 16]);
// can be provided to anyone wishing to transfer
// you a note
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct NullifierCommitment(pub [u8; 32]);
pub struct NullifierCommitment([u8; 32]);
// To allow users to maintain fewer nullifier secrets, we
// provide a nonce to differentiate notes controlled by the same
// secret. Each note is assigned a unique nullifier nonce.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct NullifierNonce(pub [u8; 32]);
pub struct NullifierNonce([u8; 32]);
// The nullifier attached to input notes to prove an input has not
// already been spent.