Pollard's rho algorithm for logarithms

Pollard's rho algorithm for logarithms is an algorithm introduced by John Pollard in 1978 to solve the discrete logarithm problem, analogous to Pollard's rho algorithm to solve the integer factorization problem.

The goal is to compute such that , where belongs to a cyclic group generated by . The algorithm computes integers , , , and such that . If the underlying group is cyclic of order , by substituting as and noting that two powers are equal if and only if the exponents are equivalent modulo the order of the base, in this case modulo , we get that is one of the solutions of the equation . Solutions to this equation are easily obtained using the extended Euclidean algorithm.

To find the needed , , , and the algorithm uses Floyd's cycle-finding algorithm to find a cycle in the sequence , where the function is assumed to be random-looking and thus is likely to enter into a loop of approximate length after steps. One way to define such a function is to use the following rules: Partition into three disjoint subsets , , and of approximately equal size using a hash function. If is in then double both and ; if then increment , if then increment .

Algorithm

Let be a cyclic group of order , and given , and a partition , let be the map

and define maps and by

input: a: a generator of G
       b: an element of G
output: An integer x such that ax = b, or failure

Initialise i ← 0, a0 ← 0, b0 ← 0, x0 ← 1 ∈ G

loop
    ii + 1

    xif(xi−1),
    aig(xi−1, ai−1),
    bih(xi−1, bi−1)

    x2i−1f(x2i−2),
    a2i−1g(x2i−2, a2i−2),
    b2i−1h(x2i−2, b2i−2)
    x2if(x2i−1),
    a2ig(x2i−1, a2i−1),
    b2ih(x2i−1, b2i−1)
while xix2i

rbib2i
if r = 0 return failure
return r−1(a2iai) mod n

Example

Consider, for example, the group generated by 2 modulo (the order of the group is , 2 generates the group of units modulo 1019). The algorithm is implemented by the following C++ program:

#include <stdio.h>

const int n = 1018, N = n + 1;  /* N = 1019 -- prime     */
const int alpha = 2;            /* generator             */
const int beta = 5;             /* 2^{10} = 1024 = 5 (N) */

void new_xab(int& x, int& a, int& b) {
  switch (x % 3) {
  case 0: x = x * x     % N;  a =  a*2  % n;  b =  b*2  % n;  break;
  case 1: x = x * alpha % N;  a = (a+1) % n;                  break;
  case 2: x = x * beta  % N;                  b = (b+1) % n;  break;
  }
}

int main(void) {
  int x = 1, a = 0, b = 0;
  int X = x, A = a, B = b;
  for (int i = 1; i < n; ++i) {
    new_xab(x, a, b);
    new_xab(X, A, B);
    new_xab(X, A, B);
    printf("%3d  %4d %3d %3d  %4d %3d %3d\n", i, x, a, b, X, A, B);
    if (x == X) break;
  }
  return 0;
}

The results are as follows (edited):

 i     x   a   b     X   A   B
------------------------------
 1     2   1   0    10   1   1
 2    10   1   1   100   2   2
 3    20   2   1  1000   3   3
 4   100   2   2   425   8   6
 5   200   3   2   436  16  14
 6  1000   3   3   284  17  15
 7   981   4   3   986  17  17
 8   425   8   6   194  17  19
..............................
48   224 680 376    86 299 412
49   101 680 377   860 300 413
50   505 680 378   101 300 415
51  1010 681 378  1010 301 416

That is and so , for which is a solution as expected. As is not prime, there is another solution , for which holds.

Complexity

The running time is approximately . If used together with the Pohlig–Hellman algorithm, the running time of the combined algorithm is , where is the largest prime factor of .

References

  • Pollard, J. M. (1978). "Monte Carlo methods for index computation (mod p)". Mathematics of Computation. 32 (143): 918–924. doi:10.2307/2006496. JSTOR 2006496.
  • Menezes, Alfred J.; van Oorschot, Paul C.; Vanstone, Scott A. (2001). "Chapter 3" (PDF). Handbook of Applied Cryptography.

Read other articles:

