diff options
author | tb <> | 2023-06-20 14:37:15 +0000 |
---|---|---|
committer | tb <> | 2023-06-20 14:37:15 +0000 |
commit | 08fb80ce5491017764657645ae3cbf1cb1dca3bd (patch) | |
tree | 7614c65770f638c15252aa105b307fcceb0a847d /src/lib/libc | |
parent | a7641133988eb74a1505ddbdd5ef7d3cae70b041 (diff) | |
download | openbsd-08fb80ce5491017764657645ae3cbf1cb1dca3bd.tar.gz openbsd-08fb80ce5491017764657645ae3cbf1cb1dca3bd.tar.bz2 openbsd-08fb80ce5491017764657645ae3cbf1cb1dca3bd.zip |
Consolidate elliptic curve cofactor handling
The various checks of the cofactor to be set in EC_GROUP_set_generator()
are a bit all over the place. Move them into a single function and clean
things up a little. Instead of calculating directly with the cofactor
member of the group, use a temporary variable and copy this variable only
if all tests passed. In cryptographic contexts the cofactor almost always
fits if not into a single byte then into a word, so copying is cheap.
Also streamline the computations a bit and remove some binary curve
contortions.
ok jsing
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions