Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To big memory consumption #17

Closed
Shamil-R opened this issue Apr 27, 2023 · 3 comments
Closed

To big memory consumption #17

Shamil-R opened this issue Apr 27, 2023 · 3 comments

Comments

@Shamil-R
Copy link

One CreateHash function consumes a lot of resources. Because there is code in func initBlocks
var block0 [1024]byte B := make([]block, memory)

Maybe optimize it?

@kirides
Copy link

kirides commented May 18, 2023

without looking into it: argon2id and other hashing algorithms make use of "memory" as a security measurement, to fight specialized hardware and attack cost.

They should be "slow" and "expensive" relative to their benefit. On a Server, 100ms and 1 MB for a login-hash might be okay. Storing the hashes locally though requires a lot more. typically 1000ms and 4-16 MB per try or even higher.

this is NOT professional advice, nor do i recommend these values. Please lookup the correct up-to-date values for your used hashing algorithm up

@pierow2k
Copy link

pierow2k commented Aug 19, 2023

The IETF Internet-Draft referenced in the README.md doc speaks to setting the Argon parameters according to the maximum amount memory that each call can afford. (See also, this response to #3 )

@alexedwards
Copy link
Owner

Please see this response to a similar issue: #3 (comment)

Argon2 is deliberately memory hungry by design. Please change the default parameters to suit your needs and hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants