Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Version 2 cherry-picks #267

Merged
merged 3 commits into from
Oct 22, 2019
Merged

Version 2 cherry-picks #267

merged 3 commits into from
Oct 22, 2019

Conversation

csstaub
Copy link
Collaborator

@csstaub csstaub commented Oct 22, 2019

Cherry-picking bug fixes from master onto v2, for a v2.4.0 release, for #266.

csstaub and others added 3 commits October 21, 2019 20:19
Fixes issue #228. After calling ScalarMult for P-521, the output can
sometimes be 65 bytes long instead of 66 bytes. This happens when the
first bit of the computed value is zero. Calling z.Bytes() on the big
integer will then omit the leading zero, giving us a 65-byte value.

This subsequently causes the shared secret computation to be incorrect
as the input into the KDF function should always be 66 bytes which is
the full length for a P-521 coordinate value.
In #210 I introduced some error messages for incorrect octet string
length for X and Y. The error message for the public key case
incorrectly stated that it was for a private key.
@csstaub csstaub merged commit 8fd82ff into v2 Oct 22, 2019
@csstaub csstaub deleted the cs/v2 branch October 22, 2019 05:57
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.

3 participants