summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcoll.c
diff options
context:
space:
mode:
authortb <>2024-10-28 18:15:53 +0000
committertb <>2024-10-28 18:15:53 +0000
commit2243db3b6b45242d4410b17368cdaf34754cb467 (patch)
tree51d722ec88c22fc4d594e194da21676431b2a72a /src/lib/libc/string/strcoll.c
parent8b2e5bf09e9accf15f681cc6c756b79696be91b2 (diff)
downloadopenbsd-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/libc/string/strcoll.c')
0 files changed, 0 insertions, 0 deletions