SlideShare a Scribd company logo
2
Most read
4
Most read
10
Most read
Hash Function
A hash function is a mathematical function that
converts a numerical input value into another
compressed numerical value. The input to the hash
function is of arbitrary length but output is always of
fixed length.Values returned by a hash function are
called message digest or simply hash values. The
following picture illustrated hash function
Features of Hash Functions
The typical features of hash functions are −
 Fixed Length Output (Hash Value)
o Hash function coverts data of arbitrary
length to a fixed length. This process is
often referred to as hashing the data.
o In general, the hash is much smaller than the
input data, hence hash functions are
sometimes called compression functions.
o Since a hash is a smaller representation of a
larger data, it is also referred to as a digest.
o A message digest algorithm or a hash
function, is a procedure that maps input data
of an arbitrary length to an output of fixed
length. Output is often known as hash
values, hash codes, hash sums, checksums,
message digest, digital fingerprint or simply
hashes.
 Efficiency of Operation
o Generally for any hash function h with input
x, computation of h(x) is a fast operation.
o Computationally hash functions are much
faster than a symmetric encryption.
Properties of a Strong Hash Algorithm:-
 Determinism — A hash algorithm should
be deterministic, meaning that it always gives
you an output of identical size regardless of the
size of the input you started with. This means
that if you’re hashing a single sentence, the
resulting output should be the same size as one
you’d get when hashing an entire book.
 Pre-Image Resistance — The idea here is that a
strong hash algorithm is one that’s preimage
resistance, meaning that it’s infeasible to reverse
a hash value to recover the original input
plaintext message. Hence, the concept of hashes
being irreversible, one-way functions.
 Collision Resistance — A collision occurs
when two objects collide. Well, this concept
carries over in cryptography with hash values. If
two unique samples of input data result in
identical outputs, it’s known as a collision. This
is bad news and means that the algorithm you’re
using to hash the data is broken and, therefore,
insecure. Basically, the concern here is that
someone could create a malicious file with an
artificial hash value that matches a genuine
(safe) file and pass it off as the real thing
because the signature would match. So, a good
and trustworthy hashing algorithm is one that is
resistant to these collisions.
 Avalanche Effect — What this means is that
any change made to an input, no matter how
small, will result in a massive change in the
outputhence the term “avalanche effect.”
 Hash Speed — Hash algorithms should operate
at a reasonable speed. In many situations,
hashing algorithms should compute hash values
quickly; this is considered an ideal property of a
cryptographic hash function.
1.it is similar to MAC but it does not use a key.
2.it takes in variable size message and produce a
fixed output called hash code/hash value/message
digest.
3. The only input is the message
4. A hash value ‘h’ is generated by function H.
H(M)=fixed length code ‘h’
{here M-variable length msg,
‘h’-hash code}
5. it is also called compression fn.
6.There are different method to provide
authentication in different situation.
(i)
in this authentication and confidentiality maintained.
Authentication:- if both the hash code are equall in the
end.because A and B share the secret key,the message
must have come from A and key has not been altered.
Confidentiality:-it maintained because message was
encrypted before sending.
(ii)
1. in this only authentication achieved when both the
hash code are equall.but no confidentiality because
any one can steal the message.
2. Only hash code is encrypted using symmetric
encryption.
3. if messge is not private message,so can use it because
the processing time will be sent to receiver side.
4. in this not encrypting the message .only encrypting
hash code .
(iii)
1.in this no confidentiality ,only authentication
maintained.
2.processing time will be less as the message is not
encrypted.
3.in this asymmetric key encryption is used.
(iv)
1.it is used when Authentication and confidentiality
achieved by using symmetric key.
(v) Sender and Receiver will have a secret code ‘s’and it
must be kept secret
1.In this only authentication ,no confidentiality
achieved.
2.no confidentiality(any one can attack) and
authentication when hash value are equall.
(vi)
1.in this confidentiality can be added to the previous
approach by encrypting the entire message.
2.take the message and append with the secret code
‘s’ then apply Hash fn. it gives ‘h’.now append
‘h’and message .now encrypt using key ‘x’ .we get
encrypted (message+h).
3.now it will be sent to the Receiver side.
4.now at receiver side we will use decryption algo &
same key .so we will get message+hash code.
5.now Receiver will take the message and append it
with s and then ,now apply to hash fn to get the
hash code
6.Now compare the separated hash code from this
message and compare.if equall then authenticate
and confidentiality also achieved.

