Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Pohlig–Hellman algorithm

From Wikipedia, the free encyclopedia
Algorithm for computing logarithms
Pohlig Hellman Algorithm
Steps of the Pohlig–Hellman algorithm.

Ingroup theory, thePohlig–Hellman algorithm, sometimes credited as theSilver–Pohlig–Hellman algorithm,[1] is a special-purposealgorithm for computingdiscrete logarithms in afinite abelian group whose order is asmooth integer.

The algorithm was introduced by Roland Silver, but first published byStephen Pohlig andMartin 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.[2]

Groups of prime-power order

[edit]

As an important special case, which is used as a subroutine in the general algorithm (see below), the Pohlig–Hellman algorithm applies togroups whose order is aprime power. The basic idea of this algorithm is to iteratively compute thep{\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 subgroupg{\displaystyle \langle g\rangle } generated byg{\displaystyle g}, which is always cyclic.)

Input. A cyclic groupG{\displaystyle G} of ordern=pe{\displaystyle n=p^{e}} with generatorg{\displaystyle g} and an elementhG{\displaystyle h\in G}.
Output. The unique integerx{0,,n1}{\displaystyle x\in \{0,\dots ,n-1\}} such thatgx=h{\displaystyle g^{x}=h}.
  1. Initializex0:=0.{\displaystyle x_{0}:=0.}
  2. Computeγ:=gpe1{\displaystyle \gamma :=g^{p^{e-1}}}. ByLagrange's theorem, this element has orderp{\displaystyle p}.
  3. For allk{0,,e1}{\displaystyle k\in \{0,\dots ,e-1\}}, do:
    1. Computehk:=(gxkh)pe1k{\displaystyle h_{k}:=(g^{-x_{k}}h)^{p^{e-1-k}}}. By construction, the order of this element must dividep{\displaystyle p}, hencehkγ{\displaystyle h_{k}\in \langle \gamma \rangle }.
    2. Using thebaby-step giant-step algorithm, computedk{0,,p1}{\displaystyle d_{k}\in \{0,\dots ,p-1\}} such thatγdk=hk{\displaystyle \gamma ^{d_{k}}=h_{k}}. It takes timeO(p){\displaystyle O({\sqrt {p}})}.
    3. Setxk+1:=xk+pkdk{\displaystyle x_{k+1}:=x_{k}+p^{k}d_{k}}.
  4. Returnxe{\displaystyle x_{e}}.

The algorithm computes discrete logarithms in time complexityO(ep){\displaystyle O(e{\sqrt {p}})}, far better than thebaby-step giant-step algorithm'sO(pe){\displaystyle O({\sqrt {p^{e}}})} whene{\displaystyle e} is large.

The general algorithm

[edit]

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 theChinese 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.)

Input. A cyclic groupG{\displaystyle G} of ordern{\displaystyle n} with generatorg{\displaystyle g}, an elementhG{\displaystyle h\in G}, and a prime factorizationn=i=1rpiei{\textstyle n=\prod _{i=1}^{r}p_{i}^{e_{i}}}.
Output. The unique integerx{0,,n1}{\displaystyle x\in \{0,\dots ,n-1\}} such thatgx=h{\displaystyle g^{x}=h}.
  1. For eachi{1,,r}{\displaystyle i\in \{1,\dots ,r\}}, do:
    1. Computegi:=gn/piei{\displaystyle g_{i}:=g^{n/p_{i}^{e_{i}}}}. ByLagrange's theorem, this element has orderpiei{\displaystyle p_{i}^{e_{i}}}.
    2. Computehi:=hn/piei{\displaystyle h_{i}:=h^{n/p_{i}^{e_{i}}}}. By construction,higi{\displaystyle h_{i}\in \langle g_{i}\rangle }.
    3. Using the algorithm above in the groupgi{\displaystyle \langle g_{i}\rangle }, computexi{0,,piei1}{\displaystyle x_{i}\in \{0,\dots ,p_{i}^{e_{i}}-1\}} such thatgixi=hi{\displaystyle g_{i}^{x_{i}}=h_{i}}.
  2. Solve the simultaneous congruencexxi(modpiei)i{1,,r}.{\displaystyle x\equiv x_{i}{\pmod {p_{i}^{e_{i}}}}\quad \forall i\in \{1,\dots ,r\}{\text{.}}}TheChinese remainder theorem guarantees there exists a unique solutionx{0,,n1}{\displaystyle x\in \{0,\dots ,n-1\}}.
  3. Returnx{\displaystyle x}.

The correctness of this algorithm can be verified via theclassification of finite abelian groups: Raisingg{\displaystyle g} andh{\displaystyle h} to the power ofn/piei{\displaystyle n/p_{i}^{e_{i}}} can be understood as the projection to the factor group of orderpiei{\displaystyle p_{i}^{e_{i}}}.

Complexity

[edit]

The worst-case input for the Pohlig–Hellman algorithm is a group of prime order: In that case, it degrades to thebaby-step giant-step algorithm, hence the worst-case time complexity isO(n){\displaystyle {\mathcal {O}}({\sqrt {n}})}. However, it is much more efficient if the order is smooth: Specifically, ifipiei{\displaystyle \prod _{i}p_{i}^{e_{i}}} is the prime factorization ofn{\displaystyle n}, then the algorithm's complexity isO(iei(logn+pi)){\displaystyle {\mathcal {O}}\left(\sum _{i}{e_{i}(\log n+{\sqrt {p_{i}}})}\right)} group operations.[3]

Notes

[edit]
  1. ^Mollin 2006, pg. 344
  2. ^Pohlig & Hellman 1978.
  3. ^Menezes, et al. 1997, pg. 108

References

[edit]
Primality tests
Prime-generating
Integer factorization
Multiplication
Euclideandivision
Discrete logarithm
Greatest common divisor
Modular square root
Other algorithms
  • Italics indicate that algorithm is for numbers of special forms
Retrieved from "https://en.wikipedia.org/w/index.php?title=Pohlig–Hellman_algorithm&oldid=1252089718"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp