limb count before swapping to ensure correct behavior.
Parameters
doSwap | Swap flag (0 = no swap, non-zero = swap). |
a | First BigInt (may be modified). |
b | Second BigInt (may be modified). |
Swaps two BigInt values conditionally in constant time.
This function swaps a and b if doSwap is non-zero, or leaves them unchanged if doSwap is 0. The operation is performed without branching to prevent timing leaks.
limb count before swapping to ensure correct behavior.
doSwap | Swap flag (0 = no swap, non-zero = swap). |
a | First BigInt (may be modified). |
b | Second BigInt (may be modified). |