Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Stephan Mueller <smueller@chronox.de>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v8 0/4] crypto: add algif_akcipher user space API
Date: Wed, 30 Aug 2017 14:36:24 +0200	[thread overview]
Message-ID: <1FC3B363-BC00-4DBB-B51B-48CFEDF45DD6@holtmann.org> (raw)
In-Reply-To: <e0f2d10e-ed0f-6ab8-59d8-c4296a7c678f@microchip.com>

Hi Tudor,

>> you still need to get the public key out of the kernel if you want to use it from user space. Or feed the remote public key if you plan to use some sort of key derivation function.
> 
> The crypto hardware that I'm working on, generates the private key
> internally within the device and never reveals it to software and
> immediately returns the public key pair. The user can retrieve the
> public key from hardware.

and don’t we want some sort of access control here. Only the user / process that requested the private key and has access to the public key is allowed to keep using the private key?

>> I am saying this again, if you only have a hammer, everything looks like a nail. What about actually looking at how this would be used from user space in real crypto cases.
>> My point is that the usages here are key generation, some sort of key-exchange-agreement (aka DH) and key derivation into a symmetric key. Frankly the focus with asymmetric ciphers are the keys and the key derivation. They are not encryption and decryption of massive amounts of data.
> 
> The hardware uses it's own private key and the public key received from
> the other end and computes the ecdh shared secret. The hardware computed
> shared secret can then be used for key derivation.

And that is normally the case. Get your local public key, send it to the other side, get the other sides public key, give it to the hardware and get shared secret.

So how is AF_ALG a good fit here?

Regards

Marcel

  reply	other threads:[~2017-08-30 12:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10  6:39 [PATCH v8 0/4] crypto: add algif_akcipher user space API Stephan Müller
2017-08-10  6:39 ` [PATCH v8 1/4] crypto: AF_ALG -- add sign/verify API Stephan Müller
2017-08-10 12:49   ` Tudor Ambarus
2017-08-10 13:03     ` Stephan Mueller
2017-08-10 13:59       ` Tudor Ambarus
2017-08-10 14:06         ` Stephan Müller
2017-08-10  6:39 ` [PATCH v8 2/4] crypto: AF_ALG -- add setpubkey setsockopt call Stephan Müller
2017-08-10  6:40 ` [PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher Stephan Müller
2017-08-11 12:51   ` Tudor Ambarus
2017-08-19 13:53     ` Stephan Müller
2017-08-21  8:55       ` Tudor Ambarus
2017-08-21  9:23         ` Tudor Ambarus
2017-08-21  9:39           ` Stephan Mueller
2017-08-10  6:40 ` [PATCH v8 4/4] crypto: algif_akcipher - enable compilation Stephan Müller
2017-08-11 12:56   ` Tudor Ambarus
2017-08-11 13:03     ` Stephan Mueller
2017-08-11  0:48 ` [PATCH v8 0/4] crypto: add algif_akcipher user space API Mat Martineau
2017-08-11  5:13   ` Marcel Holtmann
2017-08-11  6:30     ` Stephan Müller
2017-08-11 16:02       ` Marcel Holtmann
2017-08-14  6:24         ` Stephan Mueller
2017-08-14  6:42           ` Marcel Holtmann
2017-08-11  7:18   ` Stephan Mueller
2017-08-11 16:05     ` Marcel Holtmann
2017-08-13  8:52       ` Gilad Ben-Yossef
2017-08-14  6:01         ` Stephan Mueller
2017-08-17 13:17       ` Tudor Ambarus
2017-08-30  6:15         ` Tudor Ambarus
2017-08-30  7:21           ` Marcel Holtmann
2017-08-30  8:17             ` Tudor Ambarus
2017-08-30 12:36               ` Marcel Holtmann [this message]
2017-08-11 10:18   ` Andrew Zaborowski
2017-08-11 19:43     ` Mat Martineau
2017-08-14  6:03       ` Stephan Mueller
2017-08-14  6:26         ` Marcel Holtmann
2017-08-14  7:23           ` Stephan Mueller
2017-08-14  9:26             ` Marcel Holtmann
2017-10-02 14:15 ` Tudor Ambarus
2017-10-03  0:09   ` Mat Martineau

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=1FC3B363-BC00-4DBB-B51B-48CFEDF45DD6@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=smueller@chronox.de \
    --cc=tudor.ambarus@microchip.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