I am reading the 1978 paper on RSA Algorithm. There is an example included in the paper and there is a section I can't get my head around.
It says:
Since $e = 10001$ in binary, the first block ($M = 920$) is enciphered: $M^{17} = (((((1)^2· M)^2)^2)^2)^2· M = 948 (mod 2773)$
What I don't understand is how e in binary has relevance to finding $M^{17}$ or why $M^{17}$ is written in that format. The paper can be found here https://people.csail.mit.edu/rivest/Rsapaper.pdf
$M^{17}$ is encoded as $(((M^2)^2)^2)^2\times M$ because it's faster that way. (I don't know why the $(1)^2$ is in there.)
The naive way of obtaining $M^{17}$ requires $16$ successive multiplications of $M$. By comparison, if you apply the square function to $M$ (and then its results) four times, you reduce the count to five times. If $M$ is large (encryption blocks are typically thousands of bits, and hence equivalent numbers in the high hundreds or low thousands of digits), this can save a significant amount of time over many encryptions.
This works primarily because $17$ is just one more than a power of $2$. If you picked $23$, say, which has the binary representation $10111$, you'd have to square four times, and then multiply three more times, for a total of seven multiplications. Not a lot more, but two more than you had to do.