pointMul

private fnPoint pointMul(Point P, BigInt s)

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. Both the addition and the "dummy" path execute, with the result selected via constant-time conditional copy.

Security

Note

This provides protection against simple timing

attacks. For maximum security, consider additional countermeasures such as scalar blinding. Scalar multiplication over a fixed 256-bit window.

Precondition: the scalar must be below 2^^256 - reduce modulo the group order L first (lossless, since every point involved has order L). This bound lets the ladder run a FIXED iteration count so the runtime cannot leak the scalar's bit length.