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

Re: HMAC-MD5 test vectors?



Ted,

> Has anyone else tried implementing HMAC-MD5 and used the test vectors
> specified in RFC 2104 to verify their implementation?
> 
> I'm tearing my hair out, because I'm consistently getting
> 
> 		6372bd727c8a3c98f2850e7766e4148a
> 
> as the MAC for first test vector, but RFC 2104 says that the correct MAC
> should be:
> 
> 		9294727a3638bb1c13f48ef8158bfc9d

I just checked and I do get the correct MAC (as specified in the RFC) for
tests #1 and #2.  I'm using the reference implementation from the RFC atop
the NSA Cryptoki 1.0 implementation, which in turn uses RSAREF to do MD5.
Interesting that you're getting the correct MACs for tests 2 and 3 though!
Silly question, but are you sure you're giving it the right key and key
length?

-Nina
-------------------------------------------------------------------------------
Nina H. Yuan			         70 Fawcett Street; Cambridge, MA 02138
Network Security Department              (617) 873-1878; FAX (617) 873-4086
BBN Technologies, GTE Corp.              nyuan@bbn.com
-------------------------------------------------------------------------------


References: