Skip to content

Update keccak HWSL constraints to equivalent arith constraints - #873

Merged
RobinJadoul merged 3 commits into
spec/mainfrom
spec/keccak-hwsl
Jul 31, 2026
Merged

Update keccak HWSL constraints to equivalent arith constraints#873
RobinJadoul merged 3 commits into
spec/mainfrom
spec/keccak-hwsl

Conversation

@RobinJadoul

Copy link
Copy Markdown
Collaborator

Bringing the findings from #860 cleanly into the spec

@RobinJadoul
RobinJadoul requested a review from erik-3milabs July 28, 2026 16:01
@RobinJadoul RobinJadoul self-assigned this Jul 28, 2026
@RobinJadoul RobinJadoul added the spec Updates and improvements to the spec document label Jul 28, 2026
@github-actions

Copy link
Copy Markdown

Kimi Code Review

⚠️ Review failed: Kimi API request failed with status 401


Automated review by Kimi (Moonshot AI)

@github-actions

Copy link
Copy Markdown

Codex Code Review

  • Medium – Constant exponents are incorrectly validated as zero (chip.py): Every constant variable is inserted into valmap as zero. Consequently, 2^rnc[x][y] is type-checked as 2^0, masking the non-literal exponent instead of validating the actual fixed value. This can allow invalid constraint expressions to pass. Populate real constants or explicitly support symbolic fixed-column exponents.

  • Low – Chip.typecheck() depends on an unrelated global (chip.py): Environment(config, ...) references the CLI-only global config; imported/library use raises NameError. Use self.config.

Comment thread spec/src/keccak_round.toml Outdated
Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com>
@RobinJadoul
RobinJadoul merged commit d397668 into spec/main Jul 31, 2026
2 checks passed
@RobinJadoul
RobinJadoul deleted the spec/keccak-hwsl branch July 31, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec Updates and improvements to the spec document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants