From 8ebc072fb0ceae229196e8d3d8ff15bbbc049fdd Mon Sep 17 00:00:00 2001 From: ishaan Date: Wed, 15 Jul 2026 07:23:47 +0530 Subject: better encrypted/decrypted file perms --- internal/crypt/rawDecrypt.go | 2 +- internal/crypt/rawEncrypt.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/crypt') diff --git a/internal/crypt/rawDecrypt.go b/internal/crypt/rawDecrypt.go index 6cfea1f..d1f0193 100644 --- a/internal/crypt/rawDecrypt.go +++ b/internal/crypt/rawDecrypt.go @@ -39,7 +39,7 @@ func DecryptBytesPass(inputBytes []byte, password []byte) ([]byte, error) { return nil, fmt.Errorf("decrypt: expected password auth, got %s", headers.Auth) } - key := argon2.IDKey(password, headers.Salt[:], 1, 64*1024*1024, 2, 32) + key := argon2.IDKey(password, headers.Salt[:], 1, 2*1024*1024, 2, 32) TryMlock(key) defer clear(key) aead, err := chacha20poly1305.New(key) diff --git a/internal/crypt/rawEncrypt.go b/internal/crypt/rawEncrypt.go index a138753..03f742f 100644 --- a/internal/crypt/rawEncrypt.go +++ b/internal/crypt/rawEncrypt.go @@ -22,7 +22,7 @@ func EncryptBytesPass(inputBytes []byte, password []byte) ([]byte, error) { headers := FileHeaders{Salt: salt, Nonce: nonce, Type: File, Parts: 1, Auth: Pass, Recipients: []WrappedKey{}} - key := argon2.IDKey(password, headers.Salt[:], 1, 64*1024*1024, 2, 32) + key := argon2.IDKey(password, headers.Salt[:], 1, 2*1024*1024, 2, 32) TryMlock(key) defer clear(key) aead, err := chacha20poly1305.New(key) -- cgit v1.3