Lecture 4: Hash Functions

Slides:



Advertisements
Similar presentations
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”
Advertisements

ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Digital Signatures and Hash Functions. Digital Signatures.
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.
Announcements: 1. Class cancelled tomorrow 2. HW7 due date moved to Thursday. Questions? This week: Birthday attacks, Digital signatures Birthday attacks,
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
CS526Topic 5: Hash Functions and Message Authentication 1 Computer Security CS 526 Topic 5 Cryptography: Cryptographic Hash Functions And Message Authentication.
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.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Acknowledgements: William Stallings.William Stallings All rights Reserved Session 4 Public Key Cryptography (Part 2) Network Security Essentials Application.
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.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2015 Nitesh Saxena.
1 Hashes and Message Digests. 2 Hash Also known as –Message digest –One-way function Function: input message -> output One-way: d=h(m), but not h’(d)
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
Lecture 4.2: Hash Functions: Design* CS 436/636/736 Spring 2012 Nitesh Saxena * some slides borrowed from Gene Tsudik.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 11 – Hash Functions.
Chapter 11 Message Authentication and Hash Functions.
Week 4 - Friday.  What did we talk about last time?  Snow day  But you should have read about  Key management.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
Lecture 5.1: Message Authentication Codes, and Key Distribution
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2014 Nitesh Saxena.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.3 Hash Functions.
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.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
The Birthday Paradox July Definition 2 Birthday attacks are a class of brute-force techniques that target the cryptographic hash functions. The.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Chapter 12 – Hash Algorithms
IT443 – Network Security Administration Instructor: Bo Sheng
Cryptographic Hash Functions
A way to detect a collision…
Cryptographic Hash Functions
Presented by: Dr. Munam Ali Shah
Topic 14: Random Oracle Model, Hashing Applications
Lecture 2.2: Private Key Cryptography II
Cryptographic Hash Functions Part I
Cryptography Lecture 13.
Cryptographic Hash Functions
ICS 454 Principles of Cryptography
Cryptographic Hash Functions
Asymmetric Cryptography
CS/ECE 478 Introduction to Network Security Dr. Attila Altay Yavuz
ICS 454 Principles of Cryptography
Lecture 4.1: Hash Functions: Introduction
The Birthday Paradox June 2012.
CS 394B Introduction Marco Canini.
Cryptographic Hash Functions Part I
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
CIS 4930/6930 – Privacy-Preserving and Trustworthy Cyber-Systems Dr
Lecture 4.1: Hash Functions, and Message Authentication Codes
Chapter 3 - Public-Key Cryptography & Authentication
Cryptography Lecture 14.
Hashing Hash are the auxiliary values that are used in cryptography.
Cryptography Lecture 13.
Cryptography Lecture 13.
Hash Function Requirements
CRYPTOGRAPHY & NETWORK SECURITY
Blockchains Lecture 4.
Lecture 6.2: Protocols - Authentication and Key Exchange II
Presentation transcript:

Lecture 4: Hash Functions 6/16/2019 Lecture 4: Hash Functions CS 436/636/736 Spring 2013 Nitesh Saxena

Course Administration 6/16/2019 Course Administration HW1 being graded Solution was emailed Expect HW2 by coming Monday Covers mostly Public Key Cryptography Will be due in 12-14 days 6/16/2019 Lecture 4: Hash Functions

Outline of Today’s lecture 6/16/2019 Outline of Today’s lecture Hash Functions Properties Birthday Paradox Generic Design 6/16/2019 Lecture 4: Hash Functions

Cryptographic Hash Functions 6/16/2019 Cryptographic Hash Functions Requirements of cryptographic hash functions: Can be applied to data of any length. Output is fixed length, usually very short Relatively easy to compute h(x), given x Function is deterministic Infeasible to get x, given h(x). One-wayness property Given x, infeasible to find y such that h(x) = h(y). Weak-collision resistance property Infeasible to find any pair x and y (x ≠ y) such that h(x) = h(y). Strong-collision resistance property or just collision resistance 6/16/2019 Lecture 4: Hash Functions

Some Applications of Hash Functions 6/16/2019 Some Applications of Hash Functions In general, can be used as a checksum for large amounts of data Password hashing Digital signatures Message authentication codes (will study later) Used also in RSA-OAEP, and many other cryptographic constructions 6/16/2019 Lecture 4: Hash Functions

Lecture 4: Hash Functions 6/16/2019 Hash Output Length How long should be the output (n bits) of a cryptographic hash function? To find collision - randomly select messages and check if hash matches any that we know. Throwing k balls in N = 2n bins. How large should k be, before probability of landing two balls in the same becomes greater than ½? Birthday paradox - a collision can be found in roughly sqrt(N) = 2(n/2) trials for an n bit hash In a group of 23 (~ sqrt(365)) people, at least two of them will have the same birthday (with a probability > ½) Hence n should be at least 160 6/16/2019 Lecture 4: Hash Functions

Lecture 4: Hash Functions 6/16/2019 Birthday Paradox Probability that hash values of k random messages are distinct is (that is, no collisions) is: 6/16/2019 Lecture 4: Hash Functions

Generic Hash Function – Merkle-Damgard Construction 6/16/2019 Generic Hash Function – Merkle-Damgard Construction This design for H() is collision-resistant given that h() is collision resistant Intuitively, this is because there is a avalanche effect – even if the inputs differ in just 1 bit, the outputs will be completely different IV is a known public constant

An Illustrative Example from Wikipedia 6/16/2019 An Illustrative Example from Wikipedia 6/16/2019 Lecture 4: Hash Functions

Lecture 4: Hash Functions Practical Examples SHA-1 Output 160 bits B’day attack requires 280 calls Faster attacks 269 calls http://infosec.sdu6.edu.cn/uploadfile/papers/Finding%20Collisions%20in%20the%20Full%20SHA-1.pdf MD5 Output is 128 bits, so B’day attack requires 264 calls only Faster attacks to find a collision: http://eprint.iacr.org/2004/199.pdf Better use stronger versions, such as SHA-256 Although, these attacks are still not practical – they only find two random messages that collide 6/16/2019 Lecture 4: Hash Functions

Lecture 4: Hash Functions 6/16/2019 Further Reading Stallings Chapter 11 HAC Chapter 9 6/16/2019 Lecture 4: Hash Functions