CMAC-AES-128-CBC.test at [0046a7f25d]

File tests/test_vectors/MAC/CMAC-AES-128-CBC.test artifact d14d6c41f8 part of check-in 0046a7f25d


# Auto generated from "CMAC-AES-128-CBC.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 CMAC [expr {[lsearch -nocase [tls::macs] CMAC] > -1}]
tcltest::testConstraint AES_128_CBC [expr {[lsearch -nocase [tls::ciphers] AES-128-CBC] > -1}]
catch {tls::provider legacy}

tcltest::test MAC_CMAC-AES-128-CBC-1.1 {CMAC-AES-128-CBC} \
	-constraints {CMAC  AES_128_CBC} \
	-setup {} \
	-body {string range [tls::cmac -hex -cipher AES-128-CBC -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] -data ""] 0 31} \
	-match exact -result bb1d6929e95937287fa37d129b756746

tcltest::test MAC_CMAC-AES-128-CBC-1.2 {CMAC-AES-128-CBC} \
	-constraints {CMAC  AES_128_CBC} \
	-setup {} \
	-body {string range [tls::cmac -hex -cipher AES-128-CBC -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] -data [binary decode hex 6bc1bee22e409f96e93d7e117393172a]] 0 31} \
	-match exact -result 070a16b46b4d4144f79bdd9dd04a287c

tcltest::test MAC_CMAC-AES-128-CBC-1.3 {CMAC-AES-128-CBC} \
	-constraints {CMAC  AES_128_CBC} \
	-setup {} \
	-body {string range [tls::cmac -hex -cipher AES-128-CBC -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] -data [binary decode hex 6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411]] 0 31} \
	-match exact -result dfa66747de9ae63030ca32611497c827

tcltest::test MAC_CMAC-AES-128-CBC-1.4 {CMAC-AES-128-CBC} \
	-constraints {CMAC  AES_128_CBC} \
	-setup {} \
	-body {string range [tls::cmac -hex -cipher AES-128-CBC -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] -data [binary decode hex 6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710]] 0 31} \
	-match exact -result 51f0bebf7e3b9d92fc49741779363cfe

# Cleanup
::tcltest::cleanupTests
return