Cryptographic Hash Functions and Protocol Analysis

Slides:



Advertisements
Similar presentations
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Advertisements

Lecture 5: Cryptographic Hashes
Digital Signatures and Hash Functions. Digital Signatures.
Outline Project 1 Hash functions and its application on security Modern cryptographic hash functions and message digest –MD5 –SHA.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
PIITMadhumita Chatterjee Security 1 Hashes and Message Digests.
Hash functions a hash function produces a fingerprint of some file/message/data h = H(M)  condenses a variable-length message M  to a fixed-sized fingerprint.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Information Security and Management 11
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
CS526Topic 5: Hash Functions and Message Authentication 1 Computer Security CS 526 Topic 5 Cryptography: Cryptographic Hash Functions And Message Authentication.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
Network Security Essentials Fifth Edition by William Stallings Fifth Edition by William Stallings.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Bob can sign a message using a digital signature generation algorithm
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Acknowledgements: William Stallings.William Stallings All rights Reserved Session 4 Public Key Cryptography (Part 2) Network Security Essentials Application.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
HASH Functions.
Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester ITGD 2202 University of Palestine.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
CSCE 201 Introduction to Information Security Fall 2010 Data Protection.
Message Authentication Code July Message Authentication Problem  Message Authentication is concerned with:  protecting the integrity of a message.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Public Key Encryption Terminology RSA Hash functions CSCE Farkas.
Chapter 21 Public-Key Cryptography and Message Authentication.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
CSCI 172/283 Fall 2010 Hash Functions, HMACs, and Digital Signatures.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
CSCE 815 Network Security Lecture 8 SHA Operation and Kerberos.
Slide 1 EJ Jung Hash Functions. Integrity checks.
Chapter 2 Advanced Cryptography (Part C)
1 Number Theory and Advanced Cryptography 6. Digital Signature Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Protocol Analysis. CSCE Farkas 2 Cryptographic Protocols Two or more parties Communication over insecure network Cryptography used to achieve goal.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.3 Hash Functions.
Cryptography and Network Security
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
Information Security and Management 11. Cryptographic Hash Functions Chih-Hung Wang Fall
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 13.Message Authentication.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Protocol Analysis.
Cryptographic Hash Function
ICS 454 Principles of Cryptography
ICS 454 Principles of Cryptography
Presentation transcript:

Cryptographic Hash Functions and Protocol Analysis

Hash Functions Hash function h maps an input x of arbitrary length to a fixed length output h(x) (compression) Accidental or intentional change to the data will change the hash value Given h and x, h(x) is easy to compute (ease of computation) Lecture 8-9 CSCE 522 - Farkas 2

Good Hash Function It is easy to compute the hash value for any given message It is infeasible to find a message that has a given hash It is infeasible to modify a message without changing its hash It is infeasible to find two different messages with the same hash Lecture 8-9 CSCE 522 - Farkas 3

Hash functions Preimage resistant (one-way): if for all specified outputs, it is computationally infeasible to find any input that hashes to that output Second-preimage resistent (weak collision resistant): if it is computationally infeasible to find any second input which has the same output as any specified input Collision resistant (strong collision resistant): if it is computationally infeasible to find any two distinct inputs that has the same output Lecture 8-9 CSCE 522 - Farkas 4

Attacks First preimage attack: given a hash h, find a message m such that hash(m) = h Second preimage attack: given a fixed message m1, find a different message m2 such that hash(m2) = hash(m1) Attack complexity: 2n (considered too high for a typical output size of n=160 bits) Practical attacks: Collision attack Lecture 8-9 CSCE 522 - Farkas 5

Collision Attack Birthday attack: Cryptographic attack Exploits the mathematics behind the birthday problem in probability theory Given a function ƒ, the goal of the attack is to find two different inputs x1, x2 such that ƒ(x1) = ƒ(x2) Method: evaluate the function ƒ for different input values that may be chosen randomly or pseudorandomly until the same result is found more than once (complexity is 2n/2) Lecture 8-9 CSCE 522 - Farkas 6

Hash Functions Message digest Used for authenticity (sign hash value of a message) and integrity purposes Algorithms: SHA-1,MD2,MD4, MD5 Lecture 8-9 CSCE 522 - Farkas 7

MD5 Message Digest Algorithm Input of arbitrary length Output: 128 bits Block size: 512 bits 1991: designed by Ron Rivest to replace MD4 1996, …, 2008: Weaknesses in MD5 Cryptographically broken Lecture 8-9 CSCE 522 - Farkas 8

MD6 MD6 was submitted to the NIST SHA-3 competition July 1, 2009: Rivest posted a comment at NIST that MD6 is not yet ready to be candidated for SHA-3 speed issues and inability to supply a proof of security for a faster reduced-round version Lecture 8-9 CSCE 522 - Farkas 9

MD5 Processing Append padding bits so length  448 mod 512 (padded message 64 bits less than an integer multiplied by 512) Append length: a 64-bit representation of the length of the original message (before the padding)  total length of message k*512 bits Initialize MD buffer: 128-bit buffer holds intermediate and final results (4 32-bit registers, ABCD) Lecture 8-9 CSCE 522 - Farkas 10

