-
Notifications
You must be signed in to change notification settings - Fork 63
fix: der2raw sLength is s byte length #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Raw signature (also see ISO/IEC 7816-8 / IEEE P1363) are the static size concatenation of the r and s value. These values MUST be 0 padded to the correct length. This fixes the occasional `Invalid Signature` in browsers. This impacts ~1% of messages. These messages are valid and can now be decrypted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably because I am foolish, but if we could address some of the adjectives we are using, this will be a better read.
|
||
// Suite AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA512_COMMIT_KEY_ECDSA_P384 | ||
// prettier-ignore | ||
const derSigOnlySPadded = new Uint8Array([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only concerns me, as it raises confusion. Given all I know, I assume that derSigOnlySPadded is different from derSigSPadded, and the difference is that r = 0
, is that right? If not, what is the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like to delete vectors. How about numbers? derSigSPadded
derSigSPadded1
derSigSPadded2`?
) | ||
}) | ||
|
||
it('New vector S only padded', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor: I hate/despise New in a repo. It is New today, it is old tomorrow. Is there some other adjective we can use that possible addresses the Only comment above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra Groovy!
Raw signature (also see ISO/IEC 7816-8 / IEEE P1363)
are the static size concatenation of the r and s value.
These values MUST be 0 padded to the correct length.
This fixes the occasional
Invalid Signature
in browsers.This impacts ~1% of messages.
These messages are valid and can now be decrypted.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: