> For the complete documentation index, see [llms.txt](https://chunhthanhde.gitbook.io/google-learning-programs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chunhthanhde.gitbook.io/google-learning-programs/google-it-support-professional-certificate/course-5-it-security-defense-against-the-digital-dark-arts/module-2-pelcgbybtl-cryptology/3.hashing/1.hashing.md).

# Hashing 🔍

## **Introduction to Hashing** 🧩

* **Definition**: Hashing is a process that takes an arbitrary input and maps it to a fixed-size output, known as a hash or digest.
* **Output Size**: The size of the hash is constant and specified in bits, regardless of the input size.
* **Uniqueness**: Ideally, each unique input should produce a unique hash.

## **Applications** 🛠️

* **Hash Tables**: Used in data structures to speed up data lookups.
* **Data Deduplication**: Identifies and removes duplicate datasets to save space.
* **Database Indexing**: Speeds up searches and data retrieval.

## **Cryptographic Hash Functions** 🔒

* **Purpose**: Used for security-related tasks such as authentication, message integrity, fingerprinting, and digital signatures.
* **Characteristics**:
  * **One-Directional**: Impossible to reverse the function to recover the original input.
  * **Deterministic**: Same input always produces the same hash.
  * **Efficient**: Quick to compute.
  * **Small Changes**: A small change in input results in a completely different hash output.
  * **Collision-Resistant**: Prevents two different inputs from producing the same output.

## **Comparison with Symmetric Encryption** 🔐

* **Similarities**: Both operate on blocks of data. Many hash functions are based on modified block ciphers.
* **Differences**: Hashing is one-way and does not allow recovery of the original data, unlike encryption which is reversible with the right key.

## **Example** 💡

* **Imaginary Hash Function**:
  * Input: "Hello World"
  * Hash Output: E49AOOFF
  * Input: "hello world" (with slight modification)
  * Hash Output: FF1832AE
* **Real Hash Function Example**:
  * Using `md5sum` on the input "Hello World" produces a consistent hash digest.

## **Summary** 📜

* **Hashing** maps data to a fixed-size output, crucial for various computing applications.
* **Cryptographic Hash Functions** provide security features like non-reversibility and collision resistance.

🔍🔐📊


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chunhthanhde.gitbook.io/google-learning-programs/google-it-support-professional-certificate/course-5-it-security-defense-against-the-digital-dark-arts/module-2-pelcgbybtl-cryptology/3.hashing/1.hashing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
