Dan Johnson. What is a hashing function? Fingerprint for a given piece of data Typically generated by a mathematical algorithm Produces a fixed length.

Slides:



Advertisements
Similar presentations
Lecture 5: Cryptographic Hashes
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”
SECURE HASHING ALGORITHM By: Ruth Betcher. Purpose: Authentication Not Encryption Authentication Requirements:  Masquerade – Insertion of message from.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
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.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
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.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
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.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 4 Cryptographic Tools (cont) modified from slides of 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.
Network Security Essentials Fifth Edition by William Stallings Fifth Edition by William Stallings.
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.
.Net Security and Performance -has security slowed down the application By Krishnan Ganesh Madras.
Jim McLeod MyDBA  SQL Server Performance Tuning Consultant with MyDBA  Microsoft Certified Trainer with SQLskills Australia 
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.
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.
Cryptography, Authentication and Digital Signatures
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Chapter 21 Public-Key Cryptography and Message Authentication.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 50 Cryptography, Privacy, and Digital Certificates.
Theory of Computation II Topic presented by: Alberto Aguilar Gonzalez.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
6fb52297e004844aa81be d50cc3545bc Hashing!. Hashing  Group Activity 1:  Take the message you were given, and create your own version of hashing.  You.
Cryptographic Hash Functions and Protocol Analysis
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Chapter 11 Message Authentication and Hash Functions.
Week 4 - Friday.  What did we talk about last time?  Snow day  But you should have read about  Key management.
Authentication. Goal: Bob wants Alice to “prove” her identity to him Protocol ap1.0: Alice says “I am Alice” Failure scenario?? “I am Alice”
Security fundamentals Topic 4 Encryption. Agenda Using encryption Cryptography Symmetric encryption Hash functions Public key encryption Applying cryptography.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
Intro to Cryptography Lesson Introduction
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
MD5 & Hash Encryption By Alex Buzak. Overview Purpose of MD5 and Hash Encryptions Examples MD5 Algorithm Explanation of Possible Security Risks Practical.
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.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
 Encryption provides confidentiality  Information is unreadable to anyone without knowledge of the key  Hashing provides integrity  Verify the integrity.
Dr. Nermin Hamza.  Attacks:  Traffic Analysis : traffic analysis occurs when an eavesdroppers observes message traffic on network. Not understand the.
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.
Cryptographic Hash Function
Chapter 5: The Art of Ensuring Integrity
Instructor Materials Chapter 5: The Art of Ensuring Integrity
One-way Encryption Ideal Properties
Cryptographic Hash Functions Part I
Cryptographic Hash Functions
2. Authentication & Message Authentication
ICS 454 Principles of Cryptography
ICS 454 Principles of Cryptography
Instructor Materials Chapter 5: The Art of Ensuring Integrity
Cryptographic Hash Functions Part I
Unit 32 Every class minute counts! 2 assignments 3 tasks/assignment
Hashing Hash are the auxiliary values that are used in cryptography.
Lecture 4: Hash Functions
Hash Function Requirements
Presentation transcript:

Dan Johnson

What is a hashing function? Fingerprint for a given piece of data Typically generated by a mathematical algorithm Produces a fixed length string as its output Hashes are sometimes called a checksum or message digests

Cryptographic hashing functions Have four major properties: It is impossible for any given output to determine the original input. This does not mean we can’t use inference to find input that is likely correct It is easy to compute the hash of any given input. Easy means that it does not require a lot of system resources or time to compute the hash of a given input.

(cont…) It is infeasible to determine two inputs that produce the same output. It is infeasible to change an input and produce the same output. Infeasible means that a solution cannot be found in less time than by brute force.

Cryptographic Strength Determined by output length and ability to resist cryptanalytic attack Output length expressed in number of bits Attacks attempt to break one of the cryptographic properties.

Preimage Attacks Two types, “first-preimage” and “second-preimage” Both attempt to break the one way property of the hashing function Both are similar in nature If a hashing function is vulnerable to one form of preimage attack, it is likely vulnerable to the other form of attack Successful attack executes in less that brute force time

Collision Attack A collision occurs when two pieces of input produce the same output. Collision attacks take advantage of a property of probability theory called the birthday paradox or birthday problem. Collision attacks attempt to find a collision in less than O(2 n/2 )

MD5 Published by Ronald Rivest in Produces 128-bit output, represented by 32bit hexadecimal number. Vulnerable to collision attacks. Now mostly used for creating checksums of large files.

SHA-1 Created by the National Security Agency Creates a 160-bit message digest represented by a 20 character string More secure than MD5 Widely popular and used in many applications In 2005, a group of Chinese researches discovered mathematical errors that could lead to a preimage attack in less than brute force time. No known attacks based on these findings have surfaced.

SHA-256 Also created by NSA as a part of the SHA2 family which includes SHA224, SHA256 and SHA512. Creates a 256bit output, hence its name. Considered to be more secure than SHA1 because of increased bit size. Mathematical problems found in SHA1 are not present in SHA256. Less popular than SHA1.

Hash Based Authentication Works the same way as password authentication Store hashed value of password in database instead of password itself When a user attempts to authenticate, hashes input value and compares it with value stored in database “password” => [ ᆰ aä ɹ ?? ツ %lø3~æ マ Ø

Example implementation Consider the following PHP code snippet. From this we can clearly see that adding hash based authentication does not add a much code.

What an attacker sees… Without encryption: With just SHA-1 encryption: UsernamePassword Nigelpenguin Alfredpenguin UsernamePassword Nigels3\"¹\?óðt½ž…PèÔŽ Alfreds3\"¹\?óðt½ž…PèÔŽ

Cont… Can this be improved? Better solution: sha1( username + password) Even better solution: sha1( sha1(username) + sha1(password) ) UsernamePassword NigeläQÞË‚HBŽ{<7r‚¿i}_H ›\eV€J×ÜÇ UsernamePassword NigeläQÞË‚HBŽ{<7r‚¿i}_H ›\eV€J×ÜÇ

Microsoft Store India Earlier this year, the Microsoft Store web site for India was breached. Attackers stole hundreds of thousands of usernames and passwords. All passwords were stored in plaintext. Credit Card information was also not encrypted in any from. Many users had their identity compromised and fraudulent purchases charged to their credit card.

Sony Playstation Network and Sony Pictures customer databases were both breached in Credit card information was encrypted, but several reports indicate that encryption may have been compromised. User data was not encrypted in any way. Class action lawsuit filed over negligence.

Other protection methods Hashing not good for everything. Credit card information could be stored using symmetric key encryption. This allows for the input to be determined at a later date. BE SUPER CAREFUL!

Questions?

References Agarwal, A. (2012, February 27). Not just addresses, credit card numbers also stolen from microsoft india store. Retrieved from store-hacked/20891/ Gallagher, S. (2012, February 14). Microsoft's store site in india defaced; hackers find plain text passwords. Retrieved from hackers-find-plain-text-passwords.ars McGlinn, J. (2005, March 20). Password hashing. Retrieved from Silva, J. (2003). An overview of cryptographic hash functions and their uses. Retrieved from hash-functions_879 Schneier, B., & Hoffman, P. (2005). attacks on cryptographic hashes in internet protocols. Retrieved from Schwartz, M. (2011, June 3). Sony hacked again, 1 million passwords exposed. Retrieved from Stallings, W., Brown, L., & Howard, M. (2008). Computer security, principles and practice. Upper Sadddle River, NJ: Pearson Education. Ullrich, J. (2011, June 28). Hashing passwords. Retrieved from