[Public Key Cryptography: Diffie-Hellman Key Exchange (short version) - YouTube](https://www.youtube.com/watch?v=3QnD2c4Xovk)is a good video to understand asymmetric cryptography. There is a jump from 4:34 in the video that is not obvious to everyone.
The jump is from1654mod17to324×54mod17, but why? From the comments of video, I’m not the only one who is supprised by this jump.
First let me introduce a formula:
$$a^b\ mod \ p=((a \ mod \ p)^b) \ mod \ p \ \ \ \ (1)$$
Then the proof:
There must be one integer`n`to have
$$a \ mod \ p=a−np \ \ \ \ (2)$$
so
$$((a \ mod \ p)^b) \ mod \ p=((a−np)^b) \ mod \ p$$