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 == === Ruben === N=2290688290035092561 e=2^16+1 Geheimtext: M=0212462476451503813 # 0279022256428772954 # 0726293796104265093 # 2114811903790655993 # 1906335504232360310 === Leonie === N=2240339100055897937 e=2^16+1 Geheimtext: 0654359698520473788 # 0714763344931688486 === Jan-Niklas === N= 2403979145974083079 e= 2^16+1 Geheimtext: 1144574168890581819 # 1378985832584241735 # 0481305006718517056 # 1219019799248668483 # 2045659868233517824 # 2095097454166360338 # 1428907095981739790 # 1888276514260170453 # 2388039495620387395 # 1829966771082925091 # 0201663210683833497 # 1750427224501664221 # 0013047686796964166 === Luis === N=3688524632749527271 e=2^16+1 === Clemens === N= 75294756853 e= 2^16+1 45256584939 # 40780441162 # 34651636001 # 72415894335 # 13656360090 # 17146556746 === Maximilian === N = 3038043574127449361 e = 2^16+1 C= 1191945890916496238 # 0749104075417921294 # 2050920325587402138 # 2033322791783987871 # 2179912618785326176 # 2153547974032296128 # 0956406643232635675 # 1790666851702612133 === Janine === N=2852579451223911293 e=2^16+1 === Simon === N=2634640713694040663 e=2^16+1 === Ben === N = 1445314283009703157 e = 2^16+1 Text: 0573590867707652411 # 0770343393383693214 # 0626073835735478278 # 0021886460913468891 === Conrad === === Fhüllybpe === N=4125102652534801589 e=2^16+1 Geheimtext: 1815024155428420827 # 3284010809428653411 # 0367427517137291942 # 0504627377733545442 # 1745829803632146976 # 2786027334438664711 # 2352481224462571264 # 2211490466078446646 # 0542925682235426235 # 0291033818027795791 # 2770160186396651385 # 3539585172582904096 # 2716069200541142812 # 1120922036507121308 # 3242417184077934468