Rewrite/simplify BN_from_montgomery_word() and BN_from_montgomery().
authorjsing <jsing@openbsd.org>
Tue, 28 Feb 2023 12:29:57 +0000 (12:29 +0000)
committerjsing <jsing@openbsd.org>
Tue, 28 Feb 2023 12:29:57 +0000 (12:29 +0000)
commit8c5f03ce6420095c3fb1f720f4787c38e7ace795
tree644311d5ea776960c37759c0abba9443fc0b94a4
parent50b5a752f56b56e236653f0da2264f2ec83f9fde
Rewrite/simplify BN_from_montgomery_word() and BN_from_montgomery().

Rename BN_from_montgomery_word() to bn_montgomery_reduce() and rewrite it
to be simpler and clearer, moving further towards constant time in the
process. Clean up BN_from_montgomery() in the process.

ok tb@
lib/libcrypto/bn/bn_mont.c