Re: SHA1_Update() produces wrong results for large buffers

2006-01-10 Thread Pavel Gorshkov
On Tue, Jan 10, 2006 at 02:10:33PM +1100, Peter Jeremy wrote: > I get this on 7-current as well. Copying the relevant bits from libmd > and compiling it myself, I get the same behaviour. The fact that this > exits virtually instantly strongly suggests that it is broken (rather > than the shared v

Re: SHA1_Update() produces wrong results for large buffers

2006-01-09 Thread Peter Jeremy
On Tue, 2006-Jan-10 02:59:53 +0300, Pavel Gorshkov wrote: >The problem is that the asm-optimized version fails on large input >buffers. Attached is a test program, which mmaps a file and then >just feeds its contents to SHA1_Update(): "openssl sha1" agrees with the shared version on -current. >

Re: SHA1_Update() produces wrong results for large buffers

2006-01-09 Thread Simon Barner
Pavel Gorshkov wrote: > ./sha1test.md-static test-1G > 0d6ee6083bf8b6368cb80d323e82164e5540e296 > # ^^^ WRONG > # OK > ./sha1test.md-shared test-1G > 2a492f15396a6768bcbca016993f4b4c8b0b5307 Values confirmed for 6.0-STABLE with CFLAGS="-O -pipe". -- Best regards / Viele G

Re: SHA1_Update() produces wrong results for large buffers

2006-01-09 Thread Simon Barner
Pavel Gorshkov wrote: > Everything was tested on a RELENG_6/i386 box (CFLAGS = -O2). How exactly do you know, that the static version is wrong, and not vice-vera (e.g. caused by the -O2 optimization)? -- Best regards / Viele Grüße, [EMAIL PROTECTED] Simon Barner

SHA1_Update() produces wrong results for large buffers

2006-01-09 Thread Pavel Gorshkov
An important detail to begin with is that our libmd.a, as opposed to libmd.so, provides a faster, assembly-optimized version of the `SHA1_Update' function (it is not compatible with PIC and is therefore not used in libmd.so). The problem is that the asm-optimized version fails on large input buffe