IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: I can has SHA-1 hashes for RFC 2409/3526 MODP groups?



Henrick Hellström <henrick%streamsec.se@localhost> writes:

>The problem with calculating the hash of the internal representation, is that
>the hash will depend on the internal representation, which is prone to be
>implementation specific. Is it little endian or big endian? Is there a zero
>valued word in the most significant position or not?

I don't need the hash of the internal representation (my code does its own
integrity checking, so once it's in the internal form it's protected, at least
from random corruption), just of the byte-string representation of p as
stored/as present in the RFC.  So for example for the 2048-bit MODP group it'd
be the SHA-1 hash of, in C notation, { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2, ... 0xFF }.

Peter.




Home | Main Index | Thread Index | Old Index