Re: [PATCH 5/6] crypto: img-hash - Add support for export and import

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

 



Hi Herbert,

I don't see any other drivers explicitly requesting a fallback
driver by name. Anyways, should this be done using  "sha1-generic"
in the crypto_alloc_ahash call when setting up the fallback tfm?

Thanks,
Will

On 12/07/16 08:49, Herbert Xu wrote:
> Will Thomas <will.thomas@xxxxxxxxxx> wrote:
>>
>> @@ -714,9 +740,12 @@ static struct ahash_alg img_algs[] = {
>>                .update = img_hash_update,
>>                .final = img_hash_final,
>>                .finup = img_hash_finup,
>> +               .export = img_hash_export,
>> +               .import = img_hash_import,
>>                .digest = img_hash_digest,
>>                .halg = {
>>                        .digestsize = MD5_DIGEST_SIZE,
>> +                       .statesize = sizeof(struct md5_state),
> 
> This is wrong.  The fallback state size is not guaranteed to be
> the same as the generic MD5.  I suppose the easiest fix is to
> explicitly request for md5-generic/sha1-generic/etc. when you
> allocate the fallback.
> 
> Thanks,
> 
--
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