diff options
author | tb <> | 2023-06-20 14:37:15 +0000 |
---|---|---|
committer | tb <> | 2023-06-20 14:37:15 +0000 |
commit | 881e5e429a492aa6258d74fbccd2cecc9365bbe6 (patch) | |
tree | 7614c65770f638c15252aa105b307fcceb0a847d /src/lib/libc | |
parent | 36448bd2de608113a3596f1a88aadd6438c160f6 (diff) | |
download | openbsd-881e5e429a492aa6258d74fbccd2cecc9365bbe6.tar.gz openbsd-881e5e429a492aa6258d74fbccd2cecc9365bbe6.tar.bz2 openbsd-881e5e429a492aa6258d74fbccd2cecc9365bbe6.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