From: Philipp Gesang Date: Fri, 5 May 2017 14:52:45 +0000 (+0200) Subject: remove IV validation step from RestoreHelper X-Git-Tag: v2.2~7^2~127 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=723283eef4b1e67ecbe64ca8c490146f6ce79d80;p=python-delta-tar remove IV validation step from RestoreHelper Since the same decryption context is carried over between the Tar volumes of one backup set, the built-in IV uniqueness checks suffice. Between multiple backup sets, the salt and IV fixed parts change, so there is no occasion for conflict. The IVs of auxiliary files are unique anyways. --- diff --git a/deltatar/deltatar.py b/deltatar/deltatar.py index b5a73a2..d0d6b4e 100644 --- a/deltatar/deltatar.py +++ b/deltatar/deltatar.py @@ -1413,7 +1413,6 @@ class DeltaTar(object): index_it.release() os.chdir(cwd) helper.cleanup() - helper.validate() def _parse_json_line(self, f, l_no): ''' @@ -1533,23 +1532,6 @@ class RestoreHelper(object): self._data.append(s) - def validate (self): - """If encryption was used, verify post-conditions.""" - if len (self._decryptors) == 0: - return - acc = None - for dec in self._decryptors: - if acc is None: - acc = dec.used_ivs.copy () - else: - used_ivs = dec.used_ivs - intersect = used_ivs & acc - if len (intersect) > 0: - raise Exception ("ERROR: %d duplicate IVs found during " - "decryption" % len (intersect)) - acc |= used_ivs - - def cleanup(self): ''' Closes all open files