Chapter 12 – Hash Algorithms

Slides:



Advertisements
Similar presentations
Cryptography and Network Security Chapter 12 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Advertisements

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.
Cryptography and Network Security Chapter 12
Cryptography and Network Security Hash Algorithms.
Cryptography and Network Security (CS435) Part Ten (Hash and MAC algorithms)
Information Security and Management 11
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 12 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
1 Pertemuan 09 Hash and Message Digest Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
CSCE 790: Computer Network Security Chin-Tser Huang University of South Carolina.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 13 Message Signing
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
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.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
Lecture 2: Message Authentication Anish Arora CSE5473 Introduction to Network Security.
HASH Functions.
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.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 Chapter 11: Message Authentication and Hash Functions Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
Hash and MAC Algorithms Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 12/3/2009 INCS 741: Cryptography 12/3/20091Dr. Monther Aldwairi.
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.
Hash and MAC Functions CS427 – Computer Security
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.
Chapter 4 Message Authentication MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Hash Algorithms see similarities in the evolution of hash functions & block ciphers –increasing power of brute-force attacks –leading to evolution in algorithms.
Chapter 11 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
1 Chapter 12: Hash and MAC Algorithms Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal, U of Kentucky)
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Information Security and Management 11. Cryptographic Hash Functions Chih-Hung Wang Fall
Hash Algorithms Ch 12 of Cryptography and Network Security - Third Edition by William Stallings Modified from lecture slides by Lawrie Brown CIM3681 :
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Secure Hash Algorithm A SEARIES OF SHA….
Message Authentication and Hash Functions
Cryptography and Network Security Chapter 12
Cryptography and Network Security Chapter 11
Computer and Network Security
CSCE 715: Network Systems Security
Cryptographic Hash Function
CSCE 715: Network Systems Security
Cryptography and Network Security (Various Hash Algorithms)
Message Authentication and Hash Functions
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 11 – Message Authentication and Hash Functions
Hash and MAC Algorithms
Cryptography and Network Security Chapter 12
CSCE 715: Network Systems Security
Message Authentication and Hash Functions
CSCE 715: Network Systems Security
Cryptography and Network Security Chapter 12
Message Authentication
CSCE 715: Network Systems Security
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Message Authentication Code
Lecture 4.1: Hash Functions, and Message Authentication Codes
Cryptography and Network Security Chapter 11
Cryptography and Network Security Chapter 11
Presentation transcript:

Chapter 12 – Hash Algorithms INCS 741: CRYPTOGRAPHY Chapter 12 – Hash Algorithms Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus Dr. Lo’ai Tawalbeh Summer 2007

Using Symmetric Ciphers for MACs can use any block cipher chaining mode and use final block as a MAC Data Authentication Algorithm (DAA) is a widely used MAC based on DES-CBC using IV=0 and zero-pad of final block encrypt message using DES in CBC mode and send just the final block as the MAC or the leftmost M bits (16≤M≤64) of final block Can also use block cipher chaining modes to create a separate authenticator, by just sending the last block. However this suffers from being a bit too small for acceptable use today. Dr. Lo’ai Tawalbeh Summer 2007

Hash Functions condenses arbitrary message to fixed size usually assume that the hash function is public and not keyed different than MAC which is keyed hash used to detect changes to message can be used in various ways with message, mostly to create a digital signature a Hash Function produces a fingerprint of some file/message/data h = H(M) Dr. Lo’ai Tawalbeh Summer 2007

Hash Functions & Digital Signatures Stallings Fig 11-5c. Dr. Lo’ai Tawalbeh Summer 2007

Requirements for Hash Functions can be applied to any sized message M produces fixed-length output h is easy to compute h=H(M) for any message M given h is infeasible to find x s.t. H(x)=h one-way property is infeasible to find any x,y s.t. H(y)=H(x) strong collision resistance These are the specifications for good hash functions. Essentially it must be extremely difficult to find 2 messages with the same hash, and the hash should not be related to the message in any obvious way (ie it should be a complex non-linear function of the message). There are quite a few similarities in the evolution of hash functions & block ciphers, and in the evolution of the design requirements on both. Dr. Lo’ai Tawalbeh Summer 2007

Simple Hash Functions are several proposals for simple functions based on XOR of message blocks not secure since can manipulate any message and either not change hash or change hash also need a stronger cryptographic function (next chapter) Dr. Lo’ai Tawalbeh Summer 2007

Block Ciphers as Hash Functions can use block ciphers as hash functions using H0=0 and zero-pad of final block compute: Hi = EMi [Hi-1] and use final block as the hash value similar to CBC but without a key resulting hash is too small (64-bit)- Dr. Lo’ai Tawalbeh Summer 2007

Hash Example: Secure Hash Algorithm-SHA Maximum length of the input is < 2^64 bits and outputs 160-bit digest 1. pad message so its length is congruent to 448 mod 512 (first bit 1, then followed by zeros) 2. append a 64-bit integer value to the msg (cantinas the original msg length). 3. initialise 5-word (160-bit) buffer (A,B,C,D,E) to (67452301,efcdab89,98badcfe,10325476,c3d2e1f0) 4. process message in 16-word (512-bit) blocks: expand 16 words into 80 words by mixing & shifting use 4 rounds of 20 bit operations on message block & buffer add output to input to form new buffer value output hash value is the final buffer value Note that the SHA-1 Overview is very similar to that of MD5. Dr. Lo’ai Tawalbeh Summer 2007

Hash Example: Secure Hash Algorithm-SHA Note that the SHA-1 Overview is very similar to that of MD5. Dr. Lo’ai Tawalbeh Summer 2007

SHA-1 Compression Function each round has 20 steps which replaces the 5 buffer words thus: (A,B,C,D,E) <-(E+f(t,B,C,D)+(A<<5)+Wt+Kt),A,(B<<30),C,D) A,B,C,D, E refer to the 5 words of the buffer t is the step number f(t,B,C,D) is nonlinear function for round (t) Wt is derived from the message block Kt is a constant value Can see SHA shares much in common with MD4/5, but with 20 instead of 16 steps in each of the 4 rounds. Note the 4 constants are based on sqrt(2,3,5,10). Note also that instead of just splitting the input block into 32-bit words and using them directly, SHA-1 shuffles and mixes them using rotates & XOR’s to form a more complex input, and greatly increases the difficulty of finding collisions. Dr. Lo’ai Tawalbeh Summer 2007

SHA-1 Compression Function Stallings Fig 12-6. Dr. Lo’ai Tawalbeh Summer 2007

Wt generation Stallings Fig 12-6. Dr. Lo’ai Tawalbeh Summer 2007

Revised Secure Hash Standard NIST have issued a revision FIPS 180-2 adds 3 additional hash algorithms SHA-256, SHA-384, SHA-512 designed for compatibility with increased security provided by the AES cipher structure & detail is similar to SHA-1 hence analysis should be similar See Stallings Tables 12.3 and 12.4 for details. Dr. Lo’ai Tawalbeh Summer 2007

Keyed Hash Functions as MACs have desire to create a MAC using a hash function rather than a block cipher because hash functions are generally faster Widely available not limited by export controls unlike block ciphers hash includes a key along with the message Incorporation of a secret key to an existing hash function- e.g., HMAC Dr. Lo’ai Tawalbeh Summer 2007

HMAC specified as Internet standard, used in IP security, SSL. uses hash function on the message: HMACK = Hash[(K+ XOR opad) || Hash[(K+ XOR ipad)||M)]] where K+ is the key padded out to size and opad, ipad are specified padding constants overhead is just 3 more hash calculations than the message needs alone any of MD5, SHA-1, RIPEMD-160 can be used The idea of a keyed hash evolved into HMAC, designed to overcome some problems with the original proposals. Further have a design that has been shown to have the same security as the underlying hash alg. The hash function need only be used on 3 more blocks than when hashing just the original message (for the two keys + inner hash). Choose hash alg to use based on speed/security concerns. Dr. Lo’ai Tawalbeh Summer 2007

HMAC Overview Stallings Fig 12-10. Dr. Lo’ai Tawalbeh Summer 2007

HMAC Security know that the security of HMAC relates to that of the underlying hash algorithm attacking HMAC requires either: brute force attack on key used choose hash function used based on speed verses security constraints Dr. Lo’ai Tawalbeh Summer 2007