feat!: make AES128 decrypt oracle return Option#21696
Merged
nventuro merged 3 commits intomerge-train/fairiesfrom Mar 17, 2026
Merged
feat!: make AES128 decrypt oracle return Option#21696nventuro merged 3 commits intomerge-train/fairiesfrom
nventuro merged 3 commits intomerge-train/fairiesfrom
Conversation
nventuro
reviewed
Mar 17, 2026
| ): Promise<(ACVMField | ACVMField[])[]> => | ||
| oracle.aztec_utl_aes128Decrypt(ciphertextBVecStorage, ciphertextLength, iv, symKey), | ||
| ): Promise<(ACVMField | ACVMField[])[]> => { | ||
| // Strip the Option wrapper: new oracle returns [some, storage, length], legacy callers expect [storage, length]. |
Contributor
There was a problem hiding this comment.
It'd be good to explain that the old oracle received a bounded vec and that we're now returning an option.
Is this oracle part of the legacy set though? I don't think any protocol or standard contract does decryptino of any kind.
Contributor
Author
There was a problem hiding this comment.
You are right, it wasn't being used. I don't know how I missed it during my last review. Will delete it then
| try_aes128_decrypt(header_ciphertext_bvec, header_iv, header_sym_key) | ||
| // Extract ciphertext length from header (2 bytes, big-endian) | ||
| extract_ciphertext_length(header_plaintext) | ||
| .and_then(|header_plaintext| extract_ciphertext_length(header_plaintext)) |
Contributor
There was a problem hiding this comment.
Shame that we get no warnings here no?
Contributor
Author
There was a problem hiding this comment.
nventuro
approved these changes
Mar 17, 2026
Collaborator
|
❌ Failed to cherry-pick to |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
BEGIN_COMMIT_OVERRIDE fix(stdlib): accept null return_type for void Noir functions (#21647) feat!: make AES128 decrypt oracle return Option (#21696) fix(aztec-nr): fix OOB index with nonzero offset (#21613) feat!: include init_hash in private initialization nullifier to prevent privacy leak (#21427) END_COMMIT_OVERRIDE
2 tasks
nchamo
pushed a commit
that referenced
this pull request
Mar 18, 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
aztec_utl_aes128Decrypttoaztec_utl_tryAes128Decrypt, returningOption<BoundedVec<u8, N>>instead ofBoundedVec<u8, N>Option::none()instead of crashing the processutilityAes128Decryptmapping to strip the Option wrapper and re-throw on failure (preserving old error semantics for pinned contracts)Fixes F-452