MD5 Processing Process message in 512-bit blocks: 4 rounds of processing Similar structure but different logical function Each round takes the 512-bit input and values of ABCD and modifies ABCD Output: from the last stage is a 128-bit digest Lecture 8-9 CSCE 522 - Farkas 11

Strength of MD5 Every bit of plain text influences every bit of the the hash code Complex repetition of the basic functions  unlikely that two random messages would have similar regularities MD5 is as strong as possible for 128-bit digest (Rivest’s conjecture) Hasn’t been disproved yet Lecture 8-9 CSCE 522 - Farkas 12

Secure Hash Algorithm SHA was developed by National Institute of Standards and Technology 1993: Published as Federal Information Processing Standard (FIPS PUB 180) SHA-0, SHA-1, and SHA-2 SHA-1: best known and widely used Lecture 8-9 CSCE 522 - Farkas 13

SHA Security SHA-1: in 2005 security flaws were identified A possible mathematical weakness might exist SHA-2: no attacks have yet been reported SHA-2 variants are algorithmically similar to SHA-1 and so efforts are underway to develop improved alternatives SHA-3: new hash standard is currently under development Lecture 8-9 CSCE 522 - Farkas 14

SHA-1 Input length: max. (264 − 1) bits Output length: 160-bit Based on principles similar to those used in the design of the MD4 and MD5 Lecture 8-9 CSCE 522 - Farkas 15

SHA-2 Family 2001: first published in the draft FIPS PUB 180-2 2002, 2004: FIPS PUB 180-2 modified SHA-224, SHA-256, SHA-384, and SHA-512 Lecture 8-9 CSCE 522 - Farkas 16

MD5 vs. SHA Very similar Security: SHA’s digest is 32 bits longer  without algorithm flaws SHA is more secure Speed:SHA has more steps and produces 160-bit buffer  SHA slower Simplicity and compactness: MD5 has more internal steps with varying buffer modification  SHA is simpler Lecture 8-9 CSCE 522 - Farkas 17

Protocol Analysis Exercise 1. Assume that Jane and Paul want to efficiently send very large files to each other. They also want to provide integrity verification, third- party message authentication (i.e., a third party can verify who the originator of the message is), and limit the scope of a compromise (i.e., providing forward secrecy). You can assume that Jane and Paul have public and secret key encryption capabilities, can generate a hash function, and they have a shared secret key K0 established before the communication. They do not have access to a mutually trusted server, and no other keys but K0 are known at the beginning of the communication. Propose a security protocol to establish necessary keys and show how Jane can send a file to Paul. Lecture 8-9 CSCE 522 - Farkas

Exercise 2. Message authentication and key agreement Alice wants to establish a secure communication with Bob. They agree to user the Yahalom protocol for mutual authentication and key agreement. The protocol uses symmetric key encryption only. Alice has a secret key shared with a trusted third party Server, KA and, similarly, Bob has a secret-key shared with Server, KB. NA and NB are nonces generated by Alice and Bob, respectively. E(M, K) indicates encryption of message M with key K, “||” means concatenation of messages. Explain after each protocol step what the recipient of the message knows based on the message and the properties of the encryption and what he/she is capable of doing. For example, Lecture 8-9 CSCE 522 - Farkas

Exercise 2. Message1: Alice  Server: IDA || E(“request for session key to Bob”, KA) Server: The server sees that that claimed sender of the message is Alice. The server can decrypt the message using KA that is shared between Alice and the Server. The message must have been sent by Alice because KA is only known by Alice and the server. The server knows that Alice is requesting a session key to be used by Alice and Bob. The server can generate a session key KS to be used by Alice and Bob and send the key to … Lecture 8-9 CSCE 522 - Farkas

Exercise 2. Message1: Alice  Bob: IDA || NA Bob knows/can do Message2: Bob  Server: IDB || E[(IDB || NA || NB), KB] Server knows/can do Message3: Server  Alice: E[(IDB || KS || NA || NB), KA] || E[(IDA || KS), KB] Alice knows/can do Message4: Alice  Bob: E[(IDA || KS), KB] || E(NB, KS)] Lecture 8-9 CSCE 522 - Farkas

Exercise 3. Secure communication Consider the following protocol. Ann wants to send a message M securely to Bob but there is no shared secret key between Ann and Bob, Ann does not even know Bob’s public key. However, using the properties of RSA (in particular the commutative property), Ann proposes the following protocol, where E(M, K) indicates encryption/decryption of message M with key K, “||” means concatenation of messages, KpubA means the public key of A, KprivA means private key of A. Lecture 8-9 CSCE 522 - Farkas

Exercise 3. Message1: Ann  Bob: IDA || E(M, KpubA) Message 2: Bob  Ann: IDB || E[(E(M, KpubA)), KpubB) Message3: Ann  Bob: IDA || E(M, KpubB) Show a man-in-the-middle attack against the above protocol. Lecture 8-9 CSCE 522 - Farkas

Next class Review of cryptography and security protocols Lecture 8-9 CSCE 522 - Farkas 24