Big Endian problem for ixp435 found.

Jouni Malinen jkmaline at cc.hut.fi
Thu Sep 23 22:04:35 EDT 2004


On Thu, Sep 23, 2004 at 03:45:28PM +0200, Gunter Burchardt wrote:

> One of my college found the problem with bigendian by spending hours of
> patching hostapd and reading hexdumps. The problem is in sha1.c in
> function SHA1Init() u32 initialisation is used which causes endianess
> problem if you read with u8 or u16 pointers.
> 
> Perhaps you use kernel cryto engine with 2.6 which hasn't this issue.

That's confusing.. Could you please give me a bit more detailed
explanation? Did you try running the SHA-1 tests that I mentioned? If
SHA1Init() does not work at all on the board, those should fail..
However, interestingly, I cannot reproduce this on the ixp425 board I
used in testing. Kernel crypto code is not used at all in hostapd..

As far as I know, sha1.c works on both little and big endian systems.
SHA1Init() is only using 32-bit variables. Which functions do you mean
with u8/u16 pointers? There are no u16 processing in sha1.c and u8 is
used only in arguments to memcpy()..

In addition, I would expect context to always be alligned properly,
since it is only used as a local variable in functions within sha1.c.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list