HMAC_SHA1.test at [feef0d0cef]

File tests/test_vectors/MAC/HMAC_SHA1.test artifact 3eee92fdc9 part of check-in feef0d0cef


# Auto generated from "HMAC_SHA1.txt"
package require tls
package require tcltest

tcltest::testConstraint HMAC [expr {[lsearch -nocase [tls::macs] HMAC] > -1}]
tcltest::testConstraint SHA1 [expr {[lsearch -nocase [tls::digests] SHA1] > -1}]

tcltest::test MAC_HMAC-SHA1-1.1 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f] -data "Sample message for keylen=blocklen"] 0 39} \
	-match exact -result 5fd596ee78d5553c8ff4e72d266dfd192366da29

tcltest::test MAC_HMAC-SHA1-1.2 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 000102030405060708090a0b0c0d0e0f10111213] -data "Sample message for keylen<blocklen"] 0 39} \
	-match exact -result 4c99ff0cb1b31bd33f8431dbaf4d17fcd356a807

tcltest::test MAC_HMAC-SHA1-1.3 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60616263] -data "Sample message for keylen=blocklen"] 0 39} \
	-match exact -result 2d51b2f7750e410584662e38f133435f4c4fd42a

tcltest::test MAC_HMAC-SHA1-1.4 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f30] -data "Sample message for keylen<blocklen, with truncated tag"] 0 23} \
	-match exact -result fe3529565cd8e28c5fa79eac

tcltest::test MAC_HMAC-SHA1-1.5 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b] -data "Hi There"] 0 39} \
	-match exact -result b617318655057264e28bc0b6fb378c8ef146be00

tcltest::test MAC_HMAC-SHA1-1.6 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key "Jefe" -data "what do ya want for nothing?"] 0 39} \
	-match exact -result effcdf6ae5eb2fa2d27416d5f184df9c259a7c79

tcltest::test MAC_HMAC-SHA1-1.7 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data [binary decode hex dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd]] 0 39} \
	-match exact -result 125d7342b9ac11cd91a39af48aa17b4f63f175d3

tcltest::test MAC_HMAC-SHA1-1.8 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10111213141516171819] -data [binary decode hex cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd]] 0 39} \
	-match exact -result 4c9007f4026250c6bc8414f9bf50c86c2d7235da

tcltest::test MAC_HMAC-SHA1-1.9 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c] -data "Test With Truncation"] 0 23} \
	-match exact -result 4c1a03424b55e07fe7f27be1

tcltest::test MAC_HMAC-SHA1-1.10 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key - Hash Key First"] 0 39} \
	-match exact -result aa4ae5e15272d00e95705637ce8a3b55ed402112

tcltest::test MAC_HMAC-SHA1-1.11 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"] 0 39} \
	-match exact -result e8e99d0f45237d786d6bbaa7965c7808bbff1a91

tcltest::test MAC_HMAC-SHA1-1.12 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key "key" -data "The quick brown fox jumps over the lazy dog"] 0 39} \
	-match exact -result de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9

tcltest::test MAC_HMAC-SHA1-1.13 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b] -data "Hi There"] 0 39} \
	-match exact -result b617318655057264e28bc0b6fb378c8ef146be00

tcltest::test MAC_HMAC-SHA1-1.14 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key "Jefe" -data "what do ya want for nothing?"] 0 39} \
	-match exact -result effcdf6ae5eb2fa2d27416d5f184df9c259a7c79

tcltest::test MAC_HMAC-SHA1-1.15 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data [binary decode hex dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd]] 0 39} \
	-match exact -result 125d7342b9ac11cd91a39af48aa17b4f63f175d3

tcltest::test MAC_HMAC-SHA1-1.16 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10111213141516171819] -data [binary decode hex cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd]] 0 39} \
	-match exact -result 4c9007f4026250c6bc8414f9bf50c86c2d7235da

tcltest::test MAC_HMAC-SHA1-1.17 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c] -data "Test With Truncation"] 0 23} \
	-match exact -result 4c1a03424b55e07fe7f27be1

tcltest::test MAC_HMAC-SHA1-1.18 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key - Hash Key First"] 0 39} \
	-match exact -result aa4ae5e15272d00e95705637ce8a3b55ed402112

tcltest::test MAC_HMAC-SHA1-1.19 {HMAC_SHA1} \
	-constraints {HMAC SHA1 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA1 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"] 0 39} \
	-match exact -result e8e99d0f45237d786d6bbaa7965c7808bbff1a91

# Cleanup
::tcltest::cleanupTests
return