From 0518dcede3aecf7dbd204e368d7ce511b65467f8 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 18 Mar 2022 20:31:13 +0100 Subject: [PATCH] crypto: works better WITH id_hash only hmac-sha-256 for now, blake2b can be added later. --- src/borg/crypto/key.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/borg/crypto/key.py b/src/borg/crypto/key.py index 23cec5aa278..ce547f32dcc 100644 --- a/src/borg/crypto/key.py +++ b/src/borg/crypto/key.py @@ -791,7 +791,7 @@ def init_ciphers(self, manifest_data=None, iv=0): self.cipher = self._get_cipher(self.sessionid, iv=0) -class AESOCBKeyfileKey(AEADKeyBase, FlexiKey): +class AESOCBKeyfileKey(ID_HMAC_SHA_256, AEADKeyBase, FlexiKey): TYPES_ACCEPTABLE = {KeyType.AESOCBKEYFILE, KeyType.AESOCBREPO} TYPE = KeyType.AESOCBKEYFILE NAME = 'key file AES-OCB' @@ -800,7 +800,7 @@ class AESOCBKeyfileKey(AEADKeyBase, FlexiKey): CIPHERSUITE = AES256_OCB -class AESOCBRepoKey(AEADKeyBase, FlexiKey): +class AESOCBRepoKey(ID_HMAC_SHA_256, AEADKeyBase, FlexiKey): TYPES_ACCEPTABLE = {KeyType.AESOCBKEYFILE, KeyType.AESOCBREPO} TYPE = KeyType.AESOCBREPO NAME = 'repokey AES-OCB' @@ -809,7 +809,7 @@ class AESOCBRepoKey(AEADKeyBase, FlexiKey): CIPHERSUITE = AES256_OCB -class CHPOKeyfileKey(AEADKeyBase, FlexiKey): +class CHPOKeyfileKey(ID_HMAC_SHA_256, AEADKeyBase, FlexiKey): TYPES_ACCEPTABLE = {KeyType.CHPOKEYFILE, KeyType.CHPOREPO} TYPE = KeyType.CHPOKEYFILE NAME = 'key file ChaCha20-Poly1305' @@ -818,7 +818,7 @@ class CHPOKeyfileKey(AEADKeyBase, FlexiKey): CIPHERSUITE = CHACHA20_POLY1305 -class CHPORepoKey(AEADKeyBase, FlexiKey): +class CHPORepoKey(ID_HMAC_SHA_256, AEADKeyBase, FlexiKey): TYPES_ACCEPTABLE = {KeyType.CHPOKEYFILE, KeyType.CHPOREPO} TYPE = KeyType.CHPOREPO NAME = 'repokey ChaCha20-Poly1305'