Re: Implementing SHA-1, weird problem when running against test data

From: Brian Gladman (
Date: 04/21/03

From: "Brian Gladman" <>
Date: Mon, 21 Apr 2003 20:16:31 +0100

"Ken Very Big Liar" <> wrote in message
> I don't do any crypto stuff in my daily job, but I became interested in
> different hashing algorithms and am working on SHA-1. I am comparing my
> against the NIST FIPS 180-2 document and am having a weird result with the
> data "abc".

IIRC the count is a 64-bit number in big-endian form so that for 32-bit
with the hash of "abc" - count 24 - w[14] = 0x00000000 and w[15] =

So it looks like you have entered two 32-bit count values in the buffer in
the wrong order.

    Brian Gladman

Relevant Pages