Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Zero padding Signature r-value/s-value to 32 bytes (release/21.0.x branch)#668

Merged
bradlhart merged 2 commits intorelease/21.0.xfrom
signature-s-32-bytes
Feb 4, 2020
Merged

Zero padding Signature r-value/s-value to 32 bytes (release/21.0.x branch)#668
bradlhart merged 2 commits intorelease/21.0.xfrom
signature-s-32-bytes

Conversation

@bradlhart
Copy link
Copy Markdown
Contributor

Change Description

With the current v21 release candidate, signatures that have less than 32 byte r or s values will generate signatures with lengths less than the 65 bytes necessary. The r and s need to be zero padded to resolve this issue. The elliptic library uses bn.js for the r and s values and the .toArray operation has a length argument with the purpose of zero padding the value to the length.

Second PR to cherry pick commits to release/21.0.x branch

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@bradlhart bradlhart merged commit 36bac5a into release/21.0.x Feb 4, 2020
@bradlhart bradlhart deleted the signature-s-32-bytes branch February 4, 2020 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants