]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: drbg - eliminate constant reinitialization of SGL
authorStephan Mueller <smueller@chronox.de>
Tue, 10 Jul 2018 15:56:33 +0000 (17:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Jul 2018 05:51:21 +0000 (13:51 +0800)
commit7eae97f7dd9462725849feb04547d41046d3e530
tree84b26e66645be295e8e91bace8bcd793daf4c51b
parent9bd8934328a3212f5cd893c476d3274df52f25ab
crypto: drbg - eliminate constant reinitialization of SGL

The CTR DRBG requires two SGLs pointing to input/output buffers for the
CTR AES operation. The used SGLs always have only one entry. Thus, the
SGL can be initialized during allocation time, preventing a
re-initialization of the SGLs during each call.

The performance is increased by about 1 to 3 percent depending on the
size of the requested buffer size.

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