Logo Wissenstransfer Gerhard at CichnaDotCom

>> Wissensdatenbank / Mathematik / Mathematik Grundlagen I

Algebraische Grundstrukturen

Restklassenringe

Wir kommen nun zu einem ganz besonders wichtigen Ring, der in der Kryptografie eine zentrale Rolle spielt.

Sei \(n \in \mathbb{N}\) mit \(n \gt 1\). Wir haben bereits detailliert die Kongruent-Modulo-Äquivalenzrelation \(\sim_n\) und die Restklassen \([a] = \{a + kn|k \in \mathbb{Z}\}\) besprochen. Wir haben gesehen, dass \(\mathbb{Z} = [0] \cup [1] \cup \dots \cup [n-1]\) eine disjunkte Zerlegung von \(\mathbb{Z}\) bezüglich \(\sim_n\) ist. Ausgehend davon tätigen wir die folgende Definition.

Definition: \(\mathbb{Z}\) modulo \(n\mathbb{Z}\)

Sei \(n \in \mathbb{N}\) mit \(n \gt 1\) und sei \(\sim_n\) die Kongruent-Modulo-Äquivalenzrelation. Dann definieren wir \(\mathbb{Z} / n\mathbb{Z} := \{[0], [1], \dots , [n-1]\}\). Ausgesprochen wird \(\mathbb{Z} / n\mathbb{Z}\) als "\(\mathbb{Z}\) modulo \(n\mathbb{Z}\)".

Die Elemente der Menge \(\mathbb{Z} / n\mathbb{Z}\) sind also die \(n\) disjunkten Restklassen \[[0] = \{0 + kn|k \in \mathbb{Z}\}\] \[[1] = \{1 + kn|k \in \mathbb{Z}\}\] \[\vdots\] \[[n-1] = \{n - 1 + kn|k \in \mathbb{Z}\}\]

Beispiel: \(\mathbb{Z}\) modulo \(n\mathbb{Z}\)

  1. \(\mathbb{Z} / 2\mathbb{Z}\) bildet die zwei Äquivalenzklassen \[[0] = \{\dots, -6, -4, -2, 0, 2, 4, 6, \dots\}\] \[[1] = \{\dots, -5, -3, -1, 1, 3, 5, \dots\}\]
  2. \(\mathbb{Z} / 12\mathbb{Z}\) bildet die zwölf Äquivalenzklassen \[[0] = \{\dots, -24, -12, 0, 12, 24, \dots\}\] \[[1] = \{\dots, -23, -11, 1, 13, 25, \dots\}\] \[[2] = \{\dots, -22, -10, 2, 14, 26, \dots\}\] \[[3] = \{\dots, -21, -9, 3, 15, 27, \dots\}\] \[[4] = \{\dots, -20, -8, 4, 16, 28, \dots\}\] \[[5] = \{\dots, -19, -7, 5, 17, 29, \dots\}\] \[[6] = \{\dots, -18, -6, 6, 18, 30, \dots\}\] \[[7] = \{\dots, -17, -5, 7, 19, 31, \dots\}\] \[[8] = \{\dots, -16, -4, 8, 20, 32, \dots\}\] \[[9] = \{\dots, -15, -3, 9, 21, 33, \dots\}\] \[[10] = \{\dots, -14, -2, 10, 22, 34, \dots\}\] \[[11] = \{\dots, -13, -1, 11, 23, 35, \dots\}\]

Ausgehend von dieser Definition wollen wir den sogenannten Restklassenring definieren. Dieser spielt in der Kryptografie eine entscheidende Rolle.

Satz und Definition: Restklassenring

Für \([a], [b] \in \mathbb{Z} / n\mathbb{Z}\) sei \(+ : \mathbb{Z} / n\mathbb{Z} \times \mathbb{Z} / n\mathbb{Z} \rightarrow \mathbb{Z} / n\mathbb{Z}\) definiert durch \[[a] + [b] := [a + b]\] und \(\cdot : \mathbb{Z} / n\mathbb{Z} \times \mathbb{Z} / n\mathbb{Z} \rightarrow \mathbb{Z} / n\mathbb{Z}\) definiert durch \[[a] \cdot [b] := [a \cdot b]\]

Dann ist \((\mathbb{Z} / n\mathbb{Z}, +, \cdot)\) ein kommutativer Ring. Dieser Ring wird Restklassenring genannt.

Beweis:

Zunächst müssen wir zeigen, dass \(+\) und \(\cdot\) tatsächlich Verknüpfungen auf \(\mathbb{Z} / n\mathbb{Z}\) sind. Hierzu müssen \(+\) und \(\cdot\) wohldefiniert sein, d.h., die Ergebnisse der Operationen müssen unabhängig von der konkreten Wahl der Repräsentanten von \([a]\) und \([b]\) sein. Wir müssen zeigen, dass für \([a] = [a']\) und \([b] = [b']\) gilt, dass \([a + b] = [a' + b']\) und \([a \cdot b] = [a' \cdot b']\) ist.

Beweisen wir zunächst die Wohldefiniertheit der Addition:

Wegen \([a] = [a']\) ist \(a \sim_n a'\) und somit \(n|(a - a')\). Entsprechend gilt wegen \([b] = [b']\), dass \(b \sim_n b'\) und damit \(n|(b - b')\) ist. Damit gilt \(n|(a - a') + (b - b')\). Wegen \((a - a') + (b - b') = (a + b) - (a' + b')\) folgt ingesamt \(n|(a + b) - (a' + b')\) und damit \((a + b) \sim_n (a' + b')\). Es ist somit \([a + b] = [a' + b']\).

Die Addition ist somit unabhängig von der konkreten Wahl der Repräsentanten der Äquivalenzklassen definiert und damit wohldefiniert.

Ganz ähnlich zeigt man die Wohldefiniertheit der Multiplikation:

