linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API
       [not found] <20170511003557.3467-1-mathew.j.martineau@linux.intel.com>
@ 2017-06-02 15:58 ` David Howells
  2017-06-04 15:38   ` Stephan Müller
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Howells @ 2017-06-02 15:58 UTC (permalink / raw)
  To: linux-security-module

Mat Martineau <mathew.j.martineau@linux.intel.com> wrote:

> The initial Diffie-Hellman computation made direct use of the MPI
> library because the crypto module did not support DH at the time. Now
> that KPP is implemented, KEYCTL_DH_COMPUTE should use it to get rid of
> duplicate code and leverage possible hardware acceleration.

This doesn't apply to linus/master.  I've pushed the keyrings fix patches I
have, including a bunch from Eric Biggers that fix DH stuff, to:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git

branch:

	keys-fixes

though I think there may be a couple of bugs in on of Eric's patches where
he's assumed that he can do:

	memzero_explicit(NULL, 0);

I'm not sure whether it's permissible to assume that memset(NULL, 0, 0) is
guaranteed to work correctly.

Note that I haven't included Eric's DH patch that was obsoleted by Stephan's
patch that was obsoleted by this one.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API
  2017-06-02 15:58 ` [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API David Howells
@ 2017-06-04 15:38   ` Stephan Müller
  2017-06-05 10:03   ` David Howells
  2017-06-06  0:33   ` Mat Martineau
  2 siblings, 0 replies; 4+ messages in thread
From: Stephan Müller @ 2017-06-04 15:38 UTC (permalink / raw)
  To: linux-security-module

Am Freitag, 2. Juni 2017, 17:58:22 CEST schrieb David Howells:

Hi David,

> Note that I haven't included Eric's DH patch that was obsoleted by Stephan's
> patch that was obsoleted by this one.

Eric's patches 1, 2, 4, and 5 should be pulled as they are unrelated to any 
other patch. Eric's patch 3 should be disregarded, my patch in response to 
Eric's patch 3 should be disregarded, and this patch from Mat should be used.

Thanks a lot.

Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API
  2017-06-02 15:58 ` [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API David Howells
  2017-06-04 15:38   ` Stephan Müller
@ 2017-06-05 10:03   ` David Howells
  2017-06-06  0:33   ` Mat Martineau
  2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2017-06-05 10:03 UTC (permalink / raw)
  To: linux-security-module

Stephan M?ller <smueller@chronox.de> wrote:

> > Note that I haven't included Eric's DH patch that was obsoleted by Stephan's
> > patch that was obsoleted by this one.
> 
> Eric's patches 1, 2, 4, and 5 should be pulled as they are unrelated to any 
> other patch. Eric's patch 3 should be disregarded, my patch in response to 
> Eric's patch 3 should be disregarded, and this patch from Mat should be used.

Indeed.  But Mat's patch doesn't apply.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API
  2017-06-02 15:58 ` [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API David Howells
  2017-06-04 15:38   ` Stephan Müller
  2017-06-05 10:03   ` David Howells
@ 2017-06-06  0:33   ` Mat Martineau
  2 siblings, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2017-06-06  0:33 UTC (permalink / raw)
  To: linux-security-module


Hi David -

On Fri, 2 Jun 2017, David Howells wrote:

> Mat Martineau <mathew.j.martineau@linux.intel.com> wrote:
>
>> The initial Diffie-Hellman computation made direct use of the MPI
>> library because the crypto module did not support DH at the time. Now
>> that KPP is implemented, KEYCTL_DH_COMPUTE should use it to get rid of
>> duplicate code and leverage possible hardware acceleration.
>
> This doesn't apply to linus/master.

It was on top of keys-next, for what it's worth.

> I've pushed the keyrings fix patches I
> have, including a bunch from Eric Biggers that fix DH stuff, to:
>
> 	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
>
> branch:
>
> 	keys-fixes

I'll post a v3 that applies to keys-fixes right after I send this email.

>
> though I think there may be a couple of bugs in on of Eric's patches where
> he's assumed that he can do:
>
> 	memzero_explicit(NULL, 0);
>
> I'm not sure whether it's permissible to assume that memset(NULL, 0, 0) is
> guaranteed to work correctly.

I'm still working on unit test coverage to confirm correct behavior of KDF 
when the DH shared secret has leading zeros. Stephan, have you found any 
such tests (last time I asked you were still looking)? If I see 
inconsistent results when I make up a vector (choosing inputs that result 
in a 0x01 shared secret), I'm not sure if the old or new answer is 
correct.

> Note that I haven't included Eric's DH patch that was obsoleted by Stephan's
> patch that was obsoleted by this one.

Thanks,

--
Mat Martineau
Intel OTC
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-06  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170511003557.3467-1-mathew.j.martineau@linux.intel.com>
2017-06-02 15:58 ` [PATCH v2] KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API David Howells
2017-06-04 15:38   ` Stephan Müller
2017-06-05 10:03   ` David Howells
2017-06-06  0:33   ` Mat Martineau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).