Re: Help - I'm at wit's end...
From: John Savard (jsavard_at_excxn.aNOSPAMb.cdn.invalid)
Date: 12/31/04
- Next message: John Savard: "Re: Help - I'm at wit's end..."
- Previous message: Wannabee: "Re: Nokia Corporation with the government of Finland spying on other international businesses illegally in Finland .. they do not want to lose half of their budget"
- In reply to: Don Bruder: "Help - I'm at wit's end..."
- Next in thread: John Savard: "Re: Help - I'm at wit's end..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 31 Dec 2004 07:14:15 GMT
On Wed, 29 Dec 2004 21:14:31 GMT, Don Bruder <dakidd@sonic.net> wrote,
in part:
>for any data
>block ("message") whose expected hash contains the value 0x0D or 0x0A, I
>get an "almost-correct" hash. "Almost-correct" in that anyplace the byte
>0x0D appears in the "expected" hash value, I find the byte 0x0A in the
>calculated hash, and anyplace that the byte 0x0A is expected, the
>calculated hash has a 0x0D byte, with all other bytes of the calculated
>hash matching the expected hash perfectly.
Clearly, if, say, 0x0D and 0x0A were swapped in the input, you would get
a hash that was _completely_ scrambled.
So their *presence* in the input is triggering their being swapped in
the output.
This is _not_ something that could be triggered by a programming bug in
a SHA implementation. Test your code in a "non-real-world" situation
where the inputs and outputs are supplied in hexadecimal.
I think what's happening is something to do with the input and output
bit streams not being open as binary. 0x0D is binary for carriage
return, 0x0A is binary for line feed.
John Savard
http://home.ecn.ab.ca/~jsavard/index.html
- Next message: John Savard: "Re: Help - I'm at wit's end..."
- Previous message: Wannabee: "Re: Nokia Corporation with the government of Finland spying on other international businesses illegally in Finland .. they do not want to lose half of their budget"
- In reply to: Don Bruder: "Help - I'm at wit's end..."
- Next in thread: John Savard: "Re: Help - I'm at wit's end..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]