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

HMAC-SHA test results




Hellow,

   I and Neils Anderson used the following 3 test vectors to test HMAC-SHA
   (SHA1) and get the same results. Hugo and I would like to put them in the
   upcoming HMAC RFC. Though it may be late for RFC, please check the results
   any way because it is always nice to have common test vectors.
   
   The test vectors are the same as those in HMAC-MD5 draft; except that
   the key lengths in vectors 1 and 3 are expanded to 20 bytes.
   
   My code uses big-endian conversion as specified in FIPS 180-1.


   Thank you.
   
   
Pau-Chen

-----------------------------------------------------------------------------

Set 1 :

     key =         0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
     key_len =     20 bytes
     data =        "Hi There"   (Trailing '\0' not included in test)
     data_len =    8  bytes
     digest =      0xb617318655057264e28bc0b6fb378c8ef146be00

Set 2:

     key =         "Jefe"  (Trailing '\0' not included in test)
     data =        "what do ya want for nothing?"
     data_len =    28 bytes
     digest =      0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79

Set 3 :

     key =         0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     key_len       20 bytes
     data =        0xDDDDDDDDDDDDDDDDDDDD...
                   ..DDDDDDDDDDDDDDDDDDDD...
                   ..DDDDDDDDDDDDDDDDDDDD...
                   ..DDDDDDDDDDDDDDDDDDDD...
                   ..DDDDDDDDDDDDDDDDDDDD
     data_len =    50 bytes
     digest =      0x125d7342b9ac11cd91a39af48aa17b4f63f175d3

-------------------------------------------------------------------------------