Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
To: "Horia Geantă" <horia.geanta@freescale.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: Asymmetric cryptography HW offloading
Date: Mon, 23 Sep 2013 15:28:14 +0200	[thread overview]
Message-ID: <524041EE.5070209@gnutls.org> (raw)
In-Reply-To: <524034A1.70204@freescale.com>

On 09/23/2013 02:31 PM, Horia Geantă wrote:
> Hi,
> 
> CAAM crypto engine (drivers/crypto/caam/*) is capable of asymmetric
> operations, like: modular exponentiation, RSA
> sign/verify/encrypt/decrypt, (EC)DSA sign etc.
> I would appreciate some design guidelines on how to harness these
> capabilities, for crypto engines in general.
> 
> 1. In-kernel interface for asymmetric crypto
> Should crypto/asymmetric_keys/* be used, i.e. appended with modular
> exponentiation, other asymmetric operations? 

The BSD's cryptodev supports the following operations which may help in
that aspect (no elliptic curve operations present). I don't know if all
of them worth the context switch.

#define CRK_MOD_EXP		0
#define CRK_MOD_EXP_CRT		1
#define CRK_DSA_SIGN		2
#define CRK_DSA_VERIFY		3
#define CRK_DH_COMPUTE_KEY	4
#define CRK_MOD_ADD		5
#define CRK_MOD_ADDINV		6
#define CRK_MOD_SUB		7
#define CRK_MOD_MULT		8
#define CRK_MOD_MULTINV		9
#define CRK_MOD			10

> 2. User space interface
> Should AF_ALG be expanded to provide access to this new asymmetric cypto
> API? The API would allow user space applications to offload PKC operations in
> HW.

I'd be interested into adding this support into cryptodev-linux once
present in kernel.

regards,
Nikos

  reply	other threads:[~2013-09-23 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23 12:31 Asymmetric cryptography HW offloading Horia Geantă
2013-09-23 13:28 ` Nikos Mavrogiannopoulos [this message]
2013-09-27 10:58   ` Horia Geantă
2013-09-29 17:50     ` Nikos Mavrogiannopoulos

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=524041EE.5070209@gnutls.org \
    --to=nmav@gnutls.org \
    --cc=horia.geanta@freescale.com \
    --cc=linux-crypto@vger.kernel.org \
    /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