Koridor 11 TransjakartaPulo Gebang - Kampung MelayuBus Volvo milik Steady Safe yang melayani Koridor 11Halte Stasiun Klender adalah salah satu halte yang melayani Koridor 11InfoPemilikPT. Transportasi JakartaWilayahJakarta TimurJenisStreet-level Bus Rapid TransitJumlah stasiun16 halteOperasiDimulai28 Desember 2011OperatorPT. Transportasi Jakarta (prasarana, armada, pramudi dan petugas)Steady Safe (armada dan pramudi)TeknisPanjang sistem15 kmKecepatan tertinggi50 km/jam Peta rute(klik gambar u...

 

2018 Sri Lankan filmPaangshuPosterDirected byVisakesa Chandrasekaram[1]Written byVisakesa ChandrasekaramProduced byTVTStarringNita Fernando Nadee Kammellaweera Jagath ManuwarnaCinematographyDimuthu KalingaEdited bySithum SamarajeewaMusic byChinthaka JayakodyRelease dates September 2018 (2018-09) (Montreal) 21 August 2020 (2020-08-21) Running time86 minutesCountrySri LankaLanguageSinhala Paangshu (Sinhala: පාංශු; The Soil) is a 2018 Sri Lankan Sin...

 

American professor This biography of a living person relies too much on references to primary sources. Please help by adding secondary or tertiary sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately, especially if potentially libelous or harmful.Find sources: Josephine Donovan – news · newspapers · books · scholar · JSTOR (August 2017) (Learn how and when to remove this template message) Jo...

Военный флаг Болгарии Сухопу́тные войска́ Болга́рии — основной вид вооружённых сил в Болгарской армии. Они готовят и поддерживают сухопутные формирования, готовые к развёртыванию и участию во всех операциях в системе коллективной обороне НАТО на территории Болгари...

 

Intermediate appellate court of Georgia (U.S. state) The Georgia Court of Appeals is the intermediate-level appellate court for the U.S. state of Georgia. The court is a single entity with 15 judges. The judges are assigned into five divisions of three judges each, with the assignments changed annually. Cases are randomly assigned to one of the divisions, with the constraint that the number of active cases in each division is kept close to equal.[1][2][3] Its courtroom...

 

1998 World JuniorChampionships in AthleticsTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmenwomen3000 mwomen5000 mmenwomen10,000 mmen100 m hurdleswomen110 m hurdlesmen400 m hurdlesmenwomen3000 msteeplechasemen4 × 100 m relaymenwomen4 × 400 m relaymenwomen5000 m walkwomen10,000 m walkmenField eventsHigh jumpmenwomenPole vaultmenwomenLong jumpmenwomenTriple jumpmenwomenShot putmenwomenDiscus throwmenwomenHammer throwmenwomenJavelin throwmenwomenCombined eventsHeptathl...

Camouflage to counteract self-shading Many animals, such as this grey reef shark, are countershaded. Illustration from the artist Abbot Thayer's 1909 book on camouflage of a Luna caterpillar Actias lunaa) in position b) inverted. Countershading, or Thayer's law, is a method of camouflage in which an animal's coloration is darker on the top or upper side and lighter on the underside of the body.[1] This pattern is found in many species of mammals, reptiles, birds, fish, and insects, bo...

 

German artist (1893–1959) George GroszGeorge Grosz in 1921BornGeorg Ehrenfried Groß(1893-07-26)July 26, 1893Berlin, Kingdom of Prussia, German EmpireDiedJuly 6, 1959(1959-07-06) (aged 65)West Berlin, West GermanyNationalityGerman, American (since 1938)EducationDresden AcademyKnown forPainting, drawingNotable workThe Funeral (Dedicated to Oscar Panizza)MovementDada, Expressionism, New Objectivity George Grosz (German: [ɡʁoːs]; born Georg Ehrenfried Groß; July 26, 1893 ...

 

Not to be confused with the Dexter Grist Mill in Sandwich, Massachusetts. United States historic placeDexter Grist MillU.S. National Register of Historic Places Show map of MaineShow map of the United StatesLocationDexter, MaineCoordinates45°1′23″N 69°17′29″W / 45.02306°N 69.29139°W / 45.02306; -69.29139Area1 acre (0.40 ha)Built1854 (1854)Built byCaleb B. CurtisArchitectural styleVernacular IndustrialNRHP reference No.75000104[1...

Movie horse (1934–1965) Trigger (Golden Cloud)Roy Rogers and co-star Lynne Roberts with Trigger, in the 1938 film Billy the Kid ReturnsBreedGrade horseDisciplineMovie horseSexStallionFoaledJuly 4, 1934DiedJuly 3, 1965(1965-07-03) (aged 30)CountryUnited StatesColorPalominoOwnerRoy Rogers Trigger (July 4, 1934 – July 3, 1965) was a 15.3 hands (63 inches, 160 cm) palomino horse made famous in American Western films with his owner and rider, cowboy star Roy Rogers. Pedigre...

 

Association football club in Scotland Football clubFauldhouse UnitedFull nameFauldhouse United Football ClubNickname(s)United or The HooseFounded1919GroundPark ViewFauldhouseCapacity2,000ChairAlec ParkManagerIain DiackLeagueEast of Scotland League Third Division2022–23East of Scotland League Third Division, 7th of 10 Home colours Away colours Fauldhouse United Football Club are a Scottish football club based at Park View in Fauldhouse, West Lothian. The club won the Scottish Junior Cup in 1...

 

Weather forecast service for astronomers Clear Sky Charts (called clocks until February 29, 2008) are web graphics which deliver weather forecasts designed specifically for astronomers. They forecast the cloud cover, transparency and astronomical seeing, parameters which are not forecast by civil or aviation forecasts.[1] They forecast hourly data, but are limited to forecasting at most 48 hours into the future. Each individual chart provides data for only a 9 mile radius, and so are ...

CheminascomuneCheminas – Veduta LocalizzazioneStato Francia RegioneAlvernia-Rodano-Alpi Dipartimento Ardèche ArrondissementTournon-sur-Rhône CantoneTournon-sur-Rhône TerritorioCoordinate45°07′N 4°45′E45°07′N, 4°45′E (Cheminas) Superficie9,19 km² Abitanti276[1] (2009) Densità30,03 ab./km² Altre informazioniCod. postale07300 Fuso orarioUTC+1 Codice INSEE07063 CartografiaCheminas Sito istituzionaleModifica dati su Wikidata · Manuale Cheminas è u...

 

Mathematical paradox The nine intersections of x 3 − x = 10 ( y 3 − y ) {\displaystyle x^{3}-x=10(y^{3}-y)} and y 3 − y = 10 ( x 3 − x ) {\displaystyle y^{3}-y=10(x^{3}-x)} In mathematics, Cramer's paradox or the Cramer–Euler paradox[1] is the statement that the number of points of intersection of two higher-order curves in the plane can be greater than the number of arbitrary points that are usually needed to define one such curve. It is named after the ...

 

Town in Vermont, United StatesBerlin, VermontTownBerlin Corner, with the Congregational church on the hilltopLocation in Washington County and the state of VermontBerlin, VermontLocation in the United StatesCoordinates: 44°12′55″N 72°35′10″W / 44.21528°N 72.58611°W / 44.21528; -72.58611CountryUnited StatesStateVermontCountyWashingtonArea • Total36.9 sq mi (95.7 km2) • Land36.3 sq mi (93.9 km2) •&...

Extinct genus of dinosaurs XiaotingiaTemporal range: Bathonian–Oxfordian,~165–153 Ma[1] PreꞒ Ꞓ O S D C P T J K Pg N Type specimen Scientific classification Domain: Eukaryota Kingdom: Animalia Phylum: Chordata Clade: Dinosauria Clade: Saurischia Clade: Theropoda Family: †Anchiornithidae Genus: †XiaotingiaXu et al., 2011 Type species Xiaotingia zhengiXu et al., 2011 Xiaotingia is a genus of anchiornithid theropod dinosaur from Middle Jurassic or early Late Jurassic depo...

 

Disambiguazione – Se stai cercando nome proprio, vedi Cabiria (nome). CabiriaLocandina di Luigi Caldanzano (1880-1928)[1]Paese di produzioneItalia Anno1914 Durata187 min (versione originale)[2]125 min (versione restaurata del 1990)148 min162 min (versione restaurata del 1998)168 min181 min (versione restaurata del 2006) Dati tecniciB/Nrapporto: 1,20:1film muto Genereepico, storico, drammatico, avventura RegiaGiovanni Pastrone SoggettoGustave Flaubert, Emilio Sal...

 

قائمة الانتخابات في 2013  →2012 2013  دول عقد انتخابات: ■ – إنتخابات رئاسية ■ – برلمانية/تشريعية ■ – رئاسية وبرلمانية/تشريعية ■ – إستفتاء ■ – إستفتاء وبرلمانية/تشريعية تحتوي هذه المقالة على الانتخابات التي نظمت في سنة 2013، وهي التشريعية والرئاسية في الدول ذات السيادة و�...

Elevated rail trail in Chicago The 606 redirects here. For other uses, see 606 (disambiguation). Bloomingdale TrailBloomingdale Trail near Wolcott AvenueLength2.7 mi (4.3 km)LocationChicago, Illinois, United StatesBegan construction2013Completed2015; 9 years ago (2015)TrailheadsWalsh ParkWebsitewww.bloomingdaletrail.org Trail map Show interactive map Legend MD-W NCS MD-W NCS | MD-N Ridgeway Avenue Lawndale Avenue Drake Avenue Spaulding Avenue Albany Avenue/Whi...

 

Leang KassiGua KassiLokasiKampung Belae, Kelurahan Biraeng, Kecamatan Minasatene, Kabupaten Pangkajene dan Kepulauan, Sulawesi Selatan, IndonesiaKoordinat04°50'07.6 LS 119°35'23.5 BT[1]Geologikarst / batu kapur / batu gamping tipe Formasi TonasaSitus Leang KassiNama sebagaimana tercantum dalamSistem Registrasi Nasional Cagar Budaya Cagar budaya IndonesiaPeringkatKabupaten/KotaKategoriSitusNo. RegnasKB005121LokasikeberadaanKampung Belae, Kelurahan Biraeng, Kecamatan Minasatene, Kabup...