ArticleslgStudy

computer science

Pohlig–Hellman algorithm

Pohlig–Hellman algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Pohlig–Hellman algorithm rather than just read about it. In short: In group theory, the Pohlig–Hellman algorithm, sometimes credited as the Silver–Pohlig–Hellman algorithm, is a special-purpose algorithm for computing discrete logarithms in a finite abelian group whose order is a smooth integer. The algorithm was introduced by Roland Silver, but first published by Stephen Pohlig and Martin Hellman, who credit Silver with its earlier independent but unpublished discovery.

Pohlig–Hellman algorithm — main illustration
Pohlig–Hellman algorithm — illustration

Key takeaways

  • Pohlig–Hellman algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Pohlig–Hellman algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Pohlig–Hellman algorithm from memory before moving on to harder problems.

Reference excerpt

In group theory, the Pohlig–Hellman algorithm, sometimes credited as the Silver–Pohlig–Hellman algorithm, is a special-purpose algorithm for computing discrete logarithms in a finite abelian group whose order is a smooth integer. The algorithm was introduced by Roland Silver, but first published by Stephen Pohlig and Martin Hellman, who credit Silver with its earlier independent but unpublished discovery. Pohlig and Hellman also list Richard Schroeppel and H. Block as having found the same algorithm, later than Silver, but again without publishing it.

Groups of prime-power order As an important special case, which is used as a subroutine in the general algorithm (see below), the Pohlig–Hellman algorithm applies to groups whose order is a prime power. The basic idea of this algorithm is to iteratively compute the p {\displaystyle p} -adic digits of the logarithm by repeatedly "shifting out" all but one unknown digit in the exponent, and computing that digit by elementary methods. (Note that for readability, the algorithm is stated for cyclic groups — in general, G {\displaystyle G} must be replaced by the subgroup ⟨ g ⟩ {\displaystyle \langle g\rangle } generated by g {\displaystyle g} , which is always cyclic.)

Input. A cyclic group G {\displaystyle G} of order n = p e {\displaystyle n=p^{e}} with generator g {\displaystyle g} and an element h ∈ G {\displaystyle h\in G} . Output. The unique integer x ∈ { 0 , … , n − 1 } {\displaystyle x\in \{0,\dots ,n-1\}} such that g x = h {\displaystyle g^{x}=h} . Initialize x 0 := 0. {\displaystyle x_{0}:=0.}

Compute γ := g p e − 1 {\displaystyle \gamma :=g^{p^{e-1}}} . By Lagrange's theorem, this element has order p {\displaystyle p} . For all k ∈ { 0 , … , e − 1 } {\displaystyle k\in \{0,\dots ,e-1\}} , do: Compute h k := ( g − x k h ) p e − 1 − k {\displaystyle h_{k}:=(g^{-x_{k}}h)^{p^{e-1-k}}} . By construction, the order of this element must divide p {\displaystyle p} , hence h k ∈ ⟨ γ ⟩ {\displaystyle h_{k}\in \langle \gamma \rangle } . Using the baby-step giant-step algorithm, compute d k ∈ { 0 , … , p − 1 } {\displaystyle d_{k}\in \{0,\dots ,p-1\}} such that γ d k = h k {\displaystyle \gamma ^{d_{k}}=h_{k}} . It takes time O ( p ) {\displaystyle O({\sqrt {p}})} . Set x k + 1 := x k + p k d k {\displaystyle x_{k+1}:=x_{k}+p^{k}d_{k}} . Return x e {\displaystyle x_{e}} . The algorithm computes discrete logarithms in time complexity O ( e p ) {\displaystyle O(e{\sqrt {p}})} , far better than the baby-step giant-step algorithm's O ( p e ) {\displaystyle O({\sqrt {p^{e}}})} when e {\displaystyle e} is large.

The general algorithm In this section, we present the general case of the Pohlig–Hellman algorithm. The core ingredients are the algorithm from the previous section (to compute a logarithm modulo each prime power in the group order) and the Chinese remainder theorem (to combine these to a logarithm in the full group). (Again, we assume the group to be cyclic, with the understanding that a non-cyclic group must be replaced by the subgroup generated by the logarithm's base element.)

… excerpt ends here. Continue reading the full article.

Illustrations

Pohlig–Hellman algorithm: Steps of the Pohlig–Hellman algorithm.
Steps of the Pohlig–Hellman algorithm.

Worked examples

Example 1 — a first encounter with Pohlig–Hellman algorithm

Start with the simplest possible case. Write down what Pohlig–Hellman algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Pohlig–Hellman algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Pohlig–Hellman algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Pohlig–Hellman algorithm

In research
Pohlig–Hellman algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Pohlig–Hellman algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Pohlig–Hellman algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Number theoretic algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Pohlig–Hellman algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Pohlig–Hellman algorithm” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Pohlig–Hellman algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Pohlig–Hellman algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Pohlig–Hellman algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Pohlig–Hellman algorithm in simple terms?

In group theory, the Pohlig–Hellman algorithm, sometimes credited as the Silver–Pohlig–Hellman algorithm, is a special-purpose algorithm for computing discrete logarithms in a finite abelian group whose order is a smooth integer. The algorithm was introduced by Roland Silver, but first published by…

Why does Pohlig–Hellman algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Pohlig–Hellman algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Pohlig–Hellman algorithm.

Tags

  • Number theoretic algorithms

Keep exploring