Subject: Maximum length in octets of messages that can be hashed

From: "Maxim Masiutin" <[email-masked]>
Date: Thu, 5 Mar 2009 15:14:02 +0200

Hello Ietf-Smime,

  Secion 3.6.1 of "SEC 1: Elliptic Curve Cryptography" http://www.secg.org/download/aid-385/sec1_final.pdf defines

"hashmaxlen" as "the maximum length in octets of messages that can be hashed using Hash".

  Where can I find the maximum lenght of message for SHA-1, SHA-224(etc). I've searched through fip180-1 and didn't find any limitation. ANSI-X9.63 also imposes the limitation. Why then the authors ANSI-X9.63 did define the hashmaxlen limitation if there is no such limitation practically?

-- 
Best regards,
Maxim Masiutin                          mailto:[email-masked]

---

From: Russ Housley <[email-masked]>
Date: Thu, 05 Mar 2009 10:52:49 -0500

Look at the message padding section of the SHA-1 algorithm 
specification.  The length of the "original message" is encoded in 
the padding.  The technique places an upper bound on the number of 
bits that can be hashed.

Russ

At 08:14 AM 3/5/2009, Maxim Masiutin wrote:

>Hello Ietf-Smime,
>
>   Secion 3.6.1 of "SEC 1: Elliptic Curve Cryptography" 
> http://www.secg.org/download/aid-385/sec1_final.pdf defines
>
>   Where can I find the maximum lenght of message for SHA-1, 
> SHA-224(etc). I've searched through fip180-1 and didn't find any 
> limitation. ANSI-X9.63 also imposes the limitation. Why then the 
> authors ANSI-X9.63 did define the hashmaxlen limitation if there is 
> no such limitation practically?
>
>--
>Best regards,

---

From: "Maxim Masiutin" <[email-masked]>
Date: Thu, 5 Mar 2009 23:09:37 +0200

Hello Russ,

Thank you very much FIP 180-2 gives a clarification: "When a message of any length < 2^64 bits (for SHA-1 and SHA-256) or < 2^128 bits (for SHA-384 and SHA-512) is input to an algorithm, the result is an output called a message digest.

-- 
Best regards,
Maxim Masiutin                     
Ritlabs SRL
http://www.ritlabs.com/