> I think that there is a bug in SHA-256 implementation.
>  
> I have tried to compile least Openssl of 0.9.8 branch  - 0.9.8u
> but make test failed on SHA-256 test.
>  
> ../util/shlib_wrap.sh ./shatest
> test 1 ok
> test 2 ok
> test 3 ok
> ../util/shlib_wrap.sh ./sha1test
> test 1 ok
> test 2 ok
> test 3 ok
> ../util/shlib_wrap.sh ./sha256t
> Testing SHA-256
> TEST 1 of 3 failed.
> make[1]: *** [test_sha] Error 1
>  
>  
> I also notice that previous version of OpenSSL also calculate wrong SHA-256 
> hash of data.
> Compared to little endian machines where the hash is correct.

What exactly do you mean by that? Code is maintained and was observed to
work correctly on either endian system. There are two possibilities:
system is not believed endianness or compiler is buggy. If first was
case, then even SHA1 test would fail too, so the failure sounds more
like compiler bug. Try to drop optimization level: edit Makefile in text
editor and replace -O3 with -O0, remove crypto/sha/sha256.o and 'make'.
This, dropping optimization level, is suggested in README.

> Platform is Renesas SH3E in BIG-endian mode
> ( used compiler sh3eb-linux-gcc)


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to