diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-06-16 12:02:16 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-06-18 13:40:54 +0200 |
commit | b913a6404ce2b7d10a735834218d3c1e1bceff2a (patch) | |
tree | 5d2736f6de8a7600c99e471dfddc6d9a5ed43b2d /arch/arm64/crypto/ghash-ce-glue.c | |
parent | arm64/crypto: fix data corruption bug in GHASH algorithm (diff) | |
download | linux-b913a6404ce2b7d10a735834218d3c1e1bceff2a.tar.xz linux-b913a6404ce2b7d10a735834218d3c1e1bceff2a.zip |
arm64/crypto: improve performance of GHASH algorithm
This patches modifies the GHASH secure hash implementation to switch to a
faster, polynomial multiplication based reduction instead of one that uses
shifts and rotates.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '')
-rw-r--r-- | arch/arm64/crypto/ghash-ce-glue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c index ef6aa69c4e0c..833ec1e3f3e9 100644 --- a/arch/arm64/crypto/ghash-ce-glue.c +++ b/arch/arm64/crypto/ghash-ce-glue.c @@ -67,7 +67,7 @@ static int ghash_update(struct shash_desc *desc, const u8 *src, blocks = len / GHASH_BLOCK_SIZE; len %= GHASH_BLOCK_SIZE; - kernel_neon_begin_partial(6); + kernel_neon_begin_partial(8); pmull_ghash_update(blocks, ctx->digest, src, key, partial ? ctx->buf : NULL); kernel_neon_end(); @@ -89,7 +89,7 @@ static int ghash_final(struct shash_desc *desc, u8 *dst) memset(ctx->buf + partial, 0, GHASH_BLOCK_SIZE - partial); - kernel_neon_begin_partial(6); + kernel_neon_begin_partial(8); pmull_ghash_update(1, ctx->digest, ctx->buf, key, NULL); kernel_neon_end(); } |