# Hash Functions

Learn about hash function and their security requirements in this lesson.

## Introduction

One of the most important cryptographic primitives is **hash functions**, which are used in many cryptographic protocols, particularly in signature schemes. Hash functions transform any kind of input data, regardless of its size, into a unique fixed-length bit-string. In contrast to all other cryptographic algorithms, hash functions don’t have a key.

## Hash function

Let $\{0,1\}^{*}$ be an arbitrary sized, possibly infinite set, and $\{0,1\}^{n}$ a fixed finite. Then, a one-way funcion $H:\{0,1\}^{*} \rightarrow$ $\{0,1\}^{n}$ is called a hash function.

The computed value $y \in\{0,1\}^{n}$ is called **message digest** or **hash value** and can be seen as the fingerprint of a message, i.e., a fixed-length ( $n$ bits) unique representation of a message.

### Figure 1

Get hands-on with 1200+ tech skills courses.