übungzurvorlesung„sicherheit“ übung1 thomasagrikola · pdf fileattack on...

74
Übung zur Vorlesung „Sicherheit“ Übung 1 Thomas Agrikola [email protected] 04.05.2017 1 / 36

Upload: vanduong

Post on 06-Feb-2018

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übung zur Vorlesung „Sicherheit“Übung 1

Thomas [email protected]

04.05.2017

1 / 36

Page 2: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Literatur zur Vorlesung

Jonathan Katz, Yehuda Lindell. Introduction to Modern Cryp-tography. ISBN 1-584-88551-3.https://www.cs.umd.edu/~jkatz/imc.html

Ross Andersson. Security Engineering. ISBN 0-470-06852-3.https://www.cl.cam.ac.uk/~rja14/book.html

Skript auf der Vorlesungs-Webseite.

2 / 36

Page 3: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Ein paar Worte zu Übung und Übungsblättern

I Übungsblätter freiwilligI Kein Klausurbonus o.ä.I Aber: Klausur wird sich an den Übungen orientieren!

I Diskussionen/Fragen willkommenI Übung ca. alle 2 Wochen, Donnerstags

I Feedback-Kasten auf WebsiteI für anonymes Feedback

I MailinglisteI Kommunikation, Fragen, Diskussionen, ...

3 / 36

Page 4: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übung: Struktur

I ÜbungsteilI Besprechung des aktuellen ÜbungsblattsI Nicht unbedingt immer alle Aufgaben

I „Tutoriumteil“I Vorbereitung aufs nächste ÜbungsblattI Besprechen von ähnlichen Aufgaben

I Manchmal auch VL-Wiederholung

4 / 36

Page 5: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Experiment: Socrative

https://b.socrative.com/login/student/Room: SICHERHEIT

I App um Quiz durchzuführenI Zugang durch Browser oder AppI Als Quizteilnehmer kein Account notwendig.

5 / 36

Page 6: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Fragen?

6 / 36

Page 7: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Restliche Agenda für heute

I Aufgaben besprechenI VigenèreI BlockchiffrenI Zufallsgenerator (LFSRs)

I Beweisbare SicherheitI One-Time-Pad

7 / 36

Page 8: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Restliche Agenda für heute

I Aufgaben besprechenI VigenèreI BlockchiffrenI Zufallsgenerator (LFSRs)

I Beweisbare SicherheitI One-Time-Pad

7 / 36

Page 9: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1

Aufgabe 1. Gegeben ist der folgende Chiffretext. Ermitteln Sieden dazugehörigen Klartext. (Hinweis: Als Verschlüsselungsme-chanismus wurde das Vigenère-Verfahren benutzt.)

MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEEQDIMIIDRLQNTPWFBZNYNTTQLMAFAGQADDYXOPLIDIWYXFINISZBSCZUOPLIDMNGTTMCCEDTTCVMBEYGWACCPUMOMRWVZUPQLRCSRBSCTXITLXQFEGSDCDCSRICCGAOYGDMJWCAAZOYWMSPWOMATQOUAXCXTWOFEPVZQYOPOCTQVOCROQPQOMATQOUELQXTMQGVEBEMTGJWGWTIYYGOWFLXANEFIMBEYGWJFRMFQDAPQICRLMBEFIDMHCVQWEFIDAHFSIMCCEIICCSRQEGRQQRFXQMYDMRBJDSGZNFEDTPQFMJMYKQELQKAIOCHUVEMFDMLIMZOEFIHQRCRQZPAMBPPPATMYHSTVSYPXJCMGWBSUEUBPQWGJXGXFMOYRQENGTTMCRSFPPHSGZYYPANEFIEWNGIFGZDXTMLPXEESCRNIMZESMDFSIMORLMBEFAMQECWOQAFIDELQIEAPLXUIWJCVCDREZWEFIDZPAVQIEGSZWQRLQDTEIZMCCGUXSCVFPHYMFMDALMTWCRSMOZENJLEIFWMPIMSSGWOQAFIDMYASPMORAUKPUMFPVCCEWQBMRNPPIZBWCRSBSZENJLEIECNAIQLPBMZLPAVKXEGRSIDYQBTPULUKSRYDVPBSGBEMFQBSCTAMXRLQDTQMAVZDWUVMWEXNCCHFMYLCEWYCROZJNXQLLAGAZOGRSBZRLQSPWAAZOCQUTJRLQNTPWFVLKIANECRZGDMREETDINIMZESMYCZQZPVTXITLIPBSCQQBSMHTMFQIPAESHUMDMJNIMZESMDLSFMDPIHMLJXTIEFITIOSWQLEFIYMEFSPTLRIDXFZPUASCHNGVYWUAVGEZLDSKSMDRXTIEFITIOZIQVFQMZOEFIYMEFSPIDCEDTJYWQQRFXQMYDSGZEWWUF

