Re: [PATCH v7 1/6] SP800-90A Deterministic Random Bit Generator
Am Samstag, 24. Mai 2014, 05:10:07 schrieb Herbert Xu: Hi Herbert, > Stephan Mueller wrote: > > + memset(&drbg_algs[i], 0, sizeof(struct crypto_alg)); > > + if (pr) { > > + memcpy(drbg_algs[i].cra_name, "drbg(pr(", 8); > > + memcpy(drbg_algs[i].cra_driver_name, "drbg_pr_", 8); > > + pos = 8; > > You shouldn't use the brackets here since this not a real template. > Just use one name for both cra_name and cra_driver_name. Thanks for the hint: I would use the name specified for cra_driver_name also for cra_name > > Cheers, Ciao Stephan -- | Cui bono? | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/6] SP800-90A Deterministic Random Bit Generator
Stephan Mueller wrote: > > + memset(&drbg_algs[i], 0, sizeof(struct crypto_alg)); > + if (pr) { > + memcpy(drbg_algs[i].cra_name, "drbg(pr(", 8); > + memcpy(drbg_algs[i].cra_driver_name, "drbg_pr_", 8); > + pos = 8; You shouldn't use the brackets here since this not a real template. Just use one name for both cra_name and cra_driver_name. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/6] SP800-90A Deterministic Random Bit Generator
Am Mittwoch, 21. Mai 2014, 06:18:58 schrieb Stephan Mueller: Hi, > +/* > + * Tests as defined in 11.3.2 in addition to the cipher tests: testing > + * of the error handling. > + * > + * Note: testing of failing seed source as defined in 11.3.2 is not > applicable + * as seed source of get_random_bytes does not fail. > + * > + * Note 2: There is no sensible way of testing the reseed counter > + * enforcement, so skip it. > + */ > +static inline int __init drbg_healthcheck_sanity(void) > +{ > +#ifdef CONFIG_CRYPTO_FIPS > + unsigned int len = 0; This variable must be signed int as otherwise the BUG_ON checks will always fail. This error is a leftover from the return code change of drbg_generate(). It will be fixed in the next release. Ciao Stephan -- | Cui bono? | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/