1 4.1 Hash Functions and Data Integrity A cryptographic hash function can provide assurance of data integrity. ex: Bob can verify if y = h K (x) h is a.

Slides:



Advertisements
Similar presentations
ONE WAY FUNCTIONS SECURITY PROTOCOLS CLASS PRESENTATION.
Advertisements

Hash Function. What are hash functions? Just a method of compressing strings – E.g., H : {0,1}*  {0,1} 160 – Input is called “message”, output is “digest”
Cryptographic Hash Functions Rocky K. C. Chang, February
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Digital Signatures and Hash Functions. Digital Signatures.
Foundations of Cryptography Lecture 4 Lecturer: Moni Naor.
Fall 2006CENG 7071 Algorithm Analysis. Fall 2006CENG 7072 Algorithmic Performance There are two aspects of algorithmic performance: Time Instructions.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Announcements: 1. HW6 due now 2. HW7 posted Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions.
Chapter 7-1 Signature Schemes.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Lecture 10: Search Structures and Hashing
1 Chapter 4 Cryptographic Hash Functions. 2 Outline 4.1 Hash Functions and Data Integrity 4.2 Security of Hash Functions 4.3 Iterated Hash Functions 4.4.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
CS526Topic 5: Hash Functions and Message Authentication 1 Computer Security CS 526 Topic 5 Cryptography: Cryptographic Hash Functions And Message Authentication.
Foundations of Cryptography Lecture 9 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 8 Lecturer: Moni Naor.
Data Structures Hashing Uri Zwick January 2014.
Digital Signatures (DSs) The digital signatures cannot be separated from the message and attached to another The signature is not only tied to signer but.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
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.
Ragesh Jaiswal Indian Institute of Technology Delhi Threshold Direct Product Theorems: a survey.
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2015 Nitesh Saxena.
Cryptography Lecture 9 Stefan Dziembowski
Fall 2002CS 395: Computer Security1 Chapter 11: Message Authentication and Hash Functions.
Brand-New Hash Function   BeeM A. Satoh SCIS2006 SHA-1 Broken! Prof. Xiaoyun Wang.
David Luebke 1 10/25/2015 CS 332: Algorithms Skip Lists Hash Tables.
Theory of Computation II Topic presented by: Alberto Aguilar Gonzalez.
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.
1 Hash Functions. 2 A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Chapter 11 Message Authentication and Hash Functions.
© 2001 by Charles E. Leiserson Introduction to AlgorithmsDay 12 L8.1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 8 Prof. Charles E. Leiserson.
Identity based signature schemes by using pairings Parshuram Budhathoki Department of Mathematical Science FAU 02/21/2013 Cyber Security Seminar, FAU.
October 5, 2005Copyright © by Erik D. Demaine and Charles E. LeisersonL7.1 Prof. Charles E. Leiserson L ECTURE 8 Hashing II Universal hashing Universality.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
ICS 353: Design and Analysis of Algorithms
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2014 Nitesh Saxena.
CRYPTOGRAPHY AND NP-HARDNESS Andrej Bogdanov Chinese University of Hong Kong MACS Foundations of Cryptography| January 2016.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
The Birthday Paradox July Definition 2 Birthday attacks are a class of brute-force techniques that target the cryptographic hash functions. The.
CS555Spring 2012/Topic 151 Cryptography CS 555 Topic 15: HMAC, Combining Encryption & Authentication.
Randomized Algorithms for Distributed Agreement Problems Peter Robinson.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
Theory of Computational Complexity M1 Takao Inoshita Iwama & Ito Lab Graduate School of Informatics, Kyoto University.
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.
Message Integrity and Message Authentication
Cryptographic Hash Function
A way to detect a collision…
Topic 14: Random Oracle Model, Hashing Applications
Cryptographic Hash Functions Part I
B504/I538: Introduction to Cryptography
Digital Signatures.
Hash Functions Motivation Hash Functions: collision, pre-images SHA-1
Cryptographic Hash Functions Part I
One Way Functions Motivation Complexity Theory Review, Motivation
Lecture 3 Cryptographic Hash Functions
Lecture 4: Hash Functions
Hash Function Requirements
Presentation transcript:

1 4.1 Hash Functions and Data Integrity A cryptographic hash function can provide assurance of data integrity. ex: Bob can verify if y = h K (x) h is a hash function x is a message y is the authentication tag (message digest) K is key AliceBob (x, y)

2 Hash Functions and Data Integrity Definition 4.1: A hash family is a four-tuple ( X, Y, K,H ), where the following condition are satisfied: 1 X is a set of possible messages 2 Y is a finite set of possible message digests or authentication tags 3 K, the keyspace, is a finite set of possible keys 4 For each K  K, there is a hash function h K  H. Each h k : X  Y

