cryptopp 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/MIT-LICENSE +22 -0
- data/README +7 -0
- data/Rakefile +42 -0
- data/cryptopp.gemspec +199 -0
- data/ext/.gitignore +5 -0
- data/ext/Rakefile +16 -0
- data/ext/ciphers.cpp +1402 -0
- data/ext/cryptopp.cpp +285 -0
- data/ext/cryptopp_ruby_api.h +139 -0
- data/ext/defs/block_modes.def +10 -0
- data/ext/defs/checksums.def +10 -0
- data/ext/defs/ciphers.def +136 -0
- data/ext/defs/hashes.def +78 -0
- data/ext/defs/hmacs.def +54 -0
- data/ext/defs/paddings.def +9 -0
- data/ext/defs/rngs.def +7 -0
- data/ext/digests.cpp +1120 -0
- data/ext/extconf.rb +39 -0
- data/ext/j3way.cpp +22 -0
- data/ext/j3way.h +29 -0
- data/ext/jadler32.h +32 -0
- data/ext/jaes.cpp +22 -0
- data/ext/jaes.h +31 -0
- data/ext/jarc4.cpp +22 -0
- data/ext/jarc4.h +37 -0
- data/ext/jbase.cpp +172 -0
- data/ext/jbase.h +92 -0
- data/ext/jbasiccipherinfo.h +74 -0
- data/ext/jblowfish.cpp +22 -0
- data/ext/jblowfish.h +29 -0
- data/ext/jcamellia.cpp +24 -0
- data/ext/jcamellia.h +33 -0
- data/ext/jcast128.cpp +22 -0
- data/ext/jcast128.h +31 -0
- data/ext/jcast256.cpp +22 -0
- data/ext/jcast256.h +31 -0
- data/ext/jcipher.cpp +112 -0
- data/ext/jcipher.h +42 -0
- data/ext/jcipher_t.h +469 -0
- data/ext/jconfig.h +127 -0
- data/ext/jconstants.h +189 -0
- data/ext/jcrc32.h +32 -0
- data/ext/jdes.cpp +22 -0
- data/ext/jdes.h +31 -0
- data/ext/jdes_ede2.cpp +22 -0
- data/ext/jdes_ede2.h +31 -0
- data/ext/jdes_ede3.cpp +22 -0
- data/ext/jdes_ede3.h +31 -0
- data/ext/jdes_xex3.cpp +22 -0
- data/ext/jdes_xex3.h +31 -0
- data/ext/jdiamond2.cpp +22 -0
- data/ext/jdiamond2.h +31 -0
- data/ext/jdiamond2lite.cpp +22 -0
- data/ext/jdiamond2lite.h +31 -0
- data/ext/jexception.h +20 -0
- data/ext/jgost.cpp +22 -0
- data/ext/jgost.h +31 -0
- data/ext/jhash.cpp +92 -0
- data/ext/jhash.h +54 -0
- data/ext/jhash_t.h +121 -0
- data/ext/jhaval.h +64 -0
- data/ext/jhelpers.cpp +90 -0
- data/ext/jhelpers.h +38 -0
- data/ext/jhmac.cpp +44 -0
- data/ext/jhmac.h +34 -0
- data/ext/jhmac_t.h +125 -0
- data/ext/jidea.cpp +22 -0
- data/ext/jidea.h +31 -0
- data/ext/jmarc4.cpp +22 -0
- data/ext/jmarc4.h +37 -0
- data/ext/jmars.cpp +22 -0
- data/ext/jmars.h +31 -0
- data/ext/jmd2.h +56 -0
- data/ext/jmd4.h +56 -0
- data/ext/jmd5.h +56 -0
- data/ext/jpanamacipher.cpp +32 -0
- data/ext/jpanamacipher.h +46 -0
- data/ext/jpanamahash.h +44 -0
- data/ext/jrc2.cpp +44 -0
- data/ext/jrc2.h +39 -0
- data/ext/jrc5.cpp +22 -0
- data/ext/jrc5.h +31 -0
- data/ext/jrc6.cpp +22 -0
- data/ext/jrc6.h +31 -0
- data/ext/jripemd160.h +113 -0
- data/ext/jsafer.cpp +32 -0
- data/ext/jsafer.h +42 -0
- data/ext/jseal.cpp +32 -0
- data/ext/jseal.h +42 -0
- data/ext/jserpent.cpp +22 -0
- data/ext/jserpent.h +31 -0
- data/ext/jsha.h +122 -0
- data/ext/jshacal2.cpp +22 -0
- data/ext/jshacal2.h +31 -0
- data/ext/jshark.cpp +24 -0
- data/ext/jshark.h +33 -0
- data/ext/jsink.cpp +90 -0
- data/ext/jsink.h +154 -0
- data/ext/jskipjack.cpp +22 -0
- data/ext/jskipjack.h +31 -0
- data/ext/jsquare.cpp +22 -0
- data/ext/jsquare.h +31 -0
- data/ext/jstream.cpp +8 -0
- data/ext/jstream.h +20 -0
- data/ext/jstream_t.h +175 -0
- data/ext/jtea.cpp +22 -0
- data/ext/jtea.h +31 -0
- data/ext/jtiger.h +52 -0
- data/ext/jtwofish.cpp +22 -0
- data/ext/jtwofish.h +31 -0
- data/ext/jwhirlpool.h +52 -0
- data/ext/utils.cpp +8 -0
- data/extras/parser_c.rb +114 -0
- data/test/ciphers_test.rb +37 -0
- data/test/data/ciphers/3desval.dat +7 -0
- data/test/data/ciphers/3wayval.dat +6 -0
- data/test/data/ciphers/arc4.dat +8 -0
- data/test/data/ciphers/blowfish.dat +5 -0
- data/test/data/ciphers/camellia.dat +7 -0
- data/test/data/ciphers/cast128v.dat +5 -0
- data/test/data/ciphers/cast256v.dat +5 -0
- data/test/data/ciphers/descert.dat +198 -0
- data/test/data/ciphers/diamond.dat +9 -0
- data/test/data/ciphers/gostval.dat +10 -0
- data/test/data/ciphers/ideaval.dat +13 -0
- data/test/data/ciphers/marsval.dat +11 -0
- data/test/data/ciphers/panamac.dat +7 -0
- data/test/data/ciphers/rc2val.dat +10 -0
- data/test/data/ciphers/rc5val.dat +7 -0
- data/test/data/ciphers/rc6val.dat +8 -0
- data/test/data/ciphers/rijndael.dat +11 -0
- data/test/data/ciphers/saferval.dat +27 -0
- data/test/data/ciphers/seal.dat +3 -0
- data/test/data/ciphers/serpentv.dat +11 -0
- data/test/data/ciphers/shacal2.dat +7 -0
- data/test/data/ciphers/sharkval.dat +9 -0
- data/test/data/ciphers/skipjack.dat +3 -0
- data/test/data/ciphers/squareva.dat +10 -0
- data/test/data/ciphers/twofishv.dat +11 -0
- data/test/data/digests/adler32.dat +8 -0
- data/test/data/digests/crc32.dat +10 -0
- data/test/data/digests/haval.dat +4 -0
- data/test/data/digests/havalcer.dat +23 -0
- data/test/data/digests/md2.dat +9 -0
- data/test/data/digests/md4.dat +9 -0
- data/test/data/digests/md5.dat +9 -0
- data/test/data/digests/panamah.dat +8 -0
- data/test/data/digests/ripemd.dat +43 -0
- data/test/data/digests/sha.dat +19 -0
- data/test/data/digests/tiger.dat +11 -0
- data/test/data/digests/whirlpool.dat +13 -0
- data/test/data/hmacs/hmac.dat +6 -0
- data/test/digests_test.rb +29 -0
- data/test/hmacs_test.rb +38 -0
- data/test/test_helper.rb +42 -0
- metadata +220 -0
data/ext/jtwofish.h
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* Copyright (c) 2002-2010 J Smith <dark.panda@gmail.com>
|
4
|
+
* Crypto++ copyright (c) 1995-2010 Wei Dai
|
5
|
+
* See COPYING for the extact license
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef __JTWOFISH_H__
|
9
|
+
#define __JTWOFISH_H__
|
10
|
+
|
11
|
+
#include "jconfig.h"
|
12
|
+
|
13
|
+
#if ENABLED_TWOFISH_CIPHER
|
14
|
+
|
15
|
+
#include "jcipher_t.h"
|
16
|
+
|
17
|
+
// Crypto++ headers...
|
18
|
+
|
19
|
+
#include "twofish.h"
|
20
|
+
|
21
|
+
using namespace CryptoPP;
|
22
|
+
|
23
|
+
class JTwofish : public JCipher_Template<Twofish_Info, TWOFISH_CIPHER>
|
24
|
+
{
|
25
|
+
protected:
|
26
|
+
BlockCipher* getEncryptionObject();
|
27
|
+
BlockCipher* getDecryptionObject();
|
28
|
+
};
|
29
|
+
|
30
|
+
#endif
|
31
|
+
#endif
|
data/ext/jwhirlpool.h
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* Copyright (c) 2002-2010 J Smith <dark.panda@gmail.com>
|
4
|
+
* Crypto++ copyright (c) 1995-2010 Wei Dai
|
5
|
+
* See COPYING for the extact license
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef __JWHIRLPOOL_H__
|
9
|
+
#define __JWHIRLPOOL_H__
|
10
|
+
|
11
|
+
#include "jconfig.h"
|
12
|
+
|
13
|
+
#ifdef WORD64_AVAILABLE
|
14
|
+
#if ENABLED_WHIRLPOOL_HASH || ENABLED_WHIRLPOOL_HMAC
|
15
|
+
|
16
|
+
#if ENABLED_WHIRLPOOL_HASH
|
17
|
+
#include "jhash_t.h"
|
18
|
+
#endif
|
19
|
+
|
20
|
+
#if ENABLED_WHIRLPOOL_HMAC
|
21
|
+
#include "jhmac_t.h"
|
22
|
+
#endif
|
23
|
+
|
24
|
+
// Crypto++ headers...
|
25
|
+
|
26
|
+
#include "whrlpool.h"
|
27
|
+
|
28
|
+
using namespace CryptoPP;
|
29
|
+
|
30
|
+
#if ENABLED_WHIRLPOOL_HASH
|
31
|
+
class JWhirlpool : public JHash_Template<Whirlpool, WHIRLPOOL_HASH>
|
32
|
+
{
|
33
|
+
public:
|
34
|
+
JWhirlpool(string plaintext = "") : JHash_Template<Whirlpool, WHIRLPOOL_HASH>(plaintext) { }
|
35
|
+
|
36
|
+
static string getHashName() { return "Whirlpool"; }
|
37
|
+
};
|
38
|
+
#endif
|
39
|
+
|
40
|
+
#if ENABLED_WHIRLPOOL_HMAC
|
41
|
+
class JWhirlpool_HMAC : public JHMAC_Template<Whirlpool, WHIRLPOOL_HMAC>
|
42
|
+
{
|
43
|
+
public:
|
44
|
+
JWhirlpool_HMAC(string plaintext = "") : JHMAC_Template<Whirlpool, WHIRLPOOL_HMAC>(plaintext) { }
|
45
|
+
|
46
|
+
static string getHashName() { return "Whirlpool-HMAC"; }
|
47
|
+
};
|
48
|
+
#endif
|
49
|
+
|
50
|
+
#endif
|
51
|
+
#endif
|
52
|
+
#endif
|
data/ext/utils.cpp
ADDED
data/extras/parser_c.rb
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
|
2
|
+
module RDoc
|
3
|
+
class CustomParser < C_Parser
|
4
|
+
extend ParserFactory
|
5
|
+
parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/)
|
6
|
+
|
7
|
+
def mangle_comment(comment)
|
8
|
+
comment.sub!(%r{/\*+}) { " " * $&.length }
|
9
|
+
comment.sub!(%r{\*+/}) { " " * $&.length }
|
10
|
+
comment.gsub!(/^[ \t]*\*/m, '')
|
11
|
+
comment
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
def do_constants
|
16
|
+
@body.scan(
|
17
|
+
%r{
|
18
|
+
CRYPTOPP_DEFINE_CONST\(
|
19
|
+
\s*(\w+)\s*,
|
20
|
+
\s*"([^"]+)"\s*,
|
21
|
+
\s*(\w+)\s*
|
22
|
+
\)\s*;
|
23
|
+
}xm
|
24
|
+
) do |klass, name, definition|
|
25
|
+
handle_constants('const', klass, name, definition)
|
26
|
+
end
|
27
|
+
super
|
28
|
+
end
|
29
|
+
|
30
|
+
def do_methods
|
31
|
+
@body.scan(
|
32
|
+
%r{
|
33
|
+
CRYPTOPP_MODULE_METHOD\(
|
34
|
+
\s*(\w+)\s*,
|
35
|
+
\s*"([^"]+)"\s*,
|
36
|
+
\s*(\w+)\s*,
|
37
|
+
\s*(-?\w+)\s*
|
38
|
+
\)
|
39
|
+
(?:;\s*/[*/]\s+in\s+(\w+?\.cpp))?
|
40
|
+
}xm
|
41
|
+
) do |mod, name, body, params, source_file|
|
42
|
+
handle_method('module_function', mod, name, body, params, source_file)
|
43
|
+
end
|
44
|
+
|
45
|
+
@body.scan(
|
46
|
+
%r{
|
47
|
+
CRYPTOPP_CLASS_METHOD\(
|
48
|
+
\s*(\w+)\s*,
|
49
|
+
\s*"([^"]+)"\s*,
|
50
|
+
\s*(\w+)\s*,
|
51
|
+
\s*(-?\w+)\s*
|
52
|
+
\)
|
53
|
+
(?:;\s*/[*/]\s+in\s+(\w+?\.cpp))?
|
54
|
+
}xm
|
55
|
+
) do |klass, name, body, params, source_file|
|
56
|
+
handle_method('method', "rb_cCryptoPP_#{klass}", name, body, params, source_file)
|
57
|
+
end
|
58
|
+
|
59
|
+
@body.scan(
|
60
|
+
%r{
|
61
|
+
rb_define_(
|
62
|
+
singleton_method |
|
63
|
+
method |
|
64
|
+
module_function |
|
65
|
+
private_method
|
66
|
+
)
|
67
|
+
\s*\(\s*([\w\.]+),
|
68
|
+
\s*"([^"]+)",
|
69
|
+
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
|
70
|
+
\s*(-?\w+)\s*\)
|
71
|
+
(?:;\s*/[*/]\s+in\s+(\w+?\.cpp))?
|
72
|
+
}xm
|
73
|
+
) do |type, var_name, meth_name, meth_body, param_count, source_file|
|
74
|
+
handle_method(type, var_name, meth_name, meth_body, param_count, source_file)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def do_aliases
|
79
|
+
@body.scan(
|
80
|
+
%r{
|
81
|
+
CRYPTOPP_MODULE_METHOD_ALIAS\(
|
82
|
+
\s*(\w+)\s*,
|
83
|
+
\s*"([^"]+)"\s*,
|
84
|
+
\s*"([^"]+)"\s*
|
85
|
+
\)\s*;
|
86
|
+
}xm
|
87
|
+
) do |mod, new_name, old_name|
|
88
|
+
@stats.num_methods += 1
|
89
|
+
class_name = @known_classes[mod] || mod
|
90
|
+
class_obj = find_class(mod, class_name)
|
91
|
+
|
92
|
+
class_obj.add_alias(Alias.new("", old_name, new_name, ""))
|
93
|
+
end
|
94
|
+
|
95
|
+
@body.scan(
|
96
|
+
%r{
|
97
|
+
CRYPTOPP_CLASS_METHOD_ALIAS\(
|
98
|
+
\s*(\w+)\s*,
|
99
|
+
\s*"([^"]+)"\s*,
|
100
|
+
\s*"([^"]+)"\s*
|
101
|
+
\)\s*;
|
102
|
+
}xm
|
103
|
+
) do |klass, new_name, old_name|
|
104
|
+
klass = "rb_cCryptoPP_#{klass}"
|
105
|
+
@stats.num_methods += 1
|
106
|
+
class_name = @known_classes[klass] || klass
|
107
|
+
class_obj = find_class(klass, class_name)
|
108
|
+
|
109
|
+
class_obj.add_alias(Alias.new("", old_name, new_name, ""))
|
110
|
+
end
|
111
|
+
super
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
require 'test/unit'
|
3
|
+
require 'test/test_helper'
|
4
|
+
|
5
|
+
class CiphersTest < Test::Unit::TestCase
|
6
|
+
include TestHelper
|
7
|
+
|
8
|
+
Dir.glob('test/data/ciphers/*.dat').sort.each do |f|
|
9
|
+
test_name = File.basename(f).gsub(/.dat$/, '')
|
10
|
+
|
11
|
+
class_eval(%{
|
12
|
+
def test_#{test_name}
|
13
|
+
run_cipher_test("#{f}")
|
14
|
+
end
|
15
|
+
})
|
16
|
+
end
|
17
|
+
|
18
|
+
def run_cipher_test(file)
|
19
|
+
readfile(file) do |options|
|
20
|
+
if CryptoPP.cipher_enabled? options[:algorithm]
|
21
|
+
encryption_factory_options = options.reject do |k, v|
|
22
|
+
[ :algorithm, :ciphertext, :ciphertext_hex ].include? k
|
23
|
+
end
|
24
|
+
encrypt = CryptoPP.cipher_factory options[:algorithm], encryption_factory_options
|
25
|
+
|
26
|
+
decryption_factory_options = options.reject do |k, v|
|
27
|
+
[ :algorithm, :plaintext, :plaintext_hex ].include? k
|
28
|
+
end
|
29
|
+
decrypt = CryptoPP.cipher_factory options[:algorithm], decryption_factory_options
|
30
|
+
decrypt.decrypt
|
31
|
+
|
32
|
+
assert_equal(decrypt.plaintext, encrypt.plaintext)
|
33
|
+
assert_equal(decrypt.ciphertext_hex, options[:ciphertext_hex])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
fields key_hex plaintext_hex ciphertext_hex
|
2
|
+
algorithm cipher des_ede2
|
3
|
+
test 0123456789abcdeffedcba9876543210 0123456789abcde7 7f1d0a77826b8aff
|
4
|
+
algorithm cipher des_ede3
|
5
|
+
test 0123456789abcdeffedcba987654321089abcdef01234567 0123456789abcde7 de0b7c06ae5e0ed5
|
6
|
+
algorithm cipher des_xex3
|
7
|
+
test 0123456789abcdef01010101010101011011121314151617 94dbe082549a14ef 9011121314151617
|
@@ -0,0 +1,6 @@
|
|
1
|
+
algorithm cipher threeway
|
2
|
+
fields key_hex plaintext_hex ciphertext_hex
|
3
|
+
test 000000000000000000000000 000000010000000100000001 4059c76e83ae9dc4ad21ecf7
|
4
|
+
test 000000060000000500000004 000000030000000200000001 d2f05b5ed6144138cab920cd
|
5
|
+
test def01234456789abbcdef012 234567899abcdef001234567 0aa55dbb9cdddb6d7cdb76b2
|
6
|
+
test d2f05b5ed6144138cab920cd 4059c76e83ae9dc4ad21ecf7 478ea8716b13f17c15b155ed
|
@@ -0,0 +1,8 @@
|
|
1
|
+
algorithm cipher arc4
|
2
|
+
fields key_hex plaintext_hex ciphertext_hex_cont
|
3
|
+
test 0123456789abcdef 0123456789abcdef 75b7878099e0c596
|
4
|
+
test 0123456789abcdef 0000000000000000 7494c2e7104b0879
|
5
|
+
test 0000000000000000 0000000000000000 de188941a3375d3a
|
6
|
+
test ef012345 00000000000000000000 d6a141a7ec3c38dfbd61
|
7
|
+
fields key_hex plaintext_hex plaintext_repeat ciphertext_hex_cont
|
8
|
+
test 0123456789abcdef 01 512 7595c3e6114a09780c4ad452338e1ffd9a1be949 8f813d76533449b6778dcad8c78a8d2ba9ac6608 5d0e53d59c26c2d1c490c1ebbe0ce66d1b6b1b13 b6b919b847c25a91447a95e75e4ef16779cde8bf 0a95850e32af9689444fd377108f98fdcbd4e726 567500990bcc7e0ca3c4aaa304a387d20f3b8fbb cd42a1bd311d7a4303dda5ab078896ae80c18b0a f66dff319616eb784e495ad2ce90d7f772a81747 b65f62093b1e0db9e5ba532fafec47508323e671 327df9444432cb7367cec82f5d44c0d00b67d650 a075cd4b70dedd77eb9b10231b6b5b741347396d 62897421d43df9b42e446e358e9c11a9b2184ecb ef0cd8e7a877ef968f1390ec9b3d35a5585cb009 290e2fcde7b5ec66d9084be44055a619d9dd7fc3 166f9487f7cb272912426445998514c15d53a18c 864ce3a2b7555793988126520eacf2e3066e230c 91bee4dd5304f5fd0405b35bd99c73135d3d9bc3 35ee049ef69b3867bf2d7bd1eaa595d8bfc0066f f8d31509eb0c6caa006c807a623ef84c3d33c195 d23ee320c40de0558157c822d4b8c569d849aed5 9d4e0fd7f379586b4b7ff684ed6a189f7486d49b 9c4bad9ba24b96abf924372c8a8fffb10d553549 00a77a3db5f205e1b99fcd8660863a159ad4abe4 0fa48934163ddde542a6585540fd683cbfd8c00f 12129a284deacc4cdefe58be7137541c047126c8 d49e2755ab181ab7e940b0c0
|
@@ -0,0 +1,7 @@
|
|
1
|
+
algorithm cipher camellia
|
2
|
+
fields key_hex plaintext_hex ciphertext_hex
|
3
|
+
test 80000000000000000000000000000000 00000000000000000000000000000000 6c227f749319a3aa7da235a9bba05a2c
|
4
|
+
test 00000000000000000000000000000000 80000000000000000000000000000000 07923a39eb0a817d1c4d87bdb82d1f1c
|
5
|
+
test 00000000000000000000000000000000 00000000000000000000000000000000 3d028025b156327c17f762c1f2cbca71
|
6
|
+
test a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 1f55093c234648c5c9c781e8c9fd42c4
|
7
|
+
test fefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefe fefefefefefefefefefefefefefefefe acdbb0f5a00e3cf63a89d9c09b44a058
|
@@ -0,0 +1,5 @@
|
|
1
|
+
algorithm cipher cast256
|
2
|
+
fields key_hex plaintext_hex ciphertext_hex
|
3
|
+
test 2342bb9efa38542c0af75647f29f615d 00000000000000000000000000000000 c842a08972b43d20836c91d1b7530f6b
|
4
|
+
test 2342bb9efa38542cbed0ac83940ac298bac77a7717942863 00000000000000000000000000000000 1b386c0210dcadcbdd0e41aa08a7a7e8
|
5
|
+
test 2342bb9efa38542cbed0ac83940ac2988d7c47ce264908461cc1b5137ae6b604 00000000000000000000000000000000 4f6a2038286897b9c9870136553317fa
|
@@ -0,0 +1,198 @@
|
|
1
|
+
algorithm cipher des
|
2
|
+
fields key_hex plaintext_hex ciphertext_hex
|
3
|
+
test 0101010101010101 95f8a5e5dd31d900 8000000000000000
|
4
|
+
test 0101010101010101 dd7f121ca5015619 4000000000000000
|
5
|
+
test 0101010101010101 2e8653104f3834ea 2000000000000000
|
6
|
+
test 0101010101010101 4bd388ff6cd81d4f 1000000000000000
|
7
|
+
test 0101010101010101 20b9e767b2fb1456 0800000000000000
|
8
|
+
test 0101010101010101 55579380d77138ef 0400000000000000
|
9
|
+
test 0101010101010101 6cc5defaaf04512f 0200000000000000
|
10
|
+
test 0101010101010101 0d9f279ba5d87260 0100000000000000
|
11
|
+
test 0101010101010101 d9031b0271bd5a0a 0080000000000000
|
12
|
+
test 0101010101010101 424250b37c3dd951 0040000000000000
|
13
|
+
test 0101010101010101 b8061b7ecd9a21e5 0020000000000000
|
14
|
+
test 0101010101010101 f15d0f286b65bd28 0010000000000000
|
15
|
+
test 0101010101010101 add0cc8d6e5deba1 0008000000000000
|
16
|
+
test 0101010101010101 e6d5f82752ad63d1 0004000000000000
|
17
|
+
test 0101010101010101 ecbfe3bd3f591a5e 0002000000000000
|
18
|
+
test 0101010101010101 f356834379d165cd 0001000000000000
|
19
|
+
test 0101010101010101 2b9f982f20037fa9 0000800000000000
|
20
|
+
test 0101010101010101 889de068a16f0be6 0000400000000000
|
21
|
+
test 0101010101010101 e19e275d846a1298 0000200000000000
|
22
|
+
test 0101010101010101 329a8ed523d71aec 0000100000000000
|
23
|
+
test 0101010101010101 e7fce22557d23c97 0000080000000000
|
24
|
+
test 0101010101010101 12a9f5817ff2d65d 0000040000000000
|
25
|
+
test 0101010101010101 a484c3ad38dc9c19 0000020000000000
|
26
|
+
test 0101010101010101 fbe00a8a1ef8ad72 0000010000000000
|
27
|
+
test 0101010101010101 750d079407521363 0000008000000000
|
28
|
+
test 0101010101010101 64feed9c724c2faf 0000004000000000
|
29
|
+
test 0101010101010101 f02b263b328e2b60 0000002000000000
|
30
|
+
test 0101010101010101 9d64555a9a10b852 0000001000000000
|
31
|
+
test 0101010101010101 d106ff0bed5255d7 0000000800000000
|
32
|
+
test 0101010101010101 e1652c6b138c64a5 0000000400000000
|
33
|
+
test 0101010101010101 e428581186ec8f46 0000000200000000
|
34
|
+
test 0101010101010101 aeb5f5ede22d1a36 0000000100000000
|
35
|
+
test 0101010101010101 e943d7568aec0c5c 0000000080000000
|
36
|
+
test 0101010101010101 df98c8276f54b04b 0000000040000000
|
37
|
+
test 0101010101010101 b160e4680f6c696f 0000000020000000
|
38
|
+
test 0101010101010101 fa0752b07d9c4ab8 0000000010000000
|
39
|
+
test 0101010101010101 ca3a2b036dbc8502 0000000008000000
|
40
|
+
test 0101010101010101 5e0905517bb59bcf 0000000004000000
|
41
|
+
test 0101010101010101 814eeb3b91d90726 0000000002000000
|
42
|
+
test 0101010101010101 4d49db1532919c9f 0000000001000000
|
43
|
+
test 0101010101010101 25eb5fc3f8cf0621 0000000000800000
|
44
|
+
test 0101010101010101 ab6a20c0620d1c6f 0000000000400000
|
45
|
+
test 0101010101010101 79e90dbc98f92cca 0000000000200000
|
46
|
+
test 0101010101010101 866ecedd8072bb0e 0000000000100000
|
47
|
+
test 0101010101010101 8b54536f2f3e64a8 0000000000080000
|
48
|
+
test 0101010101010101 ea51d3975595b86b 0000000000040000
|
49
|
+
test 0101010101010101 caffc6ac4542de31 0000000000020000
|
50
|
+
test 0101010101010101 8dd45a2ddf90796c 0000000000010000
|
51
|
+
test 0101010101010101 1029d55e880ec2d0 0000000000008000
|
52
|
+
test 0101010101010101 5d86cb23639dbea9 0000000000004000
|
53
|
+
test 0101010101010101 1d1ca853ae7c0c5f 0000000000002000
|
54
|
+
test 0101010101010101 ce332329248f3228 0000000000001000
|
55
|
+
test 0101010101010101 8405d1abe24fb942 0000000000000800
|
56
|
+
test 0101010101010101 e643d78090ca4207 0000000000000400
|
57
|
+
test 0101010101010101 48221b9937748a23 0000000000000200
|
58
|
+
test 0101010101010101 dd7c0bbd61fafd54 0000000000000100
|
59
|
+
test 0101010101010101 2fbc291a570db5c4 0000000000000080
|
60
|
+
test 0101010101010101 e07c30d7e4e26e12 0000000000000040
|
61
|
+
test 0101010101010101 0953e2258e8e90a1 0000000000000020
|
62
|
+
test 0101010101010101 5b711bc4ceebf2ee 0000000000000010
|
63
|
+
test 0101010101010101 cc083f1e6d9e85f6 0000000000000008
|
64
|
+
test 0101010101010101 d2fd8867d50d2dfe 0000000000000004
|
65
|
+
test 0101010101010101 06e7ea22ce92708f 0000000000000002
|
66
|
+
test 0101010101010101 166b40b44aba4bd6 0000000000000001
|
67
|
+
test 8001010101010101 0000000000000000 95a8d72813daa94d
|
68
|
+
test 4001010101010101 0000000000000000 0eec1487dd8c26d5
|
69
|
+
test 2001010101010101 0000000000000000 7ad16ffb79c45926
|
70
|
+
test 1001010101010101 0000000000000000 d3746294ca6a6cf3
|
71
|
+
test 0801010101010101 0000000000000000 809f5f873c1fd761
|
72
|
+
test 0401010101010101 0000000000000000 c02faffec989d1fc
|
73
|
+
test 0201010101010101 0000000000000000 4615aa1d33e72f10
|
74
|
+
test 0180010101010101 0000000000000000 2055123350c00858
|
75
|
+
test 0140010101010101 0000000000000000 df3b99d6577397c8
|
76
|
+
test 0120010101010101 0000000000000000 31fe17369b5288c9
|
77
|
+
test 0110010101010101 0000000000000000 dfdd3cc64dae1642
|
78
|
+
test 0108010101010101 0000000000000000 178c83ce2b399d94
|
79
|
+
test 0104010101010101 0000000000000000 50f636324a9b7f80
|
80
|
+
test 0102010101010101 0000000000000000 a8468ee3bc18f06d
|
81
|
+
test 0101800101010101 0000000000000000 a2dc9e92fd3cde92
|
82
|
+
test 0101400101010101 0000000000000000 cac09f797d031287
|
83
|
+
test 0101200101010101 0000000000000000 90ba680b22aeb525
|
84
|
+
test 0101100101010101 0000000000000000 ce7a24f350e280b6
|
85
|
+
test 0101080101010101 0000000000000000 882bff0aa01a0b87
|
86
|
+
test 0101040101010101 0000000000000000 25610288924511c2
|
87
|
+
test 0101020101010101 0000000000000000 c71516c29c75d170
|
88
|
+
test 0101018001010101 0000000000000000 5199c29a52c9f059
|
89
|
+
test 0101014001010101 0000000000000000 c22f0a294a71f29f
|
90
|
+
test 0101012001010101 0000000000000000 ee371483714c02ea
|
91
|
+
test 0101011001010101 0000000000000000 a81fbd448f9e522f
|
92
|
+
test 0101010801010101 0000000000000000 4f644c92e192dfed
|
93
|
+
test 0101010401010101 0000000000000000 1afa9a66a6df92ae
|
94
|
+
test 0101010201010101 0000000000000000 b3c1cc715cb879d8
|
95
|
+
test 0101010180010101 0000000000000000 19d032e64ab0bd8b
|
96
|
+
test 0101010140010101 0000000000000000 3cfaa7a7dc8720dc
|
97
|
+
test 0101010120010101 0000000000000000 b7265f7f447ac6f3
|
98
|
+
test 0101010110010101 0000000000000000 9db73b3c0d163f54
|
99
|
+
test 0101010108010101 0000000000000000 8181b65babf4a975
|
100
|
+
test 0101010104010101 0000000000000000 93c9b64042eaa240
|
101
|
+
test 0101010102010101 0000000000000000 5570530829705592
|
102
|
+
test 0101010101800101 0000000000000000 8638809e878787a0
|
103
|
+
test 0101010101400101 0000000000000000 41b9a79af79ac208
|
104
|
+
test 0101010101200101 0000000000000000 7a9be42f2009a892
|
105
|
+
test 0101010101100101 0000000000000000 29038d56ba6d2745
|
106
|
+
test 0101010101080101 0000000000000000 5495c6abf1e5df51
|
107
|
+
test 0101010101040101 0000000000000000 ae13dbd561488933
|
108
|
+
test 0101010101020101 0000000000000000 024d1ffa8904e389
|
109
|
+
test 0101010101018001 0000000000000000 d1399712f99bf02e
|
110
|
+
test 0101010101014001 0000000000000000 14c1d7c1cffec79e
|
111
|
+
test 0101010101012001 0000000000000000 1de5279dae3bed6f
|
112
|
+
test 0101010101011001 0000000000000000 e941a33f85501303
|
113
|
+
test 0101010101010801 0000000000000000 da99dbbc9a03f379
|
114
|
+
test 0101010101010401 0000000000000000 b7fc92f91d8e92e9
|
115
|
+
test 0101010101010201 0000000000000000 ae8e5caa3ca04e85
|
116
|
+
test 0101010101010180 0000000000000000 9cc62df43b6eed74
|
117
|
+
test 0101010101010140 0000000000000000 d863dbb5c59a91a0
|
118
|
+
test 0101010101010120 0000000000000000 a1ab2190545b91d7
|
119
|
+
test 0101010101010110 0000000000000000 0875041e64c570f7
|
120
|
+
test 0101010101010108 0000000000000000 5a594528bebef1cc
|
121
|
+
test 0101010101010104 0000000000000000 fcdb3291de21f0c0
|
122
|
+
test 0101010101010102 0000000000000000 869efd7f9f265a09
|
123
|
+
test 1046913489980131 0000000000000000 88d55e54f54c97b4
|
124
|
+
test 1007103489988020 0000000000000000 0c0cc00c83ea48fd
|
125
|
+
test 10071034c8980120 0000000000000000 83bc8ef3a6570183
|
126
|
+
test 1046103489988020 0000000000000000 df725dcad94ea2e9
|
127
|
+
test 1086911519190101 0000000000000000 e652b53b550be8b0
|
128
|
+
test 1086911519580101 0000000000000000 af527120c485cbb0
|
129
|
+
test 5107b01519580101 0000000000000000 0f04ce393db926d5
|
130
|
+
test 1007b01519190101 0000000000000000 c9f00ffc74079067
|
131
|
+
test 3107915498080101 0000000000000000 7cfd82a593252b4e
|
132
|
+
test 3107919498080101 0000000000000000 cb49a2f9e91363e3
|
133
|
+
test 10079115b9080140 0000000000000000 00b588be70d23f56
|
134
|
+
test 3107911598090140 0000000000000000 406a9a6ab43399ae
|
135
|
+
test 1007d01589980101 0000000000000000 6cb773611dca9ada
|
136
|
+
test 9107911589980101 0000000000000000 67fd21c17dbb5d70
|
137
|
+
test 9107d01589190101 0000000000000000 9592cb4110430787
|
138
|
+
test 1007d01598980120 0000000000000000 a6b7ff68a318ddd3
|
139
|
+
test 1007940498190101 0000000000000000 4d102196c914ca16
|
140
|
+
test 0107910491190401 0000000000000000 2dfa9f4573594965
|
141
|
+
test 0107910491190101 0000000000000000 b46604816c0e0774
|
142
|
+
test 0107940491190401 0000000000000000 6e7e6221a4f34e87
|
143
|
+
test 19079210981a0101 0000000000000000 aa85e74643233199
|
144
|
+
test 1007911998190801 0000000000000000 2e5a19db4d1962d6
|
145
|
+
test 10079119981a0801 0000000000000000 23a866a809d30894
|
146
|
+
test 1007921098190101 0000000000000000 d812d961f017d320
|
147
|
+
test 100791159819010b 0000000000000000 055605816e58608f
|
148
|
+
test 1004801598190101 0000000000000000 abd88e8b1b7716f1
|
149
|
+
test 1004801598190102 0000000000000000 537ac95be69da1e1
|
150
|
+
test 1004801598190108 0000000000000000 aed0f6ae3c25cdd8
|
151
|
+
test 1002911598100104 0000000000000000 b3e35a5ee53e7b8d
|
152
|
+
test 1002911598190104 0000000000000000 61c79c71921a2ef8
|
153
|
+
test 1002911598100201 0000000000000000 e2f5728f0995013c
|
154
|
+
test 1002911698100101 0000000000000000 1aeac39a61f0a464
|
155
|
+
test 7ca110454a1a6e57 01a1d6d039776742 690f5b0d9a26939b
|
156
|
+
test 0131d9619dc1376e 5cd54ca83def57da 7a389d10354bd271
|
157
|
+
test 07a1133e4a0b2686 0248d43806f67172 868ebb51cab4599a
|
158
|
+
test 3849674c2602319e 51454b582ddf440a 7178876e01f19b2a
|
159
|
+
test 04b915ba43feb5b6 42fd443059577fa2 af37fb421f8c4095
|
160
|
+
test 0113b970fd34f2ce 059b5e0851cf143a 86a560f10ec6d85b
|
161
|
+
test 0170f175468fb5e6 0756d8e0774761d2 0cd3da020021dc09
|
162
|
+
test 43297fad38e373fe 762514b829bf486a ea676b2cb7db2b7a
|
163
|
+
test 07a7137045da2a16 3bdd119049372802 dfd64a815caf1a0f
|
164
|
+
test 04689104c2fd3b2f 26955f6835af609a 5c513c9c4886c088
|
165
|
+
test 37d06bb516cb7546 164d5e404f275232 0a2aeeae3ff4ab77
|
166
|
+
test 1f08260d1ac2465e 6b056e18759f5cca ef1bf03e5dfa575a
|
167
|
+
test 584023641aba6176 004bd6ef09176062 88bf0db6d70dee56
|
168
|
+
test 025816164629b007 480d39006ee762f2 a1f9915541020b56
|
169
|
+
test 49793ebc79b3258f 437540c8698f3cfa 6fbf1cafcffd0556
|
170
|
+
test 4fb05e1515ab73a7 072d43a077075292 2f22e49bab7ca1ac
|
171
|
+
test 49e95d6d4ca229bf 02fe55778117f12a 5a6b612cc26cce4a
|
172
|
+
test 018310dc409b26d6 1d9d5c5018f728c2 5f4c038ed12b2e41
|
173
|
+
test 1c587f1c13924fef 305532286d6f295a 63fac0d034d9f793
|
174
|
+
|
175
|
+
|
176
|
+
note CBC mode, zeroes padding
|
177
|
+
fields key_hex plaintext_hex iv_hex block_mode padding ciphertext_hex
|
178
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef cbc zeroes e5c7cdde872bf27c43e934008c389c0f683788499a7c05f6
|
179
|
+
|
180
|
+
note CBC mode, PKCS padding
|
181
|
+
fields key_hex plaintext_hex iv_hex block_mode padding ciphertext_hex
|
182
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef cbc pkcs e5c7cdde872bf27c43e934008c389c0f683788499a7c05f662c16a27e4fcf277
|
183
|
+
|
184
|
+
note CBC CTR mode
|
185
|
+
fields key_hex plaintext_hex iv_hex block_mode ciphertext_hex
|
186
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef cbc_cts e5c7cdde872bf27c683788499a7c05f643e934008c389c0f
|
187
|
+
|
188
|
+
note CFB mode
|
189
|
+
fields key_hex plaintext_hex iv_hex block_mode ciphertext_hex
|
190
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef cfb f3096249c7f46e51a69e839b1a92f78403467133898ea622
|
191
|
+
|
192
|
+
note OFB mode
|
193
|
+
fields key_hex plaintext_hex iv_hex block_mode ciphertext_hex
|
194
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef ofb f3096249c7f46e5135f24a242eeb3d3f3d6d5be3255af8c3
|
195
|
+
|
196
|
+
note COUNTER mode
|
197
|
+
fields key_hex plaintext_hex iv_hex block_mode ciphertext_hex
|
198
|
+
test 0123456789abcdef 4e6f77206973207468652074696d6520666f7220616c6c20 1234567890abcdef counter f3096249c7f46e51163a8ca0ffc94c27fa2f80f480b86f75
|