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)
commit04bcbfcf7e28ba502383a8e19d99960ab8e347c8
tree36fc2e3be9d626e4396305ece16a7bc8a203940d
parente8e5995372ac3fc63995915dcb351f38a3560018
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