mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalyani Akula <kalyania@xilinx.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephan Mueller <smueller@chronox.de>,
	"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sarat Chand Savitala <saratcha@xilinx.com>
Subject: RE: [RFC PATCH 4/5] crypto: Adds user space interface for ALG_SET_KEY_TYPE
Date: Thu, 11 Jul 2019 09:25:38 +0000	[thread overview]
Message-ID: <BN7PR02MB5124F4680E424C25D77D178DAFF30@BN7PR02MB5124.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20190610063501.u3q2k2vgytvknxs3@gondor.apana.org.au>

Hi Herbert,

Paes driver is using key expansion algorithm to encrypt and decrypt the plaintext. HW capability of expanding the given plain key is checked based on the provide key length. Here the HW key is the expended version of plain key.

Xilinx AES hardware has a capability to take plain keys/encrypted keys ( these keys are user programmable but for security reasons they are not readable. Only AES accelerator has read access to these keys) stored on chip ( in eFuse/BBRAM etc, ) and used for AES encryption/decryption.
Xilinx software is giving the Customer, the flexibility to choose among the different on-chip AES keys.
So, we chosen a way to add AES_SEL_HW_KEY option.

In Paes driver , The ALG_SET_KEY interface is used to distinguish between HW Vs SW expansion of plain key based on the key_len. 

How about using same interface to distinguish between the User supplied key Vs HW key selection based on key_len parameter.

Thanks
kalyani  	

> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: Monday, June 10, 2019 12:05 PM
> To: Kalyani Akula <kalyania@xilinx.com>
> Cc: Stephan Mueller <smueller@chronox.de>; keyrings@vger.kernel.org;
> davem@davemloft.net; linux-crypto@vger.kernel.org; linux-
> kernel@vger.kernel.org; Sarat Chand Savitala <saratcha@xilinx.com>
> Subject: Re: [RFC PATCH 4/5] crypto: Adds user space interface for
> ALG_SET_KEY_TYPE
> 
> On Mon, Jun 10, 2019 at 05:20:58AM +0000, Kalyani Akula wrote:
> > Ping!!
> 
> We already have existing drivers supporting hardware keys.  Please check
> out how they're handling this.  You can grep for paes under drivers/crypto.
> 
> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page:
> http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2019-07-11  9:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17  7:02 [RFC PATCH 0/5] Add Xilinx's ZynqMP AES driver support Kalyani Akula
2019-01-17  7:02 ` [RFC PATCH 1/5] dt-bindings: crypto: Add bindings for ZynqMP AES driver Kalyani Akula
2019-01-17  7:02 ` [RFC PATCH 2/5] ARM64: zynqmp: Add Xilinix AES node Kalyani Akula
2019-01-17  7:02 ` [RFC PATCH 3/5] firmware: xilinx: Add ZynqMP aes API for AES functionality Kalyani Akula
2019-01-17  7:02 ` [RFC PATCH 4/5] crypto: Adds user space interface for ALG_SET_KEY_TYPE Kalyani Akula
2019-01-17 11:34   ` Stephan Mueller
2019-04-22  9:17     ` Kalyani Akula
2019-04-24 18:30       ` Stephan Mueller
2019-05-08  9:31         ` Kalyani Akula
2019-05-24  6:50           ` Kalyani Akula
2019-05-24  7:19           ` Stephan Mueller
2019-06-10  5:20             ` Kalyani Akula
2019-06-10  6:35               ` Herbert Xu
2019-07-11  9:25                 ` Kalyani Akula [this message]
2019-07-11 11:10                   ` Herbert Xu
2019-01-17  7:02 ` [RFC PATCH 5/5] crypto: Add Xilinx AES driver Kalyani Akula
2019-01-17 10:33   ` Corentin Labbe

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=BN7PR02MB5124F4680E424C25D77D178DAFF30@BN7PR02MB5124.namprd02.prod.outlook.com \
    --to=kalyania@xilinx.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saratcha@xilinx.com \
    --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

all inboxes | Powered by JetHome®