ADDED tests/test_vectors/Symetric_Stream/all.tcl Index: tests/test_vectors/Symetric_Stream/all.tcl ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/all.tcl @@ -0,0 +1,44 @@ +# all.tcl -- +# +# This file contains a top-level script to run all of the Tcl +# tests. Execute it by invoking "source all.test" when running tcltest +# in this directory. +# +# Copyright (c) 1998-2000 by Ajuba Solutions. +# All rights reserved. +# +# RCS: @(#) $Id: all.tcl,v 1.5 2000/08/15 18:45:01 hobbs Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import ::tcltest::* +} + +set ::tcltest::testSingleFile false +set ::tcltest::testsDirectory [file dir [info script]] + +# We should ensure that the testsDirectory is absolute. +# This was introduced in Tcl 8.3+'s tcltest, so we need a catch. +catch {::tcltest::normalizePath ::tcltest::testsDirectory} + +# +# Run all tests in current and any sub directories with an all.tcl file. +# +set ::exitCode 0 +if {[package vsatisfies [package require tcltest] 2.5-]} { + if {[::tcltest::runAllTests] == 1} { + set ::exitCode 1 + } + +} else { + # Hook to determine if any of the tests failed. Then we can exit with the + # proper exit code: 0=all passed, 1=one or more failed + proc tcltest::cleanupTestsHook {} { + variable numTests + set ::exitCode [expr {$numTests(Total) == 0 || $numTests(Failed) > 0}] + } + ::tcltest::runAllTests +} + +# Exit code: 0=all passed, 1=one or more failed +return $::exitCode ADDED tests/test_vectors/Symetric_Stream/make_test.tcl Index: tests/test_vectors/Symetric_Stream/make_test.tcl ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/make_test.tcl @@ -0,0 +1,156 @@ +# +# Create Test Files for Test Vectors +# + +# +# Get string or hex string value +# +proc get_value {type data {count 1}} { + # Handle hex string + if {$type eq "s" && [string length $data] > 0 && [string index $data 0] ne "\""} { + set data [format {[binary decode hex %s]} $data] + } + if {$type eq "s" && $count > 1} { + set data [format {[string repeat %s %d]} $data $count] + } + if {[string length $data] == 0} { + set data {""} + } + return $data +} + +# +# Create test case and output to test file +# +proc do_test {group cipher test_num tc params fn} { + array set config [list Key "" Repeat 1 Length "" Offset 0 end end Plaintext {""} Ciphertext {""}] + array set config $params + set end [expr {$config(Offset) + [string length $config(Plaintext)]/2 - 1}] + + # Test info + set line [format "\ntcltest::test %s_%s-%d.%d {%s %s offset %d}" [string map [list "-" "_"] \ + $group] [string map [list "-" "_"] $cipher] $test_num $tc [string totitle $fn] $cipher $config(Offset)] + + # Test constraints + append line [format " \\\n\t-constraints %s" [string map [list "-" "_"] $cipher]] + + # Test body + if {$fn eq "encrypt"} { + set cmd [format "tls::encrypt -cipher %s -padding 0 -key %s \\\n\t\t-data %s" $cipher \ + [get_value s $config(Key)] [get_value s $config(Plaintext) $config(Repeat)]] + + append line " \\\n\t" [format {-body {binary encode hex [string range [%s] %d %d]}} $cmd $config(Offset) $end] " \\\n\t" + } else { + set ecmd [format "tls::encrypt -cipher %s -padding 0 -key %s \\\n\t\t-data %s" $cipher \ + [get_value s $config(Key)] [get_value s $config(Plaintext) $config(Repeat)]] + set cmd [format "tls::decrypt -cipher %s -padding 0 -key %s \\\n\t\t-data \[%s\]" $cipher \ + [get_value s $config(Key)] $ecmd] + append line " \\\n\t" [format {-body {binary encode hex [string range [%s] %d %d]}} $cmd $config(Offset) $end] " \\\n\t" + } + + # Test result + if {$fn eq "encrypt"} { + append line [format {-match exact -result %s} $config(Ciphertext)] + } else { + append line [format {-match exact -result %s} $config(Plaintext)] + } + return $line +} + +# +# Parse test vector file and create test files with test cases +# +proc parse {group filename test_num cipher} { + set tc 0 + set params [list] + + # Open input file + if {[catch {open $filename r} ch]} { + return -code error $ch + } + + # Open output file + if {[catch {open [format "%s.test" [file rootname $filename]] w} out]} { + return -code error $ch + } + + # Add config info + puts $out [format "# Auto generated from \"%s\"" [file tail $filename]] + puts $out [format "lappend auto_path %s" {[file dirname [file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]]}] + puts $out "package require tls" + puts $out "package require tcltest\n" + puts $out "catch {tls::provider legacy}" + puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $cipher] \ + [format {[expr {[lsearch -nocase [tls::ciphers] %s] > -1}]} $cipher]] + puts $out "" + + # Process file + while {![eof $ch]} { + gets $ch line + set line [string trim $line] + set len [string length $line] + + if {[string index $line 0] in [list "#" "\["]} { + # Skip comments and info lines + continue + + } elseif {$len == 0} { + if {[llength $params] > 0} { + # Do test if end of params + puts $out [do_test $group $cipher $test_num [incr tc] $params "encrypt"] + puts $out "" + puts $out [do_test $group $cipher $test_num [incr tc] $params "decrypt"] + puts $out "" + set params [list] + } else { + # Empty line + } + + } else { + # Append args to params + set index [string first "=" $line] + if {$index > -1} { + set key [string trim [string range $line 0 [incr index -1]]] + set value [string trim [string range $line [incr index 2] end]] + lappend params $key $value + } + } + } + + # Handle last test case + if {[llength $params] > 0} { + puts $out [do_test $group $cipher $test_num [incr tc] $params "encrypt"] + puts $out "" + puts $out [do_test $group $cipher $test_num [incr tc] $params "decrypt"] + puts $out "" + } + + # Cleanup + puts $out "# Cleanup\n::tcltest::cleanupTests\nreturn" + close $ch + close $out +} + +# +# Read all test vector files in directory +# +proc main {path} { + set group [file rootname [file tail $path]] + + foreach filename [glob -directory $path *.txt] { + puts [format "Processing %s" $filename] + set tail [file tail $filename] + if {[string match -nocase "Readme.txt" $tail]} { + continue + } + + set cipher [file rootname [file tail $filename]] + set id [format "%s_%s" $group $cipher] + set test_num [incr test_ids($id)] + if {$cipher eq "rc4-128"} {set cipher "rc4"} + parse $group $filename $test_num $cipher + } +} + +main [pwd] +exit ADDED tests/test_vectors/Symetric_Stream/rc4-128.test Index: tests/test_vectors/Symetric_Stream/rc4-128.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-128.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-128.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 rc4 [expr {[lsearch -nocase [tls::ciphers] rc4] > -1}] + + +tcltest::test Stream_rc4-1.1 {Encrypt rc4 offset 0} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 9ac7cc9a609d1ef7b2932899cde41b97 + + +tcltest::test Stream_rc4-1.2 {Decrypt rc4 offset 0} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.3 {Encrypt rc4 offset 16} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 5248c4959014126a6e8a84f11d1a9e1c + + +tcltest::test Stream_rc4-1.4 {Decrypt rc4 offset 16} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.5 {Encrypt rc4 offset 240} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 065902e4b620f6cc36c8589f66432f2b + + +tcltest::test Stream_rc4-1.6 {Decrypt rc4 offset 240} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.7 {Encrypt rc4 offset 256} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result d39d566bc6bce3010768151549f3873f + + +tcltest::test Stream_rc4-1.8 {Decrypt rc4 offset 256} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.9 {Encrypt rc4 offset 496} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result b6d1e6c4a5e4771cad79538df295fb11 + + +tcltest::test Stream_rc4-1.10 {Decrypt rc4 offset 496} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.11 {Encrypt rc4 offset 512} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result c68c1d5c559a974123df1dbc52a43b89 + + +tcltest::test Stream_rc4-1.12 {Decrypt rc4 offset 512} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.13 {Encrypt rc4 offset 752} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result c5ecf88de897fd57fed301701b82a259 + + +tcltest::test Stream_rc4-1.14 {Decrypt rc4 offset 752} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.15 {Encrypt rc4 offset 768} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result eccbe13de1fcc91c11a0b26c0bc8fa4d + + +tcltest::test Stream_rc4-1.16 {Decrypt rc4 offset 768} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.17 {Encrypt rc4 offset 1008} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result e7a72574f8782ae26aabcf9ebcd66065 + + +tcltest::test Stream_rc4-1.18 {Decrypt rc4 offset 1008} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.19 {Encrypt rc4 offset 1024} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result bdf0324e6083dcc6d3cedd3ca8c53c16 + + +tcltest::test Stream_rc4-1.20 {Decrypt rc4 offset 1024} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.21 {Encrypt rc4 offset 1520} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result b40110c4190b5622a96116b0017ed297 + + +tcltest::test Stream_rc4-1.22 {Decrypt rc4 offset 1520} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.23 {Encrypt rc4 offset 1536} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result ffa0b514647ec04f6306b892ae661181 + + +tcltest::test Stream_rc4-1.24 {Decrypt rc4 offset 1536} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.25 {Encrypt rc4 offset 2032} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result d03d1bc03cd33d70dff9fa5d71963ebd + + +tcltest::test Stream_rc4-1.26 {Decrypt rc4 offset 2032} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.27 {Encrypt rc4 offset 2048} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 8a44126411eaa78bd51e8d87a8879bf5 + + +tcltest::test Stream_rc4-1.28 {Decrypt rc4 offset 2048} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.29 {Encrypt rc4 offset 3056} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result fabeb76028ade2d0e48722e46c4615a3 + + +tcltest::test Stream_rc4-1.30 {Decrypt rc4 offset 3056} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.31 {Encrypt rc4 offset 3072} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result c05d88abd50357f935a63c59ee537623 + + +tcltest::test Stream_rc4-1.32 {Decrypt rc4 offset 3072} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.33 {Encrypt rc4 offset 4080} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result ff38265c1642c1abe8d3c2fe5e572bf8 + + +tcltest::test Stream_rc4-1.34 {Decrypt rc4 offset 4080} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.35 {Encrypt rc4 offset 4096} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result a36a4c301ae8ac13610ccbc12256cacc + + +tcltest::test Stream_rc4-1.36 {Decrypt rc4 offset 4096} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f10] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.37 {Encrypt rc4 offset 0} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 720c94b63edf44e131d950ca211a5a30 + + +tcltest::test Stream_rc4-1.38 {Decrypt rc4 offset 0} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.39 {Encrypt rc4 offset 16} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result c366fdeacf9ca80436be7c358424d20b + + +tcltest::test Stream_rc4-1.40 {Decrypt rc4 offset 16} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.41 {Encrypt rc4 offset 240} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result b3394a40aabf75cba42282ef25a0059f + + +tcltest::test Stream_rc4-1.42 {Decrypt rc4 offset 240} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.43 {Encrypt rc4 offset 256} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 4847d81da4942dbc249defc48c922b9f + + +tcltest::test Stream_rc4-1.44 {Decrypt rc4 offset 256} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.45 {Encrypt rc4 offset 496} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 08128c469f275342adda202b2b58da95 + + +tcltest::test Stream_rc4-1.46 {Decrypt rc4 offset 496} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.47 {Encrypt rc4 offset 512} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 970dacef40ad98723bac5d6955b81761 + + +tcltest::test Stream_rc4-1.48 {Decrypt rc4 offset 512} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.49 {Encrypt rc4 offset 752} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 3cb89993b07b0ced93de13d2a11013ac + + +tcltest::test Stream_rc4-1.50 {Decrypt rc4 offset 752} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.51 {Encrypt rc4 offset 768} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result ef2d676f1545c2c13dc680a02f4adbfe + + +tcltest::test Stream_rc4-1.52 {Decrypt rc4 offset 768} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.53 {Encrypt rc4 offset 1008} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result b60595514f24bc9fe522a6cad7393644 + + +tcltest::test Stream_rc4-1.54 {Decrypt rc4 offset 1008} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.55 {Encrypt rc4 offset 1024} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result b515a8c5011754f59003058bdb81514e + + +tcltest::test Stream_rc4-1.56 {Decrypt rc4 offset 1024} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.57 {Encrypt rc4 offset 1520} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 3c70047e8cbc038e3b9820db601da495 + + +tcltest::test Stream_rc4-1.58 {Decrypt rc4 offset 1520} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.59 {Encrypt rc4 offset 1536} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 1175da6ee756de46a53e2b075660b770 + + +tcltest::test Stream_rc4-1.60 {Decrypt rc4 offset 1536} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.61 {Encrypt rc4 offset 2032} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 00a542bba02111cc2c65b38ebdba587e + + +tcltest::test Stream_rc4-1.62 {Decrypt rc4 offset 2032} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.63 {Encrypt rc4 offset 2048} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 5865fdbb5b48064104e830b380f2aede + + +tcltest::test Stream_rc4-1.64 {Decrypt rc4 offset 2048} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.65 {Encrypt rc4 offset 3056} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 34b21ad2ad44e999db2d7f0863f0d9b6 + + +tcltest::test Stream_rc4-1.66 {Decrypt rc4 offset 3056} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.67 {Encrypt rc4 offset 3072} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 84a9218fc36e8a5f2ccfbeae53a27d25 + + +tcltest::test Stream_rc4-1.68 {Decrypt rc4 offset 3072} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.69 {Encrypt rc4 offset 4080} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result a2221a11b833ccb498a59540f0545f4a + + +tcltest::test Stream_rc4-1.70 {Decrypt rc4 offset 4080} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4-1.71 {Encrypt rc4 offset 4096} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 5bbeb4787d59e5373fdbea6c6f75c29b + + +tcltest::test Stream_rc4-1.72 {Decrypt rc4 offset 4096} \ + -constraints rc4 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4 -padding 0 -key [binary decode hex ebb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-128.txt Index: tests/test_vectors/Symetric_Stream/rc4-128.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-128.txt @@ -0,0 +1,255 @@ +# RC4 128-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9ac7cc9a609d1ef7b2932899cde41b97 + +Count = 1 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5248c4959014126a6e8a84f11d1a9e1c + +Count = 2 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 065902e4b620f6cc36c8589f66432f2b + +Count = 3 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d39d566bc6bce3010768151549f3873f + +Count = 4 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b6d1e6c4a5e4771cad79538df295fb11 + +Count = 5 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c68c1d5c559a974123df1dbc52a43b89 + +Count = 6 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c5ecf88de897fd57fed301701b82a259 + +Count = 7 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = eccbe13de1fcc91c11a0b26c0bc8fa4d + +Count = 8 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e7a72574f8782ae26aabcf9ebcd66065 + +Count = 9 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bdf0324e6083dcc6d3cedd3ca8c53c16 + +Count = 10 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b40110c4190b5622a96116b0017ed297 + +Count = 11 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ffa0b514647ec04f6306b892ae661181 + +Count = 12 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d03d1bc03cd33d70dff9fa5d71963ebd + +Count = 13 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8a44126411eaa78bd51e8d87a8879bf5 + +Count = 14 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = fabeb76028ade2d0e48722e46c4615a3 + +Count = 15 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c05d88abd50357f935a63c59ee537623 + +Count = 16 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ff38265c1642c1abe8d3c2fe5e572bf8 + +Count = 17 +Key = 0102030405060708090a0b0c0d0e0f10 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = a36a4c301ae8ac13610ccbc12256cacc + +# key 2 +Count = 18 +Key = ebb46227c6cc8b37641910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 720c94b63edf44e131d950ca211a5a30 + +Count = 19 +Key = ebb46227c6cc8b37641910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c366fdeacf9ca80436be7c358424d20b + +Count = 20 +Key = ebb46227c6cc8b37641910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b3394a40aabf75cba42282ef25a0059f + +Count = 21 +Key = ebb46227c6cc8b37641910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 4847d81da4942dbc249defc48c922b9f + +Count = 22 +Key = ebb46227c6cc8b37641910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 08128c469f275342adda202b2b58da95 + +Count = 23 +Key = ebb46227c6cc8b37641910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 970dacef40ad98723bac5d6955b81761 + +Count = 24 +Key = ebb46227c6cc8b37641910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3cb89993b07b0ced93de13d2a11013ac + +Count = 25 +Key = ebb46227c6cc8b37641910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ef2d676f1545c2c13dc680a02f4adbfe + +Count = 26 +Key = ebb46227c6cc8b37641910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b60595514f24bc9fe522a6cad7393644 + +Count = 27 +Key = ebb46227c6cc8b37641910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b515a8c5011754f59003058bdb81514e + +Count = 28 +Key = ebb46227c6cc8b37641910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3c70047e8cbc038e3b9820db601da495 + +Count = 29 +Key = ebb46227c6cc8b37641910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1175da6ee756de46a53e2b075660b770 + +Count = 30 +Key = ebb46227c6cc8b37641910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 00a542bba02111cc2c65b38ebdba587e + +Count = 31 +Key = ebb46227c6cc8b37641910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5865fdbb5b48064104e830b380f2aede + +Count = 32 +Key = ebb46227c6cc8b37641910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 34b21ad2ad44e999db2d7f0863f0d9b6 + +Count = 33 +Key = ebb46227c6cc8b37641910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 84a9218fc36e8a5f2ccfbeae53a27d25 + +Count = 34 +Key = ebb46227c6cc8b37641910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = a2221a11b833ccb498a59540f0545f4a + +Count = 35 +Key = ebb46227c6cc8b37641910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5bbeb4787d59e5373fdbea6c6f75c29b ADDED tests/test_vectors/Symetric_Stream/rc4-192.test Index: tests/test_vectors/Symetric_Stream/rc4-192.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-192.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-192.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 rc4_192 [expr {[lsearch -nocase [tls::ciphers] rc4-192] > -1}] + + +tcltest::test Stream_rc4_192-1.1 {Encrypt rc4-192 offset 0} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 0595e57fe5f0bb3c706edac8a4b2db11 + + +tcltest::test Stream_rc4_192-1.2 {Decrypt rc4-192 offset 0} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.3 {Encrypt rc4-192 offset 16} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result dfde31344a1af769c74f070aee9e2326 + + +tcltest::test Stream_rc4_192-1.4 {Decrypt rc4-192 offset 16} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.5 {Encrypt rc4-192 offset 240} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result b06b9b1e195d13d8f4a7995c4553ac05 + + +tcltest::test Stream_rc4_192-1.6 {Decrypt rc4-192 offset 240} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.7 {Encrypt rc4-192 offset 256} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 6bd2378ec341c9a42f37ba79f88a32ff + + +tcltest::test Stream_rc4_192-1.8 {Decrypt rc4-192 offset 256} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.9 {Encrypt rc4-192 offset 496} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result e70bce1df7645adb5d2c4130215c3522 + + +tcltest::test Stream_rc4_192-1.10 {Decrypt rc4-192 offset 496} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.11 {Encrypt rc4-192 offset 512} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 9a5730c7fcb4c9af51ffda89c7f1ad22 + + +tcltest::test Stream_rc4_192-1.12 {Decrypt rc4-192 offset 512} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.13 {Encrypt rc4-192 offset 752} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 0485055fd4f6f0d963ef5ab9a5476982 + + +tcltest::test Stream_rc4_192-1.14 {Decrypt rc4-192 offset 752} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.15 {Encrypt rc4-192 offset 768} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 591fc66bcda10e452b03d4551f6b62ac + + +tcltest::test Stream_rc4_192-1.16 {Decrypt rc4-192 offset 768} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.17 {Encrypt rc4-192 offset 1008} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 2753cc83988afa3e1688a1d3b42c9a02 + + +tcltest::test Stream_rc4_192-1.18 {Decrypt rc4-192 offset 1008} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.19 {Encrypt rc4-192 offset 1024} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 93610d523d1d3f0062b3c2a3bbc7c7f0 + + +tcltest::test Stream_rc4_192-1.20 {Decrypt rc4-192 offset 1024} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.21 {Encrypt rc4-192 offset 1520} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 96c248610aadedfeaf8978c03de8205a + + +tcltest::test Stream_rc4_192-1.22 {Decrypt rc4-192 offset 1520} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.23 {Encrypt rc4-192 offset 1536} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 0e317b3d1c73b9e9a4688f296d133a19 + + +tcltest::test Stream_rc4_192-1.24 {Decrypt rc4-192 offset 1536} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.25 {Encrypt rc4-192 offset 2032} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result bdf0e6c3cca5b5b9d533b69c56ada120 + + +tcltest::test Stream_rc4_192-1.26 {Decrypt rc4-192 offset 2032} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.27 {Encrypt rc4-192 offset 2048} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 88a218b6e2ece1e6246d44c759d19b10 + + +tcltest::test Stream_rc4_192-1.28 {Decrypt rc4-192 offset 2048} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.29 {Encrypt rc4-192 offset 3056} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 6866397e95c140534f94263421006e40 + + +tcltest::test Stream_rc4_192-1.30 {Decrypt rc4-192 offset 3056} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.31 {Encrypt rc4-192 offset 3072} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 32cb0a1e9542c6b3b8b398abc3b0f1d5 + + +tcltest::test Stream_rc4_192-1.32 {Decrypt rc4-192 offset 3072} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.33 {Encrypt rc4-192 offset 4080} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 29a0b8aed54a132324c62e423f54b4c8 + + +tcltest::test Stream_rc4_192-1.34 {Decrypt rc4-192 offset 4080} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.35 {Encrypt rc4-192 offset 4096} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 3cb0f3b5020a98b82af9fe154484a168 + + +tcltest::test Stream_rc4_192-1.36 {Decrypt rc4-192 offset 4096} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.37 {Encrypt rc4-192 offset 0} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 54b64e6b5a20b5e2ec84593dc7989da7 + + +tcltest::test Stream_rc4_192-1.38 {Decrypt rc4-192 offset 0} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.39 {Encrypt rc4-192 offset 16} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result c135eee237a85465ff97dc03924f45ce + + +tcltest::test Stream_rc4_192-1.40 {Decrypt rc4-192 offset 16} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.41 {Encrypt rc4-192 offset 240} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result cfcc922fb4a14ab45d6175aabbf2d201 + + +tcltest::test Stream_rc4_192-1.42 {Decrypt rc4-192 offset 240} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.43 {Encrypt rc4-192 offset 256} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 837b87e2a446ad0ef798acd02b94124f + + +tcltest::test Stream_rc4_192-1.44 {Decrypt rc4-192 offset 256} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.45 {Encrypt rc4-192 offset 496} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 17a6dbd664926a0636b3f4c37a4f4694 + + +tcltest::test Stream_rc4_192-1.46 {Decrypt rc4-192 offset 496} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.47 {Encrypt rc4-192 offset 512} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 4a5f9f26aeeed4d4a25f632d305233d9 + + +tcltest::test Stream_rc4_192-1.48 {Decrypt rc4-192 offset 512} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.49 {Encrypt rc4-192 offset 752} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 80a3d01ef00c8e9a4209c17f4eeb358c + + +tcltest::test Stream_rc4_192-1.50 {Decrypt rc4-192 offset 752} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.51 {Encrypt rc4-192 offset 768} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result d15e7d5ffaaabc0207bf200a117793a2 + + +tcltest::test Stream_rc4_192-1.52 {Decrypt rc4-192 offset 768} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.53 {Encrypt rc4-192 offset 1008} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 349682bf588eaa52d0aa1560346aeafa + + +tcltest::test Stream_rc4_192-1.54 {Decrypt rc4-192 offset 1008} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.55 {Encrypt rc4-192 offset 1024} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result f5854cdb76c889e3ad63354e5f7275e3 + + +tcltest::test Stream_rc4_192-1.56 {Decrypt rc4-192 offset 1024} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.57 {Encrypt rc4-192 offset 1520} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 532c7ceccb39df3236318405a4b1279c + + +tcltest::test Stream_rc4_192-1.58 {Decrypt rc4-192 offset 1520} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.59 {Encrypt rc4-192 offset 1536} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result baefe6d9ceb651842260e0d1e05e3b90 + + +tcltest::test Stream_rc4_192-1.60 {Decrypt rc4-192 offset 1536} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.61 {Encrypt rc4-192 offset 2032} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result e82d8c6db54e3c633f581c952ba04207 + + +tcltest::test Stream_rc4_192-1.62 {Decrypt rc4-192 offset 2032} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.63 {Encrypt rc4-192 offset 2048} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 4b16e50abd381bd70900a9cd9a62cb23 + + +tcltest::test Stream_rc4_192-1.64 {Decrypt rc4-192 offset 2048} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.65 {Encrypt rc4-192 offset 3056} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 3682ee33bd148bd9f58656cd8f30d9fb + + +tcltest::test Stream_rc4_192-1.66 {Decrypt rc4-192 offset 3056} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.67 {Encrypt rc4-192 offset 3072} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 1e5a0b8475045d9b20b2628624edfd9e + + +tcltest::test Stream_rc4_192-1.68 {Decrypt rc4-192 offset 3072} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.69 {Encrypt rc4-192 offset 4080} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 63edd684fb826282fe528f9c0e9237bc + + +tcltest::test Stream_rc4_192-1.70 {Decrypt rc4-192 offset 4080} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_192-1.71 {Encrypt rc4-192 offset 4096} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result e4dd2e98d6960fae0b43545456743391 + + +tcltest::test Stream_rc4_192-1.72 {Decrypt rc4-192 offset 4096} \ + -constraints rc4_192 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-192 -padding 0 -key [binary decode hex c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-192.txt Index: tests/test_vectors/Symetric_Stream/rc4-192.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-192.txt @@ -0,0 +1,255 @@ +# RC4 192-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0595e57fe5f0bb3c706edac8a4b2db11 + +Count = 1 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = dfde31344a1af769c74f070aee9e2326 + +Count = 2 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b06b9b1e195d13d8f4a7995c4553ac05 + +Count = 3 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6bd2378ec341c9a42f37ba79f88a32ff + +Count = 4 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e70bce1df7645adb5d2c4130215c3522 + +Count = 5 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9a5730c7fcb4c9af51ffda89c7f1ad22 + +Count = 6 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0485055fd4f6f0d963ef5ab9a5476982 + +Count = 7 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 591fc66bcda10e452b03d4551f6b62ac + +Count = 8 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 2753cc83988afa3e1688a1d3b42c9a02 + +Count = 9 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 93610d523d1d3f0062b3c2a3bbc7c7f0 + +Count = 10 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 96c248610aadedfeaf8978c03de8205a + +Count = 11 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0e317b3d1c73b9e9a4688f296d133a19 + +Count = 12 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bdf0e6c3cca5b5b9d533b69c56ada120 + +Count = 13 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 88a218b6e2ece1e6246d44c759d19b10 + +Count = 14 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6866397e95c140534f94263421006e40 + +Count = 15 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 32cb0a1e9542c6b3b8b398abc3b0f1d5 + +Count = 16 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 29a0b8aed54a132324c62e423f54b4c8 + +Count = 17 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3cb0f3b5020a98b82af9fe154484a168 + +# key 2 +Count = 18 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 54b64e6b5a20b5e2ec84593dc7989da7 + +Count = 19 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c135eee237a85465ff97dc03924f45ce + +Count = 20 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = cfcc922fb4a14ab45d6175aabbf2d201 + +Count = 21 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 837b87e2a446ad0ef798acd02b94124f + +Count = 22 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 17a6dbd664926a0636b3f4c37a4f4694 + +Count = 23 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 4a5f9f26aeeed4d4a25f632d305233d9 + +Count = 24 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 80a3d01ef00c8e9a4209c17f4eeb358c + +Count = 25 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d15e7d5ffaaabc0207bf200a117793a2 + +Count = 26 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 349682bf588eaa52d0aa1560346aeafa + +Count = 27 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f5854cdb76c889e3ad63354e5f7275e3 + +Count = 28 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 532c7ceccb39df3236318405a4b1279c + +Count = 29 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = baefe6d9ceb651842260e0d1e05e3b90 + +Count = 30 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e82d8c6db54e3c633f581c952ba04207 + +Count = 31 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 4b16e50abd381bd70900a9cd9a62cb23 + +Count = 32 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3682ee33bd148bd9f58656cd8f30d9fb + +Count = 33 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1e5a0b8475045d9b20b2628624edfd9e + +Count = 34 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 63edd684fb826282fe528f9c0e9237bc + +Count = 35 +Key = c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e4dd2e98d6960fae0b43545456743391 ADDED tests/test_vectors/Symetric_Stream/rc4-256.test Index: tests/test_vectors/Symetric_Stream/rc4-256.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-256.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-256.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 rc4_256 [expr {[lsearch -nocase [tls::ciphers] rc4-256] > -1}] + + +tcltest::test Stream_rc4_256-1.1 {Encrypt rc4-256 offset 0} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result eaa6bd25880bf93d3f5d1e4ca2611d91 + + +tcltest::test Stream_rc4_256-1.2 {Decrypt rc4-256 offset 0} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.3 {Encrypt rc4-256 offset 16} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result cfa45c9f7e714b54bdfa80027cb14380 + + +tcltest::test Stream_rc4_256-1.4 {Decrypt rc4-256 offset 16} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.5 {Encrypt rc4-256 offset 240} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 114ae344ded71b35f2e60febad727fd8 + + +tcltest::test Stream_rc4_256-1.6 {Decrypt rc4-256 offset 240} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.7 {Encrypt rc4-256 offset 256} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 02e1e7056b0f623900496422943e97b6 + + +tcltest::test Stream_rc4_256-1.8 {Decrypt rc4-256 offset 256} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.9 {Encrypt rc4-256 offset 496} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 91cb93c787964e10d9527d999c6f936b + + +tcltest::test Stream_rc4_256-1.10 {Decrypt rc4-256 offset 496} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.11 {Encrypt rc4-256 offset 512} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 49b18b42f8e8367cbeb5ef104ba1c7cd + + +tcltest::test Stream_rc4_256-1.12 {Decrypt rc4-256 offset 512} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.13 {Encrypt rc4-256 offset 752} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 87084b3ba700bade955610672745b374 + + +tcltest::test Stream_rc4_256-1.14 {Decrypt rc4-256 offset 752} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.15 {Encrypt rc4-256 offset 768} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result e7a7b9e9ec540d5ff43bdb12792d1b35 + + +tcltest::test Stream_rc4_256-1.16 {Decrypt rc4-256 offset 768} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.17 {Encrypt rc4-256 offset 1008} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result c799b596738f6b018c76c74b1759bd90 + + +tcltest::test Stream_rc4_256-1.18 {Decrypt rc4-256 offset 1008} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.19 {Encrypt rc4-256 offset 1024} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 7fec5bfd9f9b89ce6548309092d7e958 + + +tcltest::test Stream_rc4_256-1.20 {Decrypt rc4-256 offset 1024} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.21 {Encrypt rc4-256 offset 1520} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 40f250b26d1f096a4afd4c340a588815 + + +tcltest::test Stream_rc4_256-1.22 {Decrypt rc4-256 offset 1520} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.23 {Encrypt rc4-256 offset 1536} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 3e34135c79db010200767651cf263073 + + +tcltest::test Stream_rc4_256-1.24 {Decrypt rc4-256 offset 1536} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.25 {Encrypt rc4-256 offset 2032} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result f656abccf88dd827027b2ce917d464ec + + +tcltest::test Stream_rc4_256-1.26 {Decrypt rc4-256 offset 2032} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.27 {Encrypt rc4-256 offset 2048} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 18b62503bfbc077fbabb98f20d98ab34 + + +tcltest::test Stream_rc4_256-1.28 {Decrypt rc4-256 offset 2048} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.29 {Encrypt rc4-256 offset 3056} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 8aed95ee5b0dcbfbef4eb21d3a3f52f9 + + +tcltest::test Stream_rc4_256-1.30 {Decrypt rc4-256 offset 3056} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.31 {Encrypt rc4-256 offset 3072} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 625a1ab00ee39a5327346bddb01a9c18 + + +tcltest::test Stream_rc4_256-1.32 {Decrypt rc4-256 offset 3072} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.33 {Encrypt rc4-256 offset 4080} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result a13a7c79c7e119b5ab0296ab28c300b9 + + +tcltest::test Stream_rc4_256-1.34 {Decrypt rc4-256 offset 4080} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.35 {Encrypt rc4-256 offset 4096} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result f3e4c0a2e02d1d01f7f0a74618af2b48 + + +tcltest::test Stream_rc4_256-1.36 {Decrypt rc4-256 offset 4096} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.37 {Encrypt rc4-256 offset 0} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result dd5bcb0018e922d494759d7c395d02d3 + + +tcltest::test Stream_rc4_256-1.38 {Decrypt rc4-256 offset 0} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.39 {Encrypt rc4-256 offset 16} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result c8446f8f77abf737685353eb89a1c9eb + + +tcltest::test Stream_rc4_256-1.40 {Decrypt rc4-256 offset 16} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.41 {Encrypt rc4-256 offset 240} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result af3e30f9c095045938151575c3fb9098 + + +tcltest::test Stream_rc4_256-1.42 {Decrypt rc4-256 offset 240} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.43 {Encrypt rc4-256 offset 256} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result f8cb6274db99b80b1d2012a98ed48f0e + + +tcltest::test Stream_rc4_256-1.44 {Decrypt rc4-256 offset 256} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.45 {Encrypt rc4-256 offset 496} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 25c3005a1cb85de076259839ab7198ab + + +tcltest::test Stream_rc4_256-1.46 {Decrypt rc4-256 offset 496} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.47 {Encrypt rc4-256 offset 512} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 9dcbc183e8cb994b727b75be3180769c + + +tcltest::test Stream_rc4_256-1.48 {Decrypt rc4-256 offset 512} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.49 {Encrypt rc4-256 offset 752} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result a1d3078dfa9169503ed9d4491dee4eb2 + + +tcltest::test Stream_rc4_256-1.50 {Decrypt rc4-256 offset 752} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.51 {Encrypt rc4-256 offset 768} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 8514a5495858096f596e4bcd66b10665 + + +tcltest::test Stream_rc4_256-1.52 {Decrypt rc4-256 offset 768} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.53 {Encrypt rc4-256 offset 1008} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 5f40d59ec1b03b33738efa60b2255d31 + + +tcltest::test Stream_rc4_256-1.54 {Decrypt rc4-256 offset 1008} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.55 {Encrypt rc4-256 offset 1024} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 3477c7f764a41baceff90bf14f92b7cc + + +tcltest::test Stream_rc4_256-1.56 {Decrypt rc4-256 offset 1024} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.57 {Encrypt rc4-256 offset 1520} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result ac4e95368d99b9eb78b8da8f81ffa795 + + +tcltest::test Stream_rc4_256-1.58 {Decrypt rc4-256 offset 1520} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.59 {Encrypt rc4-256 offset 1536} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 8c3c13f8c2388bb73f38576e65b7c446 + + +tcltest::test Stream_rc4_256-1.60 {Decrypt rc4-256 offset 1536} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.61 {Encrypt rc4-256 offset 2032} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 13c4b9c1dfb66579eddd8a280b9f7316 + + +tcltest::test Stream_rc4_256-1.62 {Decrypt rc4-256 offset 2032} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.63 {Encrypt rc4-256 offset 2048} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result ddd27820550126698efaadc64b64f66e + + +tcltest::test Stream_rc4_256-1.64 {Decrypt rc4-256 offset 2048} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.65 {Encrypt rc4-256 offset 3056} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result f08f2e66d28ed143f3a237cf9de73559 + + +tcltest::test Stream_rc4_256-1.66 {Decrypt rc4-256 offset 3056} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.67 {Encrypt rc4-256 offset 3072} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 9ea36c525531b880ba124334f57b0b70 + + +tcltest::test Stream_rc4_256-1.68 {Decrypt rc4-256 offset 3072} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.69 {Encrypt rc4-256 offset 4080} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result d5a39e3dfcc50280bac4a6b5aa0dca7d + + +tcltest::test Stream_rc4_256-1.70 {Decrypt rc4-256 offset 4080} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_256-1.71 {Encrypt rc4-256 offset 4096} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 370b1c1fe655916d97fd0d47ca1d72b8 + + +tcltest::test Stream_rc4_256-1.72 {Decrypt rc4-256 offset 4096} \ + -constraints rc4_256 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-256 -padding 0 -key [binary decode hex 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-256.txt Index: tests/test_vectors/Symetric_Stream/rc4-256.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-256.txt @@ -0,0 +1,255 @@ +# RC4 256-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = eaa6bd25880bf93d3f5d1e4ca2611d91 + +Count = 1 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = cfa45c9f7e714b54bdfa80027cb14380 + +Count = 2 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 114ae344ded71b35f2e60febad727fd8 + +Count = 3 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 02e1e7056b0f623900496422943e97b6 + +Count = 4 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 91cb93c787964e10d9527d999c6f936b + +Count = 5 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 49b18b42f8e8367cbeb5ef104ba1c7cd + +Count = 6 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 87084b3ba700bade955610672745b374 + +Count = 7 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e7a7b9e9ec540d5ff43bdb12792d1b35 + +Count = 8 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c799b596738f6b018c76c74b1759bd90 + +Count = 9 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 7fec5bfd9f9b89ce6548309092d7e958 + +Count = 10 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 40f250b26d1f096a4afd4c340a588815 + +Count = 11 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3e34135c79db010200767651cf263073 + +Count = 12 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f656abccf88dd827027b2ce917d464ec + +Count = 13 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 18b62503bfbc077fbabb98f20d98ab34 + +Count = 14 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8aed95ee5b0dcbfbef4eb21d3a3f52f9 + +Count = 15 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 625a1ab00ee39a5327346bddb01a9c18 + +Count = 16 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = a13a7c79c7e119b5ab0296ab28c300b9 + +Count = 17 +Key = 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f3e4c0a2e02d1d01f7f0a74618af2b48 + +# key 2 +Count = 18 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = dd5bcb0018e922d494759d7c395d02d3 + +Count = 19 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c8446f8f77abf737685353eb89a1c9eb + +Count = 20 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = af3e30f9c095045938151575c3fb9098 + +Count = 21 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f8cb6274db99b80b1d2012a98ed48f0e + +Count = 22 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 25c3005a1cb85de076259839ab7198ab + +Count = 23 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9dcbc183e8cb994b727b75be3180769c + +Count = 24 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = a1d3078dfa9169503ed9d4491dee4eb2 + +Count = 25 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8514a5495858096f596e4bcd66b10665 + +Count = 26 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5f40d59ec1b03b33738efa60b2255d31 + +Count = 27 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3477c7f764a41baceff90bf14f92b7cc + +Count = 28 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ac4e95368d99b9eb78b8da8f81ffa795 + +Count = 29 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8c3c13f8c2388bb73f38576e65b7c446 + +Count = 30 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 13c4b9c1dfb66579eddd8a280b9f7316 + +Count = 31 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ddd27820550126698efaadc64b64f66e + +Count = 32 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f08f2e66d28ed143f3a237cf9de73559 + +Count = 33 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9ea36c525531b880ba124334f57b0b70 + +Count = 34 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d5a39e3dfcc50280bac4a6b5aa0dca7d + +Count = 35 +Key = 1ada31d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 370b1c1fe655916d97fd0d47ca1d72b8 ADDED tests/test_vectors/Symetric_Stream/rc4-40.test Index: tests/test_vectors/Symetric_Stream/rc4-40.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-40.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-40.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 rc4_40 [expr {[lsearch -nocase [tls::ciphers] rc4-40] > -1}] + + +tcltest::test Stream_rc4_40-1.1 {Encrypt rc4-40 offset 0} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result b2396305f03dc027ccc3524a0a1118a8 + + +tcltest::test Stream_rc4_40-1.2 {Decrypt rc4-40 offset 0} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.3 {Encrypt rc4-40 offset 16} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 6982944f18fc82d589c403a47a0d0919 + + +tcltest::test Stream_rc4_40-1.4 {Decrypt rc4-40 offset 16} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.5 {Encrypt rc4-40 offset 240} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 28cb1132c96ce286421dcaadb8b69eae + + +tcltest::test Stream_rc4_40-1.6 {Decrypt rc4-40 offset 240} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.7 {Encrypt rc4-40 offset 256} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 1cfcf62b03eddb641d77dfcf7f8d8c93 + + +tcltest::test Stream_rc4_40-1.8 {Decrypt rc4-40 offset 256} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.9 {Encrypt rc4-40 offset 496} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 42b7d0cdd918a8a33dd51781c81f4041 + + +tcltest::test Stream_rc4_40-1.10 {Decrypt rc4-40 offset 496} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.11 {Encrypt rc4-40 offset 512} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 6459844432a7da923cfb3eb4980661f6 + + +tcltest::test Stream_rc4_40-1.12 {Decrypt rc4-40 offset 512} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.13 {Encrypt rc4-40 offset 752} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result ec10327bde2beefd18f9277680457e22 + + +tcltest::test Stream_rc4_40-1.14 {Decrypt rc4-40 offset 752} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.15 {Encrypt rc4-40 offset 768} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result eb62638d4f0ba1fe9fca20e05bf8ff2b + + +tcltest::test Stream_rc4_40-1.16 {Decrypt rc4-40 offset 768} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.17 {Encrypt rc4-40 offset 1008} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 45129048e6a0ed0b56b490338f078da5 + + +tcltest::test Stream_rc4_40-1.18 {Decrypt rc4-40 offset 1008} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.19 {Encrypt rc4-40 offset 1024} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 30abbcc7c20b01609f23ee2d5f6bb7df + + +tcltest::test Stream_rc4_40-1.20 {Decrypt rc4-40 offset 1024} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.21 {Encrypt rc4-40 offset 1520} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 3294f744d8f9790507e70f62e5bbceea + + +tcltest::test Stream_rc4_40-1.22 {Decrypt rc4-40 offset 1520} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.23 {Encrypt rc4-40 offset 1536} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result d8729db41882259bee4f825325f5a130 + + +tcltest::test Stream_rc4_40-1.24 {Decrypt rc4-40 offset 1536} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.25 {Encrypt rc4-40 offset 2032} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 1eb14a0c13b3bf47fa2a0ba93ad45b8b + + +tcltest::test Stream_rc4_40-1.26 {Decrypt rc4-40 offset 2032} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.27 {Encrypt rc4-40 offset 2048} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result cc582f8ba9f265e2b1be9112e975d2d7 + + +tcltest::test Stream_rc4_40-1.28 {Decrypt rc4-40 offset 2048} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.29 {Encrypt rc4-40 offset 3056} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result f2e30f9bd102ecbf75aaade9bc35c43c + + +tcltest::test Stream_rc4_40-1.30 {Decrypt rc4-40 offset 3056} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.31 {Encrypt rc4-40 offset 3072} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result ec0e11c479dc329dc8da7968fe965681 + + +tcltest::test Stream_rc4_40-1.32 {Decrypt rc4-40 offset 3072} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.33 {Encrypt rc4-40 offset 4080} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 068326a2118416d21f9d04b2cd1ca050 + + +tcltest::test Stream_rc4_40-1.34 {Decrypt rc4-40 offset 4080} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.35 {Encrypt rc4-40 offset 4096} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result ff25b58995996707e51fbdf08b34d875 + + +tcltest::test Stream_rc4_40-1.36 {Decrypt rc4-40 offset 4096} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 0102030405] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.37 {Encrypt rc4-40 offset 0} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 80ad97bdc973df8a2e879e92a497efda + + +tcltest::test Stream_rc4_40-1.38 {Decrypt rc4-40 offset 0} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.39 {Encrypt rc4-40 offset 16} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 20f060c2f2e5126501d3d4fea10d5fc0 + + +tcltest::test Stream_rc4_40-1.40 {Decrypt rc4-40 offset 16} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.41 {Encrypt rc4-40 offset 240} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result faa148e99046181fec6b2085f3b20ed9 + + +tcltest::test Stream_rc4_40-1.42 {Decrypt rc4-40 offset 240} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.43 {Encrypt rc4-40 offset 256} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result f0daf5bab3d596839857846f73fbfe5a + + +tcltest::test Stream_rc4_40-1.44 {Decrypt rc4-40 offset 256} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.45 {Encrypt rc4-40 offset 496} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 1c7e2fc4639232fe297584b296996bc8 + + +tcltest::test Stream_rc4_40-1.46 {Decrypt rc4-40 offset 496} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.47 {Encrypt rc4-40 offset 512} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 3db9b249406cc8edffac55ccd322ba12 + + +tcltest::test Stream_rc4_40-1.48 {Decrypt rc4-40 offset 512} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.49 {Encrypt rc4-40 offset 752} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result e4f9f7e0066154bbd125b745569bc897 + + +tcltest::test Stream_rc4_40-1.50 {Decrypt rc4-40 offset 752} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.51 {Encrypt rc4-40 offset 768} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 75d5ef262b44c41a9cf63ae14568e1b9 + + +tcltest::test Stream_rc4_40-1.52 {Decrypt rc4-40 offset 768} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.53 {Encrypt rc4-40 offset 1008} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 6da453dbf81e82334a3d8866cb50a1e3 + + +tcltest::test Stream_rc4_40-1.54 {Decrypt rc4-40 offset 1008} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.55 {Encrypt rc4-40 offset 1024} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 7828d074119cab5c22b294d7a9bfa0bb + + +tcltest::test Stream_rc4_40-1.56 {Decrypt rc4-40 offset 1024} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.57 {Encrypt rc4-40 offset 1520} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result adb89cea9a15fbe617295bd04b8ca05c + + +tcltest::test Stream_rc4_40-1.58 {Decrypt rc4-40 offset 1520} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.59 {Encrypt rc4-40 offset 1536} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 6251d87fd4aaae9a7e4ad5c217d3f300 + + +tcltest::test Stream_rc4_40-1.60 {Decrypt rc4-40 offset 1536} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.61 {Encrypt rc4-40 offset 2032} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result e7119bd6dd9b22afe8f89585432881e2 + + +tcltest::test Stream_rc4_40-1.62 {Decrypt rc4-40 offset 2032} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.63 {Encrypt rc4-40 offset 2048} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 785b60fd7ec4e9fcb6545f350d660fab + + +tcltest::test Stream_rc4_40-1.64 {Decrypt rc4-40 offset 2048} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.65 {Encrypt rc4-40 offset 3056} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result afecc037fdb7b0838eb3d70bcd268382 + + +tcltest::test Stream_rc4_40-1.66 {Decrypt rc4-40 offset 3056} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.67 {Encrypt rc4-40 offset 3072} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result dbc1a7b49d57358cc9fa6d61d73b7cf0 + + +tcltest::test Stream_rc4_40-1.68 {Decrypt rc4-40 offset 3072} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.69 {Encrypt rc4-40 offset 4080} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 6349d126a37afcba89794f9804914fdc + + +tcltest::test Stream_rc4_40-1.70 {Decrypt rc4-40 offset 4080} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_40-1.71 {Encrypt rc4-40 offset 4096} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result bf42c3018c2f7c66bfde524975768115 + + +tcltest::test Stream_rc4_40-1.72 {Decrypt rc4-40 offset 4096} \ + -constraints rc4_40 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [tls::encrypt -cipher rc4-40 -padding 0 -key [binary decode hex 833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-40.txt Index: tests/test_vectors/Symetric_Stream/rc4-40.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-40.txt @@ -0,0 +1,255 @@ +# RC4 40-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b2396305f03dc027ccc3524a0a1118a8 + +Count = 1 +Key = 0102030405 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6982944f18fc82d589c403a47a0d0919 + +Count = 2 +Key = 0102030405 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 28cb1132c96ce286421dcaadb8b69eae + +Count = 3 +Key = 0102030405 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1cfcf62b03eddb641d77dfcf7f8d8c93 + +Count = 4 +Key = 0102030405 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 42b7d0cdd918a8a33dd51781c81f4041 + +Count = 5 +Key = 0102030405 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6459844432a7da923cfb3eb4980661f6 + +Count = 6 +Key = 0102030405 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ec10327bde2beefd18f9277680457e22 + +Count = 7 +Key = 0102030405 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = eb62638d4f0ba1fe9fca20e05bf8ff2b + +Count = 8 +Key = 0102030405 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 45129048e6a0ed0b56b490338f078da5 + +Count = 9 +Key = 0102030405 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 30abbcc7c20b01609f23ee2d5f6bb7df + +Count = 10 +Key = 0102030405 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3294f744d8f9790507e70f62e5bbceea + +Count = 11 +Key = 0102030405 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d8729db41882259bee4f825325f5a130 + +Count = 12 +Key = 0102030405 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1eb14a0c13b3bf47fa2a0ba93ad45b8b + +Count = 13 +Key = 0102030405 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = cc582f8ba9f265e2b1be9112e975d2d7 + +Count = 14 +Key = 0102030405 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f2e30f9bd102ecbf75aaade9bc35c43c + +Count = 15 +Key = 0102030405 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ec0e11c479dc329dc8da7968fe965681 + +Count = 16 +Key = 0102030405 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 068326a2118416d21f9d04b2cd1ca050 + +Count = 17 +Key = 0102030405 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ff25b58995996707e51fbdf08b34d875 + +# key 2 +Count = 18 +Key = 833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 80ad97bdc973df8a2e879e92a497efda + +Count = 19 +Key = 833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 20f060c2f2e5126501d3d4fea10d5fc0 + +Count = 20 +Key = 833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = faa148e99046181fec6b2085f3b20ed9 + +Count = 21 +Key = 833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f0daf5bab3d596839857846f73fbfe5a + +Count = 22 +Key = 833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1c7e2fc4639232fe297584b296996bc8 + +Count = 23 +Key = 833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3db9b249406cc8edffac55ccd322ba12 + +Count = 24 +Key = 833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e4f9f7e0066154bbd125b745569bc897 + +Count = 25 +Key = 833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 75d5ef262b44c41a9cf63ae14568e1b9 + +Count = 26 +Key = 833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6da453dbf81e82334a3d8866cb50a1e3 + +Count = 27 +Key = 833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 7828d074119cab5c22b294d7a9bfa0bb + +Count = 28 +Key = 833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = adb89cea9a15fbe617295bd04b8ca05c + +Count = 29 +Key = 833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6251d87fd4aaae9a7e4ad5c217d3f300 + +Count = 30 +Key = 833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e7119bd6dd9b22afe8f89585432881e2 + +Count = 31 +Key = 833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 785b60fd7ec4e9fcb6545f350d660fab + +Count = 32 +Key = 833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = afecc037fdb7b0838eb3d70bcd268382 + +Count = 33 +Key = 833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = dbc1a7b49d57358cc9fa6d61d73b7cf0 + +Count = 34 +Key = 833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6349d126a37afcba89794f9804914fdc + +Count = 35 +Key = 833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bf42c3018c2f7c66bfde524975768115 ADDED tests/test_vectors/Symetric_Stream/rc4-56.test Index: tests/test_vectors/Symetric_Stream/rc4-56.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-56.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-56.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 rc4_56 [expr {[lsearch -nocase [tls::ciphers] rc4-56] > -1}] + + +tcltest::test Stream_rc4_56-1.1 {Encrypt rc4-56 offset 0} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 293f02d47f37c9b633f2af5285feb46b + + +tcltest::test Stream_rc4_56-1.2 {Decrypt rc4-56 offset 0} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.3 {Encrypt rc4-56 offset 16} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result e620f1390d19bd84e2e0fd752031afc1 + + +tcltest::test Stream_rc4_56-1.4 {Decrypt rc4-56 offset 16} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.5 {Encrypt rc4-56 offset 240} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 914f02531c9218810df60f67e338154c + + +tcltest::test Stream_rc4_56-1.6 {Decrypt rc4-56 offset 240} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.7 {Encrypt rc4-56 offset 256} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result d0fdb583073ce85ab83917740ec011d5 + + +tcltest::test Stream_rc4_56-1.8 {Decrypt rc4-56 offset 256} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.9 {Encrypt rc4-56 offset 496} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 75f81411e871cffa70b90c74c592e454 + + +tcltest::test Stream_rc4_56-1.10 {Decrypt rc4-56 offset 496} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.11 {Encrypt rc4-56 offset 512} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 0bb87202938dad609e87a5a1b079e5e4 + + +tcltest::test Stream_rc4_56-1.12 {Decrypt rc4-56 offset 512} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.13 {Encrypt rc4-56 offset 752} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result c2911246b612e7e7b903dfeda1dad866 + + +tcltest::test Stream_rc4_56-1.14 {Decrypt rc4-56 offset 752} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.15 {Encrypt rc4-56 offset 768} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 32828f91502b6291368de8081de36fc2 + + +tcltest::test Stream_rc4_56-1.16 {Decrypt rc4-56 offset 768} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.17 {Encrypt rc4-56 offset 1008} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result f3b9a7e3b297bf9ad804512f9063eff1 + + +tcltest::test Stream_rc4_56-1.18 {Decrypt rc4-56 offset 1008} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.19 {Encrypt rc4-56 offset 1024} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 8ecb67a9ba1f55a5a067e2b026a3676f + + +tcltest::test Stream_rc4_56-1.20 {Decrypt rc4-56 offset 1024} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.21 {Encrypt rc4-56 offset 1520} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result d2aa902bd42d0d7cfd340cd45810529f + + +tcltest::test Stream_rc4_56-1.22 {Decrypt rc4-56 offset 1520} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.23 {Encrypt rc4-56 offset 1536} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 78b272c96e42eab4c60bd914e39d06e3 + + +tcltest::test Stream_rc4_56-1.24 {Decrypt rc4-56 offset 1536} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.25 {Encrypt rc4-56 offset 2032} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result f4332fd31a079396ee3cee3f2a4ff049 + + +tcltest::test Stream_rc4_56-1.26 {Decrypt rc4-56 offset 2032} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.27 {Encrypt rc4-56 offset 2048} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 05459781d41fda7f30c1be7e1246c623 + + +tcltest::test Stream_rc4_56-1.28 {Decrypt rc4-56 offset 2048} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.29 {Encrypt rc4-56 offset 3056} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result adfd3868b8e51485d5e610017e3dd609 + + +tcltest::test Stream_rc4_56-1.30 {Decrypt rc4-56 offset 3056} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.31 {Encrypt rc4-56 offset 3072} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result ad26581c0c5be45f4cea01db2f3805d5 + + +tcltest::test Stream_rc4_56-1.32 {Decrypt rc4-56 offset 3072} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.33 {Encrypt rc4-56 offset 4080} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result f3172ceffc3b3d997c85ccd5af1a950c + + +tcltest::test Stream_rc4_56-1.34 {Decrypt rc4-56 offset 4080} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.35 {Encrypt rc4-56 offset 4096} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result e74b0b9731227fd37c0ec08a47ddd8b8 + + +tcltest::test Stream_rc4_56-1.36 {Decrypt rc4-56 offset 4096} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 01020304050607] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.37 {Encrypt rc4-56 offset 0} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result bc9222dbd3274d8fc66d14ccbda6690b + + +tcltest::test Stream_rc4_56-1.38 {Decrypt rc4-56 offset 0} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.39 {Encrypt rc4-56 offset 16} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 7ae627410c9a2be693df5bb7485a63e3 + + +tcltest::test Stream_rc4_56-1.40 {Decrypt rc4-56 offset 16} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.41 {Encrypt rc4-56 offset 240} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 3f0931aa03defb300f060103826f2a64 + + +tcltest::test Stream_rc4_56-1.42 {Decrypt rc4-56 offset 240} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.43 {Encrypt rc4-56 offset 256} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result beaa9ec8d59bb68129f3027c96361181 + + +tcltest::test Stream_rc4_56-1.44 {Decrypt rc4-56 offset 256} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.45 {Encrypt rc4-56 offset 496} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 74e04db46d28648d7dee8a0064b06cfe + + +tcltest::test Stream_rc4_56-1.46 {Decrypt rc4-56 offset 496} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.47 {Encrypt rc4-56 offset 512} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 9b5e81c62fe023c55be42f87bbf932b8 + + +tcltest::test Stream_rc4_56-1.48 {Decrypt rc4-56 offset 512} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.49 {Encrypt rc4-56 offset 752} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result ce178fc1826efecbc182f57999a46140 + + +tcltest::test Stream_rc4_56-1.50 {Decrypt rc4-56 offset 752} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.51 {Encrypt rc4-56 offset 768} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 8bdf55cd55061c06dba6be11de4a578a + + +tcltest::test Stream_rc4_56-1.52 {Decrypt rc4-56 offset 768} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.53 {Encrypt rc4-56 offset 1008} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 626f5f4dce652501f3087d39c92cc349 + + +tcltest::test Stream_rc4_56-1.54 {Decrypt rc4-56 offset 1008} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.55 {Encrypt rc4-56 offset 1024} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 42daac6a8f9ab9a7fd137c6037825682 + + +tcltest::test Stream_rc4_56-1.56 {Decrypt rc4-56 offset 1024} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.57 {Encrypt rc4-56 offset 1520} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result cc03fdb79192a207312f53f5d4dc33d9 + + +tcltest::test Stream_rc4_56-1.58 {Decrypt rc4-56 offset 1520} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.59 {Encrypt rc4-56 offset 1536} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result f70f14122a1c98a3155d28b8a0a8a41d + + +tcltest::test Stream_rc4_56-1.60 {Decrypt rc4-56 offset 1536} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.61 {Encrypt rc4-56 offset 2032} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 2a3a307ab2708a9c00fe0b42f9c2d6a1 + + +tcltest::test Stream_rc4_56-1.62 {Decrypt rc4-56 offset 2032} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.63 {Encrypt rc4-56 offset 2048} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 862617627d2261eab0b1246597ca0ae9 + + +tcltest::test Stream_rc4_56-1.64 {Decrypt rc4-56 offset 2048} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.65 {Encrypt rc4-56 offset 3056} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 55f877ce4f2e1ddbbf8e13e2cde0fdc8 + + +tcltest::test Stream_rc4_56-1.66 {Decrypt rc4-56 offset 3056} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.67 {Encrypt rc4-56 offset 3072} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 1b1556cb935f173337705fbb5d501fc1 + + +tcltest::test Stream_rc4_56-1.68 {Decrypt rc4-56 offset 3072} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.69 {Encrypt rc4-56 offset 4080} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result ecd0e96602be7f8d5092816cccf2c2e9 + + +tcltest::test Stream_rc4_56-1.70 {Decrypt rc4-56 offset 4080} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_56-1.71 {Encrypt rc4-56 offset 4096} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 027881fab4993a1c262024a94fff3f61 + + +tcltest::test Stream_rc4_56-1.72 {Decrypt rc4-56 offset 4096} \ + -constraints rc4_56 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [tls::encrypt -cipher rc4-56 -padding 0 -key [binary decode hex 1910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-56.txt Index: tests/test_vectors/Symetric_Stream/rc4-56.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-56.txt @@ -0,0 +1,255 @@ +# RC4 56-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 01020304050607 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 293f02d47f37c9b633f2af5285feb46b + +Count = 1 +Key = 01020304050607 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e620f1390d19bd84e2e0fd752031afc1 + +Count = 2 +Key = 01020304050607 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 914f02531c9218810df60f67e338154c + +Count = 3 +Key = 01020304050607 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d0fdb583073ce85ab83917740ec011d5 + +Count = 4 +Key = 01020304050607 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 75f81411e871cffa70b90c74c592e454 + +Count = 5 +Key = 01020304050607 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0bb87202938dad609e87a5a1b079e5e4 + +Count = 6 +Key = 01020304050607 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c2911246b612e7e7b903dfeda1dad866 + +Count = 7 +Key = 01020304050607 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 32828f91502b6291368de8081de36fc2 + +Count = 8 +Key = 01020304050607 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f3b9a7e3b297bf9ad804512f9063eff1 + +Count = 9 +Key = 01020304050607 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8ecb67a9ba1f55a5a067e2b026a3676f + +Count = 10 +Key = 01020304050607 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d2aa902bd42d0d7cfd340cd45810529f + +Count = 11 +Key = 01020304050607 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 78b272c96e42eab4c60bd914e39d06e3 + +Count = 12 +Key = 01020304050607 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f4332fd31a079396ee3cee3f2a4ff049 + +Count = 13 +Key = 01020304050607 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 05459781d41fda7f30c1be7e1246c623 + +Count = 14 +Key = 01020304050607 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = adfd3868b8e51485d5e610017e3dd609 + +Count = 15 +Key = 01020304050607 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ad26581c0c5be45f4cea01db2f3805d5 + +Count = 16 +Key = 01020304050607 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f3172ceffc3b3d997c85ccd5af1a950c + +Count = 17 +Key = 01020304050607 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e74b0b9731227fd37c0ec08a47ddd8b8 + +# key 2 +Count = 18 +Key = 1910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bc9222dbd3274d8fc66d14ccbda6690b + +Count = 19 +Key = 1910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 7ae627410c9a2be693df5bb7485a63e3 + +Count = 20 +Key = 1910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3f0931aa03defb300f060103826f2a64 + +Count = 21 +Key = 1910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = beaa9ec8d59bb68129f3027c96361181 + +Count = 22 +Key = 1910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 74e04db46d28648d7dee8a0064b06cfe + +Count = 23 +Key = 1910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9b5e81c62fe023c55be42f87bbf932b8 + +Count = 24 +Key = 1910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ce178fc1826efecbc182f57999a46140 + +Count = 25 +Key = 1910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8bdf55cd55061c06dba6be11de4a578a + +Count = 26 +Key = 1910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 626f5f4dce652501f3087d39c92cc349 + +Count = 27 +Key = 1910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 42daac6a8f9ab9a7fd137c6037825682 + +Count = 28 +Key = 1910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = cc03fdb79192a207312f53f5d4dc33d9 + +Count = 29 +Key = 1910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f70f14122a1c98a3155d28b8a0a8a41d + +Count = 30 +Key = 1910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 2a3a307ab2708a9c00fe0b42f9c2d6a1 + +Count = 31 +Key = 1910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 862617627d2261eab0b1246597ca0ae9 + +Count = 32 +Key = 1910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 55f877ce4f2e1ddbbf8e13e2cde0fdc8 + +Count = 33 +Key = 1910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1b1556cb935f173337705fbb5d501fc1 + +Count = 34 +Key = 1910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ecd0e96602be7f8d5092816cccf2c2e9 + +Count = 35 +Key = 1910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 027881fab4993a1c262024a94fff3f61 ADDED tests/test_vectors/Symetric_Stream/rc4-64.test Index: tests/test_vectors/Symetric_Stream/rc4-64.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-64.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-64.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 rc4_64 [expr {[lsearch -nocase [tls::ciphers] rc4-64] > -1}] + + +tcltest::test Stream_rc4_64-1.1 {Encrypt rc4-64 offset 0} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result 97ab8a1bf0afb96132f2f67258da15a8 + + +tcltest::test Stream_rc4_64-1.2 {Decrypt rc4-64 offset 0} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.3 {Encrypt rc4-64 offset 16} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 8263efdb45c4a18684ef87e6b19e5b09 + + +tcltest::test Stream_rc4_64-1.4 {Decrypt rc4-64 offset 16} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.5 {Encrypt rc4-64 offset 240} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 9636ebc9841926f4f7d1f362bddf6e18 + + +tcltest::test Stream_rc4_64-1.6 {Decrypt rc4-64 offset 240} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.7 {Encrypt rc4-64 offset 256} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result d0a990ff2c05fef5b90373c9ff4b870a + + +tcltest::test Stream_rc4_64-1.8 {Decrypt rc4-64 offset 256} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.9 {Encrypt rc4-64 offset 496} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 73239f1db7f41d80b643c0c52518ec63 + + +tcltest::test Stream_rc4_64-1.10 {Decrypt rc4-64 offset 496} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.11 {Encrypt rc4-64 offset 512} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 163b319923a6bdb4527c626126703c0f + + +tcltest::test Stream_rc4_64-1.12 {Decrypt rc4-64 offset 512} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.13 {Encrypt rc4-64 offset 752} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 49d6c8af0f97144a87df21d91472f966 + + +tcltest::test Stream_rc4_64-1.14 {Decrypt rc4-64 offset 752} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.15 {Encrypt rc4-64 offset 768} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 44173a103b6616c5d5ad1cee40c863d0 + + +tcltest::test Stream_rc4_64-1.16 {Decrypt rc4-64 offset 768} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.17 {Encrypt rc4-64 offset 1008} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 273c9c4b27f322e4e716ef53a47de7a4 + + +tcltest::test Stream_rc4_64-1.18 {Decrypt rc4-64 offset 1008} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.19 {Encrypt rc4-64 offset 1024} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result c6d0e7b226259fa9023490b26167ad1d + + +tcltest::test Stream_rc4_64-1.20 {Decrypt rc4-64 offset 1024} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.21 {Encrypt rc4-64 offset 1520} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 1fe8986713f07c3d9ae1c163ff8cf9d3 + + +tcltest::test Stream_rc4_64-1.22 {Decrypt rc4-64 offset 1520} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.23 {Encrypt rc4-64 offset 1536} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 8369e1a965610be887fbd0c79162aafb + + +tcltest::test Stream_rc4_64-1.24 {Decrypt rc4-64 offset 1536} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.25 {Encrypt rc4-64 offset 2032} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 0a0127abb44484b9fbef5abcae1b579f + + +tcltest::test Stream_rc4_64-1.26 {Decrypt rc4-64 offset 2032} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.27 {Encrypt rc4-64 offset 2048} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result c2cdadc6402e8ee866e1f37bdb47e42c + + +tcltest::test Stream_rc4_64-1.28 {Decrypt rc4-64 offset 2048} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.29 {Encrypt rc4-64 offset 3056} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 26b51ea37df8e1d6f76fc3b66a7429b3 + + +tcltest::test Stream_rc4_64-1.30 {Decrypt rc4-64 offset 3056} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.31 {Encrypt rc4-64 offset 3072} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result bc7683205d4f443dc1f29dda3315c87b + + +tcltest::test Stream_rc4_64-1.32 {Decrypt rc4-64 offset 3072} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.33 {Encrypt rc4-64 offset 4080} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result d5fa5a3469d29aaaf83d23589db8c85b + + +tcltest::test Stream_rc4_64-1.34 {Decrypt rc4-64 offset 4080} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.35 {Encrypt rc4-64 offset 4096} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 3fb46e2c8f0f068edce8cdcd7dfc5862 + + +tcltest::test Stream_rc4_64-1.36 {Decrypt rc4-64 offset 4096} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 0102030405060708] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.37 {Encrypt rc4-64 offset 0} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result bbf609de9413172d07660cb680716926 + + +tcltest::test Stream_rc4_64-1.38 {Decrypt rc4-64 offset 0} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.39 {Encrypt rc4-64 offset 16} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 46101a6dab43115d6c522b4fe93604a9 + + +tcltest::test Stream_rc4_64-1.40 {Decrypt rc4-64 offset 16} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.41 {Encrypt rc4-64 offset 240} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result cbe1fff21c96f3eef61e8fe0542cbdf0 + + +tcltest::test Stream_rc4_64-1.42 {Decrypt rc4-64 offset 240} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.43 {Encrypt rc4-64 offset 256} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 347938bffa4009c512cfb4034b0dd1a7 + + +tcltest::test Stream_rc4_64-1.44 {Decrypt rc4-64 offset 256} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.45 {Encrypt rc4-64 offset 496} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 7867a786d00a7147904d76ddf1e520e3 + + +tcltest::test Stream_rc4_64-1.46 {Decrypt rc4-64 offset 496} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.47 {Encrypt rc4-64 offset 512} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 8d3e9e1caefcccb3fbf8d18f64120b32 + + +tcltest::test Stream_rc4_64-1.48 {Decrypt rc4-64 offset 512} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.49 {Encrypt rc4-64 offset 752} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 942337f8fd76f0fae8c52d7954810672 + + +tcltest::test Stream_rc4_64-1.50 {Decrypt rc4-64 offset 752} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.51 {Encrypt rc4-64 offset 768} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result b8548c10f51667f6e60e182fa19b30f7 + + +tcltest::test Stream_rc4_64-1.52 {Decrypt rc4-64 offset 768} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.53 {Encrypt rc4-64 offset 1008} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 0211c7c6190c9efd1237c34c8f2e06c4 + + +tcltest::test Stream_rc4_64-1.54 {Decrypt rc4-64 offset 1008} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.55 {Encrypt rc4-64 offset 1024} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result bda64f65276d2aacb8f90212203a808e + + +tcltest::test Stream_rc4_64-1.56 {Decrypt rc4-64 offset 1024} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.57 {Encrypt rc4-64 offset 1520} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result bd3820f732ffb53ec193e79d33e27c73 + + +tcltest::test Stream_rc4_64-1.58 {Decrypt rc4-64 offset 1520} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.59 {Encrypt rc4-64 offset 1536} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result d0168616861907d482e36cdac8cf5749 + + +tcltest::test Stream_rc4_64-1.60 {Decrypt rc4-64 offset 1536} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.61 {Encrypt rc4-64 offset 2032} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result 97b0f0f224b2d2317114808fb03af7a0 + + +tcltest::test Stream_rc4_64-1.62 {Decrypt rc4-64 offset 2032} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.63 {Encrypt rc4-64 offset 2048} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result e59616e469787939a063ceea9af956d1 + + +tcltest::test Stream_rc4_64-1.64 {Decrypt rc4-64 offset 2048} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.65 {Encrypt rc4-64 offset 3056} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result c47e0dc1660919c11101208f9e69aa1f + + +tcltest::test Stream_rc4_64-1.66 {Decrypt rc4-64 offset 3056} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.67 {Encrypt rc4-64 offset 3072} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 5ae4f12896b8379a2aad89b5b553d6b0 + + +tcltest::test Stream_rc4_64-1.68 {Decrypt rc4-64 offset 3072} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.69 {Encrypt rc4-64 offset 4080} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 6b6b098d0c293bc2993d80bf0518b6d9 + + +tcltest::test Stream_rc4_64-1.70 {Decrypt rc4-64 offset 4080} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_64-1.71 {Encrypt rc4-64 offset 4096} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 8170cc3ccd92a698621b939dd38fe7b9 + + +tcltest::test Stream_rc4_64-1.72 {Decrypt rc4-64 offset 4096} \ + -constraints rc4_64 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [tls::encrypt -cipher rc4-64 -padding 0 -key [binary decode hex 641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-64.txt Index: tests/test_vectors/Symetric_Stream/rc4-64.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-64.txt @@ -0,0 +1,255 @@ +# RC4 64-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405060708 +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 97ab8a1bf0afb96132f2f67258da15a8 + +Count = 1 +Key = 0102030405060708 +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8263efdb45c4a18684ef87e6b19e5b09 + +Count = 2 +Key = 0102030405060708 +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 9636ebc9841926f4f7d1f362bddf6e18 + +Count = 3 +Key = 0102030405060708 +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d0a990ff2c05fef5b90373c9ff4b870a + +Count = 4 +Key = 0102030405060708 +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 73239f1db7f41d80b643c0c52518ec63 + +Count = 5 +Key = 0102030405060708 +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 163b319923a6bdb4527c626126703c0f + +Count = 6 +Key = 0102030405060708 +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 49d6c8af0f97144a87df21d91472f966 + +Count = 7 +Key = 0102030405060708 +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 44173a103b6616c5d5ad1cee40c863d0 + +Count = 8 +Key = 0102030405060708 +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 273c9c4b27f322e4e716ef53a47de7a4 + +Count = 9 +Key = 0102030405060708 +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c6d0e7b226259fa9023490b26167ad1d + +Count = 10 +Key = 0102030405060708 +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1fe8986713f07c3d9ae1c163ff8cf9d3 + +Count = 11 +Key = 0102030405060708 +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8369e1a965610be887fbd0c79162aafb + +Count = 12 +Key = 0102030405060708 +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0a0127abb44484b9fbef5abcae1b579f + +Count = 13 +Key = 0102030405060708 +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c2cdadc6402e8ee866e1f37bdb47e42c + +Count = 14 +Key = 0102030405060708 +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 26b51ea37df8e1d6f76fc3b66a7429b3 + +Count = 15 +Key = 0102030405060708 +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bc7683205d4f443dc1f29dda3315c87b + +Count = 16 +Key = 0102030405060708 +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d5fa5a3469d29aaaf83d23589db8c85b + +Count = 17 +Key = 0102030405060708 +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3fb46e2c8f0f068edce8cdcd7dfc5862 + +# key 2 +Count = 18 +Key = 641910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bbf609de9413172d07660cb680716926 + +Count = 19 +Key = 641910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 46101a6dab43115d6c522b4fe93604a9 + +Count = 20 +Key = 641910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = cbe1fff21c96f3eef61e8fe0542cbdf0 + +Count = 21 +Key = 641910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 347938bffa4009c512cfb4034b0dd1a7 + +Count = 22 +Key = 641910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 7867a786d00a7147904d76ddf1e520e3 + +Count = 23 +Key = 641910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8d3e9e1caefcccb3fbf8d18f64120b32 + +Count = 24 +Key = 641910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 942337f8fd76f0fae8c52d7954810672 + +Count = 25 +Key = 641910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b8548c10f51667f6e60e182fa19b30f7 + +Count = 26 +Key = 641910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 0211c7c6190c9efd1237c34c8f2e06c4 + +Count = 27 +Key = 641910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bda64f65276d2aacb8f90212203a808e + +Count = 28 +Key = 641910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bd3820f732ffb53ec193e79d33e27c73 + +Count = 29 +Key = 641910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d0168616861907d482e36cdac8cf5749 + +Count = 30 +Key = 641910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 97b0f0f224b2d2317114808fb03af7a0 + +Count = 31 +Key = 641910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e59616e469787939a063ceea9af956d1 + +Count = 32 +Key = 641910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = c47e0dc1660919c11101208f9e69aa1f + +Count = 33 +Key = 641910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5ae4f12896b8379a2aad89b5b553d6b0 + +Count = 34 +Key = 641910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 6b6b098d0c293bc2993d80bf0518b6d9 + +Count = 35 +Key = 641910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8170cc3ccd92a698621b939dd38fe7b9 ADDED tests/test_vectors/Symetric_Stream/rc4-80.test Index: tests/test_vectors/Symetric_Stream/rc4-80.test ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-80.test @@ -0,0 +1,551 @@ +# Auto generated from "rc4-80.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 rc4_80 [expr {[lsearch -nocase [tls::ciphers] rc4-80] > -1}] + + +tcltest::test Stream_rc4_80-1.1 {Encrypt rc4-80 offset 0} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result ede3b04643e586cc907dc21851709902 + + +tcltest::test Stream_rc4_80-1.2 {Decrypt rc4-80 offset 0} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.3 {Encrypt rc4-80 offset 16} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result 03516ba78f413beb223aa5d4d2df6711 + + +tcltest::test Stream_rc4_80-1.4 {Decrypt rc4-80 offset 16} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.5 {Encrypt rc4-80 offset 240} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result 3cfd6cb58ee0fdde640176ad0000044d + + +tcltest::test Stream_rc4_80-1.6 {Decrypt rc4-80 offset 240} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.7 {Encrypt rc4-80 offset 256} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 48532b21fb6079c9114c0ffd9c04a1ad + + +tcltest::test Stream_rc4_80-1.8 {Decrypt rc4-80 offset 256} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.9 {Encrypt rc4-80 offset 496} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 3e8cea98017109979084b1ef92f99d86 + + +tcltest::test Stream_rc4_80-1.10 {Decrypt rc4-80 offset 496} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.11 {Encrypt rc4-80 offset 512} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result e20fb49bdb337ee48b8d8dc0f4afeffe + + +tcltest::test Stream_rc4_80-1.12 {Decrypt rc4-80 offset 512} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.13 {Encrypt rc4-80 offset 752} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result 5c2521eacd7966f15e056544bea0d315 + + +tcltest::test Stream_rc4_80-1.14 {Decrypt rc4-80 offset 752} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.15 {Encrypt rc4-80 offset 768} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result e067a7031931a246a6c3875d2f678acb + + +tcltest::test Stream_rc4_80-1.16 {Decrypt rc4-80 offset 768} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.17 {Encrypt rc4-80 offset 1008} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result a64f70af88ae56b6f87581c0e23e6b08 + + +tcltest::test Stream_rc4_80-1.18 {Decrypt rc4-80 offset 1008} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.19 {Encrypt rc4-80 offset 1024} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result f449031de312814ec6f319291f4a0516 + + +tcltest::test Stream_rc4_80-1.20 {Decrypt rc4-80 offset 1024} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.21 {Encrypt rc4-80 offset 1520} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result bdae85924b3cb1d0a2e33a30c6d79599 + + +tcltest::test Stream_rc4_80-1.22 {Decrypt rc4-80 offset 1520} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.23 {Encrypt rc4-80 offset 1536} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 8a0feddbac865a09bcd127fb562ed60a + + +tcltest::test Stream_rc4_80-1.24 {Decrypt rc4-80 offset 1536} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.25 {Encrypt rc4-80 offset 2032} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result b55a0a5b51a12a8be34899c3e047511a + + +tcltest::test Stream_rc4_80-1.26 {Decrypt rc4-80 offset 2032} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.27 {Encrypt rc4-80 offset 2048} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result d9a09cea3ce75fe39698070317a71339 + + +tcltest::test Stream_rc4_80-1.28 {Decrypt rc4-80 offset 2048} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.29 {Encrypt rc4-80 offset 3056} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 552225ed1177f44584ac8cfa6c4eb5fc + + +tcltest::test Stream_rc4_80-1.30 {Decrypt rc4-80 offset 3056} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.31 {Encrypt rc4-80 offset 3072} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 7e82cbabfc95381b080998442129c2f8 + + +tcltest::test Stream_rc4_80-1.32 {Decrypt rc4-80 offset 3072} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.33 {Encrypt rc4-80 offset 4080} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 1f135ed14ce60a91369d2322bef25e3c + + +tcltest::test Stream_rc4_80-1.34 {Decrypt rc4-80 offset 4080} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.35 {Encrypt rc4-80 offset 4096} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 08b6be45124a43e2eb77953f84dc8553 + + +tcltest::test Stream_rc4_80-1.36 {Decrypt rc4-80 offset 4096} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 0102030405060708090a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.37 {Encrypt rc4-80 offset 0} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]] 0 15]} \ + -match exact -result ab65c26eddb287600db2fda10d1e605c + + +tcltest::test Stream_rc4_80-1.38 {Decrypt rc4-80 offset 0} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [binary decode hex 00000000000000000000000000000000]]] 0 15]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.39 {Encrypt rc4-80 offset 16} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]] 16 31]} \ + -match exact -result bb759010c29658f2c72d93a2d16d2930 + + +tcltest::test Stream_rc4_80-1.40 {Decrypt rc4-80 offset 16} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 2]]] 16 31]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.41 {Encrypt rc4-80 offset 240} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]] 240 255]} \ + -match exact -result b901e8036ed1c383cd3c4c4dd0a6ab05 + + +tcltest::test Stream_rc4_80-1.42 {Decrypt rc4-80 offset 240} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 16]]] 240 255]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.43 {Encrypt rc4-80 offset 256} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]] 256 271]} \ + -match exact -result 3d25ce4922924c55f064943353d78a6c + + +tcltest::test Stream_rc4_80-1.44 {Decrypt rc4-80 offset 256} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 17]]] 256 271]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.45 {Encrypt rc4-80 offset 496} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]] 496 511]} \ + -match exact -result 12c1aa44bbf87e75e611f69b2c38f49b + + +tcltest::test Stream_rc4_80-1.46 {Decrypt rc4-80 offset 496} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 32]]] 496 511]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.47 {Encrypt rc4-80 offset 512} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]] 512 527]} \ + -match exact -result 28f2b3434b65c09877470044c6ea170d + + +tcltest::test Stream_rc4_80-1.48 {Decrypt rc4-80 offset 512} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 33]]] 512 527]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.49 {Encrypt rc4-80 offset 752} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]] 752 767]} \ + -match exact -result bd9ef822de5288196134cf8af7839304 + + +tcltest::test Stream_rc4_80-1.50 {Decrypt rc4-80 offset 752} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 48]]] 752 767]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.51 {Encrypt rc4-80 offset 768} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]] 768 783]} \ + -match exact -result 67559c23f052158470a296f725735a32 + + +tcltest::test Stream_rc4_80-1.52 {Decrypt rc4-80 offset 768} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 49]]] 768 783]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.53 {Encrypt rc4-80 offset 1008} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]] 1008 1023]} \ + -match exact -result 8bab26fbc2c12b0f13e2ab185eabf241 + + +tcltest::test Stream_rc4_80-1.54 {Decrypt rc4-80 offset 1008} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 64]]] 1008 1023]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.55 {Encrypt rc4-80 offset 1024} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]] 1024 1039]} \ + -match exact -result 31185a6d696f0cfa9b42808b38e132a2 + + +tcltest::test Stream_rc4_80-1.56 {Decrypt rc4-80 offset 1024} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 65]]] 1024 1039]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.57 {Encrypt rc4-80 offset 1520} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]] 1520 1535]} \ + -match exact -result 564d3dae183c5234c8af1e51061c44b5 + + +tcltest::test Stream_rc4_80-1.58 {Decrypt rc4-80 offset 1520} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 96]]] 1520 1535]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.59 {Encrypt rc4-80 offset 1536} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]] 1536 1551]} \ + -match exact -result 3c0778a7b5f72d3c23a3135c7d67b9f4 + + +tcltest::test Stream_rc4_80-1.60 {Decrypt rc4-80 offset 1536} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 97]]] 1536 1551]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.61 {Encrypt rc4-80 offset 2032} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]] 2032 2047]} \ + -match exact -result f34369890fcf16fb517dcaae4463b2dd + + +tcltest::test Stream_rc4_80-1.62 {Decrypt rc4-80 offset 2032} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 128]]] 2032 2047]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.63 {Encrypt rc4-80 offset 2048} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]] 2048 2063]} \ + -match exact -result 02f31c81e8200731b899b028e791bfa7 + + +tcltest::test Stream_rc4_80-1.64 {Decrypt rc4-80 offset 2048} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 129]]] 2048 2063]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.65 {Encrypt rc4-80 offset 3056} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]] 3056 3071]} \ + -match exact -result 72da646283228c14300853701795616f + + +tcltest::test Stream_rc4_80-1.66 {Decrypt rc4-80 offset 3056} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 192]]] 3056 3071]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.67 {Encrypt rc4-80 offset 3072} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]] 3072 3087]} \ + -match exact -result 4e0a8c6f7934a788e2265e81d6d0c8f4 + + +tcltest::test Stream_rc4_80-1.68 {Decrypt rc4-80 offset 3072} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 193]]] 3072 3087]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.69 {Encrypt rc4-80 offset 4080} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]] 4080 4095]} \ + -match exact -result 438dd5eafea0111b6f36b4b938da2a68 + + +tcltest::test Stream_rc4_80-1.70 {Decrypt rc4-80 offset 4080} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 256]]] 4080 4095]} \ + -match exact -result 00000000000000000000000000000000 + + +tcltest::test Stream_rc4_80-1.71 {Encrypt rc4-80 offset 4096} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]] 4096 4111]} \ + -match exact -result 5f6bfc73815874d97100f086979357d8 + + +tcltest::test Stream_rc4_80-1.72 {Decrypt rc4-80 offset 4096} \ + -constraints rc4_80 \ + -body {binary encode hex [string range [tls::decrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [tls::encrypt -cipher rc4-80 -padding 0 -key [binary decode hex 8b37641910833222772a] \ + -data [string repeat [binary decode hex 00000000000000000000000000000000] 257]]] 4096 4111]} \ + -match exact -result 00000000000000000000000000000000 + +# Cleanup +::tcltest::cleanupTests +return ADDED tests/test_vectors/Symetric_Stream/rc4-80.txt Index: tests/test_vectors/Symetric_Stream/rc4-80.txt ================================================================== --- /dev/null +++ tests/test_vectors/Symetric_Stream/rc4-80.txt @@ -0,0 +1,255 @@ +# RC4 80-bit key Test Vectors from RFC 6229 + +# key 1 +Count = 0 +Key = 0102030405060708090a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ede3b04643e586cc907dc21851709902 + +Count = 1 +Key = 0102030405060708090a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 03516ba78f413beb223aa5d4d2df6711 + +Count = 2 +Key = 0102030405060708090a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3cfd6cb58ee0fdde640176ad0000044d + +Count = 3 +Key = 0102030405060708090a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 48532b21fb6079c9114c0ffd9c04a1ad + +Count = 4 +Key = 0102030405060708090a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3e8cea98017109979084b1ef92f99d86 + +Count = 5 +Key = 0102030405060708090a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e20fb49bdb337ee48b8d8dc0f4afeffe + +Count = 6 +Key = 0102030405060708090a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5c2521eacd7966f15e056544bea0d315 + +Count = 7 +Key = 0102030405060708090a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = e067a7031931a246a6c3875d2f678acb + +Count = 8 +Key = 0102030405060708090a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = a64f70af88ae56b6f87581c0e23e6b08 + +Count = 9 +Key = 0102030405060708090a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f449031de312814ec6f319291f4a0516 + +Count = 10 +Key = 0102030405060708090a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bdae85924b3cb1d0a2e33a30c6d79599 + +Count = 11 +Key = 0102030405060708090a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8a0feddbac865a09bcd127fb562ed60a + +Count = 12 +Key = 0102030405060708090a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b55a0a5b51a12a8be34899c3e047511a + +Count = 13 +Key = 0102030405060708090a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = d9a09cea3ce75fe39698070317a71339 + +Count = 14 +Key = 0102030405060708090a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 552225ed1177f44584ac8cfa6c4eb5fc + +Count = 15 +Key = 0102030405060708090a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 7e82cbabfc95381b080998442129c2f8 + +Count = 16 +Key = 0102030405060708090a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 1f135ed14ce60a91369d2322bef25e3c + +Count = 17 +Key = 0102030405060708090a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 08b6be45124a43e2eb77953f84dc8553 + +# key 2 +Count = 18 +Key = 8b37641910833222772a +Offset = 0 +Repeat = 1 +Plaintext = 00000000000000000000000000000000 +Ciphertext = ab65c26eddb287600db2fda10d1e605c + +Count = 19 +Key = 8b37641910833222772a +Offset = 16 +Repeat = 2 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bb759010c29658f2c72d93a2d16d2930 + +Count = 20 +Key = 8b37641910833222772a +Offset = 240 +Repeat = 16 +Plaintext = 00000000000000000000000000000000 +Ciphertext = b901e8036ed1c383cd3c4c4dd0a6ab05 + +Count = 21 +Key = 8b37641910833222772a +Offset = 256 +Repeat = 17 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3d25ce4922924c55f064943353d78a6c + +Count = 22 +Key = 8b37641910833222772a +Offset = 496 +Repeat = 32 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 12c1aa44bbf87e75e611f69b2c38f49b + +Count = 23 +Key = 8b37641910833222772a +Offset = 512 +Repeat = 33 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 28f2b3434b65c09877470044c6ea170d + +Count = 24 +Key = 8b37641910833222772a +Offset = 752 +Repeat = 48 +Plaintext = 00000000000000000000000000000000 +Ciphertext = bd9ef822de5288196134cf8af7839304 + +Count = 25 +Key = 8b37641910833222772a +Offset = 768 +Repeat = 49 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 67559c23f052158470a296f725735a32 + +Count = 26 +Key = 8b37641910833222772a +Offset = 1008 +Repeat = 64 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 8bab26fbc2c12b0f13e2ab185eabf241 + +Count = 27 +Key = 8b37641910833222772a +Offset = 1024 +Repeat = 65 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 31185a6d696f0cfa9b42808b38e132a2 + +Count = 28 +Key = 8b37641910833222772a +Offset = 1520 +Repeat = 96 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 564d3dae183c5234c8af1e51061c44b5 + +Count = 29 +Key = 8b37641910833222772a +Offset = 1536 +Repeat = 97 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 3c0778a7b5f72d3c23a3135c7d67b9f4 + +Count = 30 +Key = 8b37641910833222772a +Offset = 2032 +Repeat = 128 +Plaintext = 00000000000000000000000000000000 +Ciphertext = f34369890fcf16fb517dcaae4463b2dd + +Count = 31 +Key = 8b37641910833222772a +Offset = 2048 +Repeat = 129 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 02f31c81e8200731b899b028e791bfa7 + +Count = 32 +Key = 8b37641910833222772a +Offset = 3056 +Repeat = 192 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 72da646283228c14300853701795616f + +Count = 33 +Key = 8b37641910833222772a +Offset = 3072 +Repeat = 193 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 4e0a8c6f7934a788e2265e81d6d0c8f4 + +Count = 34 +Key = 8b37641910833222772a +Offset = 4080 +Repeat = 256 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 438dd5eafea0111b6f36b4b938da2a68 + +Count = 35 +Key = 8b37641910833222772a +Offset = 4096 +Repeat = 257 +Plaintext = 00000000000000000000000000000000 +Ciphertext = 5f6bfc73815874d97100f086979357d8