summaryrefslogtreecommitdiff
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2016-06-14 08:36:06 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-06-15 12:07:54 +0300
commit103eb3f7bfb4fce0e299afbf50fef8ffa8d9d38c (patch)
tree002ad713ea2a824fe779d9d09340ceb7df6ab957 /crypto/drbg.c
parenta07203fbfcf146b737781ee4658ed198956036ca (diff)
downloadlinux-103eb3f7bfb4fce0e299afbf50fef8ffa8d9d38c.tar.xz
crypto: drbg - avoid duplicate maintenance of key
The TFM object maintains the key for the CTR DRBG. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
-rw-r--r--crypto/drbg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 8ceb71699dea..ded86385ab6e 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -517,8 +517,7 @@ static int drbg_ctr_update(struct drbg_state *drbg, struct list_head *seed,
return ret;
/* 10.2.1.2 step 5 */
- memcpy(drbg->C, temp, drbg_keylen(drbg));
- ret = crypto_skcipher_setkey(drbg->ctr_handle, drbg->C,
+ ret = crypto_skcipher_setkey(drbg->ctr_handle, temp,
drbg_keylen(drbg));
if (ret)
goto out;