From: Marek Vasut <marex@denx.de>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Cc: Jay Monkman <jay.monkman@freescale.com>, herbert@gondor.apana.org.au
Subject: Re: Crypto driver -DCP
Date: Thu, 28 May 2015 20:27:15 +0200 [thread overview]
Message-ID: <201505282027.15827.marex@denx.de> (raw)
In-Reply-To: <55673BF4.3040108@freescale.com>
On Thursday, May 28, 2015 at 06:01:56 PM, Jay Monkman wrote:
> Marek,
Hi,
note that this discussion should really happen on the linux-crypto ML.
Moving the discussion to ML.
> I have a question about the proper way to implement a feature. The DCP
> has the ability to read a key for encryption/decryption from on chip
> fuses. The current driver doesn't support this and as far as I can tell,
> there's no clean way to do that within the Linux crypto API.
>
> Do you have any suggestions on how to handle that?
>
> My best idea so far is to modify the driver so that if setkey is passed
> a key with a length of 1 byte, the driver uses the on chip key. I'm not
> sure if that would make it into the official kernel.
What about defining CRYPTO_TFM_REQ_CPU_KEY and then notifying the MXS DCP
code to pick the key from CPU by doing something like this in your code:
crypto_ablkcipher_set_flags(tfm, CRYPTO_TFM_REQ_CPU_KEY);
I _think_ this might be the way to go. Do a git grep on CRYPTO_TFM_REQ to
get some usecases on the TFM flags.
Best regards,
Marek Vasut
next parent reply other threads:[~2015-05-28 18:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <554BBD05.3050807@freescale.com>
[not found] ` <201505080220.56630.marex@denx.de>
[not found] ` <55673BF4.3040108@freescale.com>
2015-05-28 18:27 ` Marek Vasut [this message]
[not found] ` <20150529003700.GC14942@gondor.apana.org.au>
2015-05-29 0:40 ` Crypto driver -DCP Marek Vasut
2015-05-29 0:45 ` Herbert Xu
2015-05-29 1:00 ` Marek Vasut
2015-05-29 1:23 ` Herbert Xu
2015-05-29 1:29 ` Marek Vasut
2015-05-29 1:32 ` Herbert Xu
2015-05-29 13:02 ` Marek Vasut
2015-05-29 13:30 ` Herbert Xu
2015-06-01 13:24 ` Marek Vasut
2015-06-01 14:50 ` Herbert Xu
2015-06-03 12:54 ` Marek Vasut
2015-06-02 18:57 ` Jay Monkman
2015-06-03 2:11 ` Herbert Xu
2015-06-03 20:02 ` Jay Monkman
2015-06-04 3:24 ` Herbert Xu
2015-06-04 15:34 ` Marek Vasut
2015-06-05 3:54 ` Herbert Xu
2015-06-05 14:38 ` Marek Vasut
2015-06-08 4:52 ` Herbert Xu
2015-06-08 8:45 ` Marek Vasut
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=201505282027.15827.marex@denx.de \
--to=marex@denx.de \
--cc=herbert@gondor.apana.org.au \
--cc=jay.monkman@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;
as well as URLs for NNTP newsgroup(s).