05 Hash Functions
05 Hash Functions
MODERN
Applications.
CRYPTOGRAPHY
Based On Jonathan Katz
And Yehuda Lindell.
5.1 DEFINITIONS
Hash functions in cryptography are mathematical
algorithms that transform input data of arbitrary size into a
fixed-size numerical output, known as a hash value or digest.
It is also called Compression Function.
A cryptographic hash function (CHF) takes an input (or
message) and produces a unique, fixed-length string of
characters, representing the input data. This process makes
it computationally infeasible to reverse the function to
retrieve the original input, ensuring a one-way encryption.
Hash functions are simply functions that take inputs of some
length and compress them into short, fixed-length outputs.
The classic use of hash functions is in data structures, where
they can be used to build hash tables that enable O(1)
5.1.1 COLLISION
RESISTANCE
Collision resistance is a property of cryptographic hash
functions where it is hard to find two different inputs that
produce the same output.
Specifically, a hash function H is considered collision-resistant
if, for any inputs a and b where a≠b, finding a pair such that
H(a)=H(b) is difficult and requires significant computational
effort.
A keyed hash function, denoted as Hs takes two inputs: a
secret key s and a string x. The result of this function is defined
as Hs(x)=H(s,x). The essential requirement for such functions
is that collisions should be hard to find for any randomly
generated key s.
DEFINITION 5.2
A hash function H=(Gen,H) is defined as collision
resistant if it limits the ability of adversaries to find
two different inputs that hash to the same output.
Specifically, for every probabilistic polynomial-time
adversary A, there exists a negligible function negl
such that: