diff options
author | Jakob Unterwurzacher | 2015-10-06 22:27:37 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-10-06 22:27:37 +0200 |
commit | a3d286069f989dd16c6f91930a0df9fedfa2dd64 (patch) | |
tree | f4f27e09c63b5d777b14fa448c149f0132fffbae /cryptfs/config_file.go | |
parent | 45ea8aa5463942b0b777fcc0b354cef5821c908d (diff) |
Use block number as authentication data
Diffstat (limited to 'cryptfs/config_file.go')
-rw-r--r-- | cryptfs/config_file.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go index 74eb3b2..82f7e72 100644 --- a/cryptfs/config_file.go +++ b/cryptfs/config_file.go @@ -39,7 +39,7 @@ func CreateConfFile(filename string, password string) error { // Lock master key using password-based key cfs := NewCryptFS(scryptHash, false) - cf.EncryptedKey = cfs.EncryptBlock(key) + cf.EncryptedKey = cfs.EncryptBlock(key, 0) // Write file to disk err := cf.WriteFile() @@ -73,7 +73,7 @@ func LoadConfFile(filename string, password string) ([]byte, error) { // We use stock go GCM instead of OpenSSL here as speed is not important // and we get better error messages cfs := NewCryptFS(scryptHash, false) - key, err := cfs.DecryptBlock(cf.EncryptedKey) + key, err := cfs.DecryptBlock(cf.EncryptedKey, 0) if err != nil { Warn.Printf("Failed to unlock master key: %s\n", err.Error()) return nil, err |