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]

 



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,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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