From: Tadeusz Struk <tadeusz.struk@intel.com>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org
Subject: Re: akcipher use
Date: Thu, 25 Jun 2015 12:19:32 -0700 [thread overview]
Message-ID: <558C5444.4000105@intel.com> (raw)
In-Reply-To: <1708764.x5PFhLSanv@tauon.atsec.com>
On 06/25/2015 04:58 AM, Stephan Mueller wrote:
> Hi Tadeusz,
>
> I do have a few questions around the akcipher API.
>
> The API offers access to the raw asym encryption and decryption operations.
>
> The "normal" use of asym ciphers is the hybrid mode. That opens the following
> questions:
>
> - how would a hardware implementation offering only a hybrid asym cipher
> implementation (i.e. a full signature mechanism or bulk data encryption
> mechanism) be usable via that API?
Usually the HW offers acceleration for encryption primitives.
To support the encryption schemes we can introduce templates for instance
pkcs1_v15(rsa) or oaep(rsa) as it was proposed by Horia Geanta.
>
> - currently I only see one user in the kernel for asym ciphers: the module
> signing mechanism. Do you expect more to come? Or am I missing others?
>
> - If no, then it sounds like that the akcipher API is a means to make asym
> ciphers implemented in hardware and only accessible from supervisor state
> available. I would assume that the majority of the users that may be
> interested in that kind of support resides in user space. Is the intention to
> develop an AF_ALG interface (note, I personally already thought about that
> subject for some time now)?
Yes, that's the main use case for this. We want to be able to accelerate SSL
handshakes.
>
> - If user space shall also be able to use akcipher, how do you think that
> should be handled in general? Should user space simply have access to the raw
> asym ciphers and use that together with the hashes/sym ciphers to implement
> the hybrid system? Or shall the kernel interface extend the skcipher/hash
> interface with an akcipher wrapper for the hybrid system? I am currently not
> sure which is better considering:
>
> - raw asym interface: pro: lean, most flexible; con: user land must
> know of sym key (i.e. it is located in two places), potentially more round
> trips between kernel/user land
>
> - hybrid cipher interface: just take the opposite of the raw asym
> interface
>
> - If the hybrid system is intended to be implemented in the kernel, would then
> the ton of different padding schemes need to be implemented in the kernel side
> or should user space do the padding? I would think they could stay in user
> land (provided that there is no kernel space user).
Ideally or the padding and hashing should be done by user space and only the expensive
operations like modular exponentiation should be offloaded to HW via PF_ALG and akcipher.
regards,
T
next prev parent reply other threads:[~2015-06-25 19:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 11:58 akcipher use Stephan Mueller
2015-06-25 19:19 ` Tadeusz Struk [this message]
2015-06-27 16:25 ` Stephan Mueller
2015-06-27 17:00 ` Tadeusz Struk
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=558C5444.4000105@intel.com \
--to=tadeusz.struk@intel.com \
--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 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).