All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH v3] crypto: DRBG - add FIPS 140-2 CTRNG for noise source
Date: Fri, 3 May 2019 14:08:21 +0800	[thread overview]
Message-ID: <20190503060821.637af6zhad4jjfi3@gondor.apana.org.au> (raw)
In-Reply-To: <2145637.ukeSOrXKR8@tauon.chronox.de>

On Fri, May 03, 2019 at 07:11:23AM +0200, Stephan Mueller wrote:
>
> > > diff --git a/include/crypto/drbg.h b/include/crypto/drbg.h
> > > index 3fb581bf3b87..939051480c83 100644
> > > --- a/include/crypto/drbg.h
> > > +++ b/include/crypto/drbg.h
> > > @@ -129,6 +129,10 @@ struct drbg_state {
> > > 
> > >  	bool seeded;		/* DRBG fully seeded? */
> > >  	bool pr;		/* Prediction resistance enabled? */
> > > 
> > > +#if IS_ENABLED(CONFIG_CRYPTO_FIPS)
> > > +	bool fips_primed;	/* Continuous test primed? */
> > > +	unsigned char *prev;	/* FIPS 140-2 continuous test value */
> > > +#endif
> > 
> > You can still use #ifdef here.
> 
> The variables would need to be defined unconditionally if we use a runtime 
> check in the C code. Is that what you want me to do?

Yes please do that.  If we wanted to we can get around this by
using accessor functions to hide them but DRBG without FIPS
doesn't make much sense anyway so let's just include them
unconditionally.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2019-05-03 13:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 12:40 [PATCH] crypto: DRBG - add FIPS 140-2 CTRNG for noise source Stephan Müller
2019-05-02 12:48 ` Herbert Xu
2019-05-02 12:49   ` Stephan Mueller
2019-05-02 15:43   ` [PATCH v2] " Stephan Müller
2019-05-02 16:38     ` [PATCH v3] " Stephan Müller
2019-05-03  1:42       ` Herbert Xu
2019-05-03  5:11         ` Stephan Mueller
2019-05-03  6:08           ` Herbert Xu [this message]
2019-05-03 19:58         ` [PATCH v4] " Stephan Müller
2019-05-07  8:19           ` Yann Droneaud
2019-05-07  9:29             ` [PATCH v5] " Stephan Müller
2019-05-07 13:10               ` Yann Droneaud
2019-05-07 13:18                 ` Stephan Mueller
2019-05-07 13:34                 ` Stephan Mueller
2019-05-08 14:19                 ` [PATCH v6] " Stephan Mueller
2019-05-09  9:16                   ` Yann Droneaud
2019-05-23  6:50                   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503060821.637af6zhad4jjfi3@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=smueller@chronox.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.