Closed notatestuser closed 5 years ago
The link you provided is parsing a signature in DER format.
This library does not use DER format. r and s will always be 32 bytes in this format.
In the DER format, the only time r or s will be 33 bytes will have the first byte as 0x00 for padding. So the format we use does not use or require that padding.
Please let me know if you have other questions.
Thanks for the explanation!
Why is this assertion made in
verify
?https://github.com/bitcoinjs/tiny-secp256k1/blob/29ca6ed28a1b9ba75f515451dc5f62c8bf334ec5/js.js#L67
In this example, the signature <r,s> is 65 bytes, where s is 33 bytes: https://bitcoin.stackexchange.com/a/34049