Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: arm/nhpoly1305 - implement ->digest

Implement the ->digest method to improve performance on single-page
messages by reducing the number of indirect calls.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
5f929b4e dadf5e56

+9
+9
arch/arm/crypto/nhpoly1305-neon-glue.c
··· 34 34 return 0; 35 35 } 36 36 37 + static int nhpoly1305_neon_digest(struct shash_desc *desc, 38 + const u8 *src, unsigned int srclen, u8 *out) 39 + { 40 + return crypto_nhpoly1305_init(desc) ?: 41 + nhpoly1305_neon_update(desc, src, srclen) ?: 42 + crypto_nhpoly1305_final(desc, out); 43 + } 44 + 37 45 static struct shash_alg nhpoly1305_alg = { 38 46 .base.cra_name = "nhpoly1305", 39 47 .base.cra_driver_name = "nhpoly1305-neon", ··· 52 44 .init = crypto_nhpoly1305_init, 53 45 .update = nhpoly1305_neon_update, 54 46 .final = crypto_nhpoly1305_final, 47 + .digest = nhpoly1305_neon_digest, 55 48 .setkey = crypto_nhpoly1305_setkey, 56 49 .descsize = sizeof(struct nhpoly1305_state), 57 50 };