encrypt privateaccountkind instead of identifier

This commit is contained in:
Sergio Chouhy
2026-05-01 01:21:48 -03:00
parent 64a8ea5807
commit dd4670ab2f
25 changed files with 105 additions and 13 deletions
@@ -5,6 +5,7 @@ use std::{
use nssa_core::{
Commitment, CommitmentSetDigest, DUMMY_COMMITMENT_HASH, EncryptionScheme, Identifier,
PrivateAccountKind,
MembershipProof, Nullifier, NullifierPublicKey, NullifierSecretKey,
PrivacyPreservingCircuitInput, PrivacyPreservingCircuitOutput, SharedSecretKey,
account::{Account, AccountId, AccountWithMetadata, Nonce},
@@ -606,7 +607,7 @@ fn compute_circuit_output(
// Encrypt and push post state
let encrypted_account = EncryptionScheme::encrypt(
&post_with_updated_nonce,
*identifier,
&PrivateAccountKind::Account(*identifier),
shared_secret,
&commitment_post,
output_index,
@@ -690,7 +691,7 @@ fn compute_circuit_output(
let encrypted_account = EncryptionScheme::encrypt(
&post_with_updated_nonce,
*identifier,
&PrivateAccountKind::Account(*identifier),
shared_secret,
&commitment_post,
output_index,