Lecture 2: Message Authentication Anish Arora CSE5473 Introduction to Network Security.

Slides:



Advertisements
Similar presentations
Cryptography and Network Security Chapter 12
Advertisements

Sri Lanka Institute of Information Technology
Information Security Principles & Applications Topic 4: Message Authentication 虞慧群
Cryptography and Network Security Chapter 12 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
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 Chapter 11. Chapter 11 – Message Authentication and Hash Functions At cats' green on the Sunday he took the message.
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings.
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.
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.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
CRYPTOGRAPHIC DATA INTEGRITY ALGORITHMS
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Acknowledgements: William Stallings.William Stallings All rights Reserved Session 4 Public Key Cryptography (Part 2) Network Security Essentials Application.
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 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.
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.
Fall 2002CS 395: Computer Security1 Chapter 11: Message Authentication and Hash Functions.
Message Authentication and Hash Functions Chapter 11.
Data Security and Encryption (CSE348) 1. Lecture # 19 2.
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.
Chapter 4 Message Authentication MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Chapter 11 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Message Authentication and Hash Functions K. U. Khimani Asst. Prof. IT Dept. VVP Engineering College.
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.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Hash Algorithms Ch 12 of Cryptography and Network Security - Third Edition by William Stallings Modified from lecture slides by Lawrie Brown CIM3681 :
Message Authentication Codes CSCI 5857: Encoding and Encryption.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Dr. Nermin Hamza.  Attacks:  Traffic Analysis : traffic analysis occurs when an eavesdroppers observes message traffic on network. Not understand the.
Information and Network Security Dr. Hadi AL Saadi Message Authentication and Hash Functions.
Message Authentication Code
Chapter 12 – Hash Algorithms
Message Authentication and Hash Functions
Cryptography and Network Security Chapter 11
Computer and Network Security
CSCE 715: Network Systems Security
CSCE 715: Network Systems Security
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
Message Authentication and Hash Functions
NETW4005 COMPUTER SECURITY - A
Message Authentication
Message Authentication Code
CRYPTOGRAPHY & NETWORK SECURITY
Presentation transcript:

Lecture 2: Message Authentication Anish Arora CSE5473 Introduction to Network Security

Message authentication message authentication is concerned with:  protecting the integrity of a message  validating identity of originator  protecting the order or timeliness of a message message authentication deals with these attacks:  masquerade  content modification  sequence modification  timing modification In this lecture, we consider three alternative functions used for msg. auth.:  message encryption  message authentication code (MAC)  hash function and some requirements for designing MAC codes

Message encryption provides some authentication if symmetric encryption is used:  receiver knows sender must have created msg, since only sender&receiver know key  know content has not been altered if public-key encryption is used:  encryption provides no confidence of sender identity, since potentially every one knows public-key  however, if  sender signs message using their private-key  then encrypts with recipients public key  we have both secrecy and authentication  again need to recognize corrupted messages, but at cost of two public-key uses on message

Rejecting gibberish when using symmetric encryption If every ciphertext value corresponds to some plaintext value, adversary can fool receiver into accepting gibberish An automatic means to detect whether an incoming ciphertext decrypts to some meaningful plaintext is desirable, but difficult Solution is to give some structure to the plaintext:  example:  use checksums to separate meaningful text from gibberish  but checksum must be internal to ciphertext (why?)  particular choice of structure does not matter:  e.g. use with TCP headers

Checksums Internal versus External IP packets: encrypt entire TCP packet; TCP header contains checksum

Message authentication code (MAC)

MAC generated by an algorithm that creates a small fixed-sized block  depending on both the message and the key  like encryption, but need not be reversible though appended to message receiver performs same computation on message & checks it matches MAC provides assurance that message is unaltered & comes from sender, per se does not provide encryption or signature so, why use a MAC?  sometimes only authentication is needed  authentication may be needed longer than encryption (e.g. archival use)  broadcast: only one needs to check, or optional check: now or later

MAC properties a MAC is a cryptographic checksum MAC = C K (M)  condenses a variable-length message M  using a secret key K  to a fixed-sized authenticator is a many-to-one function  potentially many messages have same MAC  but finding these needs to be very difficult

A brute force attack on MAC On average, brute-force attack on k-bit key is O(2 k-1 ) With m-bit MAC, say m < k,  given plaintext P and ciphertext C brute-force search of all 2 k keys, will still yield 2 k / 2 m plausible keys  this can be iterated with more plaintexts until the key if found, but remains an expensive process

Requirements for MACs taking into account other types of attacks, we need the MAC to satisfy the following: 1. knowing a message and MAC, is infeasible to find another message with same MAC 2. MACs should be uniformly distributed 3. MAC should depend equally on all bits/parts of the message

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-Cipher Block Chaining  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 but final MAC is now too small for security

More recent symmetric cipher options Use AES instead of DES CBC mode requires final encryption with a second, independent key to avoid extension attacks Digression: NMAC (nested MAC) alternative  Output in key space, unlike CBC output in message space  Cascade function, but not well suited for AES  Needs padding with fixed pad, and encryption with second, independent key How padding works  CMAC: NIST standard, CCM mode, uses two keys wrt pad/not

Message authentication via hash functions + digitalsignature also

Message authentication via hash functions (contd.) Secret value is added before hashing and then removed before transmission

Message authentication via hash functions Note: In scheme (c) hashing M || S is more secure than hashing S || M  given the iterative structure of hash functions, adversary could extend M with M||X and generate new hash Diffusing S in the hash of M and S can be achieved by using HMAC

Keyed hash functions as MACs desirable to create a MAC using a hash function rather than a block cipher  because hash functions are generally faster  not limited by export controls unlike block ciphers hash includes a key along with the message original proposal: KeyedHash = Hash(Key|Message)  some weaknesses were found with this eventually led to development of HMAC

HMAC specified as Internet standard RFC2104 uses hash function on the message: HMAC K = 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 can use MD-5 or SHA-1

HMAC overview

HMAC security security of HMAC relates to that of the underlying hash algorithm attacking HMAC requires either:  brute force attack on key used  birthday attack (but since keyed would need to observe a very large number of messages) choose hash function based on speed vs. security constraints