Skip to content

Fix vm.sign malleable recovery value - #589

Open
DicksonWu654 wants to merge 1 commit into
a16z:mainfrom
DicksonWu654:fix/vm-sign-recovery-bit
Open

Fix vm.sign malleable recovery value#589
DicksonWu654 wants to merge 1 commit into
a16z:mainfrom
DicksonWu654:fix/vm-sign-recovery-bit

Conversation

@DicksonWu654

Copy link
Copy Markdown

Summary

  • Toggle the malleable ECDSA recovery value between 27 and 28 with 55 - v.
  • Strengthen the existing signature regression to require a valid, opposite recovery value.
  • Keep the existing key, signature-range, and recovery constraints unchanged.

Rationale

The model constrains vm.sign recovery values to 27 or 28, but bitwise v ^ 1 maps them to 26 or 29. Those are not the alternate values in the 27/28 convention. Mapping 27↔28 correctly models the recovery-bit change paired with n - s.

Validation

  • Static diff/whitespace validation passed.
  • The regression expresses the expected toggle independently with a Solidity conditional and checks equal recovery.
  • Executable tests, builds, package-manager commands, and hooks were not run locally; repository CI is expected to provide executable validation.

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