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

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?

=== Wir verschlüsseln Nachrichten gegenseitig ===
==== 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
==== Cornelius ====
öffentlicher Schlüssel: N= 564770296095460534949

e= 65537
Text: 462205500095285750340 # 165234946189324884447

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

e=2^16+1

M=534480725422052135176 # 093865893319636082765

==== Camilo ====
öffentlicher Schlüssel: N=6006895620581

e=2^16+1

Nachricht: 429130418445698861083 # 521533381957458069104 # 611474369754604863790 # 345493507966049739474 # 056427154841869189966

==== David ====
öffentlicher Schlüssel: N= 23504900843136602761

e= 2^16+1

Nachricht: 00965313686794480073 # 10795120661862956265 # 21489959575424599855 # 00735713607825357160

==== Thomas ====
öffentlicher Schlüssel: N=631585797098725402477

e=2^16+1

312617020153885547842 # 252609973320106634334 # 518825790258795106525

==== Elisa ====
öffentlicher Schlüssel: N=11037668287

e=2^16+1

Nachricht 1: 1040696772 # 1954658552 # 9226326299 # 2169845388 # 6789874577 # 8096599615 # 4057777565 # 3151654456 # 4977293038 # 7047938737 # 9617485204 # 3437434927 # 7686064856 # 6396480873

Nachricht 2: 3872097748 # 3611644946

==== Hr. Schubert ====
wer mir eine verschlüsselte Nachricht übermitteln möchte: dieser Schlüssel wird wohl kaum von jemandem geknackt:

N=9999177716624225640368312481900281115015919153430757785279035042197861168218747500611281742497157834041528911756259801424637303723938623740059000432333530372205561857867534065327285106907703968736327601975591348709086599710817389263740273369388981226313461504559125454905080971286160273654762932358469744021933021282154554325710168776868999802254906122010569145632775765125309485233818903562093800786154426708011824170367121267052611284138213235933028531135977876230505692574178791173171991678390706696548416048741281157308475916695248389570632597026188210996295788987688567397912118698166155074833961269074334469993

e=2^16+1


[http://de.wikipedia.org/wiki/RSA_Factoring_Challenge RSA-Factoring-Challenge]