8 / 36

Page 10: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Socrative: Aufgabe 1/Vigenère

https://b.socrative.com/login/student/Room: SICHERHEIT

I App um Quiz durchzuführenI Zugang durch Browser oder AppI Als Quizteilnehmer kein Account notwendig.

9 / 36

Page 11: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1

Lösungsvorschlag zu Aufgabe 1. Beim Brechen von Vigènere-Chiffraten gehen wir wie folgt vor:

I Wir raten die Länge ` des Schlüssels K = K1K2 . . .K`

(oder wir nutzen die Kasiski-, Friedmann- oder dieAutokorrelations-Methode).

I Wir teilen das Chiffrat in ` Teile auf, z.B. für ` = 5:MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE.... . .MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...

I Wir führen eine Frequenzanalyse auf jedem Teiltext durch.

10 / 36

Page 12: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1

Lösungsvorschlag zu Aufgabe 1. Beim Brechen von Vigènere-Chiffraten gehen wir wie folgt vor:

I Wir raten die Länge ` des Schlüssels K = K1K2 . . .K`

(oder wir nutzen die Kasiski-, Friedmann- oder dieAutokorrelations-Methode).

I Wir teilen das Chiffrat in ` Teile auf, z.B. für ` = 5:MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE.... . .MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...

I Wir führen eine Frequenzanalyse auf jedem Teiltext durch.

10 / 36

Page 13: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1

Lösungsvorschlag zu Aufgabe 1. Beim Brechen von Vigènere-Chiffraten gehen wir wie folgt vor:

I Wir raten die Länge ` des Schlüssels K = K1K2 . . .K`

(oder wir nutzen die Kasiski-, Friedmann- oder dieAutokorrelations-Methode).

I Wir teilen das Chiffrat in ` Teile auf, z.B. für ` = 5:MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE.... . .MZMTELFMPLWUFEWXTZPCJDQPBVUKSIEE...

I Wir führen eine Frequenzanalyse auf jedem Teiltext durch.

10 / 36

Page 14: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

A: *********************************B: ******C: ***********D: *****************E: ***************************************************F: *********G: ********H: ************************I: ****************************J: *K: ***L: ****************M: **********N: ***************************O: ******************************P: ********Q:R: ************************S: *************************T: ************************************U: ***********V: ****W: *********X: *Y: ********Z:

Erwartete Buchstabenhäufigkeit im Englischen (Quelle: Wikipedia).11 / 36

Page 15: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1

Vorgehen:I Wir vergleichen die natürliche Alphabetverteilung mit der

Verteilung, die aus der Frequenzanalyse hervorging.

Die Buchstabenverteilung für den obigen Chiffretext und erstenTeiltext, der mit K1 verschlüsselt wurde, sieht wie folgt aus:

12 / 36

Page 16: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1

Vorgehen:I Wir vergleichen die natürliche Alphabetverteilung mit der

Verteilung, die aus der Frequenzanalyse hervorging.

Die Buchstabenverteilung für den obigen Chiffretext und erstenTeiltext, der mit K1 verschlüsselt wurde, sieht wie folgt aus:

12 / 36

Page 17: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

A: ***********B:C: ******D: **E: ********************************F: ******G: *****************H: ***********I: *************************************************************J: ****K: ******L: ***********************M: *************************N:O: ********P: *************Q: ******R: ****************************S: **************************************T: ***************U:V: ***************W: ****************************X: ********************************Y: ********Z: ****

13 / 36

Page 18: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

A: ***********B:C: ******D: **E: ********************************F: ******G: *****************H: ***********I: *************************************************************J: ****K: ******L: ***********************M: *************************N:O: ********P: *************Q: ******R: ****************************S: **************************************T: ***************U:V: ***************W: ****************************X: ********************************Y: ********Z: ****

13 / 36

Page 19: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Vermutlich wurde E (der häufigste Buchstabe im

natürlichen Alphabet) auf I abgebildet. Damit istI− E = E der wahrscheinlichste Kandidat für K1.

