Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Tadeusz Struk <tadeusz.struk@intel.com>, linux-crypto@vger.kernel.org
Subject: Re: akcipher: continuous memory for input/output
Date: Wed, 08 Jul 2015 17:54:35 +0200	[thread overview]
Message-ID: <3241575.xDOc5hzFrC@tauon.atsec.com> (raw)
In-Reply-To: <20150708152932.GA23750@gondor.apana.org.au>

Am Mittwoch, 8. Juli 2015, 23:29:32 schrieb Herbert Xu:

Hi Herbert,

>On Wed, Jul 08, 2015 at 05:27:15PM +0200, Stephan Mueller wrote:
>> But according to Tadeusz it may be viable to register hybrid asym ciphers
>> with the akcipher API. If there is a full blown hybrid asym cipher we have
>> to handle potentially large chunks of data. I am now wondering whether a
>> flat buffer still makes sense or whether the akcipher should be converted
>> to scatter lists as all the other cipher types.
>> 
>> If it shall stay as is, how would we be handling larger buffers?
>
>What is a hybrid cipher and why would we want to have it in the
>kernel?

Please consider the thread from June 25 between Tadeusz and me. With hybrid 
cipher, I am referring to the asym + sym cipher combo to implement a "real" 
complete asymmetric encryption/decryption. Or I am referring to the asym + 
hash combo to implement a "real" signature generation/verification.

Tadeusz' rsa.c implements the raw RSA modular exponentiation operation. But 
that does not make a usable encryption or signature operation. For example, 
the kernel module signature verification illustrates that very nicely:

mod_verify_sig():
...
	/* hash the code */
        pks = mod_make_digest(ms.hash, mod, modlen);
...
	/* RSA verify the hash */
	ret = verify_signature(key, pks);

What I am wondering is that whether such hybrid operation (hash+asym or 
sym+asym) may be entirely implemented in hardware. If you tell me that this 
will never be the case, I will stop asking and would be happy with the plain 
buffer. :-)

But IIRC, there are systems out there which perform a full hybrid asym 
operation. Without having checked in detail, I believe this is true for IBM 
cryptoexpress or Cavium cards.


The reason for having it in the kernel is what Tadeusz describes: the kernel 
does not need asym operations. But the hardware is only accessible from kernel 
space. With this, the kernel crypto API together with a yet to be written 
AF_ALG akcipher would make the asym hardware available to user space.

Ciao
Stephan

  reply	other threads:[~2015-07-08 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 15:27 akcipher: continuous memory for input/output Stephan Mueller
2015-07-08 15:29 ` Herbert Xu
2015-07-08 15:54   ` Stephan Mueller [this message]
2015-07-10 13:36     ` Herbert Xu

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=3241575.xDOc5hzFrC@tauon.atsec.com \
    --to=smueller@chronox.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --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