RustCrypto / password-hashes

Password hashing functions / KDFs
652 stars 80 forks source link

Argon2: Fix `Params` docs #458

Closed sorairolake closed 1 year ago

sorairolake commented 1 year ago

These are defined in RFC 9106, and MIN_M_COST and MAX_P_COST are also like that.

See also: #451, #452

sorairolake commented 1 year ago

Params::new verifies that m_cost is greater than or equal to p_cost*8.

https://github.com/RustCrypto/password-hashes/blob/144b2e41a686524fb8f971454cf65a7fbcdf7bed/argon2/src/params.rs#L119-L121

So, it might be better to explain that the minimum value of m_cost is p_cost*8 instead of 8.