Use 128-bit key length when decompressing older version archives.

This commit is contained in:
Moinak Ghosh 2013-03-04 22:35:33 +05:30
parent 20250aa5dc
commit dce424ec85
2 changed files with 5 additions and 2 deletions

View file

@ -47,8 +47,9 @@ extern "C" {
#define MAX_KEYLEN DEFAULT_KEYLEN
#endif
#define ENCRYPT_FLAG 1
#define DECRYPT_FLAG 0
#define OLD_KEYLEN 16
#define ENCRYPT_FLAG 1
#define DECRYPT_FLAG 0
#define CRYPTO_ALG_AES 0x10
#define CRYPTO_ALG_SALSA20 0x20
#define MAX_SALTLEN 64

2
main.c
View file

@ -818,6 +818,8 @@ start_decompress(const char *filename, const char *to_filename)
pw_len = -1;
compressed_chunksize += mac_bytes;
encrypt_type = flags & MASK_CRYPTO_ALG;
if (version < 7)
keylen = OLD_KEYLEN;
if (encrypt_type == CRYPTO_ALG_AES) {
noncelen = 8;