]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: drbg - use single block cipher API
authorStephan Mueller <smueller@chronox.de>
Sun, 1 Mar 2015 19:39:17 +0000 (20:39 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 4 Mar 2015 09:13:29 +0000 (22:13 +1300)
commit682091b21f0729fcd3b2476dca0232cad57c4113
tree36fc2e3be9d626e4396305ece16a7bc8a203940d
parent29558c7cb8286f8992cef650dd01692024896ec6
crypto: drbg - use single block cipher API

The CTR DRBG only encrypts one single block at a time. Thus, use the
single block crypto API to avoid additional overhead from the block
chaining modes.

With the patch, the speed of the DRBG increases between 30% and 40%.

The DRBG still passes the CTR DRBG CAVS test.

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