EGE/Inf2013/RSA

Aus ProgrammingWiki

Wiki-Quelltext dieser Seite.

[[Bild:schema_rsa.png]]
=== Entwurf öffentlicher Schlüssel (e, N) ===
Lege zwei (große) Primzahlen <math>p</math> und <math>q</math> fest mit <math>p \neq q</math>.

Bilde das Produkt <math>N = p \cdot q</math>.

Suche eine weitere Zahl <math>e</math>, für die gilt:
* <math>e</math> ist Primzahl und größer als <math>p</math> und <math>q</math> <u>oder</u>
* <math>e</math> ist teilerfremd zu <math>(p-1) \cdot (q-1)</math>.
Die Zahlen <math>e</math> und <math>N</math> bilden den ''öffentlichen Schlüssel''.

=== Entwurf privater Schlüssel (d) ===
* <math>d \le (p-1) \cdot (q-1)</math> <u>und</u>
* <math>(d \cdot e) \bmod [(p-1) \cdot (q-1)] = 1</math>

=== Bob verschlüsselt die Nachricht M ===
Voraussetzung: öffentlicher Schlüssel (e, N)
Ein Klartext-Zeichen mit dem Code <math>M</math> wird mit
<blockquote><math>M^e \bmod N = C</math></blockquote>
zu <math>C</math> ''verschlüsselt''.

=== Alice entschlüsselt die Nachricht C ===
Voraussetzung: privater Schlüssel d, öffentlicher Schlüssel N, Code C
Der verschlüsselte Code <math>C</math> wird mit
<blockquote><math>C^d \bmod N = M</math></blockquote>
zum Code <math>M</math> des Klartext-Zeichens ''entschlüsselt''.

=== Wir verschlüsseln Nachrichten gegenseitig ===
<code hidden>==== Beispiel ====
öffentlicher Schlüssel: N=2212356658925775797
e=2^16+1

verschlüsselte Nachricht = 0154053610309353007 # 0414178728190804750 # 1697057945399357863 # 2070423477403309778 # 1073508525444459212 # 0381990340997203895 # 1748647492571070100 # 0323355113406576190 # 0471324455178646453 # 1739775672006346255 # 0855733748764982545 # 1461509390385958697</code>
==== Cornelius ====
öffentlicher Schlüssel: N=

e=

==== Sebastian ====
öffentlicher Schlüssel: N=

e=

==== Camilo ====
öffentlicher Schlüssel: N=
e=
==== David ====
öffentlicher Schlüssel: N=
e=
==== Thomas ====
öffentlicher Schlüssel: N=
e=
==== Immanuel ====
öffentlicher Schlüssel: N=
e=
==== Rouven ====
öffentlicher Schlüssel: N=
e=
==== Kilian ====
öffentlicher Schlüssel: N=
e=
==== Elisa ====
öffentlicher Schlüssel: N=
e=
==== Kai ====
öffentlicher Schlüssel: N=
e=