Wegen \([a] = [a']\) und \([b] = [b']\) folgt mit gleicher Argumentation wie oben, dass \(n|(a - a')\) und \(n|(b - b')\) ist. Damit gilt ebenfalls \(n|(a - a') \cdot b\) und \(n|(b - b') \cdot a\). Wegen \((a - a') \cdot b = a \cdot b - a' \cdot b\) und \((b - b') \cdot a' = a' \cdot b - a' \cdot b'\) gilt somit \(n|(a \cdot b\ - a' \cdot b)\) und \(n|(a' \cdot b\ - a' \cdot b')\). Damit teilt \(n\) insbesondere auch die Summe \((a \cdot b - a' \cdot b) + (a' \cdot b - a' \cdot b') = a \cdot b - a' \cdot b'\), also \(n|(a \cdot b - a' \cdot b')\). Daraus folgt \(a \cdot b \sim_n a' \cdot b'\) und damit \([a \cdot b] = [a' \cdot b']\).

Die Multiplikation ist somit ebenfalls unabhängig von der konkreten Wahl der Repräsentanten und damit wohldefiniert.

Insgesamt sind somit \(+\) und \(\cdot\) Verknüpfungen auf \(\mathbb{Z} / n\mathbb{Z}\). Es bleibt zu zeigen, dass die drei Eigenschaften von Ringen und das Kommutativgesetz gelten, d.h. wir müssen Folgendes zeigen:

  1. \((\mathbb{Z} / n\mathbb{Z}, +)\) ist eine abelsche Gruppe.
  2. \((\mathbb{Z} / n\mathbb{Z}, \cdot)\) ist eine Halbgruppe mit neutralem Element.
  3. Für alle \(a, b, c \in \mathbb{Z} / n\mathbb{Z}\) gelten die Distributivgesetze für Ringe.
  4. \((\mathbb{Z} / n\mathbb{Z}, \cdot)\) ist kommutativ.

Zu 1.:

Seien \([a], [b], [c] \in \mathbb{Z} / n\mathbb{Z}\). Dann gilt nach der obigen Definition der Addition und weil in \((\mathbb{Z}, +)\) das Assoziativgesetz gilt, Folgendes: \[[a] + ([b] + [c]) = [a] + [(b + c)]\] \[= [a + (b + c)]\] \[= [(a + b) + c]\] \[= [(a + b)] + [c]\] \[= ([a] + [b]) + [c]\] Die Addition ist also assoziativ.

Weiterhin gilt: \[[a] + [b] = [a + b]\] \[= [b + a]\] \[= [b] + [a]\] Die Addition ist somit auch kommutativ.

Wegen \[[a] + [0] = [a + 0]\] \[= [a]\] \[= [0 + a]\] \[= [0] + [a]\] ist \([0]\) das neutrale Element bezüglich \(+\) in \(\mathbb{Z} / n\mathbb{Z}\).

Wegen \[[a] + [-a] = [a + (-a)]\] \[= [a - a]\] \[= [0]\] \[= [(-a) + a]\] \[= [-a] + [a]\] besitzt jedes \([a] \in \mathbb{Z} / n\mathbb{Z}\) ein inverses Element \([-a] \in \mathbb{Z} / n\mathbb{Z}\) bezüglich \(+\) in \(\mathbb{Z} / n\mathbb{Z}\). Somit ist \((\mathbb{Z} / n\mathbb{Z}, +)\) eine abelsche Gruppe.

Zu 2.:

Seien \([a], [b], [c] \in \mathbb{Z} / n\mathbb{Z}\). Weil in \((\mathbb{Z}, \cdot)\) das Assoziativgesetz gilt, ist \[[a] \cdot ([b] \cdot [c]) = [a] \cdot [(b \cdot c)]\] \[= [a \cdot (b \cdot c)]\] \[= [(a \cdot b) \cdot c]\] \[= [(a \cdot b)] \cdot [c]\] \[= ([a] \cdot [b]) \cdot [c]\] Die Multiplikation ist also assoziativ.

Weiterhin ist wegen \[[a] \cdot [1] = [a \cdot 1]\] \[= [a]\] \[= [1 \cdot a]\] \[= [1] \cdot [a]\] \([1]\) das neutrale Element bezüglich \(\cdot\) in \(\mathbb{Z} / n\mathbb{Z}\). Somit ist \((\mathbb{Z} / n\mathbb{Z}, \cdot)\) eine Halbgruppe mit neutralem Element.

Zu 3.:

Seien \([a], [b], [c] \in \mathbb{Z} / n\mathbb{Z}\). Weil in \((\mathbb{Z}, \cdot)\) die Distributivgesetze gelten, folgt \[[a] \cdot ([b] + [c]) = [a] \cdot [(b + c)]\] \[= [a \cdot (b + c)]\] \[= [a \cdot b + a \cdot c]\] \[= [a \cdot b] + [a \cdot c]\] \[= [a] \cdot [b] + [a] \cdot [c]\] und \[([a] + [b]) \cdot [c] = [(a + b)] \cdot [c]\] \[= [(a + b) \cdot c]\] \[= [a \cdot c + b \cdot c]\] \[= [a \cdot c] + [b \cdot c]\] \[= [a] \cdot [c] + [b] \cdot [c]\] Somit gelten die Distributivgesetze für Ringe.

Zu 4.:

Seien \([a], [b] \in \mathbb{Z} / n\mathbb{Z}\). Wegen \[[a] \cdot [b] = [a \cdot b]\] \[= [b \cdot a]\] \[= [b] \cdot [a]\] folgt die Kommutativität.

Somit folgt insgesamt, dass \((\mathbb{Z} / n\mathbb{Z}, +, \cdot)\) ein kommutativer Ring ist. \(\square\)

Beispiel: Restklassenringe

  1. Betrachten wir \((\mathbb{Z} / 2\mathbb{Z}, +, \cdot)\). \((\mathbb{Z} / 2\mathbb{Z}, +, \cdot)\) ist der kleinste aller Restklassenringe.
    Darin gilt beispielsweise \[[1] + [3] = [4] = [0]\] \[[1] + [1] = [2] = [0]\] \[[7] + [8] = [15] = [1]\] \[[2] \cdot [4] = [8] = [0]\] \[[3] \cdot [3] = [9] = [1]\]
  2. Betrachten wir \((\mathbb{Z} / 12\mathbb{Z}, +, \cdot)\). Dann kann man das Rechnen in diesem Ring anhand des Ziffernblatts einer analogen Uhr veranschaulichen. Auf einer solchen Uhr sind Stunden von eins bis zwölf eingetragen, wobei die zwölfte Stunde ebenso als Stunde null betrachtet wird. Jede Stunde auf der Uhr entspricht somit einer Äquivalenzklasse \([0], [1], \dots, [11]\) mit \([12] = [0]\). Wenn sich der Zeiger auf der Uhr weiterbewegt, so addiert man eine oder mehrere Stunden hinzu, z.B. \([4] + [1] = [5]\) oder \([4] + [7] = [11]\). Möglicherweise überschreitet der Zeiger hierbei die zwölfte Stunde. Dann beginnt er wieder vorne bei der eins. Rückt man beispielsweise von 9 Uhr um fünf Stunden nach vorne, so steht der Zeiger anschließend auf 2 Uhr. Wegen \([9] + [5] = [14] = [2]\) entspricht dies genau der Addition in den Äquivalenzklassen. Ein weiteres Beispiel: Wenn der Zeiger auf 3 Uhr steht und man die Zeit um 14 Stunden vorstellt, steht der Zeiger anschließend auf 5 Uhr. Dies kann man wiederum wie folgt nachrechnen: \([3] + [14] = [17] = [5]\).