Initial tuning of argon2

This commit is contained in:
2025-05-08 16:31:17 +00:00
parent 6a40f9e627
commit ce0b5d4bf5
+3 -4
View File
@@ -4,14 +4,13 @@ import (
"runtime" "runtime"
"golang.org/x/crypto/argon2" "golang.org/x/crypto/argon2"
"golang.org/x/crypto/chacha20poly1305"
) )
const ( const (
// parameters for Argon2 // parameters for Argon2
argonTime = 1 argonTime = 8 // set to pass 1-second test in dev environment
argonMemory = 64 * 1024 argonMemory = 384 * 1024 // 384 MB
argonKeyLen = chacha20poly1305.KeySize argonKeyLen = 32 // 256 bits, key length for both ChaCha20 and AES256
// general constants // general constants
saltSize = 16 saltSize = 16