← LibraryDiscrete Logarithms in the Full Group Modulo pEngineering · MathematicsLesson 128/385← PrevNext →
ArticlePublished 7 Aug 20263 min readBy Kevin Jogin

Engineering  /  Mathematics  — Discrete Logarithms and Factoring

Discrete Logarithms in the Full Group Modulo p

The Pohlig-Hellman reduction combining prime power subproblems by the Chinese remainder theorem.

Page KV-MATH-0400Reading time 3 minReviewed 2026-08-07Author Kevin Jogin

Executive summary

The discrete logarithm in a group of composite order reduces to the problem in each prime power factor, with the results reassembled by the Chinese remainder theorem.

The overall cost is governed by the largest prime factor of the group order, which is why smooth group orders are fatal.

Learning objectives

  1. State the Pohlig-Hellman reduction.
  2. Compute the resulting cost.
  3. Derive the parameter selection rule it implies.

01The reduction

Theorem

Pohlig-Hellman

Let γ generate a group of order q = q₁^{e₁} ··· qₖ^{eₖ}. The discrete logarithm x is determined by its residues modulo each qᵢ^{eᵢ}, and each residue is a discrete logarithm in a group of that order.

  1. Project to each factor

    Raise both γ and α to the power q/qᵢ^{eᵢ}, giving elements of order qᵢ^{eᵢ}.

  2. Solve each subproblem

    Use the prime power method, itself reducing to order-qᵢ problems.

  3. Reassemble

    Chinese remainder the residues to recover x modulo q.

The projection works because raising to q/qᵢ^{eᵢ} maps the group onto its subgroup of that order, and the logarithm of the image is the residue of x modulo qᵢ^{eᵢ}.

02The cost

Total cost ≈ Σᵢ eᵢ(√qᵢ + log q)    dominated by the largest prime factor
Security versus group order structure
Group order qLargest prime factorEffective security
Prime, 256 bitsq itself2^128 — full
2 × prime, 256 bitsThe 255-bit prime2^127 — effectively full
Product of 32-bit primesAbout 2^322^16 — negligible
Smooth, all factors smallSmallBroken

03Parameter selection

The reduction dictates how cryptographic groups must be chosen.

  • Prime order subgroup

    Work in a subgroup of large prime order q, so the reduction has nothing to decompose.

  • Safe primes

    With p = 2q + 1, the group order p − 1 = 2q has only the trivial factor 2 alongside a large prime.

  • Validate group elements

    Check that received elements lie in the intended prime-order subgroup, or an attacker can force the computation into a small subgroup.

The defence is to verify that any received element raised to the subgroup order gives the identity, or equivalently to work in a group where no small subgroup exists.

04Frequently asked questions

Does this attack apply to elliptic curves?

Yes, identically — it is a generic group method. Curve parameters are therefore chosen so the group order is prime or prime times a very small cofactor, and implementations validate that received points lie on the curve and in the right subgroup.

Why does the factor of 2 in a safe prime not matter?

Because it leaks only one bit — the quadratic character of the element. Working in the subgroup of squares removes even that, and no further reduction is available.

Is the factorisation of the group order needed to attack?

Yes, and it is normally public, since the group order is part of the published parameters. There is no security in hiding it, which is why the structure must be chosen safe rather than obscured.

Sources and method

Structural reference: Victor Shoup, A Computational Introduction to Number Theory and Algebra, Version 1, Cambridge University Press, 2005 — book pages 274-275.

This page carries the durable method layer only: definitions, constructions, algorithms, complexity results and selection criteria, authored originally for KEVOS. No text is transcribed or paraphrased from the source, and no numeric tables or benchmark data are reproduced — these are routed to live authoritative sources instead.

Author: Kevin Jogin. Last reviewed 2026-08-07.

Continue learning

Discrete Logarithms in Groups of Prime Power OrderArticle · MathematicsNEXT LESSON →The Diffie-Hellman Key Establishment ProtocolArticle · MathematicsThe Baby Step/Giant Step MethodArticle · MathematicsSmooth NumbersArticle · Mathematics