-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leak(PartialNotes): use different randomness for sponsored user and fee recipient in PrivateToken #7321
Labels
Comments
LHerskind
changed the title
use different randomness for sponsored user and fee recipient in PrivateToken
leak(PartialNotes): use different randomness for sponsored user and fee recipient in PrivateToken
Jul 5, 2024
LHerskind
added
T-bug
Type: Bug. Something is broken.
A-privacy-leakage
Area: Relates to privacy leakage.
labels
Jul 5, 2024
rahul-kothari
pushed a commit
that referenced
this issue
Jul 9, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.46.0</summary> ## [0.46.0](aztec-package-v0.45.1...aztec-package-v0.46.0) (2024-07-09) ### Features * VK tree ([#6914](#6914)) ([8631237](8631237)) </details> <details><summary>barretenberg.js: 0.46.0</summary> ## [0.46.0](barretenberg.js-v0.45.1...barretenberg.js-v0.46.0) (2024-07-09) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.46.0</summary> ## [0.46.0](aztec-packages-v0.45.1...aztec-packages-v0.46.0) (2024-07-09) ### ⚠ BREAKING CHANGES * constant inputs for blackbox ([#7222](#7222)) ### Features * Add more slice methods to the stdlib (noir-lang/noir#5424) ([6137a10](6137a10)) * Constant inputs for blackbox ([#7222](#7222)) ([9f9ded2](9f9ded2)) * Detect subgraphs that are completely independent from inputs or outputs (noir-lang/noir#5402) ([c7b1ae4](c7b1ae4)) * Lsp "go to definition" for modules (noir-lang/noir#5406) ([c7b1ae4](c7b1ae4)) * Lsp rename/find-all-references for traits (noir-lang/noir#5409) ([c7b1ae4](c7b1ae4)) * Lsp rename/find-all-references for type aliases (noir-lang/noir#5414) ([6137a10](6137a10)) * Sync from aztec-packages (noir-lang/noir#5408) ([c7b1ae4](c7b1ae4)) * Sync from aztec-packages (noir-lang/noir#5432) ([6137a10](6137a10)) * TXE docs and usability ([#7305](#7305)) ([6b2a351](6b2a351)) * Unquote multiple items from annotations (noir-lang/noir#5441) ([6137a10](6137a10)) * VK tree ([#6914](#6914)) ([8631237](8631237)) ### Bug Fixes * Allow importing notes from other contracts and inject them in the macros ([#7349](#7349)) ([586c0b0](586c0b0)) * Change panic to error in interpreter (noir-lang/noir#5446) ([6137a10](6137a10)) * Complete call stacks with no_predicates (noir-lang/noir#5418) ([c7b1ae4](c7b1ae4)) * Correct range for overlfowing/underflowing integer assignment (noir-lang/noir#5416) ([c7b1ae4](c7b1ae4)) * Included argshash computation in public call_interfaces and cleanup ([#7354](#7354)) ([13e9b94](13e9b94)) * Lsp find struct reference in return locations and paths (noir-lang/noir#5404) ([c7b1ae4](c7b1ae4)) * Lsp struct rename/reference difference (noir-lang/noir#5411) ([6137a10](6137a10)) * Privacy leak in private refund ([#7358](#7358)) ([e05f6f0](e05f6f0)), closes [#7321](#7321) ### Miscellaneous * Add remaining slice methods to the interpreter (noir-lang/noir#5422) ([c7b1ae4](c7b1ae4)) * Add test and benchmarks for poseidon2 (noir-lang/noir#5386) ([c7b1ae4](c7b1ae4)) * **avm:** Avoid including flavor where possible ([#7361](#7361)) ([dbdffd6](dbdffd6)) * **avm:** Better log_derivative_inverse_round ([#7360](#7360)) ([6329833](6329833)) * **avm:** Smaller prover ([#7359](#7359)) ([7d8c833](7d8c833)) * **avm:** Smaller transcript ([#7357](#7357)) ([3952a44](3952a44)) * **bb:** Do not instantiate Relation ([#7389](#7389)) ([d9cbf4c](d9cbf4c)) * Counters ([#7342](#7342)) ([819f370](819f370)) * **docs:** Fix link to docker ([#7395](#7395)) ([ad4a401](ad4a401)) * **docs:** Update token tutorial ([#7241](#7241)) ([0414eb5](0414eb5)) * Dummy workflow (noir-lang/noir#5438) ([6137a10](6137a10)) * Extracts refactoring of reading error payloads from [#5403](#5403) (noir-lang/noir#5413) ([6137a10](6137a10)) * Generate declaration files for VKs ([#7391](#7391)) ([7c96636](7c96636)) * Merge `BarretenbergVerifierBackend` and `BarretenbergBackend` (noir-lang/noir#5399) ([6137a10](6137a10)) * Move SSA checks to a new folder (noir-lang/noir#5434) ([6137a10](6137a10)) * Notify Noir team on changes to the stdlib ([#7387](#7387)) ([061aac3](061aac3)) * Optimize private call stack item hash for gate count ([#7285](#7285)) ([783d9b6](783d9b6)) * Optimize public call stack item hashing ([#7330](#7330)) ([4a5093c](4a5093c)) * Refactor logic around inlining `no_predicates` functions (noir-lang/noir#5433) ([6137a10](6137a10)) * Replace relative paths to noir-protocol-circuits ([8510269](8510269)) * Replace relative paths to noir-protocol-circuits ([9eb8d1c](9eb8d1c)) * Sync external contributions ([#6984](#6984)) ([a265b29](a265b29)) ### Documentation * Making private refunds smooth-brain friendly ([#7343](#7343)) ([533c937](533c937)) * Update overview.md (fix link text) ([#7344](#7344)) ([79e5856](79e5856)) </details> <details><summary>barretenberg: 0.46.0</summary> ## [0.46.0](barretenberg-v0.45.1...barretenberg-v0.46.0) (2024-07-09) ### ⚠ BREAKING CHANGES * constant inputs for blackbox ([#7222](#7222)) ### Features * Constant inputs for blackbox ([#7222](#7222)) ([9f9ded2](9f9ded2)) ### Miscellaneous * **avm:** Avoid including flavor where possible ([#7361](#7361)) ([dbdffd6](dbdffd6)) * **avm:** Better log_derivative_inverse_round ([#7360](#7360)) ([6329833](6329833)) * **avm:** Smaller prover ([#7359](#7359)) ([7d8c833](7d8c833)) * **avm:** Smaller transcript ([#7357](#7357)) ([3952a44](3952a44)) * **bb:** Do not instantiate Relation ([#7389](#7389)) ([d9cbf4c](d9cbf4c)) * Counters ([#7342](#7342)) ([819f370](819f370)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
AztecBot
added a commit
to AztecProtocol/barretenberg
that referenced
this issue
Jul 10, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.46.0</summary> ## [0.46.0](AztecProtocol/aztec-packages@aztec-package-v0.45.1...aztec-package-v0.46.0) (2024-07-09) ### Features * VK tree ([#6914](AztecProtocol/aztec-packages#6914)) ([8631237](AztecProtocol/aztec-packages@8631237)) </details> <details><summary>barretenberg.js: 0.46.0</summary> ## [0.46.0](AztecProtocol/aztec-packages@barretenberg.js-v0.45.1...barretenberg.js-v0.46.0) (2024-07-09) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.46.0</summary> ## [0.46.0](AztecProtocol/aztec-packages@aztec-packages-v0.45.1...aztec-packages-v0.46.0) (2024-07-09) ### ⚠ BREAKING CHANGES * constant inputs for blackbox ([#7222](AztecProtocol/aztec-packages#7222)) ### Features * Add more slice methods to the stdlib (noir-lang/noir#5424) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Constant inputs for blackbox ([#7222](AztecProtocol/aztec-packages#7222)) ([9f9ded2](AztecProtocol/aztec-packages@9f9ded2)) * Detect subgraphs that are completely independent from inputs or outputs (noir-lang/noir#5402) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Lsp "go to definition" for modules (noir-lang/noir#5406) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Lsp rename/find-all-references for traits (noir-lang/noir#5409) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Lsp rename/find-all-references for type aliases (noir-lang/noir#5414) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Sync from aztec-packages (noir-lang/noir#5408) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Sync from aztec-packages (noir-lang/noir#5432) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * TXE docs and usability ([#7305](AztecProtocol/aztec-packages#7305)) ([6b2a351](AztecProtocol/aztec-packages@6b2a351)) * Unquote multiple items from annotations (noir-lang/noir#5441) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * VK tree ([#6914](AztecProtocol/aztec-packages#6914)) ([8631237](AztecProtocol/aztec-packages@8631237)) ### Bug Fixes * Allow importing notes from other contracts and inject them in the macros ([#7349](AztecProtocol/aztec-packages#7349)) ([586c0b0](AztecProtocol/aztec-packages@586c0b0)) * Change panic to error in interpreter (noir-lang/noir#5446) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Complete call stacks with no_predicates (noir-lang/noir#5418) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Correct range for overlfowing/underflowing integer assignment (noir-lang/noir#5416) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Included argshash computation in public call_interfaces and cleanup ([#7354](AztecProtocol/aztec-packages#7354)) ([13e9b94](AztecProtocol/aztec-packages@13e9b94)) * Lsp find struct reference in return locations and paths (noir-lang/noir#5404) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Lsp struct rename/reference difference (noir-lang/noir#5411) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Privacy leak in private refund ([#7358](AztecProtocol/aztec-packages#7358)) ([e05f6f0](AztecProtocol/aztec-packages@e05f6f0)), closes [#7321](AztecProtocol/aztec-packages#7321) ### Miscellaneous * Add remaining slice methods to the interpreter (noir-lang/noir#5422) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * Add test and benchmarks for poseidon2 (noir-lang/noir#5386) ([c7b1ae4](AztecProtocol/aztec-packages@c7b1ae4)) * **avm:** Avoid including flavor where possible ([#7361](AztecProtocol/aztec-packages#7361)) ([dbdffd6](AztecProtocol/aztec-packages@dbdffd6)) * **avm:** Better log_derivative_inverse_round ([#7360](AztecProtocol/aztec-packages#7360)) ([6329833](AztecProtocol/aztec-packages@6329833)) * **avm:** Smaller prover ([#7359](AztecProtocol/aztec-packages#7359)) ([7d8c833](AztecProtocol/aztec-packages@7d8c833)) * **avm:** Smaller transcript ([#7357](AztecProtocol/aztec-packages#7357)) ([3952a44](AztecProtocol/aztec-packages@3952a44)) * **bb:** Do not instantiate Relation ([#7389](AztecProtocol/aztec-packages#7389)) ([d9cbf4c](AztecProtocol/aztec-packages@d9cbf4c)) * Counters ([#7342](AztecProtocol/aztec-packages#7342)) ([819f370](AztecProtocol/aztec-packages@819f370)) * **docs:** Fix link to docker ([#7395](AztecProtocol/aztec-packages#7395)) ([ad4a401](AztecProtocol/aztec-packages@ad4a401)) * **docs:** Update token tutorial ([#7241](AztecProtocol/aztec-packages#7241)) ([0414eb5](AztecProtocol/aztec-packages@0414eb5)) * Dummy workflow (noir-lang/noir#5438) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Extracts refactoring of reading error payloads from [#5403](AztecProtocol/aztec-packages#5403) (noir-lang/noir#5413) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Generate declaration files for VKs ([#7391](AztecProtocol/aztec-packages#7391)) ([7c96636](AztecProtocol/aztec-packages@7c96636)) * Merge `BarretenbergVerifierBackend` and `BarretenbergBackend` (noir-lang/noir#5399) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Move SSA checks to a new folder (noir-lang/noir#5434) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Notify Noir team on changes to the stdlib ([#7387](AztecProtocol/aztec-packages#7387)) ([061aac3](AztecProtocol/aztec-packages@061aac3)) * Optimize private call stack item hash for gate count ([#7285](AztecProtocol/aztec-packages#7285)) ([783d9b6](AztecProtocol/aztec-packages@783d9b6)) * Optimize public call stack item hashing ([#7330](AztecProtocol/aztec-packages#7330)) ([4a5093c](AztecProtocol/aztec-packages@4a5093c)) * Refactor logic around inlining `no_predicates` functions (noir-lang/noir#5433) ([6137a10](AztecProtocol/aztec-packages@6137a10)) * Replace relative paths to noir-protocol-circuits ([8510269](AztecProtocol/aztec-packages@8510269)) * Replace relative paths to noir-protocol-circuits ([9eb8d1c](AztecProtocol/aztec-packages@9eb8d1c)) * Sync external contributions ([#6984](AztecProtocol/aztec-packages#6984)) ([a265b29](AztecProtocol/aztec-packages@a265b29)) ### Documentation * Making private refunds smooth-brain friendly ([#7343](AztecProtocol/aztec-packages#7343)) ([533c937](AztecProtocol/aztec-packages@533c937)) * Update overview.md (fix link text) ([#7344](AztecProtocol/aztec-packages#7344)) ([79e5856](AztecProtocol/aztec-packages@79e5856)) </details> <details><summary>barretenberg: 0.46.0</summary> ## [0.46.0](AztecProtocol/aztec-packages@barretenberg-v0.45.1...barretenberg-v0.46.0) (2024-07-09) ### ⚠ BREAKING CHANGES * constant inputs for blackbox ([#7222](AztecProtocol/aztec-packages#7222)) ### Features * Constant inputs for blackbox ([#7222](AztecProtocol/aztec-packages#7222)) ([9f9ded2](AztecProtocol/aztec-packages@9f9ded2)) ### Miscellaneous * **avm:** Avoid including flavor where possible ([#7361](AztecProtocol/aztec-packages#7361)) ([dbdffd6](AztecProtocol/aztec-packages@dbdffd6)) * **avm:** Better log_derivative_inverse_round ([#7360](AztecProtocol/aztec-packages#7360)) ([6329833](AztecProtocol/aztec-packages@6329833)) * **avm:** Smaller prover ([#7359](AztecProtocol/aztec-packages#7359)) ([7d8c833](AztecProtocol/aztec-packages@7d8c833)) * **avm:** Smaller transcript ([#7357](AztecProtocol/aztec-packages#7357)) ([3952a44](AztecProtocol/aztec-packages@3952a44)) * **bb:** Do not instantiate Relation ([#7389](AztecProtocol/aztec-packages#7389)) ([d9cbf4c](AztecProtocol/aztec-packages@d9cbf4c)) * Counters ([#7342](AztecProtocol/aztec-packages#7342)) ([819f370](AztecProtocol/aztec-packages@819f370)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Presently in PrivateToken, Alice (the sponsored user) provides a nonce (needs to be renamed to
randomness
) that we jam into the notes that get created for both her and Bob (the fee recipient, also the FPC admin).To ensure the randomness is actually random, we emit it as a nullifier.
That's bad though because we're also emitting the nonce as an unencrypted log so that Bob can recreate his note preimage after the transaction. (Yes, we could encrypt it for Bob, but he'd prefer we choose the cheaper route since he's paying for it).
However, we are passing a point to public that is
(bob_npk + nonce)*G
and(funded_amount + alice_npk + nonce)*G
.That might look all well and fine, but we're probably going to need to pass
funded_amount
into public so the FPC can be confident that it isn't getting short-changed (e.g. Alice funds 100 bananas, but that is only, 10 AZT, and hertransaction_fee
is 20AZT).Once that happens an observer will be able to compute
nonce*G
sincebob_npk
is public, andfunded_amount * G
, and arrive atalice_npk * G
, which they can use as a fingerprint on Alice.This is solved if we just use a different nonce for Bob. Further, we want to make it so that the thing we emit as an unencrypted log can't be subsequently used to invalidate users' transactions by watching the mempool, seeing the log come out, and immediately submitting a TX that uses that nonce.
So we want alice's nonce/randomness to be the one she supplies. Then we want to compute a new nonce/randomness for Bob as
hash(alice_nonce, alice_npk)
.That randomness should get emitted as an unencrypted log and a nullifier, and used as the randomness for Bob's point.
The text was updated successfully, but these errors were encountered: