<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Babystep-Giantstep-Algorithmus</id>
	<title>Babystep-Giantstep-Algorithmus - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Babystep-Giantstep-Algorithmus"/>
	<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Babystep-Giantstep-Algorithmus&amp;action=history"/>
	<updated>2026-05-29T15:21:47Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Wikipedia (Deutsch) – Lokale Kopie</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki-de.moshellshocker.dns64.de/index.php?title=Babystep-Giantstep-Algorithmus&amp;diff=583427&amp;oldid=prev</id>
		<title>imported&gt;Aka: Tippfehler entfernt, Kleinkram</title>
		<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Babystep-Giantstep-Algorithmus&amp;diff=583427&amp;oldid=prev"/>
		<updated>2025-03-15T22:31:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Benutzer:Aka/Tippfehler_entfernt&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Benutzer:Aka/Tippfehler entfernt (Seite nicht vorhanden)&quot;&gt;Tippfehler entfernt&lt;/a&gt;, Kleinkram&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Der &amp;#039;&amp;#039;&amp;#039;Babystep-Giantstep-Algorithmus&amp;#039;&amp;#039;&amp;#039; (auch &amp;#039;&amp;#039;&amp;#039;Shanks’ Algorithmus&amp;#039;&amp;#039;&amp;#039; für diskrete Logarithmen genannt) berechnet den [[Diskreter Logarithmus|diskreten Logarithmus]] eines Elements einer [[Zyklische Gruppe|zyklischen Gruppe]]. Der Algorithmus ist zwar in der Laufzeit dem naiven Ausprobieren aller Möglichkeiten überlegen, ist aber dennoch für sehr große Gruppen praktisch nicht durchführbar. Der Algorithmus stammt von [[Daniel Shanks]].&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Literatur |Autor=Volker Diekert, Manfred Kufleitner, Gerhard Rosenberger |Titel=Diskrete algebraische Methoden: Arithmetik, Kryptographie, Automaten und Gruppen |Verlag=Walter de Gruyter |Datum=2013-05-28 |ISBN=978-3-11-031261-4 |Seiten=100 |Online=https://www.google.de/books/edition/Diskrete_algebraische_Methoden/XGNKsOm9r3IC?hl=de&amp;amp;gbpv=1&amp;amp;dq=Babystep-Giantstep-Algorithmus&amp;amp;pg=PA100&amp;amp;printsec=frontcover |Abruf=2025-03-15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Theorie ==&lt;br /&gt;
