Update spec#613
Conversation
* spec: First sha256 accelerator draft * Types checked * Update typst description * HWSLC -> HWSL * Apply suggestions from code review Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> Co-authored-by: Robin Jadoul <robin.jadoul@gmail.com> * preliminary changes after review * fix out_e carry check * rotxor with 2 fewer columns * Correct count of bytes for out range checks * Explicit tables for SHA256_K * whoops * cosmetic + explanation * Apply suggestions from code review Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> * Update spec/sha256.typ * Replace base_addr by entry in addr * review comments * structure * Apply suggestions from code review Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> * Update spec/sha256.typ Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> * spec/sha256: rebase fixes --------- Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> Co-authored-by: Erik Takke <erik.takke@3milabs.tech>
* spec: math/code render mod expr * spec/type_check: add ModExpr * spec: add multi-dimensional array support * spec/KECCAK: introduce v0 * spec/keccak: define padding * spec: support multidimensional array in signatures * spec/keccak: add signatures * spec/keccak: update core chip * spec/keccak: update keccak_rnd description * spec/keccak: define round constant lookup * Apply suggestions from code review Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * spec/keccak: clarify "optimizations" header * spec/keccak: list `state_ptr` simplification optimization * spec/keccak: fix C3 * spec/keccak: fix missing EOF * spec/keccak: list interaction counts * spec/keccak: list three-way XOR optimization idea * spec/tooling: fix mod_expr default * spec: add spaces round `%` rendering * spec: reuse `type_to_code` in `signatures.typ` * Apply suggestions from code review Co-authored-by: Robin Jadoul <robin.jadoul@gmail.com> * spec/keccak: update three-way XOR optimization benefits * spec/ecall: reintroduce ecall-number overview * spec/keccak: ref to sections in FIPS202 on state endianness * spec/keccak: fix typo --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Robin Jadoul <robin.jadoul@gmail.com>
* spec: Inline PC memory access into CPU * Apply suggestions from code review Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Robin Jadoul <robin.jadoul@gmail.com> * Apply review suggestion Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> * Remove `pc_double_read` constraints and clarify why in cpu.typ * Potential optimization -> subsubsection * Address review comments * Clarifying remark on register initialization --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com>
* Fix shiroa build - Strip raw blocks from chapter titles for `project` argument - Add an explicit description (based on chapter title) to chapters to avoid compilation issues when context appears early in the chapter - Export interaction counts from the pdf version to use in shiroa, since otherwise we run into convergence issues that are hard to debug * cd into script directory and harden against stale interaction counts * Update spec/book.typ Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com> * Fall back to single-threaded shiroa when insufficient memory --------- Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com>
* spec: Enable heading numbering for section references in shiroa * Remove explicit heading numbering from logup chapter
* spec/ARE_BYTES: introduce ARE_BYTES signature * spec/ARE_BYTES: introduce ARE_BYTES lookup * spec/ARE_BYTES: introduce IS_BYTE template * spec/ARE_BYTES: switch IS_BYTE lookup to IS_BYTE template * spec/ARE_BYTES: drop IS_BYTE interaction * spec/ARE_BYTES: drop IS_BYTE lookup signature * spec/ARE_BYTES: turn multiplicity into cond * spec/ARE_BYTES: remove as potential optimization * spec/ARE_BYTES: update assumptions using IS_BYTE
* spec/keccak: fix cyclic-shift indexing mistakes * spec/ecall: fix negative ECALL numbering * spec/keccak: optimize Cxz_right from Byte to Bit * spec/KECCAK: add potential optimization rot_left and rot_right contain 96 constant zero-columns, which can be dropped. Additionally, those zeroes do not have to be byte-checked. * spec/KECCAK: fix typo * spec/KECCAK: list another potential optimization * spec/keccak: fix index division problems * spec/keccak: remove condition from IS_BIT
Codex Code ReviewFound two issues in the PR diff:
I also ran the spec typechecker command: python3 spec/tooling/chip.py spec/src/config.toml spec/src/signatures.toml spec/src/*.tomlIt reports no issues, so these are semantic bugs the current checker does not catch. |
Review: Update spec (SHA256 + KECCAK accelerators)SummaryThis PR adds formal specification for two cryptographic accelerators (SHA256 and KECCAK permutation), introduces the Bugs1. [High] The polynomial for the second 2. [Medium] The MEMW output for reading register Nit
No issues found in
|
No description provided.