3 Hash Functions and Data Integrity h is compress functions X is a finite set Y is a finite set | X |  | Y | or stronger, | X |  2| Y | A pair (x,y)  X  Y is said to be valid under the key K h K (x) = y. Let F X,Y denote the set of all function from X to Y. | X | = N and | Y | = M. | F X,Y | = M N. F  F X,Y is termed an (N,M)-hash family. An unkeyed hash function is a function h: X  Y

4 4.2 Security of Hash Functions If a hash function is to be considered secure, these three problems are difficult to solve Problem 4.1: Preimage Instance: A hash function h: X  Y and an element y  Y. Find: x  X such that f(x) = y Problem 4.2: Second Preimage Instance: A hash function h: X  Y and an element x  X Find: x’  X such that x’ ≠ x and h(x’) = h(x) Problem 4.3: Collision Instance: A hash function h: X  Y. Find: x, x’  X such that x’ ≠ x and h(x’) = h(x)

5 Security of Hash Functions A hash function for which Preimage cannot be efficiently solved is often said to be one-way or preimage resistant. A hash function for which Second Preimage cannot be efficiently solved is often said to be second preimage resistant. A hash function for which Collision cannot be efficiently solved is often said to be collision resistant.

6 Security of Hash Functions The Random Oracle Model The random oracle model provides a mathematical model of an “ ideal ” hash function. In this model, a hash function h: X  Y is chosen randomly from F X,Y The only way to compute a value h(x) is to query the oracle. THEOREM 4.1 Suppose that h  F X,Y is chosen randomly, and let X 0  X. Suppose that the values h(x) have been determined (by querying an oracle for h) if and only if x  X 0. Then Pr[h(x)=y] = 1/M for all x  X \ X 0 and all y  Y.

7 Security of Hash Functions Algorithms in the Random Oracle Model Randomized algorithms make random choices during their execution. A Las Vegas algorithm is a randomized algorithm may fail to give an answer if the algorithm does return an answer, then the answer must be correct. A randomized algorithm has average-case success probability ε if the probability that the algorithm returns a correct answer, averaged over all problem instances of a specified size, is at least ε (0≤ε<1).

8 Security of Hash Functions We use the terminology (ε,q)-algorithm to denote a Las Vegas algorithm with average-case success probability ε the number of oracle queries made by algorithms is at most q. Algorithm 4.1: FIND PREIMAGE (h, y, q) choose any X 0  X,| X 0 | = q for each x  X 0 do if h(x) = y then return (x) return (failure)

9 Security of Hash Functions THEOREM 4.2 For any X 0  X with | X 0 | = q, the average-case success probability of Algorithm 4.1 is ε=1 - (1-1/M) q. proofLet y  Y be fixed. Let Χ 0 = {x 1,x..,x q }. For 1 ≤ i ≤ q, let E i denote the event “h(x i ) = y”. From Theorem 4.1 that the E i ’ s are independent events, and Pr[E i ] = 1/M for all 1 ≤ i ≤ q. Therefore The success probability of Algorithm 4.1, for any fixed y, is constant. Therefore, the success probability averaged over all y  Y is identical, too.

10 Security of Hash Functions Algorithm 4.3: FIND COLLISION (h,q) choose X 0  X, | X 0 | = q for each x  X 0 do y x  h(x) if y x = y x’ for some x ’ ≠ x then return (x, x ’ ) else return (failure)

11 Security of Hash Functions Birthday paradox In a group of 23 randomly chosen people, at least two will share a birthday with probability at least ½. Finding two people with the same birthday is the same thing as finding a collision for this particular hash function. ex: Algorithm 4.3 has success probability at least ½ when q = 23 and M = 365 Algorithm 4.3 is analogous to throwing q balls randomly into M bins and then checking to see if some bin contains at least two balls.

12 Security of Hash Functions THEOREM 4.4 For any X 0  X with | X 0 | = q, the success probability of Algorithm 4.3 is proofLet X 0 = {x 1,..,x q }. E i : the event “h(x i )  {h(x 1 ),..,h(x i-1 )}.”, 2  i  q Using induction, from Theorem 4.1 that Pr[E 1 ] = 1 and for 2 ≤ i ≤ q.

13 Security of Hash Functions The probability of finding no collision is ε denotes the probability of finding at least one collision Ignore – q, ε= 0.5, q ≈ 1.17 Take M = 365, we get q ≈ 22.3 x is small 1-x  e -x

14 Security of Hash Functions This says that hashing just over random elements of X yields a collision with a prob. of 50%. A different choice of ε leads to a different constant factor, but q will still be proportional to. So this algorithm is a (1/2, O( ))- algorithm.

15 Security of Hash Functions The birthday attack imposes a lower bound on the size of secure message digests. A 40-bit message digest would be very in secure, since a collision could be found with prob. ½ with just over 2^20 (about a million) random hashes. It is usually suggested that the minimum acceptable size of a message digest is 128 bits (the birthday attack will require over 2^64 hashes in this case). In fact, a 160-bit message digest (or larger) is usually recommended.