Thread (1 message) 1 message, 1 author, 2015-05-28
  • (off-list ancestor, not in this archive)
  • Re: Crypto driver -DCP · Marek Vasut <marex@denx.de> · 2015-05-28

Re: Crypto driver -DCP

From: Marek Vasut <marex@denx.de>
Date: 2015-05-28 18:27:19

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help