29 Aug 23:15
http://cr.yp.to/sigs/h0.html?
Matthew Dempsky <mrd <at> alkemio.org>
2005-08-29 21:15:08 GMT
2005-08-29 21:15:08 GMT
Following the description on http://cr.yp.to/sigs/h0.html, I wrote a routine to expand a SHA-1 hash into a 1536-bit hash (the complete source code is attached): static void expand_h (uint32_t h[48]) { int i; for (i = 5; i < 48; ++i) h[i] = h[i-5] + ((h[i-2] + s[i]) ^ ROT (h[i-1], 5)); } When I use this routine to expand the 5 test cases following the description, none of them fully coincide. The first and third columns match one value, the second and fourth columns match two values, and the fifth column matches a whopping six values. Are the test cases bogus, or did I misunderstand the hash expand function? -- -- Matthew Dempsky <mrd <at> alkemio.org>
RSS Feed