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
This commit is contained in:
Gustav Simonsson
2015-04-02 18:15:58 +02:00
parent 9918b6c84e
commit 6b23094cff
4 changed files with 33 additions and 25 deletions

View File

@ -48,6 +48,7 @@ type plainKeyJSON struct {
}
type cipherJSON struct {
MAC []byte
Salt []byte
IV []byte
CipherText []byte