ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.test @@ -0,0 +1,75 @@ +# Auto generated from "CAMELLIA-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 + +catch {tls::provider legacy} +tcltest::testConstraint CAMELLIA_128_CBC [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-128-CBC] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.1 {Encrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 1607cf494b36bbf00daeb0b503c831ab + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.2 {Decrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 1607CF494B36BBF00DAEB0B503C831AB]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.3 {Encrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 1607CF494B36BBF00DAEB0B503C831AB] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result a2f2cf671629ef7840c5a5dfb5074887 + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.4 {Decrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 1607CF494B36BBF00DAEB0B503C831AB] \ + -data [binary decode hex A2F2CF671629EF7840C5A5DFB5074887]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.5 {Encrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A2F2CF671629EF7840C5A5DFB5074887] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 0f06165008cf8b8b5a63586362543e54 + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.6 {Decrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A2F2CF671629EF7840C5A5DFB5074887] \ + -data [binary decode hex 0F06165008CF8B8B5A63586362543E54]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.7 {Encrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 36A84CDAFD5F9A85ADA0F0A993D6D577] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 74c64268cdb8b8faf5b34e8af3732980 + +tcltest::test Symetric_Block_CAMELLIA-128-CBC-1.8 {Decrypt CAMELLIA-128-CBC} \ + -constraints CAMELLIA_128_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CBC -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 36A84CDAFD5F9A85ADA0F0A993D6D577] \ + -data [binary decode hex 74C64268CDB8B8FAF5B34E8AF3732980]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-CBC.txt @@ -0,0 +1,22 @@ +# CAMELLIA-128-CBC From OpenSSL test vectors + +# CBC-CAMELLIA128.Encrypt and CBC-CAMELLIA128.Decrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 1607CF494B36BBF00DAEB0B503C831AB + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 1607CF494B36BBF00DAEB0B503C831AB +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = A2F2CF671629EF7840C5A5DFB5074887 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = A2F2CF671629EF7840C5A5DFB5074887 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 0F06165008CF8B8B5A63586362543E54 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 36A84CDAFD5F9A85ADA0F0A993D6D577 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 74C64268CDB8B8FAF5B34E8AF3732980 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-128-CFB.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 CAMELLIA_128_CFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-128-CFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.1 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 14f7646187817eb586599146b82bd719 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.2 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 14F7646187817EB586599146B82BD719]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.3 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 14F7646187817EB586599146B82BD719] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result a53d28bb82df741103ea4f921a44880b + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.4 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 14F7646187817EB586599146B82BD719] \ + -data [binary decode hex A53D28BB82DF741103EA4F921A44880B]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.5 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A53D28BB82DF741103EA4F921A44880B] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 9c2157a664626d1def9ea420fde69b96 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.6 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A53D28BB82DF741103EA4F921A44880B] \ + -data [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.7 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 742a25f0542340c7baef24ca8482bb09 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.8 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96] \ + -data [binary decode hex 742A25F0542340C7BAEF24CA8482BB09]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.9 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 14f7646187817eb586599146b82bd719 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.10 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 14F7646187817EB586599146B82BD719]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.11 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 14F7646187817EB586599146B82BD719] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result a53d28bb82df741103ea4f921a44880b + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.12 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 14F7646187817EB586599146B82BD719] \ + -data [binary decode hex A53D28BB82DF741103EA4F921A44880B]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.13 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A53D28BB82DF741103EA4F921A44880B] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 9c2157a664626d1def9ea420fde69b96 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.14 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A53D28BB82DF741103EA4F921A44880B] \ + -data [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.15 {Encrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 742a25f0542340c7baef24ca8482bb09 + +tcltest::test Symetric_Block_CAMELLIA-128-CFB-1.16 {Decrypt CAMELLIA-128-CFB} \ + -constraints CAMELLIA_128_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-CFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 9C2157A664626D1DEF9EA420FDE69B96] \ + -data [binary decode hex 742A25F0542340C7BAEF24CA8482BB09]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-CFB.txt @@ -0,0 +1,52 @@ +# CAMELLIA-128-CFB From OpenSSL test vectors + +# We don't support CFB{1,8}-CAMELLIAxxx.{En,De}crypt +# CFB128-CAMELLIA128.Encrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 14F7646187817EB586599146B82BD719 +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 14F7646187817EB586599146B82BD719 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = A53D28BB82DF741103EA4F921A44880B +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = A53D28BB82DF741103EA4F921A44880B +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 9C2157A664626D1DEF9EA420FDE69B96 +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 9C2157A664626D1DEF9EA420FDE69B96 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 742A25F0542340C7BAEF24CA8482BB09 +Encrypt = 1 + +# CFB128-CAMELLIA128.Decrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 14F7646187817EB586599146B82BD719 +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 14F7646187817EB586599146B82BD719 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = A53D28BB82DF741103EA4F921A44880B +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = A53D28BB82DF741103EA4F921A44880B +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 9C2157A664626D1DEF9EA420FDE69B96 +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 9C2157A664626D1DEF9EA420FDE69B96 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 742A25F0542340C7BAEF24CA8482BB09 +Encrypt = 0 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.test @@ -0,0 +1,81 @@ +# Auto generated from "CAMELLIA-128-ECB.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 CAMELLIA_128_ECB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-128-ECB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.1 {Encrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 00112233445566778899AABBCCDDEEFF]]} \ + -match exact -result 77cf412067af8270613529149919546f + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.2 {Decrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 77CF412067AF8270613529149919546F]]} \ + -match exact -result 00112233445566778899aabbccddeeff + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.3 {Encrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 432fc5dcd628115b7c388d770b270c96 + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.4 {Decrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex 432FC5DCD628115B7C388D770B270C96]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.5 {Encrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 0be1f14023782a22e8384c5abb7fab2b + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.6 {Decrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex 0BE1F14023782A22E8384C5ABB7FAB2B]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.7 {Encrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result a0a1abcd1893ab6fe0fe5b65df5f8636 + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.8 {Decrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex A0A1ABCD1893AB6FE0FE5B65DF5F8636]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.9 {Encrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result e61925e0d5dfaa9bb29f815b3076e51a + +tcltest::test Symetric_Block_CAMELLIA-128-ECB-1.10 {Decrypt CAMELLIA-128-ECB} \ + -constraints CAMELLIA_128_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-ECB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -data [binary decode hex E61925E0D5DFAA9BB29F815B3076E51A]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-ECB.txt @@ -0,0 +1,23 @@ +# CAMELLIA-128-ECB From OpenSSL test vectors + +# CAMELLIA-128-ECB +Key = 000102030405060708090A0B0C0D0E0F +Plaintext = 00112233445566778899AABBCCDDEEFF +Ciphertext = 77CF412067AF8270613529149919546F + +# ECB-CAMELLIA128.Encrypt and ECB-CAMELLIA128.Decrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 432FC5DCD628115B7C388D770B270C96 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 0BE1F14023782A22E8384C5ABB7FAB2B + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = A0A1ABCD1893AB6FE0FE5B65DF5F8636 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = E61925E0D5DFAA9BB29F815B3076E51A ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-128-OFB.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 CAMELLIA_128_OFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-128-OFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.1 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 14f7646187817eb586599146b82bd719 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.2 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 14F7646187817EB586599146B82BD719]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.3 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 50FE67CC996D32B6DA0937E99BAFEC60] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 25623db569ca51e01482649977e28d84 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.4 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 50FE67CC996D32B6DA0937E99BAFEC60] \ + -data [binary decode hex 25623DB569CA51E01482649977E28D84]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.5 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex D9A4DADA0892239F6B8B3D7680E15674] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result c776634a60729dc657d12b9fca801e98 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.6 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex D9A4DADA0892239F6B8B3D7680E15674] \ + -data [binary decode hex C776634A60729DC657D12B9FCA801E98]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.7 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A78819583F0308E7A6BF36B1386ABF23] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result d776379be0e50825e681da1a4c980e8e + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.8 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A78819583F0308E7A6BF36B1386ABF23] \ + -data [binary decode hex D776379BE0E50825E681DA1A4C980E8E]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.9 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 14f7646187817eb586599146b82bd719 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.10 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 14F7646187817EB586599146B82BD719]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.11 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 50FE67CC996D32B6DA0937E99BAFEC60] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 25623db569ca51e01482649977e28d84 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.12 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex 50FE67CC996D32B6DA0937E99BAFEC60] \ + -data [binary decode hex 25623DB569CA51E01482649977E28D84]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.13 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex D9A4DADA0892239F6B8B3D7680E15674] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result c776634a60729dc657d12b9fca801e98 + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.14 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex D9A4DADA0892239F6B8B3D7680E15674] \ + -data [binary decode hex C776634A60729DC657D12B9FCA801E98]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.15 {Encrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A78819583F0308E7A6BF36B1386ABF23] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result d776379be0e50825e681da1a4c980e8e + +tcltest::test Symetric_Block_CAMELLIA-128-OFB-1.16 {Decrypt CAMELLIA-128-OFB} \ + -constraints CAMELLIA_128_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-128-OFB -padding 0 \ + -key [binary decode hex 2B7E151628AED2A6ABF7158809CF4F3C] \ + -iv [binary decode hex A78819583F0308E7A6BF36B1386ABF23] \ + -data [binary decode hex D776379BE0E50825E681DA1A4C980E8E]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-128-OFB.txt @@ -0,0 +1,51 @@ +# CAMELLIA-128-OFB From OpenSSL test vectors + +# OFB-CAMELLIA128.Encrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 14F7646187817EB586599146B82BD719 +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 50FE67CC996D32B6DA0937E99BAFEC60 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 25623DB569CA51E01482649977E28D84 +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = D9A4DADA0892239F6B8B3D7680E15674 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = C776634A60729DC657D12B9FCA801E98 +Encrypt = 1 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = A78819583F0308E7A6BF36B1386ABF23 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = D776379BE0E50825E681DA1A4C980E8E +Encrypt = 1 + +# OFB-CAMELLIA128.Decrypt +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 14F7646187817EB586599146B82BD719 +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = 50FE67CC996D32B6DA0937E99BAFEC60 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 25623DB569CA51E01482649977E28D84 +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = D9A4DADA0892239F6B8B3D7680E15674 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = C776634A60729DC657D12B9FCA801E98 +Encrypt = 0 + +Key = 2B7E151628AED2A6ABF7158809CF4F3C +IV = A78819583F0308E7A6BF36B1386ABF23 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = D776379BE0E50825E681DA1A4C980E8E +Encrypt = 0 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.test @@ -0,0 +1,75 @@ +# Auto generated from "CAMELLIA-192-CBC.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 CAMELLIA_192_CBC [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-192-CBC] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.1 {Encrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result 2a4830ab5ac4a1a2405955fd2195cf93 + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.2 {Decrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 2A4830AB5AC4A1A2405955FD2195CF93]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.3 {Encrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 2A4830AB5AC4A1A2405955FD2195CF93] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 5d5a869bd14ce54264f892a6dd2ec3d5 + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.4 {Decrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 2A4830AB5AC4A1A2405955FD2195CF93] \ + -data [binary decode hex 5D5A869BD14CE54264F892A6DD2EC3D5]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.5 {Encrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 5D5A869BD14CE54264F892A6DD2EC3D5] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 37d359c3349836d884e310addf68c449 + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.6 {Decrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 5D5A869BD14CE54264F892A6DD2EC3D5] \ + -data [binary decode hex 37D359C3349836D884E310ADDF68C449]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.7 {Encrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 37D359C3349836D884E310ADDF68C449] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 01faaa930b4ab9916e9668e1428c6b08 + +tcltest::test Symetric_Block_CAMELLIA-192-CBC-1.8 {Decrypt CAMELLIA-192-CBC} \ + -constraints CAMELLIA_192_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CBC -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 37D359C3349836D884E310ADDF68C449] \ + -data [binary decode hex 01FAAA930B4AB9916E9668E1428C6B08]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-CBC.txt @@ -0,0 +1,22 @@ +# CAMELLIA-128-CBC From OpenSSL test vectors + +# CBC-CAMELLIA192.Encrypt and CBC-CAMELLIA192.Decrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = 2A4830AB5AC4A1A2405955FD2195CF93 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 2A4830AB5AC4A1A2405955FD2195CF93 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 5D5A869BD14CE54264F892A6DD2EC3D5 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 5D5A869BD14CE54264F892A6DD2EC3D5 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 37D359C3349836D884E310ADDF68C449 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 37D359C3349836D884E310ADDF68C449 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 01FAAA930B4AB9916E9668E1428C6B08 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-192-CFB.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 CAMELLIA_192_CFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-192-CFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.1 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result c832bb9780677daa82d9b6860dcd565e + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.2 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex C832BB9780677DAA82D9B6860DCD565E]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.3 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex C832BB9780677DAA82D9B6860DCD565E] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 86f8491627906d780c7a6d46ea331f98 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.4 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex C832BB9780677DAA82D9B6860DCD565E] \ + -data [binary decode hex 86F8491627906D780C7A6D46EA331F98]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.5 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 86F8491627906D780C7A6D46EA331F98] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 69511cce594cf710cb98bb63d7221f01 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.6 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 86F8491627906D780C7A6D46EA331F98] \ + -data [binary decode hex 69511CCE594CF710CB98BB63D7221F01]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.7 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 69511CCE594CF710CB98BB63D7221F01] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result d5b5378a3abed55803f25565d8907b84 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.8 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 69511CCE594CF710CB98BB63D7221F01] \ + -data [binary decode hex D5B5378A3ABED55803F25565D8907B84]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.9 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result c832bb9780677daa82d9b6860dcd565e + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.10 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex C832BB9780677DAA82D9B6860DCD565E]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.11 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex C832BB9780677DAA82D9B6860DCD565E] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 86f8491627906d780c7a6d46ea331f98 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.12 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex C832BB9780677DAA82D9B6860DCD565E] \ + -data [binary decode hex 86F8491627906D780C7A6D46EA331F98]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.13 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 86F8491627906D780C7A6D46EA331F98] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 69511cce594cf710cb98bb63d7221f01 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.14 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 86F8491627906D780C7A6D46EA331F98] \ + -data [binary decode hex 69511CCE594CF710CB98BB63D7221F01]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.15 {Encrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 69511CCE594CF710CB98BB63D7221F01] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result d5b5378a3abed55803f25565d8907b84 + +tcltest::test Symetric_Block_CAMELLIA-192-CFB-1.16 {Decrypt CAMELLIA-192-CFB} \ + -constraints CAMELLIA_192_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-CFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 69511CCE594CF710CB98BB63D7221F01] \ + -data [binary decode hex D5B5378A3ABED55803F25565D8907B84]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-CFB.txt @@ -0,0 +1,52 @@ +# CAMELLIA-192-CFB From OpenSSL test vectors + +# We don't support CFB{1,8}-CAMELLIAxxx.{En,De}crypt +# CFB128-CAMELLIA192.Encrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = C832BB9780677DAA82D9B6860DCD565E +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = C832BB9780677DAA82D9B6860DCD565E +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 86F8491627906D780C7A6D46EA331F98 +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 86F8491627906D780C7A6D46EA331F98 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 69511CCE594CF710CB98BB63D7221F01 +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 69511CCE594CF710CB98BB63D7221F01 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = D5B5378A3ABED55803F25565D8907B84 +Encrypt = 1 + +# CFB128-CAMELLIA192.Decrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = C832BB9780677DAA82D9B6860DCD565E +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = C832BB9780677DAA82D9B6860DCD565E +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 86F8491627906D780C7A6D46EA331F98 +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 86F8491627906D780C7A6D46EA331F98 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 69511CCE594CF710CB98BB63D7221F01 +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 69511CCE594CF710CB98BB63D7221F01 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = D5B5378A3ABED55803F25565D8907B84 +Encrypt = 0 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.test @@ -0,0 +1,81 @@ +# Auto generated from "CAMELLIA-192-ECB.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 CAMELLIA_192_ECB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-192-ECB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.1 {Encrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F1011121314151617] \ + -data [binary decode hex 00112233445566778899AABBCCDDEEFF]]} \ + -match exact -result b22f3c36b72d31329eee8addc2906c68 + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.2 {Decrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F1011121314151617] \ + -data [binary decode hex B22F3C36B72D31329EEE8ADDC2906C68]]} \ + -match exact -result 00112233445566778899aabbccddeeff + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.3 {Encrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result cccc6c4e138b45848514d48d0d3439d3 + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.4 {Decrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex CCCC6C4E138B45848514D48D0D3439D3]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.5 {Encrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 5713c62c14b2ec0f8393b6afd6f5785a + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.6 {Decrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex 5713C62C14B2EC0F8393B6AFD6F5785A]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.7 {Encrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result b40ed2b60eb54d09d030cf511feef366 + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.8 {Decrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex B40ED2B60EB54D09D030CF511FEEF366]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.9 {Encrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 909dbd95799096748cb27357e73e1d26 + +tcltest::test Symetric_Block_CAMELLIA-192-ECB-1.10 {Decrypt CAMELLIA-192-ECB} \ + -constraints CAMELLIA_192_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-ECB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -data [binary decode hex 909DBD95799096748CB27357E73E1D26]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-ECB.txt @@ -0,0 +1,23 @@ +# CAMELLIA-192-ECB From OpenSSL test vectors + +# CAMELLIA-192-ECB +Key = 000102030405060708090A0B0C0D0E0F1011121314151617 +Plaintext = 00112233445566778899AABBCCDDEEFF +Ciphertext = B22F3C36B72D31329EEE8ADDC2906C68 + +# ECB-CAMELLIA192.Encrypt and ECB-CAMELLIA192.Decrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = CCCC6C4E138B45848514D48D0D3439D3 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 5713C62C14B2EC0F8393B6AFD6F5785A + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = B40ED2B60EB54D09D030CF511FEEF366 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 909DBD95799096748CB27357E73E1D26 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-192-OFB.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 CAMELLIA_192_OFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-192-OFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.1 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result c832bb9780677daa82d9b6860dcd565e + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.2 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex C832BB9780677DAA82D9B6860DCD565E]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.3 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex A609B38DF3B1133DDDFF2718BA09565E] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 8eceb7d0350d72c7f78562aebdf99339 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.4 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex A609B38DF3B1133DDDFF2718BA09565E] \ + -data [binary decode hex 8ECEB7D0350D72C7F78562AEBDF99339]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.5 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 52EF01DA52602FE0975F78AC84BF8A50] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result bdd62dbbb9700846c53b507f544696f0 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.6 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 52EF01DA52602FE0975F78AC84BF8A50] \ + -data [binary decode hex BDD62DBBB9700846C53B507F544696F0]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.7 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex BD5286AC63AABD7EB067AC54B553F71D] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result e28014e046b802f385c4c2e13ead4a72 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.8 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex BD5286AC63AABD7EB067AC54B553F71D] \ + -data [binary decode hex E28014E046B802F385C4C2E13EAD4A72]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.9 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result c832bb9780677daa82d9b6860dcd565e + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.10 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex C832BB9780677DAA82D9B6860DCD565E]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.11 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex A609B38DF3B1133DDDFF2718BA09565E] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 8eceb7d0350d72c7f78562aebdf99339 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.12 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex A609B38DF3B1133DDDFF2718BA09565E] \ + -data [binary decode hex 8ECEB7D0350D72C7F78562AEBDF99339]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.13 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 52EF01DA52602FE0975F78AC84BF8A50] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result bdd62dbbb9700846c53b507f544696f0 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.14 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex 52EF01DA52602FE0975F78AC84BF8A50] \ + -data [binary decode hex BDD62DBBB9700846C53B507F544696F0]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.15 {Encrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex BD5286AC63AABD7EB067AC54B553F71D] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result e28014e046b802f385c4c2e13ead4a72 + +tcltest::test Symetric_Block_CAMELLIA-192-OFB-1.16 {Decrypt CAMELLIA-192-OFB} \ + -constraints CAMELLIA_192_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-192-OFB -padding 0 \ + -key [binary decode hex 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B] \ + -iv [binary decode hex BD5286AC63AABD7EB067AC54B553F71D] \ + -data [binary decode hex E28014E046B802F385C4C2E13EAD4A72]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-192-OFB.txt @@ -0,0 +1,51 @@ +# CAMELLIA-192-OFB From OpenSSL test vectors + +# OFB-CAMELLIA192.Encrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = C832BB9780677DAA82D9B6860DCD565E +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = A609B38DF3B1133DDDFF2718BA09565E +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 8ECEB7D0350D72C7F78562AEBDF99339 +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 52EF01DA52602FE0975F78AC84BF8A50 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = BDD62DBBB9700846C53B507F544696F0 +Encrypt = 1 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = BD5286AC63AABD7EB067AC54B553F71D +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = E28014E046B802F385C4C2E13EAD4A72 +Encrypt = 1 + +# OFB-CAMELLIA192.Decrypt +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = C832BB9780677DAA82D9B6860DCD565E +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = A609B38DF3B1133DDDFF2718BA09565E +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 8ECEB7D0350D72C7F78562AEBDF99339 +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = 52EF01DA52602FE0975F78AC84BF8A50 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = BDD62DBBB9700846C53B507F544696F0 +Encrypt = 0 + +Key = 8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B +IV = BD5286AC63AABD7EB067AC54B553F71D +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = E28014E046B802F385C4C2E13EAD4A72 +Encrypt = 0 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.test @@ -0,0 +1,75 @@ +# Auto generated from "CAMELLIA-256-CBC.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 CAMELLIA_256_CBC [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-256-CBC] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.1 {Encrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result e6cfa35fc02b134a4d2c0b6737ac3eda + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.2 {Decrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex E6CFA35FC02B134A4D2C0B6737AC3EDA]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.3 {Encrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E6CFA35FC02B134A4D2C0B6737AC3EDA] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 36cbeb73bd504b4070b1b7de2b21eb50 + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.4 {Decrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E6CFA35FC02B134A4D2C0B6737AC3EDA] \ + -data [binary decode hex 36CBEB73BD504B4070B1B7DE2B21EB50]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.5 {Encrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 36CBEB73BD504B4070B1B7DE2B21EB50] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result e31a6055297d96ca3330cdf1b1860a83 + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.6 {Decrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 36CBEB73BD504B4070B1B7DE2B21EB50] \ + -data [binary decode hex E31A6055297D96CA3330CDF1B1860A83]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.7 {Encrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E31A6055297D96CA3330CDF1B1860A83] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 5d563f6d1cccf236051c0c5c1c58f28f + +tcltest::test Symetric_Block_CAMELLIA-256-CBC-1.8 {Decrypt CAMELLIA-256-CBC} \ + -constraints CAMELLIA_256_CBC \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CBC -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E31A6055297D96CA3330CDF1B1860A83] \ + -data [binary decode hex 5D563F6D1CCCF236051C0C5C1C58F28F]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-CBC.txt @@ -0,0 +1,22 @@ +# CAMELLIA-128-CBC From OpenSSL test vectors + +# CBC-CAMELLIA256.Encrypt and CBC-CAMELLIA256.Decrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = E6CFA35FC02B134A4D2C0B6737AC3EDA + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = E6CFA35FC02B134A4D2C0B6737AC3EDA +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 36CBEB73BD504B4070B1B7DE2B21EB50 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 36CBEB73BD504B4070B1B7DE2B21EB50 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = E31A6055297D96CA3330CDF1B1860A83 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = E31A6055297D96CA3330CDF1B1860A83 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 5D563F6D1CCCF236051C0C5C1C58F28F ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-256-CFB.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 CAMELLIA_256_CFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-256-CFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.1 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result cf6107bb0cea7d7fb1bd31f5e7b06c93 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.2 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.3 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 89bedb4ccdd864ea11ba4cbe849b5e2b + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.4 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93] \ + -data [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.5 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 555fc3f34bdd2d54c62d9e3bf338c1c4 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.6 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B] \ + -data [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.7 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 5953adce14db8c7f39f1bd39f359bffa + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.8 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4] \ + -data [binary decode hex 5953ADCE14DB8C7F39F1BD39F359BFFA]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.9 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result cf6107bb0cea7d7fb1bd31f5e7b06c93 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.10 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.11 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 89bedb4ccdd864ea11ba4cbe849b5e2b + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.12 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93] \ + -data [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.13 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 555fc3f34bdd2d54c62d9e3bf338c1c4 + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.14 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 89BEDB4CCDD864EA11BA4CBE849B5E2B] \ + -data [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.15 {Encrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 5953adce14db8c7f39f1bd39f359bffa + +tcltest::test Symetric_Block_CAMELLIA-256-CFB-1.16 {Decrypt CAMELLIA-256-CFB} \ + -constraints CAMELLIA_256_CFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-CFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 555FC3F34BDD2D54C62D9E3BF338C1C4] \ + -data [binary decode hex 5953ADCE14DB8C7F39F1BD39F359BFFA]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-CFB.txt @@ -0,0 +1,52 @@ +# CAMELLIA-256-CFB From OpenSSL test vectors + +# We don't support CFB{1,8}-CAMELLIAxxx.{En,De}crypt +# CFB128-CAMELLIA256.Encrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 89BEDB4CCDD864EA11BA4CBE849B5E2B +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 89BEDB4CCDD864EA11BA4CBE849B5E2B +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 555FC3F34BDD2D54C62D9E3BF338C1C4 +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 555FC3F34BDD2D54C62D9E3BF338C1C4 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 5953ADCE14DB8C7F39F1BD39F359BFFA +Encrypt = 1 + +# CFB128-CAMELLIA256.Decrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 89BEDB4CCDD864EA11BA4CBE849B5E2B +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 89BEDB4CCDD864EA11BA4CBE849B5E2B +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 555FC3F34BDD2D54C62D9E3BF338C1C4 +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 555FC3F34BDD2D54C62D9E3BF338C1C4 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 5953ADCE14DB8C7F39F1BD39F359BFFA +Encrypt = 0 ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.test @@ -0,0 +1,81 @@ +# Auto generated from "CAMELLIA-256-ECB.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 CAMELLIA_256_ECB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-256-ECB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.1 {Encrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F] \ + -data [binary decode hex 00112233445566778899AABBCCDDEEFF]]} \ + -match exact -result 2edf1f3418d53b88841fc8985fb1ecf2 + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.2 {Decrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F] \ + -data [binary decode hex 2EDF1F3418D53B88841FC8985FB1ECF2]]} \ + -match exact -result 00112233445566778899aabbccddeeff + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.3 {Encrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result befd219b112fa00098919cd101c9ccfa + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.4 {Decrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex BEFD219B112FA00098919CD101C9CCFA]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.5 {Encrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result c91d3a8f1aea08a9386cf4b66c0169ea + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.6 {Decrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex C91D3A8F1AEA08A9386CF4B66C0169EA]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.7 {Encrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result a623d711dc5f25a51bb8a80d56397d28 + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.8 {Decrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex A623D711DC5F25A51BB8A80D56397D28]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.9 {Encrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 7960109fb6dc42947fcfe59ea3c5eb6b + +tcltest::test Symetric_Block_CAMELLIA-256-ECB-1.10 {Decrypt CAMELLIA-256-ECB} \ + -constraints CAMELLIA_256_ECB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-ECB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -data [binary decode hex 7960109FB6DC42947FCFE59EA3C5EB6B]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-ECB.txt @@ -0,0 +1,23 @@ +# CAMELLIA-256-ECB From OpenSSL test vectors + +# CAMELLIA-256-ECB +Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F +Plaintext = 00112233445566778899AABBCCDDEEFF +Ciphertext = 2EDF1F3418D53B88841FC8985FB1ECF2 + +# ECB-CAMELLIA256.Encrypt and ECB-CAMELLIA256.Decrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = BEFD219B112FA00098919CD101C9CCFA + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = C91D3A8F1AEA08A9386CF4B66C0169EA + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = A623D711DC5F25A51BB8A80D56397D28 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 7960109FB6DC42947FCFE59EA3C5EB6B ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.test Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.test @@ -0,0 +1,139 @@ +# Auto generated from "CAMELLIA-256-OFB.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 CAMELLIA_256_OFB [expr {[lsearch -nocase [tls::ciphers] CAMELLIA-256-OFB] > -1}] + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.1 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result cf6107bb0cea7d7fb1bd31f5e7b06c93 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.2 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.3 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex B7BF3A5DF43989DD97F0FA97EBCE2F4A] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 127ad97e8e3994e4820027d7ba109368 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.4 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex B7BF3A5DF43989DD97F0FA97EBCE2F4A] \ + -data [binary decode hex 127AD97E8E3994E4820027D7BA109368]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.5 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E1C656305ED1A7A6563805746FE03EDC] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 6bff6265a6a6b7a535bc65a80b17214e + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.6 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E1C656305ED1A7A6563805746FE03EDC] \ + -data [binary decode hex 6BFF6265A6A6B7A535BC65A80B17214E]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.7 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 41635BE625B48AFC1666DD42A09D96E7] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 0a4a0404e26aa78a27cb271e8bf3cf20 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.8 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 41635BE625B48AFC1666DD42A09D96E7] \ + -data [binary decode hex 0A4A0404E26AA78A27CB271E8BF3CF20]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.9 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex 6BC1BEE22E409F96E93D7E117393172A]]} \ + -match exact -result cf6107bb0cea7d7fb1bd31f5e7b06c93 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.10 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 000102030405060708090A0B0C0D0E0F] \ + -data [binary decode hex CF6107BB0CEA7D7FB1BD31F5E7B06C93]]} \ + -match exact -result 6bc1bee22e409f96e93d7e117393172a + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.11 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex B7BF3A5DF43989DD97F0FA97EBCE2F4A] \ + -data [binary decode hex AE2D8A571E03AC9C9EB76FAC45AF8E51]]} \ + -match exact -result 127ad97e8e3994e4820027d7ba109368 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.12 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex B7BF3A5DF43989DD97F0FA97EBCE2F4A] \ + -data [binary decode hex 127AD97E8E3994E4820027D7BA109368]]} \ + -match exact -result ae2d8a571e03ac9c9eb76fac45af8e51 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.13 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E1C656305ED1A7A6563805746FE03EDC] \ + -data [binary decode hex 30C81C46A35CE411E5FBC1191A0A52EF]]} \ + -match exact -result 6bff6265a6a6b7a535bc65a80b17214e + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.14 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex E1C656305ED1A7A6563805746FE03EDC] \ + -data [binary decode hex 6BFF6265A6A6B7A535BC65A80B17214E]]} \ + -match exact -result 30c81c46a35ce411e5fbc1191a0a52ef + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.15 {Encrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::encrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 41635BE625B48AFC1666DD42A09D96E7] \ + -data [binary decode hex F69F2445DF4F9B17AD2B417BE66C3710]]} \ + -match exact -result 0a4a0404e26aa78a27cb271e8bf3cf20 + +tcltest::test Symetric_Block_CAMELLIA-256-OFB-1.16 {Decrypt CAMELLIA-256-OFB} \ + -constraints CAMELLIA_256_OFB \ + -body {binary encode hex [tls::decrypt -cipher CAMELLIA-256-OFB -padding 0 \ + -key [binary decode hex 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4] \ + -iv [binary decode hex 41635BE625B48AFC1666DD42A09D96E7] \ + -data [binary decode hex 0A4A0404E26AA78A27CB271E8BF3CF20]]} \ + -match exact -result f69f2445df4f9b17ad2b417be66c3710 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.txt Index: tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Block/CAMELLIA-256-OFB.txt @@ -0,0 +1,51 @@ +# CAMELLIA-256-OFB From OpenSSL test vectors + +# OFB-CAMELLIA256.Encrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 127AD97E8E3994E4820027D7BA109368 +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = E1C656305ED1A7A6563805746FE03EDC +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 6BFF6265A6A6B7A535BC65A80B17214E +Encrypt = 1 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 41635BE625B48AFC1666DD42A09D96E7 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 0A4A0404E26AA78A27CB271E8BF3CF20 +Encrypt = 1 + +# OFB-CAMELLIA256.Decrypt +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 000102030405060708090A0B0C0D0E0F +Plaintext = 6BC1BEE22E409F96E93D7E117393172A +Ciphertext = CF6107BB0CEA7D7FB1BD31F5E7B06C93 +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = B7BF3A5DF43989DD97F0FA97EBCE2F4A +Plaintext = AE2D8A571E03AC9C9EB76FAC45AF8E51 +Ciphertext = 127AD97E8E3994E4820027D7BA109368 +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = E1C656305ED1A7A6563805746FE03EDC +Plaintext = 30C81C46A35CE411E5FBC1191A0A52EF +Ciphertext = 6BFF6265A6A6B7A535BC65A80B17214E +Encrypt = 0 + +Key = 603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4 +IV = 41635BE625B48AFC1666DD42A09D96E7 +Plaintext = F69F2445DF4F9B17AD2B417BE66C3710 +Ciphertext = 0A4A0404E26AA78A27CB271E8BF3CF20 +Encrypt = 0