I am a student of computer science and I'm doing cryptography; I need to optimise the way I calculate modulus.
What I'am doing is like this:
$$14 \cdot 16 \equiv 3 \bmod 17$$
$$3 \cdot 16 \equiv 1 \bmod 17$$
My question is if that is true for all numbers.
My goal is to know if this is true so that once I calculate $14 \cdot 16 \equiv 3 \bmod 17$, I can derive the result of $3 \cdot 16 \bmod 17$ without doing all the work.
Also, Is this true for "power modulus"? I mean
if $a^d \equiv b \bmod{n}$, is $b^d \equiv a \bmod n $?