HMAC_SHA224.test at [216b8859b8]

File tests/test_vectors/MAC/HMAC_SHA224.test artifact b00e1522a7 part of check-in 216b8859b8


# Auto generated from "HMAC_SHA224.txt"
lappend auto_path [file dirname [file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]]
package require tls
package require tcltest

tcltest::testConstraint HMAC [expr {[lsearch -nocase [tls::macs] HMAC] > -1}]
tcltest::testConstraint SHA224 [expr {[lsearch -nocase [tls::digests] SHA224] > -1}]
catch {tls::provider legacy}

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

tcltest::test MAC_HMAC-SHA224-1.2 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b] -data "Sample message for keylen<blocklen"] 0 55} \
	-match exact -result e3d249a8cfb67ef8b7a169e9a0a599714a2cecba65999a51beb8fbbe

tcltest::test MAC_HMAC-SHA224-1.3 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60616263] -data "Sample message for keylen=blocklen"] 0 55} \
	-match exact -result 91c52509e5af8531601ae6230099d90bef88aaefb961f4080abc014d

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

tcltest::test MAC_HMAC-SHA224-1.5 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b] -data "Hi There"] 0 55} \
	-match exact -result 896fb1128abbdf196832107cd49df33f47b4b1169912ba4f53684b22

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

tcltest::test MAC_HMAC-SHA224-1.7 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data [binary decode hex dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd]] 0 55} \
	-match exact -result 7fb3cb3588c6c1f6ffa9694d7d6ad2649365b0c1f65d69d1ec8333ea

tcltest::test MAC_HMAC-SHA224-1.8 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10111213141516171819] -data [binary decode hex cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd]] 0 55} \
	-match exact -result 6c11506874013cac6a2abc1bb382627cec6a90d86efc012de7afec5a

tcltest::test MAC_HMAC-SHA224-1.9 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c] -data "Test With Truncation"] 0 31} \
	-match exact -result 0e2aea68a90c8d37c988bcdb9fca6fa8

tcltest::test MAC_HMAC-SHA224-1.10 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key - Hash Key First"] 0 55} \
	-match exact -result 95e9a0db962095adaebe9b2d6f0dbce2d499f112f2d2b7273fa6870e

tcltest::test MAC_HMAC-SHA224-1.11 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm."] 0 55} \
	-match exact -result 3a854166ac5d9f023f54d517d0b39dbd946770db9c2b95c9f6f565d1

tcltest::test MAC_HMAC-SHA224-1.12 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b] -data "Hi There"] 0 55} \
	-match exact -result 896fb1128abbdf196832107cd49df33f47b4b1169912ba4f53684b22

tcltest::test MAC_HMAC-SHA224-1.13 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key "Jefe" -data "what do ya want for nothing?"] 0 55} \
	-match exact -result a30e01098bc6dbbf45690f3a7e9e6d0f8bbea2a39e6148008fd05e44

tcltest::test MAC_HMAC-SHA224-1.14 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data [binary decode hex dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd]] 0 55} \
	-match exact -result 7fb3cb3588c6c1f6ffa9694d7d6ad2649365b0c1f65d69d1ec8333ea

tcltest::test MAC_HMAC-SHA224-1.15 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10111213141516171819] -data [binary decode hex cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd]] 0 55} \
	-match exact -result 6c11506874013cac6a2abc1bb382627cec6a90d86efc012de7afec5a

tcltest::test MAC_HMAC-SHA224-1.16 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c] -data "Test With Truncation"] 0 31} \
	-match exact -result 0e2aea68a90c8d37c988bcdb9fca6fa8

tcltest::test MAC_HMAC-SHA224-1.17 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "Test Using Larger Than Block-Size Key - Hash Key First"] 0 55} \
	-match exact -result 95e9a0db962095adaebe9b2d6f0dbce2d499f112f2d2b7273fa6870e

tcltest::test MAC_HMAC-SHA224-1.18 {HMAC_SHA224} \
	-constraints {HMAC SHA224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA224 -key [binary decode hex aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] -data "This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm."] 0 55} \
	-match exact -result 3a854166ac5d9f023f54d517d0b39dbd946770db9c2b95c9f6f565d1

# Cleanup
::tcltest::cleanupTests
return