Re: Crypto driver -DCP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux