mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									a07203fbfc
								
							
						
					
					
						commit
						103eb3f7bf
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -517,8 +517,7 @@ static int drbg_ctr_update(struct drbg_state *drbg, struct list_head *seed,
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* 10.2.1.2 step 5 */
 | 
						/* 10.2.1.2 step 5 */
 | 
				
			||||||
	memcpy(drbg->C, temp, drbg_keylen(drbg));
 | 
						ret = crypto_skcipher_setkey(drbg->ctr_handle, temp,
 | 
				
			||||||
	ret = crypto_skcipher_setkey(drbg->ctr_handle, drbg->C,
 | 
					 | 
				
			||||||
				     drbg_keylen(drbg));
 | 
									     drbg_keylen(drbg));
 | 
				
			||||||
	if (ret)
 | 
						if (ret)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue