Announcements:Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions and SHA-1 Hash Functions.

Slides:



Advertisements
Similar presentations
Hashes and Message Digests
Advertisements

Hash Function. What are hash functions? Just a method of compressing strings – E.g., H : {0,1}*  {0,1} 160 – Input is called “message”, output is “digest”
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Outline Project 1 Hash functions and its application on security Modern cryptographic hash functions and message digest –MD5 –SHA.
MD Collision Sought Marian Ščerbák University of Pavol Jozef Šafárik Košice.
 Stream ciphers o Encrypt chars/bits one at a time o Assume XOR w the key, need long key to be secure  Keystream generators (pseudo-random key) o Synchronous.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
PIITMadhumita Chatterjee Security 1 Hashes and Message Digests.
Announcements: 1. HW7 due next Tuesday. 2. Inauguration today! Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman,
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.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
MD5 Message Digest Algorithm CS265 Spring 2003 Jerry Li Computer Science Department San Jose State University.
Hashes and Message Digest Hash is also called message digest One-way function: d=h(m) but no h’(d)=m –Cannot find the message given a digest Cannot find.
Announcements: 1. Class cancelled tomorrow 2. HW7 due date moved to Thursday. Questions? This week: Birthday attacks, Digital signatures Birthday attacks,
Cryptography and Network Security Hash Algorithms.
By: Matthew Ng. SHA stands for Secure Hash Algorithm It is based off the Merkle-Dangard hash function There are 3 versions of it with one coming in 2012.
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Information Security and Management 11
Announcements: 1. HW6 due now 2. HW7 posted Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 Pertemuan 09 Hash and Message Digest Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
CSCE 790: Computer Network Security Chin-Tser Huang University of South Carolina.
MD4 1 MD4. MD4 2 MD4  Message Digest 4  Invented by Rivest, ca 1990  Weaknesses found by 1992 o Rivest proposed improved version (MD5), 1992  Dobbertin.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
HASH Functions.
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.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
1 Hashes and Message Digests. 2 Hash Also known as –Message digest –One-way function Function: input message -> output One-way: d=h(m), but not h’(d)
Lect : Hash Functions and MAC. 2 1.Introduction - Hash Function vs. MAC 2.Hash Functions  Security Requirements  Finding collisions – birthday.
Hashing Algorithms: Basic Concepts and SHA-2 CSCI 5857: Encoding and Encryption.
Hash and MAC Functions CS427 – Computer Security
1 Hash Functions. 2 A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length
Hash and Mac Algorithms. Contents Hash Functions Secure Hash Algorithm HMAC.
Cryptographic Hash Functions
CSCE 815 Network Security Lecture 8 SHA Operation and Kerberos.
1 Number Theory and Advanced Cryptography 6. Digital Signature Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
Chapter 18: One-Way Hash Functions Based on Schneier.
Hash Algorithms see similarities in the evolution of hash functions & block ciphers –increasing power of brute-force attacks –leading to evolution in algorithms.
Cryptographic Hash Functions and Protocol Analysis
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.3 Hash Functions.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
Information Security and Management 11. Cryptographic Hash Functions Chih-Hung Wang Fall
Hash Algorithms Ch 12 of Cryptography and Network Security - Third Edition by William Stallings Modified from lecture slides by Lawrie Brown CIM3681 :
Lecture 9 Overview. RSA Invented by Cocks (GCHQ), independently, by Rivest, Shamir and Adleman (MIT) Two keys e and d used for Encryption and Decryption.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 Message Authentication using Message Digests and the MD5 Algorithm Message authentication is important where undetected manipulation of messages can.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 13.Message Authentication.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Chapter 12 – Hash Algorithms
Secure Hash Algorithm A SEARIES OF SHA….
DTTF/NB479: Dszquphsbqiz Day 26
ICS 454 Principles of Cryptography
ICS 454 Principles of Cryptography
DTTF/NB479: Dszquphsbqiz Day 27
Hashing Hash are the auxiliary values that are used in cryptography.
Presentation transcript:

Announcements:Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions and SHA-1 Hash Functions and SHA-1 Birthday attacks Birthday attacks DTTF/NB479: DszquphsbqizDay 27

Hash Functions Goal: to provide a unique “fingerprint” of the message. How? Must demonstrate 3 properties: 1. Fast to compute y from m. 2. One-way: given y = h(m), can’t find any m’ satisfying h(m’) = y easily. 3. Strongly collision-free: Can’t find any m 1 != m 2 such that h(m 1 )=h(m 2 ) easily 4. (Sometimes we can settle for weakly collision-free: given m, can’t find m’ != m with h(m) = h(m’). Message m (long) Message digest, y (Shorter fixed length) Cryptographic hash Function, h Shrinks data, so 2 messages can have the same digest: m 1 != m 2, but H(m 1 ) = h(m 2 )

EHA: Easy Hash Algorithm Break m into n-bit blocks, append zeros to get a multiple of n. There are L of them, where L =|m|/n Fast! But not very secure. Doing a left shift on the rows helps a little: Defineas left- shifting m by y bits Defineas left- shifting m by y bits Then Then =h(m)

EHA: Easy Hash Algorithm =h(m) Exercise: 1.Show that the basic (unrotated) version doesn’t satisfy properties 2 and 3. 2.Show that the rotated version doesn’t satisfy properties 2 and 3 either. Conclusion: Need nonlinearity! 3 properties: 1. Fast to compute 2. One-way: given y = h(m), can’t find any m’ satisfying h(m’) = y easily. 3. Strongly collision- free: Can’t find m 1 != m 2 such that h(m 1 )=h(m 2 )

SHA-1: Secure Hash Algorithm NSA  NIST “This standard specifies a Secure Hash Algorithm (SHA), which is necessary to ensure the security of the Digital Signature Algorithm (DSA). When a message of any length < 2 64 bits is input, the SHA produces a 160- bit output called a message digest. The message digest is then input to the DSA, which computes the signature for the message. Signing the message digest rather than the message often improves the efficiency of the process, because the message digest is usually much smaller than the message. The same message digest should be obtained by the verifier of the signature when the received version of the message is used as input to SHA. The SHA is called secure because it is designed to be computationally infeasible to recover a message corresponding to the message digest. Any change to the message in transit will, with a very high probability, result in a different message digest, and the signature will fail to verify. The SHA is based on principles similar to those used by Professor Ronald L. Rivest of MIT when designing the MD4 message digest algorithm, and is closely modelled after that algorithm.” (Proposed Federal Information Processing Standard for Secure Hash Standard,” Federal Register, v. 57, n. 177, 11 Sep 1992, p ) …how?

SHA-1: Prepare the message 1.Prepare the message. Given m, create mmm…m1000…000xxxxx….x: Append a 1 and then enough zeros to make the total congruent to 448 (mod 512) bits (to leave room for the length) Append the length of m (≤ 2 64, so can be written in 64 bits) Break into L 512-bit chunks. Each will be used to compress into a 160- bit total message digest. Break into L 512-bit chunks. Each will be used to compress into a 160- bit total message digest. Example: Encode m with length 5000 bits. What is L? 1

SHA-1: Notation Bitwise AND Bitwise OR Bitwise XOR Bitwise NOT Left-shift, with wrap-around Addition, mod

SHA-1: Iterative compression Idea: iterate over all of the L blocks, outputting a value that is a function of the previous output and the current block: Now, the function h’… m1m1 m2m2 X0X0 X1X1 X2X2 h’ m3m3 X3X3 mLmL XLXL =h(m) 3 (X 0 is constant)

SHA-1: Compression function: h’ Input: X 0 (160 bits), m 1 (512 bits): Output: X 1 Expand m 1 from 512  2560 bits. m 1 =(W 0..W 15 ) (32 bits each) Initialization 4 rounds of 20 iterations each: Each round uses a different K and different nonlinear mixing function f w 79 …w 16 … w 19 m1m1 w0w0 w1w1 w 15 … K =0x5A Round 1 K =6ED9EBA1 K =8F1BBCDC K =CA62C1D6 Round 2 Round 3 Round 4 … (20 iters) 4-5

SHA-1: Compression function: h’ Input: X 0 (160 bits), m 1 (512 bits): Output: X 1 Expand m 1 from 512  2560 bits. m 1 =(W 1..W 15 ) Initialization 4 rounds of 20 iterations each): Each round uses a different K and different nonlinear mixing function f w 79 …w 16 … w 19 m1m1 w0w0 w1w1 w 15 … K =5A Round 1 K =6ED9EBA1 K =8F1BBCDC K =CA62C1D6 Round 2 Round 3 Round 4 … (20 iters)

SHA-1: Iterative compression Repeat the algorithm on the previous slide L times until you’ve compressed the whole message into a single 160-bit vector. Each can be implemented in hardware. m1m1 m2m2 X0X0 X1X1 X2X2 h’ m3m3 X3X3 mLmL XLXL =h(m) 6

Interesting trivia The NSA added the left shift in w after the fact. The change “corrects a technical flaw that made the standard less secure than have been thought”. (Proposed Revision of Federal Information Processing Standard (FIPS) 180, for Secure Hash Standard,” Federal Register, v. 59, n. 131, 11 Jul 1994, p ) 7-9

Summary What’s an attack on SHA-1 look like? In other words, how do we find collisions? Stay tuned… Next time we’ll learn what birthdays have to do with collisions How long before SHA-1 will be broken? Latest on SHA-3, under development:

Plus-delta feedback