Skip to content

Commit

Permalink
crypto: drbg - Select correct DRBG core for stdrng
Browse files Browse the repository at this point in the history
When the DRBG is initialized, the core is looked up using the DRBG name.
The name that can be used for the lookup is registered in
cra_driver_name. The cra_name value contains stdrng.

Thus, the lookup code must use crypto_tfm_alg_driver_name to obtain the
precise DRBG name and select the correct DRBG.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
smuellerDD authored and herbertx committed Jul 8, 2014
1 parent 72e7c25 commit 4f15071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ static int drbg_kcapi_init(struct crypto_tfm *tfm)
bool pr = false;
int coreref = 0;

drbg_convert_tfm_core(crypto_tfm_alg_name(tfm), &coreref, &pr);
drbg_convert_tfm_core(crypto_tfm_alg_driver_name(tfm), &coreref, &pr);
/*
* when personalization string is needed, the caller must call reset
* and provide the personalization string as seed information
Expand Down

0 comments on commit 4f15071

Please sign in to comment.