I watched this 2min video https://www.khanacademy.org/computing/computer-science/cryptography/modern-crypt/v/diffie-hellman-key-exchange-part-2 and I am struggling on understanding the proof in a comment (@Cameron) below.
Basically, the author firstly proves that:
- $(x * y) \mod z = (x \mod z) * (y \mod z) \mod z$
Then he uses this to prove $(3^b \mod 17)^a \mod 17 = 3^{(ba)} \mod 17$ .
But I just can't understand one of the steps and really doubt it:
He writes:
- $3^{(ba)} \mod 17 = 3^{(ba)} \mod 17$
- $3^{(ba)} \mod 17 = (3^{b(a-1)} * 3^b ) \mod 17$
- $3^{(ba)} \mod 17 = (3^{b(a-1)} \mod 17) * (3^b \mod 17) \mod 17$
- $3^{(ba)} \mod 17 = (3^{b(a-2)} * 3^b \mod 17) * (3^b \mod 17) \mod 17$
- $3^{(ba)} \mod 17 = (3^{b(a-2)} \mod 17) * (3^b \mod 17) * (3^b \mod 17) \mod 17$
From 4. to 5. ,
$(3^{b(a-2)} * 3^b \mod 17) * (3^b \mod 17) \mod 17$ should have decomposed to
$[(3^{b(a-2)} \mod 17) * (3^b \mod 17) \mod 17 ] * (3^b \mod 17) \mod 17$ .
I don't know why he drops the $\mod17$ and I think it can't be dropped.
I've been thinking this for hours and sorry if I didn't get the format right.
$signs. For example,$x^2$shows up as $x^2$. – saulspatz Jun 03 '21 at 14:213^a^b.That is usually taken to mean $3^{(a^b)}$ but here you want $(3^a)^b.$ – Thomas Andrews Jun 03 '21 at 14:25