Gesucht sei der diskrete Logarithmus &amp;lt;math&amp;gt;x := \log_g a&amp;lt;/math&amp;gt; mit &amp;lt;math&amp;gt;\langle g \rangle = \{g^0, g^1, \dotsc g^{n-1}\}&amp;lt;/math&amp;gt; eine endliche zyklische Gruppe der Ordnung &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;a = g^x&amp;lt;/math&amp;gt; ein Gruppenelement.&lt;br /&gt;
&lt;br /&gt;
Mittels Division mit Rest lässt sich zu einem fest gewählten &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; eine eindeutige Darstellung &amp;lt;math&amp;gt;x = im + j&amp;lt;/math&amp;gt; mit  &amp;lt;math&amp;gt;0 \le j &amp;lt; m&amp;lt;/math&amp;gt; finden. Hierbei wird häufig &amp;lt;math&amp;gt;m \in \Theta(\sqrt{n})&amp;lt;/math&amp;gt; gewählt (siehe [[Landau-Symbole]])&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, um den möglichen Zahlenbereich der &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; ähnlich groß zu halten. Durch Umformen ergibt sich mit dieser Darstellung wegen &amp;lt;math&amp;gt;a = g^x = g^{im+j}&amp;lt;/math&amp;gt; die dem Algorithmus zugrunde liegende Eigenschaft &amp;lt;math&amp;gt;g^j = ag^{-im}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Der Algorithmus sucht nach einem Paar &amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;, das diese Eigenschaft erfüllt, und erstellt hierzu zunächst eine Tabelle der „baby steps“ &amp;lt;math&amp;gt;(j, g^j)&amp;lt;/math&amp;gt;. Anschließend berechnet man für wachsende &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; sukzessive die „giant steps“ &amp;lt;math&amp;gt;a(g^{-m})^i&amp;lt;/math&amp;gt; und prüft auf Gleichheit mit einem Wert in der Tabelle. Liegt eine solche Kollision vor, ist dies das gesuchte Paar und der Logarithmus &amp;lt;math&amp;gt;im+j&amp;lt;/math&amp;gt; wird ausgegeben.&amp;lt;ref&amp;gt;{{Literatur |Autor=Johannes Buchmann |Titel=Einführung in die Kryptographie |Verlag=Springer-Verlag |Datum=2013-03-08 |ISBN=978-3-642-98060-2 |Seiten=150ff |Online=https://www.google.de/books/edition/Einf%C3%BChrung_in_die_Kryptographie/mbepBgAAQBAJ?hl=de&amp;amp;gbpv=1&amp;amp;dq=Babystep-Giantstep-Algorithmus&amp;amp;pg=PA150&amp;amp;printsec=frontcover |Abruf=2025-03-15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mit Zugriffszeiten auf einzelne Elemente der Tabelle von &amp;lt;math&amp;gt;\mathcal{O}(\alpha)&amp;lt;/math&amp;gt; – im Falle von geeignet schnellen Datenstrukturen wie [[Hashtabelle]]n entspricht dies &amp;lt;math&amp;gt;\mathcal{O}(1)&amp;lt;/math&amp;gt; – hat der Algorithmus eine Laufzeit von &amp;lt;math&amp;gt;\mathcal{O}((n/m)\cdot \alpha^2)&amp;lt;/math&amp;gt; mit Speicherbedarf &amp;lt;math&amp;gt;\mathcal{O}(m)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Algorithmus ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Eingabe:&amp;#039;&amp;#039;&amp;#039; Endliche zyklische Gruppe &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, Erzeuger &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;, Gruppenelement &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ausgabe:&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;x:=\log_g a&amp;lt;/math&amp;gt; mit &amp;lt;math&amp;gt;g^x=a&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Berechne &amp;lt;math&amp;gt;n:=|G|&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m:=\lceil\sqrt{n}\rceil&amp;lt;/math&amp;gt; mit der [[Aufrundungsfunktion]] &amp;lt;math&amp;gt;\lceil \cdot \rceil&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Für alle &amp;lt;math&amp;gt;j\in\{0,\dots,m-1\}&amp;lt;/math&amp;gt;: Berechne &amp;lt;math&amp;gt;g^j&amp;lt;/math&amp;gt; und speichere &amp;lt;math&amp;gt;(j,g^j)&amp;lt;/math&amp;gt; in einer Tabelle.&lt;br /&gt;
* Für alle &amp;lt;math&amp;gt;i\in\{0,\dots,m-1\}&amp;lt;/math&amp;gt;: Berechne &amp;lt;math&amp;gt;a(g^{-m})^i&amp;lt;/math&amp;gt; und suche danach in der zweiten Spalte der Tabelle. Wenn gefunden, gib &amp;lt;math&amp;gt;im+j&amp;lt;/math&amp;gt; aus.&lt;br /&gt;
&lt;br /&gt;
Wegen &amp;lt;math&amp;gt;a(g^{-m})^i = a(g^{-m})^{i-1}g^{-m}&amp;lt;/math&amp;gt; lässt sich das Gruppenelement im letzten Schritt leicht aus dem der vorhergehenden Iteration berechnen.&amp;lt;ref&amp;gt;{{Literatur |Autor=Albrecht Beutelspacher, Jörg Schwenk, Klaus-Dieter Wolfenstetter |Titel=Moderne Verfahren der Kryptographie: Von RSA zu Zero-Knowledge |Verlag=Springer-Verlag |Datum=2013-03-08 |ISBN=978-3-322-84306-7 |Seiten=124 |Online=https://www.google.de/books/edition/Moderne_Verfahren_der_Kryptographie/iSudBgAAQBAJ?hl=de&amp;amp;gbpv=1&amp;amp;dq=Babystep-Giantstep-Algorithmus&amp;amp;pg=PA138&amp;amp;printsec=frontcover |Abruf=2025-03-15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Beispiel ==&lt;br /&gt;
Weil &amp;lt;math&amp;gt;11&amp;lt;/math&amp;gt; eine [[Primitivwurzel]] modulo &amp;lt;math&amp;gt;29&amp;lt;/math&amp;gt; ist, gilt &amp;lt;math&amp;gt;(\mathbb{Z}/29\mathbb{Z})^\times = \langle 11 \rangle&amp;lt;/math&amp;gt;. Sei also &amp;lt;math&amp;gt;G:=(\mathbb{Z}/29\mathbb{Z})^\times&amp;lt;/math&amp;gt; die [[prime Restklassengruppe]] mit Erzeuger &amp;lt;math&amp;gt;g:=11&amp;lt;/math&amp;gt;. Wir wollen den diskreten Logarithmus von &amp;lt;math&amp;gt;a:=3&amp;lt;/math&amp;gt; zur Basis &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; berechnen, also die Lösung von &amp;lt;math&amp;gt;3 = 11 ^x \mod 29&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Die Gruppenordnung ergibt sich zu &amp;lt;math&amp;gt;n:=\varphi(29)=28&amp;lt;/math&amp;gt;, da &amp;lt;math&amp;gt;29&amp;lt;/math&amp;gt; eine Primzahl ist (hierbei ist &amp;lt;math&amp;gt;\varphi&amp;lt;/math&amp;gt; die [[Eulersche φ-Funktion]]). Somit ist &amp;lt;math&amp;gt;m:=\lceil\sqrt{28}\rceil=6&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Für &amp;lt;math&amp;gt;j\in\{0,\dots,5\}&amp;lt;/math&amp;gt; berechnet man die Paare &amp;lt;math&amp;gt;(j, 11^j)&amp;lt;/math&amp;gt; und speichert sie in einer Tabelle:&lt;br /&gt;
{| style=&amp;quot;margin-left:3em&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; || 0 || 1 || 2 || 3 || 4 || 5&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;11^j&amp;lt;/math&amp;gt; || 1 || 11 || 5 || 26 || 25 || 14&lt;br /&gt;
|}&lt;br /&gt;
* Es ist &amp;lt;math&amp;gt;11^{-6} = 11^{28-6} = 13&amp;lt;/math&amp;gt;. Man berechnet für &amp;lt;math&amp;gt;i\in\{0,\dots,5\}&amp;lt;/math&amp;gt; die Zahl &amp;lt;math&amp;gt;3 \cdot 13^i&amp;lt;/math&amp;gt; und terminiert, sobald sie in der zweiten Komponente der vorherigen Tabelle gefunden wurde:&lt;br /&gt;
{| style=&amp;quot;margin-left:3em&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
| &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; || 0 || 1 || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;3 \cdot 13^i&amp;lt;/math&amp;gt; || 3 || 10 || 14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Es ist also &amp;lt;math&amp;gt;i=2&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;j=5&amp;lt;/math&amp;gt;, damit ist &amp;lt;math&amp;gt;\log_{11} 3 = 2\cdot 6 + 5 = 17&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Kategorie:Zahlentheoretischer Algorithmus]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aka</name></author>
	</entry>
</feed>