I Wir folgen dieser Strategie für K2 bis K5 und erhalteneinen Schlüsselkandidaten: EMIAY

I Beim Entschlüsseln des Chiffretexts mit diesem Schlüsselerhalten wir folgendes Ergebnis:INETGHTEPNSIXEYTHRPEFRIPDRICSKASIDKIWADTHEFTRSTTZPUBLTSHASFCCESDFULGPNERAWATTANKONTSEVIGPNERENIPHECEARL . . .

I Der Schlüssel ist also noch nicht korrekt, also betrachtenwir z.B. die Stelle 4 genauer:

Die Buchstabenverteilung für den obigen Chiffretext und Teil-text, der mit K4 verschlüsselt wurde, sieht wie folgt aus:

14 / 36

Page 20: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Vermutlich wurde E (der häufigste Buchstabe im

natürlichen Alphabet) auf I abgebildet. Damit istI− E = E der wahrscheinlichste Kandidat für K1.

I Wir folgen dieser Strategie für K2 bis K5 und erhalteneinen Schlüsselkandidaten: EMIAY

I Beim Entschlüsseln des Chiffretexts mit diesem Schlüsselerhalten wir folgendes Ergebnis:INETGHTEPNSIXEYTHRPEFRIPDRICSKASIDKIWADTHEFTRSTTZPUBLTSHASFCCESDFULGPNERAWATTANKONTSEVIGPNERENIPHECEARL . . .

I Der Schlüssel ist also noch nicht korrekt, also betrachtenwir z.B. die Stelle 4 genauer:

Die Buchstabenverteilung für den obigen Chiffretext und Teil-text, der mit K4 verschlüsselt wurde, sieht wie folgt aus:

14 / 36

Page 21: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Vermutlich wurde E (der häufigste Buchstabe im

natürlichen Alphabet) auf I abgebildet. Damit istI− E = E der wahrscheinlichste Kandidat für K1.

I Wir folgen dieser Strategie für K2 bis K5 und erhalteneinen Schlüsselkandidaten: EMIAY

I Beim Entschlüsseln des Chiffretexts mit diesem Schlüsselerhalten wir folgendes Ergebnis:INETGHTEPNSIXEYTHRPEFRIPDRICSKASIDKIWADTHEFTRSTTZPUBLTSHASFCCESDFULGPNERAWATTANKONTSEVIGPNERENIPHECEARL . . .

I Der Schlüssel ist also noch nicht korrekt, also betrachtenwir z.B. die Stelle 4 genauer:

Die Buchstabenverteilung für den obigen Chiffretext und Teil-text, der mit K4 verschlüsselt wurde, sieht wie folgt aus:

14 / 36

Page 22: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Vermutlich wurde E (der häufigste Buchstabe im

natürlichen Alphabet) auf I abgebildet. Damit istI− E = E der wahrscheinlichste Kandidat für K1.

I Wir folgen dieser Strategie für K2 bis K5 und erhalteneinen Schlüsselkandidaten: EMIAY

I Beim Entschlüsseln des Chiffretexts mit diesem Schlüsselerhalten wir folgendes Ergebnis:INETGHTEPNSIXEYTHRPEFRIPDRICSKASIDKIWADTHEFTRSTTZPUBLTSHASFCCESDFULGPNERAWATTANKONTSEVIGPNERENIPHECEARL . . .

I Der Schlüssel ist also noch nicht korrekt, also betrachtenwir z.B. die Stelle 4 genauer:

Die Buchstabenverteilung für den obigen Chiffretext und Teil-text, der mit K4 verschlüsselt wurde, sieht wie folgt aus:

14 / 36

Page 23: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Vermutlich wurde E (der häufigste Buchstabe im

natürlichen Alphabet) auf I abgebildet. Damit istI− E = E der wahrscheinlichste Kandidat für K1.

I Wir folgen dieser Strategie für K2 bis K5 und erhalteneinen Schlüsselkandidaten: EMIAY

I Beim Entschlüsseln des Chiffretexts mit diesem Schlüsselerhalten wir folgendes Ergebnis:INETGHTEPNSIXEYTHRPEFRIPDRICSKASIDKIWADTHEFTRSTTZPUBLTSHASFCCESDFULGPNERAWATTANKONTSEVIGPNERENIPHECEARL . . .

I Der Schlüssel ist also noch nicht korrekt, also betrachtenwir z.B. die Stelle 4 genauer:

