2
$\begingroup$

What's the exact meaning of 'Argon2 uses BLAKE2b'? Does it based on BLAKE2b? like chacha20 based on salsa20 kind of meaning or does Argon2 use the BLAKE2b with 12 rounds hash function at the end to generate a hash value? thank you.

$\endgroup$

1 Answer 1

4
$\begingroup$

Argon2 uses BLAKE2b in several different ways, which can be seen in the Wikipedia article on it. It's first used to hash the parameters, including the password, and then used in a construct that expands an input to an effectively arbitrary length digest.

This arbitrary-length digest is used to expand the first two columns, and then to generate the final hash value. Assuming the final output is 64 bytes (512 bits) or fewer in length, then yes, it's effectively just BLAKE2b with the digest length (32-bit little endian) prepended to the message, possibly truncated.

There are other components, such as the G function, which is used for expanding the columns, which are based on BLAKE2b, but have some differences (notably the use of multiplications).

$\endgroup$
3
  • $\begingroup$ thanks, so it's not chacha based on salsa relationship, right? but at some point(s) in your first example Argon2 calls the 12 rounds BLAKE2b to hash the parameters, correct? $\endgroup$
    – user111059
    Commented Aug 27, 2023 at 8:49
  • $\begingroup$ Yes, there are actual invocations of BLAKE2b proper without any modifications. There are also, as I mentioned, some components that resemble BLAKE2b but are slightly different much as ChaCha20 resembles Salsa20. So we have both. $\endgroup$
    – bk2204
    Commented Aug 27, 2023 at 14:18
  • $\begingroup$ The BLAKE2-based algorithm in the G function is called BlaMka (which is also used in an algorithm called Lyra2). It is just used for fast diffusion and isn't a secure hash on its own. $\endgroup$
    – forest
    Commented Aug 27, 2023 at 22:51

Your Answer

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