# How to calculate a common encryption key between sender and receiver

In the picture below, for the text underlined in red color: 7X(MOD 11) = 72(MOD 11) =49(MOD 11)

My questions are:

(1) obviously there is no equal relationship between 72(MOD 11) and 49 (MOD 11), and where does 49 come from?

(2) X and Y are picked up randomly, are 7 and 7 in 7X and 11 in MOD 11 also picked up randomly, or is it some algorithm？ there is no any explanation in the textbook I have

(3) in the text marked in blue color, where does 2401 come from? (1) obviously there is no equal relationship between 72(MOD 11) and 49 (MOD 11), and where does 49 come from?

It's not $$72$$, it's $$7^2 = 7 \cdot 7 = 49$$.

(2) X and Y are picked up randomly, are 7 and 7 in 7X and 11 in MOD 11 also picked up randomly, or is it some algorithm？ there is no any explanation in the textbook I have.

No, they are not random. This is simply the Diffie-Hellman algorithm. 7 is the base (or generator) and 11 is the modulus. These are pre-established configuration parameters.

Of course, to be secure, they need to be a whole lot larger - about 2048 bits or higher for the modulus.

(3) in the text marked in blue color, where does 2401 come from?

Similar, this is bad printing, it's just $$7^4$$.

• Sorry, I'm in answering mode - should have left this for a newcomer. Aug 6, 2021 at 12:08
• it is very clear and thanks Aug 6, 2021 at 12:34
• You're welcome. By the way, if you use WolframAlpha and enter 2401 you get this page with the nice remark: "$2401 = 7^4$ is a perfect $4^{th}$ power." Aug 6, 2021 at 15:10