0xPolygonZero / plonky2

Apache License 2.0
777 stars 289 forks source link

Remove `len` column in `KeccakSpongeStark` #1334

Closed LindaGuiga closed 1 year ago

LindaGuiga commented 1 year ago

We noticed that in KeccakSpongeStark, we are storing the len in an extra column and check that the final number of absorbed bytes is equal to the length, and that the length corresponds to the value in CpuStark. This should actually be doable without storing the length in KeccakSpongeStark: we can directly reconstruct it using already_absorbed_bytes and is_final_input_len, and then compare that linear combination to the value in CpuStark. This results in one less column in KeccakSpongeStark and fewer constraints in this PR.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information