Case Study On Hash Functions
Case Study On Hash Functions
Case Study On Hash Functions
PRESENTED BY:
MY.SC.U3BCA18007KARTHIK M
MY.SC.U3BCA18022KARTHIK R BHAT
MY.SC.U3BCA18049SANTHOSH KUMAR M S
MY.SC.U3BCA18058CHINMAYA HEGDE
INTRODUCTION
• Cryptographic system uses two tools i.e., Random generators and One-way
functions.
1) Unconditional security
It means that if the attacker has the plaintext and the cipher text, its of no use to cryptanalyze it and these values are
independent random variables.
2) Provable security
Cryptographic systems are provably secure if the fact to break it is as difficult as to break a generic basic hard
problems.
3) Computational security
Most of the cryptographic systems are in this category. It means that the potential attackers don’t have the sufficient
amount of resources to break it.
NEED FOR ONE-WAY FUNCTIONS
• Confidentiality is one of the ’must have’ features of cryptographic systems.
• We need functions that transform the message to make it unreadable, and, if somebody
hears’ the message, should not able to understand or interpret it.
• This means that we need functions that can be computed one way but not the inverse:
One-way functions.
• Cryptography needs one way functions because of the main property of being hard to
compute the inverse of the function.
• We have to be very careful with because it involves mathematical issues which are not
fully solved or known.
HARD PROBLEMS
• There are the problems that can be solved in polynomial time (or sub-exponential), it
means, that the time it would take to solve them is known, and this time grows in a
polynomial way as the problem becomes more complicated (called P problems).
• And there are the other problems, called NP that are problems whose solutions can be
checked in polynomial time.
• In order to solve the big question P = NP? We should find a NP complete problem that
can be solved in polynomial time.
• Then we would be able to reduce all other NP problems to our solution and solve them.
HASH FUNCTIONS
3. Determinism
A given password must always generate the same hash value or enciphered text
4. Collision resistance
It should be hard to find two different passwords that hash to the same enciphered text
5. Non-predictable
The hash value should not be predictable from the password
VARIATIONS IN HASH FUNCTIONS
1) Salted hashes
Salting adds random data to each plaintext credential. The result: two identical plaintext passwords are now
differentiated in enciphered text form so that duplicates cannot be detected.
Here,
MAC – Message Authentication Code
A MDC is a message digest that can prove the integrity of the message
that message that it has not been changed.
Example: If Alice needs to send a message to bob, he can create a message digest,
MDC and send both the message and MDC to Bob.
Bob can create a new MDC from the message and compare the received message
and new MDC, If they are same, the message is not changes.
Message Authentication Code (MAC)
MAC involves the use of a secret key to generate a small fixed size block of data
that is appended to message
• It assumes that the two communicating parties A and B share a common secret
key K
• When A send message to B it calculates the MAC of the message and the key,
MAC = C (K, M)
Where,
M= Input message, K= Secret Key, C= MAC function
• The Message + MAC are transmitted to receiver
• The receiver performs calculation on received
• The received MAC is compared to calculated
Working of Hash Functions
1) Boolean Operations
• Boolean operations AND, XOR and OR, denoted by ∧, ⊕ and ∨, respectively
• Bitwise complement, denoted by ~
• Integer addition modulo 232, denoted by A + B
• RotR(A, n) denotes the circular right shift of n bits of binary word A
• ShR(A, n) denotes the right shift of n bits of the binary word A
• AkB denotes the concatenation of the binary words A and B
2) Functions and constants
The algorithm uses the functions,
• Ch(X, Y, Z) = (X ∧ Y ) ⊕ (X ∧ Z)
• Maj(X, Y, Z) = (X ∧ Y ) ⊕ (X ∧ Z) ⊕ (Y ∧ Z)
• Σ0(X) = RotR(X, 2) ⊕ RotR(X, 13) ⊕ RotR(X, 22)
• σ0(X) = RotR(X, 7) ⊕ RotR(X, 18) ⊕ ShR(X, 3)
3) Padding
4) Block Decomposition
5) Hash Computation
6) Implementation
EXAMPLE OF SECURE HASH ALGORITHM (SHA-256)
POSSIBLE ATTACKS ON HASH FUNCTIONS
• Digital signatures
These are used for signing a document with the good properties that the signer can tell when something has not
been signed by him AND that he can not deny his signature in a signed document.
• Virus checking
To know if a file has been infected with a virus means to know if it has been, we can use the digest of the
unmodified and safe file to compare it to the digest of the possible infected file. If it turns that both digest are
equal then we can say that the file has not been modified, then that it is virus-free.
• Secure Socket Layer connections
Secure Socket Layer (SSL) provides server authentication to clients. It’s the facto standard for communication
on the Internet. During the SSL handshake once the parts have negotiated the protocol, these have to select also
the hash methods to use for authentication.
• Password tables
A common method of client authentication is to require the client to present a password previously registered
with the server. Storing passwords of all users on the server poses an obvious security risk.