HMAC_MD5.txt at [4cc32676a2]

File tests/test_vectors/MAC/HMAC_MD5.txt artifact 28320e2e15 part of check-in 4cc32676a2


# HMAC-MD5
# From RFC 2104 HMAC
# and RFC 2202 Test Cases for HMAC-MD5 and HMAC-SHA-1

[b = 64]
[L = 16]

# RFC 2104 Test Case 1
Klen = 16
Tlen = 16
Len = 8
Key = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
Msg = "Hi There"
Mac = 9294727a3638bb1c13f48ef8158bfc9d

# RFC 2104 Test Case 2
Klen = 4
Tlen = 16
Len = 28
Key = "Jefe"
Msg = "what do ya want for nothing?"
#Msg = 7768617420646f2079612077616e7420666f72206e6f7468696e673f
Mac = 750c783e6ab0b503eaa86e310a5db738

# RFC 2104 Test Case 3
Klen = 16
Tlen = 16
Len = 50
Key = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Msg = dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
Mac = 56be34521d144c88dbb8c733f0e8b3f6

# RFC 2202 Test Case 1
Klen = 16
Tlen = 16
Len = 8
Key = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
Msg = "Hi There"
#Msg = 4869205468657265
Mac = 9294727a3638bb1c13f48ef8158bfc9d

# RFC 2202 Test Case 2
Klen = 4
Tlen = 16
Len = 28
Key = "Jefe"
#Key = 4a656665
Msg = "what do ya want for nothing?"
#Msg = 7768617420646f2079612077616e7420666f72206e6f7468696e673f
Mac = 750c783e6ab0b503eaa86e310a5db738

# RFC 2202 Test Case 3
Klen = 16
Tlen = 16
Len = 50
Key = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Msg = dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
Mac = 56be34521d144c88dbb8c733f0e8b3f6

# RFC 2202 Test Case 4
Klen = 25
Tlen = 16
Len = 50
Key = 0102030405060708090a0b0c0d0e0f10111213141516171819
Msg = cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd
Mac = 697eaf0aca3a3aea3a75164746ffaa79

# RFC 2202 Test Case 5
Klen = 16
Tlen = 12
Len = 20
Key = 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
Msg = "Test With Truncation"
#Msg = 546573742057697468205472756e636174696f6e
Mac = 56461ef2342edc00f9bab995690efd4c
Trunc = 56461ef2342edc00f9bab995

# RFC 2202 Test Case 6
Klen = 80
Tlen = 16
Len = 432
Key = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Msg = "Test Using Larger Than Block-Size Key - Hash Key First"
#Msg = 54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374
Mac = 6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd

# RFC 2202 Test Case 7
Klen = 80
Tlen = 16
Len = 73
Key = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Msg = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"
#Msg = 54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b657920616e64204c6172676572205468616e204f6e6520426c6f636b2d53697a652044617461
Mac = 6f630fad67cda0ee1fb1f562db3aa53e

# Wikipedia
Klen = 3
Tlen = 16
Len = 43
Key = "key"
Msg = "The quick brown fox jumps over the lazy dog"
Mac = 80070713463e7749b90c2dc24911e275