Subject: Key length for HMAC-MD5

From: "Ron Hoffman" <[email-masked]>
Date: Thu, 21 Mar 2002 13:48:07 -0500

I have another question about the LIPKEY/SPKM-3 implementation.

RFC 2847 doesn't specify the key length for the HMAC-MD5 algorithm.  Per
RFC 2104, the key length should be between L (the digest size) and B
(the block size).  The RFC also indicates that key lengths greater than
L don't enhance security unless the keys are not randomly chosen.  Since
we will be using the Diffie-Hellman secret value (minus the first byte
per RFC 2025) for the context key, I think we can consider the keys to
be randomly chosen.  So I'm going to set the key size to the digest size
(which is 16 bytes for MD5).

The algorithm identifier definition in RFC 2847 doesn't include an
algorithm parameter, so everybody will need to agree on the key length.
An alternative would be to add an algorithm parameter to specify the key
size (as is done for the CAST5-CBC algorithm identifier).  In fact, I
think that is what I will do - add an INTEGER parameter to the HMAC-MD5
algorithm identifier to specify the key size in bits with a default
value of 128 bits (16 bytes).

Ron Hoffman ([email-masked])

---

From: RJ Atkinson <[email-masked]>
Date: Thu, 21 Mar 2002 14:30:18 -0500

> value of 128 bits (16 bytes).

	At first blush, the above seems plausible.

Ran