diff options
author | jsing <> | 2023-03-07 09:42:09 +0000 |
---|---|---|
committer | jsing <> | 2023-03-07 09:42:09 +0000 |
commit | d0aa55ca89f010e114806ccd82c50fc6dd7f3bf0 (patch) | |
tree | 6beb93968da2e45fa402539d77324c8cfb9ca7aa /src/lib/libcrypto/ec/ec_oct.c | |
parent | 6b9c0e6e4905b3c5aac8c5bffd36699c8984596f (diff) | |
download | openbsd-d0aa55ca89f010e114806ccd82c50fc6dd7f3bf0.tar.gz openbsd-d0aa55ca89f010e114806ccd82c50fc6dd7f3bf0.tar.bz2 openbsd-d0aa55ca89f010e114806ccd82c50fc6dd7f3bf0.zip |
Improve bn_montgomery_multiply_words().
Rather than calling bn_mul_add_words() twice - once to multiply and once
to reduce - perform the multiplication and reduction in a single pass using
bn_mulw_addw_addw() directly. Also simplify the addition of the resulting
carries, which in turn allows us to avoid zeroing the top half of the
temporary words.
This provides a ~20-25% performance improvement for RSA operations on
aarch64.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/ec/ec_oct.c')
0 files changed, 0 insertions, 0 deletions