More Related Content

PPT
block ciphers
PPTX
Cryptography.ppt
PPTX
SHA- Secure hashing algorithm
PDF
Classical encryption techniques
PPTX
Hash Function
PPTX
Hash function
PPT
Cryptography and Network Security William Stallings Lawrie Brown
block ciphers
Cryptography.ppt
SHA- Secure hashing algorithm
Classical encryption techniques
Hash Function
Hash function
Cryptography and Network Security William Stallings Lawrie Brown

What's hot (20)

PPTX
IP Security
PDF
AES-Advanced Encryption Standard
PPTX
5. message authentication and hash function
DOCX
What is AES? Advanced Encryption Standards
PDF
IP Security
PPTX
Image encryption using aes key expansion
PPTX
Block cipher modes of operation
PPT
Secure hashing algorithm
PPT
CONVENTIONAL ENCRYPTION
PPTX
Security services and mechanisms
PPTX
Public Key Cryptosystem
PPT
Network security cryptographic hash function
PPT
Network Security and Cryptography
PPTX
Double DES & Triple DES
PPTX
RSA Algorithm
PPTX
Diffie hellman key exchange algorithm
PPT
DES (Data Encryption Standard) pressentation
PPTX
Feistel cipher
PPT
Classical Encryption Techniques
IP Security
AES-Advanced Encryption Standard
5. message authentication and hash function
What is AES? Advanced Encryption Standards
IP Security
Image encryption using aes key expansion
Block cipher modes of operation
Secure hashing algorithm
CONVENTIONAL ENCRYPTION
Security services and mechanisms
Public Key Cryptosystem
Network security cryptographic hash function
Network Security and Cryptography
Double DES & Triple DES
RSA Algorithm
Diffie hellman key exchange algorithm
DES (Data Encryption Standard) pressentation
Feistel cipher
Classical Encryption Techniques
Ad

Similar to Hash Function.pdf (20)

PPTX
unit 4.pptx of hash function in cryptography
PDF
Hash Functions in Software Security.p df
PPTX
PPTX
All details of cryptography and all the topics of cryptography was explained
PPTX
Blockchain Technology, Cryptography and cryptocurrencies Module2.pptx
PPTX
Cryptography.pptx basics and detailed toptics also
PPTX
Digital Signature Message Digest Network Security
PDF
DOCX
Cryptography and netwrk securityunit 4
DOCX
Cryptography and Network Security Principles and PracticeSeve.docx
PPTX
2 Cryptographic_Hash_Functions.pptx
PPTX
Blockchain Technology Explained: A Beginner's Guide to the Future of the Inte...
PPTX
chapter three 3-part II-1lecture slide.pptx
PPTX
Lecture also solve this ppy slit for next-14.pptx
PDF
HASH FUNCTIONS.pdf
PPT
secure hash function for authentication in CNS
PPTX
cryptography module-5 cyber securityantipatterns ,
PPTX
PPTX
Basics of Cryptography presentation.pptx
PDF
Unit 3_Hash function and MD5 working.pdf
unit 4.pptx of hash function in cryptography
Hash Functions in Software Security.p df
All details of cryptography and all the topics of cryptography was explained
Blockchain Technology, Cryptography and cryptocurrencies Module2.pptx
Cryptography.pptx basics and detailed toptics also
Digital Signature Message Digest Network Security
Cryptography and netwrk securityunit 4
Cryptography and Network Security Principles and PracticeSeve.docx
2 Cryptographic_Hash_Functions.pptx
Blockchain Technology Explained: A Beginner's Guide to the Future of the Inte...
chapter three 3-part II-1lecture slide.pptx
Lecture also solve this ppy slit for next-14.pptx
HASH FUNCTIONS.pdf
secure hash function for authentication in CNS
cryptography module-5 cyber securityantipatterns ,
Basics of Cryptography presentation.pptx
Unit 3_Hash function and MD5 working.pdf
Ad

Recently uploaded (20)

PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
composite construction of structures.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Well-logging-methods_new................
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Foundation to blockchain - A guide to Blockchain Tech
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
composite construction of structures.pdf
Digital Logic Computer Design lecture notes
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Automation-in-Manufacturing-Chapter-Introduction.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
UNIT 4 Total Quality Management .pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Well-logging-methods_new................
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf

