Secure Hashing Techniques - Introduction
-
Upload
udhayyagethan-mano -
Category
Education
-
view
395 -
download
0
description
Transcript of Secure Hashing Techniques - Introduction
![Page 1: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/1.jpg)
ByUdhayyaGethan.M311511205309
SECURE HASHING TECHNIQUES
![Page 2: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/2.jpg)
SECURE HASHING
• What ?
• Why ?
• How ?
![Page 3: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/3.jpg)
What is Hashing
• A hash function is any algorithm that maps data of variable length of data to a fixed length.
• The values returned by the hash functions are called as hash codes, hash sums, message digest or simply hashes.
• Hashing mostly takes a string as an input and gives the output or the hashed values as a numerical value mostly as an hexadecimal number.
![Page 4: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/4.jpg)
What is so special about Secure Hashing
• Hash values produced by some hash techniques can be re hashed.
• That means we can get the original data from the hash values.
• But hash values of secure hash techniques cant be re-hashed.
• That’s why it is called as one way hashing.
![Page 5: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/5.jpg)
Message Digest Functions:
• Checksums fingerprint of a message• If message changes, checksum will not match
• Most checksums are good in detecting accidental changes made to a message• They are not designed to prevent an adversary
from intentionally changing a message resulting a message with the same checksum
• Message digests are designed to protect against this possibility
![Page 6: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/6.jpg)
One-Way Hash Functions:
Example• M = “Elvis”• H(M) = (“E” + “L” + “V” + “I” + “S”) mod 26• H(M) = (5 + 12 + 22 + 9 + 19) mod 26• H(M) = 67 mod 26• H(M) = 15
![Page 7: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/7.jpg)
Collision:
Example• x = “Viva”• Y = “Vegas”• H(x) = H(y) = 2
![Page 8: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/8.jpg)
Criteria's for a hash function:• Given M, • it is easy to compute h
• Given any h, • it is hard to find any M such that H(M) = h
• Given M1, it is difficult to find M2 • such that H(M1) = H(M2)
• Functions that satisfy these criteria are called message digest • They produce a fixed-length digest (fingerprint)
![Page 9: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/9.jpg)
Secure Hashing Algorithm (SHA) :
• SHA-0 1993• SHA-1 1995• SHA-2 2002• SHA-224, SHA-256, SHA-384, SHA-512
SHA-1
A message composed of b bits
160-bit message digest
9
![Page 10: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/10.jpg)
Steps for hashing:• Padding• Dividing • Computing• Initialize• Looping
![Page 11: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/11.jpg)
Example for Padding:
![Page 12: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/12.jpg)
Example :• M = 01100010 11001010 1001 (20 bits)
• Padding is done by appending to the input– A single bit, 1– 427 0s– A 64-bit integer representing 20
• Pad(M) = 01100010 11001010 10011000 … 00010100
![Page 13: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/13.jpg)
Example :• Length of M = 500 bits
• Padding is done by appending to the input:– A single bit, 1– 459 0s– A 64-bit integer representing 500
• Length of Pad(M) = 1024 bits
![Page 14: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/14.jpg)
Comparison:
Output size
(bits)
Internal state size
(bits)
Block size
(bits)
Max message size (bits)
Word size
(bits)Rounds Operations Collisions
found
SHA-0 160 160 512 264 − 1 32 80 +, and, or, xor, rot Yes
SHA-1 160 160 512 264 − 1 32 80 +, and, or, xor, rot
None (252 attack)
SHA-2
256/224 256 512 264 − 1 32 64 +, and, or, xor, shr, rot None
512/384 512 1024 2128 − 1 64 80 +, and, or, xor, shr, rot None
![Page 15: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/15.jpg)
Some facts you must know:• Sha-512 is illegal to use in some countries.• Because it is tough even to the government to
crack a 512 bit encryption.• Sha-0 and Sha-1 are very much prone to
collision of data's.• Md5 hashing technique is no longer secure.• Md5 has been compromised.• It has a hash table about the size of 64Gb.
![Page 16: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/16.jpg)
Applications of Secure Hashing:• Online Banking• Online Shopping• E-Learning• Web servers• ………
In short, wherever sensitive data's are handled and wherever you need to log yourself in to access data secure hashing is used there.
![Page 17: Secure Hashing Techniques - Introduction](https://reader035.fdocuments.us/reader035/viewer/2022081413/54754045b4af9f9d0a8b59ef/html5/thumbnails/17.jpg)
Thank you