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

Size: px
Start display at page:

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

Transcription

1 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 Module 28- Hash Algorithms Learning Objectives To introduce general ideas behind cryptographic hash function To distinguish between two categories of hash function: those with a compression function made from scratch and those with a block cipher as the compression function To discuss the structure of SHA-512 as an example of a cryptographic hash function with a compression function made from scratch To discuss the structure of Whirlpool as an example of a cryptographic hash function with a block cipher as the compression 1. 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 finger print.this is assumed to be public. 2. Requirements for Hash Functions The hash function 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 given x is infeasible to find y s.t. H(y)=H(x)

2 weak collision resistance 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. 3. Block Ciphers as Hash Functions The block ciphers can be used as a 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) both due to direct birthday attack and to meet-in-the-middle attack other variants also susceptible to attack 4. Hash Algorithms The similarities in the evolution of hash functions & block ciphers are increasing power of brute-force attacks this leads to evolution in algorithms like DES to AES in block cipher and from MD4 & MD5 to SHA-1 & RIPEMD-160 in hash algorithms.likewise tend to use common iterative structure as do block ciphers. 4.1 MD5 MD5 is the current, and very widely used, member of Rivest s family of hash functions. It is designed by Ronald Rivest (the R in RSA) the latest in a series of MD2, MD4 it produces a 128-bit hash value until recently was the most widely used hash algorithm,in recent times have both brute-force & cryptanalytic concerns specified as Internet standard RFC1321. The padded message is broken into 512-bit blocks, processed along with the buffer value using 4 rounds, and the result added to the input buffer to make the new buffer value. Repeat till run out

3 of message, and use final buffer value as hash. nb. due to padding always have a full final block (with length in it). Figure 1: MD5 Overview MD5 Compression Function Each round mixes the buffer input with the next "word" of the message in a complex, non-linear manner. A different non-linear function is used in each of the 4 rounds (but the same function for all 16 steps in a round). The 4 buffer words (a,b,c,d) are rotated from step to step so all are used and updated. g is one of the primitive functions F,G,H,I for the 4 rounds respectively. X[k] is the kth 32-bit word in the current message block. T[i] is the ith entry in the matrix of constants T. The addition of varying constants T and the use of different shifts helps ensure it are extremely difficult to compute collisions. Each round has 16 steps of the form: a b+((a+g(b,c,d)+x[k]+t[i])<<<s) a,b,c,d refer to the 4 words of the buffer, but used in varying permutations note this updates 1 word only of the buffer after 16 steps each word is updated 4 times

4 Where g(b,c,d) is a different nonlinear function in each round (F,G,H,I) T[i] is a constant value derived from sin. Figure: 2 MD5 Compression Function 4.1.2MD4 MD4 is the precursor to MD5, and was widely used. It uses 3 instead of 4 rounds, and the round functions are a little simpler. In creating MD5 Rivels aimed to strengthen the algorithms by introducing the extra round and varying the constants used. MD5 design goals: collision resistant (hard to find collisions),direct security (no dependence on "hard" problems),fast, simple, compact,favours little-endian systems (eg PCs) Strength of MD5 Some progress has been made analysing MD5, which along with the hash size of 128-bits means it s starting to look too small. Hence interest in hash functions that create larger hashes. MD5 hash is dependent on all message bits Rivest claims security is good as can be known attacks are Berson 92 attacked any 1 round using differential cryptanalysis (but can t extend) Boer & Bosselaers 93 found a pseudo collision (again unable to extend) Dobbertin 96 created collisions on MD

5 compression function (but initial constants prevent exploit) conclusion is that MD5 looks vulnerable soon. 5. Secure Hash Algorithm (SHA) The Secure Hash Algorithm (SHA) was developed by the National Institute of Standards and Technology (NIST) and published as a federal information processing standard (FIPS 180) in 1993; a revised version was issued as FIPS in 1995 and is generally referred to as SHA-1. The actual standards document is entitled Secure Hash Standard. SHA is based on the hash function MD4 and its design closely models MD4. SHA-1 is also specified in RFC 3174, which essentially duplicates the material in FIPS 180-1, but adds a C code implementation. SHA-1 produces a hash value of 160 bits. In 2002, NIST produced a revised version of the standard, FIPS 180-2, that defined three new versions of SHA, with hash value lengths of 256, 384, and 512 bits, known as SHA-256, SHA- 384, and SHA-512 (Table 28.1). These new versions have the same underlying structure and use the same types of modular arithmetic and logical binary operations as SHA-1. In 2005, NIST announced the intention to phase out approval of SHA-1 and move to a reliance on the other SHA versions by Shortly thereafter, a research team described an attack in which two separate messages could be found that deliver the same SHA-1 hash using 269 operations, far fewer than the 280 operations previously thought needed to find a collision with an SHA-1 hash. This result should hasten the transition to the other versions of SHA. SHA-1 SHA-256 SHA-384 SHA-512 Message digest size Message size <264 <264 <2128 <2128 Block size Word size Number of steps Security Table 1 Comparison of SHA Parameters

6 Notes: 1. All sizes are measured in bits. 2. Security refers to the fact that a birthday attack on a message digest of size n produces a collision with a work factor of approximately 2 n/2 SHA-512 Logic The algorithm takes as input a message with a maximum length of less than 2128 bits and produces as output a 512-bit message digest. The input is processed in 1024-bit blocks. Figure 4 depicts the overall processing of a message to produce a digest. Figure 4 Message Digest Generation Using SHA-512 The processing consists of the following steps: Step 1: Append padding bits. The message is padded so that its length is congruent to 896 modulo 1024 [length 896 (mod 1024)]. Padding is always added, even if the message is already of the desired length. Thus, the number of padding bits is in the range of 1 to The padding consists of a single 1-bit followed by the necessary number of 0-bits. Step 2: Append length. A block of 128 bits is appended to the message. This block is treated as an unsigned 128-bit integer (most significant byte first) and contains the length

7 of the original message (before the padding). The outcome of the first two steps yields a message that is an integer multiple of 1024 bits in length. In Figure 28.1, the expanded message is represented as the sequence of 1024-bit blocks M1, M2,..., MN, so that the total length of the expanded message is N x 1024 bits. Step 3: Initialize hash buffer. A 512-bit buffer is used to hold intermediate and final results of the hash function. The buffer can be represented as eight 64-bit registers (a, b, c, d, e, f, g, h).these registers are initialized to the following 64-bit integers (hexadecimal values): a = 6A09E667F3BCC908 b = BB67AE8584CAA73B c = 3C6EF372FE94F82B c = A54FF53A5F1D36F1 e = 510E527FADE682D1 f = 9B05688C2B3E6C1F g = 1F83D9ABFB41BD6B h = 5BE0CDI9137E2179 These values are stored in big-endian format, which is the most significant byte of a word in the low-address (leftmost) byte position. These words were obtained by taking the first sixty-four bits of the fractional parts of the square roots of the first eight prime numbers. Step 4: Process message in 1024-bit (128-word) blocks. The heart of the algorithm is a module that consists of 80 rounds; this module is labeled F in Figure 2. The logic is illustrated in Figure 2

8 Figure 5 SHA-512 Processing of a Single 1024-Bit Block Each round takes as input the 512-bit buffer value abcdefgh, and updates the contents of the buffer. At input to the first round, the buffer has the value of the intermediate hash value, Hi-1. Each round t makes use of a 64-bit value Wt derived from the current 1024-bit block being processed (Mi) These values are derived using a message schedule described subsequently. Each round also makes use of an additive constant Kt where 0 t 79 indicates one of the 80 rounds. These words represent the first sixty-four bits of the fractional parts of the cube roots of the first eighty prime numbers. The constants provide

9 a "randomized" set of 64-bit patterns, which should eliminate any regularities in the input data.the output of the eightieth round is added to the input to the first round (Hi-1)to produce Hi. The addition is done independently for each of the eight words in the buffer with each of the corresponding words in Hi-1 using addition modulo 264. Step 5: Output. After all N 1024-bit blocks have been processed, the output from the Nth stage is the 512-bit message digest. We can summarize the behavior of SHA-512 as follows: H0 = IV Hi = SUM64(Hi-1, abcdefghi) MD = HN where IV = initial value of the abcdefgh buffer, defined in step 3 abcdefghi = the output of the last round of processing of the ith message block N = the number of blocks in the message (including padding and length fields) SUM64 = Addition modulo 2 64 performed separately on each word of the pair of inputs MD = final message digest value SHA-512 Round Function Let us look in more detail at the logic in each of the 80 steps of the processing of one 512-bit block (Figure 28.3). Each round is defined by the following set of equations: where

10 t =step number; 0 t 79 Ch(e, f, g) = (e AND f) (NOT e AND g) the conditional function: If e then f else g Maj(a, b, c) = (a AND b) (a AND c) (b AND c) the function is true only of the majority (two or three) of the arguments are true. ROTR n (x) = circular right shift (rotation) of the 64-bit argument x by n bits Wt = a 64-bit word derived from the current 512-bit input block Kt = a 64-bit additive constant + = addition modulo 2 64 Figure 6 Elementary SHA-512 Operation (single round) It remains to indicate how the 64-bit word values Wt are derived from the 1024-bit message. Figure28.4 illustrates the mapping. The first 16 values of Wt are taken directly from the 16 words of the current block. The remaining values are defined as follows:

11 Where ROTR n (x) = circular right shift (rotation) of the 64-bit argument x by n bits SHR n (x) = left shift of the 64-bit argument x by n bits with padding by zeros on the right Figure 7 Creation of 80-word Input Sequence for SHA-512 Processing of Single Block Thus, in the first 16 steps of processing, the value of Wt is equal to the corresponding word in the message block. For the remaining 64 steps, the value of Wt consists of the circular left shift by one bit of the XOR of four of the preceding values of Wt, with two of those values subjected to shift and rotate operations. This introduces a great deal of redundancy and interdependence into the message blocks that are compressed, which complicates the task of finding a different message block that maps to the same compression function output. 5.Keyed Hash Functions as MACs The desire to create a MAC using a hash function rather than a block cipher because hash functions are generally faster and 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

12 5.1 HMAC 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 the hash algorithm to use based on speed/security concerns. specified as Internet standard RFC2104 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 Figure 8 HMAC Overview 5.1 HMAC Security The Ssecurity of HMAC relates to that of the underlying hash algorithmattacking HMAC requires either: brute force attack on key use Birthday attack (but since keyed would need to observe a very large number of messages)choose hash function used based on speed verses security constraints.

13 Summary General ideas behind cryptographic hash function is explored The difference between two categories of hash function: those with a compression function made from scratch and those with a block cipher as the compression function is studied The structure of SHA-512 as an example of a cryptographic hash function with a compression function made from scratch is explored

CSCE 715: Network Systems Security

CSCE 715: Network Systems Security 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

More information

Spring 2010: CS419 Computer Security

Spring 2010: CS419 Computer Security Spring 2010: CS419 Computer Security MAC, HMAC, Hash functions and DSA Vinod Ganapathy Lecture 6 Message Authentication message authentication is concerned with: protecting the integrity of a message validating

More information

Cryptography and Network Security

Cryptography and Network Security Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 12 Hash Algorithms Each of the messages, like each one he had ever read of Stern's commands,

More information

MD5 Message Digest Algorithm. MD5 Logic

MD5 Message Digest Algorithm. MD5 Logic MD5 Message Digest Algorithm MD5 (http://www.fas.org/rfcs/rfc131.html ) was developed by Ron Rivest at MIT in 1991. Until 1996, when a flaw was found in it, MD5 was the most widely used secure hash algorithm.

More information

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

S. Erfani, ECE Dept., University of Windsor Network Security. All hash functions operate using the following general principles: 4.14 Simple Hash Functions All hash functions operate using the following general principles: a) The input string is viewed as a sequence of n-byte blocks. b) The input is processed one block at a time

More information

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

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 ). CA642: CRYPTOGRAPHY AND NUMBER THEORY 1 8 Hash Functions 8.1 Hash Functions Hash Functions A hash function is an efficient function mapping binary strings of arbitrary length to binary strings of fixed

More information

Security Requirements

Security Requirements Message Authentication and Hash Functions CSCI 454/554 Security Requirements disclosure traffic analysis masquerade content modification sequence modification timing modification source repudiation destination

More information

Message Authentication and Hash function 2

Message Authentication and Hash function 2 Message Authentication and Hash function 2 Concept and Example 1 SHA : Secure Hash Algorithm Four secure hash algorithms, SHA-11, SHA-256, SHA-384, and SHA-512. All four of the algorithms are iterative,

More information

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

Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS UNIT III AUTHENTICATION Digests Requirements MAC Hash function Security of Hash and MAC Birthday Attack MD5 SHA RIPEMD Digital Signature Standard Proof of DSS Authentication Requirements Disclosure Release

More information

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

Cryptography and Network Security Chapter 12. Message Authentication. Message Security Requirements. Public Key Message Encryption Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 12 Message Authentication Codes At cats' green on the Sunday he took the message from

More information

Cryptographic Hash Functions

Cryptographic Hash Functions 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)

More information

Data Integrity & Authentication. Message Authentication Codes (MACs)

Data Integrity & Authentication. Message Authentication Codes (MACs) Data Integrity & Authentication Message Authentication Codes (MACs) Goal Ensure integrity of messages, even in presence of an active adversary who sends own messages. Alice (sender) Bob (receiver) Fran

More information

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

Unit III. Chapter 1: Message Authentication and Hash Functions. Overview: Unit III Chapter 1: Message Authentication and Hash Functions Overview: Message authentication is a mechanism or service used to verify the integrity of a message. Message authentication assures that data

More information

Lecture 1 Applied Cryptography (Part 1)

Lecture 1 Applied Cryptography (Part 1) Lecture 1 Applied Cryptography (Part 1) Patrick P. C. Lee Tsinghua Summer Course 2010 1-1 Roadmap Introduction to Security Introduction to Cryptography Symmetric key cryptography Hash and message authentication

More information

Cryptography. Summer Term 2010

Cryptography. Summer Term 2010 Summer Term 2010 Chapter 2: Hash Functions Contents Definition and basic properties Basic design principles and SHA-1 The SHA-3 competition 2 Contents Definition and basic properties Basic design principles

More information

Data Integrity & Authentication. Message Authentication Codes (MACs)

Data Integrity & Authentication. Message Authentication Codes (MACs) Data Integrity & Authentication Message Authentication Codes (MACs) Goal Ensure integrity of messages, even in presence of an active adversary who sends own messages. Alice (sender) Bob (reciever) Fran

More information

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

Chapter 6. New HASH Function. 6.1 Message Authentication. Message authentication is a mechanism or service used for verifying Chapter 6 New HASH Function 6.1 Message Authentication Message authentication is a mechanism or service used for verifying the integrity of a message. Message authentication assures that the data received

More information

Data Integrity. Modified by: Dr. Ramzi Saifan

Data Integrity. Modified by: Dr. Ramzi Saifan Data Integrity Modified by: Dr. Ramzi Saifan Encryption/Decryption Provides message confidentiality. Does it provide message authentication? 2 Message Authentication Bob receives a message m from Alice,

