H ASHING : SHA256 T AYLER A NGEVINE B ACHELOR OF A RTS D R. K EN B LAHA 3/13/2014.

Slides:



Advertisements
Similar presentations
Hashes and Message Digests
Advertisements

Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Lecture 5: Cryptographic Hashes
Lecture 7 Overview. Advanced Encryption Standard 10, 12, 14 rounds for 128, 192, 256 bit keys – Regular Rounds (9, 11, 13) – Final Round is different.
SECURE HASHING ALGORITHM By: Ruth Betcher. Purpose: Authentication Not Encryption Authentication Requirements:  Masquerade – Insertion of message from.
By: Matthew Ng. AND, XOR, OR, Complement, Circular Left shift, and Addition Modulo Circular Left Shift is done with s positions (0 ≤ s ≤ 31) – Denoted.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
 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.
MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
PIITMadhumita Chatterjee Security 1 Hashes and Message Digests.
1 Chapter 5 Hashes and Message Digests Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
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.
Announcements:Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions and SHA-1 Hash Functions.
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.
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
SHA (secure hash algorithm) Jen-Chang Liu, 2005 Adapted from lecture slides by Lawrie Brown.
1 Pertemuan 09 Hash and Message Digest Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
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.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
MATH 224 – Discrete Mathematics
HASH Functions.
Hash and MAC Algorithms Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 12/3/2009 INCS 741: Cryptography 12/3/20091Dr. Monther Aldwairi.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
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
12.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 12 Cryptographic Hash Functions.
Hash and Mac Algorithms. Contents Hash Functions Secure Hash Algorithm HMAC.
Cryptographic Hash Functions
Lecture 8 Overview. Secure Hash Algorithm (SHA) SHA SHA SHA – SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits.
Chapter 18: One-Way Hash Functions Based on Schneier.
SUNY Oneonta Data Structures and Algorithms Visualization Group MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
Hashing Hashing is another method for sorting and searching data.
Team TDB Members: Anthony Knopp Zach Langley
Lecture 2: Introduction to Cryptography
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Week 4 - Friday.  What did we talk about last time?  Snow day  But you should have read about  Key management.
I MPROVING Y OUR P ASSWORD WITH S ALT Tayler Angevine Bachelor of Arts in Computer Science Dr. Ken Blaha (Advisor) May 03, 2014.
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.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 10 September 21, 2004.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Network Security. Three tools Hash Function Block Cipher Public Key / Private Key.
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
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
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.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Secure Hash Algorithm A SEARIES OF SHA….
Information and Computer Security CPIS 312 Lab 9
MD5 A Hash Algorithm….
Network Security.
Secured Hash Algorithm(SHA)
MD5 A Hash Algorithm….
Network Security.
Cryptographic Hash Functions
SHA: Secure Hash Algorithm
The Secure Hash Function (SHA)
Cryptographic Hashing Special Session
Presentation transcript:

H ASHING : SHA256 T AYLER A NGEVINE B ACHELOR OF A RTS D R. K EN B LAHA 3/13/2014

I NTRODUCTION Review the hash function SHA-256 Goal: understand how SHA-256 computes it’s hash. Why have I decided to focus on Sha-256 algorithms? Battle tested Considered to be some of the “safest” algorithms Bitcoin is based around SHA-256. The way the algorithm is implemented using MessageDigest left a lot of unknowns. Was under the impression that I would need to code the algorithm.

M ORE INTRO Named after it’s digest length. Will not focus on SHA-1 because it has been “broken” Would rather focus on today’s standard rather than the past. SHA-384 and SHA-512 because they are essentially the same. Why go over the code? I believe it is necessary to understand the code of an algorithm in order to recognize it’s weaknesses or it’s strengths.

W HAT IS A HASH ? Hash function takes a string of any length, and generates fixed-length output data. It is not reversible. Because you are taking a string and basically dividing it. Therefore, you are losing information. If you have lost information about the original input, then it is nearly impossible to reverse the hash.

W HAT MAKES A GOOD HASH ? Same input will always lead to the same output. Avoids collision attacks

A LITTLE INFORMATION … Sha 256 is more safe from collision attacks than other algorithms. MD5 = 128 byte output, 64 bits of security SHA-1 = 160 byte output, 80 bits of security. SHA 256 = 256 byte output, 128 bits of security What are collision attacks? Find two input strings that produce the same hash. “abc” “aiieagnea;[sagjeiao;iaeohgao;ejagea” Hash functions can have infinite input length, but a fixed output.

H OW DOES IT WORK ? Padding aka Preprocessing Block decomposition Hash Algorithm

P REPROCESSING Message (M) is l bits long. Append message with a 1 Followed by n zero bits. N is smallest, non-negative solution to the equation. L n = 448 mod 512 This leaves enough room to append what we have so far with a 64-bit block that equals our message represented in binary. Message = “abc” N = 448.  N = 423 zero bits

N OTATION Algorithm uses AND, XOR, OR, Circular Right Shift, and Logical Right Shifts in order to compute the hash.

AND pqp AND q Produces 1 if both p and q are 1’s.

OR pqp OR q Produces 1 if p or q are 1

XOR pqp XOR q Produces 1 if p or q is 1, but not both.

C IRCULAR S HIFT R IGHT S H R( VARIABLE, NUMBER ) variable: a,b,c,d,e,f,g,h Number: amount of shift.

L OGICAL R IGHT S HIFT R OT R( VARIABLE, NUMBER ) Variable: a,b,c,d,e,f,g,h. Number: amount of shifts

E QUATIONS

W HERE IT STARTS TO GET COMPLICATED. Generally H 1 – H 8 are set to the first 32 bits of the fractional parts of the square roots of the first eight primes.

E XAMPLE Square root of 2 = Fractional part = Hexadecimal = 6A09E667.

W HERE DOES OUR PASSWORD COME INTO PLAY ? Or original password was padded to 512 bytes. Which is 16 words. A 64 word array is created we will refer to as W W 0 – W 15 are initialized to our padded password. The rest (W 16 – W 63 ) are set to a value determined by this function J is just the counter in a for loop.

A LGORITHM C OMPUTATION ( EXECUTED 64 TIMES )

A – H are initialized with H 1 – H 8

L AST S TEP Take your original and H 1 – H 8 add a – h to them.

I SSUES Putting together a puzzle Some things are difficult to find answers to.

S OURCES Algorithm pdf pdf 07/SHA256english.pdf 07/SHA256english.pdf Actual Implementation source/libjava/classpath/gnu/java/security/hash/Sha256. java source/libjava/classpath/gnu/java/security/hash/Sha256. java Various Information wikipedia.org/ technology-explained/

M ORE S OURCES Various Information -does-message-schedule-mean-in-sha does-message-schedule-mean-in-sha MessageDigest.html MessageDigest.html Converting bytes to a string array-to-string-in-java/ array-to-string-in-java/ Hash Calculator

QUESTIONS?