Kryptographische Hashalgorithmen Pache Axel: [email protected] Matr.:...
-
Upload
ewald-kertz -
Category
Documents
-
view
121 -
download
2
Transcript of Kryptographische Hashalgorithmen Pache Axel: [email protected] Matr.:...
![Page 1: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/1.jpg)
Kryptographische Hashalgorithmen
Pache Axel: [email protected] Matr.: 0021226Butt Usman: [email protected] Matr.: 0020011Finder Victor: [email protected] Matr.: 0020302 Vuray Thomas: [email protected] Matr.: 0020085
![Page 2: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/2.jpg)
Übersicht• Hashfunktionen
• MDC/MAC
• Anforderungen an Hashfunktionen
• MD4
• MD5
• MDC2
• MDC4
• SHA/SHA1
• CBC-Based MAC
• Angriffmöglichkeiten
![Page 3: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/3.jpg)
Grundlagen Hashfunktionen
Definition: Eine Hashfunktion h bildet eine
Nachricht x auf einen Hashwert h(x) ab und muss
folgende Eigenschaften erfüllen:
• Kompression (compression): Die Funktion h bildet von einer Nachricht beliebiger Länge auf einen Hashwert fester Länge ab.
• leichte Berechenbarkeit (ease of computation): Bei gegebener Hashfunktion h und Nachricht x muss es leicht sein (Rechenaufwand) h(x) zu berechnen.
![Page 4: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/4.jpg)
Datenintegrität- und Authentifizierung
• Datenintegrität: Dient dazu sicherzustellen, ob Daten auf ihrem Übertragungsweg unrechtmässig manipuliert worden sind.
• Datenauthentifizierung: Dient dazu festzustellen, ob eine Nachricht von einer bestimmten Quelle stammt.
![Page 5: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/5.jpg)
Keyed- unkeyed Hashfunctions
Bei kryptographischen Hashfunktionen unterscheiden wir:
• unkeyed Hashfunctions (MDC) haben als Eingabeparameter lediglich die zu codierende Nachricht x.
• keyed Hashfunctions (MAC) haben als Eingabeparameter die zu codierende Nachricht x und einen Schlüssel k.
![Page 6: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/6.jpg)
Modification Detection Code (MDC)
Bei MDC s unterscheidet man zwischen:
• One Way Hashfunctions (OWHF) preimage resistance, 2nd preimage resistance
• Collision resistant Hashfunctions (CRHF)
2nd preimage resistance, collision resistance
![Page 7: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/7.jpg)
Modification Detection Code (MDC) II
An MDCs werden folgende Anforderungen gestellt:
• Sicherheit des Urbilds (preimage resistance): Zu einem gegebenen Hashwert y ist es nicht möglich eine Nachricht x' zu finden sodass gilt h(x') = y
![Page 8: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/8.jpg)
Modification Detection Code (MDC)III
• Sicherheit des Abbilds (2nd preimage resistance): Zu einem gegebenem Input x, ist es nicht möglich eine zweite Eingabe x' zu finden, sodass für alle x'≠x gilt: h(x) = h(x')
• Kollisionssicherheit (collision resistance):
Es ist nicht möglich 2 beliebige Eingaben x, x' zu finden: sodass gilt: h(x) = h(x')
![Page 9: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/9.jpg)
Message Authentication Code (MAC)
An MACs werden folgende Anforderungen gestellt:
• Nichtberechenbarkeit (computation resistance): Es ist nicht möglich aus gegebenen Text-Hashwert-Paaren (x, hk(x)) neue Paare
(x', hk(x')) abzuleiten, für die gilt: x ≠ x'.
![Page 10: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/10.jpg)
Der MD4 Algorithmus
• Message Digest (MD) wurde von Ron Rivest entworfen.
• MD2 bzw. MD4 wurden anhand auftretender Schwachstellen weiter entwickelt.
• Der MD4 Algorithmus, welcher die Basis für SHA bildet, wurde 1990 entwickelt.
• 128bit Hashwert.
• Für 32bit Architekturen entworfen.
• kompakte Codierung.
![Page 11: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/11.jpg)
Die MD Familie
![Page 12: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/12.jpg)
MD4 vs. MD5 (Unterschiede)
MD5 stellt eine Weiterentwicklung von MD4 dar.
• eine zusätzliche Runde wurde eingefügt
• unterschiedliche Funktionen und Konstanten
• Arbeitsschritte ähnlich MD4
![Page 13: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/13.jpg)
Der MDC-2 Algorithmus
• Modification Detection Codes
• 1988 entwickelt von IBM
• Einweghashfunktion
• Anwendung mit DES (Data Encryption Standard )
• zwei Verkettungsvariablen
• Hashwert
![Page 14: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/14.jpg)
Der MDC4-Algorithmus
• MDC-4 unterscheidet sich von MDC-2 nur dadurch, dass auf das Ergebnis die gesamte Operation ein weiteres Mal mit vertauschten Rollen angewendet wird.
![Page 15: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/15.jpg)
Der SHA Algorithmus
• Secure Hash Algorithm • Wurde vom NIST (National Institute of
Standards and Technology und National Security Agency (NSA) entwickelt
• Einweg-Hashfunktion für Digital Signature Standard (DSS)
• Der Standard heißt Secure Hash Standard (SHS)
• 264 Bits maximaler Länge• Hashwert der Länge 160bit• Prinzip des Message Digest
![Page 16: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/16.jpg)
Sicherheit des SHA-Algorithmus
• Durch 160bit Hash wesentlich wiederstandsfähiger gegen Brute-Force- Angriffe
• Angriffe wie die von Dobbertin gegen MD4, MD5 sind zur Zeit keine bekannt.
![Page 17: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/17.jpg)
Vergleich von MD5 und SHA
MD5 SHAErgebnislänge: 128bit 160bit
Eingabeeinheit: 512bit512bit
# Schritte: 64 80
# nichtlinearer Funktionen: 4 3
# Additionskonstanten: 64 4
![Page 18: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/18.jpg)
SHA vs. SHA-1 (Unterschiede)• Wurde von NIST und NSA im April, 1995
entwickelt. SHA-1ist die Revision vom 1992 veröffentlichen SHA, die eine nichtpublizierte Schwäche korrigiert.
Eigenschaften:• hoch entwickeltere Aufbereitung der
Anzeige Wörter• Etwas langsamer als MD5 dafür sicher• Benutzt fünf 32bit Register statt vier.
![Page 19: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/19.jpg)
MACs basierend auf Blockchiffrier Algorithmen
Viele bekannte MACs basieren auf einem Blockchiffrier Algorithmus in Kombination mit cipher-block-chaining (CBC)
![Page 20: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/20.jpg)
CBC-MAC
• Input: Nachricht x, Blockchiffrierung , geheimer MAC-Schlüssel k für .
• Output: n-bit MAC für die Nachricht x wobei n die Blocklänge von darstellt.
1. Padding: Nachricht x wird in n-bit Blöcke zerlegt und falls nötig mit einer 1 und der notwendigen Anzahl an 0 gepaddet.
![Page 21: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/21.jpg)
CBC-MAC II2. CBC-Berechnung: k bezeichnet die
Chiffrierung unter Verwendung von mit dem Schlüssel k. Die Anzahl der Nachrichten Blöcke der Grösse n werden von t dargestellt.
Der MAC Wert wird folgendermasen berechnet:
H1 = k(xi)
Hi = k(Hi-1 XOR xi ); 2≤i≤t
![Page 22: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/22.jpg)
Verschiedene Übertragungsmöglichkeiten
![Page 23: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/23.jpg)
Angriffsmöglichkeiten auf Hashalgorithmen
Type Design Goal strength Adversary' goalOHWF preimage resistance; produce preimage
2nd-preimage resistanceCRHF collision resistance produce any collisionMAC key non-recovery; find MAC key;
computation resistance produce new (msg, MAC)
2n
2n find 2nd input, same image2n/2
2t
Pf=max(2-t,2-n)
![Page 24: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/24.jpg)
Angriffsmöglichkeiten auf Hashalgorithmen II
• Grundsätzlich wird unterschieden zwischen Verfahren, die Schwachstellen im Algorithmus ausnützen und unabhängige Angriffsmöglichkeiten.
• Für eine n-bit Hashfunktion h kann man annehmen, durch zufälliges Probieren nach 2n Versuchen ein preimage oder 2nd-preimage zu finden.
![Page 25: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/25.jpg)
Angriffsmöglichkeiten auf Hashalgorithmen III
• Kollisionen können mit 2n/2 Versuchen gefunden werden.
• Algorithmus unabhängige Angriffe: -Birthday-attacks: Haben das Ziel Kollisionen in Hashfunktionen zu finden. Dabei wird das Prinzip des Geburtstagsparadoxons ausgenützt. (Brute-force Angriff).
![Page 26: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/26.jpg)
Referenzen
• Handbook or Applied Cryptography A. Menezes, P. van Oorschot, S. Vanstone CRC Press 1996
http://www.cacr.math.uwaterloo.ca/hac
• Cryptographic Hash Functions: A Survey S. Bakhtiari, R. Safavi-Naini, J. Pieprzyk
![Page 27: Kryptographische Hashalgorithmen Pache Axel: apache@cosy.sbg.ac.at Matr.: 0021226apache@cosy.sbg.ac.at Butt Usman: ubutt@cosy.sbg.ac.at Matr.: 0020011ubutt@cosy.sbg.ac.at.](https://reader033.fdocuments.us/reader033/viewer/2022050920/55204d7249795902118c4d94/html5/thumbnails/27.jpg)
Ende