summaryrefslogtreecommitdiff
path: root/src/lib/libc/string
diff options
context:
space:
mode:
authortb <>2024-10-14 12:50:18 +0000
committertb <>2024-10-14 12:50:18 +0000
commiteed149b404574c0b530d9a1504778f70e207eb9e (patch)
tree1776acd39512a7f602594853b647fccf38b8be8b /src/lib/libc/string
parent232952b737a80765ddc649d2c2f57e620853cf92 (diff)
downloadopenbsd-eed149b404574c0b530d9a1504778f70e207eb9e.tar.gz
openbsd-eed149b404574c0b530d9a1504778f70e207eb9e.tar.bz2
openbsd-eed149b404574c0b530d9a1504778f70e207eb9e.zip
Fix field element encoding for elliptic curve coefficients
SEC 1, section 2.3.5, is explicit that the encoding of an element of the field of definition for an elliptic curve needs to be a zero-padded octet string whose length matches the byte size of the field's degree. So use BN_bn2binpad() to fix this. Factor things into a simple helper to avoid copy-pasting. This gets rid of some of the most grotesque code in this file. ok jsing
Diffstat (limited to 'src/lib/libc/string')
0 files changed, 0 insertions, 0 deletions