Cryptographic Hash Functions

Similar documents
Cryptographic hash functions and MACs

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

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

Cryptographic Hash Functions. William R. Speirs

CS-E4320 Cryptography and Data Security Lecture 5: Hash Functions

Cryptographic Hash Functions

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

V.Sorge/E.Ritter, Handout 6

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

CSCE 715: Network Systems Security

Some Stuff About Crypto

Message Authentication and Hash function 2

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 ).

Lecture 1: Course Introduction

Cryptographic Hash Functions

Message Authentication Codes and Cryptographic Hash Functions

Data Integrity & Authentication. Message Authentication Codes (MACs)

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

Spring 2010: CS419 Computer Security

Cryptography. Summer Term 2010

Computer Security Spring Hashes & Macs. Aggelos Kiayias University of Connecticut

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 ).

Multiple forgery attacks against Message Authentication Codes

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

CSC/ECE 774 Advanced Network Security

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

Data Integrity & Authentication. Message Authentication Codes (MACs)

H must be collision (2n/2 function calls), 2nd-preimage (2n function calls) and preimage resistant (2n function calls)

CIS 4360 Secure Computer Systems Symmetric Cryptography

Integrity of messages

Differential Cryptanalysis

CSC 5930/9010 Modern Cryptography: Cryptographic Hashing

ENEE 459-C Computer Security. Message authentication

NEW COMPRESSION FUNCTION TO SHA-256 BASED ON THE TECHNIQUES OF DES.

Cryptography MIS

Winter 2011 Josh Benaloh Brian LaMacchia

Data Integrity. Modified by: Dr. Ramzi Saifan

Cryptography and Network Security

There are numerous Python packages for cryptography. The most widespread is maybe pycrypto, which is however unmaintained since 2015, and has

COMP4109 : Applied Cryptography

1.264 Lecture 28. Cryptography: Asymmetric keys

Encryption I. An Introduction

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Vortex. A New Family of One-Way Hash Functions. Based on AES Rounds and Carry-less Multiplication. Intel Corporation, IL

CS155. Cryptography Overview

Security Analysis of a Design Variant of Randomized Hashing

Security: Cryptography

Cipher Suite Configuration Mode Commands

CS408 Cryptography & Internet Security

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO.

How many DES keys, on the average, encrypt a particular plaintext block to a particular ciphertext block?

AC76/AT76 CRYPTOGRAPHY & NETWORK SECURITY JUNE 2014

(2½ hours) Total Marks: 75

Vortex: A New Family of One-way Hash Functions Based on AES Rounds and Carry-less Multiplication

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

ROEVER ENGINEERING COLLEGE Elambalur,Perambalur DEPARTMENT OF CSE NP UNIT-I

Permutation-based symmetric cryptography

Network Security. Cryptographic Hash Functions Add-on. Benjamin s slides are authoritative. Chair for Network Architectures and Services

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

Block Ciphers Tutorial. c Eli Biham - May 3, Block Ciphers Tutorial (5)

ECE 646 Fall 2009 Final Exam December 15, Multiple-choice test

Message authentication codes

Construction of secure and fast hash functions using nonbinary error-correcting codes

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

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

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

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

Practical Aspects of Modern Cryptography

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Sankalchand Patel College of Engineering, Visnagar Department of Computer Engineering & Information Technology. Question Bank

Data & Network Security By. Samiullah Khan. Week 11. Hash Algorithm/Message Digest MD2 MD4

Hash functions & MACs

ECE 545 Lecture 8b. Hardware Architectures of Secret-Key Block Ciphers and Hash Functions. George Mason University

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

Ref:

Introduction to Cryptography. Lecture 6

Demise of MD5 and SHA-1. Designing the New Hash. Stanis law Pawe l Radziszowski Department of Computer Science Rochester Institute of Technology

CS Computer Networks 1: Authentication

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 7, 2013

Encryption. INST 346, Section 0201 April 3, 2018

Narrow-Bicliques: Cryptanalysis of Full IDEA. Gaetan Leurent, University of Luxembourg Christian Rechberger, DTU MAT

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

Attacks on Double Block Length Hash Functions

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

Cryptographic Concepts

Cryptanalysis of Block Ciphers Based on SHA-1 and MD5

(a) Symmetric model (b) Cryptography (c) Cryptanalysis (d) Steganography

Message Authentication and Hash function

Password-based OpenSSL Encryption

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

CSE 127: Computer Security Cryptography. Kirill Levchenko

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

Outline. hash tables hash functions open addressing chained hashing

Enhancing the Security Level of SHA-1 by Replacing the MD Paradigm

Symmetric Key Algorithms. Definition. A symmetric key algorithm is an encryption algorithm where the same key is used for encrypting and decrypting.

4 Hybrid Cryptographic Algorithm

Grøstl a SHA-3 candidate