Hash Function.pdf

  • 1. Hash Function A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length but output is always of fixed length.Values returned by a hash function are called message digest or simply hash values. The following picture illustrated hash function Features of Hash Functions The typical features of hash functions are −  Fixed Length Output (Hash Value)
  • 2. o Hash function coverts data of arbitrary length to a fixed length. This process is often referred to as hashing the data. o In general, the hash is much smaller than the input data, hence hash functions are sometimes called compression functions. o Since a hash is a smaller representation of a larger data, it is also referred to as a digest. o A message digest algorithm or a hash function, is a procedure that maps input data of an arbitrary length to an output of fixed length. Output is often known as hash values, hash codes, hash sums, checksums, message digest, digital fingerprint or simply hashes.  Efficiency of Operation o Generally for any hash function h with input x, computation of h(x) is a fast operation.
  • 3. o Computationally hash functions are much faster than a symmetric encryption. Properties of a Strong Hash Algorithm:-  Determinism — A hash algorithm should be deterministic, meaning that it always gives you an output of identical size regardless of the size of the input you started with. This means that if you’re hashing a single sentence, the resulting output should be the same size as one you’d get when hashing an entire book.  Pre-Image Resistance — The idea here is that a strong hash algorithm is one that’s preimage resistance, meaning that it’s infeasible to reverse a hash value to recover the original input plaintext message. Hence, the concept of hashes being irreversible, one-way functions.  Collision Resistance — A collision occurs when two objects collide. Well, this concept carries over in cryptography with hash values. If two unique samples of input data result in identical outputs, it’s known as a collision. This is bad news and means that the algorithm you’re using to hash the data is broken and, therefore, insecure. Basically, the concern here is that
  • 4. someone could create a malicious file with an artificial hash value that matches a genuine (safe) file and pass it off as the real thing because the signature would match. So, a good and trustworthy hashing algorithm is one that is resistant to these collisions.  Avalanche Effect — What this means is that any change made to an input, no matter how small, will result in a massive change in the outputhence the term “avalanche effect.”  Hash Speed — Hash algorithms should operate at a reasonable speed. In many situations, hashing algorithms should compute hash values quickly; this is considered an ideal property of a cryptographic hash function.
  • 5. 1.it is similar to MAC but it does not use a key. 2.it takes in variable size message and produce a fixed output called hash code/hash value/message digest. 3. The only input is the message 4. A hash value ‘h’ is generated by function H. H(M)=fixed length code ‘h’ {here M-variable length msg, ‘h’-hash code} 5. it is also called compression fn. 6.There are different method to provide authentication in different situation.
  • 6. (i) in this authentication and confidentiality maintained. Authentication:- if both the hash code are equall in the end.because A and B share the secret key,the message must have come from A and key has not been altered. Confidentiality:-it maintained because message was encrypted before sending.
  • 7. (ii) 1. in this only authentication achieved when both the hash code are equall.but no confidentiality because any one can steal the message. 2. Only hash code is encrypted using symmetric encryption. 3. if messge is not private message,so can use it because the processing time will be sent to receiver side. 4. in this not encrypting the message .only encrypting hash code . (iii)
  • 8. 1.in this no confidentiality ,only authentication maintained. 2.processing time will be less as the message is not encrypted. 3.in this asymmetric key encryption is used. (iv)
  • 9. 1.it is used when Authentication and confidentiality achieved by using symmetric key. (v) Sender and Receiver will have a secret code ‘s’and it must be kept secret
  • 10. 1.In this only authentication ,no confidentiality achieved. 2.no confidentiality(any one can attack) and authentication when hash value are equall. (vi) 1.in this confidentiality can be added to the previous approach by encrypting the entire message. 2.take the message and append with the secret code ‘s’ then apply Hash fn. it gives ‘h’.now append ‘h’and message .now encrypt using key ‘x’ .we get encrypted (message+h).
  • 11. 3.now it will be sent to the Receiver side. 4.now at receiver side we will use decryption algo & same key .so we will get message+hash code. 5.now Receiver will take the message and append it with s and then ,now apply to hash fn to get the hash code 6.Now compare the separated hash code from this message and compare.if equall then authenticate and confidentiality also achieved.