More information

Message Authentication Codes and Cryptographic Hash Functions

Message Authentication Codes and Cryptographic Hash Functions Message Authentication Codes and Cryptographic Hash Functions Readings Sections 2.6, 4.3, 5.1, 5.2, 5.4, 5.6, 5.7 1 Secret Key Cryptography: Insecure Channels and Media Confidentiality Using a secret key

More information

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

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015 Cryptographic Hash Functions Rocky K. C. Chang, February 5, 2015 1 This set of slides addresses 2 Outline Cryptographic hash functions Unkeyed and keyed hash functions Security of cryptographic hash functions

More information

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

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS Lecture 5 Cryptographic Hash Functions Read: Chapter 5 in KPS 1 Purpose CHF one of the most important tools in modern cryptography and security CHF-s are used for many authentication, integrity, digital

More information

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

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS Lecture 5 Cryptographic Hash Functions Read: Chapter 5 in KPS 1 Purpose CHF one of the most important tools in modern cryptography and security In crypto, CHF instantiates a Random Oracle paradigm In security,

More information

AC76/AT76 CRYPTOGRAPHY & NETWORK SECURITY JUNE 2014

AC76/AT76 CRYPTOGRAPHY & NETWORK SECURITY JUNE 2014 Q.2 a. Differentiate between active and passive attacks. List some passive attacks and some active attacks. Passive attacks are in the nature of eavesdropping on, or monitoring of, transmissions. The goal

More information

Statistical Analysis of the SHA-1 and SHA-2 Hash Functions

Statistical Analysis of the SHA-1 and SHA-2 Hash Functions Statistical Analysis of the SHA-1 and SHA-2 Hash Functions Will Smith Department of Computer Science Rochester Institute of Technology wjs3641@rit.edu Abstract - The SHA-1 and SHA-2 hash functions are

More information

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

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of

More information

Winter 2011 Josh Benaloh Brian LaMacchia

Winter 2011 Josh Benaloh Brian LaMacchia Winter 2011 Josh Benaloh Brian LaMacchia Symmetric Cryptography January 20, 2011 Practical Aspects of Modern Cryptography 2 Agenda Symmetric key ciphers Stream ciphers Block ciphers Cryptographic hash

More information

CS408 Cryptography & Internet Security

CS408 Cryptography & Internet Security CS408 Cryptography & Internet Security Lecture 18: Cryptographic hash functions, Message authentication codes Functions Definition Given two sets, X and Y, a function f : X Y (from set X to set Y), is

More information

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

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 ). CA4005: CRYPTOGRAPHY AND SECURITY PROTOCOLS 1 5 5.1 A hash function is an efficient function mapping binary strings of arbitrary length to binary strings of fixed length (e.g. 128 bits), called the hash-value

More information

Cryptographic Hash Functions

Cryptographic Hash Functions Cryptographic Hash Functions Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.org Winter 2017 1 / 34 Cryptographic Hash Functions A hash function provides message integrity and authentication

More information

Semi-free start collision attack on Blender

Semi-free start collision attack on Blender Semi-free start collision attack on Blender Xu Liangyu and Li Ji Sony China Research Laboratory {Liangyu.Xu, Ji.Li}@sony.com.cn Abstract. Blender is a cryptographic hash function submitted to NIST s SHA3

More information

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

CSCI 454/554 Computer and Network Security. Topic 4. Cryptographic Hash Functions CSCI 454/554 Computer and Network Security Topic 4. Cryptographic Hash Functions Hash function lengths Outline Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication Code

More information

Cryptographic Hash Functions. William R. Speirs

Cryptographic Hash Functions. William R. Speirs Cryptographic Hash Functions William R. Speirs What is a hash function? Compression: A function that maps arbitrarily long binary strings to fixed length binary strings Ease of Computation: Given a hash

More information

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

Outline. Hash Function. Length of Hash Image. AIT 682: Network and Systems Security. Hash Function Properties. Question Hash function lengths Outline AIT 682: Network and Systems Security Topic 4. Cryptographic Hash Functions Instructor: Dr. Kun Sun Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication

More information

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

Outline. AIT 682: Network and Systems Security. Hash Function Properties. Topic 4. Cryptographic Hash Functions. Instructor: Dr. AIT 682: Network and Systems Security Topic 4. Cryptographic Hash Functions Instructor: Dr. Kun Sun Hash function lengths Outline Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication

More information

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

Hash Function. Guido Bertoni Luca Breveglieri. Fundations of Cryptography - hash function pp. 1 / 18 Hash Function Guido Bertoni Luca Breveglieri Fundations of Cryptography - hash function pp. 1 / 18 Definition a hash function H is defined as follows: H : msg space digest space the msg space is the set

More information

P2_L8 - Hashes Page 1

P2_L8 - Hashes Page 1 P2_L8 - Hashes Page 1 Reference: Computer Security by Stallings and Brown, Chapter 21 In this lesson, we will first introduce the birthday paradox and apply it to decide the length of hash, in order to

More information

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

