(racoon 746) Re: Endian-ness in sha1.c?

[email protected] (Jun-ichiro itojun Hagino) Fri, 17 Sep 2004 09:44:10 +0900 (JST)
Newsgroups gmane.network.ipv6.kame.racoon
Message-ID <[email protected]>
> Hello all and Jun-ichiro itojun Itoh,
> 
> Still trying to resolve an inter-op problem for SHA1 when using RACOON
> between a little-endian (Pentium) machine and a big-endian (PowerPC)
> machine. It works for MD5.
> 
> Looking at the SHA1 code (sha1.c), I see this line in sha1_step(),
> #if BYTE_ORDER == LITTLE_ENDIAN and in that routine at least,
> nothing for BIG_ENDIAN, so I am assuming that the default case always
> works for BIG_ENDIAN and fixes need to be done only for LITTLE_E.
> 
> Is this assumption right? Does anybody have any suggestions about
> the sha1 code and it's ability to deal with both the endian-s?

	your understanding is correct, sha1_step() needs special care for
	little endian only.

itojun