Conditionally swap the top nwords limbs (and top/neg) of two BIGNUMs in constant time.
Declared in <openssl/bn.h>
void
BN_consttime_swap(
unsigned long swap,
BIGNUM* a,
BIGNUM* b,
int nwords);
| Name | Description |
|---|---|
| swap | Non-zero to swap, or zero to leave a and b unchanged (must be 0 or 1). |
| a | First BIGNUM (must have at least nwords usable limbs). |
| b | Second BIGNUM (same size requirement as a). |
| nwords | Number of limbs to exchange. |