Die Buchstabenverteilung für den obigen Chiffretext und Teil-text, der mit K4 verschlüsselt wurde, sieht wie folgt aus:

14 / 36

Page 24: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

A: ****B:C: *********************D: **********************************E: *********************************************************F: *************G:H: ******I:J: ********K:L: ***********************M: *************N: *************O: ******************************P: ***********************************************Q: ******R: ********S: ******************************T: *************************U:V: ******W: *************X: ******Y: *********************Z: *************

15 / 36

Page 25: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

A: ****B:C: *********************D: **********************************E: *********************************************************F: *************G:H: ******I:J: ********K:L: ***********************M: *************N: *************O: ******************************P: ***********************************************Q: ******R: ********S: ******************************T: *************************U:V: ******W: *************X: ******Y: *********************Z: *************

15 / 36

Page 26: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Der Buchstabe E könnte beim Verschlüsseln auch auf den

zweithäufigsten Buchstaben P abgebildet worden sein.Damit wäre P− E = L ein Kandidat für K4.

I Entschlüsseln mit dem Schlüssel EMILY ergibt (unterHinzufügen von Groß-/Kleinschreibung, Leer- undSatzzeichen und Ersetzen von Zahlwörtern) den Klartext:

In 1863 Friedrich Kasiski was the first to publish a successful general

attack on the Vigenère cipher. Earlier attacks relied on knowledge of

the plaintext, or use of a recognizable word as a key. Kasiski’s method

had no such dependencies. Kasiski was the first to publish an account of

the attack, but it is clear that there were others who were aware of it.

In 1854, Charles Babbage was goaded into breaking the Vigenère cipher

when John Hall Brock Thwaites submitted a ’new’ cipher to the Journal of

the Society of the Arts....

http://en.wikipedia.org/wiki/Vigenère_cipher

16 / 36

Page 27: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 1I Der Buchstabe E könnte beim Verschlüsseln auch auf den

zweithäufigsten Buchstaben P abgebildet worden sein.Damit wäre P− E = L ein Kandidat für K4.

I Entschlüsseln mit dem Schlüssel EMILY ergibt (unterHinzufügen von Groß-/Kleinschreibung, Leer- undSatzzeichen und Ersetzen von Zahlwörtern) den Klartext:

In 1863 Friedrich Kasiski was the first to publish a successful general

attack on the Vigenère cipher. Earlier attacks relied on knowledge of

the plaintext, or use of a recognizable word as a key. Kasiski’s method

had no such dependencies. Kasiski was the first to publish an account of

the attack, but it is clear that there were others who were aware of it.

In 1854, Charles Babbage was goaded into breaking the Vigenère cipher

when John Hall Brock Thwaites submitted a ’new’ cipher to the Journal of

the Society of the Arts....

http://en.wikipedia.org/wiki/Vigenère_cipher16 / 36

Page 28: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Socrative: Blockchiffren

https://b.socrative.com/login/student/Room: SICHERHEIT

I App um Quiz durchzuführenI Zugang durch Browser oder AppI Als Quizteilnehmer kein Account notwendig.

17 / 36

Page 29: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2

Wir wissen, dass die Blockchiffre (E,D) : {0, 1}8 × {0, 1}4 →{0, 1}4 bei Eingabe eines festen Schlüssels K0 eine Eingabe Mwie folgt auf eine Ausgabe C := E(K0,M) abbildet:

M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

Verschlüsseln Sie die Klartexte M1 = 0100 0111 0100 0001 undM2 = 0100 1101 0100 0001 unter K0 in den Betriebsmodi ECB,CBC, und CTR. Wählen Sie, falls nötig, einen geeigneten Initia-lisierungsvektor.

18 / 36

Page 30: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000

C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 31: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111

C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 32: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101

C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 33: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101

C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 34: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101

C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 35: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010

C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 36: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2M 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001C 0000 0001 1001 1110 1111 1011 0111 0110 1101 0010M 1010 1011 1100 1101 1110 1111C 1100 0101 1010 0100 0011 1000

CBC-Mode:I C0 := IVI Ci := E(K0,M1,i ⊕ Ci−1)I M1 = 0100 0111 0100 0001

C0 = IV = 0000C1 = E(K0, 0100⊕ 0000) = E(K0, 0100) = 1111C2 = E(K0, 0111⊕ 1111) = E(K0, 1000) = 1101C3 = E(K0, 0100⊕ 1101) = E(K0, 1001) = 0010C4 = E(K0, 0001⊕ 0010) = E(K0, 0011) = 1110⇒ C = 1111 1101 0010 1110(Rest analog)

