fix(aztec-nr): update aes128 encrypt_decrypt_deterministic mock for batched shared-secrets oracle#23387
Merged
Conversation
…atched shared-secrets oracle
nchamo
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
messages::encryption::aes128::test::encrypt_decrypt_deterministicstarted failing onmerge-train/fairieswith:(CI log: http://ci.aztec-labs.com/1779180119205688 — test log http://ci.aztec-labs.com/a175e0d0d44ab60f)
Cause
PR #23352 (
feat!: make get_shared_secrets batched oracle call) renamedaztec_utl_getSharedSecret→aztec_utl_getSharedSecrets(plural) and changed the return contract: the oracle now returns aFieldslot pointing at anEphemeralArray<Field>of per-key shared secrets, rather than returning the secret value directly.The
encrypt_decrypt_deterministictest innoir-projects/aztec-nr/aztec/src/messages/encryption/aes128.nrwas still mocking the old singular oracle name withOracleMock::mock("aztec_utl_getSharedSecret").returns(s_app). The new oracle is unmocked, so whenAES128::decryptcallsget_shared_secret(..)(which now wrapsget_shared_secrets), TXE falls through to its real implementation and rejects the hard-coded test recipient that has no registered public key.Fix
Mirror the pattern used by the new tests in
oracle/shared_secret.nr(mock_get_shared_secrets): pushs_appinto anEphemeralArray<Field>at a known slot and mockaztec_utl_getSharedSecretsto return that slot.Verification
nargo check --deny-warningsonnoir-projects/aztec-nrpasses after the change.ClaudeBox log: https://claudebox.work/s/45bbfbcfde746737?run=1