Skip to content
This repository has been 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
merged 2 commits into from
Feb 4, 2020

Conversation

bradlhart
Copy link
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.

None yet

2 participants