19 / 36

Page 37: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2

Worauf sollte bei der Wahl eines Initialisierungsvektors IV inden einzelnen Modi geachtet werden?

Der IV muss für jede Verschlüsselung neu zufällig gleichverteiltgewählt werden!(Warum: Siehe nächstes Übungsblatt)

20 / 36

Page 38: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 2

Worauf sollte bei der Wahl eines Initialisierungsvektors IV inden einzelnen Modi geachtet werden?

Der IV muss für jede Verschlüsselung neu zufällig gleichverteiltgewählt werden!(Warum: Siehe nächstes Übungsblatt)

20 / 36

Page 39: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Demo: Verwundbarkeit von CBCVerschlüsselung:

EKey

C₁

M₁

EKey

C₂

M₂

EKey

C₃

M₃

Initialisierungsvektor (IV)

Nachricht

Ciphertext

Entschlüsselung:

DKey

M₁

C₁

Initialisierungsvektor (IV)

DKey

M₂

C₂

DKey

M₃

C₃Ciphertext

Nachricht

Hier: Setze C1 := C1,alt ⊕ M2 ⊕ M ′, dann entschlüsselt C2 zuM ′.Quelle: Wikipedia

21 / 36

Page 40: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Demo: Verwundbarkeit von CBCVerschlüsselung:

EKey

C₁

M₁

EKey

C₂

M₂

EKey

C₃

M₃

Initialisierungsvektor (IV)

Nachricht

Ciphertext

Entschlüsselung:

DKey

M₁

C₁

Initialisierungsvektor (IV)

DKey

M₂

C₂

DKey

M₃

C₃Ciphertext

Nachricht

Hier: Setze C1 := C1,alt ⊕ M2 ⊕ M ′, dann entschlüsselt C2 zuM ′.Quelle: Wikipedia

21 / 36

Page 41: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Betriebsmodus: Xor-Encrypt-Xor (XEX)Benutze verschiedene Schlüssel für Erzeugung des Initialisie-rungsvektors und für eigentliche Block-Verschlüsselung.

XEX mode encryption

block cipherencryption

Key₁

Ciphertext

Plaintext

block cipherencryption

Plaintext

Key₁

block cipherencryption

Key₂

i α

Ciphertext

block cipherencryption

Plaintext

Key₁

α

Ciphertext

α

I IV := E(k2, i) (i ist die Nummer des Sektors)I Xj := IV ⊗ αj−1

I Cj := E (k1, (Mj ⊕ Xj))⊕ Xj

Quelle: Wikipedia

22 / 36

Page 42: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Betriebsmodus: Xor-Encrypt-Xor (XEX)Benutze verschiedene Schlüssel für Erzeugung des Initialisie-rungsvektors und für eigentliche Block-Verschlüsselung.

XEX mode encryption

block cipherencryption

Key₁

Ciphertext

Plaintext

block cipherencryption

Plaintext

Key₁

block cipherencryption

Key₂

i α

Ciphertext

block cipherencryption

Plaintext

Key₁

α

Ciphertext

α

I IV := E(k2, i) (i ist die Nummer des Sektors)I Xj := IV ⊗ αj−1

I Cj := E (k1, (Mj ⊕ Xj))⊕ Xj

Quelle: Wikipedia

22 / 36

Page 43: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Betriebsmodus: Xor-Encrypt-Xor (XEX)

Vor-/Nachteile:I Chiffrate abhängig von Sektor-Adresse i und Position des

Blocks j innerhalb des SektorsI Ver- und Entschlüsselung parallelisierbarI keine XOR-Homomorphie, aber: keine explizite

Prüfsumme wie GCM

23 / 36

Page 44: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Betriebsmodus: XEX-based tweaked-codebookmode with ciphertext stealing (XTS)

Ciphertext-stealing ermöglicht es den Betriebsmodus auf Nach-richten anzuwenden, die nicht durch die Blockgröße teilbar sind

XEX with tweak and ciphertext stealing (XTS) mode encryption

block cipherencryption

Key₁

Ciphertext

Plaintext

block cipherencryption

Plaintext

Key₁

block cipherencryption

Key₂

i α

Ciphertext

block cipherencryption

Plaintext

Key₁

α

Ciphertext

