RustCrypto / password-hashes

Password hashing functions / KDFs
677 stars 84 forks source link

Argon2: Fix docs about minimum value of `m_cost` #459

Closed sorairolake closed 1 year ago

sorairolake commented 1 year ago

According to RFC 9106:

Memory size m MUST be an integer number of kibibytes from 8*p to 2^(32)-1. The actual number of blocks is m', which is m rounded down to the nearest multiple of 4*p.

8 is the minimum value of m_cost when p_cost is 1, and the minimum value of m_cost changes depending on the value of p_cost, so I fix the explanation about the minimum value of m_cost.

See also: https://github.com/RustCrypto/password-hashes/pull/458#issuecomment-1706637626