]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Add bigint_msb_is_set() to clarify code
authorMichael Brown <mcb30@ipxe.org>
Thu, 7 Nov 2024 14:43:56 +0000 (14:43 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 20 Nov 2024 14:39:49 +0000 (14:39 +0000)
commitda6da6eb3b83fe92002e9c8e245933498ba19a48
treea5fce22e022b087771272aaa501abd5a7b2a7bf1
parente9a23a5b394f40c1525c40416105eaaa1787f749
[crypto] Add bigint_msb_is_set() to clarify code

Add a dedicated bigint_msb_is_set() to reduce the amount of open
coding required in the common case of testing the sign of a two's
complement big integer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/bigint.c
src/crypto/x25519.c
src/include/ipxe/bigint.h