Quelle: Wikipedia

24 / 36

Page 45: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Betriebsmodus: XEX-based tweaked-codebookmode with ciphertext stealing (XTS)

Vor-/Nachteile:I wie XEXI Nachrichten müssen nicht durch Blocklänge teilbar sein

25 / 36

Page 46: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

Linear feedback shift register (LFSR):I Schlüssel K bitweise in Speicherzellen angeordnet:

K1 K2 . . . Kk

I Bei Zustandsupdate wird neues Bit erzeugt (αi ∈ {0, 1}):

K1 K2 . . . Kk↓ ·α1 ↓ ·α2 . . . ↓ ·αk−−−−−−−−−−−−−−−−−−−−−→ Kk+1 := ∑k

i=1 αiKi mod 2I Ausgabe ist c1 := K1, neuer Zustand ist:

K2 . . . Kk Kk+1

26 / 36

Page 47: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

Linear feedback shift register (LFSR):I Schlüssel K bitweise in Speicherzellen angeordnet:

K1 K2 . . . Kk

I Bei Zustandsupdate wird neues Bit erzeugt (αi ∈ {0, 1}):

K1 K2 . . . Kk↓ ·α1 ↓ ·α2 . . . ↓ ·αk−−−−−−−−−−−−−−−−−−−−−→ Kk+1 := ∑k

i=1 αiKi mod 2

I Ausgabe ist c1 := K1, neuer Zustand ist:K2 . . . Kk Kk+1

26 / 36

Page 48: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

Linear feedback shift register (LFSR):I Schlüssel K bitweise in Speicherzellen angeordnet:

K1 K2 . . . Kk

I Bei Zustandsupdate wird neues Bit erzeugt (αi ∈ {0, 1}):

K1 K2 . . . Kk↓ ·α1 ↓ ·α2 . . . ↓ ·αk−−−−−−−−−−−−−−−−−−−−−→ Kk+1 := ∑k

i=1 αiKi mod 2I Ausgabe ist c1 := K1, neuer Zustand ist:

K2 . . . Kk Kk+1

26 / 36

Page 49: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Socrative: Aufgabe 4/LFSR

https://b.socrative.com/login/student/Room: SICHERHEIT

I App um Quiz durchzuführenI Zugang durch Browser oder AppI Als Quizteilnehmer kein Account notwendig.

27 / 36

Page 50: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

I Wir müssen davon ausgehen, dass die Bits des initialenZustands K1, . . . ,Kk unabhängig gewählt sind.

I Die ersten k Ausgabe-Bits sind genau K1, . . . ,Kk .I Wir können also nicht hoffen eines dieser Bits

vorherzusagen.

I Wie sieht es mit einem der nächsten k Bits aus?

28 / 36

Page 51: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

I Wir müssen davon ausgehen, dass die Bits des initialenZustands K1, . . . ,Kk unabhängig gewählt sind.

I Die ersten k Ausgabe-Bits sind genau K1, . . . ,Kk .I Wir können also nicht hoffen eines dieser Bits

vorherzusagen.I Wie sieht es mit einem der nächsten k Bits aus?

28 / 36

Page 52: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Jedes weitere Ausgabe-Bit ck+j für j ≥ 1 kann als

Produkt geschrieben werden:

ck+j = Kk+j = (Kj , . . . ,Kk+j−1) ·

α1...αk

I Also ergeben sich die Ausgabe-Bits ck+1, . . . , c2k alsMatrix-Vektor-Produkt:

K1 . . . KkK2 . . . Kk+1... ...

︸ ︷︷ ︸

=:A

·

α1...αk

=

ck+1...

c2k

.

29 / 36

Page 53: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Jedes weitere Ausgabe-Bit ck+j für j ≥ 1 kann als

Produkt geschrieben werden:

ck+j = Kk+j = (Kj , . . . ,Kk+j−1) ·

α1...αk

I Also ergeben sich die Ausgabe-Bits ck+1, . . . , c2k als

Matrix-Vektor-Produkt:K1 . . . KkK2 . . . Kk+1... ...

︸ ︷︷ ︸

=:A

·

α1...αk

=

ck+1...

c2k

.

29 / 36

Page 54: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

I Fall 1: Die so entstehende Matrix A ist invertierbar (in(Z/2Z

)k×k).

I Wir können die geheimen Gewichte α1, . . . , αk direktberechnen: α1

...αk

= A−1 ·

ck+1...

c2k

.

I Jedes weitere Ausgabe-Bit kann vorhergesagt werden.

30 / 36

Page 55: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

I Fall 1: Die so entstehende Matrix A ist invertierbar (in(Z/2Z

)k×k).

I Wir können die geheimen Gewichte α1, . . . , αk direktberechnen: α1

...αk

= A−1 ·

ck+1...

c2k

.

I Jedes weitere Ausgabe-Bit kann vorhergesagt werden.

30 / 36

Page 56: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4

I Fall 1: Die so entstehende Matrix A ist invertierbar (in(Z/2Z

)k×k).

I Wir können die geheimen Gewichte α1, . . . , αk direktberechnen: α1

...αk

= A−1 ·

ck+1...

c2k

.

I Jedes weitere Ausgabe-Bit kann vorhergesagt werden.

30 / 36

Page 57: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Fall 2: Die Matrix A ist nicht invertierbar.

I Dann gibt es ein (kleinstes) j , sodass die j-te Zeile Zjvon A eine Linearkombination der Zeilen Z1, . . . ,Zj−1 ist.

Zj =j−1∑i=1

γi · Zi

I Dann können wir das Ausgabe-Bit ck+j vorhersagen!

ck+j = Zj ·

α1...αk

= (j−1∑i=1

γi · Zi) ·

α1...αk

=j−1∑i=1

γi · Zi ·

α1...αk

︸ ︷︷ ︸

=ck+i

.

31 / 36

Page 58: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Fall 2: Die Matrix A ist nicht invertierbar.

I Dann gibt es ein (kleinstes) j , sodass die j-te Zeile Zjvon A eine Linearkombination der Zeilen Z1, . . . ,Zj−1 ist.

Zj =j−1∑i=1

γi · Zi

I Dann können wir das Ausgabe-Bit ck+j vorhersagen!

ck+j = Zj ·

α1...αk

= (j−1∑i=1

γi · Zi) ·

α1...αk

=j−1∑i=1

γi · Zi ·

α1...αk

︸ ︷︷ ︸

=ck+i

.

31 / 36

Page 59: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Fall 2: Die Matrix A ist nicht invertierbar.

I Dann gibt es ein (kleinstes) j , sodass die j-te Zeile Zjvon A eine Linearkombination der Zeilen Z1, . . . ,Zj−1 ist.

Zj =j−1∑i=1

γi · Zi

I Dann können wir das Ausgabe-Bit ck+j vorhersagen!

ck+j = Zj ·

α1...αk

= (j−1∑i=1

γi · Zi) ·

α1...αk

=j−1∑i=1

γi · Zi ·

α1...αk

︸ ︷︷ ︸

=ck+i

.

31 / 36

Page 60: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Übungsblatt 1 – Aufgabe 4I Fall 2: Die Matrix A ist nicht invertierbar.

I Dann gibt es ein (kleinstes) j , sodass die j-te Zeile Zjvon A eine Linearkombination der Zeilen Z1, . . . ,Zj−1 ist.

Zj =j−1∑i=1

γi · Zi

I Dann können wir das Ausgabe-Bit ck+j vorhersagen!

ck+j = Zj ·

α1...αk

= (j−1∑i=1

γi · Zi) ·

α1...αk

=j−1∑i=1

γi · Zi ·

α1...αk

︸ ︷︷ ︸

=ck+i

.

31 / 36

Page 61: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wann ist ein Baustein sicher?

I Problem:

I In vielen Fällen nicht offensichtlich, ob ein Bausteinsicher ist.

I (Im Gegensatz zu z.B. der Effizienz von Algorithmen.)I Lösung: Beweisbare Sicherheit

32 / 36

Page 62: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wann ist ein Baustein sicher?

I Problem:I In vielen Fällen nicht offensichtlich, ob ein Baustein

sicher ist.I (Im Gegensatz zu z.B. der Effizienz von Algorithmen.)

I Lösung: Beweisbare Sicherheit

32 / 36

Page 63: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wann ist ein Baustein sicher?

I Problem:I In vielen Fällen nicht offensichtlich, ob ein Baustein

sicher ist.I (Im Gegensatz zu z.B. der Effizienz von Algorithmen.)

I Lösung: Beweisbare Sicherheit

32 / 36

Page 64: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Was soll ein kryptographischer Baustein eigentlichleisten?

I Es ist wichtig, klar zu definieren, was wir mit “sicher”meinen.

