summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto_init.c
diff options
context:
space:
mode:
authortb <>2024-10-14 12:50:18 +0000
committertb <>2024-10-14 12:50:18 +0000
commit944081508145000d140f6461e8f2efdf04ed7811 (patch)
tree1776acd39512a7f602594853b647fccf38b8be8b /src/lib/libcrypto/crypto_init.c
parentb08221f197c82d2468c03a72d96d55f2bc71bd3a (diff)
downloadopenbsd-944081508145000d140f6461e8f2efdf04ed7811.tar.gz
openbsd-944081508145000d140f6461e8f2efdf04ed7811.tar.bz2
openbsd-944081508145000d140f6461e8f2efdf04ed7811.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/libcrypto/crypto_init.c')
0 files changed, 0 insertions, 0 deletions