summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/_rand48.c
diff options
context:
space:
mode:
authortb <>2023-06-20 14:37:15 +0000
committertb <>2023-06-20 14:37:15 +0000
commit08fb80ce5491017764657645ae3cbf1cb1dca3bd (patch)
tree7614c65770f638c15252aa105b307fcceb0a847d /src/lib/libc/stdlib/_rand48.c
parenta7641133988eb74a1505ddbdd5ef7d3cae70b041 (diff)
downloadopenbsd-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/stdlib/_rand48.c')
0 files changed, 0 insertions, 0 deletions