← Back to the chapter · Next detail →

Technical detail · IoT Mathematics: Linear Algebra and Probability

Forward powers and the discrete logarithm

Example - Discrete Logarithm:

Given: g=5g = 5, p=23p = 23

Forward (easy): Calculate 57mod  235^7 \mod 23 57=78125mod  23=175^7 = 78125 \mod 23 = 17

Reverse (hard only with suitable large parameters; easy in this toy example): Given 17, find x where 5xmod  23=175^x \mod 23 = 17

This one-way property supports Diffie-Hellman key agreement and related public-key systems.

← Back to the chapter · Next detail →