0
$\begingroup$

I am looking for a very difficult/slow hashing function to hash secrets used to decrypt env files. Because it is used to log when the env files "keys" get recreated I don't need it to be fast, ideally close to a full second to calculate because I will be in trouble if the keys get stolen but I want to log when I changed them and log a hash of the keys so I can debug in the future.

$\endgroup$
1
  • $\begingroup$ Take a loot at key derivation functions like Scrypt. $\endgroup$ Apr 5, 2018 at 8:36

1 Answer 1

3
$\begingroup$

Argon2.

Argon2 is the current standard for password-hashing schemes, which are designed to be slow and more importantly expensive to parallel adversaries, even if they have hardware support. You can tune its speed via the memory and the time parameter, either of which should affect run-time linearly. Anyways, the paper in the repository should contain a guide on how to experimentally configure the parameters for your application.

$\endgroup$
1
  • $\begingroup$ Awesome thank you, I was looking at something a little more robust than Bcrypt and this fits the bill. $\endgroup$
    – dkimot
    Apr 5, 2018 at 8:49

Your Answer

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

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