# Argon2

## What is Argon2

Argon2id, hereinafter referred to as Argon2, is the cryptographic hashing algorithm employed for mining XenBlocks. It dynamically adjusts its difficulty in line with parameters that are universally applied to all miners. By design, Argon2 is resistant to both GPU and ASIC mining. While "resistant" does not mean mining with these devices is impossible, it does signify that it would be more challenging, costly, and demanding. The primary reason for this resistance lies in Argon2's significant demand for memory, specifically VRAM allocation. As the difficulty level increases, the rate at which hashes can be produced decreases due to this memory requirement. Therefore, Argon2 is characterized as a memory-hard algorithm, which means its performance is closely tied to the utilization of memory and RAM.

Argon2 is a [key derivation function](https://en.wikipedia.org/wiki/Key_derivation_function) that was selected as the winner of the 2015 [Password Hashing Competition](https://en.wikipedia.org/wiki/Password_Hashing_Competition).

* Argon2d maximizes resistance to GPU [cracking attacks](https://en.wikipedia.org/wiki/Password_cracking). It accesses the memory array in a password dependent order, which reduces the possibility of [time–memory trade-off](https://en.wikipedia.org/wiki/Time%E2%80%93memory_trade-off) (TMTO) attacks, but introduces possible [side-channel attacks](https://en.wikipedia.org/wiki/Side-channel_attack).
* Argon2i is optimized to resist side-channel attacks. It accesses the memory array in a password independent order.
* Argon2id is a hybrid version. It follows the Argon2i approach for the first half pass over memory and the Argon2d approach for subsequent passes. [RFC](https://en.wikipedia.org/wiki/RFC_\(identifier\)) [9106](https://datatracker.ietf.org/doc/html/rfc9106) recommends using Argon2id if you do not know the difference between the types or you consider side-channel attacks to be a viable threat.[\[4\]](https://en.wikipedia.org/wiki/Argon2#cite_note-:1-4)

All three modes allow specification by three parameters that control:

* execution time
* memory required
* degree of parallelism

{% embed url="<https://en.wikipedia.org/wiki/Argon2>" %}

###


---

# Agent Instructions: 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://docs.xenblocks.io/technicals/argon2.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.