ECE 646 Lecture 11. Hash functions & MACs. Digital Signature. message. hash. function. Alice. Bob. Alice s public key. Alice s private key ECE 646 Lecture 11 Hash functions & MACs Digital Signature Alice Message Signature Message Signature Bob Hash function Hash function Hash value Public key algorithm yes Hash value 1 Hash value 2 no Public

More information

Network and System Security

Network and System Security Network and System Security Lecture 5 2/12/2013 Hashes and Message Digests Mohammad Almalag 1 Overview 1. What is a cryptographic hash? 2. How are hashes used? 3. One-Way Functions 4. Birthday Problem

More information

UNIT III 3.1DISCRETE LOGARITHMS

UNIT III 3.1DISCRETE LOGARITHMS UNIT III Discrete Logarithms Computing discrete logs Diffie-Hellman key exchange ElGamal Public key cryptosystems Hash functions Secure Hash - MD5 Digital signatures RSA ElGamal Digital signature scheme.

More information

PUBLIC-KEY CRYPTOGRAPHY AND MESSAGE AUTHENTICATION

PUBLIC-KEY CRYPTOGRAPHY AND MESSAGE AUTHENTICATION PUBLIC-KEY CRYPTOGRAPHY AND MESSAGE AUTHENTICATION 3.1 Approaches to Message Authentication Authentication Using Conventional Encryption Message Authentication without Message Encryption 3.2 Secure Hash

More information

Integrity of messages

Integrity of messages Lecturers: Mark D. Ryan and David Galindo. Cryptography 2016. Slide: 106 Integrity of messages Goal: Ensure change of message by attacker can be detected Key tool: Cryptographic hash function Definition

More information

Chapter 3 Block Ciphers and the Data Encryption Standard

Chapter 3 Block Ciphers and the Data Encryption Standard Chapter 3 Block Ciphers and the Data Encryption Standard Last Chapter have considered: terminology classical cipher techniques substitution ciphers cryptanalysis using letter frequencies transposition

More information

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

CS-E4320 Cryptography and Data Security Lecture 5: Hash Functions Lecture 5: Hash Functions Céline Blondeau Email: celine.blondeau@aalto.fi Department of Computer Science Aalto University, School of Science Hash Functions Birthday Paradox Design of Hash Functions SHA-3

More information

Symmetric Cryptography. Chapter 6

Symmetric Cryptography. Chapter 6 Symmetric Cryptography Chapter 6 Block vs Stream Ciphers Block ciphers process messages into blocks, each of which is then en/decrypted Like a substitution on very big characters 64-bits or more Stream

More information

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO.

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. vii TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATION iii xii xiv xvii 1 INTRODUCTION 1 1.1 GENERAL 1 1.2 TYPES OF WIRELESS COMMUNICATION

More information

Keccak discussion. Soham Sadhu. January 9, 2012

Keccak discussion. Soham Sadhu. January 9, 2012 Keccak discussion Soham Sadhu January 9, 2012 Keccak (pronounced like Ketchak ) is a cryptographic hash function designed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche. Keccak is

More information

Implementation of SHA-1 Algorithm on FPGA

Implementation of SHA-1 Algorithm on FPGA International Journal of Engineering Inventions e-issn: 2278-7461, p-issn: 2319-6491 Volume 3, Issue 12 [Jul. 2014] PP: 111-115 Implementation of SHA-1 Algorithm on FPGA 1 Mukaramudin, 2 D Narendara chari,

More information

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

Hashes, MACs & Passwords. Tom Chothia Computer Security Lecture 5 Hashes, MACs & Passwords Tom Chothia Computer Security Lecture 5 Today s Lecture Hashes and Message Authentication Codes Properties of Hashes and MACs CBC-MAC, MAC -> HASH (slow), SHA1, SHA2, SHA3 HASH

More information

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

