move final IV checks out of crypto context
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 4 May 2017 16:06:04 +0000 (18:06 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commit3031b7ae605eb641046fb3fda13227e88870a2e1
treecba0fa0461c4edb5bfc5f666c7ad2335a22a9ed1
parent774ca5389c37ff09b7cd5e803dfdc199f1fde898
move final IV checks out of crypto context

Collect IVs while decrypting but postpone the final check for
duplicates. Reused IVs still trigger an exception during
decryption but since multiple different contexts may be active
(e. g. when handling a diff backup), the IVs they retrieved from
the headers must be compared afterwards. This test has its place
in a new function “validate” of the ``RestoreHelper`` and must be
called when decryption has been completed.
deltatar/crypto.py
deltatar/deltatar.py
deltatar/tarfile.py