mathinsight.org/exponentiation…
3 + 3 + 3 + 3 + 3 = 5 × 3
5 × 5 × 5 × 5 = 5⁴
4×7 = 7×4
Bob does the same, choosing 7 as his private random number, calculates 5⁷, and sends the resulting 78125 to Alice.
Bob calculates 625⁷and, because of the power-of-power rule, gets the same number as Alice.
- prime numbers
- factorization
- remainder (modulus) of division
(6+7)÷5 = 3
where '5' is the modulus of whatever math we are doing.
The first is that it makes calculation easier. The exponentiation we do for crypto would result in numbers so big that they couldn't otherwise be calculated or fit within computers.
5⁴= 625
She instead calculates:
5⁴ modulo 23 = 4
and sends Bob '4'. Bob calculates:
4⁷ modulo 23 = 8
So Bob goes to meet her at 8am.
5⁷ modulo 23 = 17
and sends Alice '17'. She calculates:
17⁴ modulo 23 = 8
And goes to meet Bob at 8am.
3 6 9 2 5 8 1 4 7 0
Each number appears exactly once