Double and Broken
A classic example in timing/power analysis of multiplication algorithms. This boils down to how the double-and-add algorithm is implemented, and bears great resemblance to the square-and-multiply method. The following is the pseudocode for the algorithm of computing $sP$, where $P$ is the given point and $s$ is the number we want to multiply. 1 2 3 4 5 6 7 8 let bits = bit_representation(s) # the vector of bits (from LSB to MSB) representing s let res = O # point at infinity let temp = P # track doubled P value for bit in bits: if bit == 1: res = res + temp # point add temp = temp + temp return res We can clearly see that if the if branch is taken, an additional addition step is taken....