From: Salvatore Benedetto <salvatore.benedetto@intel.com>
To: Stephan Mueller <smueller@chronox.de>
Cc: herbert@gondor.apana.org.au, tadeusz.struk@intel.com,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: implement DH primitives under akcipher API
Date: Wed, 2 Mar 2016 09:53:51 +0000 [thread overview]
Message-ID: <20160302095351.GB2384@sbenedet-virtual-machine> (raw)
In-Reply-To: <4569151.ySIvlNFRgX@positron.chronox.de>
On Tue, Mar 01, 2016 at 12:17:15PM +0100, Stephan Mueller wrote:
Hi Stephan,
> Am Dienstag, 1. März 2016, 11:08:34 schrieb Salvatore Benedetto:
>
> Hi Salvatore,
>
> > > > +static int dh_check_params_length(unsigned int p_len)
> > > > +{
> > > > + switch (p_len) {
> > > > + case 768:
> > > > + case 1024:
> > > > + case 1536:
> > > > + case 2048:
> > > > + case 3072:
> > > > + case 4096:
> > > > + return 0;
> > > > + }
> > > > + return -EINVAL;
> > > > +}
> > >
> > > What is the reason for restricting the size to 4096?
> >
> > Honestly no reason.
> > Could not find restrictions in the spec about the params length.
>
> I am just wondering because other DH impls allow longer sizes.
>
> And besides, I would like to disallow all < 2048 right from the start.
>
Hmm.. What range would you suggest?
I just thought that having the same range we support with RSA would be OK for now.
> > > > +
> > > > +static int dh_no_op(struct akcipher_request *req)
> > > > +{
> > > > + return -ENOPROTOOPT;
> > > > +}
> > > > +
> > > > +static int dh_set_priv_key(struct crypto_akcipher *tfm, const void
> > > > *key,
> > > > + unsigned int keylen)
> > > > +{
> > > > + struct dh_params *params = akcipher_tfm_ctx(tfm);
> > >
> > > dh_get_params?
> >
> > You mean adding a helper function? OK.
>
> Not adding, but using your helper function -- why do you have it there in the
> first place? :-)
>
True. I actually use it in dh_generate_public_key and
dh_compute_shared_secret. I'll fix that, thanks.
Regards,
Salvatore
next prev parent reply other threads:[~2016-03-02 9:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 9:01 [PATCH] crypto: implement DH primitives under akcipher API Salvatore Benedetto
2016-02-15 13:57 ` Stephan Mueller
2016-03-01 11:08 ` Salvatore Benedetto
2016-03-01 11:17 ` Stephan Mueller
2016-03-02 9:53 ` Salvatore Benedetto [this message]
2016-03-02 13:03 ` Sandy Harris
2016-03-02 14:20 ` Stephan Mueller
2016-03-02 14:54 ` Marcel Holtmann
2016-03-02 15:09 ` Stephan Mueller
2016-02-16 20:19 ` Herbert Xu
2016-02-16 20:29 ` Tadeusz Struk
2016-03-01 20:25 ` Marcel Holtmann
2016-03-02 9:38 ` Salvatore Benedetto
2016-03-02 13:46 ` Marcel Holtmann
2016-03-07 21:45 ` Tadeusz Struk
2016-03-07 22:29 ` Marcel Holtmann
2016-03-07 23:19 ` Tadeusz Struk
2016-03-08 17:03 ` Marcel Holtmann
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=20160302095351.GB2384@sbenedet-virtual-machine \
--to=salvatore.benedetto@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=smueller@chronox.de \
--cc=tadeusz.struk@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox