So as I understand Argon2 is a memory-hard function, in other words it has to use a certain amount of memory, thus making it effective against GPUs.

So would this in theory, make Argon2 useless against an adversary with infinite memory?

But also if this is the case, then why does giving Argon2 a higher memory requirement also make it slower? Shouldn't it just take the same time but with more memory? Is there some more processing going on too? Or is it slower because of RAM read/write times?

  • $\begingroup$ In the real world, memory costs money. The point is to increase the cost to attackers. $\endgroup$ Jul 15, 2021 at 16:52
  • $\begingroup$ I am aware of the point, I am asking why does adding more memory also make it slower? $\endgroup$
    – Hormoz
    Jul 15, 2021 at 17:11

1 Answer 1


Giving Argon2 more memory does indeed make it slower. When Argon2 fills the memory that it uses, it calls the G function, which modifies data based on the BLAKE2b round function. Increasing the memory also increases the number of columns iterated over in each iteration, each of which also involves a call to the same G function. As a consequence, doubling the memory also means effectively doubling the amount of work required. You can see much of the algorithm pseudocode on Wikipedia.

Argon2 would not be useless against an adversary with infinite memory unless they had some way to make operations much faster for their additional memory. In practical computer designs, even with very performant vector operations, this would still add additional cost.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.