linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64/crypto: fix data corruption bug in GHASH algorithm
@ 2014-06-16 10:02 Ard Biesheuvel
  2014-06-16 10:02 ` [PATCH 2/2] arm64/crypto: improve performance of " Ard Biesheuvel
  2014-06-18  9:46 ` [PATCH 1/2] arm64/crypto: fix data corruption bug in " Catalin Marinas
  0 siblings, 2 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2014-06-16 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

This fixes a bug in the GHASH algorithm resulting in the calculated hash to be
incorrect if the input is presented in chunks whose size is not a multiple of
16 bytes.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Fixes: fdd2389457b2 ("arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions")
---
 arch/arm64/crypto/ghash-ce-glue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c
index b92baf3f68c7..ef6aa69c4e0c 100644
--- a/arch/arm64/crypto/ghash-ce-glue.c
+++ b/arch/arm64/crypto/ghash-ce-glue.c
@@ -72,6 +72,7 @@ static int ghash_update(struct shash_desc *desc, const u8 *src,
 				   partial ? ctx->buf : NULL);
 		kernel_neon_end();
 		src += blocks * GHASH_BLOCK_SIZE;
+		partial = 0;
 	}
 	if (len)
 		memcpy(ctx->buf + partial, src, len);
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-18  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 10:02 [PATCH 1/2] arm64/crypto: fix data corruption bug in GHASH algorithm Ard Biesheuvel
2014-06-16 10:02 ` [PATCH 2/2] arm64/crypto: improve performance of " Ard Biesheuvel
2014-06-18  9:46 ` [PATCH 1/2] arm64/crypto: fix data corruption bug in " Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).