I'm in high school and writing a paper on the mathematics behind RSA encryption. I now have come to the point where I have to solve: $50^{61} \pmod{77}$ Then, as on https://math.berkeley.edu/~kpmann/encryption.pdf page#5, I found the binary expansion: $61 = 32 + 16 + 8 + 4 + 1$
Using binary expansion of $61$: $50^{61} = 50^{32+16+8+4+1}$ Using basic exponent rule: $50^{61} = 50^{32} \times 50^{16} \times 50^8 \times 50^4 \times 50^1$
.. Now I don't know how to continue. In the link I sent, if you go to page 5, they continue but the explanation is a bit confusing to me (bearing in mind their example uses different numbers to mine:
"Now since we only care about the result ($\mod{943}$), we can calculate all the parts of the product ($\mod{943}$). By repeated squaring of $545$, we can get all the exponents that are powers of $2$."
How do I do my calculations then?