HMAC_SHA3-512.test at [5a41ff9aa1]

File tests/test_vectors/MAC/HMAC_SHA3-512.test artifact 3e50a3d7da part of check-in 5a41ff9aa1


# Auto generated from "HMAC_SHA3-512.txt"
package require tls
package require tcltest

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

tcltest::test MAC_HMAC-SHA3-512-1.1 {HMAC_SHA3-512} \
	-constraints {HMAC SHA3_512 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-512 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f] -data "Sample message for keylen<blocklen"] 0 127} \
	-match exact -result 4efd629d6c71bf86162658f29943b1c308ce27cdfa6db0d9c3ce81763f9cbce5f7ebe9868031db1a8f8eb7b6b95e5c5e3f657a8996c86a2f6527e307f0213196

tcltest::test MAC_HMAC-SHA3-512-1.2 {HMAC_SHA3-512} \
	-constraints {HMAC SHA3_512 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-512 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4041424344454647] -data "Sample message for keylen=blocklen"] 0 127} \
	-match exact -result 544e257ea2a3e5ea19a590e6a24b724ce6327757723fe2751b75bf007d80f6b360744bf1b7a88ea585f9765b47911976d3191cf83c039f5ffab0d29cc9d9b6da

tcltest::test MAC_HMAC-SHA3-512-1.3 {HMAC_SHA3-512} \
	-constraints {HMAC SHA3_512 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-512 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f8081828384858687] -data "Sample message for keylen>blocklen"] 0 127} \
	-match exact -result 5f464f5e5b7848e3885e49b2c385f0694985d0e38966242dc4a5fe3fea4b37d46b65ceced5dcf59438dd840bab22269f0ba7febdb9fcf74602a35666b2a32915

tcltest::test MAC_HMAC-SHA3-512-1.4 {HMAC_SHA3-512} \
	-constraints {HMAC SHA3_512 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-512 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f] -data "Sample message for keylen<blocklen, with truncated tag"] 0 63} \
	-match exact -result 7bb06d859257b25ce73ca700df34c5cbef5c898bac91029e0b27975d4e526a08

# Cleanup
::tcltest::cleanupTests
return