From a8d49f45277d84c7f8f2679086f07bf7cddb87e3 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Mon, 15 Jul 2013 17:42:09 +0200 Subject: [PATCH] Using aes128 for encryption --- deltatar/aescrypto.py | 2 +- testing/test_encryption.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deltatar/aescrypto.py b/deltatar/aescrypto.py index 85d2dbb..ea676de 100644 --- a/deltatar/aescrypto.py +++ b/deltatar/aescrypto.py @@ -35,7 +35,7 @@ class AESCrypt: def __init__(self, password, salt=''): self.bs = AES.block_size self.mode = AES.MODE_CBC - self.key_length = 32 + self.key_length = 16 self.buf = '' if salt: self.salt = salt diff --git a/testing/test_encryption.py b/testing/test_encryption.py index 12a2e11..cc170a0 100644 --- a/testing/test_encryption.py +++ b/testing/test_encryption.py @@ -37,7 +37,7 @@ class EncryptionTest(BaseTest): assert os.path.exists("sample.tar.gz.aes.0") # beginning of the tar file assert os.path.exists("sample.tar.gz.aes.1") # first file - os.system("openssl aes-256-cbc -k 'key' -d -in sample.tar.gz.aes.1 -out sample.tar.gz") + os.system("openssl aes-128-cbc -k 'key' -d -in sample.tar.gz.aes.1 -out sample.tar.gz") os.system("zcat sample.tar.gz > sample.tar") os.system("tar xf sample.tar") assert os.path.exists("big") @@ -82,7 +82,7 @@ class EncryptionTest(BaseTest): # extract and check output for i in xrange(1, 4): fname = "sample.tar.gz.aes.%d" % i - os.system("openssl aes-256-cbc -k 'key' -d -in %s -out sample.tar.gz" % fname) + os.system("openssl aes-128-cbc -k 'key' -d -in %s -out sample.tar.gz" % fname) os.system("zcat sample.tar.gz > sample.tar") os.system("tar xf sample.tar") -- 1.7.1