Using aes128 for encryption
authorDaniel Garcia Moreno <danigm@wadobo.com>
Mon, 15 Jul 2013 15:42:09 +0000 (17:42 +0200)
committerDaniel Garcia Moreno <danigm@wadobo.com>
Mon, 15 Jul 2013 15:42:09 +0000 (17:42 +0200)
deltatar/aescrypto.py
testing/test_encryption.py

index 85d2dbb..ea676de 100644 (file)
@@ -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
index 12a2e11..cc170a0 100644 (file)
@@ -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")