CSCE 715: Network Systems Security

Similar documents
Spring 2010: CS419 Computer Security

Security Requirements

e-pgpathshala Subject : Computer Science Paper: Cryptography and Network Security Module: Hash Algorithm Module No: CS/CNS/28 Quadrant 1 e-text

Cryptography and Network Security Chapter 12. Message Authentication. Message Security Requirements. Public Key Message Encryption

Unit III. Chapter 1: Message Authentication and Hash Functions. Overview:

Lecture 1 Applied Cryptography (Part 1)

Cryptography and Network Security

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ).

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS

Data Integrity. Modified by: Dr. Ramzi Saifan

Message Authentication Codes and Cryptographic Hash Functions

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS

Cryptographic Hash Functions

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ).

Data Integrity & Authentication. Message Authentication Codes (MACs)

Data Integrity & Authentication. Message Authentication Codes (MACs)

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS

CS408 Cryptography & Internet Security

Winter 2011 Josh Benaloh Brian LaMacchia

Hash Function. Guido Bertoni Luca Breveglieri. Fundations of Cryptography - hash function pp. 1 / 18

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015

Encryption. INST 346, Section 0201 April 3, 2018

ECE 646 Lecture 11. Hash functions & MACs. Digital Signature. message. hash. function. Alice. Bob. Alice s public key. Alice s private key

Message authentication codes

Hashes, MACs & Passwords. Tom Chothia Computer Security Lecture 5

Cryptography. Summer Term 2010

CIS 4360 Secure Computer Systems Symmetric Cryptography

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Lecture 4: Hashes and Message Digests,

S. Erfani, ECE Dept., University of Windsor Network Security. All hash functions operate using the following general principles:

CSCE 715: Network Systems Security

Cryptography MIS

Network and System Security

CSCI 454/554 Computer and Network Security. Topic 4. Cryptographic Hash Functions

Outline. Hash Function. Length of Hash Image. AIT 682: Network and Systems Security. Hash Function Properties. Question

Outline. AIT 682: Network and Systems Security. Hash Function Properties. Topic 4. Cryptographic Hash Functions. Instructor: Dr.

UNIT III 3.1DISCRETE LOGARITHMS

Message Authentication and Hash function

CSE 127: Computer Security Cryptography. Kirill Levchenko

Summary on Crypto Primitives and Protocols

Computer Security: Principles and Practice

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Appendix A: Introduction to cryptographic algorithms and protocols

CS Computer Networks 1: Authentication

Cryptographic Hash Functions

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

UNIT - IV Cryptographic Hash Function 31.1

Cryptographic Hash Functions

S. Erfani, ECE Dept., University of Windsor Network Security

P2_L8 - Hashes Page 1

CS 645 : Lecture 6 Hashes, HMAC, and Authentication. Rachel Greenstadt May 16, 2012

Chapter 11 Message Integrity and Message Authentication

Cryptographic Concepts

Message Authentication and Hash function 2

Introduction to Cryptography. Lecture 6

ECE 646 Lecture 12. Hash functions & MACs. Digital Signature. Required Reading. Recommended Reading. m message. hash function hash value.

APNIC elearning: Cryptography Basics

NIST Cryptographic Toolkit

Course Business. Midterm is on March 1. Final Exam is Monday, May 1 (7 PM) Allowed to bring one index card (double sided) Location: Right here

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

Lecture 6: Symmetric Cryptography. CS 5430 February 21, 2018

Chapter 6. New HASH Function. 6.1 Message Authentication. Message authentication is a mechanism or service used for verifying

Jaap van Ginkel Security of Systems and Networks

The question paper contains 40 multiple choice questions with four choices and students will have to pick the correct one (each carrying ½ marks.).

Lecture 1: Course Introduction

Multiple forgery attacks against Message Authentication Codes

Security: Cryptography

Lecture 18 Message Integrity. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Slides from Miller & Bailey s ECE 422

Encryption I. An Introduction

Message authentication

Generic collision attacks on hash-functions and HMAC

Ref:

Cryptographic Hash Functions. William R. Speirs

Cryptography and Network Security Chapter 13. Digital Signatures & Authentication Protocols

Protecting Information Assets - Week 11 - Cryptography, Public Key Encryption and Digital Signatures. MIS 5206 Protecting Information Assets

ENEE 459-C Computer Security. Message authentication

Garantía y Seguridad en Sistemas y Redes

Hash functions & MACs

Computer Networks. Wenzhong Li. Nanjing University

Lecture 4: Authentication and Hashing

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Integrity of messages

Practical Aspects of Modern Cryptography

CSC/ECE 774 Advanced Network Security

Security. Communication security. System Security

1.264 Lecture 28. Cryptography: Asymmetric keys

(2½ hours) Total Marks: 75

EEC-682/782 Computer Networks I

Introduction to Software Security Hash Functions (Chapter 5)

Symmetric, Asymmetric, and One Way Technologies

CIT 480: Securing Computer Systems. Hashes and Random Numbers

Cryptography and Network Security. Sixth Edition by William Stallings

HOST Cryptography III ECE 525 ECE UNM 1 (1/18/18)

Cryptography and Network Security

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

Kurose & Ross, Chapters (5 th ed.)

Unit 8 Review. Secure your network! CS144, Stanford University

Symmetric Crypto MAC. Pierre-Alain Fouque

Transcription:

CSCE 715: Network Systems Security Chin-Tser Huang huangct@cse.sc.edu University of South Carolina

Next Topic in Cryptographic Tools Symmetric key encryption Asymmetric key encryption Hash functions and message digest Nonce 02/13/2017 2

Message Authentication Message authentication is concerned with protecting the integrity of a message validating identity of originator non-repudiation of origin (dispute resolution) Three alternative functions to provide message authentication message encryption message authentication code (MAC) hash function 02/13/2017 3

Providing Msg Authentication by Symmetric Encryption Receiver knows sender must have created it because only sender and receiver know secret key Can verify integrity of content if message has suitable structure; use redundancy or a checksum to detect any modification 02/13/2017 4

Providing Msg Authentication by Asymmetric Encryption Encryption provides no confidence of sender because anyone potentially knows public key However if sender encrypts with receiver s public key and then signs using its private key, we have both confidentiality and authentication Again need the ability to distinguish intelligible messages from corrupted messages But at cost of two public-key uses on message 02/13/2017 5

Providing Msg Authentication by Asymmetric Encryption 02/13/2017 6

Message Authentication Code (MAC) Generated by an algorithm that creates a small fixed-sized block depending on both message and some key like encryption though need not to be reversible Appended to message as a signature Receiver performs same computation on message and checks if it matches the MAC Provide assurance that 1) message is unaltered and 2) comes from claimed sender 02/13/2017 7

Uses of MAC 02/13/2017 8

MAC Properties Like a cryptographic checksum MAC = C K (M) condenses a variable-length message M using a secret key K to a fixed-sized authenticator Many-to-one function potentially many messages have same MAC make sure finding collisions is very difficult 02/13/2017 9

Requirements for MACs Should take into account the types of attacks Need the MAC to satisfy the following: 1. knowing a message and MAC, it is infeasible to find another message with same MAC 2. MACs should be uniformly distributed 3. MAC should depend equally on all bits of the message 02/13/2017 10

Using Symmetric Ciphers for MAC 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 could be too small for security 02/13/2017 11

Hash Functions Condense arbitrary message to fixed size Usually assume that the hash function is public and not keyed Hash value is used to detect changes to message Can use in various ways with message Most often is used to create a digital signature 02/13/2017 12

Uses of Hash Functions 02/13/2017 13

Uses of Hash Functions 02/13/2017 14

Hash Function Properties Hash function produces a fingerprint of some file/message/data h = H(M) condenses a variable-length message M to a fixed-sized fingerprint Assumed to be public 02/13/2017 15

Requirements for Hash Functions 02/13/2017 16

Simple Hash Functions 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 02/13/2017 17

Block Ciphers as Hash Functions Can use block ciphers as hash functions use H 0 =0 and zero-pad of final block compute H i = E M i [H i-1 ] use final block as the hash value similar to CBC but without a key Resulting hash is too small (64-bit) both due to direct birthday attack and to meet-inthe-middle attack Other variants also susceptible to attack 02/13/2017 18

Birthday Attacks Might think a 64-bit hash is secure However by Birthday Paradox is not Birthday attack works as follows given hash code length is m, adversary generates 2 m / 2 variations of a valid message all with essentially the same meaning adversary also generates 2 m / 2 variations of a desired fraudulent message two sets of messages are compared to find pair with same hash (probability > 0.5 by birthday paradox) have user sign the valid message, then substitute the forgery which will have a valid signature If 64-bit hash code is used, level of attack effort is only on the order of 2 32 02/13/2017 19

Example with 2 37 Variations 02/13/2017 20

Hash Algorithm Structure 02/13/2017 21

MD5 Designed by Ronald Rivest (the R in RSA) Latest in a series of MD2, MD4 Produce a hash value of 128 bits (16 bytes) Was the most widely used hash algorithm Specified as Internet standard RFC1321 02/13/2017 22

Security of MD5 MD5 hash is dependent on all message bits Rivest claims security is good as can be However known attacks include Berson in 1992 attacked any 1 round using differential cryptanalysis (but can t extend) Boer & Bosselaers in 1993 found a pseudo collision (again unable to extend) Dobbertin in 1996 created collisions on MD compression function (but initial constants prevent exploit) Wang et al announced cracking MD5 on Aug 17, 2004 (paper available on Useful Links) Thus MD5 has become vulnerable 02/13/2017 23

