Nepedia
Back to Discover
Fluent Reader
🔢

Discrete logarithm

math Maturity 7-9 Next article →

Math is full of puzzles that look easy but are actually very hard. One such puzzle is the discrete logarithm. To understand it, first think about regular powers. If you multiply 10 by itself three times, you get 1,000. It is easy to see that 10 was used three times. In this case, the logarithm is 3. This is a simple way to find the number of steps used.

Discrete logarithm mod 5
Discrete logarithm mod 5

A discrete logarithm works a bit differently. It uses a special math setting called a cyclic group. In these groups, numbers follow a repeating cycle. One way to see this is with modular arithmetic. This is a way of math that only looks at the remainder after division. For example, if we use the number 5, we only care about the remainders left over after dividing by 5.

Discrete logarithm mod 5
Discrete logarithm mod 5

Let's look at how this works with the number 2 in a group of 5. We multiply 2 by itself over and over. First, we have 2. Next, 2 times 2 is 4. Then, 4 times 2 is 8, but the remainder after dividing 8 by 5 is 3. After that, 3 times 2 is 6, which leaves a remainder of 1. The cycle is 2, 4, 3, and 1. If someone asks how many times we used 2 to get 3, the answer is 3.

Discrete logarithm mod 5
Discrete logarithm mod 5

History shows that these math ideas are very important for security. The Diffie–Hellman problem was the first to suggest using these puzzles for cryptography. Cryptography is the science of making secret codes. Many systems, like ElGamal, rely on the fact that these logarithms are hard to find. While it is easy to multiply numbers to find a power, it is very hard to go backward. This one-way trick keeps our digital information safe.

Discrete logarithm mod 5
Discrete logarithm mod 5

Even though these puzzles are hard, some people have found ways to solve them. For a normal computer, no fast way is known to solve them in general. A simple way is called trial multiplication, where you just try every power. This takes a very long time as numbers get bigger. There are faster ways, like the Baby-step giant-step method or Pollard's rho algorithm. However, a quantum computer could use Peter Shor's algorithm to solve them much faster.

Discrete logarithm mod 5
Discrete logarithm mod 5
382 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Discrete logarithm mod 5.svg
Discrete logarithm mod 5.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.