# Category: Hash functions

• ## MD5 length extension attack in Python

The length extension attack exploits the fact that the hash value created with the Merkle-Damgård construction represents the internal state of the Initial Vector at the end of the execution. This means that you can use the hash value to set up the internal state (the modified values of the Initial Vector) and keep processing […]

• ## What is the Merkle-Damgård construction?

The Merkle-Damgård construction is a scheme to design collision-resistant cryptographic hash functions. The scheme uses one-way compression functions that are collision-resistant. The original message is extended so it has a size of a specific multiple (i.e. 512 or 1024). The message is then divided into blocks (512 bits or 1024 bits). Then, we apply the […]

• ## What is the birthday paradox and how we can use it in cryptography?

The birthday paradox is the result of solving the birthday problem. The birthday problem is as follows: What is the probability that in a random set of n people, two people share the same birthday? Another way we can state this problem is: What is the minimum k number of people such that the probability […]

• ## Secure Hash Algorithm 2 (SHA-2)

SHA-2 is a family of cryptographic hash algorithms used to create message digest to verify the integrity of information (usually files). They are the current standard in cryptographic hash functions and have several applications, included digital signatures. Introduction SHA-2 is based on the Merkle-Damgård construction. Find below an illustration of this construction. Notice that the […]

• ## What is the Secure Hash Algorithm 1 (SHA-1)?

The Secure Hash Algorithm 1 (SHA-1) is a hash function that creates a message digest that can be used to prove if a message or file has been modified. It is not secure anymore as it was broken some years. Introduction The SHA-1 algorithm is based on the Merkle-Damgård construction. Find below an illustration of […]

• ## What is the MD5 hash function (md5 message-digest)?

MD5 is a widely used hash function that produces a message digest (or hash value) of 128 bits in length. It was initially designed as a cryptographic hash function but, at a later stage vulnerabilities were found and therefore is not considered suitable for cryptographic applications. It was created in 1991 by Ronal Rivest and […]

• ## What is a Cryptographic Hash Function?

A cryptographic hash function is an algorithm that has two main properties: it is a one-way function and is collision-free. As per function definition, it transforms one input into only one output. By one way function we mean that is computationally infeasible to find the input related to a given output. The best attack known […]