Secure Hash Algorithm SHA originally designed by NIST & NSA in 1993 Was revised in 1995 as SHA-1 US standard for use with DSA signature scheme standard is FIPS 180-1 1995, also Internet RFC3174 Based on design of MD4 but with key differences Produces 160-bit hash values Recent 2005 results (Wang et al) on security of SHA- 1 have raised concerns on its use in future applications 02/13/2017 24

Revised Secure Hash Standard NIST issued revision FIPS 180-2 in 2002 Adds 3 additional versions of SHA SHA-256, SHA-384, SHA-512: collectively known as SHA-2 Designed for compatibility with increased security provided by the AES cipher Structure and detail are similar to SHA-1 Hence analysis should be similar But security levels are rather higher 02/13/2017 25

SHA-512 Overview 1. pad message so its length is 896 mod 1024 padding length between 1 and 1024 2. append a 128-bit length value to message 3. initialize 8 64-bit registers (A,B,C,D,E,F,G,H) 4. process message in 1024-bit blocks: expand 16 64-bit words into 80 words by mixing & shifting 80 rounds of operations on message block & buffer add output to input to form new buffer value 5. output hash value is the final buffer value 02/13/2017 26

SHA-512 Overview 02/13/2017 27

SHA-512 Compression Function Heart of the algorithm Processing message in 1024-bit blocks Consists of 80 rounds updating a 512-bit buffer using a 64-bit value W t derived from the current message block and a round constant K t based on cube root of first 80 prime numbers 02/13/2017 28

SHA-512 Round Function 02/13/2017 29

SHA-512 Round Function 02/13/2017 30

SHA-3 SHA-2 still shares the same structure and mathematical operations as its predecessors so this is a cause for concern NIST announced in 2007 a competition for SHA-3, next generation NIST hash function Winning design was announced by NIST in October 2012 SHA-3 is a cryptographic hash function that is intended to complement SHA-2 as the approved standard for a wide range of applications 02/13/2017 31

The Sponge Construction Underlying structure of SHA-3 is a scheme referred to by its designers as a sponge construction Takes an input message and partitions it into fixedsize blocks Each block is processed in turn with the output of each iteration fed into the next iteration, finally producing an output block The sponge function is defined by three parameters: f : internal function used to process each input block r : size in bits of the input blocks, called the bitrate pad : the padding algorithm 02/13/2017 32

Sponge Function 02/13/2017 33

02/13/2017 34

SHA-3 Parameters 02/13/2017 35

SHA-3 Iteration Function 02/13/2017 36

SHA-3 Step Functions 02/13/2017 37

Security of Hash Functions and MAC Brute-force attacks strong collision resistance hash have cost 2 m / 2 have proposal for hardware MD5 cracker 128-bit hash is vulnerable, 160-bit is better but could get compromised soon MACs with known message-mac pairs can either attack keyspace or MAC at least 128-bit MAC is needed for security 02/13/2017 38

Security of Hash Functions and MAC Cryptanalytic attacks exploit structure like block ciphers, we want brute-force attacks to be the best alternative for attacker Have a number of analytic attacks on iterated hash functions CV i = f[cv i-1, M i ]; H(M)=CV N typically focus on collisions in function f like block ciphers, often composed of rounds attacks exploit properties of round functions 02/13/2017 39

Keyed Hash Functions as MACs Desirable to create a MAC using a hash function rather than a block cipher hash functions are generally faster not limited by export controls on block ciphers Hash includes a key along with the message Original proposal: KeyedHash = Hash(Key Message) some weaknesses were found with this proposal Eventually led to development of HMAC 02/13/2017 40

HMAC Specified as Internet standard RFC2104 Use hash function on the message: HMAC K = Hash[(K + XOR opad) Hash[(K + XOR ipad) M)]] K + is the key padded out to size opad, ipad are specified padding constants Overhead is just 3 more hash compression function calculations than the message alone needs Any of MD5, SHA-1, SHA-2, RIPEMD-160 can be used 02/13/2017 41

HMAC Structure 02/13/2017 42

Security of HMAC 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 used based on speed versus security constraints 02/13/2017 43

Summary of Hash Functions and MAC Hash Functions condense arbitrary size message to fixed size by processing message in blocks through some compression function either custom or block cipher based Message Authentication Code (MAC) fixed sized authenticator for some message to provide authentication for message by using block cipher chaining mode or hash function 02/13/2017 44

Next Class Replay attacks Timestamps and nonces Anti-replay protocols 02/13/2017 45