I In vielen Fällen fordern wir von einem “sicheren”Baustein, dass es für effiziente Angreifer nicht möglichist ein bestimmtes Ziel zu erreichen.

I (Mit “effizienten Angreifern” meinen wir Algorithmenmit polynomieller Laufzeit.)

33 / 36

Page 65: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Was soll ein kryptographischer Baustein eigentlichleisten?

I Es ist wichtig, klar zu definieren, was wir mit “sicher”meinen.

I In vielen Fällen fordern wir von einem “sicheren”Baustein, dass es für effiziente Angreifer nicht möglichist ein bestimmtes Ziel zu erreichen.

I (Mit “effizienten Angreifern” meinen wir Algorithmenmit polynomieller Laufzeit.)

33 / 36

Page 66: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Was soll ein kryptographischer Baustein eigentlichleisten?

Beispiel:I Von einem Verschlüsselungsverfahren werden wir fordern,

dass effiziente Angreifer Chiffrate nicht entschlüsselnkönnen.

I Um diese Eigenschaft zu beweisen, müssen wirmindestens annehmen, dass P 6= NP ist.

I Wieso?

34 / 36

Page 67: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Was soll ein kryptographischer Baustein eigentlichleisten?

Beispiel:I Von einem Verschlüsselungsverfahren werden wir fordern,

dass effiziente Angreifer Chiffrate nicht entschlüsselnkönnen.

I Um diese Eigenschaft zu beweisen, müssen wirmindestens annehmen, dass P 6= NP ist.

I Wieso?

34 / 36

Page 68: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wie können wir Sicherheit beweisen?

I In vielen Fällen sind komplexitätstheoretische Annahmennötig, um die Sicherheit von Bausteinen zu beweisen.

I Die verwendeten Annahmen sind lange bekannt und gutuntersucht (implizieren aber in vielen Fällen P 6= NP,können also mit aktuellen Techniken nicht bewiesenwerden).

I Ein Sicherheitsbeweis sieht dann so aus:

I Zeige, dass man aus einem ein erfolgreicher Angreiferauf den Baustein einen erfolgreichen Angreifer auf diezugrunde liegende Annahme konstruieren kann(Reduktion).

I Mehr dazu in der nächsten Vorlesung

35 / 36

Page 69: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wie können wir Sicherheit beweisen?

I In vielen Fällen sind komplexitätstheoretische Annahmennötig, um die Sicherheit von Bausteinen zu beweisen.

I Die verwendeten Annahmen sind lange bekannt und gutuntersucht (implizieren aber in vielen Fällen P 6= NP,können also mit aktuellen Techniken nicht bewiesenwerden).

I Ein Sicherheitsbeweis sieht dann so aus:

I Zeige, dass man aus einem ein erfolgreicher Angreiferauf den Baustein einen erfolgreichen Angreifer auf diezugrunde liegende Annahme konstruieren kann(Reduktion).

I Mehr dazu in der nächsten Vorlesung

35 / 36

Page 70: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

Wie können wir Sicherheit beweisen?

I In vielen Fällen sind komplexitätstheoretische Annahmennötig, um die Sicherheit von Bausteinen zu beweisen.

I Die verwendeten Annahmen sind lange bekannt und gutuntersucht (implizieren aber in vielen Fällen P 6= NP,können also mit aktuellen Techniken nicht bewiesenwerden).

I Ein Sicherheitsbeweis sieht dann so aus:I Zeige, dass man aus einem ein erfolgreicher Angreifer

auf den Baustein einen erfolgreichen Angreifer auf diezugrunde liegende Annahme konstruieren kann(Reduktion).

I Mehr dazu in der nächsten Vorlesung

35 / 36

Page 71: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

OTP – mehrfache Verwendung eines Schlüssels

⊕ =

⊕ =

⊕ =

36 / 36

Page 72: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

OTP – mehrfache Verwendung eines Schlüssels

⊕ =

⊕ =

⊕ =

36 / 36

Page 73: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

OTP – mehrfache Verwendung eines Schlüssels

⊕ =

⊕ =

⊕ =

36 / 36

Page 74: ÜbungzurVorlesung„Sicherheit“ Übung1 ThomasAgrikola · PDF fileattack on the Vigenère cipher. Earlier attacks relied on knowledge of the plaintext, or use of a recognizable

OTP – mehrfache Verwendung eines Schlüssels

⊕ =

⊕ =

⊕ =

36 / 36