Use 128-bit key length when decompressing older version archives.
This commit is contained in:
parent
20250aa5dc
commit
dce424ec85
2 changed files with 5 additions and 2 deletions
|
@ -47,8 +47,9 @@ extern "C" {
|
||||||
#define MAX_KEYLEN DEFAULT_KEYLEN
|
#define MAX_KEYLEN DEFAULT_KEYLEN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ENCRYPT_FLAG 1
|
#define OLD_KEYLEN 16
|
||||||
#define DECRYPT_FLAG 0
|
#define ENCRYPT_FLAG 1
|
||||||
|
#define DECRYPT_FLAG 0
|
||||||
#define CRYPTO_ALG_AES 0x10
|
#define CRYPTO_ALG_AES 0x10
|
||||||
#define CRYPTO_ALG_SALSA20 0x20
|
#define CRYPTO_ALG_SALSA20 0x20
|
||||||
#define MAX_SALTLEN 64
|
#define MAX_SALTLEN 64
|
||||||
|
|
2
main.c
2
main.c
|
@ -818,6 +818,8 @@ start_decompress(const char *filename, const char *to_filename)
|
||||||
pw_len = -1;
|
pw_len = -1;
|
||||||
compressed_chunksize += mac_bytes;
|
compressed_chunksize += mac_bytes;
|
||||||
encrypt_type = flags & MASK_CRYPTO_ALG;
|
encrypt_type = flags & MASK_CRYPTO_ALG;
|
||||||
|
if (version < 7)
|
||||||
|
keylen = OLD_KEYLEN;
|
||||||
|
|
||||||
if (encrypt_type == CRYPTO_ALG_AES) {
|
if (encrypt_type == CRYPTO_ALG_AES) {
|
||||||
noncelen = 8;
|
noncelen = 8;
|
||||||
|
|
Loading…
Reference in a new issue