Re: Crypto driver -DCP

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

 



On Friday, June 05, 2015 at 05:54:33 AM, Herbert Xu wrote:
> On Thu, Jun 04, 2015 at 05:34:39PM +0200, Marek Vasut wrote:
> > Is this really a valid way to go about crypto -- introduce all kinds
> > of obscure nuances into the API which are driver specific at best ?
> 
> So what do you suggest?

Well what about extending the API ?

Since Jay seems to be looking at the keyslots as well, it might make sense
to consider the "DCP key" as a special case of a "fixed" keyslot.

In general, it would probably make sense to add a flag to .setkey() to
store the key in a keyslot. The keyslot allocation would be up to the
driver. In case all keyslots would be full, the setkey() with the flag
set would simply fail. This would imply you would need to have a counterpart
function to .setkey() to free keyslots -- something like .unsetkey() .

The .setkey() could also be extended with one more argument, integer one,
to let users select which fixed keyslot to load the key from. Wouldn't
that resolve the issue with multiple fixed keyslots too ?

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