Commit 103eb3f7 authored by Stephan Mueller's avatar Stephan Mueller Committed by Herbert Xu

crypto: drbg - avoid duplicate maintenance of key

The TFM object maintains the key for the CTR DRBG.
Signed-off-by: default avatarStephan Mueller <>
Signed-off-by: default avatarHerbert Xu <>
parent a07203fb
......@@ -517,8 +517,7 @@ static int drbg_ctr_update(struct drbg_state *drbg, struct list_head *seed,
return ret;
/* 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,
if (ret)
goto out;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment