From 97f5174226e3c309c87b9fdb11dd3c6299f00b4a Mon Sep 17 00:00:00 2001 From: Mouse Date: Tue, 2 Jul 2019 11:02:07 -0400 Subject: [PATCH] Complete change from DEFAULT_KEYLENGTH to DIGESTSIZE in DLAES Change from `MAC::DEFAULT_KEYLENGTH` to `MAC::DIGESTSIZE` in `DL_EncryptionAlgorithm_Xor` was only partially done. This was discovered when null hash was used. This, along with the proposed fix, was discovered by Andrew Wason (thanks!). --- gfpcrypt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfpcrypt.h b/gfpcrypt.h index 1b26a56b..f15c397e 100644 --- a/gfpcrypt.h +++ b/gfpcrypt.h @@ -716,7 +716,7 @@ public: if (DHAES_MODE) { macKey = key; - cipherKey = key + MAC::DEFAULT_KEYLENGTH; + cipherKey = key + MAC::DIGESTSIZE; } else { @@ -748,7 +748,7 @@ public: if (DHAES_MODE) { macKey = key; - cipherKey = key + MAC::DEFAULT_KEYLENGTH; + cipherKey = key + MAC::DIGESTSIZE; } else {