summaryrefslogtreecommitdiff
path: root/crypto/lz4hc.c
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2014-07-06 04:24:35 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-07-08 17:18:24 +0400
commit72e7c25aa6d73df2951229d2ce0a35065de66d3a (patch)
tree5d242f50c32207d375766ca579b375f30fbb42a8 /crypto/lz4hc.c
parenta9089571f2fc203c3ba6595a60f0045f048494da (diff)
downloadlinux-72e7c25aa6d73df2951229d2ce0a35065de66d3a.tar.xz
crypto: drbg - Call CTR DRBG DF function only once
The CTR DRBG requires the update function to be called twice when generating a random number. In both cases, update function must process the additional information string by using the DF function. As the DF produces the same result in both cases, we can save one invocation of the DF function when the first DF function result is reused. The result of the DF function is stored in the scratchpad storage. The patch ensures that the scratchpad is not cleared when we want to reuse the DF result. For achieving this, the CTR DRBG update function must know by whom and in which scenario it is called. This information is provided with the reseed parameter to the update function. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/lz4hc.c')
0 files changed, 0 insertions, 0 deletions