14 Commits

Author SHA1 Message Date
Robin Salen
0146f48a87
Cleanup 2023-04-08 14:30:26 -04:00
Robin Salen
99b0d0094c
Implement KeccakSpongeStark constraints 2023-04-08 14:30:25 -04:00
Daniel Lubarov
b8e97aaaf8 Fix logic and Keccak CTLs
Lots of little bugs!

- The Keccak sponge table's padding logic was wrong, it was mixing up the number of rows with the number of hashes.
- The Keccak sponge table's Keccak-looking data was wrong - input to Keccak-f should be after xor'ing in the block.
- The Keccak sponge table's logic-looking filter was wrong. We do 5 logic CTLs for any final-block row, even if some of the xors are with 0s from Keccak padding.
- The CPU was using the wrong/outdated output memory channel for its Keccak sponge and logic CTLs.
- The Keccak table just didn't have a way to filter out padding rows. I added a filter column for this.
- The Keccak table wasn't remembering the original preimage of a permutation; lookers were seeing the preimage of the final step. I added columns for the original preimage.
- `ctl_data_logic` was using the wrong memory channel
- Kernel bootloading generation was using the wrong length for its Keccak sponge CTL, and its `keccak_sponge_log` was seeing the wrong clock since it was called after adding the final bootloading row.
2022-12-19 15:42:59 -08:00
Daniel Lubarov
b8b2fefe52 Use Keccak sponge table for bootloading
And get rid of the deprecated Keccak memory table.
2022-12-03 11:21:31 -08:00
Daniel Lubarov
82d0f08193 clippies 2022-12-02 17:06:30 -08:00
Daniel Lubarov
9bf47ef8ac Fixes 2022-12-01 12:46:14 -08:00
Daniel Lubarov
d3aa33975a generate_keccak_general, generate_byte 2022-12-01 12:06:29 -08:00
Brandon H. Gomes
6fd0da216a
fix: remove unstable features from plonky2
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-02 17:50:31 -07:00
Daniel Lubarov
b6d71a7008 Keccak benchmark
And reworking things a bit to include the timing data we want.
2022-09-23 10:54:17 -07:00
Daniel Lubarov
496581cfa1 fix 2022-09-04 17:07:06 -07:00
Daniel Lubarov
46cf46ccd8 Minor 2022-09-04 16:56:17 -07:00
Daniel Lubarov
c9cfcecc9f Logic CTL for xor 2022-09-04 16:53:04 -07:00
Daniel Lubarov
d392ec04e7 Feedback 2022-09-03 23:02:06 -07:00
Daniel Lubarov
2c77247d43 Keccak sponge STARK
It contains a row for each absorb step of the sponge.
2022-09-01 09:41:19 -07:00