summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cryptlib.c
diff options
context:
space:
mode:
authortb <>2024-11-02 09:21:04 +0000
committertb <>2024-11-02 09:21:04 +0000
commitb5e79cb0c7e63e52ff53937b6156d4525d360b34 (patch)
tree21c0cdcf944a9def5acf5c52f126ad2b8e696828 /src/lib/libcrypto/cryptlib.c
parent5567406332339692172e16ae341f814c8f5e76f1 (diff)
downloadopenbsd-b5e79cb0c7e63e52ff53937b6156d4525d360b34.tar.gz
openbsd-b5e79cb0c7e63e52ff53937b6156d4525d360b34.tar.bz2
openbsd-b5e79cb0c7e63e52ff53937b6156d4525d360b34.zip
Rewrite/clean up ec_GFp_simple_set_compressed_coordinates()
The biggest change here is that the computation is now performed in the Montgomery domain if we have a Montgomery curve. This avoids constant checking whether need to use plain field operations or whether we can use curve-specific ones. Use a few better variable names and stop attempting to figure out whether the operation failed due to an error in BN_mod_sqrt() or a bad point. All in all this only shaves off 10 lines, but it is astounding what a few tweaks can do to code that looked like Rome in 455 AD. with/ok jsing
Diffstat (limited to 'src/lib/libcrypto/cryptlib.c')
0 files changed, 0 insertions, 0 deletions