Network and System Security

Workshop Challenges Startup code in PyCharm Projects

Transcription:

Cryptographic Hash Functions

Cryptographic Hash Functions A cryptographic hash function takes a message of arbitrary length and creates a message digest of fixed length.

Iterated Hash Function A (compression) function takes a fixed size input. The function is iterated number of times. Each iteration: n-bit string is input m-bit string is output. n>m Example: Merkle-Damgard Scheme

Merkle-Damgard Scheme

Merkle-Damgard Scheme It is an iterated hash function. 1. The message length and padding are appended to create an augmented message that can be evenly divided into blocks of n bits, where n is the size of the block to be processed by the compression function. 2. The message is then considered as t blocks, each of n bits. M 1, M 2, M t The digests t iterations are H 1, H 2, H t

Merkle-Damgard Scheme 3. Before starting the function, H_0 is set to a fixed value, called the IV initialization vector. 4. Compression function f is such that H i = f(h i-1, M i ) 5. H_t is the cryptographic hash function of the original message, that is, h(m).

Merkle-Damgard Scheme

Two groups of compression functions 1. Compression function made from scratch 2. A symmetric-key block cipher serves as a compression function

Hash functions from scratch 1. Message Digest: MD 2. Secure Hash Function (SHA)

Hash Functions based on Block Ciphers An iterated cryptographic hash function can use a symmetric-key block cipher as a compression function.

Rabin Scheme Based on Merkle-Damgard scheme. Compression function = encrypting cipher Message block = key for cipher Plain text = previous digest New Message Digest = ciphertext Size of digest = size of data block used in the underlying cipher. If DES then digest = 64 bits Subject to meet-in-the-middle attack.

Rabin Scheme

Davies-Meyer Scheme Uses forward feed to protect against meetin-the-middle attack.

SHA-512 SHA-512 is the version of SHA with a 512- bit message digest. This version, like the others in the SHA family of algorithms, is based on the Merkle-Damgard scheme.

Message digest creation SHA-512

Message Preparation SHA-512 insists that the length of the original message be less than 2 128 bits. Note SHA-512 creates a 512-bit message digest out of a message of length less than 2 128.

Padding and length field in SHA-512

Example What is the number of padding bits if the length of the original message is 2590 bits? Solution We can calculate the number of padding bits as follows: The padding consists of one 1 followed by 353 0 s.

Example Do we need padding if the length of the original message is already a multiple of 1024 bits? Solution Yes we do, because we need to add the length field. So padding is needed to make the new block a multiple of 1024 bits.

Example What is the minimum and maximum number of padding bits that can be added to a message? Solution a. The minimum length of padding is 0 and it happens when ( M 128) mod 1024 is 0. This means that M = 128 mod 1024 = 896 mod 1024 bits. In other words, the last block in the original message is 896 bits. We add a 128-bit length field to make the block complete.

Example b) The maximum length of padding is 1023 and it happens when ( M 128) = 1023 mod 1024. This means that the length of the original message is M = ( 128 1023) mod 1024 or the length is M = 897 mod 1024. In this case, we cannot just add the length field because the length of the last block exceeds one bit more than 1024. So we need to add 897 bits to complete this block and create a second block of 896 bits. Now the length can be added to make this block complete.

Words: SHA 512 has a message size of 1024 bits. The word size is 64 bits. 1024 = 16 x 64 16 words. Digest size = 512 bits = 8 words. A message block and the digest as words

Word Expansion: SHA 512 needs 80 words for processing. 16 word block 80 words First 16 words form the message block and the rest as shown. Word expansion in SHA-512

Example Show how W60 is made. Solution Each word in the range W16 to W79 is made from four previously-made words. W60 is made as

Message Digest Initialization Comes from first 8 primes. Fraction part of the square root of the number and in binary first 64 bits are considered. Example, 8 th prime = 19. SQUARE ROOT(19) = 4.35889894354 Converted to binary:

Compression function in SHA-512 Message Block = 1024 bits Total 80 rounds. Each round input = 8 words initial digest 1 word = 64 bit. One word from extended block W_0 and one 64-bit constant K_0. A new set of 8 buffers Last round the final adding with the initial digest is done.

Structure of each round in SHA-512

Majority Function Conditional Function Rotate Functions

There are 80 constants, K 0 to K 79, each of 64 bits. Similar These values are calculated from the first 80 prime numbers (2, 3,, 409). For example, the 80th prime is 409, with the cubic root (409) 1/3 = 7.42291412044. Converting this number to binary with only 64 bits in the fraction part, we get The fraction part: (6C44198C4A475817) 16

WHIRLPOOL Whirlpool is an iterated cryptographic hash function, based on the Miyaguchi-Preneel scheme, that uses a symmetric-key block cipher in place of the compression function. The block cipher is a modified AES cipher that has been tailored for this purpose.