Rewrite BN_lshift()
authorjsing <jsing@openbsd.org>
Tue, 10 Jan 2023 04:13:22 +0000 (04:13 +0000)
committerjsing <jsing@openbsd.org>
Tue, 10 Jan 2023 04:13:22 +0000 (04:13 +0000)
commitb331d0d1dc6820ac847618d48c582829a2d93615
tree7fe303d7a2349611b24158bc45d030f9352fe38d
parentc2cbc5b2d858c1549980a6bf2d5f58efa041f1e2
Rewrite BN_lshift()

This improves readability and eliminates special handling for various
cases, making the code cleaner and closer to constant time. Basic
benchmarking shows a performance gain on modern 64 bit architectures.

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