When decrypting a log item also clear out the IV field.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Sun, 17 Oct 2010 23:17:40 +0000 (16:17 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Sun, 17 Oct 2010 23:17:40 +0000 (16:17 -0700)
Not really needed, but this way the IV field being zero should be
synonymous with an unencrypted log item.

bluesky/crypto.c

index 1dc5e0d..f34b8b7 100644 (file)
@@ -244,6 +244,7 @@ gboolean bluesky_crypt_block_decrypt(gchar *cloud_block, size_t len,
                     gcry_strerror(status));
         }
         header->magic[3] ^= 0x10;
+        memset(header->crypt_iv, 0, sizeof(header->crypt_iv));
 
         gcry_cipher_close(handle);
     }