HOST Cryptography III ECE 525 ECE UNM 1 (1/18/18) AES Block Cipher Blockciphers are central tool in the design of protocols for shared-key cryptography What is a blockcipher? It is a function E of parameters k and n that maps { 0, 1} k { 0, 1} n { 0,

More information

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

Vortex: A New Family of One-way Hash Functions Based on AES Rounds and Carry-less Multiplication Vortex: A New Family of One-way Hash Functions Based on AES Rounds and Carry-less ultiplication Shay Gueron 2, 3, 4 and ichael E. Kounavis 1 1 Corresponding author, Corporate Technology Group, Intel Corporation,

More information

Encryption I. An Introduction

Encryption I. An Introduction Encryption I An Introduction Reading List ADO and SQL Server Security A Simple Guide to Cryptography Protecting Private Data with the Cryptography Namespaces Using MD5 to Encrypt Passwords in a Database

More information

Cryptographic Hash Functions

Cryptographic Hash Functions ECE458 Winter 2013 Cryptographic Hash Functions Dan Boneh (Mods by Vijay Ganesh) Previous Lectures: What we have covered so far in cryptography! One-time Pad! Definition of perfect security! Block and

More information

Multiple forgery attacks against Message Authentication Codes

Multiple forgery attacks against Message Authentication Codes Multiple forgery attacks against Message Authentication Codes David A. McGrew and Scott R. Fluhrer Cisco Systems, Inc. {mcgrew,sfluhrer}@cisco.com May 31, 2005 Abstract Some message authentication codes

More information

About notation. Outline. Keying material and algorithm abstraction. T Cryptosystems. Symmetric algorithms

About notation. Outline. Keying material and algorithm abstraction. T Cryptosystems. Symmetric algorithms About notation T 110.5211 Cryptosystems Symmetric algorithms 2.10.2008 We'll use the following symbols for bit operations Bitwise OR: or OR Bitwise AND: & and AND Bitwise XOR: ^ xor XOR Bitwise NOT: ~

More information

Encryption. INST 346, Section 0201 April 3, 2018

Encryption. INST 346, Section 0201 April 3, 2018 Encryption INST 346, Section 0201 April 3, 2018 Goals for Today Symmetric Key Encryption Public Key Encryption Certificate Authorities Secure Sockets Layer Simple encryption scheme substitution cipher:

More information

PGP: An Algorithmic Overview

PGP: An Algorithmic Overview PGP: An Algorithmic Overview David Yaw 11/6/2001 VCSG-482 Introduction The purpose of this paper is not to act as a manual for PGP, nor is it an in-depth analysis of its cryptographic algorithms. It is

More information

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

NEW COMPRESSION FUNCTION TO SHA-256 BASED ON THE TECHNIQUES OF DES. NEW COMPRESSION FUNCTION TO SHA-256 BASED ON THE TECHNIQUES OF DES. 1 ZAKARIA KADDOURI, 2 FOUZIA OMARY, 3 ABDOLLAH ABOUCHOUAR, 4 MOHSSIN DAARI, 5 KHADIJA ACHKOUN. LRI Laboratory (Ex: Networks and Data

More information

CSE 127: Computer Security Cryptography. Kirill Levchenko

CSE 127: Computer Security Cryptography. Kirill Levchenko CSE 127: Computer Security Cryptography Kirill Levchenko October 24, 2017 Motivation Two parties want to communicate securely Secrecy: No one else can read messages Integrity: messages cannot be modified

More information

Lecture 4: Hashes and Message Digests,

Lecture 4: Hashes and Message Digests, T-79.159 Cryptography and Data Security Lecture 4: Hashes and Message Digests Helsinki University of Technology mjos@tcs.hut.fi 1 Cryptographic hash functions Maps a message M (a bit string of arbitrary

More information

Jaap van Ginkel Security of Systems and Networks

Jaap van Ginkel Security of Systems and Networks Jaap van Ginkel Security of Systems and Networks November 17, 2016 Part 3 Modern Crypto SSN Modern Cryptography Hashes MD5 SHA Secret key cryptography AES Public key cryptography DES Presentations Minimum

More information

Chapter 6: Contemporary Symmetric Ciphers

Chapter 6: Contemporary Symmetric Ciphers CPE 542: CRYPTOGRAPHY & NETWORK SECURITY Chapter 6: Contemporary Symmetric Ciphers Dr. Lo ai Tawalbeh Computer Engineering Department Jordan University of Science and Technology Jordan Why Triple-DES?

More information

Overview. CSC 580 Cryptography and Computer Security. Hash Function Basics and Terminology. March 28, Cryptographic Hash Functions (Chapter 11)

Overview. CSC 580 Cryptography and Computer Security. Hash Function Basics and Terminology. March 28, Cryptographic Hash Functions (Chapter 11) CSC 580 Cryptography and Computer Security Cryptographic Hash Functions (Chapter 11) March 28, 2017 Overview Today: Review Homework 8 solutions Discuss cryptographic hash functions Next: Study for quiz

More information

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

H must be collision (2n/2 function calls), 2nd-preimage (2n function calls) and preimage resistant (2n function calls) What is a hash function? mapping of: {0, 1} {0, 1} n H must be collision (2n/2 function calls), 2nd-preimage (2n function calls) and preimage resistant (2n function calls) The Merkle-Damgård algorithm

More information

The Hash Function Fugue 2.0

The Hash Function Fugue 2.0 The Hash Function Fugue 2.0 Shai Halevi William E. Hall Charanjit S. Jutla IBM T.J. Watson Research Center April 2, 2012 1 Specification of Fugue 2.0 Fugue 2.0 is a modification of the original Fugue hash

More information

Security Analysis of Extended Sponge Functions. Thomas Peyrin

Security Analysis of Extended Sponge Functions. Thomas Peyrin Security Analysis of Extended Sponge Functions Hash functions in cryptology: theory and practice Leiden, Netherlands Orange Labs University of Versailles June 4, 2008 Outline 1 The Extended Sponge Functions

More information

Cryptography and Network Security Chapter 3. Modern Block Ciphers. Block vs Stream Ciphers. Block Cipher Principles

Cryptography and Network Security Chapter 3. Modern Block Ciphers. Block vs Stream Ciphers. Block Cipher Principles Cryptography and Network Security Chapter 3 Fifth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 3 Block Ciphers and the Data Encryption Standard All the afternoon Mungo had been working

More information

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

CS 645 : Lecture 6 Hashes, HMAC, and Authentication. Rachel Greenstadt May 16, 2012 CS 645 : Lecture 6 Hashes, HMAC, and Authentication Rachel Greenstadt May 16, 2012 Reminders Graded midterm, available on bbvista Project 3 out (crypto) Hash Functions MAC HMAC Authenticating SSL Man-in-the-middle

More information

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

The question paper contains 40 multiple choice questions with four choices and students will have to pick the correct one (each carrying ½ marks.). Time: 3hrs BCA III Network security and Cryptography Examination-2016 Model Paper 2 M.M:50 The question paper contains 40 multiple choice questions with four choices and students will have to pick the

More information

Generic collision attacks on hash-functions and HMAC

Generic collision attacks on hash-functions and HMAC Generic collision attacks on hash-functions and HMAC Chris Mitchell Royal Holloway, University of London 1 Agenda 1. Hash-functions and collision attacks 2. Memoryless strategy for finding collisions 3.

More information

Cryptography MIS

Cryptography MIS Cryptography MIS-5903 http://community.mis.temple.edu/mis5903sec011s17/ Cryptography History Substitution Monoalphabetic Polyalphabetic (uses multiple alphabets) uses Vigenere Table Scytale cipher (message

More information

CSC 580 Cryptography and Computer Security

CSC 580 Cryptography and Computer Security CSC 580 Cryptography and Computer Security Cryptographic Hash Functions (Chapter 11) March 22 and 27, 2018 Overview Today: Quiz (based on HW 6) Graded HW 2 due Grad/honors students: Project topic selection

More information

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

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08. Cryptography Part II Paul Krzyzanowski Rutgers University Spring 2018 March 23, 2018 CS 419 2018 Paul Krzyzanowski 1 Block ciphers Block ciphers encrypt a block of plaintext at a

More information

MasterMath Cryptology /2 - Cryptanalysis

MasterMath Cryptology /2 - Cryptanalysis MasterMath Cryptology 2015 2/2 Cryptanalysis Friday, 17 April, 2015 09:59 10. Hash Function Cryptanalysis (v3) Cryptographic hash functions map messages of arbitrary size to a fixed size hash, e.g. a bitstring

More information

Grøstl a SHA-3 candidate

Grøstl a SHA-3 candidate Grøstl a SHA-3 candidate http://www.groestl.info Praveen Gauravaram 1, Lars R. Knudsen 1, Krystian Matusiewicz 1, Florian Mendel 2, Christian Rechberger 2, Martin Schläffer 2, and Søren S. Thomsen 1 1

More information

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

S. Erfani, ECE Dept., University of Windsor Network Security 4.11 Data Integrity and Authentication It was mentioned earlier in this chapter that integrity and protection security services are needed to protect against active attacks, such as falsification of data

More information

Computer Security: Principles and Practice

Computer Security: Principles and Practice Computer Security: Principles and Practice Chapter 2 Cryptographic Tools First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Cryptographic Tools cryptographic algorithms

More information

Information Security. message M. fingerprint f = H(M) one-way hash. 4/19/2006 Information Security 1

Information Security. message M. fingerprint f = H(M) one-way hash. 4/19/2006 Information Security 1 Information Security message M one-way hash fingerprint f = H(M) 4/19/2006 Information Security 1 Outline and Reading Digital signatures Definition RSA signature and verification One-way hash functions

More information

P2_L6 Symmetric Encryption Page 1

P2_L6 Symmetric Encryption Page 1 P2_L6 Symmetric Encryption Page 1 Reference: Computer Security by Stallings and Brown, Chapter 20 Symmetric encryption algorithms are typically block ciphers that take thick size input. In this lesson,

More information

ENEE 459-C Computer Security. Message authentication

ENEE 459-C Computer Security. Message authentication ENEE 459-C Computer Security Message authentication Data Integrity and Source Authentication Encryption does not protect data from modification by another party. Why? Need a way to ensure that data arrives

More information

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

Sankalchand Patel College of Engineering, Visnagar Department of Computer Engineering & Information Technology. Question Bank Sankalchand Patel College of Engineering, Visnagar Department of Computer Engineering & Information Technology Question Bank Subject: Information Security (160702) Class: BE Sem. VI (CE/IT) Unit-1: Conventional

More information

Differential Cryptanalysis

Differential Cryptanalysis Differential Cryptanalysis See: Biham and Shamir, Differential Cryptanalysis of the Data Encryption Standard, Springer Verlag, 1993. c Eli Biham - March, 28 th, 2012 1 Differential Cryptanalysis The Data

More information

Cryptography and Network Security. Sixth Edition by William Stallings

Cryptography and Network Security. Sixth Edition by William Stallings Cryptography and Network Security Sixth Edition by William Stallings Chapter 3 Block Ciphers and the Data Encryption Standard All the afternoon Mungo had been working on Stern's code, principally with

More information

A comparative study of Message Digest 5(MD5) and SHA256 algorithm

A comparative study of Message Digest 5(MD5) and SHA256 algorithm Journal of Physics: Conference Series PAPER OPEN ACCESS A comparative study of Message Digest 5(MD5) and SHA256 algorithm To cite this article: D Rachmawati et al 208 J. Phys.: Conf. Ser. 978 026 View

More information

Cryptography and Network Security

Cryptography and Network Security Cryptography and Network Security Spring 2012 http://users.abo.fi/ipetre/crypto/ Lecture 14: Folklore, Course summary, Exam requirements Ion Petre Department of IT, Åbo Akademi University 1 Folklore on

More information

FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION. SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions

FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION. SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions FIPS PUB 202 FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions CATEGORY: COMPUTER SECURITY SUBCATEGORY: CRYPTOGRAPHY Information

More information

Message Authentication and Hash function

Message Authentication and Hash function Message Authentication and Hash function Concept and Example 1 Approaches for Message Authentication Encryption protects message against passive attack, while Message Authentication protects against active

More information

Network Security Essentials

Network Security Essentials Network Security Essentials Applications and Standards Third Edition William Stallings Chapter 2 Symmetric Encryption and Message Confidentiality Dr. BHARGAVI H. GOSWAMI Department of Computer Science

More information

CRYPTOGRAPHY AND NETWROK SECURITY-QUESTION BANK

CRYPTOGRAPHY AND NETWROK SECURITY-QUESTION BANK CRYPTOGRAPHY AND NETWROK SECURITY-QUESTION BANK UNIT-1 1. Answer the following: a. What is Non-repudiation b. Distinguish between stream and block ciphers c. List out the problems of one time pad d. Define

More information

Observations and Attacks On The SHA-3 Candidate Blender

Observations and Attacks On The SHA-3 Candidate Blender Observations and Attacks On The SHA-3 Candidate Blender Craig Newbold cjnewbold@googlemail.com Abstract 51 candidates have been accepted as first round candidates in NIST s SHA-3 competition, to decide

More information

Computer Security 3/23/18

Computer Security 3/23/18 s s encrypt a block of plaintext at a time and produce ciphertext Computer Security 08. Cryptography Part II Paul Krzyzanowski DES & AES are two popular block ciphers DES: 64 bit blocks AES: 128 bit blocks

More information

Lecture 4: Authentication and Hashing

Lecture 4: Authentication and Hashing Lecture 4: Authentication and Hashing Introduction to Modern Cryptography 1 Benny Applebaum Tel-Aviv University Fall Semester, 2011 12 1 These slides are based on Benny Chor s slides. Some Changes in Grading

More information

Cryptanalysis on Hash Functions. Xiaoyun Wang Tsinghua University & Shandong University

Cryptanalysis on Hash Functions. Xiaoyun Wang Tsinghua University & Shandong University Cryptanalysis on Hash Functions Xiaoyun Wang Tsinghua University & Shandong University 05-10-2006 Outline Introduction to hash function Hash function and signature Dedicated hash function Modular differential

More information

Double-DES, Triple-DES & Modes of Operation

Double-DES, Triple-DES & Modes of Operation Double-DES, Triple-DES & Modes of Operation Prepared by: Dr. Mohamed Abd-Eldayem Ref.: Cryptography and Network Security by William Stallings & Lecture slides by Lawrie Brown Multiple Encryption & DES

More information

Cryptographic hash functions and MACs

Cryptographic hash functions and MACs Cryptographic hash functions and MACs Myrto Arapinis School of Informatics University of Edinburgh October 05, 2017 1 / 21 Introduction Encryption confidentiality against eavesdropping 2 / 21 Introduction

More information

Evolution of Sha-176 Algorithm

Evolution of Sha-176 Algorithm IOSR Journal of Computer Engineering (IOSRJCE) ISSN: 2278-0661 Volume 2, Issue 2 (July-Aug. 2012), PP 18-22 Evolution of Sha-176 Algorithm Piyush Garg 1, Namita Tiwari 2 1,2 (Computer Science and Engineering,

More information

Message Authentication with MD5 *

Message Authentication with MD5 * Message Authentication with MD5 * Burt Kaliski and Matt Robshaw RSA Laboratories 100 Marine Parkway, Suite 500 Redwood City, CA 94065 USA burt@rsa.com matt@rsa.com Message authentication is playing an

More information

Symmetric Encryption Algorithms

Symmetric Encryption Algorithms Symmetric Encryption Algorithms CS-480b Dick Steflik Text Network Security Essentials Wm. Stallings Lecture slides by Lawrie Brown Edited by Dick Steflik Symmetric Cipher Model Plaintext Encryption Algorithm

More information

The most important development from the work on public-key cryptography is the digital signature. Message authentication protects two parties who

The most important development from the work on public-key cryptography is the digital signature. Message authentication protects two parties who 1 The most important development from the work on public-key cryptography is the digital signature. Message authentication protects two parties who exchange messages from any third party. However, it does

More information

Fast Block Cipher Proposal

Fast Block Cipher Proposal Fast Block Cipher Proposal Burton S. Kaliski Jr. and M.J.B. Robshaw RSA Laboratories 100 Marine Parkway Redwood City, CA 94065 1 Introduction In what follows we present the basic features of a proposed

More information

Hash functions & MACs

Hash functions & MACs ECE 646 Lecture 11 Hash functions & MACs Required Reading W. Stallings, "Cryptography and Network-Security, Chapter 11 Cryptographic Hash Functions Appendix 11A Mathematical Basis of Birthday Attack Chapter

More information