Re: [PATCH 1/2] Crypto: Add SHA-3 hash algorithm

From: Stephan Mueller
Date: Thu Jun 16 2016 - 12:24:33 EST


Am Donnerstag, 16. Juni 2016, 21:39:17 schrieb Raveendra Padasalagi:

Hi Raveendra,

> I need some clarification to address your comment
>
> "Shouldn't there be a priority here?"
>
> What I know regarding priority value for an algorithm
> is higher the priority value it will be get selected for execution.
>
> For example, let's say for software implementation of the algorithm if
> priority value
> is specified as 100 and hardware driver implementation of the same
> algorithm uses
> the priority value of 300 then hardware algo is what selected for execution.
>
> I just had a look at priority value specified for other hash
> algorithm's and none of the
> software implementation specify any value, So it will be 0.
>
> I think it's okay to not to specify any priority value for software
> implementation,
> as hardware implementation can use non zero value if it needs higher
> priority.
>
> What's your opinion ?

You are fully correct.

To be in line with the other hashes, maybe let us leave it at 0. I was
thinking about "backend" ciphers that should never ever be selected (like the
Intel AES-NI examples) which should have a lower prio than any other cipher.
But then, they have unique cra_names, so it does not really matter :-)

Ciao
Stephan