From ca5dc955786f9a9f2d47b2ca99bf793be264877e Mon Sep 17 00:00:00 2001 From: tuxxy Date: Wed, 20 Sep 2017 09:57:59 -0700 Subject: [PATCH] Read chunk_size + PADDING_LENGTH as ciphertext --- nkms/storage/encrypted_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nkms/storage/encrypted_file.py b/nkms/storage/encrypted_file.py index 3010163e5..9ec77d140 100644 --- a/nkms/storage/encrypted_file.py +++ b/nkms/storage/encrypted_file.py @@ -47,7 +47,7 @@ class EncryptedFile(object): :return: Decrypted/Authenticated chunk :rtype: Bytes """ - ciphertext = self.file_obj.read(chunk_size) + ciphertext = self.file_obj.read(chunk_size + PADDING_LENGTH) return self.cipher.decrypt(ciphertext, nonce=nonce) def read(self, num_chunks=0):