mirror of
https://github.com/rwinkhart/rcw.git
synced 2026-09-05 08:37:27 -04:00
Initial tuning of argon2
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user