]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - crypto/drbg.c
crypto: drbg - set HMAC key only when altered
authorStephan Mueller <smueller@chronox.de>
Mon, 28 Mar 2016 14:47:55 +0000 (16:47 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Apr 2016 12:35:53 +0000 (20:35 +0800)
commit4218ebe8cab421c72f134cca1374e0985303f34a
tree813c3ec09204f4cd35998aaca752c22ae88beecd
parentbdb6cf9f6fe6d9af905ea34b7c4bb78ea601329e
crypto: drbg - set HMAC key only when altered

The HMAC implementation allows setting the HMAC key independently from
the hashing operation. Therefore, the key only needs to be set when a
new key is generated.

This patch increases the speed of the HMAC DRBG by at least 35% depending
on the use case.

The patch is fully CAVS tested.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c