Skip to content

spec: ECSM affine ecall variant - #932

Open
nicole-graus wants to merge 2 commits into
spec/mainfrom
spec/ecsm-affine-selector
Open

spec: ECSM affine ecall variant#932
nicole-graus wants to merge 2 commits into
spec/mainfrom
spec/ecsm-affine-selector

Conversation

@nicole-graus

Copy link
Copy Markdown
Collaborator

Description

Specs the affine ECSM variant added in #879.

An is_affine selector lets one chip serve both ecalls: it picks the ECALL number the chip answers to, and gates the yG read (addr_xG + 32, at ts) and the yR write (addr_xR + 32, at ts + 3). Everything else is shared. Two checks come with it — the yG read pins the input point's parity, which becomes observable once yR is published, and yR < p forces the output canonical.

ECSM goes 37 → 42 variables, 708 → 757 columns.

Numbering change: the ecall number is now -11 - 2·id - is_affine, so secp256r1 moves from -12 to -13. #879 ships affine secp256k1 at -12, and secp256r1 has no implementation.

Not spec'd: #879's address-limb LT bounds. Those close a gap in ecsm.rs, which builds dword bases in the low limb only; the spec derives every address with a full 64-bit ADD.

@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

No issues found in the specified PR diff. The spec structure validator also passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant