CRYPTOGRAPHY & NETWORK SECURITY

Slides:



Advertisements
Similar presentations
Sri Lanka Institute of Information Technology
Advertisements

Message Authentication and Hash functions
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.
CSE331: Introduction to Networks and Security Lecture 21 Fall 2002.
Information Security and Management 11
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings.
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.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
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.
Lecture 2: Message Authentication Anish Arora CSE5473 Introduction to Network Security.
MAC and HASH Functions Unit 5. AUTHENTICATION REQUIREMENTS In the context of communications across a network, the following attacks can be identified:
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,
Message Authentication Requirements Disclosure Release of message contents to any person or process not possessing the appropriate cryptographic key Traffic.
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.
Fall 2002CS 395: Computer Security1 Chapter 11: Message Authentication and Hash Functions.
Message Authentication and Hash Functions Chapter 11.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
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.
MESSAGE AUTHENTICATION and HASH FUNCTIONS - Chapter 11 MESSAGE AUTHENTICATION and HASH FUNCTIONS - Chapter 11 Masquerade – message insertion, fraud, ACK.
1 Message Authentication and Hash Functions G 何采宭.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
1 Public Key Cryptography. 2 Public Key Cryptography Agenda: Message authentication – authentication codes and hash functions Public key encryption –
Information and Network Security Dr. Hadi AL Saadi Message Authentication and Hash Functions.
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.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Message Authentication Code
Chapter 12 – Hash Algorithms
Message Authentication and Hash Functions
UNIT 2 Public-key Cryptography And Message Authentication
Cryptographic Hash Functions & Digital Signatures
Cryptography and Network Security Chapter 11
Computer and Network Security
CSCE 715: Network Systems Security
Network Security.
Cryptographic Hash Functions
Cryptographic Hash Function
CSCE 715: Network Systems Security
Message Authentication and Hash Functions
Cryptographic Hash Functions
Presented by: Dr. Munam Ali Shah
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Message Authentication Codes, Hashes and Message Digests
Message Authentication and Hash Functions
Chapter 11 – Message Authentication and Hash Functions
Message Authentication and Hash Functions
NETW4005 COMPUTER SECURITY - A
Network Security (contd.)
Message Authentication
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Message Authentication Code
Cryptography and Network Security Chapter 11
Hashing Hash are the auxiliary values that are used in cryptography.
Cryptography and Network Security Chapter 11
Hash Function Requirements
Simple Hash Functions Network Security.
Presentation transcript:

CRYPTOGRAPHY & NETWORK SECURITY II MSc(CS)(MCS30117), II MCA(MCA30217)

Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of Hash Functions and MACs

Authentication Requirements Kind of attacks (threats) in the context of communications across a network Disclosure Traffic analysis Masquerade Content modification Sequence modification Timing modification Repudiation Measures to deal with first two attacks: In the realm of message confidentiality, and are addressed with encryption Measures to deal with items 3 thru 6 Message authentication Measures to deal with items 7 Digital signature

Authentication Requirements Message authentication A procedure to verify that messages come from the alleged source and have not been altered Message authentication may also verify sequencing and timeliness Digital signature An authentication technique that also includes measures to counter repudiation by either source or destination

Authentication Functions Message authentication or digital signature mechanism can be viewed as having two levels At lower level: there must be some sort of functions producing an authenticator – a value to be used to authenticate a message This lower level functions is used as primitive in a higher level authentication protocol

Authentication Functions Three classes of functions that may be used to produce an authenticator Message encryption Ciphertext itself serves as authenticator Message authentication code (MAC) A public function of the message and a secret key that produces a fixed-length value that serves as the authenticator Hash function A public function that maps a message of any length into a fixed-length hash value, which serves as the authenticator

Message Encryption Conventional encryption can serve as authenticator Authentication Functions Message Encryption Conventional encryption can serve as authenticator Conventional encryption provides authentication as well as confidentiality Requires recognizable plaintext or other structure to distinguish between well-formed legitimate plaintext and meaningless random bits e.g., ASCII text, an appended checksum, or use of layered protocols

Basic Uses of Message Encryption Authentication Functions Basic Uses of Message Encryption

Ways of Providing Structure Authentication Functions Ways of Providing Structure Append an error-detecting code (frame check sequence (FCS)) to each message

Ways of Providing Structure - 2 Authentication Functions Ways of Providing Structure - 2 Suppose all the datagrams except the IP header is encrypted. If an opponent substituted some arbitrary bit pattern for the encrypted TCP segment, the resulting plaintext would not include a meaningful header

Confidentiality and Authentication Implications of Message Encryption Authentication Functions Confidentiality and Authentication Implications of Message Encryption

Message Authentication Code Authentication Functions Message Authentication Code Uses a shared secret key to generate a fixed-size block of data (known as a cryptographic checksum or MAC) that is appended to the message MAC = CK(M) Assurances: Message has not been altered Message is from alleged sender Message sequence is unaltered (requires internal sequencing) Similar to encryption but MAC algorithm needs not be reversible

Authentication Functions Basic Uses of MAC

Authentication Functions Basic Uses of MAC

Why Use MACs? Cleartext stays clear MAC might be cheaper Broadcast Authentication Functions Why Use MACs? i.e., why not just use encryption? Cleartext stays clear MAC might be cheaper Broadcast Authentication of executable codes Architectural flexibility Separation of authentication check from message use

Authentication Functions Hash Function Converts a variable size message M into fixed size hash code H(M) (Sometimes called a message digest) Can be used with encryption for authentication E(M || H) M || E(H) M || signed H E( M || signed H ) gives confidentiality M || H( M || K ) E( M || H( M || K ) )

Basic Uses of Hash Function Authentication Functions Basic Uses of Hash Function

Basic Uses of Hash Function Authentication Functions Basic Uses of Hash Function

Basic Uses of Hash Function Authentication Functions Basic Uses of Hash Function

Message Authentication Codes MACs Message Authentication Codes MAC= C(K,M) a MAC is a cryptographic checksum MAC = CK(M) M: a variable-length message K :a secret key C(K,M): fixed-sized authenticator is a many-to-one function potentially many messages have same MAC but finding these needs to be very difficult

Requirements for MACs If an opponent observes M and C(K,M), it should be computationally infeasible to construct M’ such that C(K,M’) = C(K,M). C(K,M) should be uniformly distributed in the sense that for randomly chosen messages, M and M’, the probability that C(K,M) = C(K,M’) is 2-n, where n is the number of bits in the MAC. Let M’ be equal to some known transformation on M. That is, M’ = f(M). E.g. f may involve inverting one or more specific bits. In that case, Pr[C(K,M) = C(K,M’)] = 2-n.

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

Data Authentication Algorithm

Hash Functions Hash Functions h = H(M) M is a variable-length message, h is a fixed-length hash value, H is a hash function The hash value is appended at the source The receiver authenticates the message by recomputing the hash value Because the hash function itself is not considered to be secret, some means is required to protect the hash value

Hash Function Requirements Hash Functions Hash Function Requirements H can be applied to any size data block H produces fixed-length output H(x) is relatively easy to compute for any given x H is one-way, i.e., given h, it is computationally infeasible to find any x s.t. h = H(x) H is weakly collision resistant: given x, it is computationally infeasible to find any y  x s.t. H(x) = H(y) H is strongly collision resistant: it is computationally infeasible to find any x and y s.t. H(x) = H(y)

Hash Function Requirements Hash Functions Hash Function Requirements One-way property is essential for authentication Weak collision resistance is necessary to prevent forgery Strong collision resistance is important for resistance to birthday attack

Simple Hash Functions Operation of hash functions The input is viewed as a sequence of n-bit blocks The input is processed one block at a time in an iterative fashion to produce an n-bit hash function Simplest hash function: Bitwise XOR of every block Ci = bi1  bi2  …  bim Ci = i-th bit of the hash code, 1  i  n m = number of n-bit blocks in the input bij = i-th bit in j-th block Known as longitudinal redundancy check

Simple Hash Functions Improvement over the simple bitwise XOR Initially set the n-bit hash value to zero Process each successive n-bit block of data as follows Rotate the current hash value to the left by one bit XOR the block into the hash value

Birthday Attack Birthday Attack If the adversary can generate 2m/2 variants of a valid message and an equal number of fraudulent messages The two sets are compared to find one message from each set with a common hash value The valid message is offered for signature The fraudulent message with the same hash value is inserted in its place If a 64-bit hash code is used, the level of effort is only on the order of 232 Conclusion: the length of the hash code must be substantial

Generating 2m/2 Variants of Valid Messages Birthday Attack Generating 2m/2 Variants of Valid Messages Insert a number of “space-backspace-space” character pairs between words throughout the document. Variations could then be generated by substituting in selected instances Alternatively, simply reword the message but retain the meaning

Brute-Force Attack of Hash Functions Security of Hash Functions and MACs Brute-Force Attack of Hash Functions Three desirable properties of hash functions One-way: For any given code h, it is computationally infeasible to find x s.t. H(x) = h Weak collision resistance: For any given block x, it is computationally infeasible to find y  x s.t. H(y) = H(x) Strong collision resistance: It is computationally infeasible to find any pair (x, y) s.t. H(y) = H(x) Brute-force attack on n-bit hash code One-way and weak collision require 2n effort Strong collision requires 2n/2 effort  If strong collision resistance is required (and this is desirable for a general-purpose secure hash code), 2n/2 determines the strength of hash code against brute-force attack Currently, two most popular hash codes, SHA-1 and RIPEMD-160, provide a 160-bit hash code length