devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: "Stephan Müller" <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
	davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, linuxarm@huawei.com,
	xuzaibo@huwei.com, fanghao11@huawei.com, liguozhu@hisilicon.com,
	wangxiongfeng2@huawei.com
Subject: Re: [PATCH 2/3] crypto: hisilicon SEC security accelerator driver
Date: Mon, 23 Jul 2018 15:33:52 +0100	[thread overview]
Message-ID: <20180723153352.000042a0@huawei.com> (raw)
In-Reply-To: <1743404.tCjS6oGqku@positron.chronox.de>

On Fri, 20 Jul 2018 20:17:22 +0200
Stephan Müller <smueller@chronox.de> wrote:

> Am Montag, 16. Juli 2018, 12:43:41 CEST schrieb Jonathan Cameron:
> 
> Hi Jonathan,
> 
> > +static int sec_alg_skcipher_setkey_aes_xts(struct crypto_skcipher *tfm,
> > +                                          const u8 *key, unsigned int
> > keylen) +{
> > +       enum sec_cipher_alg alg;
> > +
> > +       switch (keylen) {
> > +       case AES_KEYSIZE_128 * 2:
> > +               alg = SEC_C_AES_XTS_128;
> > +               break;
> > +       case AES_KEYSIZE_256 * 2:
> > +               alg = SEC_C_AES_XTS_256;
> > +               break;
> > +       default:
> > +               return -EINVAL;
> > +       }
> > +
> > +       return sec_alg_skcipher_setkey(tfm, key, keylen, alg);
> > +}  
> 
> Can you please call the function xts_check_key or xts_verify_key before 
> setting the key?
> 
Will do.

Thanks,

Jonathan

  reply	other threads:[~2018-07-23 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 10:43 [PATCH 0/3] Hisilicon SEC crypto driver (hip06 / hip07) Jonathan Cameron
2018-07-16 10:43 ` [PATCH 1/3] dt-bindings: Add bindings for Hisilicon SEC crypto accelerators Jonathan Cameron
2018-07-20 16:30   ` Rob Herring
2018-07-20 16:38     ` Jonathan Cameron
2018-07-16 10:43 ` [PATCH 2/3] crypto: hisilicon SEC security accelerator driver Jonathan Cameron
2018-07-20 18:17   ` Stephan Müller
2018-07-23 14:33     ` Jonathan Cameron [this message]
2018-07-16 10:43 ` [PATCH 3/3] arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2018-07-23 15:49 [PATCH V2 0/3] Hisilicon SEC crypto driver (hip06 / hip07) Jonathan Cameron
2018-07-23 15:49 ` [PATCH 2/3] crypto: hisilicon SEC security accelerator driver Jonathan Cameron

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=20180723153352.000042a0@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=fanghao11@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=smueller@chronox.de \
    --cc=wangxiongfeng2@huawei.com \
    --cc=xuzaibo@huwei.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;
as well as URLs for NNTP newsgroup(s).