Big Endian problem for ixp435 found.

Jouni Malinen jkmaline at cc.hut.fi
Fri Sep 24 22:16:06 EDT 2004


On Fri, Sep 24, 2004 at 12:30:34PM +0200, Gunter Burchardt wrote:

> Yes it is a alingment problem in SHA1Transform(). 
> 
>         static unsigned char workspace[64];
>         block = (CHAR64LONG16 *) workspace;
> 
> workspace[64] is NOT aligned at a 4 byte address. if you cast this to
> block (u32 l[16]) it gets problem with alignment!
> 
>         static u32 workspace[16];
>         block = (CHAR64LONG16 *) workspace;
> 
> Workspace is alligned at a 4 byte address. This works for me!

Thanks! The toolchain I used had 32-bit aligned workspace which explains
why this did not happen in my tests. I managed to reproduce this now by
adding one-byte static variable before workspace. The fix is now in CVS.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list