diff options
author | Stephan Mueller <smueller@chronox.de> | 2016-06-14 07:36:06 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-06-15 17:07:54 +0800 |
commit | 6e1ff257630faf97e763b6be5b2a5da1a2275e48 (patch) | |
tree | c903a1fcaae51c7418cb0064be2f99414770f3b9 /crypto | |
parent | f680aeffce84245ff7ae73f17344f47a39e07349 (diff) | |
download | linux-crypto-6e1ff257630faf97e763b6be5b2a5da1a2275e48.tar.gz linux-crypto-6e1ff257630faf97e763b6be5b2a5da1a2275e48.zip |
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')
-rw-r--r-- | crypto/drbg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c index 8ceb7169..ded86385 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; |