Skip to content

Commit 13f272f

Browse files
authored
Updated description of the GCM encryption for vault. (#224)
1 parent c74984b commit 13f272f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

security/vault.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ func (fvs *FileVaultStorer) Write(data []byte) error {
192192
}
193193

194194
// encrypt uses an aes cipher provided by the certificate file for encryption.
195-
// We don't store the password in the file. an error will be thrown in case the encryption
196-
// operation encounters a problem which will most likely be due to a mistyped password.
197-
// We will return this possibility but we won't know for sure if that's the cause.
198-
// The password is padded with 0x04 to Blocklenght. IV randomized to blocksize and length of the message.
195+
// We don't store the password anywhere. An error will be thrown in case the encryption
196+
// operation encounters a problem. Gaia uses AES GCM to encrypt the vault file. For Nonce it's
197+
// using a constantly increasing number which is stored with the file. GCM allows for better
198+
// password verification in which case we don't have to guess what was wrong any longer.
199199
// In the end we encrypt the whole thing to Base64 for ease of saving an handling.
200200
func (v *Vault) encrypt(data []byte) (string, error) {
201201
if len(data) < 1 {

0 commit comments

Comments
 (0)