Artifact [32ed496a8a]
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

Artifact 32ed496a8a6bb7968a6ad19da3dd4b8ae73595232fea6e312a2da16e1dae1a9c:


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

catch {tls::provider legacy}
tcltest::testConstraint DES_EDE3_CFB8 [expr {[lsearch -nocase [tls::ciphers] DES-EDE3-CFB8] > -1}]

tcltest::test Block_DES-EDE3-CFB8-1.1 {Encrypt DES-EDE3-CFB8} \
	-constraints DES_EDE3_CFB8 \
	-body {binary encode hex [tls::encrypt -cipher DES-EDE3-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef23456789abcdef01456789abcdef0123] \
		 -iv [binary decode hex f69f2445df4f9b17] \
		 -data [binary decode hex 6bc1bee22e409f96]]} \
	-match exact -result 07951b729dc23ab4

tcltest::test Block_DES-EDE3-CFB8-1.2 {Decrypt DES-EDE3-CFB8} \
	-constraints DES_EDE3_CFB8 \
	-body {binary encode hex [tls::decrypt -cipher DES-EDE3-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef23456789abcdef01456789abcdef0123] \
		 -iv [binary decode hex f69f2445df4f9b17] \
		 -data [binary decode hex 07951b729dc23ab4]]} \
	-match exact -result 6bc1bee22e409f96

tcltest::test Block_DES-EDE3-CFB8-1.3 {Encrypt DES-EDE3-CFB8} \
	-constraints DES_EDE3_CFB8 \
	-body {binary encode hex [tls::encrypt -cipher DES-EDE3-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef23456789abcdef010123456789abcdef] \
		 -iv [binary decode hex f69f2445df4f9b17] \
		 -data [binary decode hex 6bc1bee22e409f96]]} \
	-match exact -result 61d86d9aee9693fd

tcltest::test Block_DES-EDE3-CFB8-1.4 {Decrypt DES-EDE3-CFB8} \
	-constraints DES_EDE3_CFB8 \
	-body {binary encode hex [tls::decrypt -cipher DES-EDE3-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef23456789abcdef010123456789abcdef] \
		 -iv [binary decode hex f69f2445df4f9b17] \
		 -data [binary decode hex 61d86d9aee9693fd]]} \
	-match exact -result 6bc1bee22e409f96

# Cleanup
::tcltest::cleanupTests
return