fix: app-silo getSharedSecret oracle to prevent cross-contract decryption#22000
Closed
benesjan wants to merge 1 commit into
Closed
fix: app-silo getSharedSecret oracle to prevent cross-contract decryption#22000benesjan wants to merge 1 commit into
benesjan wants to merge 1 commit into
Conversation
…tion The getSharedSecret oracle was not app-siloed, meaning a malicious contract could call it with any ephemeral public key and obtain the raw ECDH shared secret. This allowed cross-contract decryption of encrypted messages. Now the oracle returns an app-siloed scalar `s_app = h(DOM_SEP, S.x, S.y, contract)` instead of the raw shared secret point. Callers derive indexed randomness from s_app via `derive_shared_secret_randomness`. The AES128 encryption helpers and note delivery code are updated to use the new derivation pattern. Closes F-477 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
This was done in #22020 |
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
getSharedSecretoracle so it returnss_app = h(DOM_SEP, S.x, S.y, contract)instead of the raw ECDH shared secret point, preventing cross-contract decryption attacks.compute_app_siloed_shared_secretandderive_shared_secret_randomnesshelpers for a unified derivation pattern.Closes https://linear.app/aztec-labs/issue/F-477/getsharedsecret-isnt-app-siloed
Test plan
🤖 Generated with Claude Code