EGE/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''.

== Hausaufgabe ==
RSA-Faktoring-Chalenge (Wikipedia) lesen
* Warum ist das RSA-Verfahren mit kleinen Primzahlen immer noch unsicher? (Wozu benötigt man möglichst große Primzahlen?)
* Was bedeutet 205 Bit?
* Wie groß sollten zwei sichere Primzahlen sein?

<!--[https://vimeo.com/114048258 RSA mit dem Android-Handy] ansehen und versuchen, umzusetzen.-->

== Wir verschlüsseln uns Nachrichten gegenseitig ==
=== Tim ===
N = 2923723657325689753

e = 2^16+1

Aaron: 6109241775432 # 0445619957989 # 2011493422895 # 1753212313778 # 1560560402734 # 4668526465824

Für Tim: 0971158489226418555 # 2043547178206792772 # 0732029136643858939 # 1556005650193041109 # 0377185071036805876 # 1239559758108528165 # 2632998321014479199 # 0615496542965952553 # 1271428267648145280

=== Elise ===
=== Aaron ===


N = 8657171789267

e = 2^16+1

Tim: 2403605539189261130 # 1416580827313331326 # 2408159993458149277 # 2190278437483377366 # 1562642152801134763 # 1560000634633346060 # 2423329647570075338

=== Johannes ===
N= 2185487837714976281

=== Dandy ===
=== Josef ===
N = 2923723657325689753
e = 2^16+1 bzw. (65537)

=== Theresa ===
N=2189329218283721051
e=2^16+1

=== Heidi ===
e: 2^16+1

N: 2923723657325689753