Re: [PATCH] to fix vmac test fails on s390

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

 



On Thu, Feb 11, 2010 at 11:18:08AM +0800, Wang, Shane wrote:
>
>  static struct hash_testvec aes_vmac128_tv_template[] = {
>  	{
> +		.key	= "\x00\x01\x02\x03\x04\x05\x06\x07"
> +			  "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
> +		.plaintext = NULL,
> +#ifdef __LITTLE_ENDIAN
> +		.digest	= "\x07\x58\x80\x35\x77\xa4\x7b\x54",
> +#else
> +		.digest = "\x54\x7b\xa4\x77\x35\x80\x58\x07",
> +#endif
> +		.psize	= 0,
> +		.ksize	= 16,
> +	}, {

Sorry but you can't fix it like this.  Your hash output must be
invariant with respect to endianness.

That means, whether I run it on a big-endian machine or a little-
endian one it should produce the same output.

Otherwise this hash will be totally useless as soon as you get
onto the network.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <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