diff options
author | tb <> | 2024-10-28 18:15:53 +0000 |
---|---|---|
committer | tb <> | 2024-10-28 18:15:53 +0000 |
commit | 2243db3b6b45242d4410b17368cdaf34754cb467 (patch) | |
tree | 51d722ec88c22fc4d594e194da21676431b2a72a /src/lib/libssl/tls13_handshake.c | |
parent | 8b2e5bf09e9accf15f681cc6c756b79696be91b2 (diff) | |
download | openbsd-2243db3b6b45242d4410b17368cdaf34754cb467.tar.gz openbsd-2243db3b6b45242d4410b17368cdaf34754cb467.tar.bz2 openbsd-2243db3b6b45242d4410b17368cdaf34754cb467.zip |
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 'src/lib/libssl/tls13_handshake.c')
0 files changed, 0 insertions, 0 deletions