summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-10-28 18:15:54 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-10-28 18:15:54 +0000
commitfd25ce7cf5038c98b96a270e0c48c11e9ca0dc83 (patch)
tree96d18403b21a0e6224902c3f923d731ff9b607f3 /share
parent99c08b5b5f30cab550fbe1723f00c6010b7032c4 (diff)
Fix private key encoding in i2d_ECPrivateKey()
The private key is a random integer between 1 and order - 1. As such it requires at most as many bytes as the order to encode. SEC 1, Section C.4 is very explicit about padding it to this length: The component privateKey is the private key defined to be the octet string of length [ceil(log_2 n/8)] (where n is the order of the curve) obtained from the unsigned integer via the encoding of Section 2.3.7. Fix this by generalizing a similar fix for field elements. ok jsing
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions