summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
authortb <>2024-10-22 21:06:16 +0000
committertb <>2024-10-22 21:06:16 +0000
commit0e8f02da5cba6c145d528b1887147781392b4d70 (patch)
tree3ac82763626783e1abca600aac6de1ce68b05723 /src/lib/libc
parentce4cdd7bfccc5f813dee8ea16e06ced908ec63e1 (diff)
downloadopenbsd-0e8f02da5cba6c145d528b1887147781392b4d70.tar.gz
openbsd-0e8f02da5cba6c145d528b1887147781392b4d70.tar.bz2
openbsd-0e8f02da5cba6c145d528b1887147781392b4d70.zip
Start cleaning up oct2point and point2oct
The SEC 1 standard defines various ways of encoding an elliptic curve point as ASN.1 octet string. It's also used for the public key, which isn't an octet string but a bit string for whatever historic reason. The public API is incomplete and inconvenient, so we need to jump through a few hoops to support it and to preserve our own sanity. Split a small helper function out of ec_GFp_simple_point2oct() that checks that a uint8_t represents a valid point conversion form. It supports exactly the four possible variants and helps translating from point_conversion_form_t at the API boundary. Reject the form for the point at infinity since the function has historically done that even for the case that the point actually is the point at infinity. ok jsing
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions