linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] crypto: (ec)dh - add privkey generation support
@ 2017-05-17 15:26 Tudor Ambarus
  2017-05-17 15:26 ` [RFC PATCH v2 1/4] crypto: ecc " Tudor Ambarus
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Tudor Ambarus @ 2017-05-17 15:26 UTC (permalink / raw)
  To: herbert, davem
  Cc: linux-crypto, smueller, marcel, Nicolas.Ferre, Tudor Ambarus

Hi,

This is an RFC to discuss how to support private key generation for dh and ecdh.

This is helpful in a user-space to kernel (ec)dh offload because the keys are
generated in kernel and never revealed to user-space.

Private key generation is also helpful to implement forward secrecy.
A public/private key system demonstrates the property of forward secrecy if it
creates new key pairs for each communication session. These key pairs are
generated on an as-needed basis and are destroyed after the session is over.
If an attacker were to record previous encrypted session data, they wouldn't be
able to decrypt it with possession of a long-term key.

There are crypto accelerators that are capable of generating and retaining
private keys without revealing them to software. This patch set is a
prerequisite for hardware private key generation support.

Changes in v2:
 - free dh params in case of error
 - code defensively in testmgr: use sizeof(*ptr) while in memcpy

v1 can be found at:
http://www.mail-archive.com/linux-crypto@vger.kernel.org/msg25176.html

Tudor Ambarus (4):
  crypto: ecc - add privkey generation support
  crypto: ecdh - allow user to provide NULL privkey
  crypto: dh - allow user to provide NULL privkey
  crypto: testmgr - add genkey kpp test

 crypto/dh.c      |  21 ++++++++
 crypto/ecc.c     |  20 +++++++
 crypto/ecc.h     |  14 +++++
 crypto/ecdh.c    |   4 ++
 crypto/testmgr.c |  76 +++++++++++++++++++++++----
 crypto/testmgr.h | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 279 insertions(+), 11 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-05-29 13:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17 15:26 [RFC PATCH v2 0/4] crypto: (ec)dh - add privkey generation support Tudor Ambarus
2017-05-17 15:26 ` [RFC PATCH v2 1/4] crypto: ecc " Tudor Ambarus
2017-05-28 18:44   ` Stephan Müller
2017-05-29  9:08     ` Tudor Ambarus
2017-05-29  9:23       ` Stephan Müller
2017-05-29  9:47         ` Tudor Ambarus
2017-05-29  9:56           ` Stephan Müller
2017-05-29 13:27             ` Tudor Ambarus
2017-05-17 15:26 ` [RFC PATCH v2 2/4] crypto: ecdh - allow user to provide NULL privkey Tudor Ambarus
2017-05-17 15:26 ` [RFC PATCH v2 3/4] crypto: dh " Tudor Ambarus
2017-05-28 18:50   ` Stephan Müller
2017-05-17 15:26 ` [RFC PATCH v2 4/4] crypto: testmgr - add genkey kpp test Tudor Ambarus
2017-05-26 13:44   ` Tudor Ambarus
2017-05-28 18:57   ` Stephan Müller

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).