pointMul

fnPoint pointMul(Point P, BigInt k, BigInt mod, BigInt a)

Constant-time scalar multiplication using double-and-add-always.

This implementation performs the same sequence of operations regardless of the scalar bits, preventing timing side-channel attacks. This is critical for ECDSA signing where k is a secret nonce.

Security

Note

Both the addition and the "dummy" path execute,

with the result selected via constant-time conditional selection.