Skip to content

Conversation

@twiss
Copy link
Member

@twiss twiss commented Jun 25, 2025

When verifying an ECDSA signature, properly specify how to convert the byte sequence to a pair of integers, which RFC 6090 requires, by referring to the Octet-String-to-Integer Conversion steps in RFC 6090.

If the signature is of an incorrect length, return false, as the web platform tests require and all implementations seem to do.

Similarly, when signing, refer to the Integer-to-Octet-String Conversion steps in RFC 6090 instead of specifying our own conversion from a byte sequence to an integer.

Also, refer to the proper sections for signing and verifying in RFC 6090. The subsections 5.4.2 and 5.4.3 refer to "KT-I signatures", which are equivalent to ECDSA signatures, while section 5.3 refers to "KT-IV signatures", which are encoded differently.

Finally, harmonize the parameter names with those specified in RFC 6090.

Fixes #404.


Preview | Diff

@twiss twiss merged commit 0326ba6 into main Jun 27, 2025
2 checks passed
@twiss twiss deleted the fix-ecdsa-spec branch June 27, 2025 11:05
github-actions bot added a commit that referenced this pull request Jun 27, 2025
SHA: 0326ba6
Reason: push, by twiss

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

ECDSA signature verification include derivation of s1 and s2

4 participants