From: Philipp Gesang Date: Fri, 24 Mar 2017 10:12:29 +0000 (+0100) Subject: adjust versioned encryption parameters X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=273980047f8b8606863d214ea80b5b1fbd11f4f3;p=python-delta-tar adjust versioned encryption parameters Prepare for revised versioning: Both the encryption mechanism and the KDF may be specified in the versioning. --- diff --git a/deltatar/crypto.py b/deltatar/crypto.py index 0330552..77ce90e 100755 --- a/deltatar/crypto.py +++ b/deltatar/crypto.py @@ -63,14 +63,16 @@ __all__ = [ "hdr_make", "hdr_read", "hdr_fmt", "hdr_fmt_pretty" ENCRYPTION_PARAMETERS = \ { 0: \ - { "kdf": ("dummy", 16) } + { "kdf": ("dummy", 16) + , "enc": "passthrough" } , 1: \ - { "kdf": ("scrypt", - { "dkLen" : 16 - , "N" : 1 << 15 - , "r" : 8 - , "p" : 1 - , "NaCl_LEN" : 16 }) } } + { "kdf": ( "scrypt" + , { "dkLen" : 16 + , "N" : 1 << 16 + , "r" : 8 + , "p" : 1 + , "NaCl_LEN" : 16 }) + , "enc": "aes-gcm" } } ###############################################################################