Skip to content
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

Repair U32Table's Permutation Arguments #16

Closed
jan-ferdinand opened this issue Aug 8, 2022 · 3 comments
Closed

Repair U32Table's Permutation Arguments #16

jan-ferdinand opened this issue Aug 8, 2022 · 3 comments
Assignees
Labels
🖐 blocked Requires something else first. 🪳 bug Something is not working 🤖 code Changes the implementation 🔴 prio: high Pretty urgent

Comments

@jan-ferdinand
Copy link
Member

jan-ferdinand commented Aug 8, 2022

Currently, none of the 5 running products of the Permutation Arguments between the U32 Table and the Processor Table match up. Repair them.

Loosely relates to #8.

(Originally issue number 37 in the internal issue tracker.)

@jan-ferdinand jan-ferdinand added 🪳 bug Something is not working 🔴 prio: high Pretty urgent 🤖 code Changes the implementation labels Aug 8, 2022
@jan-ferdinand
Copy link
Member Author

I currently believe the issue to be due to the difference of updating the running products between the processor and the u32 coprocessor.

In the Processor Table, the running product of any u32 instruction – say, and – is updated if and only if the current instruction ci matches that instruction. If ci equals some other u32 instruction – say, lt – then the running product for and is not updated.

However, the U32 Table has no knowledge about the instruction thas was executed by the processor. All 5 running products are being updated whenever the indicator idc is 1. Naturally, this creates a discrepancy.

It is not a viable solution to simply update all running sums in the Processor Table whenever ci corresponds to any u32 instruction, since a malicious prover could swap the legitimate result of the instruction with that of some other u32 instruction, e.g., replace and(10, 11) = 10 with 01 = xor(10, 11).

It might be necessary to carry the current instruction over to the U32 Table.

Relates to #8 somewhat less loosely now.

@jan-ferdinand
Copy link
Member Author

Additionally, if the processor never executes any u32 instruction, the running product of any of the 5 Permutation Aguments will equal the respective (prover-chosen) initial in the Processor Table, whereas the U32 Table will have no rows. #10 fixes this.

jan-ferdinand added a commit that referenced this issue Aug 12, 2022
- the u32 table gets additional base column “current_instruction” `ci`
- the single permutation argument is conditional to `ci` and `idc`
- both involved tables have considerably fewer extension columns
- resolves the first half of #16
@jan-ferdinand
Copy link
Member Author

jan-ferdinand commented Aug 17, 2022

Closing in anticipation of #10.

@jan-ferdinand jan-ferdinand added the 🖐 blocked Requires something else first. label Aug 17, 2022
jan-ferdinand added a commit that referenced this issue Aug 17, 2022
Small caveat: if the processor never executes a u32 instruction, this
argument will fail. This artifact disappears once all tables are padded
to the same height.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖐 blocked Requires something else first. 🪳 bug Something is not working 🤖 code Changes the implementation 🔴 prio: high Pretty urgent
Projects
Status: Done
Development

No branches or pull requests

2 participants