diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-04-03 00:15:58 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-12 23:18:30 +0800 |
commit | 6b23094cff77d7e485e0a2ae5698884f63c87ce7 (patch) | |
tree | 54f1b48de9df3cd7b6e8e388b91fa76190d1a852 /crypto/crypto.go | |
parent | 9918b6c84e2547f3d24a6cfeb97cfcbd6cb4dc98 (diff) | |
download | dexon-6b23094cff77d7e485e0a2ae5698884f63c87ce7.tar.gz dexon-6b23094cff77d7e485e0a2ae5698884f63c87ce7.tar.zst dexon-6b23094cff77d7e485e0a2ae5698884f63c87ce7.zip |
Improve key store passphrase crypto
* Change MAC-then-Encrypt to Encrypt-then-MAC
* Change AES256 to AES128
* Use first 16 bytes of KDF derived key for AES and
remaining 16 for MAC
Diffstat (limited to 'crypto/crypto.go')
-rw-r--r-- | crypto/crypto.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go index 3c5783014..6fc5bfd36 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -252,7 +252,7 @@ func aesCBCDecrypt(key []byte, cipherText []byte, iv []byte) (plainText []byte, decrypter.CryptBlocks(paddedPlainText, cipherText) plainText = PKCS7Unpad(paddedPlainText) if plainText == nil { - err = errors.New("Decryption failed: PKCS7Unpad failed after decryption") + err = errors.New("Decryption failed: PKCS7Unpad failed after AES decryption") } return plainText, err } |