From 1cdaf0a6fd8dbbf08fe88dd148424df4da683f48 Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Sat, 30 Jul 2016 10:51:47 -0700 Subject: crypto:cmac calculating the Cipher-based Message Authentication Code The ERL-82 issue requests a way to calculate a CMAC in Erlang. The AES128 CMAC is standartized in RFC 4493 and used e.g. for message authentication in the LoRaWAN networks. The CMAC is implemented by OpenSSL since v1.0.1, but as @IngelaAndin stated in response to the ERL-82, the current crypto implementation does not include functions that call those OpenSSL cryptolib functions. This commit introduces a new function `crypto:cmac` that calls the corresponding OpenSSL functions and calculates the CMAC. Only the cmac_nif is implemented. The incremental functions (init, update, final) are not provided because the current OpenSSL does not allow custom memory allocators like `enif_alloc_resource`. The Erlang user guide states that at least OpenSSL 0.9.8 is required, so I added few #ifdefs so the code is compatible with all versions. However, the OpenSSL pages say that the pre-1.0.1 versions (0.9.8 and 1.0.0) are no longer maintained. Even the 1.0.1 will be retired by Dec 2016. Hence I believe that adding a 1.0.1-only function like CMAC should be OK. --- lib/crypto/c_src/crypto.c | 54 ++++++++++++++++++++++++ lib/crypto/doc/src/crypto.xml | 18 ++++++++ lib/crypto/src/crypto.erl | 14 +++++++ lib/crypto/test/crypto_SUITE.erl | 89 +++++++++++++++++++++++++++++++++++++--- 4 files changed, 169 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 7183c395ae..240bfc8341 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -108,6 +108,7 @@ #if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,1) # define HAVE_EVP_AES_CTR # define HAVE_GCM +# define HAVE_CMAC # if OPENSSL_VERSION_NUMBER < OpenSSL_version(1,0,1,'d') # define HAVE_GCM_EVP_DECRYPT_BUG # endif @@ -121,6 +122,10 @@ # define HAVE_ECB_IVEC_BUG #endif +#if defined(HAVE_CMAC) +#include +#endif + #if defined(HAVE_EC) #include #include @@ -224,6 +229,7 @@ static ERL_NIF_TERM hmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] static ERL_NIF_TERM hmac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM hmac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -294,6 +300,7 @@ static ErlNifFunc nif_funcs[] = { {"hmac_update_nif", 2, hmac_update_nif}, {"hmac_final_nif", 1, hmac_final_nif}, {"hmac_final_nif", 2, hmac_final_nif}, + {"cmac_nif", 3, cmac_nif}, {"block_crypt_nif", 5, block_crypt_nif}, {"block_crypt_nif", 4, block_crypt_nif}, {"aes_ige_crypt_nif", 4, aes_ige_crypt_nif}, @@ -1346,6 +1353,53 @@ static ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM return ret; } +static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Type, Key, Data) */ +#if defined(HAVE_CMAC) + struct cipher_type_t *cipherp = NULL; + const EVP_CIPHER *cipher; + CMAC_CTX *ctx; + ErlNifBinary key; + ErlNifBinary data; + ERL_NIF_TERM ret; + unsigned ret_size; + + if (!enif_inspect_iolist_as_binary(env, argv[1], &key) + || !(cipherp = get_cipher_type(argv[0], key.size)) + || !enif_inspect_iolist_as_binary(env, argv[2], &data)) { + return enif_make_badarg(env); + } + cipher = cipherp->cipher.p; + if (!cipher) { + return enif_raise_exception(env, atom_notsup); + } + + ctx = CMAC_CTX_new(); + if (!CMAC_Init(ctx, key.data, key.size, cipher, NULL)) { + CMAC_CTX_free(ctx); + return atom_notsup; + } + + if (!CMAC_Update(ctx, data.data, data.size) || + !CMAC_Final(ctx, + enif_make_new_binary(env, EVP_CIPHER_block_size(cipher), &ret), + &ret_size)) { + CMAC_CTX_free(ctx); + return atom_notsup; + } + ASSERT(ret_size == (unsigned)EVP_CIPHER_block_size(cipher)); + + CMAC_CTX_free(ctx); + CONSUME_REDS(env, data); + return ret; +#else + /* The CMAC functionality was introduced in OpenSSL 1.0.1 + * Although OTP requires at least version 0.9.8, the versions 0.9.8 and 1.0.0 are + * no longer maintained. */ + return atom_notsup; +#endif +} + static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Key, Ivec, Text, IsEncrypt) or (Type, Key, Text, IsEncrypt) */ struct cipher_type_t *cipherp = NULL; diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 5a5627747c..728233d226 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -453,6 +453,24 @@ + + cmac(Type, Key, Data) -> Mac + cmac(Type, Key, Data, MacLength) -> Mac + Calculates the Cipher-based Message Authentication Code. + + Type = block_cipher() + Key = iodata() + Data = iodata() + MacLength = integer() + Mac = binary() + + +

Computes a CMAC of type Type from Data using + Key as the authentication key.

MacLength + will limit the size of the resultant Mac.

+
+
+ info_lib() -> [{Name,VerNum,VerStr}] Provides information about the libraries used by crypto. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 025d57e9c5..ba824eb9cd 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -27,6 +27,7 @@ -export([sign/4, verify/5]). -export([generate_key/2, generate_key/3, compute_key/4]). -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). +-export([cmac/3, cmac/4]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). @@ -271,6 +272,14 @@ hmac_final(Context) -> hmac_final_n(Context, HashLen) -> notsup_to_error(hmac_final_nif(Context, HashLen)). +-spec cmac(_, iodata(), iodata()) -> binary(). +-spec cmac(_, iodata(), iodata(), integer()) -> binary(). + +cmac(Type, Key, Data) -> + notsup_to_error(cmac_nif(Type, Key, Data)). +cmac(Type, Key, Data, MacSize) -> + erlang:binary_part(cmac(Type, Key, Data), 0, MacSize). + %% Ecrypt/decrypt %%% -spec block_encrypt(des_cbc | des_cfb | @@ -782,6 +791,10 @@ hmac_update_nif(_Context, _Data) -> ?nif_stub. hmac_final_nif(_Context) -> ?nif_stub. hmac_final_nif(_Context, _MacSize) -> ?nif_stub. +%% CMAC + +cmac_nif(_Type, _Key, _Data) -> ?nif_stub. + %% %% MD5_MAC %% @@ -1460,6 +1473,7 @@ mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub. -define(FUNC_LIST, [hash, hash_init, hash_update, hash_final, hmac, hmac_init, hmac_update, hmac_final, hmac_final_n, + cmac, %% deprecated md4, md4_init, md4_update, md4_final, md5, md5_init, md5_update, md5_final, diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 6732f27824..90514821a8 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -95,10 +95,10 @@ groups() -> {des_ede3,[], [block]}, {des3_cbf,[], [block]}, {rc2_cbc,[], [block]}, - {aes_cbc128,[], [block]}, + {aes_cbc128,[], [block, cmac]}, {aes_cfb8,[], [block]}, {aes_cfb128,[], [block]}, - {aes_cbc256,[], [block]}, + {aes_cbc256,[], [block, cmac]}, {aes_ecb,[], [block]}, {aes_ige256,[], [block]}, {blowfish_cbc, [], [block]}, @@ -194,6 +194,13 @@ hmac(Config) when is_list(Config) -> hmac(Type, lists:map(fun iolistify/1, Keys), lists:map(fun iolistify/1, Data), Expected), hmac_increment(Type). %%-------------------------------------------------------------------- +cmac() -> + [{doc, "Test all different cmac functions"}]. +cmac(Config) when is_list(Config) -> + Pairs = proplists:get_value(cmac, Config), + lists:foreach(fun cmac_check/1, Pairs), + lists:foreach(fun cmac_check/1, cmac_iolistify(Pairs)). +%%-------------------------------------------------------------------- block() -> [{doc, "Test block ciphers"}]. block(Config) when is_list(Config) -> @@ -346,6 +353,23 @@ hmac_increment(State0, [Increment | Rest]) -> State = crypto:hmac_update(State0, Increment), hmac_increment(State, Rest). +cmac_check({Type, Key, Text, CMac}) -> + ExpCMac = iolist_to_binary(CMac), + case crypto:cmac(Type, Key, Text) of + ExpCMac -> + ok; + Other -> + ct:fail({{crypto, cmac, [Type, Key, Text]}, {expected, ExpCMac}, {got, Other}}) + end; +cmac_check({Type, Key, Text, Size, CMac}) -> + ExpCMac = iolist_to_binary(CMac), + case crypto:cmac(Type, Key, Text, Size) of + ExpCMac -> + ok; + Other -> + ct:fail({{crypto, cmac, [Type, Key, Text, Size]}, {expected, ExpCMac}, {got, Other}}) + end. + block_cipher({Type, Key, PlainText}) -> Plain = iolist_to_binary(PlainText), CipherText = crypto:block_encrypt(Type, Key, PlainText), @@ -566,11 +590,18 @@ mkint(C) when $a =< C, C =< $f -> is_supported(Group) -> lists:member(Group, lists:append([Algo || {_, Algo} <- crypto:supports()])). +cmac_iolistify(Blocks) -> + lists:map(fun do_cmac_iolistify/1, Blocks). block_iolistify(Blocks) -> lists:map(fun do_block_iolistify/1, Blocks). stream_iolistify(Streams) -> lists:map(fun do_stream_iolistify/1, Streams). +do_cmac_iolistify({Type, Key, Text, CMac}) -> + {Type, iolistify(Key), iolistify(Text), CMac}; +do_cmac_iolistify({Type, Key, Text, Size, CMac}) -> + {Type, iolistify(Key), iolistify(Text), Size, CMac}. + do_stream_iolistify({Type, Key, PlainText}) -> {Type, iolistify(Key), iolistify(PlainText)}; do_stream_iolistify({Type, Key, IV, PlainText}) -> @@ -798,12 +829,14 @@ group_config(des_ede3, Config) -> group_config(rc2_cbc, Config) -> Block = rc2_cbc(), [{block, Block} | Config]; -group_config(aes_cbc128, Config) -> +group_config(aes_cbc128 = Type, Config) -> Block = aes_cbc128(), - [{block, Block} | Config]; -group_config(aes_cbc256, Config) -> + Pairs = cmac_nist(Type), + [{block, Block}, {cmac, Pairs} | Config]; +group_config(aes_cbc256 = Type, Config) -> Block = aes_cbc256(), - [{block, Block} | Config]; + Pairs = cmac_nist(Type), + [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_ecb, Config) -> Block = aes_ecb(), [{block, Block} | Config]; @@ -2324,6 +2357,50 @@ ecc() -> end, TestCases). +%% Test data from Appendix D of NIST Special Publication 800-38B +%% http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf +%% The same AES128 test data are also in the RFC 4493 +%% https://tools.ietf.org/html/rfc4493 +cmac_nist(aes_cbc128 = Type) -> + Key = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), + [{Type, Key, <<"">>, + hexstr2bin("bb1d6929e95937287fa37d129b756746")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), + hexstr2bin("070a16b46b4d4144f79bdd9dd04a287c")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" + "ae2d8a571e03ac9c9eb76fac45af8e51" + "30c81c46a35ce411"), + hexstr2bin("dfa66747de9ae63030ca32611497c827")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" + "ae2d8a571e03ac9c9eb76fac45af8e51" + "30c81c46a35ce411e5fbc1191a0a52ef" + "f69f2445df4f9b17ad2b417be66c3710"), + hexstr2bin("51f0bebf7e3b9d92fc49741779363cfe")}, + % truncation + {Type, Key, <<"">>, 4, + hexstr2bin("bb1d6929")}]; + +cmac_nist(aes_cbc256 = Type) -> + Key = hexstr2bin("603deb1015ca71be2b73aef0857d7781" + "1f352c073b6108d72d9810a30914dff4"), + [{Type, Key, <<"">>, + hexstr2bin("028962f61b7bf89efc6b551f4667d983")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), + hexstr2bin("28a7023f452e8f82bd4bf28d8c37c35c")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" + "ae2d8a571e03ac9c9eb76fac45af8e51" + "30c81c46a35ce411"), + hexstr2bin("aaf3d8f1de5640c232f5b169b9c911e6")}, + {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" + "ae2d8a571e03ac9c9eb76fac45af8e51" + "30c81c46a35ce411e5fbc1191a0a52ef" + "f69f2445df4f9b17ad2b417be66c3710"), + hexstr2bin("e1992190549f6ed5696a2c056c315410")}, + % truncation + {Type, Key, <<"">>, 4, + hexstr2bin("028962f6")}]. + + no_padding() -> Public = [_, Mod] = rsa_public(), Private = rsa_private(), -- cgit v1.2.3 From 9a98a20987253410e096292b07b877e1cbd62b7f Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Sat, 30 Jul 2016 12:21:39 -0700 Subject: Fix building crypto/cmac_nif on 64-bit machines. --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 240bfc8341..5270c9131e 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1362,7 +1362,7 @@ static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] ErlNifBinary key; ErlNifBinary data; ERL_NIF_TERM ret; - unsigned ret_size; + size_t ret_size; if (!enif_inspect_iolist_as_binary(env, argv[1], &key) || !(cipherp = get_cipher_type(argv[0], key.size)) -- cgit v1.2.3 From 080dc3a6d3bc09fd95f7d5b10a861f7d34360f8c Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Fri, 12 Aug 2016 02:29:05 -0700 Subject: Added a reference to cmac RFC in the description part of the man page --- lib/crypto/doc/src/crypto.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 728233d226..50e3583a94 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -40,6 +40,9 @@

Hmac functions - Keyed-Hashing for Message Authentication (RFC 2104)

+ +

Cmac functions - The AES-CMAC Algorithm (RFC 4493)

+

Block ciphers - DES and AES in Block Cipher Modes - ECB, CBC, CFB, OFB, CTR and GCM

-- cgit v1.2.3 From 6040f48e0adbd5e70e3dfdbf50618cd451410935 Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Fri, 12 Aug 2016 07:58:45 -0700 Subject: Skip the cmac test cases on older OpenSSL --- lib/crypto/test/crypto_SUITE.erl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 90514821a8..c445b465c7 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -152,6 +152,14 @@ end_per_group(_GroupName, Config) -> init_per_testcase(info, Config) -> Config; +init_per_testcase(cmac, Config) -> + case crypto:info_lib() of + [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10001000 -> + Config; + _Else -> + % The CMAC functionality was introduced in OpenSSL 1.0.1 + {skip, "OpenSSL is too old"} + end; init_per_testcase(_Name,Config) -> Config. -- cgit v1.2.3 From 6b4cf6c5759d1f1f952708ab191f563175950aa0 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 8 Sep 2016 15:49:13 +0100 Subject: Fix compilation when OpenSSL doesn't support RC2 When OpenSSL has been configured with the "no-rc2" option, the header file rc2.h doesn't exist, and neither does the function EVP_rc2_cbc. Let's handle those by checking whether OPENSSL_NO_RC2 is defined. Also update pbe_SUITE, which uses RC2-CBC in one of the tests. --- lib/crypto/c_src/crypto.c | 14 ++++++++++++-- lib/crypto/test/old_crypto_SUITE.erl | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 00fc81c84f..c2ca990a3d 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -51,7 +51,9 @@ #include #include #include -#include +#ifndef OPENSSL_NO_RC2 + #include +#endif #include #include #include @@ -468,7 +470,13 @@ struct cipher_type_t { struct cipher_type_t cipher_types[] = { - {{"rc2_cbc"}, {&EVP_rc2_cbc}}, + {{"rc2_cbc"}, +#ifndef OPENSSL_NO_RC2 + {&EVP_rc2_cbc} +#else + {NULL} +#endif + }, {{"des_cbc"}, {COND_NO_DES_PTR(&EVP_des_cbc)}}, {{"des_cfb"}, {COND_NO_DES_PTR(&EVP_des_cfb8)}}, {{"des_ecb"}, {COND_NO_DES_PTR(&EVP_des_ecb)}}, @@ -827,7 +835,9 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_cfb64"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_ofb64"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_ecb"); +#ifndef OPENSSL_NO_RC2 algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc2_cbc"); +#endif algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc4"); #if defined(HAVE_GCM) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); diff --git a/lib/crypto/test/old_crypto_SUITE.erl b/lib/crypto/test/old_crypto_SUITE.erl index 4a6753b2ed..10a3e52f29 100644 --- a/lib/crypto/test/old_crypto_SUITE.erl +++ b/lib/crypto/test/old_crypto_SUITE.erl @@ -1080,7 +1080,9 @@ rc2_cbc(doc) -> "Encrypt and decrypt according to RC2 CBC and check the result. " "Example stripped out from public_key application test"; rc2_cbc(Config) when is_list(Config) -> - + if_supported(rc2_cbc, fun rc2_cbc_do/0). + +rc2_cbc_do() -> Key = <<146,210,160,124,215,227,153,239,227,17,222,140,3,93,27,191>>, IV = <<72,91,135,182,25,42,35,210>>, -- cgit v1.2.3 From 3489b9b689073f428a23f7fc7a67774b7dda07be Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 18 Sep 2016 12:33:08 +0200 Subject: Use more correct delimiters for erl_nif.h include Anywhere but the beam sources we shouldn't #include "erl_nif.h", because what "erl_nif.h" does is: (1) fail to find it outside of -I dirs, (2) then treat it as if it was written like . Using skips (1). More information can be found in 6.10.2 of the C standard. Because the examples use "erl_nif.h", NIF projects in the Erlang ecosystem copy this verbatim and make the same mistake. --- lib/crypto/c_src/crypto.c | 2 +- lib/crypto/c_src/crypto_callback.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index cd521f04c5..f9fa80c0c7 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -31,7 +31,7 @@ #include #include -#include "erl_nif.h" +#include #define OPENSSL_THREAD_DEFINES #include diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c index 3acbbf406b..4c23379f7f 100644 --- a/lib/crypto/c_src/crypto_callback.c +++ b/lib/crypto/c_src/crypto_callback.c @@ -22,7 +22,7 @@ #include #include -#include "erl_nif.h" +#include #include "crypto_callback.h" #ifdef DEBUG -- cgit v1.2.3 From 25c665f745bce31cc89e9f48980c7a9683259259 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Wed, 14 Sep 2016 10:05:20 +0200 Subject: Fix compilation when OpenSSL doesn't support RC4 When OpenSSL has been configured with the "no-rc4" option, the header file rc4.h doesn't exist, and neither does the rc4 functions. Let's handle those by checking whether OPENSSL_NO_RC4 is defined. --- lib/crypto/c_src/crypto.c | 21 ++++++++++++++++++--- lib/crypto/test/old_crypto_SUITE.erl | 6 ++++++ 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 00fc81c84f..63597a5ede 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -50,7 +50,9 @@ #include #include #include +#ifndef OPENSSL_NO_RC4 #include +#endif /* OPENSSL_NO_RC4 */ #include #include #include @@ -828,7 +830,9 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_ofb64"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_ecb"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc2_cbc"); +#ifndef OPENSSL_NO_RC4 algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc4"); +#endif #if defined(HAVE_GCM) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); #endif @@ -2327,6 +2331,7 @@ static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key, Data) */ +#ifndef OPENSSL_NO_RC4 ErlNifBinary key, data; RC4_KEY rc4_key; ERL_NIF_TERM ret; @@ -2340,10 +2345,14 @@ static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg enif_make_new_binary(env, data.size, &ret)); CONSUME_REDS(env,data); return ret; -} +#else + return enif_raise_exception(env, atom_notsup); +#endif +} static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key) */ +#ifndef OPENSSL_NO_RC4 ErlNifBinary key; ERL_NIF_TERM ret; @@ -2353,11 +2362,14 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg RC4_set_key((RC4_KEY*)enif_make_new_binary(env, sizeof(RC4_KEY), &ret), key.size, key.data); return ret; +#else + return enif_raise_exception(env, atom_notsup); +#endif } static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (State, Data) */ - +#ifndef OPENSSL_NO_RC4 ErlNifBinary state, data; RC4_KEY* rc4_key; ERL_NIF_TERM new_state, new_data; @@ -2373,7 +2385,10 @@ static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_N enif_make_new_binary(env, data.size, &new_data)); CONSUME_REDS(env,data); return enif_make_tuple2(env,new_state,new_data); -} +#else + return enif_raise_exception(env, atom_notsup); +#endif +} static int get_rsa_private_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) { diff --git a/lib/crypto/test/old_crypto_SUITE.erl b/lib/crypto/test/old_crypto_SUITE.erl index 4a6753b2ed..579b14b0eb 100644 --- a/lib/crypto/test/old_crypto_SUITE.erl +++ b/lib/crypto/test/old_crypto_SUITE.erl @@ -2117,6 +2117,9 @@ rc4_test(doc) -> rc4_test(suite) -> []; rc4_test(Config) when is_list(Config) -> + if_supported(rc4, fun rc4_test_do/0). + +rc4_test_do() -> CT1 = <<"Yo baby yo">>, R1 = <<118,122,68,110,157,166,141,212,139,39>>, K = "apaapa", @@ -2132,6 +2135,9 @@ rc4_stream_test(doc) -> rc4_stream_test(suite) -> []; rc4_stream_test(Config) when is_list(Config) -> + if_supported(rc4, fun rc4_stream_test_do/0). + +rc4_stream_test_do() -> CT1 = <<"Yo ">>, CT2 = <<"baby yo">>, K = "apaapa", -- cgit v1.2.3 From 867ef8aab0a32d76e6e66b317ef39c75e84e177e Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 21 Sep 2016 16:16:23 +0100 Subject: Fix erlang:error/2 calls in crypto.erl Make all calls to erlang:error/2 specify the actual argument list of the function. This ensures that the stacktrace contains the correct arity of the function where the error occurred. --- lib/crypto/src/crypto.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index da024cf74c..ca36212ef2 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -484,17 +484,17 @@ sign(Alg, Type, Data, Key) when is_binary(Data) -> sign(Alg, Type, {digest, hash(Type, Data)}, Key); sign(rsa, Type, {digest, Digest}, Key) -> case rsa_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [Type,Digest,Key]); + error -> erlang:error(badkey, [rsa, Type, {digest, Digest}, Key]); Sign -> Sign end; sign(dss, Type, {digest, Digest}, Key) -> case dss_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [Digest, Key]); + error -> erlang:error(badkey, [dss, Type, {digest, Digest}, Key]); Sign -> Sign end; sign(ecdsa, Type, {digest, Digest}, [Key, Curve]) -> case ecdsa_sign_nif(Type, Digest, nif_curve_params(Curve), ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [Type,Digest,Key]); + error -> erlang:error(badkey, [ecdsa, Type, {digest, Digest}, [Key, Curve]]); Sign -> Sign end. @@ -510,7 +510,7 @@ sign(ecdsa, Type, {digest, Digest}, [Key, Curve]) -> public_encrypt(rsa, BinMesg, Key, Padding) -> case rsa_public_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, true) of error -> - erlang:error(encrypt_failed, [BinMesg,Key, Padding]); + erlang:error(encrypt_failed, [rsa, BinMesg,Key, Padding]); Sign -> Sign end. @@ -518,7 +518,7 @@ public_encrypt(rsa, BinMesg, Key, Padding) -> private_decrypt(rsa, BinMesg, Key, Padding) -> case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, false) of error -> - erlang:error(decrypt_failed, [BinMesg,Key, Padding]); + erlang:error(decrypt_failed, [rsa, BinMesg,Key, Padding]); Sign -> Sign end. @@ -527,7 +527,7 @@ private_decrypt(rsa, BinMesg, Key, Padding) -> private_encrypt(rsa, BinMesg, Key, Padding) -> case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, true) of error -> - erlang:error(encrypt_failed, [BinMesg,Key, Padding]); + erlang:error(encrypt_failed, [rsa, BinMesg,Key, Padding]); Sign -> Sign end. @@ -535,7 +535,7 @@ private_encrypt(rsa, BinMesg, Key, Padding) -> public_decrypt(rsa, BinMesg, Key, Padding) -> case rsa_public_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, false) of error -> - erlang:error(decrypt_failed, [BinMesg,Key, Padding]); + erlang:error(decrypt_failed, [rsa, BinMesg,Key, Padding]); Sign -> Sign end. @@ -583,7 +583,7 @@ compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) -> ensure_int_as_bin(MyPrivateKey), map_ensure_int_as_bin(DHParameters)) of error -> erlang:error(computation_failed, - [OthersPublicKey,MyPrivateKey,DHParameters]); + [dh,OthersPublicKey,MyPrivateKey,DHParameters]); Ret -> Ret end; -- cgit v1.2.3 From 0a1feff48388c8430f5eebd1531f769605601fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szoboszlay?= Date: Mon, 28 Apr 2014 17:20:24 +0200 Subject: Support using OpenSSL in FIPS mode FIPS mode support needs to be enabled at compile time, by configuring Erlang/OTP with --enable-fips option. In FIPS mode the non-FIPS algorithms are disabled and raise error notsup. The supported protocols list is properly updated in FIPS mode to advertise only the enabled protocols. FIPS mode is off by default even if Erlang/OTP was built with FIPS support. It needs to be turned on at runtime. The official approach is to set the fips_mode application environment parameter of the crypto application to true. This would turn FIPS mode on when the NIF is loaded and would prevent loading the module on error. Another method is provided via the crypto:enable_fips_mode/1 function, but it is not recommended to be used in production, as it won't prevent the use of the crypto module in case of an error, and would risk OpenSSL crashing the emulator. It is very useful for test suites however that need to check both validated and non-validated functionality. This commit is based on commit 00b3a04d17a653b4abddeebd6dd8a2c38df532d0. --- lib/crypto/c_src/Makefile.in | 2 + lib/crypto/c_src/crypto.c | 125 ++++++++++++++++++++++++++++++++++++++---- lib/crypto/src/crypto.app.src | 2 +- lib/crypto/src/crypto.erl | 35 ++++++++---- 4 files changed, 143 insertions(+), 21 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in index c62f25b3ee..1d1abca08e 100644 --- a/lib/crypto/c_src/Makefile.in +++ b/lib/crypto/c_src/Makefile.in @@ -43,9 +43,11 @@ SSL_LIBDIR = @SSL_LIBDIR@ SSL_INCLUDE = @SSL_INCLUDE@ SSL_CRYPTO_LIBNAME = @SSL_CRYPTO_LIBNAME@ SSL_SSL_LIBNAME = @SSL_SSL_LIBNAME@ +SSL_DEFINE = @SSL_DEFINE@ INCLUDES = $(SSL_INCLUDE) $(DED_INCLUDES) +CFLAGS += $(SSL_DEFINE) ifeq ($(TYPE),debug) TYPEMARKER = .debug diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index f9fa80c0c7..c881a17376 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -222,6 +222,8 @@ static void unload(ErlNifEnv* env, void* priv_data); /* The NIFs: */ static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM info_fips(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM enable_fips_mode(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -291,6 +293,8 @@ static int library_refc = 0; /* number of users of this dynamic library */ static ErlNifFunc nif_funcs[] = { {"info_lib", 0, info_lib}, + {"info_fips", 0, info_fips}, + {"enable_fips_mode", 1, enable_fips_mode}, {"algorithms", 0, algorithms}, {"hash_nif", 2, hash_nif}, {"hash_init_nif", 1, hash_init_nif}, @@ -378,6 +382,12 @@ static ERL_NIF_TERM atom_unknown; static ERL_NIF_TERM atom_none; static ERL_NIF_TERM atom_notsup; static ERL_NIF_TERM atom_digest; +#ifdef FIPS_SUPPORT +static ERL_NIF_TERM atom_enabled; +static ERL_NIF_TERM atom_not_enabled; +#else +static ERL_NIF_TERM atom_not_supported; +#endif #if defined(HAVE_EC) static ERL_NIF_TERM atom_ec; @@ -552,6 +562,13 @@ static int verify_lib_version(void) return 1; } +#ifdef FIPS_SUPPORT +/* In FIPS mode non-FIPS algorithms are disabled and return badarg. */ +#define CHECK_NO_FIPS_MODE() { if (FIPS_mode()) return atom_notsup; } +#else +#define CHECK_NO_FIPS_MODE() +#endif + #ifdef HAVE_DYNAMIC_CRYPTO_LIB # if defined(DEBUG) @@ -602,11 +619,11 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) if (!verify_lib_version()) return 0; - /* load_info: {301, <<"/full/path/of/this/library">>} */ + /* load_info: {302, <<"/full/path/of/this/library">>,true|false} */ if (!enif_get_tuple(env, load_info, &tpl_arity, &tpl_array) - || tpl_arity != 2 + || tpl_arity != 3 || !enif_get_int(env, tpl_array[0], &vernum) - || vernum != 301 + || vernum != 302 || !enif_inspect_binary(env, tpl_array[1], &lib_bin)) { PRINTF_ERR1("CRYPTO: Invalid load_info '%T'", load_info); @@ -650,6 +667,21 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_true = enif_make_atom(env,"true"); atom_false = enif_make_atom(env,"false"); + /* Enter FIPS mode */ + if (tpl_array[2] == atom_true) { +#ifdef FIPS_SUPPORT + if (!FIPS_mode_set(1)) { +#else + { +#endif + PRINTF_ERR0("CRYPTO: Could not setup FIPS mode"); + return 0; + } + } else if (tpl_array[2] != atom_false) { + PRINTF_ERR1("CRYPTO: Invalid load_info '%T'", load_info); + return 0; + } + atom_sha = enif_make_atom(env,"sha"); atom_error = enif_make_atom(env,"error"); atom_rsa_pkcs1_padding = enif_make_atom(env,"rsa_pkcs1_padding"); @@ -683,6 +715,13 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_blowfish_ecb = enif_make_atom(env, "blowfish_ecb"); #endif +#ifdef FIPS_SUPPORT + atom_enabled = enif_make_atom(env,"enabled"); + atom_not_enabled = enif_make_atom(env,"not_enabled"); +#else + atom_not_supported = enif_make_atom(env,"not_supported"); +#endif + init_digest_types(env); init_cipher_types(env); init_algorithms_types(env); @@ -766,15 +805,16 @@ static void unload(ErlNifEnv* env, void* priv_data) --library_refc; } -static int algo_hash_cnt; +static int algo_hash_cnt, algo_hash_fips_cnt; static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */ -static int algo_pubkey_cnt; +static int algo_pubkey_cnt, algo_pubkey_fips_cnt; static ERL_NIF_TERM algo_pubkey[7]; /* increase when extending the list */ -static int algo_cipher_cnt; +static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[23]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { + // Validated algorithms first algo_hash_cnt = 0; algo_hash[algo_hash_cnt++] = atom_sha; #ifdef HAVE_SHA224 @@ -789,6 +829,8 @@ static void init_algorithms_types(ErlNifEnv* env) #ifdef HAVE_SHA512 algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha512"); #endif + // Non-validated algorithms follow + algo_hash_fips_cnt = algo_hash_cnt; algo_hash[algo_hash_cnt++] = enif_make_atom(env, "md4"); algo_hash[algo_hash_cnt++] = enif_make_atom(env, "md5"); algo_hash[algo_hash_cnt++] = enif_make_atom(env, "ripemd160"); @@ -804,8 +846,11 @@ static void init_algorithms_types(ErlNifEnv* env) algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "ecdsa"); algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "ecdh"); #endif + // Non-validated algorithms follow + algo_pubkey_fips_cnt = algo_pubkey_cnt; algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "srp"); + // Validated algorithms first algo_cipher_cnt = 0; #ifndef OPENSSL_NO_DES algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "des3_cbc"); @@ -822,6 +867,11 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "aes_cbc256"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "aes_ctr"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "aes_ecb"); +#if defined(HAVE_GCM) + algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); +#endif + // Non-validated algorithms follow + algo_cipher_fips_cnt = algo_cipher_cnt; #ifdef HAVE_AES_IGE algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_ige256"); #endif @@ -836,9 +886,6 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"blowfish_ecb"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc2_cbc"); algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc4"); -#if defined(HAVE_GCM) - algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); -#endif #if defined(HAVE_CHACHA20_POLY1305) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"chacha20_poly1305"); #endif @@ -850,9 +897,16 @@ static void init_algorithms_types(ErlNifEnv* env) static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { +#ifdef FIPS_SUPPORT + int fips_mode = FIPS_mode(); + int hash_cnt = fips_mode ? algo_hash_fips_cnt : algo_hash_cnt; + int pubkey_cnt = fips_mode ? algo_pubkey_fips_cnt : algo_pubkey_cnt; + int cipher_cnt = fips_mode ? algo_cipher_fips_cnt : algo_cipher_cnt; +#else int hash_cnt = algo_hash_cnt; int pubkey_cnt = algo_pubkey_cnt; int cipher_cnt = algo_cipher_cnt; +#endif return enif_make_tuple3(env, enif_make_list_from_array(env, algo_hash, hash_cnt), enif_make_list_from_array(env, algo_pubkey, pubkey_cnt), @@ -886,6 +940,37 @@ static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] ver_term)); } +static ERL_NIF_TERM info_fips(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{ +#ifdef FIPS_SUPPORT + return FIPS_mode() ? atom_enabled : atom_not_enabled; +#else + return atom_not_supported; +#endif +} + +static ERL_NIF_TERM enable_fips_mode(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Boolean) */ + if (argv[0] == atom_true) { +#ifdef FIPS_SUPPORT + if (FIPS_mode_set(1)) { + return atom_true; + } +#endif + PRINTF_ERR0("CRYPTO: Could not setup FIPS mode"); + return atom_false; + } else if (argv[0] == atom_false) { +#ifdef FIPS_SUPPORT + if (!FIPS_mode_set(0)) { + return atom_false; + } +#endif + return atom_true; + } else { + return enif_make_badarg(env); + } +} + static ERL_NIF_TERM make_badarg_maybe(ErlNifEnv* env) { ERL_NIF_TERM reason; @@ -1442,7 +1527,11 @@ static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM } if ((argv[0] == atom_aes_cfb8 || argv[0] == atom_aes_cfb128) - && (key.size == 24 || key.size == 32)) { + && (key.size == 24 || key.size == 32) +#ifdef FIPS_SUPPORT + && !FIPS_mode() +#endif + ) { /* Why do EVP_CIPHER_CTX_set_key_length() fail on these key sizes? * Fall back on low level API */ @@ -1504,6 +1593,8 @@ static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM int new_ivlen = 0; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || !(key.size == 16 || key.size == 24 || key.size == 32) || !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16 @@ -1531,6 +1622,8 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE unsigned char* ret_ptr; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin) || (key_bin.size != 16 && key_bin.size != 32) || !enif_inspect_binary(env, argv[1], &ivec_bin) @@ -2385,6 +2478,8 @@ static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg RC4_KEY rc4_key; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!enif_inspect_iolist_as_binary(env,argv[0], &key) || !enif_inspect_iolist_as_binary(env,argv[1], &data)) { return enif_make_badarg(env); @@ -2401,6 +2496,8 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg ErlNifBinary key; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!enif_inspect_iolist_as_binary(env,argv[0], &key)) { return enif_make_badarg(env); } @@ -2416,6 +2513,8 @@ static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_N RC4_KEY* rc4_key; ERL_NIF_TERM new_state, new_data; + CHECK_NO_FIPS_MODE(); + if (!enif_inspect_iolist_as_binary(env,argv[0], &state) || state.size != sizeof(RC4_KEY) || !enif_inspect_iolist_as_binary(env,argv[1], &data)) { @@ -2844,6 +2943,8 @@ static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM unsigned dlen; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!get_bn_from_bin(env, argv[0], &bn_multiplier) || !get_bn_from_bin(env, argv[1], &bn_verifier) || !get_bn_from_bin(env, argv[2], &bn_generator) @@ -2904,6 +3005,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ unsigned dlen; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!get_bn_from_bin(env, argv[0], &bn_a) || !get_bn_from_bin(env, argv[1], &bn_u) || !get_bn_from_bin(env, argv[2], &bn_B) @@ -2983,6 +3086,8 @@ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ unsigned dlen; ERL_NIF_TERM ret; + CHECK_NO_FIPS_MODE(); + if (!get_bn_from_bin(env, argv[0], &bn_verifier) || !get_bn_from_bin(env, argv[1], &bn_b) || !get_bn_from_bin(env, argv[2], &bn_u) diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src index 8a47b8a78b..460894c012 100644 --- a/lib/crypto/src/crypto.app.src +++ b/lib/crypto/src/crypto.app.src @@ -24,7 +24,7 @@ crypto_ec_curves]}, {registered, []}, {applications, [kernel, stdlib]}, - {env, []}, + {env, [{fips_mode, false}]}, {runtime_dependencies, ["erts-6.0","stdlib-2.0","kernel-3.0"]}]}. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index ca36212ef2..43f9a0f9e7 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -22,7 +22,8 @@ -module(crypto). --export([start/0, stop/0, info_lib/0, supports/0, version/0, bytes_to_integer/1]). +-export([start/0, stop/0, info_lib/0, info_fips/0, supports/0, enable_fips_mode/1, + version/0, bytes_to_integer/1]). -export([hash/2, hash_init/1, hash_update/2, hash_final/1]). -export([sign/4, verify/5]). -export([generate_key/2, generate_key/3, compute_key/4]). @@ -190,7 +191,7 @@ %%-type ec_key() :: {Curve :: ec_curve(), PrivKey :: binary() | undefined, PubKey :: ec_point() | undefined}. -on_load(on_load/0). --define(CRYPTO_NIF_VSN,301). +-define(CRYPTO_NIF_VSN,302). -define(nif_stub,nif_stub_error(?LINE)). nif_stub_error(Line) -> @@ -220,6 +221,14 @@ supports()-> info_lib() -> ?nif_stub. +-spec info_fips() -> not_supported | not_enabled | enabled. + +info_fips() -> ?nif_stub. + +-spec enable_fips_mode(boolean()) -> boolean(). + +enable_fips_mode(_) -> ?nif_stub. + -spec hash(_, iodata()) -> binary(). hash(Hash, Data0) -> @@ -314,7 +323,7 @@ block_encrypt(des3_cfb, Key0, Ivec, Data) -> Key = check_des3_key(Key0), block_crypt_nif(des_ede3_cfb, Key, Ivec, Data, true); block_encrypt(aes_ige256, Key, Ivec, Data) -> - aes_ige_crypt_nif(Key, Ivec, Data, true); + notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, true)); block_encrypt(aes_gcm, Key, Ivec, {AAD, Data}) -> aes_gcm_encrypt(Key, Ivec, AAD, Data); block_encrypt(aes_gcm, Key, Ivec, {AAD, Data, TagLength}) -> @@ -651,7 +660,8 @@ on_load() -> end, Lib = filename:join([PrivDir, "lib", LibName]), LibBin = path2bin(Lib), - Status = case erlang:load_nif(Lib, {?CRYPTO_NIF_VSN,LibBin}) of + FipsMode = application:get_env(crypto, fips_mode, false) == true, + Status = case erlang:load_nif(Lib, {?CRYPTO_NIF_VSN,LibBin,FipsMode}) of ok -> ok; {error, {load_failed, _}}=Error1 -> ArchLibDir = @@ -664,7 +674,7 @@ on_load() -> _ -> ArchLib = filename:join([ArchLibDir, LibName]), ArchBin = path2bin(ArchLib), - erlang:load_nif(ArchLib, {?CRYPTO_NIF_VSN,ArchBin}) + erlang:load_nif(ArchLib, {?CRYPTO_NIF_VSN,ArchBin,FipsMode}) end; Error1 -> Error1 end, @@ -1096,24 +1106,29 @@ rc4_encrypt_with_state(_State, _Data) -> ?nif_stub. %% RC2 block cipher rc2_cbc_encrypt(Key, IVec, Data) -> - block_encrypt(rc2_cbc, Key, IVec, Data). + notsup_to_error(block_encrypt(rc2_cbc, Key, IVec, Data)). rc2_cbc_decrypt(Key, IVec, Data) -> - block_decrypt(rc2_cbc, Key, IVec, Data). + notsup_to_error(block_decrypt(rc2_cbc, Key, IVec, Data)). %% %% RC2 - 40 bits block cipher - Backwards compatibility not documented. %% rc2_40_cbc_encrypt(Key, IVec, Data) when erlang:byte_size(Key) == 5 -> - block_encrypt(rc2_cbc, Key, IVec, Data). + notsup_to_error(block_encrypt(rc2_cbc, Key, IVec, Data)). rc2_40_cbc_decrypt(Key, IVec, Data) when erlang:byte_size(Key) == 5 -> - block_decrypt(rc2_cbc, Key, IVec, Data). + notsup_to_error(block_decrypt(rc2_cbc, Key, IVec, Data)). %% Secure remote password ------------------------------------------------------------------- user_srp_gen_key(Private, Generator, Prime) -> + %% Ensure the SRP algorithm is disabled in FIPS mode + case info_fips() of + enabled -> erlang:error(notsup); + _ -> ok + end, case mod_pow(Generator, Private, Prime) of error -> error; @@ -1532,6 +1547,6 @@ mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub. des_cbc_ivec, des_cfb_ivec, info, %% - info_lib, supports]). + info_lib, info_fips, supports]). info() -> ?FUNC_LIST. -- cgit v1.2.3 From 01222faf161cf656062144d01d0f93146215736b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szoboszlay?= Date: Tue, 6 May 2014 17:45:48 +0200 Subject: Update test suites with FIPS mode support Every algorithm is now tested in both FIPS and non-FIPS modes (when crypto is compiled with FIPS support). In FIPS mode non-FIPS algorithms are disabled and the tests verify that they crash with notsup error as expected. In FIPS mode RSA and EC algorithms don't work if the key sizes are below a minimum required value - which happened to be the case with most keys used in the tests. These tests were changed to use longer keys (even in non-FIPS mode for simplicity). Conflicts: lib/crypto/test/crypto_SUITE.erl --- lib/crypto/test/blowfish_SUITE.erl | 72 ++++++++- lib/crypto/test/crypto_SUITE.erl | 299 ++++++++++++++++++++++++++++++------- 2 files changed, 311 insertions(+), 60 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index d7c50dc6de..c45aae6916 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -107,11 +107,33 @@ end_per_testcase(_TestCase, Config) -> suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> -[ecb, cbc, cfb64, ofb64]. +[{group, fips}, + {group, non_fips}]. groups() -> - []. + [{fips, [], [no_ecb, no_cbc, no_cfb64, no_ofb64]}, + {non_fips, [], [ecb, cbc, cfb64, ofb64]}]. +init_per_group(fips, Config) -> + case crypto:info_fips() of + enabled -> + Config; + not_enabled -> + true = crypto:enable_fips_mode(true), + enabled = crypto:info_fips(), + Config; + not_supported -> + {skip, "FIPS mode not supported"} + end; +init_per_group(non_fips, Config) -> + case crypto:info_fips() of + enabled -> + true = crypto:enable_fips_mode(false), + not_enabled = crypto:info_fips(), + Config; + _NotEnabled -> + Config + end; init_per_group(_GroupName, Config) -> Config. @@ -196,8 +218,54 @@ ofb64(Config) when is_list(Config) -> to_bin("E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA"), ok. +no_ecb(doc) -> + "Test that ECB mode is disabled"; +no_ecb(suite) -> + []; +no_ecb(Config) when is_list(Config) -> + notsup(fun crypto:blowfish_ecb_encrypt/2, + [to_bin("0000000000000000"), + to_bin("FFFFFFFFFFFFFFFF")]). + +no_cbc(doc) -> + "Test that CBC mode is disabled"; +no_cbc(suite) -> + []; +no_cbc(Config) when is_list(Config) -> + notsup(fun crypto:blowfish_cbc_encrypt/3, + [?KEY, ?IVEC, ?DATA_PADDED]). + +no_cfb64(doc) -> + "Test that CFB64 mode is disabled"; +no_cfb64(suite) -> + []; +no_cfb64(Config) when is_list(Config) -> + notsup(fun crypto:blowfish_cfb64_encrypt/3, + [?KEY, ?IVEC, ?DATA]), + ok. + +no_ofb64(doc) -> + "Test that OFB64 mode is disabled"; +no_ofb64(suite) -> + []; +no_ofb64(Config) when is_list(Config) -> + notsup(fun crypto:blowfish_ofb64_encrypt/3, + [?KEY, ?IVEC, ?DATA]). + %% Helper functions +%% Assert function fails with notsup error +notsup(Fun, Args) -> + ok = try + {error, {return, apply(Fun, Args)}} + catch + error:notsup -> + ok; + Class:Error -> + {error, {Class, Error}} + end. + + %% Convert a hexadecimal string to a binary. -spec(to_bin(L::string()) -> binary()). to_bin(L) -> diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index f0811c3e4f..ec8c157d37 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -29,52 +29,88 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. -all() -> +all() -> [app, appup, - {group, md4}, - {group, md5}, - {group, ripemd160}, - {group, sha}, - {group, sha224}, - {group, sha256}, - {group, sha384}, - {group, sha512}, - {group, rsa}, - {group, dss}, - {group, ecdsa}, - {group, dh}, - {group, ecdh}, - {group, srp}, - {group, des_cbc}, - {group, des_cfb}, - {group, des3_cbc}, - {group, des3_cbf}, - {group, des3_cfb}, - {group, des_ede3}, - {group, blowfish_cbc}, - {group, blowfish_ecb}, - {group, blowfish_cfb64}, - {group, blowfish_ofb64}, - {group, aes_cbc128}, - {group, aes_cfb8}, - {group, aes_cfb128}, - {group, aes_cbc256}, - {group, aes_ecb}, - {group, aes_ige256}, - {group, rc2_cbc}, - {group, rc4}, - {group, aes_ctr}, - {group, aes_gcm}, - {group, chacha20_poly1305}, - {group, aes_cbc}, + {group, fips}, + {group, non_fips}, mod_pow, exor, rand_uniform ]. -groups() -> - [{md4, [], [hash]}, +groups() -> + [{non_fips, [], [{group, md4}, + {group, md5}, + {group, ripemd160}, + {group, sha}, + {group, sha224}, + {group, sha256}, + {group, sha384}, + {group, sha512}, + {group, rsa}, + {group, dss}, + {group, ecdsa}, + {group, dh}, + {group, ecdh}, + {group, srp}, + {group, des_cbc}, + {group, des_cfb}, + {group, des3_cbc}, + {group, des3_cbf}, + {group, des3_cfb}, + {group, des_ede3}, + {group, blowfish_cbc}, + {group, blowfish_ecb}, + {group, blowfish_cfb64}, + {group, blowfish_ofb64}, + {group, aes_cbc128}, + {group, aes_cfb8}, + {group, aes_cfb128}, + {group, aes_cbc256}, + {group, aes_ige256}, + {group, rc2_cbc}, + {group, rc4}, + {group, aes_ctr}, + {group, aes_gcm}, + {group, chacha20_poly1305}, + {group, aes_cbc}]}, + {fips, [], [{group, no_md4}, + {group, no_md5}, + {group, no_ripemd160}, + {group, sha}, + {group, sha224}, + {group, sha256}, + {group, sha384}, + {group, sha512}, + {group, rsa}, + {group, dss}, + {group, ecdsa}, + {group, dh}, + {group, ecdh}, + {group, no_srp}, + {group, no_des_cbc}, + {group, no_des_cfb}, + {group, des3_cbc}, + {group, des3_cbf}, + {group, des3_cfb}, + {group, des_ede3}, + {group, no_blowfish_cbc}, + {group, no_blowfish_ecb}, + {group, no_blowfish_cfb64}, + {group, no_blowfish_ofb64}, + {group, aes_cbc128}, + {group, aes_cfb8}, + {group, aes_cfb128}, + {group, aes_cbc256}, + {group, no_aes_ige256}, + {group, no_rc2_cbc}, + {group, no_rc4}, + {group, aes_ctr}, + {group, aes_gcm}, + {group, no_chacha20_poly1305}, + {group, aes_cbc}]}, + {md4, [], [hash]}, {md5, [], [hash, hmac]}, {ripemd160, [], [hash]}, {sha, [], [hash, hmac]}, @@ -82,9 +118,9 @@ groups() -> {sha256, [], [hash, hmac]}, {sha384, [], [hash, hmac]}, {sha512, [], [hash, hmac]}, - {rsa, [], [sign_verify, - public_encrypt - ]}, + {rsa, [], [sign_verify, + public_encrypt + ]}, {dss, [], [sign_verify]}, {ecdsa, [], [sign_verify]}, {dh, [], [generate_compute]}, @@ -107,11 +143,25 @@ groups() -> {blowfish_ecb, [], [block]}, {blowfish_cfb64, [], [block]}, {blowfish_ofb64,[], [block]}, - {rc4, [], [stream]}, + {rc4, [], [stream]}, {aes_ctr, [], [stream]}, {aes_gcm, [], [aead]}, {chacha20_poly1305, [], [aead]}, - {aes_cbc, [], [block]} + {aes_cbc, [], [block]}, + {no_md4, [], [no_support, no_hash]}, + {no_md5, [], [no_support, no_hash, no_hmac]}, + {no_ripemd160, [], [no_support, no_hash]}, + {no_srp, [], [no_support, no_generate_compute]}, + {no_des_cbc, [], [no_support, no_block]}, + {no_des_cfb, [], [no_support, no_block]}, + {no_blowfish_cbc, [], [no_support, no_block]}, + {no_blowfish_ecb, [], [no_support, no_block]}, + {no_blowfish_cfb64, [], [no_support, no_block]}, + {no_blowfish_ofb64, [], [no_support, no_block]}, + {no_aes_ige256, [], [no_support, no_block]}, + {no_chacha20_poly1305, [], [no_support, no_block]}, + {no_rc2_cbc, [], [no_support, no_block]}, + {no_rc4, [], [no_support, no_stream]} ]. %%------------------------------------------------------------------- @@ -141,12 +191,42 @@ end_per_suite(_Config) -> application:stop(crypto). %%------------------------------------------------------------------- +init_per_group(fips, Config) -> + FIPSConfig = [{fips, true} | Config], + case crypto:info_fips() of + enabled -> + FIPSConfig; + not_enabled -> + true = crypto:enable_fips_mode(true), + enabled = crypto:info_fips(), + FIPSConfig; + not_supported -> + {skip, "FIPS mode not supported"} + end; +init_per_group(non_fips, Config) -> + NonFIPSConfig = [{fips, false} | Config], + case crypto:info_fips() of + enabled -> + true = crypto:enable_fips_mode(false), + not_enabled = crypto:info_fips(), + NonFIPSConfig; + _NotEnabled -> + NonFIPSConfig + end; init_per_group(GroupName, Config) -> - case is_supported(GroupName) of - true -> - group_config(GroupName, Config); - false -> - {skip, "Group not supported"} + case atom_to_list(GroupName) of + "no_" ++ TypeStr -> + %% Negated test case: check the algorithm is not supported + %% (e.g. due to FIPS mode limitations) + [{type, list_to_atom(TypeStr)} | Config]; + _Other -> + %% Regular test case: skip if the algorithm is not supported + case is_supported(GroupName) of + true -> + [{type, GroupName} | group_config(GroupName, Config)]; + false -> + {skip, "Group not supported"} + end end. end_per_group(_GroupName, Config) -> @@ -183,6 +263,12 @@ appup() -> appup(Config) when is_list(Config) -> ok = ?t:appup_test(crypto). %%-------------------------------------------------------------------- +no_support() -> + [{doc, "Test an algorithm is not reported in the supported list"}]. +no_support(Config) when is_list(Config) -> + Type = ?config(type, Config), + false = is_supported(Type). +%%-------------------------------------------------------------------- hash() -> [{doc, "Test all different hash functions"}]. hash(Config) when is_list(Config) -> @@ -194,7 +280,14 @@ hash(Config) when is_list(Config) -> hash(Type, Msgs, Digests), hash(Type, lists:map(fun iolistify/1, Msgs), Digests), hash_increment(Type, Inc, IncrDigest). -%%-------------------------------------------------------------------- +%%-------------------------------------------------------------------- +no_hash() -> + [{doc, "Test all disabled hash functions"}]. +no_hash(Config) when is_list(Config) -> + Type = ?config(type, Config), + notsup(fun crypto:hash/2, [Type, <<"Hi There">>]), + notsup(fun crypto:hash_init/1, [Type]). +%%-------------------------------------------------------------------- hmac() -> [{doc, "Test all different hmac functions"}]. hmac(Config) when is_list(Config) -> @@ -204,6 +297,13 @@ hmac(Config) when is_list(Config) -> hmac(Type, lists:map(fun iolistify/1, Keys), lists:map(fun iolistify/1, Data), Expected), hmac_increment(Type). %%-------------------------------------------------------------------- +no_hmac() -> + [{doc, "Test all disabled hmac functions"}]. +no_hmac(Config) when is_list(Config) -> + Type = ?config(type, Config), + notsup(fun crypto:hmac/3, [Type, <<"Key">>, <<"Hi There">>]), + notsup(fun crypto:hmac_init/2, [Type, <<"Key">>]). +%%-------------------------------------------------------------------- cmac() -> [{doc, "Test all different cmac functions"}]. cmac(Config) when is_list(Config) -> @@ -214,12 +314,41 @@ cmac(Config) when is_list(Config) -> block() -> [{doc, "Test block ciphers"}]. block(Config) when is_list(Config) -> + Fips = proplists:get_bool(fips, Config), + Type = ?config(type, Config), + %% See comment about EVP_CIPHER_CTX_set_key_length in + %% block_crypt_nif in crypto.c. + case {Fips, Type} of + {true, aes_cfb8} -> + throw({skip, "Cannot test aes_cfb8 in FIPS mode because of key length issue"}); + {true, aes_cfb128} -> + throw({skip, "Cannot test aes_cfb128 in FIPS mode because of key length issue"}); + _ -> + ok + end, + Blocks = proplists:get_value(block, Config), lists:foreach(fun block_cipher/1, Blocks), lists:foreach(fun block_cipher/1, block_iolistify(Blocks)), lists:foreach(fun block_cipher_increment/1, block_iolistify(Blocks)). %%-------------------------------------------------------------------- +no_block() -> + [{doc, "Test disabled block ciphers"}]. +no_block(Config) when is_list(Config) -> + Type = ?config(type, Config), + Args = case Type of + des_ecb -> + [Type, <<"Key">>, <<"Hi There">>]; + blowfish_ecb -> + [Type, <<"Key">>, <<"Hi There">>]; + _ -> + [Type, <<"Key">>, <<"Ivec">>, <<"Hi There">>] + end, + N = length(Args), + notsup(fun crypto:block_encrypt/N, Args), + notsup(fun crypto:block_decrypt/N, Args). +%%-------------------------------------------------------------------- stream() -> [{doc, "Test stream ciphers"}]. stream(Config) when is_list(Config) -> @@ -228,6 +357,12 @@ stream(Config) when is_list(Config) -> lists:foreach(fun stream_cipher/1, Streams), lists:foreach(fun stream_cipher/1, stream_iolistify(Streams)), lists:foreach(fun stream_cipher_incment/1, stream_iolistify(Streams)). +%%-------------------------------------------------------------------- +no_stream() -> + [{doc, "Test disabled stream ciphers"}]. +no_stream(Config) when is_list(Config) -> + Type = ?config(type, Config), + notsup(fun crypto:stream_init/2, [Type, <<"Key">>]). %%-------------------------------------------------------------------- aead() -> @@ -259,6 +394,24 @@ generate_compute(Config) when is_list(Config) -> GenCom = proplists:get_value(generate_compute, Config), lists:foreach(fun do_generate_compute/1, GenCom). %%-------------------------------------------------------------------- +no_generate_compute() -> + [{doc, "Test crypto:genarate_key and crypto:compute_key " + "for disabled algorithms"}]. +no_generate_compute(Config) when is_list(Config) -> + %% This test is specific to the SRP protocol + srp = ?config(type, Config), + {srp, + UserPrivate, UserGenParams, UserComParams, + HostPublic, HostPrivate, HostGenParams, HostComParams, + _SessionKey} = srp3(), + UserPublic = HostPublic, % use a fake public key + notsup(fun crypto:generate_key/3, [srp, UserGenParams, UserPrivate]), + notsup(fun crypto:generate_key/3, [srp, HostGenParams, HostPrivate]), + notsup(fun crypto:compute_key/4, + [srp, HostPublic, {UserPublic, UserPrivate}, UserComParams]), + notsup(fun crypto:compute_key/4, + [srp, UserPublic, {HostPublic, HostPrivate}, HostComParams]). +%%-------------------------------------------------------------------- compute() -> [{doc, " Test crypto:compute_key"}]. compute(Config) when is_list(Config) -> @@ -577,6 +730,25 @@ do_generate({ecdh = Type, Curve, Priv, Pub}) -> ct:fail({{crypto, generate_key, [Type, Priv, Curve]}, {expected, Pub}, {got, Other}}) end. +notsup(Fun, Args) -> + Result = + try + {error, {return, apply(Fun, Args)}} + catch + error:notsup -> + ok; + Class:Error -> + {error, {Class, Error}} + end, + case Result of + ok -> + ok; + {error, Value} -> + {module, Module} = erlang:fun_info(Fun, module), + {name, Name} = erlang:fun_info(Fun, name), + ct:fail({{Module, Name, Args}, {expected, {error, notsup}}, {got, Value}}) + end. + hexstr2point(X, Y) -> <<4:8, (hexstr2bin(X))/binary, (hexstr2bin(Y))/binary>>. @@ -791,12 +963,23 @@ group_config(rsa = Type, Config) -> Private = rsa_private(), PublicS = rsa_public_stronger(), PrivateS = rsa_private_stronger(), - SignVerify = sign_verify_tests(Type, Msg, Public, Private, PublicS, PrivateS), + SignVerify = + case ?config(fips, Config) of + true -> + %% Use only the strong keys in FIPS mode + sign_verify_tests(Type, Msg, + PublicS, PrivateS, + PublicS, PrivateS); + false -> + sign_verify_tests(Type, Msg, + Public, Private, + PublicS, PrivateS) + end, MsgPubEnc = <<"7896345786348 Asldi">>, - PubPrivEnc = [{rsa, Public, Private, MsgPubEnc, rsa_pkcs1_padding}, - rsa_oaep(), - no_padding() - ], + PubPrivEnc = [{rsa, PublicS, PrivateS, MsgPubEnc, rsa_pkcs1_padding}, + rsa_oaep(), + no_padding() + ], [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc} | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), @@ -2335,7 +2518,7 @@ ecdh() -> TestCases). dh() -> - {dh, 0087761979513264537414556992123116644042638206717762626089877284926656954974893442000747478454809111207351620687968672207938731607963470779396984752680274820156266685080223616226905101126463253150237669547023934604953898814222890239130021414026118792251620881355456432549881723310342870016961804255746630219, 2}. + {dh, 90970053988169282502023478715631717259407236400413906591937635666709823903223997309250405131675572047545403771567755831138144089197560332757755059848492919215391041119286178688014693040542889497092308638580104031455627238700168892909539193174537248629499995652186913900511641708112112482297874449292467498403, 2}. rsa_oaep() -> %% ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15crypt-vectors.txt @@ -2423,8 +2606,8 @@ cmac_nist(aes_cbc256 = Type) -> no_padding() -> - Public = [_, Mod] = rsa_public(), - Private = rsa_private(), + Public = [_, Mod] = rsa_public_stronger(), + Private = rsa_private_stronger(), MsgLen = erlang:byte_size(int_to_bin(Mod)), Msg = list_to_binary(lists:duplicate(MsgLen, $X)), {rsa, Public, Private, Msg, rsa_no_padding}. -- cgit v1.2.3 From 481be8b29d75570cf2b60f86f2e4ead79ceea2bb Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Fri, 9 Sep 2016 18:11:02 +0100 Subject: Skip FIPS tests if we cannot enable FIPS mode Even if Erlang/OTP has been built with --enable-fips, it's possible that the OpenSSL library we're linked to doesn't support FIPS mode. In that case, it will fail to enable it at run time. Let's handle that in crypto_SUITE, by skipping the tests instead of failing. --- lib/crypto/test/blowfish_SUITE.erl | 10 +++++++--- lib/crypto/test/crypto_SUITE.erl | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index c45aae6916..a78f8fe39a 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -119,9 +119,13 @@ init_per_group(fips, Config) -> enabled -> Config; not_enabled -> - true = crypto:enable_fips_mode(true), - enabled = crypto:info_fips(), - Config; + case crypto:enable_fips_mode(true) of + true -> + enabled = crypto:info_fips(), + Config; + false -> + {skip, "Failed to enable FIPS mode"} + end; not_supported -> {skip, "FIPS mode not supported"} end; diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index ec8c157d37..02b25ce62f 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -197,9 +197,13 @@ init_per_group(fips, Config) -> enabled -> FIPSConfig; not_enabled -> - true = crypto:enable_fips_mode(true), - enabled = crypto:info_fips(), - FIPSConfig; + case crypto:enable_fips_mode(true) of + true -> + enabled = crypto:info_fips(), + FIPSConfig; + false -> + {skip, "Failed to enable FIPS mode"} + end; not_supported -> {skip, "FIPS mode not supported"} end; -- cgit v1.2.3 From 275224b036c1713bd3162484d17b160ca8203116 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Mon, 12 Sep 2016 15:48:01 +0100 Subject: Filter elliptic curves depending on FIPS mode Adapted from commit 675ee6860d2c273bcc6c6a0536634a107e2a3d9f. --- lib/crypto/src/crypto_ec_curves.erl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto_ec_curves.erl b/lib/crypto/src/crypto_ec_curves.erl index 002b03b80c..9602a7e24b 100644 --- a/lib/crypto/src/crypto_ec_curves.erl +++ b/lib/crypto/src/crypto_ec_curves.erl @@ -7,29 +7,36 @@ curves() -> PubKeys = proplists:get_value(public_keys, CryptoSupport), HasEC = proplists:get_bool(ecdh, PubKeys), HasGF2m = proplists:get_bool(ec_gf2m, PubKeys), - prime_curves(HasEC) ++ characteristic_two_curves(HasGF2m). + FIPSMode = crypto:info_fips() == enabled, + prime_curves(HasEC, FIPSMode) ++ characteristic_two_curves(HasGF2m, FIPSMode). -prime_curves(true) -> - [secp112r1,secp112r2,secp128r1,secp128r2,secp160k1,secp160r1,secp160r2, +prime_curves(true, true) -> + [secp160k1,secp160r1,secp160r2, secp192r1,secp192k1,secp224k1,secp224r1,secp256k1,secp256r1,secp384r1, secp521r1,prime192v1,prime192v2,prime192v3,prime239v1,prime239v2,prime239v3, - prime256v1,wtls6,wtls7,wtls8,wtls9,wtls12, + prime256v1,wtls7,wtls9,wtls12, brainpoolP160r1,brainpoolP160t1,brainpoolP192r1,brainpoolP192t1, brainpoolP224r1,brainpoolP224t1,brainpoolP256r1,brainpoolP256t1, brainpoolP320r1,brainpoolP320t1,brainpoolP384r1,brainpoolP384t1, brainpoolP512r1,brainpoolP512t1]; -prime_curves(_) -> +prime_curves(true, false) -> + [secp112r1,secp112r2,secp128r1,secp128r2,wtls6,wtls8] + ++ prime_curves(true, true); +prime_curves(_, _) -> []. -characteristic_two_curves(true) -> - [sect113r1,sect113r2,sect131r1,sect131r2,sect163k1,sect163r1, +characteristic_two_curves(true, true) -> + [sect163k1,sect163r1, sect163r2,sect193r1,sect193r2,sect233k1,sect233r1,sect239k1,sect283k1, sect283r1,sect409k1,sect409r1,sect571k1,sect571r1,c2pnb163v1,c2pnb163v2, c2pnb163v3,c2pnb176v1,c2tnb191v1,c2tnb191v2,c2tnb191v3,c2pnb208w1,c2tnb239v1, c2tnb239v2,c2tnb239v3,c2pnb272w1,c2pnb304w1,c2tnb359v1,c2pnb368w1,c2tnb431r1, - wtls1,wtls3,wtls4,wtls5,wtls10,wtls11,ipsec3,ipsec4]; -characteristic_two_curves(_) -> + wtls3,wtls5,wtls10,wtls11]; +characteristic_two_curves(true, _) -> + [sect113r1,sect113r2,sect131r1,sect131r2,wtls1,wtls4,ipsec3,ipsec4] + ++ characteristic_two_curves(true, true); +characteristic_two_curves(_, _) -> []. curve(secp112r1) -> -- cgit v1.2.3 From 96cc0088baa6bba5eb018897dd9bd095a5ac70db Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Mon, 12 Sep 2016 17:00:26 +0100 Subject: Use proper test data for FIPS mode negative tests block_crypt_nif does some sanity tests on its arguments before trying to initialise the cipher. This made some of the tests in crypto_SUITE fail, since they were expecting notsup, not badarg. Fix this by passing the same test data as for the positive tests. --- lib/crypto/test/crypto_SUITE.erl | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 02b25ce62f..ab4aa76b93 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -159,7 +159,7 @@ groups() -> {no_blowfish_cfb64, [], [no_support, no_block]}, {no_blowfish_ofb64, [], [no_support, no_block]}, {no_aes_ige256, [], [no_support, no_block]}, - {no_chacha20_poly1305, [], [no_support, no_block]}, + {no_chacha20_poly1305, [], [no_support, no_aead]}, {no_rc2_cbc, [], [no_support, no_block]}, {no_rc4, [], [no_support, no_stream]} ]. @@ -222,7 +222,8 @@ init_per_group(GroupName, Config) -> "no_" ++ TypeStr -> %% Negated test case: check the algorithm is not supported %% (e.g. due to FIPS mode limitations) - [{type, list_to_atom(TypeStr)} | Config]; + TypeAtom = list_to_atom(TypeStr), + [{type, TypeAtom} | group_config(TypeAtom, Config)]; _Other -> %% Regular test case: skip if the algorithm is not supported case is_supported(GroupName) of @@ -340,19 +341,29 @@ block(Config) when is_list(Config) -> no_block() -> [{doc, "Test disabled block ciphers"}]. no_block(Config) when is_list(Config) -> - Type = ?config(type, Config), - Args = case Type of - des_ecb -> - [Type, <<"Key">>, <<"Hi There">>]; - blowfish_ecb -> - [Type, <<"Key">>, <<"Hi There">>]; - _ -> - [Type, <<"Key">>, <<"Ivec">>, <<"Hi There">>] - end, + Blocks = proplists:get_value(block, Config), + Args = case Blocks of + [{_Type, _Key, _PlainText} = A | _] -> + tuple_to_list(A); + [{_Type, _Key, _IV, _PlainText} = A | _] -> + tuple_to_list(A); + [{Type, Key, IV, PlainText, _CipherText} | _] -> + [Type, Key, IV, PlainText] + end, N = length(Args), notsup(fun crypto:block_encrypt/N, Args), notsup(fun crypto:block_decrypt/N, Args). %%-------------------------------------------------------------------- +no_aead() -> + [{doc, "Test disabled aead ciphers"}]. +no_aead(Config) when is_list(Config) -> + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag} | _] = + proplists:get_value(aead, Config), + EncryptArgs = [Type, Key, Nonce, {AAD, PlainText}], + DecryptArgs = [Type, Key, Nonce, {AAD, CipherText, CipherTag}], + notsup(fun crypto:block_encrypt/4, EncryptArgs), + notsup(fun crypto:block_decrypt/4, DecryptArgs). +%%-------------------------------------------------------------------- stream() -> [{doc, "Test stream ciphers"}]. stream(Config) when is_list(Config) -> -- cgit v1.2.3 From b6c83354ac6c3d37dd5f9891932302e4104606eb Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Fri, 23 Sep 2016 11:46:17 +0100 Subject: Fix aes_gcm test case in crypto_SUITE In one of the test cases, the IV is 8 bytes. In FIPS mode, the minimum allowed IV length is 12 bytes, so let's skip that test case. --- lib/crypto/test/crypto_SUITE.erl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index ab4aa76b93..0c3b7a0445 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -385,7 +385,20 @@ aead() -> aead(Config) when is_list(Config) -> AEADs = lazy_eval(proplists:get_value(aead, Config)), - lists:foreach(fun aead_cipher/1, AEADs). + FilteredAEADs = + case proplists:get_bool(fips, Config) of + false -> + AEADs; + true -> + %% In FIPS mode, the IV length must be at least 12 bytes. + lists:filter( + fun(Tuple) -> + IVLen = byte_size(element(4, Tuple)), + IVLen >= 12 + end, AEADs) + end, + + lists:foreach(fun aead_cipher/1, FilteredAEADs). %%-------------------------------------------------------------------- sign_verify() -> -- cgit v1.2.3 From cbc937f1c16964669a6d4865aeda2fcdeef9df0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szoboszlay?= Date: Tue, 13 May 2014 10:39:36 +0200 Subject: Document FIPS mode support --- lib/crypto/doc/src/Makefile | 2 +- lib/crypto/doc/src/crypto.xml | 22 ++++ lib/crypto/doc/src/crypto_app.xml | 24 ++++- lib/crypto/doc/src/fips.xml | 211 ++++++++++++++++++++++++++++++++++++++ lib/crypto/doc/src/usersguide.xml | 1 + 5 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 lib/crypto/doc/src/fips.xml (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index e55242d255..9c503b8fe0 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -39,7 +39,7 @@ XML_REF3_FILES = crypto.xml XML_REF6_FILES = crypto_app.xml XML_PART_FILES = release_notes.xml usersguide.xml -XML_CHAPTER_FILES = notes.xml licenses.xml +XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml BOOK_FILES = book.xml diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index ce8bf2216a..cbf141b3b0 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -474,6 +474,28 @@
+ + info_fips() -> Status + Provides information about the FIPS operating status. + + Status = enabled | not_enabled | not_supported + + +

Provides information about the FIPS operating status of + crypto and the underlying OpenSSL library. If crypto was built + with FIPS support this can be either enabled (when + running in FIPS mode) or not_enabled. For other builds + this value is always not_supported.

+ +

In FIPS mode all non-FIPS compliant algorithms are + disabled and throw exception not_supported. Check + supports that in + FIPS mode returns the restricted list of available + algorithms.

+
+
+
+ info_lib() -> [{Name,VerNum,VerStr}] Provides information about the libraries used by crypto. diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml index 2b9e505988..a958bdfcb7 100644 --- a/lib/crypto/doc/src/crypto_app.xml +++ b/lib/crypto/doc/src/crypto_app.xml @@ -41,13 +41,33 @@
DEPENDENCIES -

The current crypto implementation uses nifs to interface OpenSSLs crypto library - and requires OpenSSL package version 0.9.8 or higher.

+

The current crypto implementation uses nifs to interface + OpenSSLs crypto library and requires OpenSSL package + version 0.9.8 or higher. FIPS mode support requires at least + version 1.0.1 and a FIPS capable OpenSSL installation.

+

Source releases of OpenSSL can be downloaded from the OpenSSL project home page, or mirror sites listed there.

+
+ CONFIGURATION +

The following configuration parameters are defined for the + crypto application. See app(3) for more information about + configuration parameters.

+ + fips_mode = boolean() + +

Specifies whether to run crypto in FIPS mode. This setting + will take effect when the nif module is loaded. If FIPS mode + is requested but not available at run time the nif module and + thus the crypto module will fail to load. This mechanism + prevents the accidental use of non-validated algorithms.

+
+
+
+
SEE ALSO

application(3)

diff --git a/lib/crypto/doc/src/fips.xml b/lib/crypto/doc/src/fips.xml new file mode 100644 index 0000000000..243f0da031 --- /dev/null +++ b/lib/crypto/doc/src/fips.xml @@ -0,0 +1,211 @@ + + + + +
+ + 2014 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + FIPS mode + Dániel Szoboszlay + + 2014-05-12 + A + fips.xml +
+

+ + This chapter describes FIPS mode support in the crypto application. +

+ +
+ Background +

OpenSSL can be built to provide FIPS 140-2 validated + cryptographic services. It is not the OpenSSL application that is + validated, but a special software component called the OpenSSL + FIPS Object Module. However applications do not use this Object + Module directly, but through the regular API of the OpenSSL + library.

+

The crypto application supports using OpenSSL in FIPS mode. In + this scenario only the validated algorithms provided by the Object + Module are accessible, other algorithms usually available in + OpenSSL (like md5) or implemented in the Erlang code (like SRP) + are disabled.

+
+ +
+ Enabling FIPS mode + + +

Build or install the FIPS Object Module and a FIPS enabled + OpenSSL library.

+

You should read and precisely follow the instructions of + the Security + Policy and User + Guide.

+

It is very easy to build a working OpenSSL FIPS + Object Module and library from the source. However it does + not qualify as FIPS 140-2 validated if the numerous + restrictions in the Security Policy are not properly + followed.

+
+ +

Configure and build Erlang/OTP with FIPS support:

+
+$ cd $ERL_TOP
+$ ./otp_build configure --enable-fips
+...
+checking for FIPS_mode_set... yes
+...
+$ make
+        
+

If FIPS_mode_set returns no the OpenSSL + library is not FIPS enabled and crypto won't support FIPS mode + either.

+
+ +

Set the fips_mode configuration setting of the + crypto application to true before loading the + crypto module.

+

The best place is in the sys.config system + configuration file of the release.

+
+ + Start and use the crypto application as usual. However take + care to avoid the non-FIPS validated algorithms, they will all + throw exception not_supported. + +
+

Entering and leaving FIPS mode on a node already running crypto + is not supported. The reason is that OpenSSL is designed to + prevent an application requesting FIPS mode to end up accidentally + running in non-FIPS mode. If entering FIPS mode fails (e.g. the + Object Module is not found or is compromised) any subsequent use + of the OpenSSL API would terminate the emulator.

+

An on-the-fly FIPS mode change would thus have to be performed + in a critical section protected from any concurrently running + crypto operations. Furthermore in case of failure all crypto calls + would have to be disabled from the Erlang or nif code. This would + be too much effort put into this not too important feature.

+
+ +
+ Incompatibilities with regular builds +

The Erlang API of the crypto application is identical + regardless of building with or without FIPS support. However the + nif code internally uses a different OpenSSL API.

+

This means that the context (an opaque type) returned from + streaming crypto functions (hash_(init|update|final), + hmac_(init|update|final) and + stream_(init|encrypt|decrypt)) is different and + incompatible with regular builds when compiling crypto with FIPS + support.

+
+ +
+ Common caveats +

In FIPS mode non-validated algorithms are disabled. This may + cause some unexpected problems in application relying on + crypto.

+

Do not try to work around these problems by using + alternative implementations of the missing algorithms! An + application can only claim to be using a FIPS 140-2 validated + cryptographic module if it uses it exclusively for every + cryptographic operation.

+ +
+ Restrictions on key sizes +

Although public key algorithms are supported in FIPS mode + they can only be used with secure key sizes. The Security Policy + requires the following minimum values: +

+ + RSA1024 bit + DSS1024 bit + EC algorithms160 bit + +
+ +
+ Restrictions on elliptic curves +

The Erlang API allows using arbitrary curve parameters, but + in FIPS mode only those allowed by the Security Policy shall be + used.

+
+ +
+ Avoid md5 for hashing +

Md5 is a popular choice as a hash function, but it is not + secure enough to be validated. Try to use sha instead wherever + possible.

+

For exceptional, non-cryptographic use cases one may consider + switching to erlang:md5/1 as well.

+
+ +
+ Certificates and encrypted keys +

As md5 is not available in FIPS mode it is only possible to + use certificates that were signed using sha hashing. When + validating an entire certificate chain all certificates + (including the root CA's) must comply with this rule.

+

For similar dependency on the md5 and des algorithms most + encrypted private keys in PEM format do not work + either. However, the PBES2 encryption scheme allows the use of + stronger FIPS verified algorithms which is a viable + alternative.

+
+ +
+ SNMP v3 limitations +

It is only possible to use usmHMACSHAAuthProtocol and + usmAesCfb128Protocol for authentication and privacy + respectively in FIPS mode. The snmp application however won't + restrict selecting disabled protocols in any way, and using them + would result in run time crashes.

+
+ +
+ TLS 1.2 is required +

All SSL and TLS versions prior to TLS 1.2 use a combination + of md5 and sha1 hashes in the handshake for various purposes:

+ + Authenticating the integrity of the handshake + messages. + In the exchange of DH parameters in cipher suites + providing non-anonymous PFS (perfect forward secrecy). + In the PRF (pseud-random function) to generate keying + materials in cipher suites not using PFS. + +

OpenSSL handles these corner cases in FIPS mode, however the + Erlang crypto and ssl applications are not prepared for them and + therefore you are limited to TLS 1.2 in FIPS mode.

+

On the other hand it worth mentioning that at least all + cipher suites that would rely on non-validated algorithms are + automatically disabled in FIPS mode.

+

Certificates using weak (md5) digests may also cause + problems in TLS. Although TLS 1.2 has an extension for + specifying which type of signatures are accepted, and in FIPS + mode the ssl application will use it properly, most TLS + implementations ignore this extension and simply send whatever + certificates they were configured with.

+
+ +
+
diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml index fb088a8285..7971aefff4 100644 --- a/lib/crypto/doc/src/usersguide.xml +++ b/lib/crypto/doc/src/usersguide.xml @@ -47,5 +47,6 @@

+ -- cgit v1.2.3 From e42f4b6fb934dc064699174da07027966698c79b Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 28 Sep 2016 15:48:07 +0100 Subject: Rename SSL_DEFINE to SSL_FLAGS For consistency with other applications. --- lib/crypto/c_src/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in index 1d1abca08e..af7c209c75 100644 --- a/lib/crypto/c_src/Makefile.in +++ b/lib/crypto/c_src/Makefile.in @@ -43,11 +43,11 @@ SSL_LIBDIR = @SSL_LIBDIR@ SSL_INCLUDE = @SSL_INCLUDE@ SSL_CRYPTO_LIBNAME = @SSL_CRYPTO_LIBNAME@ SSL_SSL_LIBNAME = @SSL_SSL_LIBNAME@ -SSL_DEFINE = @SSL_DEFINE@ +SSL_FLAGS = @SSL_FLAGS@ INCLUDES = $(SSL_INCLUDE) $(DED_INCLUDES) -CFLAGS += $(SSL_DEFINE) +CFLAGS += $(SSL_FLAGS) ifeq ($(TYPE),debug) TYPEMARKER = .debug -- cgit v1.2.3 From 0411d5492319a5bc555247a3f783aaa421b4f31c Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 29 Sep 2016 10:29:21 +0100 Subject: Fix warning tag in fips.xml That should be , not . --- lib/crypto/doc/src/fips.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/fips.xml b/lib/crypto/doc/src/fips.xml index 243f0da031..a6ed95bf5e 100644 --- a/lib/crypto/doc/src/fips.xml +++ b/lib/crypto/doc/src/fips.xml @@ -124,11 +124,11 @@ $ make

In FIPS mode non-validated algorithms are disabled. This may cause some unexpected problems in application relying on crypto.

-

Do not try to work around these problems by using +

Do not try to work around these problems by using alternative implementations of the missing algorithms! An application can only claim to be using a FIPS 140-2 validated cryptographic module if it uses it exclusively for every - cryptographic operation.

+ cryptographic operation.

Restrictions on key sizes -- cgit v1.2.3 From cf102c1b1225450e7918a6119b7d949eb7e575c4 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 5 Oct 2016 15:43:52 +0200 Subject: crypto: Return source line number from failed load/upgrade Renamed the init function as the return semantics are changed. --- lib/crypto/c_src/crypto.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0e4e85cef7..c100fc8ee2 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -588,7 +588,7 @@ static void error_handler(void* null, const char* errstr) } #endif /* HAVE_DYNAMIC_CRYPTO_LIB */ -static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) +static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) { #ifdef OPENSSL_THREADS ErlNifSysInfo sys_info; @@ -603,7 +603,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) char lib_buf[1000]; if (!verify_lib_version()) - return 0; + return __LINE__; /* load_info: {301, <<"/full/path/of/this/library">>} */ if (!enif_get_tuple(env, load_info, &tpl_arity, &tpl_array) @@ -613,7 +613,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) || !enif_inspect_binary(env, tpl_array[1], &lib_bin)) { PRINTF_ERR1("CRYPTO: Invalid load_info '%T'", load_info); - return 0; + return __LINE__; } hmac_context_rtype = enif_open_resource_type(env, NULL, "hmac_context", @@ -622,7 +622,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) NULL); if (!hmac_context_rtype) { PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'"); - return 0; + return __LINE__; } #if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) evp_md_ctx_rtype = enif_open_resource_type(env, NULL, "EVP_MD_CTX", @@ -631,7 +631,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) NULL); if (!evp_md_ctx_rtype) { PRINTF_ERR0("CRYPTO: Could not open resource type 'EVP_MD_CTX'"); - return 0; + return __LINE__; } #endif #ifdef HAVE_EVP_AES_CTR @@ -641,14 +641,14 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) NULL); if (!evp_cipher_ctx_rtype) { PRINTF_ERR0("CRYPTO: Could not open resource type 'EVP_CIPHER_CTX'"); - return 0; + return __LINE__; } #endif if (library_refc > 0) { /* Repeated loading of this library (module upgrade). * Atoms and callbacks are already set, we are done. */ - return 1; + return 0; } atom_true = enif_make_atom(env,"true"); @@ -694,14 +694,14 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) { void* handle; if (!change_basename(&lib_bin, lib_buf, sizeof(lib_buf), crypto_callback_name)) { - return 0; + return __LINE__; } if (!(handle = enif_dlopen(lib_buf, &error_handler, NULL))) { - return 0; + return __LINE__; } if (!(funcp = (get_crypto_callbacks_t*) enif_dlsym(handle, "get_crypto_callbacks", &error_handler, NULL))) { - return 0; + return __LINE__; } } #else /* !HAVE_DYNAMIC_CRYPTO_LIB */ @@ -720,7 +720,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) if (!ccb || ccb->sizeof_me != sizeof(*ccb)) { PRINTF_ERR0("Invalid 'crypto_callbacks'"); - return 0; + return __LINE__; } CRYPTO_set_mem_functions(ccb->crypto_alloc, ccb->crypto_realloc, ccb->crypto_free); @@ -734,13 +734,14 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info) CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function); } #endif /* OPENSSL_THREADS */ - return 1; + return 0; } static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) { - if (!init(env, load_info)) { - return -1; + int errline = initialize(env, load_info); + if (errline) { + return errline; } *priv_data = NULL; @@ -751,14 +752,16 @@ static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info) { + int errline; if (*old_priv_data != NULL) { - return -1; /* Don't know how to do that */ + return __LINE__; /* Don't know how to do that */ } if (*priv_data != NULL) { - return -1; /* Don't know how to do that */ + return __LINE__; /* Don't know how to do that */ } - if (!init(env, load_info)) { - return -1; + errline = initialize(env, load_info); + if (errline) { + return errline; } library_refc++; return 0; -- cgit v1.2.3 From a30254355bc9798348471878009b6e063ad26fca Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Tue, 1 Nov 2016 08:04:16 +0100 Subject: [crypto] Remove depricated functions --- lib/crypto/c_src/crypto.c | 150 --- lib/crypto/src/crypto.erl | 625 +-------- lib/crypto/test/Makefile | 3 +- lib/crypto/test/blowfish_SUITE.erl | 25 +- lib/crypto/test/old_crypto_SUITE.erl | 2350 ---------------------------------- 5 files changed, 17 insertions(+), 3136 deletions(-) delete mode 100644 lib/crypto/test/old_crypto_SUITE.erl (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index c835f6dcf4..86b839eddb 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -241,18 +241,14 @@ static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rand_bytes_1(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM strong_rand_mpint_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -314,21 +310,15 @@ static ErlNifFunc nif_funcs[] = { {"block_crypt_nif", 5, block_crypt_nif}, {"block_crypt_nif", 4, block_crypt_nif}, {"aes_ige_crypt_nif", 4, aes_ige_crypt_nif}, - - {"aes_ctr_encrypt", 3, aes_ctr_encrypt}, - {"aes_ctr_decrypt", 3, aes_ctr_encrypt}, {"aes_ctr_stream_init", 2, aes_ctr_stream_init}, {"aes_ctr_stream_encrypt", 2, aes_ctr_stream_encrypt}, {"aes_ctr_stream_decrypt", 2, aes_ctr_stream_encrypt}, - {"rand_bytes", 1, rand_bytes_1}, {"strong_rand_bytes_nif", 1, strong_rand_bytes_nif}, - {"strong_rand_mpint_nif", 3, strong_rand_mpint_nif}, {"rand_uniform_nif", 2, rand_uniform_nif}, {"mod_exp_nif", 4, mod_exp_nif}, {"dss_verify_nif", 4, dss_verify_nif}, {"rsa_verify_nif", 4, rsa_verify_nif}, {"do_exor", 2, do_exor}, - {"rc4_encrypt", 2, rc4_encrypt}, {"rc4_set_key", 1, rc4_set_key}, {"rc4_encrypt_with_state", 2, rc4_encrypt_with_state}, {"rsa_sign_nif", 3, rsa_sign_nif}, @@ -355,8 +345,6 @@ static ErlNifFunc nif_funcs[] = { {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt} - - }; ERL_NIF_INIT(crypto,nif_funcs,load,NULL,upgrade,unload) @@ -1673,64 +1661,6 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE #endif } -/* Common for both encrypt and decrypt -*/ -static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key, IVec, Data) */ - ErlNifBinary key, ivec, text; -#ifdef HAVE_EVP_AES_CTR - const EVP_CIPHER *cipher; - EVP_CIPHER_CTX ctx; - unsigned char *out; - int outl = 0; -#else - AES_KEY aes_key; - unsigned char ivec_clone[16]; /* writable copy */ - unsigned char ecount_buf[AES_BLOCK_SIZE]; - unsigned int num = 0; -#endif - ERL_NIF_TERM ret; - - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) -#ifndef HAVE_EVP_AES_CTR - || AES_set_encrypt_key(key.data, key.size*8, &aes_key) != 0 -#endif - || !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16 - || !enif_inspect_iolist_as_binary(env, argv[2], &text)) { - return enif_make_badarg(env); - } -#ifdef HAVE_EVP_AES_CTR - switch (key.size) - { - case 16: cipher = EVP_aes_128_ctr(); break; - case 24: cipher = EVP_aes_192_ctr(); break; - case 32: cipher = EVP_aes_256_ctr(); break; - default: return enif_make_badarg(env); - } - - out = enif_make_new_binary(env,text.size,&ret); - EVP_CIPHER_CTX_init(&ctx); - EVP_CipherInit_ex(&ctx, cipher, NULL, - key.data, ivec.data, (argv[3] == atom_true)); - EVP_CIPHER_CTX_set_padding(&ctx, 0); - EVP_CipherUpdate(&ctx, out, &outl, text.data, text.size); - ASSERT(outl == text.size); - EVP_CipherFinal_ex(&ctx, out + outl, &outl); - ASSERT(outl == 0); - EVP_CIPHER_CTX_cleanup(&ctx); -#else - memcpy(ivec_clone, ivec.data, 16); - memset(ecount_buf, 0, sizeof(ecount_buf)); - AES_ctr128_encrypt((unsigned char *) text.data, - enif_make_new_binary(env, text.size, &ret), - text.size, &aes_key, ivec_clone, ecount_buf, &num); -#endif - CONSUME_REDS(env,text); - - /* To do an incremental {en|de}cryption, the state to to keep between calls - must include ivec_clone, ecount_buf and num. */ - return ret; -} /* Initializes state for ctr streaming (de)encryption */ @@ -2151,20 +2081,6 @@ static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ER #endif } -static ERL_NIF_TERM rand_bytes_1(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Bytes) */ - unsigned bytes; - unsigned char* data; - ERL_NIF_TERM ret; - - if (!enif_get_uint(env, argv[0], &bytes)) { - return enif_make_badarg(env); - } - data = enif_make_new_binary(env, bytes, &ret); - RAND_pseudo_bytes(data, bytes); - ERL_VALGRIND_MAKE_MEM_DEFINED(data, bytes); - return ret; -} static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Bytes) */ unsigned bytes; @@ -2183,49 +2099,6 @@ static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NI } -static ERL_NIF_TERM strong_rand_mpint_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Bytes, TopMask, BottomMask) */ - unsigned bits; - BIGNUM *bn_rand; - int top, bottom; - unsigned char* data; - unsigned dlen; - ERL_NIF_TERM ret; - - if (!enif_get_uint(env, argv[0], &bits) - || !enif_get_int(env, argv[1], &top) - || !enif_get_int(env, argv[2], &bottom)) { - return enif_make_badarg(env); - } - if (! (top == -1 || top == 0 || top == 1) ) { - return enif_make_badarg(env); - } - if (! (bottom == 0 || bottom == 1) ) { - return enif_make_badarg(env); - } - - bn_rand = BN_new(); - if (! bn_rand ) { - return enif_make_badarg(env); - } - - /* Get a (bits) bit random number */ - if (!BN_rand(bn_rand, bits, top, bottom)) { - ret = atom_false; - } - else { - /* Copy the bignum into an erlang mpint binary. */ - dlen = BN_num_bytes(bn_rand); - data = enif_make_new_binary(env, dlen+4, &ret); - put_int32(data, dlen); - BN_bn2bin(bn_rand, data+4); - ERL_VALGRIND_MAKE_MEM_DEFINED(data+4, dlen); - } - BN_free(bn_rand); - - return ret; -} - static int get_bn_from_mpint(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp) { ErlNifBinary bin; @@ -2492,29 +2365,6 @@ static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) return ret; } -static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key, Data) */ -#ifndef OPENSSL_NO_RC4 - ErlNifBinary key, data; - RC4_KEY rc4_key; - ERL_NIF_TERM ret; - - CHECK_NO_FIPS_MODE(); - - if (!enif_inspect_iolist_as_binary(env,argv[0], &key) - || !enif_inspect_iolist_as_binary(env,argv[1], &data)) { - return enif_make_badarg(env); - } - RC4_set_key(&rc4_key, key.size, key.data); - RC4(&rc4_key, data.size, data.data, - enif_make_new_binary(env, data.size, &ret)); - CONSUME_REDS(env,data); - return ret; -#else - return enif_raise_exception(env, atom_notsup); -#endif -} - static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key) */ #ifndef OPENSSL_NO_RC4 diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 43f9a0f9e7..0b62964efa 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -40,146 +40,10 @@ -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). -%% DEPRECATED --export([rand_bytes/1]). --deprecated({rand_bytes, 1, next_major_release}). - -%% Replaced by hash_* --export([md4/1, md4_init/0, md4_update/2, md4_final/1]). --export([md5/1, md5_init/0, md5_update/2, md5_final/1]). --export([sha/1, sha_init/0, sha_update/2, sha_final/1]). --deprecated({md4, 1, next_major_release}). --deprecated({md5, 1, next_major_release}). --deprecated({sha, 1, next_major_release}). --deprecated({md4_init, 0, next_major_release}). --deprecated({md5_init, 0, next_major_release}). --deprecated({sha_init, 0, next_major_release}). --deprecated({md4_update, 2, next_major_release}). --deprecated({md5_update, 2, next_major_release}). --deprecated({sha_update, 2, next_major_release}). --deprecated({md4_final, 1, next_major_release}). --deprecated({md5_final, 1, next_major_release}). --deprecated({sha_final, 1, next_major_release}). - -%% Replaced by hmac_* --export([md5_mac/2, md5_mac_96/2, sha_mac/2, sha_mac/3, sha_mac_96/2]). --deprecated({md5_mac, 2, next_major_release}). --deprecated({md5_mac_96, 2, next_major_release}). --deprecated({sha_mac, 2, next_major_release}). --deprecated({sha_mac, 3, next_major_release}). --deprecated({sha_mac_96, 2, next_major_release}). - -%% Replaced by sign/verify --export([dss_verify/3, dss_verify/4, rsa_verify/3, rsa_verify/4]). --export([dss_sign/2, dss_sign/3, rsa_sign/2, rsa_sign/3]). --deprecated({dss_verify, 3, next_major_release}). --deprecated({dss_verify, 4, next_major_release}). --deprecated({rsa_verify, 3, next_major_release}). --deprecated({rsa_verify, 4, next_major_release}). --deprecated({dss_sign, 2, next_major_release}). --deprecated({dss_sign, 3, next_major_release}). --deprecated({rsa_sign, 2, next_major_release}). --deprecated({rsa_sign, 3, next_major_release}). - -%% Replaced by generate_key --export([dh_generate_key/1, dh_generate_key/2, dh_compute_key/3]). --deprecated({dh_generate_key, 1, next_major_release}). --deprecated({dh_generate_key, 2, next_major_release}). --deprecated({dh_compute_key, 3, next_major_release}). - -%% Replaced by mod_exp_prim and no longer needed --export([mod_exp/3, mpint/1, erlint/1, strong_rand_mpint/3]). --deprecated({mod_exp, 3, next_major_release}). --deprecated({mpint, 1, next_major_release}). --deprecated({erlint, 1, next_major_release}). --deprecated({strong_rand_mpint, 3, next_major_release}). - -%% Replaced by block_* --export([des_cbc_encrypt/3, des_cbc_decrypt/3, des_cbc_ivec/1]). --export([des3_cbc_encrypt/5, des3_cbc_decrypt/5]). --export([des_ecb_encrypt/2, des_ecb_decrypt/2]). --export([des_ede3_cbc_encrypt/5, des_ede3_cbc_decrypt/5]). --export([des_cfb_encrypt/3, des_cfb_decrypt/3, des_cfb_ivec/2]). --export([des3_cfb_encrypt/5, des3_cfb_decrypt/5]). --deprecated({des_cbc_encrypt, 3, next_major_release}). --deprecated({des_cbc_decrypt, 3, next_major_release}). --deprecated({des_cbc_ivec, 1, next_major_release}). --deprecated({des3_cbc_encrypt, 5, next_major_release}). --deprecated({des3_cbc_decrypt, 5, next_major_release}). --deprecated({des_ecb_encrypt, 2, next_major_release}). --deprecated({des_ecb_decrypt, 2, next_major_release}). --deprecated({des_ede3_cbc_encrypt, 5, next_major_release}). --deprecated({des_ede3_cbc_decrypt, 5, next_major_release}). --deprecated({des_cfb_encrypt, 3, next_major_release}). --deprecated({des_cfb_decrypt, 3, next_major_release}). --deprecated({des_cfb_ivec, 2, next_major_release}). --deprecated({des3_cfb_encrypt, 5, next_major_release}). --deprecated({des3_cfb_decrypt, 5, next_major_release}). --export([blowfish_ecb_encrypt/2, blowfish_ecb_decrypt/2]). --export([blowfish_cbc_encrypt/3, blowfish_cbc_decrypt/3]). --export([blowfish_cfb64_encrypt/3, blowfish_cfb64_decrypt/3]). --export([blowfish_ofb64_encrypt/3]). --deprecated({blowfish_ecb_encrypt, 2, next_major_release}). --deprecated({blowfish_ecb_decrypt, 2, next_major_release}). --deprecated({blowfish_cbc_encrypt, 3, next_major_release}). --deprecated({blowfish_cbc_decrypt, 3, next_major_release}). --deprecated({blowfish_cfb64_encrypt, 3, next_major_release}). --deprecated({blowfish_cfb64_decrypt, 3, next_major_release}). --deprecated({blowfish_ofb64_encrypt, 3, next_major_release}). --export([aes_cfb_128_encrypt/3, aes_cfb_128_decrypt/3]). --export([aes_cbc_128_encrypt/3, aes_cbc_128_decrypt/3]). --export([aes_cbc_256_encrypt/3, aes_cbc_256_decrypt/3]). --export([aes_cbc_ivec/1]). --deprecated({aes_cfb_128_encrypt, 3, next_major_release}). --deprecated({aes_cfb_128_decrypt, 3, next_major_release}). --deprecated({aes_cbc_128_encrypt, 3, next_major_release}). --deprecated({aes_cbc_128_decrypt, 3, next_major_release}). --deprecated({aes_cbc_256_encrypt, 3, next_major_release}). --deprecated({aes_cbc_256_decrypt, 3, next_major_release}). --deprecated({aes_cbc_ivec, 1, next_major_release}). --export([rc2_cbc_encrypt/3, rc2_cbc_decrypt/3]). --export([rc2_40_cbc_encrypt/3, rc2_40_cbc_decrypt/3]). --deprecated({rc2_cbc_encrypt, 3, next_major_release}). --deprecated({rc2_cbc_decrypt, 3, next_major_release}). -%% allready replaced by above! --deprecated({rc2_40_cbc_encrypt, 3, next_major_release}). --deprecated({rc2_40_cbc_decrypt, 3, next_major_release}). - -%% Replaced by stream_* --export([aes_ctr_stream_init/2, aes_ctr_stream_encrypt/2, aes_ctr_stream_decrypt/2]). --export([rc4_set_key/1, rc4_encrypt_with_state/2]). --deprecated({aes_ctr_stream_init, 2, next_major_release}). --deprecated({aes_ctr_stream_encrypt, 2, next_major_release}). --deprecated({aes_ctr_stream_decrypt, 2, next_major_release}). --deprecated({rc4_set_key, 1, next_major_release}). --deprecated({rc4_encrypt_with_state, 2, next_major_release}). - -%% Not needed special case of stream_* --export([aes_ctr_encrypt/3, aes_ctr_decrypt/3, rc4_encrypt/2]). --deprecated({aes_ctr_encrypt, 3, next_major_release}). --deprecated({aes_ctr_decrypt, 3, next_major_release}). --deprecated({rc4_encrypt, 2, next_major_release}). - -%% Replace by public/private_encrypt/decrypt --export([rsa_public_encrypt/3, rsa_private_decrypt/3]). --export([rsa_private_encrypt/3, rsa_public_decrypt/3]). --deprecated({rsa_public_encrypt, 3, next_major_release}). --deprecated({rsa_private_decrypt, 3, next_major_release}). --deprecated({rsa_public_decrypt, 3, next_major_release}). --deprecated({rsa_private_encrypt, 3, next_major_release}). - -%% Replaced by crypto:module_info() --export([info/0]). --deprecated({info, 0, next_major_release}). - %% This should correspond to the similar macro in crypto.c -define(MAX_BYTES_TO_NIF, 20000). %% Current value is: erlang:system_info(context_reductions) * 10 --type mpint() :: binary(). --type rsa_digest_type() :: 'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512'. --type dss_digest_type() :: 'none' | 'sha'. %%-type ecdsa_digest_type() :: 'md5' | 'sha' | 'sha256' | 'sha384' | 'sha512'. --type data_or_digest() :: binary() | {digest, binary()}. -type crypto_integer() :: binary() | integer(). %%-type ec_named_curve() :: atom(). %%-type ec_point() :: crypto_integer(). @@ -420,13 +284,10 @@ stream_decrypt(State, Data0) -> %% %% RAND - pseudo random numbers using RN_ functions in crypto lib %% --spec rand_bytes(non_neg_integer()) -> binary(). -spec strong_rand_bytes(non_neg_integer()) -> binary(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). -rand_bytes(_Bytes) -> ?nif_stub. - strong_rand_bytes(Bytes) -> case strong_rand_bytes_nif(Bytes) of false -> erlang:error(low_entropy); @@ -694,7 +555,7 @@ path2bin(Path) when is_list(Path) -> end. %%-------------------------------------------------------------------- -%%% Internal functions (some internal API functions are part of the deprecated API) +%%% Internal functions %%-------------------------------------------------------------------- max_bytes() -> ?MAX_BYTES_TO_NIF. @@ -724,59 +585,6 @@ hash_init_nif(_Hash) -> ?nif_stub. hash_update_nif(_State, _Data) -> ?nif_stub. hash_final_nif(_State) -> ?nif_stub. - -%% -%% MD5 -%% - --spec md5(iodata()) -> binary(). --spec md5_init() -> binary(). --spec md5_update(binary(), iodata()) -> binary(). --spec md5_final(binary()) -> binary(). - -md5(Data) -> - hash(md5, Data). -md5_init() -> - hash_init(md5). -md5_update(Context, Data) -> - hash_update(Context, Data). -md5_final(Context) -> - hash_final(Context). - -%% -%% MD4 -%% --spec md4(iodata()) -> binary(). --spec md4_init() -> binary(). --spec md4_update(binary(), iodata()) -> binary(). --spec md4_final(binary()) -> binary(). - -md4(Data) -> - hash(md4, Data). -md4_init() -> - hash_init(md4). -md4_update(Context, Data) -> - hash_update(Context, Data). -md4_final(Context) -> - hash_final(Context). - -%% -%% SHA -%% --spec sha(iodata()) -> binary(). --spec sha_init() -> binary(). --spec sha_update(binary(), iodata()) -> binary(). --spec sha_final(binary()) -> binary(). - -sha(Data) -> - hash(sha, Data). -sha_init() -> - hash_init(sha). -sha_update(Context, Data) -> - hash_update(Context, Data). -sha_final(Context) -> - hash_final(Context). - %% HMAC -------------------------------------------------------------------- hmac(Type, Key, Data, MacSize, Size, MaxBytes) when Size =< MaxBytes -> @@ -811,28 +619,6 @@ hmac_final_nif(_Context, _MacSize) -> ?nif_stub. cmac_nif(_Type, _Key, _Data) -> ?nif_stub. -%% -%% MD5_MAC -%% --spec md5_mac(iodata(), iodata()) -> binary(). --spec md5_mac_96(iodata(), iodata()) -> binary(). - -md5_mac(Key, Data) -> hmac(md5, Key, Data). - -md5_mac_96(Key, Data) -> hmac(md5, Key, Data, 12). - -%% -%% SHA_MAC -%% --spec sha_mac(iodata(), iodata()) -> binary(). --spec sha_mac_96(iodata(), iodata()) -> binary(). - -sha_mac(Key, Data) -> hmac(sha, Key, Data). - -sha_mac(Key, Data, Size) -> hmac(sha, Key, Data, Size). - -sha_mac_96(Key, Data) -> hmac(sha, Key, Data, 12). - %% CIPHERS -------------------------------------------------------------------- block_crypt_nif(_Type, _Key, _Ivec, _Text, _IsEncrypt) -> ?nif_stub. @@ -848,94 +634,6 @@ check_des3_key(Key) -> error(badarg) end. -%% -%% DES - in electronic codebook mode (ECB) -%% --spec des_ecb_encrypt(iodata(), iodata()) -> binary(). --spec des_ecb_decrypt(iodata(), iodata()) -> binary(). - -des_ecb_encrypt(Key, Data) -> - block_encrypt(des_ecb, Key, Data). -des_ecb_decrypt(Key, Data) -> - block_decrypt(des_ecb, Key, Data). - -%% -%% DES3 - in cipher block chaining mode (CBC) -%% --spec des3_cbc_encrypt(iodata(), iodata(), iodata(), binary(), iodata()) -> - binary(). --spec des3_cbc_decrypt(iodata(), iodata(), iodata(), binary(), iodata()) -> - binary(). - -des3_cbc_encrypt(Key1, Key2, Key3, IVec, Data) -> - block_encrypt(des3_cbc, [Key1, Key2, Key3], IVec, Data). -des_ede3_cbc_encrypt(Key1, Key2, Key3, IVec, Data) -> - block_encrypt(des_ede3, [Key1, Key2, Key3], IVec, Data). - -des3_cbc_decrypt(Key1, Key2, Key3, IVec, Data) -> - block_decrypt(des3_cbc, [Key1, Key2, Key3], IVec, Data). -des_ede3_cbc_decrypt(Key1, Key2, Key3, IVec, Data) -> - block_decrypt(des_ede3, [Key1, Key2, Key3], IVec, Data). - -%% -%% DES3 - in 8-bits cipher feedback mode (CFB) -%% --spec des3_cfb_encrypt(iodata(), iodata(), iodata(), binary(), iodata()) -> - binary(). --spec des3_cfb_decrypt(iodata(), iodata(), iodata(), binary(), iodata()) -> - binary(). - -des3_cfb_encrypt(Key1, Key2, Key3, IVec, Data) -> - block_encrypt(des3_cfb, [Key1, Key2, Key3], IVec, Data). - -des3_cfb_decrypt(Key1, Key2, Key3, IVec, Data) -> - block_decrypt(des3_cfb, [Key1, Key2, Key3], IVec, Data). - -%% -%% Blowfish -%% --spec blowfish_ecb_encrypt(iodata(), iodata()) -> binary(). --spec blowfish_ecb_decrypt(iodata(), iodata()) -> binary(). --spec blowfish_cbc_encrypt(iodata(), binary(), iodata()) -> binary(). --spec blowfish_cbc_decrypt(iodata(), binary(), iodata()) -> binary(). --spec blowfish_cfb64_encrypt(iodata(), binary(), iodata()) -> binary(). --spec blowfish_cfb64_decrypt(iodata(), binary(), iodata()) -> binary(). --spec blowfish_ofb64_encrypt(iodata(), binary(), iodata()) -> binary(). - -blowfish_ecb_encrypt(Key, Data) -> - block_encrypt(blowfish_ecb, Key, Data). - -blowfish_ecb_decrypt(Key, Data) -> - block_decrypt(blowfish_ecb, Key, Data). - -blowfish_cbc_encrypt(Key, IVec, Data) -> - block_encrypt(blowfish_cbc, Key, IVec, Data). - -blowfish_cbc_decrypt(Key, IVec, Data) -> - block_decrypt(blowfish_cbc, Key, IVec, Data). - -blowfish_cfb64_encrypt(Key, IVec, Data) -> - block_encrypt(blowfish_cfb64, Key, IVec, Data). - -blowfish_cfb64_decrypt(Key, IVec, Data) -> - block_decrypt(blowfish_cfb64, Key, IVec, Data). - -blowfish_ofb64_encrypt(Key, IVec, Data) -> - block_encrypt(blowfish_ofb64, Key, IVec, Data). - - -%% -%% AES in cipher feedback mode (CFB) - 128 bit shift -%% --spec aes_cfb_128_encrypt(iodata(), binary(), iodata()) -> binary(). --spec aes_cfb_128_decrypt(iodata(), binary(), iodata()) -> binary(). - -aes_cfb_128_encrypt(Key, IVec, Data) -> - block_encrypt(aes_cfb128, Key, IVec, Data). - -aes_cfb_128_decrypt(Key, IVec, Data) -> - block_decrypt(aes_cfb128, Key, IVec, Data). - %% %% AES - in Galois/Counter Mode (GCM) %% @@ -951,88 +649,6 @@ aes_gcm_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. chacha20_poly1305_encrypt(_Key, _Ivec, _AAD, _In) -> ?nif_stub. chacha20_poly1305_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. -%% -%% DES - in cipher block chaining mode (CBC) -%% --spec des_cbc_encrypt(iodata(), binary(), iodata()) -> binary(). --spec des_cbc_decrypt(iodata(), binary(), iodata()) -> binary(). - -des_cbc_encrypt(Key, IVec, Data) -> - block_encrypt(des_cbc, Key, IVec, Data). - -des_cbc_decrypt(Key, IVec, Data) -> - block_decrypt(des_cbc, Key, IVec, Data). - -%% -%% dec_cbc_ivec(Data) -> binary() -%% -%% Returns the IVec to be used in the next iteration of -%% des_cbc_[encrypt|decrypt]. -%% --spec des_cbc_ivec(iodata()) -> binary(). - -des_cbc_ivec(Data) -> - next_iv(des_cbc, Data). - -%% -%% DES - in 8-bits cipher feedback mode (CFB) -%% --spec des_cfb_encrypt(iodata(), binary(), iodata()) -> binary(). --spec des_cfb_decrypt(iodata(), binary(), iodata()) -> binary(). - -des_cfb_encrypt(Key, IVec, Data) -> - block_encrypt(des_cfb, Key, IVec, Data). - -des_cfb_decrypt(Key, IVec, Data) -> - block_decrypt(des_cfb, Key, IVec, Data). - -%% -%% dec_cfb_ivec(IVec, Data) -> binary() -%% -%% Returns the IVec to be used in the next iteration of -%% des_cfb_[encrypt|decrypt]. -%% - --spec des_cfb_ivec(iodata(), iodata()) -> binary(). - -des_cfb_ivec(IVec, Data) -> - next_iv(des_cfb, Data, IVec). - - -%% -%% AES - with 128 or 256 bit key in cipher block chaining mode (CBC) -%% --spec aes_cbc_128_encrypt(iodata(), binary(), iodata()) -> - binary(). --spec aes_cbc_128_decrypt(iodata(), binary(), iodata()) -> - binary(). --spec aes_cbc_256_encrypt(iodata(), binary(), iodata()) -> - binary(). --spec aes_cbc_256_decrypt(iodata(), binary(), iodata()) -> - binary(). - -aes_cbc_128_encrypt(Key, IVec, Data) -> - block_encrypt(aes_cbc128, Key, IVec, Data). - -aes_cbc_128_decrypt(Key, IVec, Data) -> - block_decrypt(aes_cbc128, Key, IVec, Data). - -aes_cbc_256_encrypt(Key, IVec, Data) -> - block_encrypt(aes_cbc256, Key, IVec, Data). - -aes_cbc_256_decrypt(Key, IVec, Data) -> - block_decrypt(aes_cbc256, Key, IVec, Data). - -%% -%% aes_cbc_ivec(Data) -> binary() -%% -%% Returns the IVec to be used in the next iteration of -%% aes_cbc_*_[encrypt|decrypt]. -%% IVec size: 16 bytes -%% -aes_cbc_ivec(Data) -> - next_iv(aes_cbc, Data). - %% %% AES - with 256 bit key in infinite garble extension mode (IGE) %% @@ -1066,17 +682,6 @@ do_stream_decrypt({rc4, State0}, Data) -> {State, Text} = rc4_encrypt_with_state(State0, Data), {{rc4, State}, Text}. -%% -%% AES - in counter mode (CTR) -%% --spec aes_ctr_encrypt(iodata(), binary(), iodata()) -> - binary(). --spec aes_ctr_decrypt(iodata(), binary(), iodata()) -> - binary(). - -aes_ctr_encrypt(_Key, _IVec, _Data) -> ?nif_stub. -aes_ctr_decrypt(_Key, _IVec, _Cipher) -> ?nif_stub. - %% %% AES - in counter mode (CTR) with state maintained for multi-call streaming @@ -1096,31 +701,9 @@ aes_ctr_stream_decrypt(_State, _Cipher) -> ?nif_stub. %% %% RC4 - symmetric stream cipher %% --spec rc4_encrypt(iodata(), iodata()) -> binary(). - -rc4_encrypt(_Key, _Data) -> ?nif_stub. rc4_set_key(_Key) -> ?nif_stub. rc4_encrypt_with_state(_State, _Data) -> ?nif_stub. - -%% RC2 block cipher - -rc2_cbc_encrypt(Key, IVec, Data) -> - notsup_to_error(block_encrypt(rc2_cbc, Key, IVec, Data)). - -rc2_cbc_decrypt(Key, IVec, Data) -> - notsup_to_error(block_decrypt(rc2_cbc, Key, IVec, Data)). - -%% -%% RC2 - 40 bits block cipher - Backwards compatibility not documented. -%% -rc2_40_cbc_encrypt(Key, IVec, Data) when erlang:byte_size(Key) == 5 -> - notsup_to_error(block_encrypt(rc2_cbc, Key, IVec, Data)). - -rc2_40_cbc_decrypt(Key, IVec, Data) when erlang:byte_size(Key) == 5 -> - notsup_to_error(block_decrypt(rc2_cbc, Key, IVec, Data)). - - %% Secure remote password ------------------------------------------------------------------- user_srp_gen_key(Private, Generator, Prime) -> @@ -1168,7 +751,7 @@ srp_scrambler(Version, UserPublic, HostPublic, Prime) when Version == '6'; Versi srp_scrambler('3', _, HostPublic, _Prime) -> %% The parameter u is a 32-bit unsigned integer which takes its value %% from the first 32 bits of the SHA1 hash of B, MSB first. - <> = sha(HostPublic), + <> = hash(sha, HostPublic), U. srp_pad_length(Width, Length) -> @@ -1223,26 +806,10 @@ dh_check([_Prime,_Gen]) -> ?nif_stub. %% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] %% PrivKey = mpint() --spec dh_generate_key([binary()]) -> {binary(),binary()}. --spec dh_generate_key(binary()|undefined, [binary()]) -> - {binary(),binary()}. - -dh_generate_key(DHParameters) -> - dh_generate_key_nif(undefined, map_mpint_to_bin(DHParameters), 4). -dh_generate_key(PrivateKey, DHParameters) -> - dh_generate_key_nif(mpint_to_bin(PrivateKey), map_mpint_to_bin(DHParameters), 4). - dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint) -> ?nif_stub. %% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] %% MyPrivKey, OthersPublicKey = mpint() --spec dh_compute_key(binary(), binary(), [binary()]) -> binary(). - -dh_compute_key(OthersPublicKey, MyPrivateKey, DHParameters) -> - compute_key(dh, mpint_to_bin(OthersPublicKey), mpint_to_bin(MyPrivateKey), - map_mpint_to_bin(DHParameters)). - - dh_compute_key_nif(_OthersPublicKey, _MyPrivateKey, _DHParameters) -> ?nif_stub. ec_key_generate(_Curve, _Key) -> ?nif_stub. @@ -1322,137 +889,19 @@ ensure_int_as_bin(Int) when is_integer(Int) -> ensure_int_as_bin(Bin) -> Bin. -map_to_norm_bin([H|_]=List) when is_integer(H) -> - lists:map(fun(E) -> int_to_bin(E) end, List); -map_to_norm_bin(List) -> - lists:map(fun(E) -> mpint_to_bin(E) end, List). - -%%-------------------------------------------------------------------- -%%% Deprecated %%-------------------------------------------------------------------- %% -%% rsa_public_encrypt -%% rsa_private_decrypt -type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. --spec rsa_public_encrypt(binary(), [binary()], rsa_padding()) -> - binary(). --spec rsa_public_decrypt(binary(), [integer() | mpint()], rsa_padding()) -> - binary(). --spec rsa_private_encrypt(binary(), [integer() | mpint()], rsa_padding()) -> - binary(). --spec rsa_private_decrypt(binary(), [integer() | mpint()], rsa_padding()) -> - binary(). - -%% Binary, Key = [E,N] -rsa_public_encrypt(BinMesg, Key, Padding) -> - case rsa_public_crypt(BinMesg, map_to_norm_bin(Key), Padding, true) of - error -> - erlang:error(encrypt_failed, [BinMesg,Key, Padding]); - Sign -> Sign - end. - rsa_public_crypt(_BinMsg, _Key, _Padding, _IsEncrypt) -> ?nif_stub. -%% Binary, Key = [E,N,D] -rsa_private_decrypt(BinMesg, Key, Padding) -> - case rsa_private_crypt(BinMesg, map_to_norm_bin(Key), Padding, false) of - error -> - erlang:error(decrypt_failed, [BinMesg,Key, Padding]); - Sign -> Sign - end. - rsa_private_crypt(_BinMsg, _Key, _Padding, _IsEncrypt) -> ?nif_stub. - -%% Binary, Key = [E,N,D] -rsa_private_encrypt(BinMesg, Key, Padding) -> - case rsa_private_crypt(BinMesg, map_to_norm_bin(Key), Padding, true) of - error -> - erlang:error(encrypt_failed, [BinMesg,Key, Padding]); - Sign -> Sign - end. - -%% Binary, Key = [E,N] -rsa_public_decrypt(BinMesg, Key, Padding) -> - case rsa_public_crypt(BinMesg, map_to_norm_bin(Key), Padding, false) of - error -> - erlang:error(decrypt_failed, [BinMesg,Key, Padding]); - Sign -> Sign - end. - -map_mpint_to_bin(List) -> - lists:map(fun(E) -> mpint_to_bin(E) end, List ). - -%% -%% DSS, RSA - sign -%% -%% Key = [P,Q,G,X] P,Q,G=DSSParams X=PrivateKey --spec dss_sign(data_or_digest(), [binary()]) -> binary(). --spec dss_sign(dss_digest_type(), data_or_digest(), [binary()]) -> binary(). --spec rsa_sign(data_or_digest(), [binary()]) -> binary(). --spec rsa_sign(rsa_digest_type(), data_or_digest(), [binary()]) -> binary(). - -dss_sign(DataOrDigest,Key) -> - dss_sign(sha,DataOrDigest,Key). -dss_sign(Type, Data, Key) when is_binary(Data), Type=/=none -> - sign(dss, Type, mpint_to_bin(Data), map_mpint_to_bin(Key)); -dss_sign(Type, Digest, Key) -> - sign(dss, Type, Digest, map_mpint_to_bin(Key)). - - -%% Key = [E,N,D] E=PublicExponent N=PublicModulus D=PrivateExponent -rsa_sign(DataOrDigest,Key) -> - rsa_sign(sha, DataOrDigest, Key). - -rsa_sign(Type, Data, Key) when is_binary(Data) -> - sign(rsa, Type, mpint_to_bin(Data), map_mpint_to_bin(Key)); -rsa_sign(Type, Digest, Key) -> - sign(rsa, Type, Digest, map_mpint_to_bin(Key)). - -%% -%% DSS, RSA - verify -%% --spec dss_verify(data_or_digest(), binary(), [binary()]) -> boolean(). --spec dss_verify(dss_digest_type(), data_or_digest(), binary(), [binary()]) -> boolean(). --spec rsa_verify(data_or_digest(), binary(), [binary()]) -> boolean(). --spec rsa_verify(rsa_digest_type(), data_or_digest(), binary(), [binary()]) -> - boolean(). - -%% Key = [P,Q,G,Y] P,Q,G=DSSParams Y=PublicKey -dss_verify(Data,Signature,Key) -> - dss_verify(sha, Data, Signature, Key). - -dss_verify(Type,Data,Signature,Key) when is_binary(Data), Type=/=none -> - verify(dss,Type,mpint_to_bin(Data),mpint_to_bin(Signature),map_mpint_to_bin(Key)); -dss_verify(Type,Digest,Signature,Key) -> - verify(dss,Type,Digest,mpint_to_bin(Signature),map_mpint_to_bin(Key)). - -% Key = [E,N] E=PublicExponent N=PublicModulus -rsa_verify(Data,Signature,Key) -> - rsa_verify(sha, Data,Signature,Key). -rsa_verify(Type, Data, Signature, Key) when is_binary(Data) -> - verify(rsa, Type, mpint_to_bin(Data), mpint_to_bin(Signature), map_mpint_to_bin(Key)); -rsa_verify(Type, Digest, Signature, Key) -> - verify(rsa, Type, Digest, mpint_to_bin(Signature), map_mpint_to_bin(Key)). - --spec strong_rand_mpint(Bits::non_neg_integer(), - Top::-1..1, - Bottom::0..1) -> binary(). - -strong_rand_mpint(Bits, Top, Bottom) -> - case strong_rand_mpint_nif(Bits,Top,Bottom) of - false -> erlang:error(low_entropy); - Bin -> Bin - end. -strong_rand_mpint_nif(_Bits, _Top, _Bottom) -> ?nif_stub. - - %% large integer in a binary with 32bit length %% MP representaion (SSH2) mpint(X) when X < 0 -> mpint_neg(X); mpint(X) -> mpint_pos(X). - + -define(UINT32(X), X:32/unsigned-big-integer). @@ -1477,76 +926,8 @@ erlint(<>) -> <> = MPIntValue, Integer. -mpint_to_bin(<>) -> - Bin. - %% %% mod_exp - utility for rsa generation and SRP %% -mod_exp(Base, Exponent, Modulo) - when is_integer(Base), is_integer(Exponent), is_integer(Modulo) -> - bin_to_int(mod_exp_nif(int_to_bin(Base), int_to_bin(Exponent), int_to_bin(Modulo), 0)); - -mod_exp(Base, Exponent, Modulo) -> - mod_exp_nif(mpint_to_bin(Base),mpint_to_bin(Exponent),mpint_to_bin(Modulo), 4). - mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub. --define(FUNC_LIST, [hash, hash_init, hash_update, hash_final, - hmac, hmac_init, hmac_update, hmac_final, hmac_final_n, - cmac, - %% deprecated - md4, md4_init, md4_update, md4_final, - md5, md5_init, md5_update, md5_final, - sha, sha_init, sha_update, sha_final, - md5_mac, md5_mac_96, - sha_mac, sha_mac_96, - %% - block_encrypt, block_decrypt, - %% deprecated - des_cbc_encrypt, des_cbc_decrypt, - des_cfb_encrypt, des_cfb_decrypt, - des_ecb_encrypt, des_ecb_decrypt, - des3_cbc_encrypt, des3_cbc_decrypt, - des3_cfb_encrypt, des3_cfb_decrypt, - aes_cfb_128_encrypt, aes_cfb_128_decrypt, - rc2_cbc_encrypt, rc2_cbc_decrypt, - rc2_40_cbc_encrypt, rc2_40_cbc_decrypt, - aes_cbc_128_encrypt, aes_cbc_128_decrypt, - aes_cbc_256_encrypt, aes_cbc_256_decrypt, - blowfish_cbc_encrypt, blowfish_cbc_decrypt, - blowfish_cfb64_encrypt, blowfish_cfb64_decrypt, - blowfish_ecb_encrypt, blowfish_ecb_decrypt, blowfish_ofb64_encrypt, - %% - rand_bytes, - strong_rand_bytes, - rand_uniform, - rand_seed, - mod_pow, - exor, - %% deprecated - mod_exp,strong_rand_mpint,erlint, mpint, - %% - sign, verify, generate_key, compute_key, - %% deprecated - dss_verify,dss_sign, - rsa_verify,rsa_sign, - rsa_public_encrypt,rsa_private_decrypt, - rsa_private_encrypt,rsa_public_decrypt, - dh_generate_key, dh_compute_key, - %% - stream_init, stream_encrypt, stream_decrypt, - %% deprecated - rc4_encrypt, rc4_set_key, rc4_encrypt_with_state, - aes_ctr_encrypt, aes_ctr_decrypt, - aes_ctr_stream_init, aes_ctr_stream_encrypt, aes_ctr_stream_decrypt, - %% - next_iv, - %% deprecated - aes_cbc_ivec, - des_cbc_ivec, des_cfb_ivec, - info, - %% - info_lib, info_fips, supports]). -info() -> - ?FUNC_LIST. diff --git a/lib/crypto/test/Makefile b/lib/crypto/test/Makefile index 928a1b1d73..5a81c84558 100644 --- a/lib/crypto/test/Makefile +++ b/lib/crypto/test/Makefile @@ -7,8 +7,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk MODULES = \ blowfish_SUITE \ - crypto_SUITE \ - old_crypto_SUITE + crypto_SUITE ERL_FILES= $(MODULES:%=%.erl) diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index a78f8fe39a..c2d0d2621b 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -151,7 +151,7 @@ end_per_group(_GroupName, Config) -> ecb_test(KeyBytes, ClearBytes, CipherBytes) -> {Key, Clear, Cipher} = {to_bin(KeyBytes), to_bin(ClearBytes), to_bin(CipherBytes)}, - ?line m(crypto:blowfish_ecb_encrypt(Key, Clear), Cipher), + ?line m(crypto:block_encrypt(blowfish_ecb, Key, Clear), Cipher), true. ecb(doc) -> @@ -200,7 +200,7 @@ cbc(doc) -> cbc(suite) -> []; cbc(Config) when is_list(Config) -> - true = crypto:blowfish_cbc_encrypt(?KEY, ?IVEC, ?DATA_PADDED) =:= + true = crypto:block_encrypt(blowfish_cbc, ?KEY, ?IVEC, ?DATA_PADDED) =:= to_bin("6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC"), ok. @@ -209,7 +209,7 @@ cfb64(doc) -> cfb64(suite) -> []; cfb64(Config) when is_list(Config) -> - true = crypto:blowfish_cfb64_encrypt(?KEY, ?IVEC, ?DATA) =:= + true = crypto:block_encrypt(blowfish_cfb64, ?KEY, ?IVEC, ?DATA) =:= to_bin("E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3"), ok. @@ -218,7 +218,7 @@ ofb64(doc) -> ofb64(suite) -> []; ofb64(Config) when is_list(Config) -> - true = crypto:blowfish_ofb64_encrypt(?KEY, ?IVEC, ?DATA) =:= + true = crypto:block_encrypt(blowfish_ofb64, ?KEY, ?IVEC, ?DATA) =:= to_bin("E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA"), ok. @@ -227,8 +227,9 @@ no_ecb(doc) -> no_ecb(suite) -> []; no_ecb(Config) when is_list(Config) -> - notsup(fun crypto:blowfish_ecb_encrypt/2, - [to_bin("0000000000000000"), + notsup(fun crypto:block_encrypt/3, + [blowfish_ecb, + to_bin("0000000000000000"), to_bin("FFFFFFFFFFFFFFFF")]). no_cbc(doc) -> @@ -236,16 +237,16 @@ no_cbc(doc) -> no_cbc(suite) -> []; no_cbc(Config) when is_list(Config) -> - notsup(fun crypto:blowfish_cbc_encrypt/3, - [?KEY, ?IVEC, ?DATA_PADDED]). + notsup(fun crypto:block_encrypt/4, + [blowfish_cbc, ?KEY, ?IVEC, ?DATA_PADDED]). no_cfb64(doc) -> "Test that CFB64 mode is disabled"; no_cfb64(suite) -> []; no_cfb64(Config) when is_list(Config) -> - notsup(fun crypto:blowfish_cfb64_encrypt/3, - [?KEY, ?IVEC, ?DATA]), + notsup(fun crypto:block_encrypt/4, + [blowfish_cfb64, ?KEY, ?IVEC, ?DATA]), ok. no_ofb64(doc) -> @@ -253,8 +254,8 @@ no_ofb64(doc) -> no_ofb64(suite) -> []; no_ofb64(Config) when is_list(Config) -> - notsup(fun crypto:blowfish_ofb64_encrypt/3, - [?KEY, ?IVEC, ?DATA]). + notsup(fun crypto:block_encrypt/4, + [blowfish_ofb64, ?KEY, ?IVEC, ?DATA]). %% Helper functions diff --git a/lib/crypto/test/old_crypto_SUITE.erl b/lib/crypto/test/old_crypto_SUITE.erl deleted file mode 100644 index 324ed39c6d..0000000000 --- a/lib/crypto/test/old_crypto_SUITE.erl +++ /dev/null @@ -1,2350 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% --module(old_crypto_SUITE). - --include_lib("common_test/include/ct.hrl"). - --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, - init_per_testcase/2, - end_per_testcase/2, - info/1, - link_test/1, - md5/1, - md5_update/1, - md4/1, - md4_update/1, - sha/1, - sha_update/1, - hmac_update_sha/1, - hmac_update_sha_n/1, - hmac_update_sha256/1, - hmac_update_sha512/1, - hmac_update_md5/1, - hmac_update_md5_io/1, - hmac_update_md5_n/1, - hmac_rfc2202/1, - hmac_rfc4231_sha224/1, - hmac_rfc4231_sha256/1, - hmac_rfc4231_sha384/1, - hmac_rfc4231_sha512/1, - ripemd160/1, - ripemd160_update/1, - sha256/1, - sha256_update/1, - sha512/1, - sha512_update/1, - md5_mac/1, - md5_mac_io/1, - des_cbc/1, - des_cbc_iter/1, - des_cfb/1, - des_cfb_iter/1, - des_ecb/1, - des3_cbc/1, - des3_cbf/1, - des3_cfb/1, - rc2_cbc/1, - aes_cfb/1, - aes_cbc/1, - aes_cbc_iter/1, - aes_ctr/1, - aes_ctr_stream/1, - mod_exp_test/1, - rand_uniform_test/1, - strong_rand_test/1, - rsa_verify_test/1, - dsa_verify_test/1, - rsa_sign_test/1, - rsa_sign_hash_test/1, - dsa_sign_test/1, - dsa_sign_hash_test/1, - rsa_encrypt_decrypt/1, - dh/1, - srp3/1, srp6/1, srp6a/1, - ec/1, - exor_test/1, - rc4_test/1, - rc4_stream_test/1, - blowfish_cfb64/1, - smp/1]). - --export([hexstr2bin/1]). - -suite() -> [{ct_hooks,[ts_install_cth]}]. - -all() -> - [link_test, {group, info}]. - -groups() -> - [{info, [sequence],[info, {group, rest}]}, - {rest, [], - [md5, md5_update, md4, md4_update, md5_mac, - md5_mac_io, ripemd160, ripemd160_update, sha, sha_update, - sha256, sha256_update, sha512, sha512_update, - hmac_update_sha, hmac_update_sha_n, hmac_update_sha256, hmac_update_sha512, - hmac_update_md5_n, hmac_update_md5_io, hmac_update_md5, - hmac_rfc2202, hmac_rfc4231_sha224, hmac_rfc4231_sha256, - hmac_rfc4231_sha384, hmac_rfc4231_sha512, - des_cbc, aes_cfb, aes_cbc, - des_cfb, des_cfb_iter, des3_cbc, des3_cbf, des3_cfb, rc2_cbc, - aes_cbc_iter, aes_ctr, aes_ctr_stream, des_cbc_iter, des_ecb, - rand_uniform_test, strong_rand_test, - rsa_verify_test, dsa_verify_test, rsa_sign_test, - rsa_sign_hash_test, dsa_sign_test, dsa_sign_hash_test, - rsa_encrypt_decrypt, dh, srp3, srp6, srp6a, ec, exor_test, - rc4_test, rc4_stream_test, mod_exp_test, blowfish_cfb64, - smp]}]. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - -init_per_testcase(info, Config) -> - Config; -init_per_testcase(_Name,Config) -> - io:format("init_per_testcase\n"), - ?line crypto:start(), - Config. - -end_per_testcase(info, Config) -> - Config; -end_per_testcase(_Name,Config) -> - io:format("end_per_testcase\n"), - ?line crypto:stop(), - Config. - -%% -%% -link_test(doc) -> - ["Test that the library is statically linked to libcrypto.a."]; -link_test(suite) -> - []; -link_test(Config) when is_list(Config) -> - ?line case os:type() of - {unix,darwin} -> {skipped,"Darwin cannot link statically"}; - {unix,_} -> link_test_1(); - _ -> {skip,"Only runs on Unix"} - end. - -link_test_1() -> - ?line CryptoPriv = code:priv_dir(crypto), - ?line Wc = filename:join([CryptoPriv,"lib","crypto.*"]), - ?line case filelib:wildcard(Wc) of - [] -> {skip,"Didn't find the crypto driver"}; - [Drv] -> link_test_2(Drv) - end. - -link_test_2(Drv) -> - case ldd_program() of - none -> - {skip,"No ldd-like program found"}; - Ldd -> - Cmd = Ldd ++ " " ++ Drv, - Libs = os:cmd(Cmd), - io:format("~p\n", [Libs]), - case string:str(Libs, "libcrypto") of - 0 -> - case ?t:is_commercial() of - true -> - ?t:fail({libcrypto,statically_linked}); - false -> - {comment,"Statically linked (OK for open-source platform)"} - end; - _ -> - ok - end - end. - -ldd_program() -> - case os:find_executable("ldd") of - false -> - case os:type() of - {unix,darwin} -> - case os:find_executable("otool") of - false -> none; - Otool -> Otool ++ " -L" - end; - _ -> - none - end; - Ldd when is_list(Ldd) -> Ldd - end. - - - -info(doc) -> - ["Call the info function."]; -info(suite) -> - []; -info(Config) when is_list(Config) -> - case {code:lib_dir(crypto),?t:is_commercial()} of - {{error,bad_name},false} -> - {skip,"Missing crypto application"}; - {_,_} -> - ?line crypto:start(), - ?line Info = crypto:info(), - ?line Exports = lists:usort([F || {F,_} <- crypto:module_info(exports)]), - ?line [] = Info -- Exports, - ?line NotInInfo = Exports -- Info, - io:format("NotInInfo = ~p\n", [NotInInfo]), - %% BlackList = lists:sort([des_ede3_cbc_decrypt, des_ede3_cbc_encrypt, - %% dh_check, dh_generate_parameters, - %% module_info, start, stop, version]), - %% ?line BlackList = NotInInfo, - - ?line InfoLib = crypto:info_lib(), - ?line [_|_] = InfoLib, - F = fun([{Name,VerN,VerS}|T],Me) -> - ?line true = is_binary(Name), - ?line true = is_integer(VerN), - ?line true = is_binary(VerS), - Me(T,Me); - ([],_) -> - ok - end, - ?line F(InfoLib,F), - ?line crypto:stop() - end. - -%% -%% -md5(doc) -> - ["Generate MD5 message digests and check the result. Examples are " - "from RFC-1321."]; -md5(suite) -> - []; -md5(Config) when is_list(Config) -> - ?line m(crypto:md5(""), - hexstr2bin("d41d8cd98f00b204e9800998ecf8427e")), - ?line m(crypto:md5("a"), - hexstr2bin("0cc175b9c0f1b6a831c399e269772661")), - ?line m(crypto:md5("abc"), - hexstr2bin("900150983cd24fb0d6963f7d28e17f72")), - ?line m(crypto:md5("message digest"), - hexstr2bin("f96b697d7cb7938d525a2f31aaf161d0")), - ?line m(crypto:md5("abcdefghijklmnopqrstuvwxyz"), - hexstr2bin("c3fcd3d76192e4007dfb496cca67e13b")), - ?line m(crypto:md5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789"), - hexstr2bin("d174ab98d277d9f5a5611c2c9f419d9f")), - ?line m(crypto:md5("12345678901234567890123456789012345678901234567890" - "123456789012345678901234567890"), - hexstr2bin("57edf4a22be3c955ac49da2e2107b67a")). - -%% -%% -md5_update(doc) -> - ["Generate MD5 message using md5_init, md5_update, and md5_final, and" - "check the result. Examples are from RFC-1321."]; -md5_update(suite) -> - []; -md5_update(Config) when is_list(Config) -> - ?line Ctx = crypto:md5_init(), - ?line Ctx1 = crypto:md5_update(Ctx, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), - ?line Ctx2 = crypto:md5_update(Ctx1, "abcdefghijklmnopqrstuvwxyz" - "0123456789"), - ?line m(crypto:md5_final(Ctx2), - hexstr2bin("d174ab98d277d9f5a5611c2c9f419d9f")). - -%% -%% -md4(doc) -> - ["Generate MD4 message digests and check the result. Examples are " - "from RFC-1321."]; -md4(suite) -> - []; -md4(Config) when is_list(Config) -> - ?line m(crypto:md4(""), - hexstr2bin("31d6cfe0d16ae931b73c59d7e0c089c0")), - ?line m(crypto:md4("a"), - hexstr2bin("bde52cb31de33e46245e05fbdbd6fb24")), - ?line m(crypto:md4("abc"), - hexstr2bin("a448017aaf21d8525fc10ae87aa6729d")), - ?line m(crypto:md4("message digest"), - hexstr2bin("d9130a8164549fe818874806e1c7014b")), - ?line m(crypto:md4("abcdefghijklmnopqrstuvwxyz"), - hexstr2bin("d79e1c308aa5bbcdeea8ed63df412da9")), - ?line m(crypto:md4("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789"), - hexstr2bin("043f8582f241db351ce627e153e7f0e4")), - ?line m(crypto:md4("12345678901234567890123456789012345678901234567890" - "123456789012345678901234567890"), - hexstr2bin("e33b4ddc9c38f2199c3e7b164fcc0536")). - -%% -%% -md4_update(doc) -> - ["Generate MD5 message using md5_init, md5_update, and md5_final, and" - "check the result. Examples are from RFC-1321."]; -md4_update(suite) -> - []; -md4_update(Config) when is_list(Config) -> - ?line Ctx = crypto:md4_init(), - ?line Ctx1 = crypto:md4_update(Ctx, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), - ?line Ctx2 = crypto:md4_update(Ctx1, "abcdefghijklmnopqrstuvwxyz" - "0123456789"), - ?line m(crypto:md4_final(Ctx2), - hexstr2bin("043f8582f241db351ce627e153e7f0e4")). - -%% -%% -sha(doc) -> - ["Generate SHA message digests and check the result. Examples are " - "from FIPS-180-1."]; -sha(suite) -> - []; -sha(Config) when is_list(Config) -> - ?line m(crypto:sha("abc"), - hexstr2bin("A9993E364706816ABA3E25717850C26C9CD0D89D")), - ?line m(crypto:sha("abcdbcdecdefdefgefghfghighijhijkijkljklmklm" - "nlmnomnopnopq"), - hexstr2bin("84983E441C3BD26EBAAE4AA1F95129E5E54670F1")). - - -%% -hmac_update_sha_n(doc) -> - ["Request a larger-than-allowed SHA1 HMAC using hmac_init, hmac_update, and hmac_final_n. " - "Expected values for examples are generated using crypto:sha_mac." ]; -hmac_update_sha_n(suite) -> - []; -hmac_update_sha_n(Config) when is_list(Config) -> - ?line Key = hexstr2bin("00010203101112132021222330313233" - "04050607141516172425262734353637" - "08090a0b18191a1b28292a2b38393a3b" - "0c0d0e0f1c1d1e1f2c2d2e2f3c3d3e3f"), - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(sha, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final_n(Ctx3, 1024), - ?line Exp = crypto:sha_mac(Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac), - ?line m(size(Exp), size(Mac)). - - -hmac_update_sha(doc) -> - ["Generate an SHA1 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:sha_mac." ]; -hmac_update_sha(suite) -> - []; -hmac_update_sha(Config) when is_list(Config) -> - ?line Key = hexstr2bin("00010203101112132021222330313233" - "04050607141516172425262734353637" - "08090a0b18191a1b28292a2b38393a3b" - "0c0d0e0f1c1d1e1f2c2d2e2f3c3d3e3f"), - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(sha, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final(Ctx3), - ?line Exp = crypto:hmac(sha, Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac). - -hmac_update_sha256(doc) -> - ["Generate an SHA256 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:sha256_mac." ]; -hmac_update_sha256(suite) -> - []; -hmac_update_sha256(Config) when is_list(Config) -> - if_supported(sha256, fun() -> hmac_update_sha256_do() end). - -hmac_update_sha256_do() -> - ?line Key = hexstr2bin("00010203101112132021222330313233" - "04050607141516172425262734353637" - "08090a0b18191a1b28292a2b38393a3b" - "0c0d0e0f1c1d1e1f2c2d2e2f3c3d3e3f"), - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(sha256, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final(Ctx3), - ?line Exp = crypto:hmac(sha256, Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac). - -hmac_update_sha512(doc) -> - ["Generate an SHA512 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:sha512_mac." ]; -hmac_update_sha512(suite) -> - []; -hmac_update_sha512(Config) when is_list(Config) -> - if_supported(sha512, fun() -> hmac_update_sha512_do() end). - -hmac_update_sha512_do() -> - ?line Key = hexstr2bin("00010203101112132021222330313233" - "04050607141516172425262734353637" - "08090a0b18191a1b28292a2b38393a3b" - "0c0d0e0f1c1d1e1f2c2d2e2f3c3d3e3f"), - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(sha512, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final(Ctx3), - ?line Exp = crypto:hmac(sha512, Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac). - -hmac_update_md5(doc) -> - ["Generate an MD5 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:md5_mac." ]; -hmac_update_md5(suite) -> - []; -hmac_update_md5(Config) when is_list(Config) -> - % ?line Key2 = ["A fine speach", "by a fine man!"], - Key2 = "A fine speach by a fine man!", - ?line Long1 = "Four score and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal.", - ?line Long2 = "Now we are engaged in a great civil war, testing whether that nation, or any nation, so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.", - ?line Long3 = "But, in a larger sense, we can not dedicate, we can not consecrate, we can not hallow this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us-that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion that we here highly resolve that these dead shall not have died in vain-that this nation, under God, shall have a new birth of freedom-and that government of the people, by the people, for the people, shall not perish from the earth.", - ?line CtxA = crypto:hmac_init(md5, Key2), - ?line CtxB = crypto:hmac_update(CtxA, Long1), - ?line CtxC = crypto:hmac_update(CtxB, Long2), - ?line CtxD = crypto:hmac_update(CtxC, Long3), - ?line Mac2 = crypto:hmac_final(CtxD), - ?line Exp2 = crypto:md5_mac(Key2, lists:flatten([Long1, Long2, Long3])), - ?line m(Exp2, Mac2). - -hmac_rfc2202(doc) -> - ["Generate an HMAC using hmac, md5_mac, and sha_mac." - "Test vectors are taken from RFC-2202."]; -hmac_rfc2202(suite) -> - []; -hmac_rfc2202(Config) when is_list(Config) -> - hmac_rfc2202_md5(), - hmac_rfc2202_sha(). - -hmac_rfc2202_md5() -> - %% Test case 1 - Case1Key = binary:copy(<<16#0b>>, 16), - Case1Data = <<"Hi There">>, - Case1Exp = hexstr2bin("9294727a3638bb1c13f48ef8158bfc9d"), - - ?line Case1Mac_1 = crypto:md5_mac(Case1Key, Case1Data), - ?line Case1Mac_2 = crypto:hmac(md5, Case1Key, Case1Data), - ?line m(Case1Exp, Case1Mac_1), - ?line m(Case1Exp, Case1Mac_2), - - %% Test case 2 - Case2Key = <<"Jefe">>, - Case2Data = <<"what do ya want for nothing?">>, - Case2Exp = hexstr2bin("750c783e6ab0b503eaa86e310a5db738"), - - ?line Case2Mac_1 = crypto:md5_mac(Case2Key, Case2Data), - ?line Case2Mac_2 = crypto:hmac(md5, Case2Key, Case2Data), - ?line m(Case2Exp, Case2Mac_1), - ?line m(Case2Exp, Case2Mac_2), - - %% Test case 3 - Case3Key = binary:copy(<<16#aa>>, 16), - Case3Data = binary:copy(<<16#dd>>, 50), - Case3Exp = hexstr2bin("56be34521d144c88dbb8c733f0e8b3f6"), - - ?line Case3Mac_1 = crypto:md5_mac(Case3Key, Case3Data), - ?line Case3Mac_2 = crypto:hmac(md5, Case3Key, Case3Data), - ?line m(Case3Exp, Case3Mac_1), - ?line m(Case3Exp, Case3Mac_2), - - %% Test case 4 - Case4Key = list_to_binary(lists:seq(1, 16#19)), - Case4Data = binary:copy(<<16#cd>>, 50), - Case4Exp = hexstr2bin("697eaf0aca3a3aea3a75164746ffaa79"), - - ?line Case4Mac_1 = crypto:md5_mac(Case4Key, Case4Data), - ?line Case4Mac_2 = crypto:hmac(md5, Case4Key, Case4Data), - ?line m(Case4Exp, Case4Mac_1), - ?line m(Case4Exp, Case4Mac_2), - - %% Test case 5 - Case5Key = binary:copy(<<16#0c>>, 16), - Case5Data = "Test With Truncation", - Case5Exp = hexstr2bin("56461ef2342edc00f9bab995690efd4c"), - Case5Exp96 = hexstr2bin("56461ef2342edc00f9bab995"), - - ?line Case5Mac_1 = crypto:md5_mac(Case5Key, Case5Data), - ?line Case5Mac_2 = crypto:hmac(md5, Case5Key, Case5Data), - ?line Case5Mac96_1 = crypto:md5_mac_96(Case5Key, Case5Data), - ?line Case5Mac96_2 = crypto:hmac(md5, Case5Key, Case5Data, 12), - ?line m(Case5Exp, Case5Mac_1), - ?line m(Case5Exp, Case5Mac_2), - ?line m(Case5Exp96, Case5Mac96_1), - ?line m(Case5Exp96, Case5Mac96_2), - - %% Test case 6 - Case6Key = binary:copy(<<16#aa>>, 80), - Case6Data = <<"Test Using Larger Than Block-Size Key - Hash Key First">>, - Case6Exp = hexstr2bin("6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd"), - - ?line Case6Mac_1 = crypto:md5_mac(Case6Key, Case6Data), - ?line Case6Mac_2 = crypto:hmac(md5, Case6Key, Case6Data), - ?line m(Case6Exp, Case6Mac_1), - ?line m(Case6Exp, Case6Mac_2), - - %% Test case 7 - Case7Key = binary:copy(<<16#aa>>, 80), - Case7Data = <<"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data">>, - Case7Exp = hexstr2bin("6f630fad67cda0ee1fb1f562db3aa53e"), - - ?line Case7Mac_1 = crypto:md5_mac(Case7Key, Case7Data), - ?line Case7Mac_2 = crypto:hmac(md5, Case7Key, Case7Data), - ?line m(Case7Exp, Case7Mac_1), - ?line m(Case7Exp, Case7Mac_2). - -hmac_rfc2202_sha() -> - %% Test case 1 - Case1Key = binary:copy(<<16#0b>>, 20), - Case1Data = <<"Hi There">>, - Case1Exp = hexstr2bin("b617318655057264e28bc0b6fb378c8ef146be00"), - - ?line Case1Mac_1 = crypto:sha_mac(Case1Key, Case1Data), - ?line Case1Mac_2 = crypto:hmac(sha, Case1Key, Case1Data), - ?line m(Case1Exp, Case1Mac_1), - ?line m(Case1Exp, Case1Mac_2), - - %% Test case 2 - Case2Key = <<"Jefe">>, - Case2Data = <<"what do ya want for nothing?">>, - Case2Exp = hexstr2bin("effcdf6ae5eb2fa2d27416d5f184df9c259a7c79"), - - ?line Case2Mac_1 = crypto:sha_mac(Case2Key, Case2Data), - ?line Case2Mac_2 = crypto:hmac(sha, Case2Key, Case2Data), - ?line m(Case2Exp, Case2Mac_1), - ?line m(Case2Exp, Case2Mac_2), - - %% Test case 3 - Case3Key = binary:copy(<<16#aa>>, 20), - Case3Data = binary:copy(<<16#dd>>, 50), - Case3Exp = hexstr2bin("125d7342b9ac11cd91a39af48aa17b4f63f175d3"), - - ?line Case3Mac_1 = crypto:sha_mac(Case3Key, Case3Data), - ?line Case3Mac_2 = crypto:hmac(sha, Case3Key, Case3Data), - ?line m(Case3Exp, Case3Mac_1), - ?line m(Case3Exp, Case3Mac_2), - - %% Test case 4 - Case4Key = list_to_binary(lists:seq(1, 16#19)), - Case4Data = binary:copy(<<16#cd>>, 50), - Case4Exp = hexstr2bin("4c9007f4026250c6bc8414f9bf50c86c2d7235da"), - - ?line Case4Mac_1 = crypto:sha_mac(Case4Key, Case4Data), - ?line Case4Mac_2 = crypto:hmac(sha, Case4Key, Case4Data), - ?line m(Case4Exp, Case4Mac_1), - ?line m(Case4Exp, Case4Mac_2), - - %% Test case 5 - Case5Key = binary:copy(<<16#0c>>, 20), - Case5Data = "Test With Truncation", - Case5Exp = hexstr2bin("4c1a03424b55e07fe7f27be1d58bb9324a9a5a04"), - Case5Exp96 = hexstr2bin("4c1a03424b55e07fe7f27be1"), - - ?line Case5Mac_1 = crypto:sha_mac(Case5Key, Case5Data), - ?line Case5Mac_2 = crypto:hmac(sha, Case5Key, Case5Data), - ?line Case5Mac96_1 = crypto:sha_mac_96(Case5Key, Case5Data), - ?line Case5Mac96_2 = crypto:hmac(sha, Case5Key, Case5Data, 12), - ?line m(Case5Exp, Case5Mac_1), - ?line m(Case5Exp, Case5Mac_2), - ?line m(Case5Exp96, Case5Mac96_1), - ?line m(Case5Exp96, Case5Mac96_2), - - %% Test case 6 - Case6Key = binary:copy(<<16#aa>>, 80), - Case6Data = <<"Test Using Larger Than Block-Size Key - Hash Key First">>, - Case6Exp = hexstr2bin("aa4ae5e15272d00e95705637ce8a3b55ed402112"), - - ?line Case6Mac_1 = crypto:sha_mac(Case6Key, Case6Data), - ?line Case6Mac_2 = crypto:hmac(sha, Case6Key, Case6Data), - ?line m(Case6Exp, Case6Mac_1), - ?line m(Case6Exp, Case6Mac_2), - - %% Test case 7 - Case7Key = binary:copy(<<16#aa>>, 80), - Case7Data = <<"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data">>, - Case7Exp = hexstr2bin("e8e99d0f45237d786d6bbaa7965c7808bbff1a91"), - - ?line Case7Mac_1 = crypto:sha_mac(Case7Key, Case7Data), - ?line Case7Mac_2 = crypto:hmac(sha, Case7Key, Case7Data), - ?line m(Case7Exp, Case7Mac_1), - ?line m(Case7Exp, Case7Mac_2). - -hmac_rfc4231_sha224(doc) -> - ["Generate an HMAC using crypto:sha224_mac, hmac, and hmac_init, hmac_update, and hmac_final. " - "Testvectors are take from RFC4231." ]; -hmac_rfc4231_sha224(suite) -> - []; -hmac_rfc4231_sha224(Config) when is_list(Config) -> - if_supported(sha224, fun() -> hmac_rfc4231_sha224_do() end). - -hmac_rfc4231_sha256(doc) -> - ["Generate an HMAC using crypto:sha256_mac, hmac, and hmac_init, hmac_update, and hmac_final. " - "Testvectors are take from RFC4231." ]; -hmac_rfc4231_sha256(suite) -> - []; -hmac_rfc4231_sha256(Config) when is_list(Config) -> - if_supported(sha256, fun() -> hmac_rfc4231_sha256_do() end). - -hmac_rfc4231_sha384(doc) -> - ["Generate an HMAC using crypto:sha384_mac, hmac, and hmac_init, hmac_update, and hmac_final. " - "Testvectors are take from RFC4231." ]; -hmac_rfc4231_sha384(suite) -> - []; -hmac_rfc4231_sha384(Config) when is_list(Config) -> - if_supported(sha384, fun() -> hmac_rfc4231_sha384_do() end). - -hmac_rfc4231_sha512(doc) -> - ["Generate an HMAC using crypto:sha512_mac, hmac, and hmac_init, hmac_update, and hmac_final. " - "Testvectors are take from RFC4231." ]; -hmac_rfc4231_sha512(suite) -> - []; -hmac_rfc4231_sha512(Config) when is_list(Config) -> - if_supported(sha512, fun() -> hmac_rfc4231_sha512_do() end). - -hmac_rfc4231_case(Hash, case1, Exp) -> - %% Test 1 - Key = binary:copy(<<16#0b>>, 20), - Data = <<"Hi There">>, - hmac_rfc4231_case(Hash, Key, Data, Exp); - -hmac_rfc4231_case(Hash, case2, Exp) -> - %% Test 2 - Key = <<"Jefe">>, - Data = <<"what do ya want for nothing?">>, - hmac_rfc4231_case(Hash, Key, Data, Exp); - -hmac_rfc4231_case(Hash, case3, Exp) -> - %% Test 3 - Key = binary:copy(<<16#aa>>, 20), - Data = binary:copy(<<16#dd>>, 50), - hmac_rfc4231_case(Hash, Key, Data, Exp); - -hmac_rfc4231_case(Hash, case4, Exp) -> - %% Test 4 - Key = list_to_binary(lists:seq(1, 16#19)), - Data = binary:copy(<<16#cd>>, 50), - hmac_rfc4231_case(Hash, Key, Data, Exp); - -hmac_rfc4231_case(Hash, case5, Exp) -> - %% Test 5 - Key = binary:copy(<<16#0c>>, 20), - Data = <<"Test With Truncation">>, - hmac_rfc4231_case(Hash, Key, Data, 16, Exp); - -hmac_rfc4231_case(Hash, case6, Exp) -> - %% Test 6 - Key = binary:copy(<<16#aa>>, 131), - Data = <<"Test Using Larger Than Block-Size Key - Hash Key First">>, - hmac_rfc4231_case(Hash, Key, Data, Exp); - -hmac_rfc4231_case(Hash, case7, Exp) -> - %% Test Case 7 - Key = binary:copy(<<16#aa>>, 131), - Data = <<"This is a test using a larger than block-size key and a larger t", - "han block-size data. The key needs to be hashed before being use", - "d by the HMAC algorithm.">>, - hmac_rfc4231_case(Hash, Key, Data, Exp). - -hmac_rfc4231_case(Hash, Key, Data, Exp) -> - ?line Ctx = crypto:hmac_init(Hash, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Mac1 = crypto:hmac_final(Ctx2), - ?line Mac3 = crypto:hmac(Hash, Key, Data), - ?line m(Exp, Mac1), - ?line m(Exp, Mac3). - -hmac_rfc4231_case(Hash, Key, Data, Trunc, Exp) -> - ?line Ctx = crypto:hmac_init(Hash, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Mac1 = crypto:hmac_final_n(Ctx2, Trunc), - ?line Mac3 = crypto:hmac(Hash, Key, Data, Trunc), - ?line m(Exp, Mac1), - ?line m(Exp, Mac3). - -hmac_rfc4231_sha224_do() -> - Case1 = hexstr2bin("896fb1128abbdf196832107cd49df33f" - "47b4b1169912ba4f53684b22"), - Case2 = hexstr2bin("a30e01098bc6dbbf45690f3a7e9e6d0f" - "8bbea2a39e6148008fd05e44"), - Case3 = hexstr2bin("7fb3cb3588c6c1f6ffa9694d7d6ad264" - "9365b0c1f65d69d1ec8333ea"), - Case4 = hexstr2bin("6c11506874013cac6a2abc1bb382627c" - "ec6a90d86efc012de7afec5a"), - Case5 = hexstr2bin("0e2aea68a90c8d37c988bcdb9fca6fa8"), - Case6 = hexstr2bin("95e9a0db962095adaebe9b2d6f0dbce2" - "d499f112f2d2b7273fa6870e"), - Case7 = hexstr2bin("3a854166ac5d9f023f54d517d0b39dbd" - "946770db9c2b95c9f6f565d1"), - hmac_rfc4231_cases_do(sha224, [Case1, Case2, Case3, Case4, Case5, Case6, Case7]). - -hmac_rfc4231_sha256_do() -> - Case1 = hexstr2bin("b0344c61d8db38535ca8afceaf0bf12b" - "881dc200c9833da726e9376c2e32cff7"), - Case2 = hexstr2bin("5bdcc146bf60754e6a042426089575c7" - "5a003f089d2739839dec58b964ec3843"), - Case3 = hexstr2bin("773ea91e36800e46854db8ebd09181a7" - "2959098b3ef8c122d9635514ced565fe"), - Case4 = hexstr2bin("82558a389a443c0ea4cc819899f2083a" - "85f0faa3e578f8077a2e3ff46729665b"), - Case5 = hexstr2bin("a3b6167473100ee06e0c796c2955552b"), - Case6 = hexstr2bin("60e431591ee0b67f0d8a26aacbf5b77f" - "8e0bc6213728c5140546040f0ee37f54"), - Case7 = hexstr2bin("9b09ffa71b942fcb27635fbcd5b0e944" - "bfdc63644f0713938a7f51535c3a35e2"), - hmac_rfc4231_cases_do(sha256, [Case1, Case2, Case3, Case4, Case5, Case6, Case7]). - -hmac_rfc4231_sha384_do() -> - Case1 = hexstr2bin("afd03944d84895626b0825f4ab46907f" - "15f9dadbe4101ec682aa034c7cebc59c" - "faea9ea9076ede7f4af152e8b2fa9cb6"), - Case2 = hexstr2bin("af45d2e376484031617f78d2b58a6b1b" - "9c7ef464f5a01b47e42ec3736322445e" - "8e2240ca5e69e2c78b3239ecfab21649"), - Case3 = hexstr2bin("88062608d3e6ad8a0aa2ace014c8a86f" - "0aa635d947ac9febe83ef4e55966144b" - "2a5ab39dc13814b94e3ab6e101a34f27"), - Case4 = hexstr2bin("3e8a69b7783c25851933ab6290af6ca7" - "7a9981480850009cc5577c6e1f573b4e" - "6801dd23c4a7d679ccf8a386c674cffb"), - Case5 = hexstr2bin("3abf34c3503b2a23a46efc619baef897"), - Case6 = hexstr2bin("4ece084485813e9088d2c63a041bc5b4" - "4f9ef1012a2b588f3cd11f05033ac4c6" - "0c2ef6ab4030fe8296248df163f44952"), - Case7 = hexstr2bin("6617178e941f020d351e2f254e8fd32c" - "602420feb0b8fb9adccebb82461e99c5" - "a678cc31e799176d3860e6110c46523e"), - hmac_rfc4231_cases_do(sha384, [Case1, Case2, Case3, Case4, Case5, Case6, Case7]). - -hmac_rfc4231_sha512_do() -> - Case1 = hexstr2bin("87aa7cdea5ef619d4ff0b4241a1d6cb0" - "2379f4e2ce4ec2787ad0b30545e17cde" - "daa833b7d6b8a702038b274eaea3f4e4" - "be9d914eeb61f1702e696c203a126854"), - Case2 = hexstr2bin("164b7a7bfcf819e2e395fbe73b56e0a3" - "87bd64222e831fd610270cd7ea250554" - "9758bf75c05a994a6d034f65f8f0e6fd" - "caeab1a34d4a6b4b636e070a38bce737"), - Case3 = hexstr2bin("fa73b0089d56a284efb0f0756c890be9" - "b1b5dbdd8ee81a3655f83e33b2279d39" - "bf3e848279a722c806b485a47e67c807" - "b946a337bee8942674278859e13292fb"), - Case4 = hexstr2bin("b0ba465637458c6990e5a8c5f61d4af7" - "e576d97ff94b872de76f8050361ee3db" - "a91ca5c11aa25eb4d679275cc5788063" - "a5f19741120c4f2de2adebeb10a298dd"), - Case5 = hexstr2bin("415fad6271580a531d4179bc891d87a6"), - Case6 = hexstr2bin("80b24263c7c1a3ebb71493c1dd7be8b4" - "9b46d1f41b4aeec1121b013783f8f352" - "6b56d037e05f2598bd0fd2215d6a1e52" - "95e64f73f63f0aec8b915a985d786598"), - Case7 = hexstr2bin("e37b6a775dc87dbaa4dfa9f96e5e3ffd" - "debd71f8867289865df5a32d20cdc944" - "b6022cac3c4982b10d5eeb55c3e4de15" - "134676fb6de0446065c97440fa8c6a58"), - hmac_rfc4231_cases_do(sha512, [Case1, Case2, Case3, Case4, Case5, Case6, Case7]). - -hmac_rfc4231_cases_do(Hash, CasesData) -> - hmac_rfc4231_cases_do(Hash, [case1, case2, case3, case4, case5, case6, case7], CasesData). - -hmac_rfc4231_cases_do(_Hash, _, []) -> - ok; -hmac_rfc4231_cases_do(Hash, [C|Cases], [D|CasesData]) -> - hmac_rfc4231_case(Hash, C, D), - hmac_rfc4231_cases_do(Hash, Cases, CasesData). - -hmac_update_md5_io(doc) -> - ["Generate an MD5 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:md5_mac." ]; -hmac_update_md5_io(suite) -> - []; -hmac_update_md5_io(Config) when is_list(Config) -> - ?line Key = ["A fine speach", "by a fine man!"], - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(md5, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final(Ctx3), - ?line Exp = crypto:md5_mac(Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac). - - -hmac_update_md5_n(doc) -> - ["Generate a shortened MD5 HMAC using hmac_init, hmac_update, and hmac_final. " - "Expected values for examples are generated using crypto:md5_mac." ]; -hmac_update_md5_n(suite) -> - []; -hmac_update_md5_n(Config) when is_list(Config) -> - ?line Key = ["A fine speach", "by a fine man!"], - ?line Data = "Sampl", - ?line Data2 = "e #1", - ?line Ctx = crypto:hmac_init(md5, Key), - ?line Ctx2 = crypto:hmac_update(Ctx, Data), - ?line Ctx3 = crypto:hmac_update(Ctx2, Data2), - ?line Mac = crypto:hmac_final_n(Ctx3, 12), - ?line Exp = crypto:md5_mac_96(Key, lists:flatten([Data, Data2])), - ?line m(Exp, Mac). -%% -%% -ripemd160(doc) -> - ["Generate RIPEMD160 message digests and check the result."]; -ripemd160(suite) -> - []; -ripemd160(Config) when is_list(Config) -> - ?line m(crypto:hash(ripemd160,"abc"), - hexstr2bin("8EB208F7E05D987A9B044A8E98C6B087F15A0BFC")), - ?line m(crypto:hash(ripemd160,"abcdbcdecdefdefgefghfghighijhijkijkljklmklm" - "nlmnomnopnopq"), - hexstr2bin("12A053384A9C0C88E405A06C27DCF49ADA62EB2B")). - - -%% -%% -ripemd160_update(doc) -> - ["Generate RIPEMD160 message digests by using ripemd160_init," - "ripemd160_update, and ripemd160_final and check the result."]; -ripemd160_update(suite) -> - []; -ripemd160_update(Config) when is_list(Config) -> - ?line Ctx = crypto:hash_init(ripemd160), - ?line Ctx1 = crypto:hash_update(Ctx, "abcdbcdecdefdefgefghfghighi"), - ?line Ctx2 = crypto:hash_update(Ctx1, "jhijkijkljklmklmnlmnomnopnopq"), - ?line m(crypto:hash_final(Ctx2), - hexstr2bin("12A053384A9C0C88E405A06C27DCF49ADA62EB2B")). - -%% -%% -sha_update(doc) -> - ["Generate SHA message digests by using sha_init, sha_update, and" - "sha_final, and check the result. Examples are from FIPS-180-1."]; -sha_update(suite) -> - []; -sha_update(Config) when is_list(Config) -> - ?line Ctx = crypto:sha_init(), - ?line Ctx1 = crypto:sha_update(Ctx, "abcdbcdecdefdefgefghfghighi"), - ?line Ctx2 = crypto:sha_update(Ctx1, "jhijkijkljklmklmnlmnomnopnopq"), - ?line m(crypto:sha_final(Ctx2), - hexstr2bin("84983E441C3BD26EBAAE4AA1F95129E5E54670F1")). - -%% -%% -sha256(doc) -> - ["Generate SHA-256 message digests and check the result. Examples are " - "from rfc-4634."]; -sha256(suite) -> - []; -sha256(Config) when is_list(Config) -> - if_supported(sha256, fun() -> sha256_do() end). - -sha256_do() -> - ?line m(crypto:hash(sha256, "abc"), - hexstr2bin("BA7816BF8F01CFEA4141" - "40DE5DAE2223B00361A396177A9CB410FF61F20015AD")), - ?line m(crypto:hash(sha256, "abcdbcdecdefdefgefghfghighijhijkijkljklmklm" - "nlmnomnopnopq"), - hexstr2bin("248D6A61D20638B8" - "E5C026930C3E6039A33CE45964FF2167F6ECEDD419DB06C1")). - -%% -%% -sha256_update(doc) -> - ["Generate SHA256 message digests by using sha256_init, sha256_update, and" - "sha256_final, and check the result. Examples are from rfc-4634."]; -sha256_update(suite) -> - []; -sha256_update(Config) when is_list(Config) -> - if_supported(sha256, fun() -> sha256_update_do() end). - -sha256_update_do() -> - ?line Ctx = crypto:hash_init(sha256), - ?line Ctx1 = crypto:hash_update(Ctx, "abcdbcdecdefdefgefghfghighi"), - ?line Ctx2 = crypto:hash_update(Ctx1, "jhijkijkljklmklmnlmnomnopnopq"), - ?line m(crypto:hash_final(Ctx2), - hexstr2bin("248D6A61D20638B8" - "E5C026930C3E6039A33CE45964FF2167F6ECEDD419DB06C1")). - - -%% -%% -sha512(doc) -> - ["Generate SHA-512 message digests and check the result. Examples are " - "from rfc-4634."]; -sha512(suite) -> - []; -sha512(Config) when is_list(Config) -> - if_supported(sha512, fun() -> sha512_do() end). - -sha512_do() -> - ?line m(crypto:hash(sha512, "abc"), - hexstr2bin("DDAF35A193617ABACC417349AE20413112E6FA4E89A97EA2" - "0A9EEEE64B55D39A2192992A274FC1A836BA3C23A3FEEBBD" - "454D4423643CE80E2A9AC94FA54CA49F")), - ?line m(crypto:hash(sha512, "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" - "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"), - hexstr2bin("8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7FA1" - "7299AEADB6889018501D289E4900F7E4331B99DEC4B5433A" - "C7D329EEB6DD26545E96E55B874BE909")). - -%% -%% -sha512_update(doc) -> - ["Generate SHA512 message digests by using sha512_init, sha512_update, and" - "sha512_final, and check the result. Examples are from rfc=4634."]; -sha512_update(suite) -> - []; -sha512_update(Config) when is_list(Config) -> - if_supported(sha512, fun() -> sha512_update_do() end). - -sha512_update_do() -> - ?line Ctx = crypto:hash_init(sha512), - ?line Ctx1 = crypto:hash_update(Ctx, "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"), - ?line Ctx2 = crypto:hash_update(Ctx1, "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"), - ?line m(crypto:hash_final(Ctx2), - hexstr2bin("8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7FA1" - "7299AEADB6889018501D289E4900F7E4331B99DEC4B5433A" - "C7D329EEB6DD26545E96E55B874BE909")). - -%% -%% -md5_mac(doc) -> - ["Generate some HMACs, using MD5, and check the result. Examples are " - "from RFC-2104."]; -md5_mac(suite) -> - []; -md5_mac(Config) when is_list(Config) -> - ?line m(crypto:md5_mac(hexstr2bin("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"), - "Hi There"), - hexstr2bin("9294727a3638bb1c13f48ef8158bfc9d")), - ?line m(crypto:md5_mac(list_to_binary("Jefe"), - "what do ya want for nothing?"), - hexstr2bin("750c783e6ab0b503eaa86e310a5db738")), - ?line m(crypto:md5_mac(hexstr2bin("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), - hexstr2bin("DDDDDDDDDDDDDDDDDDDD" - "DDDDDDDDDDDDDDDDDDDD" - "DDDDDDDDDDDDDDDDDDDD" - "DDDDDDDDDDDDDDDDDDDD" - "DDDDDDDDDDDDDDDDDDDD")), - hexstr2bin("56be34521d144c88dbb8c733f0e8b3f6")). - -%% -%% -md5_mac_io(doc) -> - ["Generate some HMACs, using MD5, with Key an IO-list, and check the " - "result. Examples are from RFC-2104."]; -md5_mac_io(suite) -> - []; -md5_mac_io(Config) when is_list(Config) -> - ?line Key1 = hexstr2bin("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"), - ?line {B11, B12} = split_binary(Key1, 4), - ?line Key11 = [B11,binary_to_list(B12)], - ?line m(crypto:md5_mac(Key11, "Hi There"), - hexstr2bin("9294727a3638bb1c13f48ef8158bfc9d")). - -%% -%% -des_cbc(doc) -> - "Encrypt and decrypt according to CBC DES. and check the result. " - "Example are from FIPS-81."; -des_cbc(suite) -> - []; -des_cbc(Config) when is_list(Config) -> - if_supported(des_cbc, fun des_cbc_do/0). - -des_cbc_do() -> - ?line Key = hexstr2bin("0123456789abcdef"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain = "Now is the time for all ", - ?line Cipher = crypto:des_cbc_encrypt(Key, IVec, Plain), - ?line m(Cipher, hexstr2bin("e5c7cdde872bf27c43e934008c389c" - "0f683788499a7c05f6")), - ?line m(list_to_binary(Plain), - crypto:des_cbc_decrypt(Key, IVec, Cipher)), - ?line Plain2 = "7654321 Now is the time for " ++ [0, 0, 0, 0], - ?line Cipher2 = crypto:des_cbc_encrypt(Key, IVec, Plain2), - ?line m(Cipher2, hexstr2bin("b9916b8ee4c3da64b4f44e3cbefb9" - "9484521388fa59ae67d58d2e77e86062733")), - ?line m(list_to_binary(Plain2), - crypto:des_cbc_decrypt(Key, IVec, Cipher2)). - -%% -%% -des_cbc_iter(doc) -> - "Encrypt and decrypt according to CBC DES in two steps, and " - "check the result. Example are from FIPS-81."; -des_cbc_iter(suite) -> - []; -des_cbc_iter(Config) when is_list(Config) -> - if_supported(des_cbc, fun des_cbc_iter_do/0). - -des_cbc_iter_do() -> - ?line Key = hexstr2bin("0123456789abcdef"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain1 = "Now is the time ", - ?line Plain2 = "for all ", - ?line Cipher1 = crypto:des_cbc_encrypt(Key, IVec, Plain1), - ?line IVec2 = crypto:des_cbc_ivec(Cipher1), - ?line Cipher2 = crypto:des_cbc_encrypt(Key, IVec2, Plain2), - ?line Cipher = list_to_binary([Cipher1, Cipher2]), - ?line m(Cipher, hexstr2bin("e5c7cdde872bf27c43e934008c389c" - "0f683788499a7c05f6")). - -%% -%% -des_cfb(doc) -> - "Encrypt and decrypt according to CFB DES. and check the result. " - "Example is from FIPS-81."; -des_cfb(suite) -> - []; -des_cfb(Config) when is_list(Config) -> - if_supported(des_cfb, fun des_cfb_do/0). - -des_cfb_do() -> - ?line Key = hexstr2bin("0123456789abcdef"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain = "Now is the", - ?line Cipher = crypto:des_cfb_encrypt(Key, IVec, Plain), - ?line m(Cipher, hexstr2bin("f31fda07011462ee187f")), - ?line m(list_to_binary(Plain), - crypto:des_cfb_decrypt(Key, IVec, Cipher)). - -%% -%% -des_cfb_iter(doc) -> - "Encrypt and decrypt according to CFB DES in two steps, and " - "check the result. Example is from FIPS-81."; -des_cfb_iter(suite) -> - []; -des_cfb_iter(Config) when is_list(Config) -> - if_supported(des_cfb, fun des_cfb_iter_do/0). - -des_cfb_iter_do() -> - ?line Key = hexstr2bin("0123456789abcdef"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain1 = "Now i", - ?line Plain2 = "s the", - ?line Cipher1 = crypto:des_cfb_encrypt(Key, IVec, Plain1), - ?line IVec2 = crypto:des_cfb_ivec(IVec, Cipher1), - ?line Cipher2 = crypto:des_cfb_encrypt(Key, IVec2, Plain2), - ?line Cipher = list_to_binary([Cipher1, Cipher2]), - ?line m(Cipher, hexstr2bin("f31fda07011462ee187f")). - -%% -%% -des_ecb(doc) -> - "Encrypt and decrypt according to ECB DES and check the result. " - "Example are from FIPS-81."; -des_ecb(suite) -> - []; -des_ecb(Config) when is_list(Config) -> - if_supported(des_ecb, fun des_ecb_do/0). - -des_ecb_do() -> - ?line Key = hexstr2bin("0123456789abcdef"), - ?line Cipher1 = crypto:des_ecb_encrypt(Key, "Now is t"), - ?line m(Cipher1, hexstr2bin("3fa40e8a984d4815")), - ?line Cipher2 = crypto:des_ecb_encrypt(Key, "he time "), - ?line m(Cipher2, hexstr2bin("6a271787ab8883f9")), - ?line Cipher3 = crypto:des_ecb_encrypt(Key, "for all "), - ?line m(Cipher3, hexstr2bin("893d51ec4b563b53")), - ?line Cipher4 = crypto:des_ecb_decrypt(Key, hexstr2bin("3fa40e8a984d4815")), - ?line m(Cipher4, <<"Now is t">>), - ?line Cipher5 = crypto:des_ecb_decrypt(Key, hexstr2bin("6a271787ab8883f9")), - ?line m(Cipher5, <<"he time ">>), - ?line Cipher6 = crypto:des_ecb_decrypt(Key, hexstr2bin("893d51ec4b563b53")), - ?line m(Cipher6, <<"for all ">>). -%% -%% -rc2_cbc(doc) -> - "Encrypt and decrypt according to RC2 CBC and check the result. " - "Example stripped out from public_key application test"; -rc2_cbc(Config) when is_list(Config) -> - if_supported(rc2_cbc, fun rc2_cbc_do/0). - -rc2_cbc_do() -> - Key = <<146,210,160,124,215,227,153,239,227,17,222,140,3,93,27,191>>, - IV = <<72,91,135,182,25,42,35,210>>, - - Cipher = <<36,245,206,158,168,230,58,69,148,137,32,192,250,41,237,181,181,251, 192,2,175,135,177,171,57,30,111,117,159,149,15,28,88,158,28,81,28,115, 85,219,241,82,117,222,91,85,73,117,164,25,182,52,191,64,123,57,26,19, 211,27,253,31,194,219,231,104,247,240,172,130,119,21,225,154,101,247, 32,216,42,216,133,169,78,22,97,27,227,26,196,224,172,168,17,9,148,55, 203,91,252,40,61,226,236,221,215,160,78,63,13,181,68,57,196,241,185, 207, 116,129,152,237,60,139,247,153,27,146,161,246,222,98,185,222,152, 187,135, 236,86,34,7,110,91,230,173,34,160,242,202,222,121,127,181,140, 101,203,195, 190,88,250,86,147,127,87,72,126,171,16,71,47,110,248,88, 14,29,143,161,152, 129,236,148,22,152,186,208,119,70,8,174,193,203,100, 193,203,200,117,102,242, 134,142,96,125,135,200,217,190,76,117,50,70, 209,186,101,241,200,91,40,193,54, 90,195,38,47,59,197,38,234,86,223,16, 51,253,204,129,20,171,66,21,241,26,135,216, 196,114,110,91,15,53,40, 164,201,136,113,95,247,51,181,208,241,68,168,98,151,36, 155,72,24,57, 42,191,14,125,204,10,167,214,233,138,115,125,234,121,134,227,26,247, 77,200,117,110,117,111,168,156,206,67,159,149,189,173,150,193,91,199, 216,153,22, 189,137,185,89,160,13,131,132,58,109,28,110,246,252,251,14, 232,91,38,52,29,101,188,69,123,50,0,130,178,93,73,239,118,7,77,35,59, 253,10,159,45,86,142,37,78,232,48>>, - Text = <<48,130,1,85,2,1,0,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,4,130,1,63,48,130, 1,59,2,1,0,2,65,0,222,187,252,44,9,214,27,173,162,169,70,47,36,34,78,84,204, 107,60,192,117,95,21,206,49,142,245,126,121,223,23,2,107,106,133,204,161,36, 40,2,114,69,4,93,242,5,42,50,154,47,154,211,209,123,120,161,5,114,173,155,34, 191,52,59,2,3,1,0,1,2,64,45,144,169,106,220,236,71,39,67,82,123,192,35,21,61, 143,13,110,150,180,12,142,210,40,39,109,70,125,132,51,6,66,159,134,112,85, 155,243,118,221,65,133,127,99,151,194,252,141,149,224,229,62,214,45,228,32, 184,85,67,14,228,161,184,161,2,33,0,255,202,240,131,130,57,49,224,115,255,83, 79,6,165,212,21,179,212,20,188,97,74,69,68,163,223,247,237,39,24,23,235,2,33, 0,222,234,48,36,33,23,219,45,59,136,55,245,143,29,165,48,255,131,207,146,131, 104,13,163,54,131,236,78,88,54,16,241,2,33,0,230,2,99,129,173,176,166,131, 241,106,143,76,9,107,70,41,121,185,228,39,124,200,159,62,216,169,5,180,111, 169,255,159,2,33,0,151,193,70,212,209,210,179,219,175,83,165,4,255,81,103,76, 92,39,24,0,222,132,208,3,244,241,10,198,171,54,227,129,2,32,43,250,20,31,16, 189,168,116,225,1,125,132,94,130,118,124,28,56,232,39,69,218,244,33,240,200, 205,9,215,101,35,135,7,7,7,7,7,7,7>>, - - Text = crypto:rc2_cbc_decrypt(Key, IV, Cipher), - Cipher = crypto:rc2_cbc_encrypt(Key, IV, Text). - -%% -%% -des3_cbc(doc) -> - "Encrypt and decrypt according to CBC 3DES, and check the result."; -des3_cbc(suite) -> - []; -des3_cbc(Config) when is_list(Config) -> - if_supported(des3_cbc, fun des3_cbc_do/0). - -des3_cbc_do() -> - ?line Key1 = hexstr2bin("0123456789abcdef"), - ?line Key2 = hexstr2bin("fedcba9876543210"), - ?line Key3 = hexstr2bin("0f2d4b6987a5c3e1"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain = "Now is the time for all ", - ?line Cipher = crypto:des3_cbc_encrypt(Key1, Key2, Key3, IVec, Plain), - ?line m(Cipher, hexstr2bin("8a2667ee5577267cd9b1af2c5a0480" - "0bac1ae66970fb2b89")), - ?line m(list_to_binary(Plain), - crypto:des3_cbc_decrypt(Key1, Key2, Key3, IVec, Cipher)), - ?line Plain2 = "7654321 Now is the time for " ++ [0, 0, 0, 0], - ?line Cipher2 = crypto:des3_cbc_encrypt(Key1, Key2, Key3, IVec, Plain2), - ?line m(Cipher2, hexstr2bin("eb33ec6ede2c8e90f6877e77b95d5" - "4c83cee22907f7f0041ca1b7abe202bfafe")), - ?line m(list_to_binary(Plain2), - crypto:des3_cbc_decrypt(Key1, Key2, Key3, IVec, Cipher2)), - - ?line Key = hexstr2bin("0123456789abcdef"), - ?line DESCipher = crypto:des3_cbc_encrypt(Key, Key, Key, IVec, Plain), - ?line m(DESCipher, hexstr2bin("e5c7cdde872bf27c43e934008c389c" - "0f683788499a7c05f6")), - ?line m(list_to_binary(Plain), - crypto:des3_cbc_decrypt(Key, Key, Key, IVec, DESCipher)), - ?line DESCipher2 = crypto:des3_cbc_encrypt(Key, Key, Key, IVec, Plain2), - ?line m(DESCipher2, hexstr2bin("b9916b8ee4c3da64b4f44e3cbefb9" - "9484521388fa59ae67d58d2e77e86062733")), - ?line m(list_to_binary(Plain2), - crypto:des3_cbc_decrypt(Key, Key, Key, IVec, DESCipher2)). - -%% -%% -des3_cbf(doc) -> - "Encrypt and decrypt according to CFB 3DES, and check the result."; -des3_cbf(suite) -> - []; -des3_cbf(Config) when is_list(Config) -> - case openssl_version() of - V when V < 16#90705F -> {skipped,"OpenSSL version too old"}; - _ -> - if_supported(des3_cbf, fun des3_cfb_do/0) - end. - -%% -%% -des3_cfb(doc) -> - "Encrypt and decrypt according to CFB 3DES, and check the result."; -des3_cfb(suite) -> - []; -des3_cfb(Config) when is_list(Config) -> - case openssl_version() of - V when V < 16#90705F -> {skipped,"OpenSSL version too old"}; - _ -> - if_supported(des3_cfb, fun des3_cfb_do/0) - end. - -des3_cfb_do() -> - ?line Key1 = hexstr2bin("0123456789abcdef"), - ?line Key2 = hexstr2bin("fedcba9876543210"), - ?line Key3 = hexstr2bin("0f2d4b6987a5c3e1"), - ?line IVec = hexstr2bin("1234567890abcdef"), - ?line Plain = "Now is the time for all ", - ?line Cipher = crypto:des3_cfb_encrypt(Key1, Key2, Key3, IVec, Plain), - ?line m(Cipher, hexstr2bin("fc0ba7a20646ba53cc8bff263f0937" - "1deab42a00666db02c")), - ?line m(list_to_binary(Plain), - crypto:des3_cfb_decrypt(Key1, Key2, Key3, IVec, Cipher)), - ?line Plain2 = "7654321 Now is the time for " ++ [0, 0, 0, 0], - ?line Cipher2 = crypto:des3_cfb_encrypt(Key1, Key2, Key3, IVec, Plain2), - ?line m(Cipher2, hexstr2bin("8582c59ac01897422632c0accb66c" - "e413f5efab838fce7e41e2ba67705bad5bc")), - ?line m(list_to_binary(Plain2), - crypto:des3_cfb_decrypt(Key1, Key2, Key3, IVec, Cipher2)). - -%% -%% -aes_cfb(doc) -> - "Encrypt and decrypt according to AES CFB 128 bit and check " - "the result. Example are from NIST SP 800-38A."; - -aes_cfb(suite) -> - []; -aes_cfb(Config) when is_list(Config) -> - -%% Sample data from NIST Spec.Publ. 800-38A -%% F.3.13 CFB128-AES128.Encrypt -%% Key 2b7e151628aed2a6abf7158809cf4f3c -%% IV 000102030405060708090a0b0c0d0e0f -%% Segment #1 -%% Input Block 000102030405060708090a0b0c0d0e0f -%% Output Block 50fe67cc996d32b6da0937e99bafec60 -%% Plaintext 6bc1bee22e409f96e93d7e117393172a -%% Ciphertext 3b3fd92eb72dad20333449f8e83cfb4a -%% Segment #2 -%% Input Block 3b3fd92eb72dad20333449f8e83cfb4a -%% Output Block 668bcf60beb005a35354a201dab36bda -%% Plaintext ae2d8a571e03ac9c9eb76fac45af8e51 -%% Ciphertext c8a64537a0b3a93fcde3cdad9f1ce58b -%% Segment #3 -%% Input Block c8a64537a0b3a93fcde3cdad9f1ce58b -%% Output Block 16bd032100975551547b4de89daea630 -%% Plaintext 30c81c46a35ce411e5fbc1191a0a52ef -%% Ciphertext 26751f67a3cbb140b1808cf187a4f4df -%% Segment #4 -%% Input Block 26751f67a3cbb140b1808cf187a4f4df -%% Output Block 36d42170a312871947ef8714799bc5f6 -%% Plaintext f69f2445df4f9b17ad2b417be66c3710 -%% Ciphertext c04b05357c5d1c0eeac4c66f9ff7f2e6 - - ?line Key = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - ?line IVec = hexstr2bin("000102030405060708090a0b0c0d0e0f"), - ?line Plain = hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), - ?line Cipher = hexstr2bin("3b3fd92eb72dad20333449f8e83cfb4a"), - - %% Try all prefixes of plain and cipher. - aes_cfb_do(byte_size(Plain), Plain, Cipher, Key, IVec). - -aes_cfb_do(N, Plain, Cipher, Key, IVec) when N >= 0 -> - <> = Plain, - <> = Cipher, - ?line C = crypto:aes_cfb_128_encrypt(Key, IVec, P), - ?line P = crypto:aes_cfb_128_decrypt(Key, IVec, C), - aes_cfb_do(N-1, Plain, Cipher, Key, IVec); -aes_cfb_do(_, _, _, _, _) -> ok. - - -%% -%% -aes_cbc(doc) -> - "Encrypt and decrypt according to AES CBC 128 bit. and check the result. " - "Example are from NIST SP 800-38A."; - -aes_cbc(suite) -> - []; -aes_cbc(Config) when is_list(Config) -> - -%% Sample data from NIST Spec.Publ. 800-38A -%% F.2.1 CBC-AES128.Encrypt -%% Key 2b7e151628aed2a6abf7158809cf4f3c -%% IV 000102030405060708090a0b0c0d0e0f -%% Block #1 -%% Plaintext 6bc1bee22e409f96e93d7e117393172a -%% Input Block 6bc0bce12a459991e134741a7f9e1925 -%% Output Block 7649abac8119b246cee98e9b12e9197d -%% Ciphertext 7649abac8119b246cee98e9b12e9197d -%% Block #2 -%% Plaintext ae2d8a571e03ac9c9eb76fac45af8e51 -%% Input Block d86421fb9f1a1eda505ee1375746972c -%% Output Block 5086cb9b507219ee95db113a917678b2 -%% Ciphertext 5086cb9b507219ee95db113a917678b2 -%% Block #3 -%% Plaintext 30c81c46a35ce411e5fbc1191a0a52ef -%% Input Block 604ed7ddf32efdff7020d0238b7c2a5d -%% Output Block 73bed6b8e3c1743b7116e69e22229516 -%% Ciphertext 73bed6b8e3c1743b7116e69e22229516 -%% Block #4 -%% Plaintext f69f2445df4f9b17ad2b417be66c3710 -%% Input Block 8521f2fd3c8eef2cdc3da7e5c44ea206 -%% Output Block 3ff1caa1681fac09120eca307586e1a7 -%% Ciphertext 3ff1caa1681fac09120eca307586e1a7 -%% -%% F.2.2 CBC-AES128.Decrypt -%% Key 2b7e151628aed2a6abf7158809cf4f3c -%% IV 000102030405060708090a0b0c0d0e0f - %% Block #1 -%% Ciphertext 7649abac8119b246cee98e9b12e9197d -%% Input Block 7649abac8119b246cee98e9b12e9197d -%% Output Block 6bc0bce12a459991e134741a7f9e1925 -%% Plaintext 6bc1bee22e409f96e93d7e117393172a -%% Block #2 -%% Ciphertext 5086cb9b507219ee95db113a917678b2 -%% Input Block 5086cb9b507219ee95db113a917678b2 -%% Output Block d86421fb9f1a1eda505ee1375746972c -%% Plaintext ae2d8a571e03ac9c9eb76fac45af8e51 -%% Block #3 -%% Ciphertext 73bed6b8e3c1743b7116e69e22229516 -%% Input Block 73bed6b8e3c1743b7116e69e22229516 -%% Output Block 604ed7ddf32efdff7020d0238b7c2a5d -%% Plaintext 30c81c46a35ce411e5fbc1191a0a52ef -%% Block #4 -%% Ciphertext 3ff1caa1681fac09120eca307586e1a7 -%% Input Block 3ff1caa1681fac09120eca307586e1a7 -%% Output Block 8521f2fd3c8eef2cdc3da7e5c44ea206 -%% Plaintext f69f2445df4f9b17ad2b417be66c3710 - - ?line Key = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - ?line IVec = hexstr2bin("000102030405060708090a0b0c0d0e0f"), - ?line Plain = hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), - ?line Cipher = crypto:aes_cbc_128_encrypt(Key, IVec, Plain), - ?line m(Cipher, hexstr2bin("7649abac8119b246cee98e9b12e9197d")), - ?line m(Plain, - crypto:aes_cbc_128_decrypt(Key, IVec, Cipher)). - -aes_cbc_iter(doc) -> - "Encrypt and decrypt according to CBC AES in steps"; -aes_cbc_iter(suite) -> []; -aes_cbc_iter(Config) when is_list(Config) -> - Key = list_to_binary(lists:seq(255,256-16*17,-17)), - IVec = list_to_binary(lists:seq(1,16*7,7)), - Plain = <<"One, two, three o'clock, four o'clock, rock" - "Five, six, seven o'clock, eight o'clock, rock" - "Nine, ten, eleven o'clock, twelve o'clock, rock" - "We're gonna rock around the clock tonight">>, - ?line 0 = size(Plain) rem 16, - - ?line Cipher = crypto:aes_cbc_128_encrypt(Key, IVec, Plain), - ?line Plain = crypto:aes_cbc_128_decrypt(Key, IVec, Cipher), - - ?line Cipher = aes_cbc_encrypt_iter(Key,IVec,Plain,<<>>), - ?line Plain = aes_cbc_decrypt_iter(Key,IVec,Cipher,<<>>), - ok. - -aes_cbc_encrypt_iter(_,_,<<>>, Acc) -> - Acc; -aes_cbc_encrypt_iter(Key,IVec,Data, Acc) -> - Bytes = 16 * (1 + size(Data) div (16*3)), - <> = Data, - %%io:format("encrypt iter Chunk=~p Rest=~p\n",[Chunk,Rest]), - ?line Cipher = crypto:aes_cbc_128_encrypt(Key, IVec, Chunk), - ?line IVec2 = crypto:aes_cbc_ivec(Cipher), - aes_cbc_encrypt_iter(Key,IVec2,Rest, <>). - -aes_cbc_decrypt_iter(_,_,<<>>, Acc) -> - Acc; -aes_cbc_decrypt_iter(Key,IVec,Data, Acc) -> - Bytes = 16 * (1 + size(Data) div (16*5)), - <> = Data, - %%io:format("decrypt iter Chunk=~p Rest=~p\n",[Chunk,Rest]), - ?line Plain = crypto:aes_cbc_128_decrypt(Key, IVec, Chunk), - ?line IVec2 = crypto:aes_cbc_ivec(Chunk), - aes_cbc_decrypt_iter(Key,IVec2,Rest, <>). - - -aes_ctr(doc) -> "CTR"; -aes_ctr(Config) when is_list(Config) -> - %% Sample data from NIST Spec.Publ. 800-38A - %% F.5.1 CTR-AES128.Encrypt - Key128 = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - Samples128 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - "6bc1bee22e409f96e93d7e117393172a", % Plaintext - "874d6191b620e3261bef6864990db6ce"},% Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - "ae2d8a571e03ac9c9eb76fac45af8e51", - "9806f66b7970fdff8617187bb9fffdff"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - "30c81c46a35ce411e5fbc1191a0a52ef", - "5ae4df3edbd5d35e5b4f09020db03eab"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - "f69f2445df4f9b17ad2b417be66c3710", - "1e031dda2fbe03d1792170a0f3009cee"}], - lists:foreach(fun(S) -> aes_ctr_do(Key128,S) end, Samples128), - - %% F.5.3 CTR-AES192.Encrypt - Key192 = hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - Samples192 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - "6bc1bee22e409f96e93d7e117393172a", % Plaintext - "1abc932417521ca24f2b0459fe7e6e0b"},% Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - "ae2d8a571e03ac9c9eb76fac45af8e51", - "090339ec0aa6faefd5ccc2c6f4ce8e94"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - "30c81c46a35ce411e5fbc1191a0a52ef", - "1e36b26bd1ebc670d1bd1d665620abf7"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - "f69f2445df4f9b17ad2b417be66c3710", - "4f78a7f6d29809585a97daec58c6b050"}], - lists:foreach(fun(S) -> aes_ctr_do(Key192,S) end, Samples192), - - %% F.5.5 CTR-AES256.Encrypt - Key256 = hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - Samples256 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - "6bc1bee22e409f96e93d7e117393172a", % Plaintext - "601ec313775789a5b7a7f504bbf3d228"},% Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - "ae2d8a571e03ac9c9eb76fac45af8e51", - "f443e3ca4d62b59aca84e990cacaf5c5"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - "30c81c46a35ce411e5fbc1191a0a52ef", - "2b0930daa23de94ce87017ba2d84988d"}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - "f69f2445df4f9b17ad2b417be66c3710", - "dfc9c58db67aada613c2dd08457941a6"}], - lists:foreach(fun(S) -> aes_ctr_do(Key256,S) end, Samples256). - - -aes_ctr_do(Key,{IVec, Plain, Cipher}) -> - ?line I = hexstr2bin(IVec), - ?line P = hexstr2bin(Plain), - ?line C = crypto:aes_ctr_encrypt(Key, I, P), - ?line m(C, hexstr2bin(Cipher)), - ?line m(P, crypto:aes_ctr_decrypt(Key, I, C)). - -aes_ctr_stream(doc) -> "CTR Streaming"; -aes_ctr_stream(Config) when is_list(Config) -> - %% Sample data from NIST Spec.Publ. 800-38A - %% F.5.1 CTR-AES128.Encrypt - Key128 = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - Samples128 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - ["6bc1bee22e409f", "96e93d7e117393172a"], % Plaintext - ["874d6191b620e3261bef6864990db6ce"]}, % Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - ["ae2d8a57", "1e03ac9c", "9eb76fac", "45af8e51"], - ["9806f66b7970fdff","8617187bb9fffdff"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - ["30c81c46a35c", "e411e5fbc119", "1a0a52ef"], - ["5ae4df3e","dbd5d3","5e5b4f0902","0db03eab"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - ["f69f2445df4f9b17ad2b417be66c3710"], - ["1e031dda2fbe","03d1792170a0","f3009cee"]}], - lists:foreach(fun(S) -> aes_ctr_stream_do(Key128,S) end, Samples128), - - %% F.5.3 CTR-AES192.Encrypt - Key192 = hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - Samples192 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - ["6bc1bee22e409f96e93d7e117393172a"], % Plaintext - ["1abc9324","17521c","a24f2b04","59fe7e6e0b"]}, % Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - ["ae2d8a57", "1e03ac9c9eb76fac", "45af8e51"], - ["090339ec0aa6faefd5ccc2c6f4ce8e94"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - ["30c81c46a35ce411", "e5fbc1191a0a52ef"], - ["1e36b26bd1","ebc670d1bd1d","665620abf7"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - ["f69f2445", "df4f9b17ad", "2b417be6", "6c3710"], - ["4f78a7f6d2980958","5a97daec58c6b050"]}], - lists:foreach(fun(S) -> aes_ctr_stream_do(Key192,S) end, Samples192), - - %% F.5.5 CTR-AES256.Encrypt - Key256 = hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - Samples256 = [{"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", % Input Block - ["6bc1bee22e409f96", "e93d7e117393172a"], % Plaintext - ["601ec313775789", "a5b7a7f504bbf3d228"]}, % Ciphertext - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff00", - ["ae2d8a571e03ac9c9eb76fac45af8e51"], - ["f443e3ca","4d62b59aca84","e990cacaf5c5"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff01", - ["30c81c46","a35ce411","e5fbc119","1a0a52ef"], - ["2b0930daa23de94ce87017ba2d84988d"]}, - {"f0f1f2f3f4f5f6f7f8f9fafbfcfdff02", - ["f69f2445df4f","9b17ad2b41","7be66c3710"], - ["dfc9c5","8db67aada6","13c2dd08","457941a6"]}], - lists:foreach(fun(S) -> aes_ctr_stream_do(Key256,S) end, Samples256). - - -aes_ctr_stream_do(Key,{IVec, PlainList, CipherList}) -> - ?line I = hexstr2bin(IVec), - ?line S = crypto:aes_ctr_stream_init(Key, I), - ?line C = aes_ctr_stream_do_iter( - S, PlainList, [], - fun(S2,P) -> crypto:aes_ctr_stream_encrypt(S2, P) end), - ?line m(C, hexstr2bin(lists:flatten(CipherList))), - ?line P = aes_ctr_stream_do_iter( - S, CipherList, [], - fun(S2,C2) -> crypto:aes_ctr_stream_decrypt(S2, C2) end), - ?line m(P, hexstr2bin(lists:flatten(PlainList))). - -aes_ctr_stream_do_iter(_State, [], Acc, _CipherFun) -> - iolist_to_binary(lists:reverse(Acc)); -aes_ctr_stream_do_iter(State, [Plain|Rest], Acc, CipherFun) -> - ?line P = hexstr2bin(Plain), - ?line {S2, C} = CipherFun(State, P), - aes_ctr_stream_do_iter(S2, Rest, [C | Acc], CipherFun). - -%% -%% -mod_exp_test(doc) -> - "mod_exp testing (A ^ M % P with bignums)"; -mod_exp_test(suite) -> - []; -mod_exp_test(Config) when is_list(Config) -> - mod_exp_aux_test(2, 5, 10, 8). - -mod_exp_aux_test(_, _, _, 0) -> - ok; -mod_exp_aux_test(B, E, M, N) -> - ?line R1 = crypto:mod_exp(B, E, M), - ?line R2 = ipow(B, E, M), - ?line m(R1, R2), - ?line mod_exp_aux_test(B, E*E+1, M*M+1, N-1). - -%% -%% -rand_uniform_test(doc) -> - "rand_uniform and random_bytes testing"; -rand_uniform_test(suite) -> - []; -rand_uniform_test(Config) when is_list(Config) -> - rand_uniform_aux_test(10), - ?line 10 = size(crypto:rand_bytes(10)). - -rand_uniform_aux_test(0) -> - ok; -rand_uniform_aux_test(N) -> - ?line L = N*1000, - ?line H = N*100000+1, - ?line crypto_rand_uniform(L, H), - ?line crypto_rand_uniform(-L, L), - ?line crypto_rand_uniform(-H, -L), - ?line crypto_rand_uniform(-H, L), - ?line rand_uniform_aux_test(N-1). - -crypto_rand_uniform(L,H) -> - ?line R1 = crypto:rand_uniform(L, H), - ?line t(R1 >= L), - ?line t(R1 < H). - - -%% -%% -strong_rand_test(doc) -> - "strong_rand_mpint and strong_random_bytes testing"; -strong_rand_test(suite) -> - []; -strong_rand_test(Config) when is_list(Config) -> - strong_rand_aux_test(180), - ?line 10 = byte_size(crypto:strong_rand_bytes(10)). - -strong_rand_aux_test(0) -> - ?line t(crypto:strong_rand_mpint(0,0,0) =:= <<0,0,0,0>>), - ok; -strong_rand_aux_test(1) -> - ?line t(crypto:erlint(crypto:strong_rand_mpint(1,0,1)) =:= 1), - ?line strong_rand_aux_test(0); -strong_rand_aux_test(N) -> - ?line t(sru_length(crypto:strong_rand_mpint(N,-1,0)) =< N), - ?line t(sru_length(crypto:strong_rand_mpint(N,0,0)) =:= N), - ?line t(crypto:erlint(crypto:strong_rand_mpint(N,0,1)) band 1 =:= 1), - ?line t(crypto:erlint(crypto:strong_rand_mpint(N,1,0)) bsr (N - 2) =:= 2#11), - ?line strong_rand_aux_test(N-1). - -sru_length(Mpint) -> - I = crypto:erlint(Mpint), - length(erlang:integer_to_list(I, 2)). - -%% -%% -%% -%% -rsa_verify_test(doc) -> - "rsa_verify testing (A ^ M % P with bignums)"; -rsa_verify_test(suite) -> - []; -rsa_verify_test(Config) when is_list(Config) -> - ?line H = <<178,28,54,104,36,80,144,66,140,201,135,17,36,97,114,124, - 194,164,172,147>>, - ?line SigBlob = <<153,44,121,71,132,1,192,159,78,33,29,62,153,64,191,70, - 208,239,166,208,220,167,49,111,128,67,91,253,24,63,194,241, - 97,157,135,226,121,162,150,156,60,49,236,90,151,67,239,23, - 92,103,89,254,17,165,78,181,64,128,13,210,86,111,209,76, - 115,34,107,227,151,47,80,185,143,85,202,55,245,163,226,26, - 139,104,196,6,96,82,108,197,13,0,12,70,153,109,107,180, - 130,246,156,182,56,96,31,220,227,218,136,211,252,43,8,14, - 145,155,191,206,72,194,80,52,54,206,53,27,6,188,195,29>>, - ?line BadSigBlob = <<153,44,121,71,132,1,192,159,78,33,29,62,153,64,191,70, - 208,239,166,208,220,167,49,111,128,67,91,253,24,63,194,241, - 97,157,135,226,121,162,150,156,60,49,236,90,151,67,239,23, - 92,103,89,254,17,165,78,181,64,128,13,210,86,111,209,76, - 115,107,34,227,151,47,80,185,143,85,202,55,245,163,226,26, - 139,104,196,6,96,82,108,197,13,0,12,70,153,109,107,180, - 130,246,156,182,56,96,31,220,227,218,136,211,252,43,8,14, - 145,155,191,206,72,194,80,52,54,206,53,27,6,188,195,29>>, - ?line E = <<35>>, - ?line N = <<0,199,209,142,191,86,92,148,103,37,250,217,175,169,109,10, - 130,139,34,237,174,90,97,118,7,185,57,137,252,236,177,193, - 228,16,62,29,153,144,64,207,152,240,152,206,136,89,64,6, - 3,187,89,57,241,219,88,215,75,70,120,20,145,229,37,1, - 67,138,204,17,39,231,249,239,116,142,169,99,149,41,65,123, - 26,225,133,0,41,85,77,181,35,100,162,223,92,220,207,50, - 63,168,193,171,174,199,23,214,201,63,157,76,125,6,54,73, - 76,89,40,33,147,208,189,76,98,24,61,8,10,110,165,119,165>>, - ?line Nbad = <<0,199,209,142,191,86,92,148,103,37,250,217,175,169,109,10, - 130,139,34,237,174,90,97,118,7,185,57,137,252,236,177,193, - 228,16,62,29,153,144,64,207,152,240,152,206,136,89,64,6, - 3,187,89,57,241,219,88,215,75,70,120,20,145,229,37,1, - 67,138,204,17,39,231,249,239,116,142,169,99,149,41,65,123, - 26,225,133,0,41,85,77,181,35,100,162,223,92,220,207,50, - 63,168,193,171,174,199,23,214,201,63,157,76,125,6,54,73, - 76,89,40,33,147,189,208,76,98,24,61,8,10,110,165,119,165>>, - ?line Ebad = <<77>>, - ?line m(crypto:rsa_verify(sized_binary(H), sized_binary(SigBlob), - [sized_binary(E), sized_binary(N)]), true), - ?line m(crypto:rsa_verify(sized_binary(H), sized_binary(SigBlob), - [sized_binary(Ebad), sized_binary(N)]), false), - ?line m(crypto:rsa_verify(sized_binary(H), sized_binary(SigBlob), - [sized_binary(E), sized_binary(Nbad)]), false), - ?line m(crypto:rsa_verify(sized_binary(H), sized_binary(BadSigBlob), - [sized_binary(E), sized_binary(N)]), false). - -%% -%% -dsa_verify_test(doc) -> - "dsa_verify testing (A ^ M % P with bignums)"; -dsa_verify_test(suite) -> - []; -dsa_verify_test(Config) when is_list(Config) -> - ?line Msg = <<48,130,2,245,160,3,2,1,2,2,1,1,48,9,6,7,42,134,72,206,56,4,3,48, - 58,49,11,48,9,6,3,85,4,6,19,2,85,83,49,26,48,24,6,3,85,4,10,19,17, - 84,101,115,116,32,67,101,114,116,105,102,105,99,97,116,101,115,49, - 15,48,13,6,3,85,4,3,19,6,68,83,65,32,67,65,48,30,23,13,48,49,48, - 52,49,57,49,52,53,55,50,48,90,23,13,49,49,48,52,49,57,49,52,53,55, - 50,48,90,48,93,49,11,48,9,6,3,85,4,6,19,2,85,83,49,26,48,24,6,3, - 85,4,10,19,17,84,101,115,116,32,67,101,114,116,105,102,105,99,97, - 116,101,115,49,50,48,48,6,3,85,4,3,19,41,86,97,108,105,100,32,68, - 83,65,32,83,105,103,110,97,116,117,114,101,115,32,69,69,32,67,101, - 114,116,105,102,105,99,97,116,101,32,84,101,115,116,52,48,130,1, - 182,48,130,1,43,6,7,42,134,72,206,56,4,1,48,130,1,30,2,129,129,0, - 228,139,175,64,140,21,215,61,124,238,3,150,18,104,193,32,5,232,23, - 202,158,116,101,75,154,84,151,42,120,51,218,165,197,114,234,52, - 179,148,104,66,213,27,253,119,240,168,66,158,100,147,144,182,194, - 2,49,70,19,122,3,105,204,152,45,86,157,94,35,95,40,191,173,127,15, - 208,105,149,98,92,26,7,42,94,140,115,73,126,253,18,34,142,85,229, - 86,233,174,114,41,150,135,8,39,215,119,67,240,134,184,9,10,27,20, - 165,230,3,230,69,121,77,233,250,83,95,193,9,189,126,197,195,2,21, - 0,128,63,228,252,243,76,229,62,203,15,23,10,42,84,108,208,103,108, - 13,59,2,129,128,102,212,22,138,32,173,254,209,50,159,165,127,167, - 179,208,234,119,63,235,108,162,228,41,216,216,188,33,221,154,247, - 204,229,180,119,77,223,236,218,162,140,156,117,18,90,31,254,102, - 211,17,194,239,132,67,236,169,136,110,76,186,76,63,53,150,199,103, - 252,153,189,15,153,41,19,145,78,216,2,174,254,107,175,80,86,170, - 47,30,181,42,200,238,34,71,37,120,107,33,221,20,63,206,240,16,129, - 247,150,29,156,65,187,94,68,146,93,46,198,30,184,205,105,200,143, - 63,59,62,208,79,162,206,217,3,129,132,0,2,129,128,15,83,40,172,56, - 47,61,243,17,97,65,195,61,167,214,122,247,246,1,50,211,33,113,16, - 20,213,195,62,77,235,25,162,140,175,158,8,61,65,10,255,204,162,71, - 130,122,86,161,163,253,236,178,139,183,57,181,202,160,25,133,130, - 155,150,104,168,187,107,186,144,164,225,173,101,182,68,49,210,30, - 34,47,83,65,79,250,156,248,47,232,44,67,36,22,126,43,216,100,247, - 100,250,240,121,72,29,185,2,109,144,54,204,235,54,15,242,57,171, - 125,39,236,247,71,111,221,51,196,126,77,238,36,87,163,107,48,105, - 48,29,6,3,85,29,14,4,22,4,20,179,51,215,81,162,4,13,68,251,157,64, - 241,18,98,113,176,83,246,105,13,48,31,6,3,85,29,35,4,24,48,22,128, - 20,116,21,213,36,28,189,94,101,136,31,225,139,9,126,127,234,25,72, - 78,97,48,23,6,3,85,29,32,4,16,48,14,48,12,6,10,96,134,72,1,101,3, - 2,1,48,1,48,14,6,3,85,29,15,1,1,255,4,4,3,2,6,192>>, - - ?line SigBlob = <<48,45,2,21,0,140,167,200,210,153,212,64,155,249,33,146,104,243, - 39,38,9,115,162,89,24,2,20,76,254,31,128,187,48,128,215,216, - 112,198,78,118,160,217,157,180,246,64,234>>, - ?line P_p = 157224271412839155721795253728878055347359513988016145491388196653004661857517720927482198111104095793441029858267073789634147217022008635826863307553453131345099940951090826856271796188522037524757740796268675508118348391218066949174594918958269259937813776150149068811425194955973128428675945283593831134219, - ?line Q_p = 1181895316321540581845959276009400765315408342791, - ?line G_p = 143872196713149000950547166575757355261637863805587906227228163275557375159769599033632918292482002186641475268486598023281100659643528846513898847919251032731261718358900479488287933293278745715922865499005559197328388506945134386346185262919258658109015074718441639029135304654725637911172671711310801418648, - - ?line Key = 12603618348903387232593303690286336220738319446775939686476278478034365380027994899970214309288018488811754534229198764622077544117034174589418477472887827980332636062691833965078594576024299807057520016043084384987871640003684704483975314128362610573625803532737054022545217931847268776098203204571431581966, - - ValidKey = [crypto:mpint(P_p), - crypto:mpint(Q_p), - crypto:mpint(G_p), - crypto:mpint(Key) - ], - - ?line m(my_dss_verify(sized_binary(Msg), sized_binary(SigBlob), - ValidKey), true), - - BadMsg = one_bit_wrong(Msg), - ?line m(my_dss_verify(sized_binary(BadMsg), sized_binary(SigBlob), - ValidKey), false), - BadSig = one_bit_wrong(SigBlob), - ?line m(my_dss_verify(sized_binary(Msg), sized_binary(BadSig), - ValidKey), false), - SizeErr = size(SigBlob) - 13, - - BadArg = (catch my_dss_verify(sized_binary(Msg), <>, - ValidKey)), - badarg = case element(1,element(2,BadArg)) of - badarg -> badarg; - function_clause -> badarg; - X -> X - end, - InValidKey = [crypto:mpint(P_p), - crypto:mpint(Q_p), - crypto:mpint(G_p), - crypto:mpint(Key+17) - ], - - ?line m(my_dss_verify(sized_binary(Msg), sized_binary(SigBlob), - InValidKey), false). - - -one_bit_wrong(List) when is_list(List) -> - lists:map(fun(Bin) -> one_bit_wrong(Bin) end, List); -one_bit_wrong(Bin) -> - Half = size(Bin) div 2, - <> = Bin, - <>. - - -%% -%% Sign tests - -rsa_sign_test(doc) -> - "rsa_sign testing"; -rsa_sign_test(suite) -> - []; -rsa_sign_test(Config) when is_list(Config) -> - PubEx = 65537, - PrivEx = 7531712708607620783801185371644749935066152052780368689827275932079815492940396744378735701395659435842364793962992309884847527234216715366607660219930945, - Mod = 7919488123861148172698919999061127847747888703039837999377650217570191053151807772962118671509138346758471459464133273114654252861270845708312601272799123, - Msg = <<"7896345786348756234 Hejsan Svejsan, erlang crypto debugger" - "09812312908312378623487263487623412039812 huagasd">>, - - PrivKey = [PubEx, Mod, PrivEx], - PubKey = [PubEx, Mod], - PubKeyMpint = map_int_to_mpint(PubKey), - Sig1 = crypto:rsa_sign(sized_binary(Msg), map_int_to_mpint(PrivKey)), - Sig1 = crypto:sign(rsa, sha, Msg, PrivKey), - true = crypto:rsa_verify(sized_binary(Msg), sized_binary(Sig1), PubKeyMpint), - true = crypto:verify(rsa, sha, Msg, Sig1, PubKey), - - Sig2 = crypto:rsa_sign(md5, sized_binary(Msg), map_int_to_mpint(PrivKey)), - Sig2 = crypto:sign(rsa, md5, Msg, PrivKey), - true = crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig2), PubKeyMpint), - true = crypto:verify(rsa, md5, Msg, Sig2, PubKey), - - false = (Sig1 =:= Sig2), - false = crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig1), PubKeyMpint), - false = crypto:verify(rsa, md5, Msg, Sig1, PubKey), - true = crypto:rsa_verify(sha, sized_binary(Msg), sized_binary(Sig1), PubKeyMpint), - true = crypto:verify(rsa, sha, Msg, Sig1, PubKey), - - ok. -map_int_to_mpint(List) -> - lists:map(fun(E) -> crypto:mpint(E) end, List). - -rsa_sign_hash_test(doc) -> - "rsa_sign_hash testing"; -rsa_sign_hash_test(suite) -> - []; -rsa_sign_hash_test(Config) when is_list(Config) -> - PubEx = 65537, - PrivEx = 7531712708607620783801185371644749935066152052780368689827275932079815492940396744378735701395659435842364793962992309884847527234216715366607660219930945, - Mod = 7919488123861148172698919999061127847747888703039837999377650217570191053151807772962118671509138346758471459464133273114654252861270845708312601272799123, - Msg = <<"7896345786348756234 Hejsan Svejsan, erlang crypto debugger" - "09812312908312378623487263487623412039812 huagasd">>, - - PrivKey = [crypto:mpint(PubEx), crypto:mpint(Mod), crypto:mpint(PrivEx)], - PubKey = [crypto:mpint(PubEx), crypto:mpint(Mod)], - MD5 = crypto:md5(sized_binary(Msg)), - SHA = crypto:sha(sized_binary(Msg)), - ?line Sig1 = crypto:rsa_sign(sha, {digest,SHA}, PrivKey), - ?line m(crypto:rsa_verify(sha, {digest,SHA}, sized_binary(Sig1),PubKey), true), - - ?line Sig2 = crypto:rsa_sign(md5, {digest,MD5}, PrivKey), - ?line m(crypto:rsa_verify(md5, {digest,MD5}, sized_binary(Sig2),PubKey), true), - - ?line m(Sig1 =:= Sig2, false), - ?line m(crypto:rsa_verify(md5, {digest,MD5}, sized_binary(Sig1),PubKey), false), - ?line m(crypto:rsa_verify(sha, {digest,SHA}, sized_binary(Sig2),PubKey), false), - - ok. - -dsa_sign_test(doc) -> - "dsa_sign testing"; -dsa_sign_test(suite) -> - []; -dsa_sign_test(Config) when is_list(Config) -> - Msg = <<"7896345786348756234 Hejsan Svejsan, erlang crypto debugger" - "09812312908312378623487263487623412039812 huagasd">>, - - PubKey = _Y = 25854665488880835237281628794585130313500176551981812527054397586638455298000483144002221850980183404910190346416063318160497344811383498859129095184158800144312512447497510551471331451396405348497845813002058423110442376886564659959543650802132345311573634832461635601376738282831340827591903548964194832978, - PrivKey = _X = 441502407453038284293378221372000880210588566361, - ParamP = 109799869232806890760655301608454668257695818999841877165019612946154359052535682480084145133201304812979481136659521529774182959764860329095546511521488413513097576425638476458000255392402120367876345280670101492199681798674053929238558140260669578407351853803102625390950534052428162468100618240968893110797, - ParamQ = 1349199015905534965792122312016505075413456283393, - ParamG = 18320614775012672475365915366944922415598782131828709277168615511695849821411624805195787607930033958243224786899641459701930253094446221381818858674389863050420226114787005820357372837321561754462061849169568607689530279303056075793886577588606958623645901271866346406773590024901668622321064384483571751669, - - Params = [crypto:mpint(ParamP), crypto:mpint(ParamQ), crypto:mpint(ParamG)], - ?line Sig1 = my_dss_sign(sized_binary(Msg), Params ++ [crypto:mpint(PrivKey)]), - - ?line m(my_dss_verify(sized_binary(Msg), Sig1, - Params ++ [crypto:mpint(PubKey)]), true), - - ?line m(my_dss_verify(sized_binary(one_bit_wrong(Msg)), Sig1, - Params ++ [crypto:mpint(PubKey)]), false), - - ?line m(my_dss_verify(sized_binary(Msg), one_bit_wrong(Sig1), - Params ++ [crypto:mpint(PubKey)]), false), - - %%?line Bad = crypto:dss_sign(sized_binary(Msg), [Params, crypto:mpint(PubKey)]), - - ok. - -dsa_sign_hash_test(doc) -> - "dsa_sign_hash testing"; -dsa_sign_hash_test(suite) -> - []; -dsa_sign_hash_test(Config) when is_list(Config) -> - Msg = <<"7896345786348756234 Hejsan Svejsan, erlang crypto debugger" - "09812312908312378623487263487623412039812 huagasd">>, - SHA = crypto:sha(sized_binary(Msg)), - - PubKey = _Y = 25854665488880835237281628794585130313500176551981812527054397586638455298000483144002221850980183404910190346416063318160497344811383498859129095184158800144312512447497510551471331451396405348497845813002058423110442376886564659959543650802132345311573634832461635601376738282831340827591903548964194832978, - PrivKey = _X = 441502407453038284293378221372000880210588566361, - ParamP = 109799869232806890760655301608454668257695818999841877165019612946154359052535682480084145133201304812979481136659521529774182959764860329095546511521488413513097576425638476458000255392402120367876345280670101492199681798674053929238558140260669578407351853803102625390950534052428162468100618240968893110797, - ParamQ = 1349199015905534965792122312016505075413456283393, - ParamG = 18320614775012672475365915366944922415598782131828709277168615511695849821411624805195787607930033958243224786899641459701930253094446221381818858674389863050420226114787005820357372837321561754462061849169568607689530279303056075793886577588606958623645901271866346406773590024901668622321064384483571751669, - - Params = [crypto:mpint(ParamP), crypto:mpint(ParamQ), crypto:mpint(ParamG)], - ?line Sig1 = crypto:dss_sign(sha, {digest,SHA}, Params ++ [crypto:mpint(PrivKey)]), - - ?line m(crypto:dss_verify(none, SHA, sized_binary(Sig1), - Params ++ [crypto:mpint(PubKey)]), true), - - ?line m(crypto:dss_verify(sized_binary(one_bit_wrong(Msg)), sized_binary(Sig1), - Params ++ [crypto:mpint(PubKey)]), false), - - ?line m(crypto:dss_verify(sized_binary(Msg), sized_binary(one_bit_wrong(Sig1)), - Params ++ [crypto:mpint(PubKey)]), false), - - %%?line Bad = crypto:dss_sign(sized_binary(Msg), [Params, crypto:mpint(PubKey)]), - - ok. - - -rsa_encrypt_decrypt(doc) -> - ["Test rsa_public_encrypt and rsa_private_decrypt functions."]; -rsa_encrypt_decrypt(suite) -> []; -rsa_encrypt_decrypt(Config) when is_list(Config) -> - PubEx = 65537, - PrivEx = 7531712708607620783801185371644749935066152052780368689827275932079815492940396744378735701395659435842364793962992309884847527234216715366607660219930945, - Mod = 7919488123861148172698919999061127847747888703039837999377650217570191053151807772962118671509138346758471459464133273114654252861270845708312601272799123, - - PrivKey = [PubEx, Mod, PrivEx], - PubKey = [PubEx, Mod], - - Msg = <<"7896345786348 Asldi">>, - - ?line PKCS1 = rsa_public_encrypt(Msg, PubKey, rsa_pkcs1_padding), - ?line PKCS1Dec = rsa_private_decrypt(PKCS1, PrivKey, rsa_pkcs1_padding), - io:format("PKCS1Dec ~p~n",[PKCS1Dec]), - ?line Msg = PKCS1Dec, - - ?line OAEP = rsa_public_encrypt(Msg, PubKey, rsa_pkcs1_oaep_padding), - ?line Msg = rsa_private_decrypt(OAEP, PrivKey, rsa_pkcs1_oaep_padding), - - <> = crypto:mpint(Mod), - Msg2 = list_to_binary(lists:duplicate(Msg2Len-1, $X)), - ?line NoPad = rsa_public_encrypt(Msg2, PubKey, rsa_no_padding), - ?line NoPadDec = rsa_private_decrypt(NoPad, PrivKey, rsa_no_padding), - ?line NoPadDec = Msg2, - - ShouldBeError = (catch rsa_public_encrypt(Msg, PubKey, rsa_no_padding)), - ?line {'EXIT', {encrypt_failed,_}} = ShouldBeError, - -%% ?line SSL = rsa_public_encrypt(Msg, PubKey, rsa_sslv23_padding), -%% ?line Msg = rsa_private_decrypt(SSL, PrivKey, rsa_sslv23_padding), - - ?line PKCS1_2 = rsa_private_encrypt(Msg, PrivKey, rsa_pkcs1_padding), - ?line PKCS1_2Dec = rsa_public_decrypt(PKCS1_2, PubKey, rsa_pkcs1_padding), - io:format("PKCS2Dec ~p~n",[PKCS1_2Dec]), - ?line Msg = PKCS1_2Dec, - - ?line PKCS1_3 = rsa_private_encrypt(Msg2, PrivKey, rsa_no_padding), - ?line PKCS1_3Dec = rsa_public_decrypt(PKCS1_3, PubKey, rsa_no_padding), - io:format("PKCS2Dec ~p~n",[PKCS1_3Dec]), - ?line Msg2 = PKCS1_3Dec, - - ?line {'EXIT', {encrypt_failed,_}} = - (catch rsa_private_encrypt(Msg, PrivKey, rsa_no_padding)), - - ok. - -rsa_public_encrypt(Msg, Key, Pad) -> - C1 = crypto:rsa_public_encrypt(Msg, Key, Pad), - C2 = crypto:rsa_public_encrypt(Msg, lists:map(fun(E) -> crypto:mpint(E) end, Key), Pad), - {C1,C2}. - -rsa_public_decrypt(Msg, Key, Pad) -> - R = crypto:rsa_public_decrypt(Msg, Key, Pad), - R = crypto:rsa_public_decrypt(Msg, lists:map(fun(E) -> crypto:mpint(E) end, Key), Pad). - -rsa_private_encrypt(Msg, Key, Pad) -> - R = crypto:rsa_private_encrypt(Msg, Key, Pad), - R = crypto:rsa_private_encrypt(Msg, lists:map(fun(E) -> crypto:mpint(E) end, Key), Pad). - -rsa_private_decrypt({C1,C2}, Key, Pad) -> - R = crypto:rsa_private_decrypt(C1, Key, Pad), - R = crypto:rsa_private_decrypt(C2, Key, Pad), - R = crypto:rsa_private_decrypt(C1, lists:map(fun(E) -> crypto:mpint(E) end, Key), Pad), - R = crypto:rsa_private_decrypt(C2, lists:map(fun(E) -> crypto:mpint(E) end, Key), Pad). - - -dh(doc) -> - ["Test dh (Diffie-Hellman) functions."]; -dh(suite) -> []; -dh(Config) when is_list(Config) -> - Self = self(), - GenP = fun() -> - %% Gen Param may take arbitrary long time to finish - %% That's not a bug in erlang crypto application. - ?line DHPs = crypto:dh_generate_parameters(512,2), - ?line ok = crypto:dh_check(DHPs), - Self ! {param, DHPs} - end, - Pid = spawn(GenP), - receive - {param, DHPs} -> - timer:sleep(100), - io:format("DHP ~p~n", [DHPs]), - DHPs_mpint = lists:map(fun(E) -> sized_binary(E) end, DHPs), - ?line {Pub1,Priv1} = crypto:generate_key(dh, DHPs), - io:format("Key1:~n~p~n~p~n~n", [Pub1,Priv1]), - ?line {Pub2,Priv2} = crypto:dh_generate_key(DHPs_mpint), - io:format("Key2:~n~p~n~p~n~n", [Pub2,Priv2]), - ?line A = crypto:compute_key(dh, Pub1, unsized_binary(Priv2), DHPs), - ?line A = crypto:dh_compute_key(sized_binary(Pub1), Priv2, DHPs_mpint), - timer:sleep(100), %% Get another thread see if that triggers problem - ?line B = crypto:compute_key(dh, unsized_binary(Pub2), Priv1, DHPs), - ?line B = crypto:dh_compute_key(Pub2, sized_binary(Priv1), DHPs_mpint), - io:format("A ~p~n",[A]), - io:format("B ~p~n",[B]), - ?line A = B - after 50000 -> - io:format("Killing Param generation which took to long ~p~n",[Pid]), - exit(Pid, kill) - end. - - -ec(doc) -> - ["Test ec (Ecliptic Curve) functions."]; -ec(suite) -> []; -ec(Config) when is_list(Config) -> - if_supported(ecdh, fun() -> ec_do() end). - -ec_do() -> - %% test for a name curve - NamedCurve = hd(crypto:ec_curves()), - {D2_pub, D2_priv} = crypto:generate_key(ecdh, NamedCurve), - PrivECDH = [D2_priv, NamedCurve], - PubECDH = [D2_pub, NamedCurve], - %%TODO: find a published test case for a EC key - - Msg = <<99,234,6,64,190,237,201,99,80,248,58,40,70,45,149,218,5,246,242,63>>, - Sign = crypto:sign(ecdsa, sha, Msg, PrivECDH), - ?line true = crypto:verify(ecdsa, sha, Msg, Sign, PubECDH), - ?line false = crypto:verify(ecdsa, sha, Msg, <<10,20>>, PubECDH), - - ok. - -srp3(doc) -> - ["SRP-3 test vectors generated by http://srp.stanford.edu/demo/demo.html"]; -srp3(suite) -> []; -srp3(Config) when is_list(Config) -> - Username = <<"alice">>, - Password = <<"password123">>, - Salt = hexstr2bin("2857827A19266A1F2BC6"), - Prime = hexstr2bin("EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C" - "9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE4" - "8E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B29" - "7BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9A" - "FD5138FE8376435B9FC61D2FC0EB06E3"), - Generator = <<2>>, - Version = '3', - Scrambler = hexstr2bin("02E2476A"), - - %% X = hexstr2bin("96E54AB0CD4C5123EDCFA4A1502918AAD3C9E2A8"), - Verifier = hexstr2bin("96EB5F13621D911AA1CA405DE9C64217D4108EEEECAFFE500034FE0E" - "C031E42C8714667C161BCE0E7996F7DDE1B63824C130D2D7286C08C0" - "49758420735961347112AE102A3F23B3F687F8FEE0DF2BFAF933C608" - "D6FE5B5EEE3116FE54016E065BF8E8C9FDBBC08719231AC215149140" - "519E8FDD9AA4F410C28A58AF42974D2D"), - ClientPrivate = hexstr2bin("6411DE75538BED8170677D577D0608F39112BC95B503C447EB6AC945" - "49C75C7B"), - ServerPrivate = hexstr2bin("85E44A6F694DBE676145DB245A045CD37C99F05C562C7840A31F270D" - "9AADCF8B"), - ClientPublic = hexstr2bin("B22B1FFA2244B8CB94F3A9080F419CAEAB0DBA93EA1965B5E84587EE" - "55C79E7A118865DC59B9D0353362C2A8261E7C1B0D221A0E233C2AD1" - "640DACBB8664CBC9733EAC392DA7800142860380C3FC573C3C064329" - "CF54063FD114C7210E9CB3A611EA8002B1844B698F930D95D143899B" - "948A090E0C25938E5F84067D1883DC63"), - ServerPublic = hexstr2bin("93A8C4D8B7F7395ADCFD4ABA37B015124513D3F37B3E85EB23064BE5" - "F53C0AE32FFB9D8C0AA0DCFFA74D632DD67DEBB5C35AAE9812286CC8" - "C43CC176ECBC6D3F447594D9554E995B2509127BF88FADDDA4982D03" - "8EC3001320712D3B1269308CE70F319B2295FA57674F03A2D993CFB1" - "F84C35B7D0C012FA73CD4C8F7D5A71C7"), - - SessionKey = hexstr2bin("C29A986C4D521BBC66428ED11D994CD7431574A6184B83CDCC345092" - "791E75748A1D38CAC4BD14760F0D2694B711236419240FF2F172454C" - "46ABF4FF39498DAFDD2C82924F7D7BD76CDFCE688C77D93F18A65409" - "9176A9192615DC0277AE7C12F1F6A7F6563FCA11675D809AF578BDE5" - "2B51E05D440B63099A017A0B45044801"), - UserPassHash = crypto:sha([Salt, crypto:sha([Username, <<$:>>, Password])]), - Verifier = crypto:mod_pow(Generator, UserPassHash, Prime), - ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime), - - {ClientPublic, ClientPrivate} = crypto:generate_key(srp, {user, [Generator, Prime, Version]}, ClientPrivate), - {ServerPublic, ServerPrivate} = crypto:generate_key(srp, {host, [Verifier, Generator, Prime, Version]}, ServerPrivate), - SessionKey = crypto:compute_key(srp, ServerPublic, {ClientPublic, ClientPrivate}, - {user, [UserPassHash, Prime, Generator, Version, Scrambler]}), - SessionKey = crypto:compute_key(srp, ClientPublic, {ServerPublic, ServerPrivate}, - {host, [Verifier, Prime, Version, Scrambler]}). - -srp6(doc) -> - ["SRP-6 test vectors generated by http://srp.stanford.edu/demo/demo.html"]; -srp6(suite) -> []; -srp6(Config) when is_list(Config) -> - Username = <<"alice">>, - Password = <<"password123">>, - Salt = hexstr2bin("2857827A19266A1F2BC6"), - Prime = hexstr2bin("EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C" - "9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE4" - "8E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B29" - "7BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9A" - "FD5138FE8376435B9FC61D2FC0EB06E3"), - Generator = <<2>>, - Version = '6', - Scrambler = hexstr2bin("0A2534C0BF52A0DA9001EEC62CF2A546AB0908A7"), - Verifier = hexstr2bin("96EB5F13621D911AA1CA405DE9C64217D4108EEEECAFFE500034FE0E" - "C031E42C8714667C161BCE0E7996F7DDE1B63824C130D2D7286C08C0" - "49758420735961347112AE102A3F23B3F687F8FEE0DF2BFAF933C608" - "D6FE5B5EEE3116FE54016E065BF8E8C9FDBBC08719231AC215149140" - "519E8FDD9AA4F410C28A58AF42974D2D"), - ClientPrivate = hexstr2bin("6411DE75538BED8170677D577D0608F39112BC95B503C447EB6AC945" - "49C75C7B"), - ServerPrivate = hexstr2bin("85E44A6F694DBE676145DB245A045CD37C99F05C562C7840A31F270D" - "9AADCF8B"), - ClientPublic = hexstr2bin("B22B1FFA2244B8CB94F3A9080F419CAEAB0DBA93EA1965B5E84587EE" - "55C79E7A118865DC59B9D0353362C2A8261E7C1B0D221A0E233C2AD1" - "640DACBB8664CBC9733EAC392DA7800142860380C3FC573C3C064329" - "CF54063FD114C7210E9CB3A611EA8002B1844B698F930D95D143899B" - "948A090E0C25938E5F84067D1883DC63"), - ServerPublic = hexstr2bin("D2D07845CE7ECDB9845DD36B10ACD3598CC29049DE9F467F84CE16B6" - "D97A6DC567AF8B0F9FEDF74962400AD5C357951E64E67B641246F264" - "C8DE6D9A72E554D6C8D3194548780A0C438A0FCC509CA88A14AA1DEB" - "C0F09E4B37A965D1545DB4AD361346F3189B0EA569C06D326C4E4797" - "9E381C748293B7C0591BE0BE419E053E"), - - SessionKey = hexstr2bin("19D22C19612874EBF1F2581F8EFCFDC44C6FDA3B87B0A73823D7E962" - "554295D4E48D3A336523ADBDDD0EC8FB0F02687109E97E01C17C93CC" - "7216F9CD8A4AC39F0429857D8D1023066614BDFCBCB89F59A0FEB81C" - "72E992AAD89095A84B6A5FADA152369AB1E350A03693BEF044DF3EDF" - "0C34741F4696C30E9F675D09F58ACBEB"), - UserPassHash = crypto:sha([Salt, crypto:sha([Username, <<$:>>, Password])]), - Verifier = crypto:mod_pow(Generator, UserPassHash, Prime), - ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime), - - {ClientPublic, ClientPrivate} = crypto:generate_key(srp, {user, [Generator, Prime, Version]}, ClientPrivate), - {ServerPublic, ServerPrivate} = crypto:generate_key(srp, {host, [Verifier, Generator, Prime, Version]}, ServerPrivate), - SessionKey = crypto:compute_key(srp, ServerPublic, {ClientPublic, ClientPrivate}, - {user, [UserPassHash, Prime, Generator, Version, Scrambler]}), - SessionKey = crypto:compute_key(srp, ClientPublic, {ServerPublic, ServerPrivate}, - {host, [Verifier, Prime, Version, Scrambler]}). - -srp6a(doc) -> - ["SRP-6a test vectors from RFC5054."]; -srp6a(suite) -> []; -srp6a(Config) when is_list(Config) -> - Username = <<"alice">>, - Password = <<"password123">>, - Salt = hexstr2bin("BEB25379D1A8581EB5A727673A2441EE"), - Prime = hexstr2bin("EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C" - "9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE4" - "8E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B29" - "7BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9A" - "FD5138FE8376435B9FC61D2FC0EB06E3"), - Generator = <<2>>, - Version = '6a', - Scrambler = hexstr2bin("CE38B9593487DA98554ED47D70A7AE5F462EF019"), - Verifier = hexstr2bin("7E273DE8696FFC4F4E337D05B4B375BEB0DDE1569E8FA00A9886D812" - "9BADA1F1822223CA1A605B530E379BA4729FDC59F105B4787E5186F5" - "C671085A1447B52A48CF1970B4FB6F8400BBF4CEBFBB168152E08AB5" - "EA53D15C1AFF87B2B9DA6E04E058AD51CC72BFC9033B564E26480D78" - "E955A5E29E7AB245DB2BE315E2099AFB"), - ClientPrivate = hexstr2bin("60975527035CF2AD1989806F0407210BC81EDC04E2762A56AFD529DD" - "DA2D4393"), - ServerPrivate = hexstr2bin("E487CB59D31AC550471E81F00F6928E01DDA08E974A004F49E61F5D1" - "05284D20"), - ClientPublic = hexstr2bin("61D5E490F6F1B79547B0704C436F523DD0E560F0C64115BB72557EC4" - "4352E8903211C04692272D8B2D1A5358A2CF1B6E0BFCF99F921530EC" - "8E39356179EAE45E42BA92AEACED825171E1E8B9AF6D9C03E1327F44" - "BE087EF06530E69F66615261EEF54073CA11CF5858F0EDFDFE15EFEA" - "B349EF5D76988A3672FAC47B0769447B"), - ServerPublic = hexstr2bin("BD0C61512C692C0CB6D041FA01BB152D4916A1E77AF46AE105393011" - "BAF38964DC46A0670DD125B95A981652236F99D9B681CBF87837EC99" - "6C6DA04453728610D0C6DDB58B318885D7D82C7F8DEB75CE7BD4FBAA" - "37089E6F9C6059F388838E7A00030B331EB76840910440B1B27AAEAE" - "EB4012B7D7665238A8E3FB004B117B58"), - - SessionKey = hexstr2bin("B0DC82BABCF30674AE450C0287745E7990A3381F63B387AAF271A10D" - "233861E359B48220F7C4693C9AE12B0A6F67809F0876E2D013800D6C" - "41BB59B6D5979B5C00A172B4A2A5903A0BDCAF8A709585EB2AFAFA8F" - "3499B200210DCC1F10EB33943CD67FC88A2F39A4BE5BEC4EC0A3212D" - "C346D7E474B29EDE8A469FFECA686E5A"), - UserPassHash = crypto:sha([Salt, crypto:sha([Username, <<$:>>, Password])]), - Verifier = crypto:mod_pow(Generator, UserPassHash, Prime), - - {ClientPublic, ClientPrivate} = crypto:generate_key(srp, {user, [Generator, Prime, Version]}, ClientPrivate), - {ServerPublic, ServerPrivate} = crypto:generate_key(srp, {host, [Verifier, Generator, Prime, Version]}, ServerPrivate), - - SessionKey = crypto:compute_key(srp, ServerPublic, {ClientPublic, ClientPrivate}, - {user, [UserPassHash, Prime, Generator, Version, Scrambler]}), - SessionKey = crypto:compute_key(srp, ClientPublic, {ServerPublic, ServerPrivate}, - {host, [Verifier, Prime, Version, Scrambler]}). - -%% -%% -exor_test(doc) -> - ["Test the exor function."]; -exor_test(suite) -> - []; -exor_test(Config) when is_list(Config) -> - B = <<1, 2, 3, 4, 5, 6, 7, 8, 9, 10>>, - Z1 = zero_bin(B), - Z1 = crypto:exor(B, B), - B1 = crypto:strong_rand_bytes(100), - B2 = crypto:strong_rand_bytes(100), - Z2 = zero_bin(B1), - Z2 = crypto:exor(B1, B1), - Z2 = crypto:exor(B2, B2), - R = xor_bytes(B1, B2), - R = crypto:exor(B1, B2), - ok. - -%% -%% -rc4_test(doc) -> - ["Test rc4 encryption ."]; -rc4_test(suite) -> - []; -rc4_test(Config) when is_list(Config) -> - if_supported(rc4, fun rc4_test_do/0). - -rc4_test_do() -> - CT1 = <<"Yo baby yo">>, - R1 = <<118,122,68,110,157,166,141,212,139,39>>, - K = "apaapa", - R1 = crypto:rc4_encrypt(K, CT1), - CT1 = crypto:rc4_encrypt(K, R1), - CT2 = lists:seq(0, 255), - R2 = crypto:rc4_encrypt(K, CT2), - CT2 = binary_to_list(crypto:rc4_encrypt(K, R2)), - ok. - -rc4_stream_test(doc) -> - ["Test rc4 stream encryption ."]; -rc4_stream_test(suite) -> - []; -rc4_stream_test(Config) when is_list(Config) -> - if_supported(rc4, fun rc4_stream_test_do/0). - -rc4_stream_test_do() -> - CT1 = <<"Yo ">>, - CT2 = <<"baby yo">>, - K = "apaapa", - State0 = crypto:rc4_set_key(K), - {State1, R1} = crypto:rc4_encrypt_with_state(State0, CT1), - {_State2, R2} = crypto:rc4_encrypt_with_state(State1, CT2), - R = list_to_binary([R1, R2]), - <<118,122,68,110,157,166,141,212,139,39>> = R, - ok. - -blowfish_cfb64(doc) -> ["Test Blowfish encrypt/decrypt."]; -blowfish_cfb64(suite) -> []; -blowfish_cfb64(Config) when is_list(Config) -> - Key = <<1,35,69,103,137,171,205,239,240,225,210,195,180,165,150,135>>, - - IVec = <<254,220,186,152,118,84,50,16>>, - Plain = <<"7654321 Now is the time for ">>, - Enc = <<231,50,20,162,130,33,57,202,242,110,207,109,46,185,231,110,61,163,222,4,209,81,114,0,81,157,87,166>>, - - Enc = crypto:blowfish_cfb64_encrypt(Key, IVec, Plain), - Plain = crypto:blowfish_cfb64_decrypt(Key, IVec, Enc), - - Key2 = <<"A2B4C">>, - IVec2 = <<"12345678">>, - Plain2 = <<"badger at my table....!">>, - Enc2 = <<173,76,128,155,70,81,79,228,4,162,188,92,119,53,144,89,93,236,28,164,176,16,138>>, - - Enc2 = crypto:blowfish_cfb64_encrypt(Key2, IVec2, Plain2), - Plain2 = crypto:blowfish_cfb64_decrypt(Key2, IVec2, Enc2). - - -smp(doc) -> "Check concurrent access to crypto driver"; -smp(suite) -> []; -smp(Config) -> - case erlang:system_info(smp_support) of - true -> - NumOfProcs = erlang:system_info(schedulers), - io:format("smp starting ~p workers\n",[NumOfProcs]), - Seeds = [random:uniform(9999) || _ <- lists:seq(1,NumOfProcs)], - Parent = self(), - Pids = [spawn_link(fun()-> worker(Seed,Config,Parent) end) - || Seed <- Seeds], - wait_pids(Pids); - - false -> - {skipped,"No smp support"} - end. - -worker(Seed, Config, Parent) -> - io:format("smp worker ~p, seed=~p~n",[self(),Seed]), - random:seed(Seed,Seed,Seed), - worker_loop(100, Config), - %%io:format("worker ~p done\n",[self()]), - Parent ! self(). - -worker_loop(0, _) -> - ok; -worker_loop(N, Config) -> - Funcs = { md5, md5_update, md5_mac, md5_mac_io, sha, sha_update, des_cbc, - aes_cfb, aes_cbc, des_cbc_iter, rand_uniform_test, strong_rand_test, - rsa_verify_test, exor_test, rc4_test, rc4_stream_test, mod_exp_test, - hmac_update_md5, hmac_update_sha, hmac_update_sha256, hmac_update_sha512, - hmac_rfc2202, hmac_rfc4231_sha224, hmac_rfc4231_sha256, hmac_rfc4231_sha384, - hmac_rfc4231_sha512, aes_ctr_stream }, - - F = element(random:uniform(size(Funcs)),Funcs), - %%io:format("worker ~p calling ~p\n",[self(),F]), - ?MODULE:F(Config), - worker_loop(N-1,Config). - -wait_pids([]) -> - ok; -wait_pids(Pids) -> - receive - Pid -> - ?line true = lists:member(Pid,Pids), - Others = lists:delete(Pid,Pids), - io:format("wait_pid got ~p, still waiting for ~p\n",[Pid,Others]), - wait_pids(Others) - end. - -%% -%% Help functions -%% - -% match -m(X, X) -> - ?line true. -t(true) -> - true. - -% hexstr2bin -hexstr2bin(S) -> - list_to_binary(hexstr2list(S)). - -hexstr2list([X,Y|T]) -> - [mkint(X)*16 + mkint(Y) | hexstr2list(T)]; -hexstr2list([]) -> - []. - -mkint(C) when $0 =< C, C =< $9 -> - C - $0; -mkint(C) when $A =< C, C =< $F -> - C - $A + 10; -mkint(C) when $a =< C, C =< $f -> - C - $a + 10. - -%% mod_exp in erlang (copied from jungerl's ssh_math.erl) -ipow(A, B, M) when M > 0, B >= 0 -> - if A == 1 -> - 1; - true -> - ipow(A, B, M, 1) - end. - -ipow(A, 1, M, Prod) -> - (A*Prod) rem M; -ipow(_A, 0, _M, Prod) -> - Prod; -ipow(A, B, M, Prod) -> - B1 = B bsr 1, - A1 = (A*A) rem M, - if B - B1 == B1 -> - ipow(A1, B1, M, Prod); - true -> - ipow(A1, B1, M, (A*Prod) rem M) - end. - -%% -%% Invert an element X mod P -%% Calculated as {1, {A,B}} = egcd(X,P), -%% 1 == P*A + X*B == X*B (mod P) i.e B is the inverse element -%% -%% X > 0, P > 0, X < P (P should be prime) -%% -%% invert(X,P) when X > 0, P > 0, X < P -> -%% I = inv(X,P,1,0), -%% if -%% I < 0 -> P + I; -%% true -> I -%% end. - -%% inv(0,_,_,Q) -> Q; -%% inv(X,P,R1,Q1) -> -%% D = P div X, -%% inv(P rem X, X, Q1 - D*R1, R1). - -sized_binary(Binary) when is_binary(Binary) -> - <<(size(Binary)):32/integer, Binary/binary>>; -sized_binary(List) -> - sized_binary(list_to_binary(List)). - -unsized_binary(<>) -> - Binary. - -xor_bytes(Bin1, Bin2) when is_binary(Bin1), is_binary(Bin2) -> - L1 = binary_to_list(Bin1), - L2 = binary_to_list(Bin2), - list_to_binary(xor_bytes(L1, L2)); -xor_bytes(L1, L2) -> - xor_bytes(L1, L2, []). - -xor_bytes([], [], Acc) -> - lists:reverse(Acc); -xor_bytes([N1 | Tl1], [N2 | Tl2], Acc) -> - xor_bytes(Tl1, Tl2, [N1 bxor N2 | Acc]). - -zero_bin(N) when is_integer(N) -> - N8 = N * 8, - <<0:N8/integer>>; -zero_bin(B) when is_binary(B) -> - zero_bin(size(B)). - -my_dss_verify(Data,[Sign|Tail],Key) -> - Res = my_dss_verify(Data,sized_binary(Sign),Key), - case Tail of - [] -> Res; - _ -> ?line Res = my_dss_verify(Data,Tail,Key) - end; -my_dss_verify(Data,Sign,Key) -> - ?line Res = crypto:dss_verify(Data, Sign, Key), - ?line Res = crypto:dss_verify(sha, Data, Sign, Key), - ?line <<_:32,Raw/binary>> = Data, - ?line Res = crypto:dss_verify(none, crypto:sha(Raw), Sign, Key), - Res. - -my_dss_sign(Data,Key) -> - ?line S1 = crypto:dss_sign(Data, Key), - ?line S2 = crypto:dss_sign(sha, Data, Key), - ?line <<_:32,Raw/binary>> = Data, - ?line S3 = crypto:dss_sign(none, crypto:sha(Raw), Key), - [S1,S2,S3]. - -openssl_version() -> - case crypto:info_lib() of - [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer) -> - LibVer; - _ -> - undefined - end. - -if_supported(Algorithm, Fun) -> - case lists:member(Algorithm, lists:append([Algo || {_, Algo} <- crypto:supports()])) of - true -> - Fun(); - _ -> - {skipped, io:format("~s not spupported", [Algorithm])} - end. -- cgit v1.2.3 From 12f6a1b18fc573ce3f245bfd69e62fbaa378b80e Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Sat, 29 Oct 2016 23:30:49 +0200 Subject: warn_obsolete_guard is already default Update compiler documentation and remove superfluous erlc flags. --- lib/crypto/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile index 456b8be64d..aea8a5a71c 100644 --- a/lib/crypto/src/Makefile +++ b/lib/crypto/src/Makefile @@ -56,7 +56,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE) # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- -ERL_COMPILE_FLAGS += +warn_obsolete_guard -DCRYPTO_VSN=\"$(VSN)\" -Werror +ERL_COMPILE_FLAGS += -DCRYPTO_VSN=\"$(VSN)\" -Werror # ---------------------------------------------------- # Targets -- cgit v1.2.3 From 78a5de9611c25a4e7b5248aa9828f949f3a5c131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 24 Nov 2016 10:55:10 +0100 Subject: crypto.c: Disable broken code for ChaCha and Poly1305 In June 2014, fb9d36c2c7c1 added support for the AES GCM ciphers (ChaCha/Poly1305) based on a development version of OpenSSL 1.1.0. The code is seriously broken when used with the released OpenSSL 1.1.0. --- lib/crypto/c_src/crypto.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 86b839eddb..554aaf7587 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -138,6 +138,13 @@ #include #endif +/* + * FIXME: The support for ChaCha and Poly1305 is based on pre-releases + * of OpenSSL 1.1.0. It is seriously broken when used with the released + * OpenSSL 1.1.0 or later. + */ +#undef HAVE_CHACHA20_POLY1305 + #if defined(HAVE_CHACHA20_POLY1305) #include #include -- cgit v1.2.3 From 458c012e18eda87803ef356221d68955f4b8012d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 24 Nov 2016 11:57:55 +0100 Subject: Support OpenSSL 1.1.0 --- lib/crypto/c_src/crypto.c | 486 +++++++++++++++++++++++++------------ lib/crypto/c_src/crypto_callback.c | 6 +- lib/crypto/c_src/crypto_callback.h | 13 +- 3 files changed, 345 insertions(+), 160 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 554aaf7587..0031f9b962 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -65,57 +65,57 @@ /* Helper macro to construct a OPENSSL_VERSION_NUMBER. * See openssl/opensslv.h */ -#define OpenSSL_version(MAJ, MIN, FIX, P) \ +#define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \ ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf) -#define OpenSSL_version_plain(MAJ, MIN, FIX) \ - OpenSSL_version(MAJ,MIN,FIX,('a'-1)) +#define PACKED_OPENSSL_VERSION_PLAIN(MAJ, MIN, FIX) \ + PACKED_OPENSSL_VERSION(MAJ,MIN,FIX,('a'-1)) -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) #include #endif #include "crypto_callback.h" -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \ +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ && !defined(OPENSSL_NO_SHA224) && defined(NID_sha224) \ && !defined(OPENSSL_NO_SHA256) /* disabled like this in my sha.h (?) */ # define HAVE_SHA224 #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \ +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ && !defined(OPENSSL_NO_SHA256) && defined(NID_sha256) # define HAVE_SHA256 #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \ +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ && !defined(OPENSSL_NO_SHA384) && defined(NID_sha384)\ && !defined(OPENSSL_NO_SHA512) /* disabled like this in my sha.h (?) */ # define HAVE_SHA384 #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \ +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ && !defined(OPENSSL_NO_SHA512) && defined(NID_sha512) # define HAVE_SHA512 #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,7,'e') +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,7,'e') # define HAVE_DES_ede3_cfb_encrypt #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'o') \ +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \ && !defined(OPENSSL_NO_EC) \ && !defined(OPENSSL_NO_ECDH) \ && !defined(OPENSSL_NO_ECDSA) # define HAVE_EC #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'c') +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'c') # define HAVE_AES_IGE #endif -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,1) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) # define HAVE_EVP_AES_CTR # define HAVE_GCM # define HAVE_CMAC -# if OPENSSL_VERSION_NUMBER < OpenSSL_version(1,0,1,'d') +# if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION(1,0,1,'d') # define HAVE_GCM_EVP_DECRYPT_BUG # endif #endif @@ -124,7 +124,7 @@ # define HAVE_CHACHA20_POLY1305 #endif -#if OPENSSL_VERSION_NUMBER <= OpenSSL_version(0,9,8,'l') +#if OPENSSL_VERSION_NUMBER <= PACKED_OPENSSL_VERSION(0,9,8,'l') # define HAVE_ECB_IVEC_BUG #endif @@ -158,6 +158,7 @@ #endif + #ifdef VALGRIND # include @@ -226,6 +227,122 @@ do { \ } \ } while (0) +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) + +/* + * In OpenSSL 1.1.0, most structs are opaque. That means that + * the structs cannot be allocated as automatic variables on the + * C stack (because the size is unknown) and that it is necessary + * to use access functions. + * + * For backward compatibility to previous versions of OpenSSL, define + * on our versions of the new functions defined in 1.1.0 here, so that + * we don't have to sprinkle ifdefs throughout the code. + */ + +static HMAC_CTX *HMAC_CTX_new(void); +static void HMAC_CTX_free(HMAC_CTX *ctx); + +static HMAC_CTX *HMAC_CTX_new() +{ + HMAC_CTX *ctx = CRYPTO_malloc(sizeof(HMAC_CTX), __FILE__, __LINE__); + HMAC_CTX_init(ctx); + return ctx; +} + +static void HMAC_CTX_free(HMAC_CTX *ctx) +{ + HMAC_CTX_cleanup(ctx); + return CRYPTO_free(ctx); +} + +#define EVP_MD_CTX_new() EVP_MD_CTX_create() +#define EVP_MD_CTX_free(ctx) EVP_MD_CTX_destroy(ctx) + +static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); +static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); +static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); + +static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) +{ + r->n = n; + r->e = e; + r->d = d; + return 1; +} + +static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) +{ + r->p = p; + r->q = q; + return 1; +} + +static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) +{ + r->dmp1 = dmp1; + r->dmq1 = dmq1; + r->iqmp = iqmp; + return 1; +} + +static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); +static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); + +static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) +{ + d->pub_key = pub_key; + d->priv_key = priv_key; + return 1; +} + +static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + d->p = p; + d->q = q; + d->g = g; + return 1; +} + +static INLINE int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); +static INLINE int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); +static INLINE void DH_get0_pqg(const DH *dh, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); +static INLINE void DH_get0_key(const DH *dh, + const BIGNUM **pub_key, const BIGNUM **priv_key); + +static INLINE int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) +{ + dh->pub_key = pub_key; + dh->priv_key = priv_key; + return 1; +} + +static INLINE int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + dh->p = p; + dh->q = q; + dh->g = g; + return 1; +} + +static INLINE void +DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) +{ + *p = dh->p; + *q = dh->q; + *g = dh->g; +} + +static INLINE void +DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) +{ + *pub_key = dh->pub_key; + *priv_key = dh->priv_key; +} + +#endif /* End of compatibility definitions. */ + /* NIF interface declarations */ static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info); static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info); @@ -410,7 +527,7 @@ struct hmac_context { ErlNifMutex* mtx; int alive; - HMAC_CTX ctx; + HMAC_CTX* ctx; }; static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context*); @@ -537,18 +654,24 @@ static struct cipher_type_t* get_cipher_type(ERL_NIF_TERM type, size_t key_len); #define PRINTF_ERR1(FMT,A1) #define PRINTF_ERR2(FMT,A1,A2) -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) /* Define resource types for OpenSSL context structures. */ static ErlNifResourceType* evp_md_ctx_rtype; -static void evp_md_ctx_dtor(ErlNifEnv* env, EVP_MD_CTX* ctx) { - EVP_MD_CTX_cleanup(ctx); +struct evp_md_ctx { + EVP_MD_CTX* ctx; +}; +static void evp_md_ctx_dtor(ErlNifEnv* env, struct evp_md_ctx *ctx) { + EVP_MD_CTX_free(ctx->ctx); } #endif #ifdef HAVE_EVP_AES_CTR static ErlNifResourceType* evp_cipher_ctx_rtype; -static void evp_cipher_ctx_dtor(ErlNifEnv* env, EVP_CIPHER_CTX* ctx) { - EVP_CIPHER_CTX_cleanup(ctx); +struct evp_cipher_ctx { + EVP_CIPHER_CTX* ctx; +}; +static void evp_cipher_ctx_dtor(ErlNifEnv* env, struct evp_cipher_ctx* ctx) { + EVP_CIPHER_CTX_free(ctx->ctx); } #endif @@ -643,7 +766,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'"); return __LINE__; } -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) evp_md_ctx_rtype = enif_open_resource_type(env, NULL, "EVP_MD_CTX", (ErlNifResourceDtor*) evp_md_ctx_dtor, ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER, @@ -1026,12 +1149,12 @@ static ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] return ret; } -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type) */ struct digest_type_t *digp = NULL; - EVP_MD_CTX *ctx; + struct evp_md_ctx *ctx; ERL_NIF_TERM ret; digp = get_digest_type(argv[0]); @@ -1042,8 +1165,9 @@ static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a return atom_notsup; } - ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(EVP_MD_CTX)); - if (!EVP_DigestInit(ctx, digp->md.p)) { + ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(struct evp_md_ctx)); + ctx->ctx = EVP_MD_CTX_new(); + if (!EVP_DigestInit(ctx->ctx, digp->md.p)) { enif_release_resource(ctx); return atom_notsup; } @@ -1053,7 +1177,7 @@ static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a } static ERL_NIF_TERM hash_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Context, Data) */ - EVP_MD_CTX *ctx, *new_ctx; + struct evp_md_ctx *ctx, *new_ctx; ErlNifBinary data; ERL_NIF_TERM ret; @@ -1062,9 +1186,10 @@ static ERL_NIF_TERM hash_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM return enif_make_badarg(env); } - new_ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(EVP_MD_CTX)); - if (!EVP_MD_CTX_copy(new_ctx, ctx) || - !EVP_DigestUpdate(new_ctx, data.data, data.size)) { + new_ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(struct evp_md_ctx)); + new_ctx->ctx = EVP_MD_CTX_new(); + if (!EVP_MD_CTX_copy(new_ctx->ctx, ctx->ctx) || + !EVP_DigestUpdate(new_ctx->ctx, data.data, data.size)) { enif_release_resource(new_ctx); return atom_notsup; } @@ -1076,7 +1201,8 @@ static ERL_NIF_TERM hash_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM } static ERL_NIF_TERM hash_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Context) */ - EVP_MD_CTX *ctx, new_ctx; + struct evp_md_ctx *ctx; + EVP_MD_CTX *new_ctx; ERL_NIF_TERM ret; unsigned ret_size; @@ -1084,16 +1210,19 @@ static ERL_NIF_TERM hash_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM return enif_make_badarg(env); } - ret_size = (unsigned)EVP_MD_CTX_size(ctx); + ret_size = (unsigned)EVP_MD_CTX_size(ctx->ctx); ASSERT(0 < ret_size && ret_size <= EVP_MAX_MD_SIZE); - if (!EVP_MD_CTX_copy(&new_ctx, ctx) || - !EVP_DigestFinal(&new_ctx, + new_ctx = EVP_MD_CTX_new(); + if (!EVP_MD_CTX_copy(new_ctx, ctx->ctx) || + !EVP_DigestFinal(new_ctx, enif_make_new_binary(env, ret_size, &ret), &ret_size)) { + EVP_MD_CTX_free(new_ctx); return atom_notsup; } - ASSERT(ret_size == (unsigned)EVP_MD_CTX_size(ctx)); + EVP_MD_CTX_free(new_ctx); + ASSERT(ret_size == (unsigned)EVP_MD_CTX_size(ctx->ctx)); return ret; } @@ -1377,7 +1506,7 @@ static ERL_NIF_TERM hmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context *obj) { if (obj->alive) { - HMAC_CTX_cleanup(&obj->ctx); + HMAC_CTX_free(obj->ctx); obj->alive = 0; } enif_mutex_destroy(obj->mtx); @@ -1402,15 +1531,16 @@ static ERL_NIF_TERM hmac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a obj = enif_alloc_resource(hmac_context_rtype, sizeof(struct hmac_context)); obj->mtx = enif_mutex_create("crypto.hmac"); obj->alive = 1; -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) + obj->ctx = HMAC_CTX_new(); +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) // Check the return value of HMAC_Init: it may fail in FIPS mode // for disabled algorithms - if (!HMAC_Init(&obj->ctx, key.data, key.size, digp->md.p)) { + if (!HMAC_Init_ex(obj->ctx, key.data, key.size, digp->md.p, NULL)) { enif_release_resource(obj); return atom_notsup; } #else - HMAC_Init(&obj->ctx, key.data, key.size, digp->md.p); + HMAC_Init_ex(obj->ctx, key.data, key.size, digp->md.p, NULL); #endif ret = enif_make_resource(env, obj); @@ -1432,7 +1562,7 @@ static ERL_NIF_TERM hmac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM enif_mutex_unlock(obj->mtx); return enif_make_badarg(env); } - HMAC_Update(&obj->ctx, data.data, data.size); + HMAC_Update(obj->ctx, data.data, data.size); enif_mutex_unlock(obj->mtx); CONSUME_REDS(env,data); @@ -1459,8 +1589,8 @@ static ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM return enif_make_badarg(env); } - HMAC_Final(&obj->ctx, mac_buf, &mac_len); - HMAC_CTX_cleanup(&obj->ctx); + HMAC_Final(obj->ctx, mac_buf, &mac_len); + HMAC_CTX_free(obj->ctx); obj->alive = 0; enif_mutex_unlock(obj->mtx); @@ -1526,7 +1656,7 @@ static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM struct cipher_type_t *cipherp = NULL; const EVP_CIPHER *cipher; ErlNifBinary key, ivec, text; - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX* ctx; ERL_NIF_TERM ret; unsigned char *out; int ivec_size, out_size = 0; @@ -1571,30 +1701,30 @@ static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM out = enif_make_new_binary(env, text.size, &ret); - EVP_CIPHER_CTX_init(&ctx); - if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, NULL, + ctx = EVP_CIPHER_CTX_new(); + if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, (argv[argc - 1] == atom_true)) || - !EVP_CIPHER_CTX_set_key_length(&ctx, key.size) || + !EVP_CIPHER_CTX_set_key_length(ctx, key.size) || !(EVP_CIPHER_type(cipher) != NID_rc2_cbc || - EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_SET_RC2_KEY_BITS, key.size * 8, NULL)) || - !EVP_CipherInit_ex(&ctx, NULL, NULL, + EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS, key.size * 8, NULL)) || + !EVP_CipherInit_ex(ctx, NULL, NULL, key.data, ivec_size ? ivec.data : NULL, -1) || - !EVP_CIPHER_CTX_set_padding(&ctx, 0)) { + !EVP_CIPHER_CTX_set_padding(ctx, 0)) { - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return enif_raise_exception(env, atom_notsup); } if (text.size > 0 && /* OpenSSL 0.9.8h asserts text.size > 0 */ - (!EVP_CipherUpdate(&ctx, out, &out_size, text.data, text.size) + (!EVP_CipherUpdate(ctx, out, &out_size, text.data, text.size) || (ASSERT(out_size == text.size), 0) - || !EVP_CipherFinal_ex(&ctx, out + out_size, &out_size))) { + || !EVP_CipherFinal_ex(ctx, out + out_size, &out_size))) { - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return enif_raise_exception(env, atom_notsup); } ASSERT(out_size == 0); - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, text); return ret; @@ -1675,7 +1805,7 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key, IVec) */ ErlNifBinary key_bin, ivec_bin; - EVP_CIPHER_CTX *ctx; + struct evp_cipher_ctx *ctx; const EVP_CIPHER *cipher; ERL_NIF_TERM ret; @@ -1693,18 +1823,18 @@ static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_ default: return enif_make_badarg(env); } - ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(EVP_CIPHER_CTX)); - EVP_CIPHER_CTX_init(ctx); - EVP_CipherInit_ex(ctx, cipher, NULL, + ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx)); + ctx->ctx = EVP_CIPHER_CTX_new(); + EVP_CipherInit_ex(ctx->ctx, cipher, NULL, key_bin.data, ivec_bin.data, 1); - EVP_CIPHER_CTX_set_padding(ctx, 0); + EVP_CIPHER_CTX_set_padding(ctx->ctx, 0); ret = enif_make_resource(env, ctx); enif_release_resource(ctx); return ret; } static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Context, Data) */ - EVP_CIPHER_CTX *ctx, *new_ctx; + struct evp_cipher_ctx *ctx, *new_ctx; ErlNifBinary data_bin; ERL_NIF_TERM ret, cipher_term; unsigned char *out; @@ -1714,11 +1844,11 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N || !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) { return enif_make_badarg(env); } - new_ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(EVP_CIPHER_CTX)); - EVP_CIPHER_CTX_init(new_ctx); - EVP_CIPHER_CTX_copy(new_ctx, ctx); + new_ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx)); + new_ctx->ctx = EVP_CIPHER_CTX_new(); + EVP_CIPHER_CTX_copy(new_ctx->ctx, ctx->ctx); out = enif_make_new_binary(env, data_bin.size, &cipher_term); - EVP_CipherUpdate(new_ctx, out, &outl, data_bin.data, data_bin.size); + EVP_CipherUpdate(new_ctx->ctx, out, &outl, data_bin.data, data_bin.size); ASSERT(outl == data_bin.size); ret = enif_make_tuple2(env, enif_make_resource(env, new_ctx), cipher_term); @@ -1789,7 +1919,7 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key,Iv,AAD,In) */ #if defined(HAVE_GCM) - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in; unsigned int tag_len; @@ -1813,40 +1943,40 @@ static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM else if (key.size == 32) cipher = EVP_aes_256_gcm(); - EVP_CIPHER_CTX_init(&ctx); + ctx = EVP_CIPHER_CTX_new(); - if (EVP_EncryptInit_ex(&ctx, cipher, NULL, NULL, NULL) != 1) + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; - EVP_CIPHER_CTX_set_padding(&ctx, 0); + EVP_CIPHER_CTX_set_padding(ctx, 0); - if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) goto out_err; - if (EVP_EncryptInit_ex(&ctx, NULL, NULL, key.data, iv.data) != 1) + if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; - if (EVP_EncryptUpdate(&ctx, NULL, &len, aad.data, aad.size) != 1) + if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; outp = enif_make_new_binary(env, in.size, &out); - if (EVP_EncryptUpdate(&ctx, outp, &len, in.data, in.size) != 1) + if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; - if (EVP_EncryptFinal_ex(&ctx, outp+len, &len) != 1) + if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1) goto out_err; tagp = enif_make_new_binary(env, tag_len, &out_tag); - if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_GET_TAG, tag_len, tagp) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, tag_len, tagp) != 1) goto out_err; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, in); return enif_make_tuple2(env, out, out_tag); out_err: - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return atom_error; #else @@ -1859,7 +1989,7 @@ static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM #if defined(HAVE_GCM_EVP_DECRYPT_BUG) return aes_gcm_decrypt_NO_EVP(env, argc, argv); #elif defined(HAVE_GCM) - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in, tag; unsigned char *outp; @@ -1882,34 +2012,34 @@ static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM else if (key.size == 32) cipher = EVP_aes_256_gcm(); - EVP_CIPHER_CTX_init(&ctx); + ctx = EVP_CIPHER_CTX_new(); - if (EVP_DecryptInit_ex(&ctx, cipher, NULL, NULL, NULL) != 1) + if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; - if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) goto out_err; - if (EVP_DecryptInit_ex(&ctx, NULL, NULL, key.data, iv.data) != 1) + if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; - if (EVP_DecryptUpdate(&ctx, NULL, &len, aad.data, aad.size) != 1) + if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; outp = enif_make_new_binary(env, in.size, &out); - if (EVP_DecryptUpdate(&ctx, outp, &len, in.data, in.size) != 1) + if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; - if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1) goto out_err; - if (EVP_DecryptFinal_ex(&ctx, outp+len, &len) != 1) + if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) goto out_err; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, in); return out; out_err: - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return atom_error; #else return enif_raise_exception(env, atom_notsup); @@ -2231,13 +2361,10 @@ static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM } dsa = DSA_new(); - dsa->p = dsa_p; - dsa->q = dsa_q; - dsa->g = dsa_g; - dsa->priv_key = NULL; - dsa->pub_key = dsa_y; - i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH, - sign_bin.data, sign_bin.size, dsa); + DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g); + DSA_set0_key(dsa, dsa_y, NULL); + i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH, + sign_bin.data, sign_bin.size, dsa); DSA_free(dsa); return(i > 0) ? atom_true : atom_false; } @@ -2294,13 +2421,15 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ERL_NIF_TERM head, tail, ret; int i; RSA *rsa; -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) EVP_PKEY *pkey; EVP_PKEY_CTX *ctx; #endif const EVP_MD *md; const ERL_NIF_TERM type = argv[0]; struct digest_type_t *digp = NULL; + BIGNUM *rsa_e; + BIGNUM *rsa_n; digp = get_digest_type(type); if (!digp) { @@ -2317,16 +2446,18 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM || digest_bin.size != EVP_MD_size(md) || !enif_inspect_binary(env, argv[2], &sign_bin) || !enif_get_list_cell(env, argv[3], &head, &tail) - || !get_bn_from_bin(env, head, &rsa->e) + || !get_bn_from_bin(env, head, &rsa_e) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->n) + || !get_bn_from_bin(env, head, &rsa_n) || !enif_is_empty_list(env, tail)) { ret = enif_make_badarg(env); goto done; } -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) + (void) RSA_set0_key(rsa, rsa_n, rsa_e, NULL); + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) pkey = EVP_PKEY_new(); EVP_PKEY_set1_RSA(pkey, rsa); @@ -2420,34 +2551,44 @@ static int get_rsa_private_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) { /* key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C] */ ERL_NIF_TERM head, tail; + BIGNUM *e, *n, *d; + BIGNUM *p, *q; + BIGNUM *dmp1, *dmq1, *iqmp; if (!enif_get_list_cell(env, key, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->e) + || !get_bn_from_bin(env, head, &e) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->n) + || !get_bn_from_bin(env, head, &n) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->d) - || (!enif_is_empty_list(env, tail) && - (!enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->p) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->q) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->dmp1) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->dmq1) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->iqmp) - || !enif_is_empty_list(env, tail)))) { + || !get_bn_from_bin(env, head, &d)) { return 0; } + (void) RSA_set0_key(rsa, n, e, d); + if (enif_is_empty_list(env, tail)) { + return 1; + } + if (!enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &p) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &q) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dmp1) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dmq1) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &iqmp) + || !enif_is_empty_list(env, tail)) { + return 0; + } + (void) RSA_set0_factors(rsa, p, q); + (void) RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp); return 1; } static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Digest, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */ ErlNifBinary digest_bin, ret_bin; -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) EVP_PKEY *pkey; EVP_PKEY_CTX *ctx; size_t rsa_s_len; @@ -2480,7 +2621,7 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar } -#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) pkey = EVP_PKEY_new(); EVP_PKEY_set1_RSA(pkey, rsa); rsa_s_len=(size_t)EVP_PKEY_size(pkey); @@ -2527,6 +2668,8 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar ERL_NIF_TERM head, tail; unsigned int dsa_s_len; DSA* dsa; + BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL; + BIGNUM *dummy_pub_key, *priv_key = NULL; int i; if (argv[0] != atom_sha @@ -2535,26 +2678,37 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar return enif_make_badarg(env); } - dsa = DSA_new(); - - dsa->pub_key = NULL; if (!enif_get_list_cell(env, argv[2], &head, &tail) - || !get_bn_from_bin(env, head, &dsa->p) + || !get_bn_from_bin(env, head, &dsa_p) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa->q) + || !get_bn_from_bin(env, head, &dsa_q) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa->g) + || !get_bn_from_bin(env, head, &dsa_g) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa->priv_key) + || !get_bn_from_bin(env, head, &priv_key) || !enif_is_empty_list(env,tail)) { - DSA_free(dsa); + if (dsa_p) BN_free(dsa_p); + if (dsa_q) BN_free(dsa_q); + if (dsa_g) BN_free(dsa_g); + if (priv_key) BN_free(priv_key); return enif_make_badarg(env); } + /* Note: DSA_set0_key() does not allow setting only the + * private key, although DSA_sign() does not use the + * public key. Work around this limitation by setting + * the public key to a copy of the private key. + */ + dummy_pub_key = BN_dup(priv_key); + + dsa = DSA_new(); + DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g); + DSA_set0_key(dsa, dummy_pub_key, priv_key); enif_alloc_binary(DSA_size(dsa), &ret_bin); i = DSA_sign(NID_sha1, digest_bin.data, SHA_DIGEST_LENGTH, ret_bin.data, &dsa_s_len, dsa); DSA_free(dsa); + if (i) { if (dsa_s_len != ret_bin.size) { enif_realloc_binary(&ret_bin, dsa_s_len); @@ -2591,20 +2745,22 @@ static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TER ERL_NIF_TERM head, tail; int padding, i; RSA* rsa; + BIGNUM *e, *n; rsa = RSA_new(); if (!enif_inspect_binary(env, argv[0], &data_bin) || !enif_get_list_cell(env, argv[1], &head, &tail) - || !get_bn_from_bin(env, head, &rsa->e) + || !get_bn_from_bin(env, head, &e) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa->n) + || !get_bn_from_bin(env, head, &n) || !enif_is_empty_list(env,tail) || !rsa_pad(argv[2], &padding)) { RSA_free(rsa); return enif_make_badarg(env); } + (void) RSA_set0_key(rsa, n, e, NULL); enif_alloc_binary(RSA_size(rsa), &ret_bin); @@ -2685,6 +2841,7 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E int p_len, g_len; unsigned char *p_ptr, *g_ptr; ERL_NIF_TERM ret_p, ret_g; + const BIGNUM *dh_p, *dh_q, *dh_g; if (!enif_get_int(env, argv[0], &prime_len) || !enif_get_int(env, argv[1], &generator)) { @@ -2695,15 +2852,16 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E if (dh_params == NULL) { return atom_error; } - p_len = BN_num_bytes(dh_params->p); - g_len = BN_num_bytes(dh_params->g); + DH_get0_pqg(dh_params, &dh_p, &dh_q, &dh_g); + DH_free(dh_params); + p_len = BN_num_bytes(dh_p); + g_len = BN_num_bytes(dh_g); p_ptr = enif_make_new_binary(env, p_len, &ret_p); g_ptr = enif_make_new_binary(env, g_len, &ret_g); - BN_bn2bin(dh_params->p, p_ptr); - BN_bn2bin(dh_params->g, g_ptr); + BN_bn2bin(dh_p, p_ptr); + BN_bn2bin(dh_g, g_ptr); ERL_VALGRIND_MAKE_MEM_DEFINED(p_ptr, p_len); ERL_VALGRIND_MAKE_MEM_DEFINED(g_ptr, g_len); - DH_free(dh_params); return enif_make_list2(env, ret_p, ret_g); } @@ -2712,18 +2870,19 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] DH* dh_params; int i; ERL_NIF_TERM ret, head, tail; - - dh_params = DH_new(); + BIGNUM *dh_p, *dh_g; if (!enif_get_list_cell(env, argv[0], &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->p) + || !get_bn_from_bin(env, head, &dh_p) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->g) + || !get_bn_from_bin(env, head, &dh_g) || !enif_is_empty_list(env,tail)) { - DH_free(dh_params); return enif_make_badarg(env); } + + dh_params = DH_new(); + DH_set0_pqg(dh_params, dh_p, NULL, dh_g); if (DH_check(dh_params, &i)) { if (i == 0) ret = atom_ok; else if (i & DH_CHECK_P_NOT_PRIME) ret = atom_not_prime; @@ -2746,32 +2905,40 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ unsigned char *pub_ptr, *prv_ptr; ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail; int mpint; /* 0 or 4 */ + BIGNUM *priv_key = NULL; + BIGNUM *dh_p = NULL, *dh_g = NULL; - dh_params = DH_new(); - - if (!(get_bn_from_bin(env, argv[0], &dh_params->priv_key) + if (!(get_bn_from_bin(env, argv[0], &priv_key) || argv[0] == atom_undefined) || !enif_get_list_cell(env, argv[1], &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->p) + || !get_bn_from_bin(env, head, &dh_p) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->g) + || !get_bn_from_bin(env, head, &dh_g) || !enif_is_empty_list(env, tail) || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4)) { - DH_free(dh_params); + if (priv_key) BN_free(priv_key); + if (dh_p) BN_free(dh_p); + if (dh_g) BN_free(dh_g); return enif_make_badarg(env); } + dh_params = DH_new(); + DH_set0_key(dh_params, NULL, priv_key); + DH_set0_pqg(dh_params, dh_p, NULL, dh_g); + if (DH_generate_key(dh_params)) { - pub_len = BN_num_bytes(dh_params->pub_key); - prv_len = BN_num_bytes(dh_params->priv_key); + const BIGNUM *pub_key, *priv_key; + DH_get0_key(dh_params, &pub_key, &priv_key); + pub_len = BN_num_bytes(pub_key); + prv_len = BN_num_bytes(priv_key); pub_ptr = enif_make_new_binary(env, pub_len+mpint, &ret_pub); prv_ptr = enif_make_new_binary(env, prv_len+mpint, &ret_prv); if (mpint) { put_int32(pub_ptr, pub_len); pub_ptr += 4; put_int32(prv_ptr, prv_len); prv_ptr += 4; } - BN_bn2bin(dh_params->pub_key, pub_ptr); - BN_bn2bin(dh_params->priv_key, prv_ptr); + BN_bn2bin(pub_key, pub_ptr); + BN_bn2bin(priv_key, prv_ptr); ERL_VALGRIND_MAKE_MEM_DEFINED(pub_ptr, pub_len); ERL_VALGRIND_MAKE_MEM_DEFINED(prv_ptr, prv_len); ret = enif_make_tuple2(env, ret_pub, ret_prv); @@ -2786,26 +2953,37 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */ DH* dh_params; - BIGNUM* pubkey = NULL; + BIGNUM *dummy_pub_key = NULL, *priv_key = NULL; + BIGNUM *other_pub_key; + BIGNUM *dh_p = NULL, *dh_g = NULL; int i; ErlNifBinary ret_bin; ERL_NIF_TERM ret, head, tail; dh_params = DH_new(); - if (!get_bn_from_bin(env, argv[0], &pubkey) - || !get_bn_from_bin(env, argv[1], &dh_params->priv_key) + if (!get_bn_from_bin(env, argv[0], &other_pub_key) + || !get_bn_from_bin(env, argv[1], &priv_key) || !enif_get_list_cell(env, argv[2], &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->p) + || !get_bn_from_bin(env, head, &dh_p) || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_params->g) + || !get_bn_from_bin(env, head, &dh_g) || !enif_is_empty_list(env, tail)) { - + if (dh_p) BN_free(dh_p); + if (dh_g) BN_free(dh_g); ret = enif_make_badarg(env); } else { + /* Note: DH_set0_key() does not allow setting only the + * private key, although DH_compute_key() does not use the + * public key. Work around this limitation by setting + * the public key to a copy of the private key. + */ + dummy_pub_key = BN_dup(priv_key); + DH_set0_key(dh_params, dummy_pub_key, priv_key); + DH_set0_pqg(dh_params, dh_p, NULL, dh_g); enif_alloc_binary(DH_size(dh_params), &ret_bin); - i = DH_compute_key(ret_bin.data, pubkey, dh_params); + i = DH_compute_key(ret_bin.data, other_pub_key, dh_params); if (i > 0) { if (i != ret_bin.size) { enif_realloc_binary(&ret_bin, i); @@ -2817,7 +2995,7 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T ret = atom_error; } } - if (pubkey) BN_free(pubkey); + if (other_pub_key) BN_free(other_pub_key); DH_free(dh_params); return ret; } @@ -3395,7 +3573,7 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM enif_alloc_binary(ECDSA_size(key), &ret_bin); - i = ECDSA_sign(md->type, digest_bin.data, len, + i = ECDSA_sign(EVP_MD_type(md), digest_bin.data, len, ret_bin.data, &dsa_s_len, key); EC_KEY_free(key); @@ -3445,7 +3623,7 @@ static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER || !get_ec_key(env, argv[3], atom_undefined, argv[4], &key)) goto badarg; - i = ECDSA_verify(md->type, digest_bin.data, len, + i = ECDSA_verify(EVP_MD_type(md), digest_bin.data, len, sign_bin.data, sign_bin.size, key); EC_KEY_free(key); diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c index 4c23379f7f..23d2bed057 100644 --- a/lib/crypto/c_src/crypto_callback.c +++ b/lib/crypto/c_src/crypto_callback.c @@ -62,7 +62,7 @@ static void nomem(size_t size, const char* op) abort(); } -static void* crypto_alloc(size_t size) +static void* crypto_alloc(size_t size CCB_FILE_LINE_ARGS) { void *ret = enif_alloc(size); @@ -70,7 +70,7 @@ static void* crypto_alloc(size_t size) nomem(size, "allocate"); return ret; } -static void* crypto_realloc(void* ptr, size_t size) +static void* crypto_realloc(void* ptr, size_t size CCB_FILE_LINE_ARGS) { void* ret = enif_realloc(ptr, size); @@ -78,7 +78,7 @@ static void* crypto_realloc(void* ptr, size_t size) nomem(size, "reallocate"); return ret; } -static void crypto_free(void* ptr) +static void crypto_free(void* ptr CCB_FILE_LINE_ARGS) { enif_free(ptr); } diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h index 894d86cfd9..2641cc0c8b 100644 --- a/lib/crypto/c_src/crypto_callback.h +++ b/lib/crypto/c_src/crypto_callback.h @@ -18,13 +18,20 @@ * %CopyrightEnd% */ +#include +#if OPENSSL_VERSION_NUMBER < 0x10100000L +# define CCB_FILE_LINE_ARGS +#else +# define CCB_FILE_LINE_ARGS , const char *file, int line +#endif + struct crypto_callbacks { size_t sizeof_me; - void* (*crypto_alloc)(size_t size); - void* (*crypto_realloc)(void* ptr, size_t size); - void (*crypto_free)(void* ptr); + void* (*crypto_alloc)(size_t size CCB_FILE_LINE_ARGS); + void* (*crypto_realloc)(void* ptr, size_t size CCB_FILE_LINE_ARGS); + void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS); /* openssl callbacks */ #ifdef OPENSSL_THREADS -- cgit v1.2.3 From fc0427be6d482182ec70f3cd87c73027cfb17ea9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Dec 2016 11:45:22 +0100 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 40 ++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 4ae64e059e..53ea6bb58b 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,46 @@

This document describes the changes made to the Crypto application.

+
Crypto 3.7.2 + +
Fixed Bugs and Malfunctions + + +

+ The crypto application has been fixed to not use RC2 + against OpenSSL built with RC2 disabled.

+

+ Own Id: OTP-13895 Aux Id: PR-1163

+
+ +

+ The crypto application has been fixed to not use RC4 + against OpenSSL built with RC4 disabled.

+

+ Own Id: OTP-13896 Aux Id: PR-1169

+
+
+
+ + +
Improvements and New Features + + +

+ To ease troubleshooting, erlang:load_nif/2 now + includes the return value from a failed call to + load/reload/upgrade in the text part of the error tuple. + The crypto NIF makes use of this feature by + returning the source line where/if the initialization + fails.

+

+ Own Id: OTP-13951

+
+
+
+ +
+
Crypto 3.7.1
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index bbee24554a..38e2db9033 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.1 +CRYPTO_VSN = 3.7.2 -- cgit v1.2.3 From 4dddb3c0b286e13f2cbccb0cdaa4bffcfee60033 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 20 Dec 2016 17:45:51 +0900 Subject: crypto: Support chacha20_poly1305 This commit reactivates chacha20_poly1305 and fixes the imprementation for the released OpenSSL 1.1.0 or later. --- lib/crypto/c_src/crypto.c | 152 ++++++++++++++++----------------------- lib/crypto/test/crypto_SUITE.erl | 49 ++++++++++--- 2 files changed, 101 insertions(+), 100 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0031f9b962..68784cd24c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -120,7 +120,7 @@ # endif #endif -#if defined(NID_chacha20) && !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0) # define HAVE_CHACHA20_POLY1305 #endif @@ -138,27 +138,6 @@ #include #endif -/* - * FIXME: The support for ChaCha and Poly1305 is based on pre-releases - * of OpenSSL 1.1.0. It is seriously broken when used with the released - * OpenSSL 1.1.0 or later. - */ -#undef HAVE_CHACHA20_POLY1305 - -#if defined(HAVE_CHACHA20_POLY1305) -#include -#include - -#if !defined(CHACHA20_NONCE_LEN) -# define CHACHA20_NONCE_LEN 8 -#endif -#if !defined(POLY1305_TAG_LEN) -# define POLY1305_TAG_LEN 16 -#endif - -#endif - - #ifdef VALGRIND # include @@ -2093,71 +2072,61 @@ out_err: } #endif /* HAVE_GCM_EVP_DECRYPT_BUG */ -#if defined(HAVE_CHACHA20_POLY1305) -static void -poly1305_update_with_length(poly1305_state *poly1305, - const unsigned char *data, size_t data_len) -{ - size_t j = data_len; - unsigned char length_bytes[8]; - unsigned i; - - for (i = 0; i < sizeof(length_bytes); i++) { - length_bytes[i] = j; - j >>= 8; - } - - CRYPTO_poly1305_update(poly1305, data, data_len); - CRYPTO_poly1305_update(poly1305, length_bytes, sizeof(length_bytes)); -} -#endif static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key,Iv,AAD,In) */ #if defined(HAVE_CHACHA20_POLY1305) + EVP_CIPHER_CTX *ctx; + const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in; - unsigned char *outp; + unsigned char *outp, *tagp; ERL_NIF_TERM out, out_tag; - ErlNifUInt64 in_len_64; - unsigned char poly1305_key[32]; - poly1305_state poly1305; + int len; if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32 - || !enif_inspect_binary(env, argv[1], &iv) || iv.size != CHACHA20_NONCE_LEN + || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16 || !enif_inspect_iolist_as_binary(env, argv[2], &aad) || !enif_inspect_iolist_as_binary(env, argv[3], &in)) { return enif_make_badarg(env); } - /* Take from OpenSSL patch set/LibreSSL: - * - * The underlying ChaCha implementation may not overflow the block - * counter into the second counter word. Therefore we disallow - * individual operations that work on more than 2TB at a time. - * in_len_64 is needed because, on 32-bit platforms, size_t is only - * 32-bits and this produces a warning because it's always false. - * Casting to uint64_t inside the conditional is not sufficient to stop - * the warning. */ - in_len_64 = in.size; - if (in_len_64 >= (1ULL << 32) * 64 - 64) - return enif_make_badarg(env); + cipher = EVP_chacha20_poly1305(); + + ctx = EVP_CIPHER_CTX_new(); + + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) + goto out_err; - memset(poly1305_key, 0, sizeof(poly1305_key)); - CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), key.data, iv.data, 0); + EVP_CIPHER_CTX_set_padding(ctx, 0); + + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1) + goto out_err; + if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) + goto out_err; + if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) + goto out_err; outp = enif_make_new_binary(env, in.size, &out); - CRYPTO_poly1305_init(&poly1305, poly1305_key); - poly1305_update_with_length(&poly1305, aad.data, aad.size); - CRYPTO_chacha_20(outp, in.data, in.size, key.data, iv.data, 1); - poly1305_update_with_length(&poly1305, outp, in.size); + if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) + goto out_err; + if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1) + goto out_err; + + tagp = enif_make_new_binary(env, 16, &out_tag); - CRYPTO_poly1305_finish(&poly1305, enif_make_new_binary(env, POLY1305_TAG_LEN, &out_tag)); + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, tagp) != 1) + goto out_err; + + EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, in); return enif_make_tuple2(env, out, out_tag); +out_err: + EVP_CIPHER_CTX_free(ctx); + return atom_error; #else return enif_raise_exception(env, atom_notsup); #endif @@ -2166,53 +2135,52 @@ static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ER static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key,Iv,AAD,In,Tag) */ #if defined(HAVE_CHACHA20_POLY1305) + EVP_CIPHER_CTX *ctx; + const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in, tag; unsigned char *outp; ERL_NIF_TERM out; - ErlNifUInt64 in_len_64; - unsigned char poly1305_key[32]; - unsigned char mac[POLY1305_TAG_LEN]; - poly1305_state poly1305; + int len; if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32 - || !enif_inspect_binary(env, argv[1], &iv) || iv.size != CHACHA20_NONCE_LEN + || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16 || !enif_inspect_iolist_as_binary(env, argv[2], &aad) || !enif_inspect_iolist_as_binary(env, argv[3], &in) - || !enif_inspect_iolist_as_binary(env, argv[4], &tag) || tag.size != POLY1305_TAG_LEN) { + || !enif_inspect_iolist_as_binary(env, argv[4], &tag) || tag.size != 16) { return enif_make_badarg(env); } - /* Take from OpenSSL patch set/LibreSSL: - * - * The underlying ChaCha implementation may not overflow the block - * counter into the second counter word. Therefore we disallow - * individual operations that work on more than 2TB at a time. - * in_len_64 is needed because, on 32-bit platforms, size_t is only - * 32-bits and this produces a warning because it's always false. - * Casting to uint64_t inside the conditional is not sufficient to stop - * the warning. */ - in_len_64 = in.size; - if (in_len_64 >= (1ULL << 32) * 64 - 64) - return enif_make_badarg(env); - - memset(poly1305_key, 0, sizeof(poly1305_key)); - CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), key.data, iv.data, 0); + cipher = EVP_chacha20_poly1305(); - CRYPTO_poly1305_init(&poly1305, poly1305_key); - poly1305_update_with_length(&poly1305, aad.data, aad.size); - poly1305_update_with_length(&poly1305, in.data, in.size); - CRYPTO_poly1305_finish(&poly1305, mac); + ctx = EVP_CIPHER_CTX_new(); - if (memcmp(mac, tag.data, POLY1305_TAG_LEN) != 0) - return atom_error; + if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) + goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1) + goto out_err; + if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) + goto out_err; + if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) + goto out_err; outp = enif_make_new_binary(env, in.size, &out); - CRYPTO_chacha_20(outp, in.data, in.size, key.data, iv.data, 1); + if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) + goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag.size, tag.data) != 1) + goto out_err; + if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) + goto out_err; + + EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, in); return out; + +out_err: + EVP_CIPHER_CTX_free(ctx); + return atom_error; #else return enif_raise_exception(env, atom_notsup); #endif diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 0c3b7a0445..31f4e89ffe 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -2249,16 +2249,49 @@ aes_gcm() -> 1} %% TagLength ]. -%% http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04 +%% https://tools.ietf.org/html/rfc7539#appendix-A.5 chacha20_poly1305() -> [ - {chacha20_poly1305, hexstr2bin("4290bcb154173531f314af57f3be3b500" %% Key - "6da371ece272afa1b5dbdd1100a1007"), - hexstr2bin("86d09974840bded2a5ca"), %% PlainText - hexstr2bin("cd7cf67be39c794a"), %% Nonce - hexstr2bin("87e229d4500845a079c0"), %% AAD - hexstr2bin("e3e446f7ede9a19b62a4"), %% CipherText - hexstr2bin("677dabf4e3d24b876bb284753896e1d6")} %% CipherTag + {chacha20_poly1305, + hexstr2bin("1c9240a5eb55d38af333888604f6b5f0" %% Key + "473917c1402b80099dca5cbc207075c0"), + hexstr2bin("496e7465726e65742d44726166747320" %% PlainText + "61726520647261667420646f63756d65" + "6e74732076616c696420666f72206120" + "6d6178696d756d206f6620736978206d" + "6f6e74687320616e64206d6179206265" + "20757064617465642c207265706c6163" + "65642c206f72206f62736f6c65746564" + "206279206f7468657220646f63756d65" + "6e747320617420616e792074696d652e" + "20497420697320696e617070726f7072" + "6961746520746f2075736520496e7465" + "726e65742d4472616674732061732072" + "65666572656e6365206d617465726961" + "6c206f7220746f206369746520746865" + "6d206f74686572207468616e20617320" + "2fe2809c776f726b20696e2070726f67" + "726573732e2fe2809d"), + hexstr2bin("000000000102030405060708"), %% Nonce + hexstr2bin("f33388860000000000004e91"), %% AAD + hexstr2bin("64a0861575861af460f062c79be643bd" %% CipherText + "5e805cfd345cf389f108670ac76c8cb2" + "4c6cfc18755d43eea09ee94e382d26b0" + "bdb7b73c321b0100d4f03b7f355894cf" + "332f830e710b97ce98c8a84abd0b9481" + "14ad176e008d33bd60f982b1ff37c855" + "9797a06ef4f0ef61c186324e2b350638" + "3606907b6a7c02b0f9f6157b53c867e4" + "b9166c767b804d46a59b5216cde7a4e9" + "9040c5a40433225ee282a1b0a06c523e" + "af4534d7f83fa1155b0047718cbc546a" + "0d072b04b3564eea1b422273f548271a" + "0bb2316053fa76991955ebd63159434e" + "cebb4e466dae5a1073a6727627097a10" + "49e617d91d361094fa68f0ff77987130" + "305beaba2eda04df997b714d6c6f2c29" + "a6ad5cb4022b02709b"), + hexstr2bin("eead9d67890cbb22392336fea1851f38")} %% CipherTag ]. rsa_plain() -> -- cgit v1.2.3 From af81f344da4b89a896fc712cb194f4e97fc1209f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 29 Dec 2016 14:47:52 +0100 Subject: crypto: algo_ciper was too small after cipher additions --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 68784cd24c..38b49c7a76 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -920,7 +920,7 @@ static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; static ERL_NIF_TERM algo_pubkey[7]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; -static ERL_NIF_TERM algo_cipher[23]; /* increase when extending the list */ +static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { -- cgit v1.2.3 From 24af5238589a2b0c4a153ead9e2f37506870f94c Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Sun, 8 Jan 2017 18:40:32 -0800 Subject: Add RSA key generation Support RSA key generation using generate_key(rsa, {bits, e}). This depends on the currently-experimental "dirty scheduler" support because key generation is a potentially lengthy process. --- lib/crypto/c_src/crypto.c | 200 ++++++++++++++++++++++++++++++++++++++- lib/crypto/doc/src/crypto.xml | 15 +-- lib/crypto/src/crypto.erl | 9 ++ lib/crypto/test/crypto_SUITE.erl | 26 ++++- 4 files changed, 240 insertions(+), 10 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 38b49c7a76..ba011c3317 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -42,6 +42,7 @@ #endif /* #ifndef OPENSSL_NO_DES */ /* #include This is not supported on the openssl OTP requires */ #include +#include #include #include #include @@ -238,9 +239,19 @@ static void HMAC_CTX_free(HMAC_CTX *ctx) #define EVP_MD_CTX_new() EVP_MD_CTX_create() #define EVP_MD_CTX_free(ctx) EVP_MD_CTX_destroy(ctx) +static INLINE void *BN_GENCB_get_arg(BN_GENCB *cb); + +static INLINE void *BN_GENCB_get_arg(BN_GENCB *cb) +{ + return cb->arg; +} + static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); +static INLINE void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d); static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); +static INLINE void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); +static INLINE void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp); static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { @@ -250,6 +261,13 @@ static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) return 1; } +static INLINE void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) +{ + *n = r->n; + *e = r->e; + *d = r->d; +} + static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) { r->p = p; @@ -257,6 +275,12 @@ static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) return 1; } +static INLINE void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) +{ + *p = r->p; + *q = r->q; +} + static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) { r->dmp1 = dmp1; @@ -265,6 +289,13 @@ static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM return 1; } +static INLINE void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp) +{ + *dmp1 = r->dmp1; + *dmq1 = r->dmq1; + *iqmp = r->iqmp; +} + static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); @@ -320,7 +351,11 @@ DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) *priv_key = dh->priv_key; } -#endif /* End of compatibility definitions. */ +#else /* End of compatibility definitions. */ + +#define HAVE_OPAQUE_BN_GENCB + +#endif /* NIF interface declarations */ static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info); @@ -358,6 +393,7 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -391,6 +427,7 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg); static int term2point(ErlNifEnv* env, ERL_NIF_TERM term, EC_GROUP *group, EC_POINT **pptr); #endif +static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn); static int library_refc = 0; /* number of users of this dynamic library */ @@ -428,6 +465,7 @@ static ErlNifFunc nif_funcs[] = { {"dss_sign_nif", 3, dss_sign_nif}, {"rsa_public_crypt", 4, rsa_public_crypt}, {"rsa_private_crypt", 4, rsa_private_crypt}, + {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, {"dh_generate_parameters_nif", 2, dh_generate_parameters_nif}, {"dh_check", 1, dh_check}, {"dh_generate_key_nif", 3, dh_generate_key_nif}, @@ -462,6 +500,7 @@ static ERL_NIF_TERM atom_true; static ERL_NIF_TERM atom_false; static ERL_NIF_TERM atom_sha; static ERL_NIF_TERM atom_error; +static ERL_NIF_TERM atom_openssl; static ERL_NIF_TERM atom_rsa_pkcs1_padding; static ERL_NIF_TERM atom_rsa_pkcs1_oaep_padding; static ERL_NIF_TERM atom_rsa_no_padding; @@ -791,6 +830,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_sha = enif_make_atom(env,"sha"); atom_error = enif_make_atom(env,"error"); + atom_openssl = enif_make_atom(env, "openssl"), atom_rsa_pkcs1_padding = enif_make_atom(env,"rsa_pkcs1_padding"); atom_rsa_pkcs1_oaep_padding = enif_make_atom(env,"rsa_pkcs1_oaep_padding"); atom_rsa_no_padding = enif_make_atom(env,"rsa_no_padding"); @@ -877,6 +917,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function); } #endif /* OPENSSL_THREADS */ + + ERR_load_crypto_strings(); + return 0; } @@ -1630,6 +1673,34 @@ static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] #endif } +static ERL_NIF_TERM raise_openssl_error(ErlNifEnv* env) +{ + ERL_NIF_TERM error_stack, error_triplet, error_tuple; + + error_stack = enif_make_list(env, 0); + for(;;) { + unsigned long next_error; + const char *libname, *funcname, *reason; + + next_error = ERR_get_error(); + if (!next_error) + break; + + libname = ERR_lib_error_string(next_error); + funcname = ERR_func_error_string(next_error); + reason = ERR_reason_error_string(next_error); + +#define TO_STRING(s) ((s)? enif_make_string(env, s, ERL_NIF_LATIN1) : atom_unknown) + error_triplet = enif_make_tuple3(env, TO_STRING(libname), TO_STRING(funcname), TO_STRING(reason)); +#undef TO_STRING + + error_stack = enif_make_list_cell(env, error_triplet, error_stack); + } + + error_tuple = enif_make_tuple2(env, atom_openssl, error_stack); + return enif_raise_exception(env, enif_make_tuple2(env, atom_error, error_tuple)); +} + static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Key, Ivec, Text, IsEncrypt) or (Type, Key, Text, IsEncrypt) */ struct cipher_type_t *cipherp = NULL; @@ -2231,6 +2302,20 @@ static int get_bn_from_bin(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp) return 1; } +static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn) +{ + int bn_len; + unsigned char *bin_ptr; + ERL_NIF_TERM term; + + /* Copy the bignum into an erlang binary. */ + bn_len = BN_num_bytes(bn); + bin_ptr = enif_make_new_binary(env, bn_len, &term); + BN_bn2bin(bn, bin_ptr); + + return term; +} + static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Lo,Hi) */ BIGNUM *bn_from = NULL, *bn_to, *bn_rand; @@ -2802,6 +2887,119 @@ static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE } } +/* Creates a term which can be parsed by get_rsa_private_key(). This is a list of plain integer binaries (not mpints). */ +static ERL_NIF_TERM put_rsa_private_key(ErlNifEnv* env, const RSA *rsa) +{ + ERL_NIF_TERM result[8]; + const BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp; + + /* Return at least [E,N,D] */ + n = NULL; e = NULL; d = NULL; + RSA_get0_key(rsa, &n, &e, &d); + + result[0] = bin_from_bn(env, e); // Exponent E + result[1] = bin_from_bn(env, n); // Modulus N = p*q + result[2] = bin_from_bn(env, d); // Exponent D + + /* Check whether the optional additional parameters are available */ + p = NULL; q = NULL; + RSA_get0_factors(rsa, &p, &q); + dmp1 = NULL; dmq1 = NULL; iqmp = NULL; + RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); + + if (p && q && dmp1 && dmq1 && iqmp) { + result[3] = bin_from_bn(env, p); // Factor p + result[4] = bin_from_bn(env, q); // Factor q + result[5] = bin_from_bn(env, dmp1); // D mod (p-1) + result[6] = bin_from_bn(env, dmq1); // D mod (q-1) + result[7] = bin_from_bn(env, iqmp); // (1/q) mod p + + return enif_make_list_from_array(env, result, 8); + } else { + return enif_make_list_from_array(env, result, 3); + } +} + +static int check_erlang_interrupt(int maj, int min, BN_GENCB *ctxt) +{ + ErlNifEnv *env = BN_GENCB_get_arg(ctxt); + + if (!enif_is_current_process_alive(env)) { + return 0; + } else { + return 1; + } +} + +static ERL_NIF_TERM rsa_generate_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (ModulusSize, PublicExponent) */ + int modulus_bits; + BIGNUM *pub_exp, *three; + RSA *rsa; + int success; + ERL_NIF_TERM result; + BN_GENCB *intr_cb; +#ifndef HAVE_OPAQUE_BN_GENCB + BN_GENCB intr_cb_buf; +#endif + + if (!enif_get_int(env, argv[0], &modulus_bits) || modulus_bits < 256) { + return enif_make_badarg(env); + } + + if (!get_bn_from_bin(env, argv[1], &pub_exp)) { + return enif_make_badarg(env); + } + + /* Make sure the public exponent is large enough (at least 3). + * Without this, RSA_generate_key_ex() can run forever. */ + three = BN_new(); + BN_set_word(three, 3); + success = BN_cmp(pub_exp, three); + BN_free(three); + if (success < 0) { + BN_free(pub_exp); + return enif_make_badarg(env); + } + + /* For large keys, prime generation can take many seconds. Set up + * the callback which we use to test whether the process has been + * interrupted. */ +#ifdef HAVE_OPAQUE_BN_GENCB + intr_cb = BN_GENCB_new(); +#else + intr_cb = &intr_cb_buf; +#endif + BN_GENCB_set(intr_cb, check_erlang_interrupt, env); + + rsa = RSA_new(); + success = RSA_generate_key_ex(rsa, modulus_bits, pub_exp, intr_cb); + BN_free(pub_exp); + +#ifdef HAVE_OPAQUE_BN_GENCB + BN_GENCB_free(intr_cb); +#endif + + if (!success) { + RSA_free(rsa); + return raise_openssl_error(env); + } + + result = put_rsa_private_key(env, rsa); + RSA_free(rsa); + + return result; +} + +static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{ + /* RSA key generation can take a long time (>1 sec for a large + * modulus), so schedule it as a CPU-bound operation. */ + return enif_schedule_nif(env, "rsa_generate_key", + ERL_NIF_DIRTY_JOB_CPU_BOUND, + rsa_generate_key, argc, argv); +} + static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrimeLen, Generator) */ int prime_len, generator; diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index cbf141b3b0..102db8984a 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -298,22 +298,25 @@ generate_key(Type, Params) -> {PublicKey, PrivKeyOut} generate_key(Type, Params, PrivKeyIn) -> {PublicKey, PrivKeyOut} - Generates a public keys of type Type + Generates a public key of type Type - Type = dh | ecdh | srp - Params = dh_params() | ecdh_params() | SrpUserParams | SrpHostParams + Type = dh | ecdh | rsa | srp + Params = dh_params() | ecdh_params() | RsaParams | SrpUserParams | SrpHostParams + RsaParams = {ModulusSizeInBits::integer(), PublicExponent::key_value()} SrpUserParams = {user, [Generator::binary(), Prime::binary(), Version::atom()]} SrpHostParams = {host, [Verifier::binary(), Generator::binary(), Prime::binary(), Version::atom()]} - PublicKey = dh_public() | ecdh_public() | srp_public() + PublicKey = dh_public() | ecdh_public() | rsa_public() | srp_public() PrivKeyIn = undefined | dh_private() | ecdh_private() | srp_private() - PrivKeyOut = dh_private() | ecdh_private() | srp_private() + PrivKeyOut = dh_private() | ecdh_private() | rsa_private() | srp_private() -

Generates public keys of type Type. +

Generates a public key of type Type. See also public_key:generate_key/1 May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

+

RSA key generation is only available if the runtime was built with the + experimental dirty scheduler feature.

diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 0b62964efa..d4a2a51697 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -445,6 +445,10 @@ generate_key(srp, {user, [Generator, Prime, Version]}, PrivateArg) end, user_srp_gen_key(Private, Generator, Prime); +generate_key(rsa, {ModulusSize, PublicExponent}, undefined) -> + Private = rsa_generate_key_nif(ModulusSize, ensure_int_as_bin(PublicExponent)), + { lists:sublist(Private, 2), Private }; + generate_key(ecdh, Curve, PrivKey) -> ec_key_generate(nif_curve_params(Curve), ensure_int_as_bin(PrivKey)). @@ -780,6 +784,11 @@ rsa_verify_nif(_Type, _Digest, _Signature, _Key) -> ?nif_stub. ecdsa_verify_nif(_Type, _Digest, _Signature, _Curve, _Key) -> ?nif_stub. %% Public Keys -------------------------------------------------------------------- +%% RSA Rivest-Shamir-Adleman functions +%% + +rsa_generate_key_nif(_Bits, _Exp) -> ?nif_stub. + %% DH Diffie-Hellman functions %% diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 31f4e89ffe..fbee0ad9b7 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -119,7 +119,8 @@ groups() -> {sha384, [], [hash, hmac]}, {sha512, [], [hash, hmac]}, {rsa, [], [sign_verify, - public_encrypt + public_encrypt, + generate ]}, {dss, [], [sign_verify]}, {ecdsa, [], [sign_verify]}, @@ -247,6 +248,21 @@ init_per_testcase(cmac, Config) -> % The CMAC functionality was introduced in OpenSSL 1.0.1 {skip, "OpenSSL is too old"} end; +init_per_testcase(generate, Config) -> + case proplists:get_value(type, Config) of + rsa -> + % RSA key generation is a lengthy process, and is only available + % if dirty CPU scheduler support was enabled for this runtime. + case try erlang:system_info(dirty_cpu_schedulers) of + N -> N > 0 + catch + error:badarg -> false + end of + true -> Config; + false -> {skip, "RSA key generation requires dirty scheduler support."} + end; + _ -> Config + end; init_per_testcase(_Name,Config) -> Config. @@ -756,7 +772,10 @@ do_generate({ecdh = Type, Curve, Priv, Pub}) -> ok; {Other, _} -> ct:fail({{crypto, generate_key, [Type, Priv, Curve]}, {expected, Pub}, {got, Other}}) - end. + end; +do_generate({rsa = Type, Mod, Exp}) -> + {Pub,Priv} = crypto:generate_key(Type, {Mod,Exp}), + do_sign_verify({rsa, sha256, Pub, Priv, rsa_plain()}). notsup(Fun, Args) -> Result = @@ -1008,7 +1027,8 @@ group_config(rsa = Type, Config) -> rsa_oaep(), no_padding() ], - [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc} | Config]; + Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], + [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), Public = dss_params() ++ [dss_public()], -- cgit v1.2.3 From 6d2eb58ee86e3fe36e61f00dbe443ee8d49c421f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 17 Jan 2017 09:06:25 +0800 Subject: Add a missing aes_gcm -spec clause to crypto:block_encrypt/4 Fix https://bugs.erlang.org/browse/ERL-336. --- lib/crypto/src/crypto.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index da8626e38a..a87b480f60 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -277,10 +277,11 @@ hmac_final_n(Context, HashLen) -> des3_cbc | des3_cbf | des3_cfb | des_ede3 | blowfish_cbc | blowfish_cfb64 | blowfish_ofb64 | aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | aes_ige256 | - aes_cbc | + aes_cbc | rc2_cbc, - Key::iodata(), Ivec::binary(), Data::iodata()) -> binary(); - (aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata()}) -> {binary(), binary()}. + Key::iodata(), Ivec::binary(), Data::iodata()) -> binary(); + (aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata()}) -> {binary(), binary()}; + (aes_gcm, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata(), TagLength::1..16}) -> {binary(), binary()}. block_encrypt(Type, Key, Ivec, Data) when Type =:= des_cbc; Type =:= des_cfb; -- cgit v1.2.3 From 81da5f7f12eb1da9d9e8f4508d76681f527ad57c Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Tue, 17 Jan 2017 22:55:16 -0800 Subject: Remove the RSA-1024 test case. If the underlying library is in FIPS mode, it'll refuse to generate keys shorter than 2048 bits. --- lib/crypto/test/crypto_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index fbee0ad9b7..1d7037d003 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1027,7 +1027,7 @@ group_config(rsa = Type, Config) -> rsa_oaep(), no_padding() ], - Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], + Generate = [{rsa, 2048, 3}, {rsa, 3072, 65537}], [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), -- cgit v1.2.3 From a00ff322e4cbe72c698eff22e4a4d5f6bb33e067 Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Wed, 18 Jan 2017 21:41:50 -0800 Subject: Update the documentation for RSA key generation to reflect that dirty schedulers are no longer considered "experimental", per a comment from sverker. --- lib/crypto/doc/src/crypto.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 102db8984a..32144613e0 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -315,8 +315,11 @@ May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

-

RSA key generation is only available if the runtime was built with the - experimental dirty scheduler feature.

+ +

RSA key generation is only available if the runtime was + built with dirty scheduler support. Otherwise, attempting to + generate an RSA key will throw exception notsup.

+
-- cgit v1.2.3 From fcbcc330e733e62ae75c7748ae254e368ce97033 Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Wed, 18 Jan 2017 21:43:27 -0800 Subject: Minor punctuation fixes in the crypto documentation. --- lib/crypto/doc/src/crypto.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 32144613e0..440c5bd204 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -77,7 +77,7 @@ rsa_private() = [key_value()] = [E, N, D] | [E, N, D, P1, P2, E1, E2, C]

Where E is the public exponent, N is public modulus and D is - the private exponent.The longer key format contains redundant + the private exponent. The longer key format contains redundant information that will make the calculation faster. P1,P2 are first and second prime factors. E1,E2 are first and second exponents. C is the CRT coefficient. Terminology is taken from RFC 3447.

@@ -311,7 +311,7 @@

Generates a public key of type Type. - See also public_key:generate_key/1 + See also public_key:generate_key/1. May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

-- cgit v1.2.3 From 6468551301f906ce4199ef69b677147d88d64242 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Jan 2017 18:54:06 +0100 Subject: crypto: Added optional length to paramlist in generate_key --- lib/crypto/c_src/crypto.c | 18 ++++++++++++++---- lib/crypto/src/crypto.erl | 16 +++++++++++----- 2 files changed, 25 insertions(+), 9 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index c100fc8ee2..ffa51bcfae 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -61,7 +61,6 @@ #include #include - /* Helper macro to construct a OPENSSL_VERSION_NUMBER. * See openssl/opensslv.h */ @@ -326,7 +325,7 @@ static ErlNifFunc nif_funcs[] = { {"rsa_private_crypt", 4, rsa_private_crypt}, {"dh_generate_parameters_nif", 2, dh_generate_parameters_nif}, {"dh_check", 1, dh_check}, - {"dh_generate_key_nif", 3, dh_generate_key_nif}, + {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, {"srp_value_B_nif", 5, srp_value_B_nif}, {"srp_user_secret_nif", 7, srp_user_secret_nif}, @@ -2727,12 +2726,13 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] } static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (PrivKey, DHParams=[P,G], Mpint) */ +{/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ DH* dh_params; int pub_len, prv_len; unsigned char *pub_ptr, *prv_ptr; ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail; int mpint; /* 0 or 4 */ + unsigned long len = 0; dh_params = DH_new(); @@ -2743,11 +2743,21 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ || !enif_get_list_cell(env, tail, &head, &tail) || !get_bn_from_bin(env, head, &dh_params->g) || !enif_is_empty_list(env, tail) - || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4)) { + || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4) + || !enif_get_ulong(env, argv[3], &len) ) { DH_free(dh_params); return enif_make_badarg(env); } + if (len) { + if (len < BN_num_bits(dh_params->p)) + dh_params->length = len; + else { + DH_free(dh_params); + return enif_make_badarg(env); + } + } + if (DH_generate_key(dh_params)) { pub_len = BN_num_bytes(dh_params->pub_key); prv_len = BN_num_bytes(dh_params->priv_key); diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index a87b480f60..deeb763145 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -547,9 +547,15 @@ exor(Bin1, Bin2) -> generate_key(Type, Params) -> generate_key(Type, Params, undefined). -generate_key(dh, DHParameters, PrivateKey) -> +generate_key(dh, DHParameters0, PrivateKey) -> + {DHParameters, Len} = + case DHParameters0 of + [P,G,L] -> {[P,G], L}; + [P,G] -> {[P,G], 0} + end, dh_generate_key_nif(ensure_int_as_bin(PrivateKey), - map_ensure_int_as_bin(DHParameters), 0); + map_ensure_int_as_bin(DHParameters), + 0, Len); generate_key(srp, {host, [Verifier, Generator, Prime, Version]}, PrivArg) when is_binary(Verifier), is_binary(Generator), is_binary(Prime), is_atom(Version) -> @@ -1201,11 +1207,11 @@ dh_check([_Prime,_Gen]) -> ?nif_stub. {binary(),binary()}. dh_generate_key(DHParameters) -> - dh_generate_key_nif(undefined, map_mpint_to_bin(DHParameters), 4). + dh_generate_key_nif(undefined, map_mpint_to_bin(DHParameters), 4, 0). dh_generate_key(PrivateKey, DHParameters) -> - dh_generate_key_nif(mpint_to_bin(PrivateKey), map_mpint_to_bin(DHParameters), 4). + dh_generate_key_nif(mpint_to_bin(PrivateKey), map_mpint_to_bin(DHParameters), 4, 0). -dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint) -> ?nif_stub. +dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint, _Length) -> ?nif_stub. %% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] %% MyPrivKey, OthersPublicKey = mpint() -- cgit v1.2.3 From 497fc8de10bfee9eb693d393c270d8e06dbd15be Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 30 Jan 2017 13:12:06 +0100 Subject: ssh,crypto: prepare for release --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 6dcb28ec8a..e3fb89ced2 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.6.3 +CRYPTO_VSN = 3.6.3.1 -- cgit v1.2.3 From 5c8949e156c6bfd9925e8344e9aa7208b998697a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Jan 2017 18:54:06 +0100 Subject: crypto: Added optional length to paramlist in generate_key Conflicts: lib/crypto/c_src/crypto.c --- lib/crypto/c_src/crypto.c | 17 ++++++++++++++--- lib/crypto/src/crypto.erl | 16 +++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 4966701e41..b39653bcb8 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -403,7 +403,7 @@ static ErlNifFunc nif_funcs[] = { {"rsa_private_crypt", 4, rsa_private_crypt}, {"dh_generate_parameters_nif", 2, dh_generate_parameters_nif}, {"dh_check", 1, dh_check}, - {"dh_generate_key_nif", 3, dh_generate_key_nif}, + {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, {"srp_value_B_nif", 5, srp_value_B_nif}, {"srp_user_secret_nif", 7, srp_user_secret_nif}, @@ -3062,12 +3062,13 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] } static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (PrivKey, DHParams=[P,G], Mpint) */ +{/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ DH* dh_params; int pub_len, prv_len; unsigned char *pub_ptr, *prv_ptr; ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail; int mpint; /* 0 or 4 */ + unsigned long len = 0; CHECK_OSE_CRYPTO(); @@ -3080,11 +3081,21 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ || !enif_get_list_cell(env, tail, &head, &tail) || !get_bn_from_bin(env, head, &dh_params->g) || !enif_is_empty_list(env, tail) - || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4)) { + || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4) + || !enif_get_ulong(env, argv[3], &len) ) { DH_free(dh_params); return enif_make_badarg(env); } + if (len) { + if (len < BN_num_bits(dh_params->p)) + dh_params->length = len; + else { + DH_free(dh_params); + return enif_make_badarg(env); + } + } + if (DH_generate_key(dh_params)) { pub_len = BN_num_bytes(dh_params->pub_key); prv_len = BN_num_bytes(dh_params->priv_key); diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 38e71591f3..1150fd60e0 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -574,9 +574,15 @@ exor(Bin1, Bin2) -> generate_key(Type, Params) -> generate_key(Type, Params, undefined). -generate_key(dh, DHParameters, PrivateKey) -> +generate_key(dh, DHParameters0, PrivateKey) -> + {DHParameters, Len} = + case DHParameters0 of + [P,G,L] -> {[P,G], L}; + [P,G] -> {[P,G], 0} + end, dh_generate_key_nif(ensure_int_as_bin(PrivateKey), - map_ensure_int_as_bin(DHParameters), 0); + map_ensure_int_as_bin(DHParameters), + 0, Len); generate_key(srp, {host, [Verifier, Generator, Prime, Version]}, PrivArg) when is_binary(Verifier), is_binary(Generator), is_binary(Prime), is_atom(Version) -> @@ -1555,11 +1561,11 @@ dh_check([_Prime,_Gen]) -> ?nif_stub. {binary(),binary()}. dh_generate_key(DHParameters) -> - dh_generate_key_nif(undefined, map_mpint_to_bin(DHParameters), 4). + dh_generate_key_nif(undefined, map_mpint_to_bin(DHParameters), 4, 0). dh_generate_key(PrivateKey, DHParameters) -> - dh_generate_key_nif(mpint_to_bin(PrivateKey), map_mpint_to_bin(DHParameters), 4). + dh_generate_key_nif(mpint_to_bin(PrivateKey), map_mpint_to_bin(DHParameters), 4, 0). -dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint) -> ?nif_stub. +dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint, _Length) -> ?nif_stub. %% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] %% MyPrivKey, OthersPublicKey = mpint() -- cgit v1.2.3 From 4751ac228fc09c6421f521b9e5a1a0f2b2eebade Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 1 Feb 2017 18:32:57 +0100 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 0138eb6ad2..425a3dd437 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,23 @@

This document describes the changes made to the Crypto application.

+
Crypto 3.6.3.1 + +
Improvements and New Features + + +

+ Key exchange algorithms + diffie-hellman-group-exchange-sha* optimized, up to a + factor of 11 for the slowest ( = biggest and safest) one.

+

+ Own Id: OTP-14169 Aux Id: seq-13261

+
+
+
+ +
+
Crypto 3.6.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d5d53966bff6ca9ab0c40ab96404d425d7438729 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 2 Feb 2017 17:25:51 +0100 Subject: ssh: document crypto:genarate_key(dh, [P,G,L]) --- lib/crypto/doc/src/crypto.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index eda0f7af51..b6a1371154 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -100,7 +100,7 @@ dh_private() = key_value() - dh_params() = [key_value()] = [P, G] + dh_params() = [key_value()] = [P, G] | [P, G, PrivateKeyBitLength] ecdh_public() = key_value() -- cgit v1.2.3 From ea530357b27635278ae8a3260e735ea39df5c283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 3 Feb 2017 12:05:49 +0100 Subject: Fix merge commit This fixes commit f0867aa2ccbbf5677e0577bba08f8b7bc53ec0ed --- lib/crypto/vsn.mk | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index f4d1c7b4ba..38e2db9033 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1,5 +1 @@ -<<<<<<< HEAD CRYPTO_VSN = 3.7.2 -======= -CRYPTO_VSN = 3.6.3.1 ->>>>>>> maint-18 -- cgit v1.2.3 From 7a033e602d31a661d6891fc2ce8ccc7589186bbe Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 1 Mar 2017 16:44:15 +0100 Subject: crypto: Enable usage of LibreSSL --- lib/crypto/c_src/crypto.c | 46 ++++++++++++++++++++++++++++++++++++-- lib/crypto/c_src/crypto_callback.h | 2 +- 2 files changed, 45 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 44c3fc4f06..9b5e1736a8 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -71,6 +71,46 @@ PACKED_OPENSSL_VERSION(MAJ,MIN,FIX,('a'-1)) +/* LibreSSL was cloned from OpenSSL 1.0.1g and claims to be API and BPI compatible + * with 1.0.1. + * + * LibreSSL has the same names on include files and symbols as OpenSSL, but defines + * the OPENSSL_VERSION_NUMBER to be >= 2.0.0 + * + * Therefor works tests like this as intendend: + * OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + * (The test is for example "2.4.2" >= "1.0.0" although the test + * with the cloned OpenSSL test would be "1.0.1" >= "1.0.0") + * + * But tests like this gives wrong result: + * OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) + * (The test is false since "2.4.2" < "1.1.0". It should have been + * true because the LibreSSL API version is "1.0.1") + * + */ + +#ifdef LIBRESSL_VERSION_NUMBER +/* A macro to test on in this file */ +#define HAS_LIBRESSL +#endif + +#ifdef HAS_LIBRESSL +/* LibreSSL dislikes FIPS */ +# ifdef FIPS_SUPPORT +# undef FIPS_SUPPORT +# endif + +/* LibreSSL wants the 1.0.1 API */ +# define NEED_EVP_COMPATIBILITY_FUNCTIONS +#endif + + +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) +# define NEED_EVP_COMPATIBILITY_FUNCTIONS +#endif + + + #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) #include #endif @@ -120,7 +160,9 @@ #endif #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0) -# define HAVE_CHACHA20_POLY1305 +# ifndef HAS_LIBRESSL +# define HAVE_CHACHA20_POLY1305 +# endif #endif #if OPENSSL_VERSION_NUMBER <= PACKED_OPENSSL_VERSION(0,9,8,'l') @@ -205,8 +247,8 @@ do { \ } \ } while (0) -#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) +#ifdef NEED_EVP_COMPATIBILITY_FUNCTIONS /* * In OpenSSL 1.1.0, most structs are opaque. That means that * the structs cannot be allocated as automatic variables on the diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h index 2641cc0c8b..489810116f 100644 --- a/lib/crypto/c_src/crypto_callback.h +++ b/lib/crypto/c_src/crypto_callback.h @@ -19,7 +19,7 @@ */ #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifdef NEED_EVP_COMPATIBILITY_FUNCTIONS # define CCB_FILE_LINE_ARGS #else # define CCB_FILE_LINE_ARGS , const char *file, int line -- cgit v1.2.3 From f7610977cb2370e2bf54531ad7d6bcd051e6b27c Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 7 Mar 2017 16:31:30 +0100 Subject: crypto: removed error function from PR and added error handling in crypto.erl --- lib/crypto/c_src/crypto.c | 35 +---------------------------------- lib/crypto/src/crypto.erl | 9 +++++++-- 2 files changed, 8 insertions(+), 36 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ba011c3317..42cf7ac37b 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -42,7 +42,6 @@ #endif /* #ifndef OPENSSL_NO_DES */ /* #include This is not supported on the openssl OTP requires */ #include -#include #include #include #include @@ -500,7 +499,6 @@ static ERL_NIF_TERM atom_true; static ERL_NIF_TERM atom_false; static ERL_NIF_TERM atom_sha; static ERL_NIF_TERM atom_error; -static ERL_NIF_TERM atom_openssl; static ERL_NIF_TERM atom_rsa_pkcs1_padding; static ERL_NIF_TERM atom_rsa_pkcs1_oaep_padding; static ERL_NIF_TERM atom_rsa_no_padding; @@ -830,7 +828,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_sha = enif_make_atom(env,"sha"); atom_error = enif_make_atom(env,"error"); - atom_openssl = enif_make_atom(env, "openssl"), atom_rsa_pkcs1_padding = enif_make_atom(env,"rsa_pkcs1_padding"); atom_rsa_pkcs1_oaep_padding = enif_make_atom(env,"rsa_pkcs1_oaep_padding"); atom_rsa_no_padding = enif_make_atom(env,"rsa_no_padding"); @@ -918,8 +915,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) } #endif /* OPENSSL_THREADS */ - ERR_load_crypto_strings(); - return 0; } @@ -1673,34 +1668,6 @@ static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] #endif } -static ERL_NIF_TERM raise_openssl_error(ErlNifEnv* env) -{ - ERL_NIF_TERM error_stack, error_triplet, error_tuple; - - error_stack = enif_make_list(env, 0); - for(;;) { - unsigned long next_error; - const char *libname, *funcname, *reason; - - next_error = ERR_get_error(); - if (!next_error) - break; - - libname = ERR_lib_error_string(next_error); - funcname = ERR_func_error_string(next_error); - reason = ERR_reason_error_string(next_error); - -#define TO_STRING(s) ((s)? enif_make_string(env, s, ERL_NIF_LATIN1) : atom_unknown) - error_triplet = enif_make_tuple3(env, TO_STRING(libname), TO_STRING(funcname), TO_STRING(reason)); -#undef TO_STRING - - error_stack = enif_make_list_cell(env, error_triplet, error_stack); - } - - error_tuple = enif_make_tuple2(env, atom_openssl, error_stack); - return enif_raise_exception(env, enif_make_tuple2(env, atom_error, error_tuple)); -} - static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Key, Ivec, Text, IsEncrypt) or (Type, Key, Text, IsEncrypt) */ struct cipher_type_t *cipherp = NULL; @@ -2982,7 +2949,7 @@ static ERL_NIF_TERM rsa_generate_key(ErlNifEnv* env, int argc, const ERL_NIF_TER if (!success) { RSA_free(rsa); - return raise_openssl_error(env); + return atom_error; } result = put_rsa_private_key(env, rsa); diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index d4a2a51697..046fae674b 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -446,8 +446,13 @@ generate_key(srp, {user, [Generator, Prime, Version]}, PrivateArg) user_srp_gen_key(Private, Generator, Prime); generate_key(rsa, {ModulusSize, PublicExponent}, undefined) -> - Private = rsa_generate_key_nif(ModulusSize, ensure_int_as_bin(PublicExponent)), - { lists:sublist(Private, 2), Private }; + case rsa_generate_key_nif(ModulusSize, ensure_int_as_bin(PublicExponent)) of + error -> + erlang:error(computation_failed, + [rsa,{ModulusSize,PublicExponent}]); + Private -> + {lists:sublist(Private, 2), Private} + end; generate_key(ecdh, Curve, PrivKey) -> ec_key_generate(nif_curve_params(Curve), ensure_int_as_bin(PrivKey)). -- cgit v1.2.3 From 7c8bcb4ea083d2c4c9893fc0597528c39b5f845c Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 9 Mar 2017 15:41:11 +0100 Subject: crypto: Uppdate crypto.app.src for dirty_scheduler dependency in ERTS --- lib/crypto/src/crypto.app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src index 460894c012..3bf4279ae1 100644 --- a/lib/crypto/src/crypto.app.src +++ b/lib/crypto/src/crypto.app.src @@ -25,6 +25,6 @@ {registered, []}, {applications, [kernel, stdlib]}, {env, [{fips_mode, false}]}, - {runtime_dependencies, ["erts-6.0","stdlib-2.0","kernel-3.0"]}]}. + {runtime_dependencies, ["erts-9.0","stdlib-3.4","kernel-5.3"]}]}. -- cgit v1.2.3 From c6270678e0c4297440c2b191ad500b33ed18af5f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 9 Mar 2017 15:25:21 +0100 Subject: crypto: Document exceptions thrown in crypto:generate_key --- lib/crypto/doc/src/crypto.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 440c5bd204..3192ec0de8 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -312,13 +312,17 @@

Generates a public key of type Type. See also public_key:generate_key/1. - May throw exception low_entropy in case the random generator - failed due to lack of secure "randomness". -

+ May throw exception an exception of class error: +

+ + badarg: an argument is of wrong type or has an illegal value, + low_entropy: the random generator failed due to lack of secure "randomness", + computation_failed: the computation fails of another reason than low_entropy. +

RSA key generation is only available if the runtime was built with dirty scheduler support. Otherwise, attempting to - generate an RSA key will throw exception notsup.

+ generate an RSA key will throw exception error:notsup.

-- cgit v1.2.3 From 26c3cd82529836cb5b6eefbf7f92f318fd91f847 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 10 Mar 2017 15:00:46 +0100 Subject: Update copyright year --- lib/crypto/c_src/crypto.c | 2 +- lib/crypto/doc/src/crypto.xml | 2 +- lib/crypto/src/crypto.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ffa51bcfae..2c8fb445dd 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2010-2016. All Rights Reserved. + * Copyright Ericsson AB 2010-2017. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index b6a1371154..82e450ec21 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -4,7 +4,7 @@
- 19992016 + 19992017 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index deeb763145..696929ba4e 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. +%% Copyright Ericsson AB 1999-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. -- cgit v1.2.3 From 4d658008be5a08ddadbe75ebadb9ef124436b76e Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 14 Mar 2017 15:59:23 +0100 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 18 ++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 53ea6bb58b..37997b649b 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,24 @@

This document describes the changes made to the Crypto application.

+
Crypto 3.7.3 + +
Improvements and New Features + + +

+ The implementation of the key exchange algorithms + diffie-hellman-group-exchange-sha* are optimized, up to a + factor of 11 for the slowest ( = biggest and safest) + group size.

+

+ Own Id: OTP-14169 Aux Id: seq-13261

+
+
+
+ +
+
Crypto 3.7.2
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 38e2db9033..81cb2f8130 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.2 +CRYPTO_VSN = 3.7.3 -- cgit v1.2.3 From d07008a0562d1f83dcab144fdec9fd920deb2b96 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sun, 12 Mar 2017 17:20:00 +0000 Subject: Support generation of strong random numbers --- lib/crypto/c_src/crypto.c | 34 +++++++++++++++++++++++++++ lib/crypto/doc/src/crypto.xml | 46 ++++++++++++++++++++++++++++++++---- lib/crypto/src/crypto.erl | 39 ++++++++++++++++++++++++++++++- lib/crypto/test/crypto_SUITE.erl | 50 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 163 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index b2f31870b9..0e17279e62 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -429,6 +429,7 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM strong_rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -501,6 +502,7 @@ static ErlNifFunc nif_funcs[] = { {"aes_ctr_stream_encrypt", 2, aes_ctr_stream_encrypt}, {"aes_ctr_stream_decrypt", 2, aes_ctr_stream_encrypt}, {"strong_rand_bytes_nif", 1, strong_rand_bytes_nif}, + {"strong_rand_uniform_nif", 2, strong_rand_uniform_nif}, {"rand_uniform_nif", 2, rand_uniform_nif}, {"mod_exp_nif", 4, mod_exp_nif}, {"dss_verify_nif", 4, dss_verify_nif}, @@ -2331,6 +2333,38 @@ static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn) return term; } +static ERL_NIF_TERM strong_rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Lo,Hi) */ + BIGNUM *bn_from = NULL, *bn_to, *bn_rand; + unsigned char* data; + unsigned dlen; + ERL_NIF_TERM ret; + + if (!get_bn_from_mpint(env, argv[0], &bn_from) + || !get_bn_from_mpint(env, argv[1], &bn_rand)) { + if (bn_from) BN_free(bn_from); + return enif_make_badarg(env); + } + + bn_to = BN_new(); + BN_sub(bn_to, bn_rand, bn_from); + if (BN_rand_range(bn_rand, bn_to) != 1) { + ret = atom_false; + } + else { + BN_add(bn_rand, bn_rand, bn_from); + dlen = BN_num_bytes(bn_rand); + data = enif_make_new_binary(env, dlen+4, &ret); + put_int32(data, dlen); + BN_bn2bin(bn_rand, data+4); + ERL_VALGRIND_MAKE_MEM_DEFINED(data+4, dlen); + } + BN_free(bn_rand); + BN_free(bn_from); + BN_free(bn_to); + return ret; +} + static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Lo,Hi) */ BIGNUM *bn_from = NULL, *bn_to, *bn_rand; diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index d0deaceaaf..0697f6a202 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -658,10 +658,13 @@

Set the seed for PRNG to the given binary. This calls the - RAND_seed function from openssl. Only use this if the system - you are running on does not have enough "randomness" built in. - Normally this is when - strong_rand_bytes/1 returns low_entropy

+ RAND_seed function from openssl. Only use this if the system + you are running on does not have enough "randomness" built in. + Normally this is when either + strong_rand_bytes/1, + strong_rand_uniform/0 or + strong_rand_uniform/1 + throws low_entropy

@@ -728,6 +731,41 @@ failed due to lack of secure "randomness".

+ + + strong_rand_uniform() -> X + Generate a random floating point number between 0.0 and 1.0 + + X = float() + + +

Generates a random floating pointer number uniformly distributed + in the value range + Uses a cryptographically secure prng seeded and periodically mixed with operating system + provided entropy. By default this is the BN_rand_range method from OpenSSL.

+

May throw exception low_entropy in case the random generator + failed due to lack of secure "randomness".

+

The generated values shall present no more than 51 bits of effective entropy.

+
+
+ + + strong_rand_uniform(N) -> X + Generate a random positive integer between 1 and N + + N = pos_integer() + X = 1..N + + +

Generates a a random positive integer uniformly distributed + in the value range + Uses a cryptographically secure prng seeded and periodically mixed with operating system + provided entropy. By default this is the BN_rand_range method from OpenSSL.

+

May throw exception low_entropy in case the random generator + failed due to lack of secure "randomness".

+
+
+ stream_init(Type, Key) -> State diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 631af62615..4b386924cb 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -30,6 +30,8 @@ -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). +-export([strong_rand_uniform/0]). +-export([strong_rand_uniform/1]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -283,9 +285,11 @@ stream_decrypt(State, Data0) -> stream_crypt(fun do_stream_decrypt/2, State, Data, erlang:byte_size(Data), MaxByts, []). %% -%% RAND - pseudo random numbers using RN_ functions in crypto lib +%% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib %% -spec strong_rand_bytes(non_neg_integer()) -> binary(). +-spec strong_rand_uniform() -> float(). +-spec strong_rand_uniform(pos_integer()) -> pos_integer(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). @@ -297,6 +301,38 @@ strong_rand_bytes(Bytes) -> strong_rand_bytes_nif(_Bytes) -> ?nif_stub. +strong_rand_uniform() -> + Sign = 0, % positive + Exponent = 1023, % on the interval [1.0, 2.0[ + Fraction = strong_rand_uniform(1, 1 bsl 52), % the whole interval above (except 1.0) + <> = <>, + Value - 1.0. + +strong_rand_uniform(N) when is_integer(N), N >= 1 -> + 1 + strong_rand_uniform(0, N). + +strong_rand_uniform(From, To) when is_binary(From), is_binary(To) -> + case strong_rand_uniform_nif(From,To) of + false -> + erlang:error(low_entropy); + <> when MSB > 127 -> + <<(Len + 1):32/integer, 0, MSB, Rest/binary>>; + Whatever -> + Whatever + end; +strong_rand_uniform(From, To) when is_integer(From), is_integer(To), From < To -> + BinFrom = mpint(From), + BinTo = mpint(To), + case strong_rand_uniform(BinFrom, BinTo) of + Result when is_binary(Result) -> + erlint(Result); + Other -> + Other + end. + +strong_rand_uniform_nif(_From, _To) -> ?nif_stub. + + rand_uniform(From,To) when is_binary(From), is_binary(To) -> case rand_uniform_nif(From,To) of <> when MSB > 127 -> @@ -325,6 +361,7 @@ rand_uniform_pos(_,_) -> rand_uniform_nif(_From,_To) -> ?nif_stub. + -spec rand_seed(binary()) -> ok. rand_seed(Seed) -> rand_seed_nif(Seed). diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 1d7037d003..6e3a3879c4 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -36,7 +36,9 @@ all() -> {group, non_fips}, mod_pow, exor, - rand_uniform + rand_uniform, + strong_rand_uniform_float, + strong_rand_uniform_integer ]. groups() -> @@ -485,6 +487,44 @@ rand_uniform(Config) when is_list(Config) -> rand_uniform_aux_test(10), 10 = byte_size(crypto:strong_rand_bytes(10)). +%%-------------------------------------------------------------------- +strong_rand_uniform_float() -> + [{doc, "strong_rand_uniform float testing"}]. +strong_rand_uniform_float(Config) when is_list(Config) -> + Samples = [crypto:strong_rand_uniform() || _ <- lists:seq(1, 10000)], + allmap( + fun (V) -> + (V >= 0.0 andalso V < 1.0) + orelse {false, ct:fail({"Not in interval", V, 0.0, 1.0})} + end, + Samples). + +strong_rand_uniform_integer() -> + [{doc, "strong_rand_uniform integer testing"}]. +strong_rand_uniform_integer(Config) when is_list(Config) -> + MaxCeiling = 1 bsl 32, + Ceilings = [1 | % edge case where the ceiling equals the floor + [crypto:strong_rand_uniform(MaxCeiling) + || _ <- lists:seq(1, 99)]], + + allmap( + fun (Ceiling) -> + case Ceiling >= 1 andalso Ceiling =< MaxCeiling of + false -> + {false, ct:fail({"Ceiling not in interval", Ceiling, 1, MaxCeiling})}; + true -> + Samples = [crypto:strong_rand_uniform(Ceiling) + || _ <- lists:seq(1, 100)], + allmap( + fun (V) -> + (V >= 1 andalso V =< Ceiling) + orelse {false, ct:fail({"Sample not in interval", V, 1, Ceiling})} + end, + Samples) + end + end, + Ceilings). + %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- @@ -951,6 +991,14 @@ crypto_rand_uniform(L,H) -> ct:fail({"Not in interval", R1, L, H}) end. +allmap(_Fun, []) -> + true; +allmap(Fun, [H|T]) -> + case Fun(H) of + true -> allmap(Fun, T); + {false, Result} -> Result + end. + %%-------------------------------------------------------------------- %% Test data ------------------------------------------------ %%-------------------------------------------------------------------- -- cgit v1.2.3 From e50f63fbb2c974b4b8ad50095ca0b16a846fc161 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 18 Mar 2017 12:57:19 +0000 Subject: Restyle crypto strong numeric generators for usage in rand --- lib/crypto/c_src/crypto.c | 33 +++++++++---------------- lib/crypto/doc/src/crypto.xml | 28 +++++++++++----------- lib/crypto/src/crypto.erl | 52 +++++++++++++++++----------------------- lib/crypto/test/crypto_SUITE.erl | 46 +++++++++++++++++------------------ 4 files changed, 70 insertions(+), 89 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0e17279e62..b8ef08410c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -429,7 +429,7 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM strong_rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM strong_rand_range_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -502,7 +502,7 @@ static ErlNifFunc nif_funcs[] = { {"aes_ctr_stream_encrypt", 2, aes_ctr_stream_encrypt}, {"aes_ctr_stream_decrypt", 2, aes_ctr_stream_encrypt}, {"strong_rand_bytes_nif", 1, strong_rand_bytes_nif}, - {"strong_rand_uniform_nif", 2, strong_rand_uniform_nif}, + {"strong_rand_range_nif", 1, strong_rand_range_nif}, {"rand_uniform_nif", 2, rand_uniform_nif}, {"mod_exp_nif", 4, mod_exp_nif}, {"dss_verify_nif", 4, dss_verify_nif}, @@ -2333,35 +2333,24 @@ static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn) return term; } -static ERL_NIF_TERM strong_rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Lo,Hi) */ - BIGNUM *bn_from = NULL, *bn_to, *bn_rand; - unsigned char* data; - unsigned dlen; +static ERL_NIF_TERM strong_rand_range_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Range) */ + BIGNUM *bn_range, *bn_rand; ERL_NIF_TERM ret; - if (!get_bn_from_mpint(env, argv[0], &bn_from) - || !get_bn_from_mpint(env, argv[1], &bn_rand)) { - if (bn_from) BN_free(bn_from); - return enif_make_badarg(env); + if(!get_bn_from_bin(env, argv[0], &bn_range)) { + return enif_make_badarg(env); } - bn_to = BN_new(); - BN_sub(bn_to, bn_rand, bn_from); - if (BN_rand_range(bn_rand, bn_to) != 1) { + bn_rand = BN_new(); + if (BN_rand_range(bn_rand, bn_range) != 1) { ret = atom_false; } else { - BN_add(bn_rand, bn_rand, bn_from); - dlen = BN_num_bytes(bn_rand); - data = enif_make_new_binary(env, dlen+4, &ret); - put_int32(data, dlen); - BN_bn2bin(bn_rand, data+4); - ERL_VALGRIND_MAKE_MEM_DEFINED(data+4, dlen); + ret = bin_from_bn(env, bn_rand); } BN_free(bn_rand); - BN_free(bn_from); - BN_free(bn_to); + BN_free(bn_range); return ret; } diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 0697f6a202..dc725a41be 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -662,8 +662,8 @@ you are running on does not have enough "randomness" built in. Normally this is when either strong_rand_bytes/1, - strong_rand_uniform/0 or - strong_rand_uniform/1 + strong_rand_range/1 or + strong_rand_float/0 throws low_entropy

@@ -733,36 +733,36 @@ - strong_rand_uniform() -> X - Generate a random floating point number between 0.0 and 1.0 + strong_rand_range(N) -> binary() + Generate a random non-negative integer between 0 and N - X = float() + N = pos_integer() | binary() -

Generates a random floating pointer number uniformly distributed - in the value range +

Generates a random non-negative integer uniformly distributed + in the value range Uses a cryptographically secure prng seeded and periodically mixed with operating system provided entropy. By default this is the BN_rand_range method from OpenSSL.

+

Returns binary representation.

May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

-

The generated values shall present no more than 51 bits of effective entropy.

- strong_rand_uniform(N) -> X - Generate a random positive integer between 1 and N + strong_rand_float() -> X + Generate a random floating point number between 0.0 and 1.0 - N = pos_integer() - X = 1..N + X = float() -

Generates a a random positive integer uniformly distributed - in the value range +

Generates a random floating pointer number uniformly distributed + in the value range Uses a cryptographically secure prng seeded and periodically mixed with operating system provided entropy. By default this is the BN_rand_range method from OpenSSL.

May throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

+

The generated values shall present no more than 51 bits of effective entropy.

diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 4b386924cb..2c3208a3d5 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -30,8 +30,8 @@ -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). --export([strong_rand_uniform/0]). --export([strong_rand_uniform/1]). +-export([strong_rand_range/1]). +-export([strong_rand_float/0]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -288,8 +288,8 @@ stream_decrypt(State, Data0) -> %% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib %% -spec strong_rand_bytes(non_neg_integer()) -> binary(). --spec strong_rand_uniform() -> float(). --spec strong_rand_uniform(pos_integer()) -> pos_integer(). +-spec strong_rand_range(pos_integer() | binary()) -> binary(). +-spec strong_rand_float() -> float(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). @@ -301,36 +301,28 @@ strong_rand_bytes(Bytes) -> strong_rand_bytes_nif(_Bytes) -> ?nif_stub. -strong_rand_uniform() -> - Sign = 0, % positive - Exponent = 1023, % on the interval [1.0, 2.0[ - Fraction = strong_rand_uniform(1, 1 bsl 52), % the whole interval above (except 1.0) - <> = <>, - Value - 1.0. - -strong_rand_uniform(N) when is_integer(N), N >= 1 -> - 1 + strong_rand_uniform(0, N). - -strong_rand_uniform(From, To) when is_binary(From), is_binary(To) -> - case strong_rand_uniform_nif(From,To) of +strong_rand_range(Range) when is_integer(Range), Range > 0 -> + BinRange = int_to_bin(Range), + strong_rand_range(BinRange); +strong_rand_range(BinRange) when is_binary(BinRange) -> + case strong_rand_range_nif(BinRange) of false -> erlang:error(low_entropy); - <> when MSB > 127 -> - <<(Len + 1):32/integer, 0, MSB, Rest/binary>>; - Whatever -> - Whatever - end; -strong_rand_uniform(From, To) when is_integer(From), is_integer(To), From < To -> - BinFrom = mpint(From), - BinTo = mpint(To), - case strong_rand_uniform(BinFrom, BinTo) of - Result when is_binary(Result) -> - erlint(Result); - Other -> - Other + <> -> + BinResult end. -strong_rand_uniform_nif(_From, _To) -> ?nif_stub. +strong_rand_range_nif(_BinRange) -> ?nif_stub. + + +strong_rand_float() -> + % This could be optimized by having its own NIF + Sign = 0, % positive + Exponent = 1023, % on the interval [1.0, 2.0[ + BinFraction = strong_rand_range(1 bsl 52), % the whole interval above + Fraction = bin_to_int(BinFraction), + <> = <>, + Value - 1.0. rand_uniform(From,To) when is_binary(From), is_binary(To) -> diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 6e3a3879c4..0d80786fbc 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -37,8 +37,8 @@ all() -> mod_pow, exor, rand_uniform, - strong_rand_uniform_float, - strong_rand_uniform_integer + strong_rand_range, + strong_rand_float ]. groups() -> @@ -488,43 +488,43 @@ rand_uniform(Config) when is_list(Config) -> 10 = byte_size(crypto:strong_rand_bytes(10)). %%-------------------------------------------------------------------- -strong_rand_uniform_float() -> - [{doc, "strong_rand_uniform float testing"}]. -strong_rand_uniform_float(Config) when is_list(Config) -> - Samples = [crypto:strong_rand_uniform() || _ <- lists:seq(1, 10000)], - allmap( - fun (V) -> - (V >= 0.0 andalso V < 1.0) - orelse {false, ct:fail({"Not in interval", V, 0.0, 1.0})} - end, - Samples). - -strong_rand_uniform_integer() -> - [{doc, "strong_rand_uniform integer testing"}]. -strong_rand_uniform_integer(Config) when is_list(Config) -> +strong_rand_range() -> + [{doc, "strong_rand_range testing"}]. +strong_rand_range(Config) when is_list(Config) -> MaxCeiling = 1 bsl 32, - Ceilings = [1 | % edge case where the ceiling equals the floor - [crypto:strong_rand_uniform(MaxCeiling) + Ceilings = [1 | % edge case where only 0 can be generated + [binary:decode_unsigned(crypto:strong_rand_range(MaxCeiling), big) || _ <- lists:seq(1, 99)]], allmap( fun (Ceiling) -> - case Ceiling >= 1 andalso Ceiling =< MaxCeiling of + case Ceiling >= 0 andalso Ceiling < MaxCeiling of false -> - {false, ct:fail({"Ceiling not in interval", Ceiling, 1, MaxCeiling})}; + {false, ct:fail({"Ceiling not in interval", Ceiling, 0, MaxCeiling})}; true -> - Samples = [crypto:strong_rand_uniform(Ceiling) + Samples = [binary:decode_unsigned(crypto:strong_rand_range(Ceiling), big) || _ <- lists:seq(1, 100)], allmap( fun (V) -> - (V >= 1 andalso V =< Ceiling) - orelse {false, ct:fail({"Sample not in interval", V, 1, Ceiling})} + (V >= 0 andalso V < Ceiling) + orelse {false, ct:fail({"Sample not in interval", V, 0, Ceiling})} end, Samples) end end, Ceilings). +strong_rand_float() -> + [{doc, "strong_rand_float testing"}]. +strong_rand_float(Config) when is_list(Config) -> + Samples = [crypto:strong_rand_float() || _ <- lists:seq(1, 10000)], + allmap( + fun (V) -> + (V >= 0.0 andalso V < 1.0) + orelse {false, ct:fail({"Not in interval", V, 0.0, 1.0})} + end, + Samples). + %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- -- cgit v1.2.3 From 77039e648c8a62bfc4f0242531d5fd4874b29aad Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 18 Mar 2017 17:27:35 +0000 Subject: Support cryptographically strong rand plugin --- lib/crypto/doc/src/crypto.xml | 29 +++++++++++ lib/crypto/src/crypto.erl | 30 +++++++++++- lib/crypto/test/crypto_SUITE.erl | 102 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 159 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index dc725a41be..7a5bd62c26 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -766,6 +766,35 @@ + + rand_seed() -> rand:state() + Strong random number generation plugin state> + + Creates state object for random number generation, + in order to generate cryptographically strong random numbers + (based on OpenSSL's BN_rand_range), + and saves it on process dictionary before returning it as well. + See also rand:seed/1 + +

Example

+
+crypto:rand_seed(),
+_IntegerValue = rand:uniform(42), % [1; 42]
+_FloatValue = rand:uniform().     % [0.0; 1.0]
+
+
+ + + rand_seed_s() -> rand:state() + Strong random number generation plugin state> + + Creates state object for random number generation, + in order to generate cryptographically strongly random numbers + (based on OpenSSL's BN_rand_range). + See also rand:seed_s/1 + + + stream_init(Type, Key) -> State diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 2c3208a3d5..4ae7a9cdd6 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -32,6 +32,8 @@ -export([exor/2, strong_rand_bytes/1, mod_pow/3]). -export([strong_rand_range/1]). -export([strong_rand_float/0]). +-export([rand_seed/0]). +-export([rand_seed_s/0]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -290,6 +292,8 @@ stream_decrypt(State, Data0) -> -spec strong_rand_bytes(non_neg_integer()) -> binary(). -spec strong_rand_range(pos_integer() | binary()) -> binary(). -spec strong_rand_float() -> float(). +-spec rand_seed() -> rand:state(). +-spec rand_seed_s() -> rand:state(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). @@ -311,7 +315,6 @@ strong_rand_range(BinRange) when is_binary(BinRange) -> <> -> BinResult end. - strong_rand_range_nif(_BinRange) -> ?nif_stub. @@ -325,6 +328,31 @@ strong_rand_float() -> Value - 1.0. +rand_seed() -> + rand:seed(rand_seed_s()). + +rand_seed_s() -> + {#{ type => crypto, + max => infinity, + next => fun rand_plugin_next/1, + uniform => fun rand_plugin_uniform/1, + uniform_n => fun rand_plugin_uniform/2, + jump => fun rand_plugin_jump/1}, + no_seed}. + +rand_plugin_next(Seed) -> + {bytes_to_integer(strong_rand_range(1 bsl 64)), Seed}. + +rand_plugin_uniform(State) -> + {strong_rand_float(), State}. + +rand_plugin_uniform(Max, State) -> + {bytes_to_integer(strong_rand_range(Max)) + 1, State}. + +rand_plugin_jump(State) -> + State. + + rand_uniform(From,To) when is_binary(From), is_binary(To) -> case rand_uniform_nif(From,To) of <> when MSB > 127 -> diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 0d80786fbc..482a07d634 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -38,7 +38,9 @@ all() -> exor, rand_uniform, strong_rand_range, - strong_rand_float + strong_rand_float, + rand_plugin, + rand_plugin_s ]. groups() -> @@ -525,6 +527,17 @@ strong_rand_float(Config) when is_list(Config) -> end, Samples). +%%-------------------------------------------------------------------- +rand_plugin() -> + [{doc, "crypto rand plugin testing (implicit state / process dictionary)"}]. +rand_plugin(Config) when is_list(Config) -> + rand_plugin_aux(implicit_state). + +rand_plugin_s() -> + [{doc, "crypto rand plugin testing (explicit state)"}]. +rand_plugin_s(Config) when is_list(Config) -> + rand_plugin_aux(explicit_state). + %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- @@ -991,6 +1004,14 @@ crypto_rand_uniform(L,H) -> ct:fail({"Not in interval", R1, L, H}) end. +foldallmap(_Fun, AccN, []) -> + {true, AccN}; +foldallmap(Fun, AccN, [H|T]) -> + case Fun(H, AccN) of + {true, AccM} -> foldallmap(Fun, AccM, T); + {{false, Result}, AccM} -> {Result, AccM} + end. + allmap(_Fun, []) -> true; allmap(Fun, [H|T]) -> @@ -999,6 +1020,85 @@ allmap(Fun, [H|T]) -> {false, Result} -> Result end. +rand_plugin_aux(StateType) -> + {Seeder, SeedExporter, FloatGenerator, IntegerGenerator} = rand_plugin_functions(StateType), + State0 = Seeder(), + {crypto, no_seed} = SeedExporter(State0), + {FloatTestResult, State1} = rand_plugin_aux_floats(State0, FloatGenerator), + case FloatTestResult of + true -> + {IntegerTestResult, _State2} = rand_plugin_aux_integers(State1, IntegerGenerator), + IntegerTestResult; + {false, _} -> + FloatTestResult + end. + +% returns {Seeder, SeedExporter, FloatGenerator, IntegerGenerator} with consistent signatures +rand_plugin_functions(implicit_state) -> + {fun () -> crypto:rand_seed(), implicit_state end, + fun (implicit_state) -> rand:export_seed() end, + fun (implicit_state) -> {rand:uniform(), implicit_state} end, + fun (N, implicit_state) -> {rand:uniform(N), implicit_state} end}; +rand_plugin_functions(explicit_state) -> + {fun crypto:rand_seed_s/0, + fun rand:export_seed_s/1, + fun rand:uniform_s/1, + fun rand:uniform_s/2}. + +rand_plugin_aux_floats(State0, FloatGenerator) -> + {FloatSamples, State1} = + lists:mapfoldl( + fun (_, StateAcc) -> + FloatGenerator(StateAcc) + end, + State0, + lists:seq(1, 10000)), + + {allmap( + fun (V) -> + (V >= 0.0 andalso V < 1.0) + orelse {false, ct:fail({"Float sample not in interval", V, 0.0, 1.0})} + end, + FloatSamples), + State1}. + +rand_plugin_aux_integers(State0, IntegerGenerator) -> + MaxIntegerCeiling = 1 bsl 32, + {IntegerCeilings, State1} = + lists:mapfoldl( + fun (_, StateAcc) -> + IntegerGenerator(MaxIntegerCeiling, StateAcc) + end, + State0, + lists:seq(1, 100)), + + foldallmap( + fun (Ceiling, StateAcc) -> + case Ceiling >= 1 andalso Ceiling =< MaxIntegerCeiling of + false -> + {{false, ct:fail({"Integer ceiling not in interval", + Ceiling, 1, MaxIntegerCeiling})}, + StateAcc}; + true -> + foldallmap( + fun (_, SubStateAcc) -> + {Sample, NewSubStateAcc} = IntegerGenerator(Ceiling, SubStateAcc), + case Sample >= 1 andalso Sample =< Ceiling of + false -> + {{false, ct:fail({"Integer sample not in interval", + Sample, 1, Ceiling})}, + NewSubStateAcc}; + true -> + {true, NewSubStateAcc} + end + end, + StateAcc, + lists:seq(1, 100)) + end + end, + State1, + IntegerCeilings). + %%-------------------------------------------------------------------- %% Test data ------------------------------------------------ %%-------------------------------------------------------------------- -- cgit v1.2.3 From 5eae0dacf40ec60b09f0fdf761987e39320c4db0 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 18 Mar 2017 17:32:23 +0000 Subject: No longer expose strong_rand_(range|float) --- lib/crypto/doc/src/crypto.xml | 40 ++------------------------------- lib/crypto/src/crypto.erl | 48 ++++++++++++++++++---------------------- lib/crypto/test/crypto_SUITE.erl | 40 --------------------------------- 3 files changed, 23 insertions(+), 105 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 7a5bd62c26..36a1a2c2ee 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -660,10 +660,8 @@

Set the seed for PRNG to the given binary. This calls the RAND_seed function from openssl. Only use this if the system you are running on does not have enough "randomness" built in. - Normally this is when either - strong_rand_bytes/1, - strong_rand_range/1 or - strong_rand_float/0 + Normally this is when + strong_rand_bytes/1 throws low_entropy

@@ -732,40 +730,6 @@ - - strong_rand_range(N) -> binary() - Generate a random non-negative integer between 0 and N - - N = pos_integer() | binary() - - -

Generates a random non-negative integer uniformly distributed - in the value range - Uses a cryptographically secure prng seeded and periodically mixed with operating system - provided entropy. By default this is the BN_rand_range method from OpenSSL.

-

Returns binary representation.

-

May throw exception low_entropy in case the random generator - failed due to lack of secure "randomness".

-
-
- - - strong_rand_float() -> X - Generate a random floating point number between 0.0 and 1.0 - - X = float() - - -

Generates a random floating pointer number uniformly distributed - in the value range - Uses a cryptographically secure prng seeded and periodically mixed with operating system - provided entropy. By default this is the BN_rand_range method from OpenSSL.

-

May throw exception low_entropy in case the random generator - failed due to lack of secure "randomness".

-

The generated values shall present no more than 51 bits of effective entropy.

-
-
- rand_seed() -> rand:state() Strong random number generation plugin state> diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 4ae7a9cdd6..ad9245f8f2 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -30,8 +30,6 @@ -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). --export([strong_rand_range/1]). --export([strong_rand_float/0]). -export([rand_seed/0]). -export([rand_seed_s/0]). -export([rand_uniform/2]). @@ -290,8 +288,6 @@ stream_decrypt(State, Data0) -> %% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib %% -spec strong_rand_bytes(non_neg_integer()) -> binary(). --spec strong_rand_range(pos_integer() | binary()) -> binary(). --spec strong_rand_float() -> float(). -spec rand_seed() -> rand:state(). -spec rand_seed_s() -> rand:state(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> @@ -305,29 +301,6 @@ strong_rand_bytes(Bytes) -> strong_rand_bytes_nif(_Bytes) -> ?nif_stub. -strong_rand_range(Range) when is_integer(Range), Range > 0 -> - BinRange = int_to_bin(Range), - strong_rand_range(BinRange); -strong_rand_range(BinRange) when is_binary(BinRange) -> - case strong_rand_range_nif(BinRange) of - false -> - erlang:error(low_entropy); - <> -> - BinResult - end. -strong_rand_range_nif(_BinRange) -> ?nif_stub. - - -strong_rand_float() -> - % This could be optimized by having its own NIF - Sign = 0, % positive - Exponent = 1023, % on the interval [1.0, 2.0[ - BinFraction = strong_rand_range(1 bsl 52), % the whole interval above - Fraction = bin_to_int(BinFraction), - <> = <>, - Value - 1.0. - - rand_seed() -> rand:seed(rand_seed_s()). @@ -352,6 +325,27 @@ rand_plugin_uniform(Max, State) -> rand_plugin_jump(State) -> State. +strong_rand_range(Range) when is_integer(Range), Range > 0 -> + BinRange = int_to_bin(Range), + strong_rand_range(BinRange); +strong_rand_range(BinRange) when is_binary(BinRange) -> + case strong_rand_range_nif(BinRange) of + false -> + erlang:error(low_entropy); + <> -> + BinResult + end. +strong_rand_range_nif(_BinRange) -> ?nif_stub. + +strong_rand_float() -> + % This could be optimized by having its own NIF + Sign = 0, % positive + Exponent = 1023, % on the interval [1.0, 2.0[ + BinFraction = strong_rand_range(1 bsl 52), % the whole interval above + Fraction = bin_to_int(BinFraction), + <> = <>, + Value - 1.0. + rand_uniform(From,To) when is_binary(From), is_binary(To) -> case rand_uniform_nif(From,To) of diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 482a07d634..1b7456af18 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -37,8 +37,6 @@ all() -> mod_pow, exor, rand_uniform, - strong_rand_range, - strong_rand_float, rand_plugin, rand_plugin_s ]. @@ -489,44 +487,6 @@ rand_uniform(Config) when is_list(Config) -> rand_uniform_aux_test(10), 10 = byte_size(crypto:strong_rand_bytes(10)). -%%-------------------------------------------------------------------- -strong_rand_range() -> - [{doc, "strong_rand_range testing"}]. -strong_rand_range(Config) when is_list(Config) -> - MaxCeiling = 1 bsl 32, - Ceilings = [1 | % edge case where only 0 can be generated - [binary:decode_unsigned(crypto:strong_rand_range(MaxCeiling), big) - || _ <- lists:seq(1, 99)]], - - allmap( - fun (Ceiling) -> - case Ceiling >= 0 andalso Ceiling < MaxCeiling of - false -> - {false, ct:fail({"Ceiling not in interval", Ceiling, 0, MaxCeiling})}; - true -> - Samples = [binary:decode_unsigned(crypto:strong_rand_range(Ceiling), big) - || _ <- lists:seq(1, 100)], - allmap( - fun (V) -> - (V >= 0 andalso V < Ceiling) - orelse {false, ct:fail({"Sample not in interval", V, 0, Ceiling})} - end, - Samples) - end - end, - Ceilings). - -strong_rand_float() -> - [{doc, "strong_rand_float testing"}]. -strong_rand_float(Config) when is_list(Config) -> - Samples = [crypto:strong_rand_float() || _ <- lists:seq(1, 10000)], - allmap( - fun (V) -> - (V >= 0.0 andalso V < 1.0) - orelse {false, ct:fail({"Not in interval", V, 0.0, 1.0})} - end, - Samples). - %%-------------------------------------------------------------------- rand_plugin() -> [{doc, "crypto rand plugin testing (implicit state / process dictionary)"}]. -- cgit v1.2.3 From 4e44a1414bcdae81305f98d7789fdad00a0bc94d Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 20 Mar 2017 15:41:06 +0100 Subject: crypto: Deprecate crypto:rand_uniform/2 as it is not cryptographically strong rand module should be used if not cryptographically strong is required. If cryptographically strong is required, new cryptographically strong functions should be added to crypto. --- lib/crypto/src/crypto.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 631af62615..ce8add6559 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -40,6 +40,8 @@ -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). +-deprecated({rand_uniform, 2, next_major_release}). + %% This should correspond to the similar macro in crypto.c -define(MAX_BYTES_TO_NIF, 20000). %% Current value is: erlang:system_info(context_reductions) * 10 -- cgit v1.2.3 From 1f236ff5a8aaedc720b45420c3d53092435ecd52 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Wed, 22 Mar 2017 21:48:54 +0000 Subject: fixup! Support cryptographically strong rand plugin Be friendlier to Dialyzer --- lib/crypto/doc/src/crypto.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 36a1a2c2ee..3eee24769d 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -742,7 +742,7 @@

Example

-crypto:rand_seed(),
+_ = crypto:rand_seed(),
 _IntegerValue = rand:uniform(42), % [1; 42]
 _FloatValue = rand:uniform().     % [0.0; 1.0]
-- cgit v1.2.3 From 6f6c478401eefee1c8d7b200eb02d288739a7648 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Wed, 22 Mar 2017 21:49:38 +0000 Subject: fixup! Support cryptographically strong rand plugin Fix documented range (interval is half-open.) --- lib/crypto/doc/src/crypto.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 3eee24769d..30835a8447 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -744,7 +744,7 @@
 _ = crypto:rand_seed(),
 _IntegerValue = rand:uniform(42), % [1; 42]
-_FloatValue = rand:uniform().     % [0.0; 1.0]
+_FloatValue = rand:uniform(). % [0.0; 1.0[
-- cgit v1.2.3 From ec1e5bc7ff8101b7db4fa5d67bbbed652a9238c8 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Wed, 22 Mar 2017 21:56:28 +0000 Subject: Allow for crypto upgrades when using rand plugin --- lib/crypto/src/crypto.erl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index ad9245f8f2..777b5cd1c6 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -32,6 +32,10 @@ -export([exor/2, strong_rand_bytes/1, mod_pow/3]). -export([rand_seed/0]). -export([rand_seed_s/0]). +-export([rand_plugin_next/1]). +-export([rand_plugin_uniform/1]). +-export([rand_plugin_uniform/2]). +-export([rand_plugin_jump/1]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -305,12 +309,12 @@ rand_seed() -> rand:seed(rand_seed_s()). rand_seed_s() -> - {#{ type => crypto, + {#{ type => ?MODULE, max => infinity, - next => fun rand_plugin_next/1, - uniform => fun rand_plugin_uniform/1, - uniform_n => fun rand_plugin_uniform/2, - jump => fun rand_plugin_jump/1}, + next => fun ?MODULE:rand_plugin_next/1, + uniform => fun ?MODULE:rand_plugin_uniform/1, + uniform_n => fun ?MODULE:rand_plugin_uniform/2, + jump => fun ?MODULE:rand_plugin_jump/1}, no_seed}. rand_plugin_next(Seed) -> -- cgit v1.2.3 From c84e541b78cb9ee63a02db2240903ddd6131793a Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Wed, 22 Mar 2017 22:15:15 +0000 Subject: Attempt faster approach to strong random floats --- lib/crypto/src/crypto.erl | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 777b5cd1c6..d8bc13b537 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -49,6 +49,9 @@ %% This should correspond to the similar macro in crypto.c -define(MAX_BYTES_TO_NIF, 20000). %% Current value is: erlang:system_info(context_reductions) * 10 +%% Used by strong_rand_float/0 +-define(HALF_DBL_EPSILON, 1.1102230246251565e-16). % math:pow(2, -53) + %%-type ecdsa_digest_type() :: 'md5' | 'sha' | 'sha256' | 'sha384' | 'sha512'. -type crypto_integer() :: binary() | integer(). %%-type ec_named_curve() :: atom(). @@ -342,14 +345,8 @@ strong_rand_range(BinRange) when is_binary(BinRange) -> strong_rand_range_nif(_BinRange) -> ?nif_stub. strong_rand_float() -> - % This could be optimized by having its own NIF - Sign = 0, % positive - Exponent = 1023, % on the interval [1.0, 2.0[ - BinFraction = strong_rand_range(1 bsl 52), % the whole interval above - Fraction = bin_to_int(BinFraction), - <> = <>, - Value - 1.0. - + WholeRange = strong_rand_range(1 bsl 53), + ?HALF_DBL_EPSILON * bytes_to_integer(WholeRange). rand_uniform(From,To) when is_binary(From), is_binary(To) -> case rand_uniform_nif(From,To) of -- cgit v1.2.3 From 70bdb9e79429fb347c5437743d0e8f6851e0783d Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Mon, 27 Mar 2017 15:10:20 +0200 Subject: Add a no_native option wherever there is an on_load This is a poor man's solution that allows to build and test the system with all files compiled to native code simply by setting the ERL_COMPILER_OPTS environment variable. Better solutions, like automatically setting the no_native option whenever the compiler sees an on_load attribute, obviously exist but require more time to implement. --- lib/crypto/src/crypto.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index ce8add6559..d322765dff 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -56,6 +56,7 @@ %%-type ec_curve() :: ec_named_curve() | ec_curve_spec(). %%-type ec_key() :: {Curve :: ec_curve(), PrivKey :: binary() | undefined, PubKey :: ec_point() | undefined}. +-compile(no_native). -on_load(on_load/0). -define(CRYPTO_NIF_VSN,302). -- cgit v1.2.3 From 59099922f53a478903da304cc591c4baae549dc5 Mon Sep 17 00:00:00 2001 From: Kelly McLaughlin Date: Wed, 29 Mar 2017 07:24:46 -0600 Subject: Demonstrate the bug with AES CFB 128 encryption Demonstrate a bug with AES CFB 128 for certain key sizes introduced with the Erlang 19.0 release. The code in the block_crypt_nif function in the crypto.c source file incorrectly calls aes_cfb_8_crypt when the specified cipher is aes_cfb8 or aes_cfb128 and the key size is 24 or 32. The aes_cfb_8_crypt function calls the AES_cfb8_encrypt function from the openssl interface, but this is incorrect when the cipher is aes_cfb128. Unfortunately the test cases in the crypto test suite are insufficient to detect an issue like this because it exercises the encryption and decryption roundtrip using the same incorrect underlying function. The problem was observed when trying to update an application to Erlang 19 that attempted to decrypt data that was encrypted using aes_cfb128 by another source. In this commit I altered the crypto test suite to provide a demonstration of this problem. --- lib/crypto/c_src/crypto.c | 27 +++++++++++++++++++++++++++ lib/crypto/src/crypto.erl | 6 +++++- lib/crypto/test/crypto_SUITE.erl | 10 ++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 2c8fb445dd..cd375e6d50 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -231,6 +231,7 @@ static ERL_NIF_TERM hmac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM static ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM aes_cfb_128_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -301,6 +302,7 @@ static ErlNifFunc nif_funcs[] = { {"hmac_final_nif", 2, hmac_final_nif}, {"block_crypt_nif", 5, block_crypt_nif}, {"block_crypt_nif", 4, block_crypt_nif}, + {"aes_cfb_128_crypt_nif", 4, aes_cfb_128_crypt_nif}, {"aes_ige_crypt_nif", 4, aes_ige_crypt_nif}, {"aes_ctr_encrypt", 3, aes_ctr_encrypt}, @@ -1483,6 +1485,31 @@ static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM return ret; } +static ERL_NIF_TERM aes_cfb_128_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Key, IVec, Data, IsEncrypt) */ + ErlNifBinary key, ivec, text; + AES_KEY aes_key; + unsigned char ivec_clone[16]; /* writable copy */ + int new_ivlen = 0; + ERL_NIF_TERM ret; + + if (!enif_inspect_iolist_as_binary(env, argv[0], &key) + || !(key.size == 16 || key.size == 24 || key.size == 32) + || !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16 + || !enif_inspect_iolist_as_binary(env, argv[2], &text)) { + return enif_make_badarg(env); + } + + memcpy(ivec_clone, ivec.data, 16); + AES_set_encrypt_key(key.data, key.size * 8, &aes_key); + AES_cfb128_encrypt((unsigned char *) text.data, + enif_make_new_binary(env, text.size, &ret), + text.size, &aes_key, ivec_clone, &new_ivlen, + (argv[3] != atom_true)); + CONSUME_REDS(env,text); + return ret; +} + static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key, IVec, Data, IsEncrypt) */ #ifdef HAVE_AES_IGE diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 696929ba4e..60e0affda0 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -822,6 +822,8 @@ sha_mac_96(Key, Data) -> hmac(sha, Key, Data, 12). block_crypt_nif(_Type, _Key, _Ivec, _Text, _IsEncrypt) -> ?nif_stub. block_crypt_nif(_Type, _Key, _Text, _IsEncrypt) -> ?nif_stub. +aes_cfb_128_crypt_nif(_Key, _Ivec, _Text, _IsEncrypt) -> ?nif_stub. + check_des3_key(Key) -> case lists:map(fun erlang:iolist_to_binary/1, Key) of ValidKey = [B1, B2, B3] when byte_size(B1) =:= 8, @@ -915,7 +917,9 @@ blowfish_ofb64_encrypt(Key, IVec, Data) -> -spec aes_cfb_128_decrypt(iodata(), binary(), iodata()) -> binary(). aes_cfb_128_encrypt(Key, IVec, Data) -> - block_encrypt(aes_cfb128, Key, IVec, Data). + %% block_encrypt(aes_cfb128, Key, IVec, Data). + aes_cfb_128_crypt_nif(Key, IVec, Data, true). + aes_cfb_128_decrypt(Key, IVec, Data) -> block_decrypt(aes_cfb128, Key, IVec, Data). diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 7b07cef33f..dbd335c693 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -358,6 +358,16 @@ block_cipher({Type, Key, PlainText}) -> ct:fail({{crypto, block_decrypt, [Type, Key, CipherText]}, {expected, Plain}, {got, Other}}) end; +block_cipher({aes_cfb128, Key, IV, PlainText}) -> + Plain = iolist_to_binary(PlainText), + CipherText = crypto:aes_cfb_128_encrypt(Key, IV, PlainText), + case crypto:block_decrypt(aes_cfb128, Key, IV, CipherText) of + Plain -> + ok; + Other -> + ct:fail({{crypto, block_decrypt, [aes_cfb128, Key, IV, CipherText]}, {expected, Plain}, {got, Other}}) + end; + block_cipher({Type, Key, IV, PlainText}) -> Plain = iolist_to_binary(PlainText), CipherText = crypto:block_encrypt(Type, Key, IV, PlainText), -- cgit v1.2.3 From 25b8f8119f5b64b5c07cb5ed4978f7df64d4799f Mon Sep 17 00:00:00 2001 From: Kelly McLaughlin Date: Wed, 29 Mar 2017 08:49:17 -0600 Subject: Fix bug with AES CFB 128 Fix a bug with the use of the aes_cfb128 cipher by calling the correct underlying openssl interface function when the cipher is specified. --- lib/crypto/c_src/crypto.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index cd375e6d50..d4264335b6 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1405,13 +1405,20 @@ static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM return enif_raise_exception(env, atom_notsup); } - if ((argv[0] == atom_aes_cfb8 || argv[0] == atom_aes_cfb128) + if (argv[0] == atom_aes_cfb8 && (key.size == 24 || key.size == 32)) { /* Why do EVP_CIPHER_CTX_set_key_length() fail on these key sizes? * Fall back on low level API */ return aes_cfb_8_crypt(env, argc-1, argv+1); } + else if (argv[0] == atom_aes_cfb128 + && (key.size == 24 || key.size == 32)) { + /* Why do EVP_CIPHER_CTX_set_key_length() fail on these key sizes? + * Fall back on low level API + */ + return aes_cfb_128_crypt_nif(env, argc-1, argv+1); + } ivec_size = EVP_CIPHER_iv_length(cipher); -- cgit v1.2.3 From 71f7e9155c4867f4e8036704337c21127f508dfb Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 31 Mar 2017 12:58:36 +0200 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 81cb2f8130..f3e0623ac9 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.3 +CRYPTO_VSN = 3.7.4 -- cgit v1.2.3 From 19427107ca9305a931dcaea8c2134017aa385fbd Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 31 Mar 2017 12:59:07 +0200 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 37997b649b..887aeca680 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the Crypto application.

+
Crypto 3.7.4 + +
Fixed Bugs and Malfunctions + + +

+ Fix a bug with AES CFB 128 for 192 and 256 bit keys. + Thanks to kellymclaughlin !

+

+ Own Id: OTP-14313 Aux Id: PR-1393

+
+
+
+ +
+
Crypto 3.7.3
Improvements and New Features -- cgit v1.2.3 From e1a74e3077ca870520a748f29dd7c4b9115ce090 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Mon, 3 Apr 2017 12:29:23 +0200 Subject: Clean up documentation and test cases --- lib/crypto/doc/src/crypto.xml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 30835a8447..552d95d7dc 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -732,14 +732,17 @@ rand_seed() -> rand:state() - Strong random number generation plugin state> - - Creates state object for random number generation, - in order to generate cryptographically strong random numbers - (based on OpenSSL's BN_rand_range), - and saves it on process dictionary before returning it as well. - See also rand:seed/1 - + Strong random number generation plugin state + +

+ Creates state object for + random number generation, + in order to generate cryptographically strong random numbers + (based on OpenSSL's BN_rand_range), + and saves it on process dictionary before returning it as well. + See also + rand:seed/1. +

Example

 _ = crypto:rand_seed(),
@@ -750,12 +753,16 @@ _FloatValue = rand:uniform().     % [0.0; 1.0[
rand_seed_s() -> rand:state() - Strong random number generation plugin state> - - Creates state object for random number generation, - in order to generate cryptographically strongly random numbers - (based on OpenSSL's BN_rand_range). - See also rand:seed_s/1 + Strong random number generation plugin state + +

+ Creates state object for + random number generation, + in order to generate cryptographically strongly random numbers + (based on OpenSSL's BN_rand_range). + See also + rand:seed_s/1. +

-- cgit v1.2.3 From 6b20e866bab480a8dd23b869ff07d7aed631f1d7 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Fri, 7 Apr 2017 11:08:36 +0200 Subject: crypto: Update documentation to reflect new version policy --- lib/crypto/doc/src/crypto.xml | 2 +- lib/crypto/doc/src/crypto_app.xml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index d0deaceaaf..96fd735870 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -521,7 +521,7 @@ scheme. VerStr contains a text variant of the version.

 > info_lib().
-[{<<"OpenSSL">>,9469983,<<"OpenSSL 0.9.8a 11 Oct 2005">>}]
+[{<<"OpenSSL">>,269484095,<<"OpenSSL 1.1.0c  10 Nov 2016"">>}]
         

From OTP R16 the numeric version represents the version of the OpenSSL diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml index a958bdfcb7..6950dfeec3 100644 --- a/lib/crypto/doc/src/crypto_app.xml +++ b/lib/crypto/doc/src/crypto_app.xml @@ -42,9 +42,12 @@ DEPENDENCIES

The current crypto implementation uses nifs to interface - OpenSSLs crypto library and requires OpenSSL package - version 0.9.8 or higher. FIPS mode support requires at least - version 1.0.1 and a FIPS capable OpenSSL installation.

+ OpenSSLs crypto library and may work with limited functionality + with as old versions as OpenSSL 0.9.8c. + FIPS mode support requires at least + version 1.0.1 and a FIPS capable OpenSSL installation. We recommend using a + version that is officially supported by the OpenSSL project. API compatible backends like + LibreSSL should also work.

Source releases of OpenSSL can be downloaded from the OpenSSL project home page, or mirror sites listed there. -- cgit v1.2.3 From f1dc990550c01ad7373c4c4850f7d5b0cb924296 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 11 Apr 2017 12:00:42 +0200 Subject: crypto: Increase prime to pass with FIPS-enabled cryptolib Fix for problem introduced with OTP-14140 --- lib/crypto/test/crypto_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 1b7456af18..54bd729e7e 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1135,7 +1135,7 @@ group_config(rsa = Type, Config) -> rsa_oaep(), no_padding() ], - Generate = [{rsa, 2048, 3}, {rsa, 3072, 65537}], + Generate = [{rsa, 2048, 17}, {rsa, 3072, 65537}], [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), -- cgit v1.2.3 From 437555fd6c495915773b0f9ade7aad3fd0a73a1b Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Tue, 21 Mar 2017 16:36:33 +0100 Subject: Implement Xoroshiro116+ and improve statisticals Implement Xoroshiro116+ as 'exrop' with fixes. Deprecate all old algorithms but reincarnate 'exs1024' as 'exs1024s' and 'exsplus' as 'exsp' with fixes. Fixes: * Avoid skew for uniform integers caused by using a simple 'rem' operation for range confinement. Correctness requires retry with new random value for an unfortunate first value. * Implement a correct algorithm that collects enough random bits for ranges larger than the generator's precision. * Fix uniform density for floats by acquiring 53 bits then multiplying with 2.0^(-53) which produces floats on the form N * 2.0^(-53). --- lib/crypto/src/crypto.erl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 1287ec6176..765998b85d 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -35,7 +35,6 @@ -export([rand_plugin_next/1]). -export([rand_plugin_uniform/1]). -export([rand_plugin_uniform/2]). --export([rand_plugin_jump/1]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -316,11 +315,10 @@ rand_seed() -> rand_seed_s() -> {#{ type => ?MODULE, - max => infinity, + bits => 64, next => fun ?MODULE:rand_plugin_next/1, uniform => fun ?MODULE:rand_plugin_uniform/1, - uniform_n => fun ?MODULE:rand_plugin_uniform/2, - jump => fun ?MODULE:rand_plugin_jump/1}, + uniform_n => fun ?MODULE:rand_plugin_uniform/2}, no_seed}. rand_plugin_next(Seed) -> @@ -332,8 +330,6 @@ rand_plugin_uniform(State) -> rand_plugin_uniform(Max, State) -> {bytes_to_integer(strong_rand_range(Max)) + 1, State}. -rand_plugin_jump(State) -> - State. strong_rand_range(Range) when is_integer(Range), Range > 0 -> BinRange = int_to_bin(Range), -- cgit v1.2.3 From cc1ad6805e8eedbcd9e322cd9f9d6af5cf9a2e5f Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Thu, 30 Mar 2017 14:56:41 +0200 Subject: crypto: replace AES test vectors with NIST CAVP test data NIST's Cryptographic Algorithm Validation Program provides validation testing of FIPS-approved and NIST-recommended cryptographic algorithms. Instead of hard coding a limited set of test vectors, use their comprehensive validation set to test AES cipher modes. --- lib/crypto/test/Makefile | 1 + lib/crypto/test/crypto_SUITE.erl | 404 ++++++-------------------- lib/crypto/test/crypto_SUITE_data/KAT_AES.zip | Bin 0 -> 726299 bytes lib/crypto/test/crypto_SUITE_data/aesmmt.zip | Bin 0 -> 75959 bytes 4 files changed, 97 insertions(+), 308 deletions(-) create mode 100644 lib/crypto/test/crypto_SUITE_data/KAT_AES.zip create mode 100644 lib/crypto/test/crypto_SUITE_data/aesmmt.zip (limited to 'lib/crypto') diff --git a/lib/crypto/test/Makefile b/lib/crypto/test/Makefile index 5a81c84558..138081d386 100644 --- a/lib/crypto/test/Makefile +++ b/lib/crypto/test/Makefile @@ -77,6 +77,7 @@ release_spec: release_tests_spec: $(TEST_TARGET) $(INSTALL_DIR) "$(RELSYSDIR)" $(INSTALL_DATA) crypto.spec crypto.cover $(RELTEST_FILES) "$(RELSYSDIR)" + @tar cfh - crypto_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -) chmod -R u+w "$(RELSYSDIR)" release_docs_spec: diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 54bd729e7e..660ab80643 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -169,6 +169,10 @@ groups() -> %%------------------------------------------------------------------- init_per_suite(Config) -> + file:set_cwd(datadir(Config)), + {ok, _} = zip:unzip("KAT_AES.zip"), + {ok, _} = zip:unzip("aesmmt.zip"), + try crypto:start() of ok -> try crypto:strong_rand_bytes(1) of @@ -628,10 +632,15 @@ block_cipher({Type, Key, IV, PlainText, CipherText}) -> block_cipher_increment({Type, Key, IV, PlainTexts}) when Type == des_cbc; Type == aes_cbc; Type == des3_cbc -> block_cipher_increment(Type, Key, IV, IV, PlainTexts, iolist_to_binary(PlainTexts), []); +block_cipher_increment({Type, Key, IV, PlainTexts, CipherText}) + when Type == des_cbc; Type == des3_cbc -> + block_cipher_increment(Type, Key, IV, IV, PlainTexts, iolist_to_binary(PlainTexts), CipherText, []); block_cipher_increment({Type, Key, IV, PlainTexts, _CipherText}) when Type == aes_cbc -> Plain = iolist_to_binary(PlainTexts), Blocks = [iolistify(Block) || << Block:128/bitstring >> <= Plain], block_cipher_increment(Type, Key, IV, IV, Blocks, Plain, []); +block_cipher_increment({_Type, _, _, _, _}) -> + ok; block_cipher_increment({_Type, _, _, _}) -> ok; block_cipher_increment({_,_,_}) -> @@ -648,6 +657,17 @@ block_cipher_increment(Type, Key, IV0, IV, [PlainText | PlainTexts], Plain, Acc) CipherText = crypto:block_encrypt(Type, Key, IV, PlainText), NextIV = crypto:next_iv(Type, CipherText), block_cipher_increment(Type, Key, IV0, NextIV, PlainTexts, Plain, [CipherText | Acc]). +block_cipher_increment(Type, Key, IV0, _IV, [], _Plain, CipherText, Acc) -> + case iolist_to_binary(lists:reverse(Acc)) of + CipherText -> + ok; + Other -> + ct:fail({{crypto, block_decrypt, [Type, Key, IV0, CipherText]}, {expected, CipherText}, {got, Other}}) + end; +block_cipher_increment(Type, Key, IV0, IV, [PlainText | PlainTexts], Plain, CipherText, Acc) -> + CT = crypto:block_encrypt(Type, Key, IV, PlainText), + NextIV = crypto:next_iv(Type, CT), + block_cipher_increment(Type, Key, IV0, NextIV, PlainTexts, Plain, CipherText, [CT | Acc]). stream_cipher({Type, Key, PlainText}) -> Plain = iolist_to_binary(PlainText), @@ -812,6 +832,8 @@ notsup(Fun, Args) -> hexstr2point(X, Y) -> <<4:8, (hexstr2bin(X))/binary, (hexstr2bin(Y))/binary>>. +hexstr2bin(S) when is_binary(S) -> + list_to_binary(hexstr2list(binary_to_list(S))); hexstr2bin(S) -> list_to_binary(hexstr2list(S)). @@ -1189,16 +1211,16 @@ group_config(aes_cbc256 = Type, Config) -> Pairs = cmac_nist(Type), [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_ecb, Config) -> - Block = aes_ecb(), + Block = aes_ecb(Config), [{block, Block} | Config]; group_config(aes_ige256, Config) -> Block = aes_ige256(), [{block, Block} | Config]; group_config(aes_cfb8, Config) -> - Block = aes_cfb8(), + Block = aes_cfb8(Config), [{block, Block} | Config]; group_config(aes_cfb128, Config) -> - Block = aes_cfb128(), + Block = aes_cfb128(Config), [{block, Block} | Config]; group_config(blowfish_cbc, Config) -> Block = blowfish_cbc(), @@ -1219,13 +1241,13 @@ group_config(aes_ctr, Config) -> Stream = aes_ctr(), [{stream, Stream} | Config]; group_config(aes_gcm, Config) -> - AEAD = aes_gcm(), + AEAD = aes_gcm(Config), [{aead, AEAD} | Config]; group_config(chacha20_poly1305, Config) -> AEAD = chacha20_poly1305(), [{aead, AEAD} | Config]; group_config(aes_cbc, Config) -> - Block = aes_cbc(), + Block = aes_cbc(Config), [{block, Block} | Config]; group_config(_, Config) -> Config. @@ -1601,209 +1623,30 @@ rc2_cbc() -> }]. %% AES CBC test vectors from http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf -aes_cbc() -> - [ - %% F.2.1 CBC-AES128.Encrypt, F.2.2 CBC-AES128.Decrypt - {aes_cbc, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), %% Key - hexstr2bin("000102030405060708090a0b0c0d0e0f"), %% IV - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" %% PlainText - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710"), - hexstr2bin("7649abac8119b246cee98e9b12e9197d" %% CipherText - "5086cb9b507219ee95db113a917678b2" - "73bed6b8e3c1743b7116e69e22229516" - "3ff1caa1681fac09120eca307586e1a7")}, - %% F.2.3 CBC-AES192.Encrypt, F.2.4 CBC-AES192.Decrypt - {aes_cbc, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e5" %% Key - "62f8ead2522c6b7b"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), %% IV - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" %% PlainText - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710"), - hexstr2bin("4f021db243bc633d7178183a9fa071e8" %% CipherText - "b4d9ada9ad7dedf4e5e738763f69145a" - "571b242012fb7ae07fa9baac3df102e0" - "08b0e27988598881d920a9e64f5615cd")}, - %% F.2.5 CBC-AES256.Encrypt, F.2.6 CBC-AES256.Decrypt - {aes_cbc, - hexstr2bin("603deb1015ca71be2b73aef0857d7781" %% Key - "1f352c073b6108d72d9810a30914dff4"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), %% IV - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" %% PlainText - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710"), - hexstr2bin("f58c4c04d6e5f1ba779eabfb5f7bfbd6" %% CipherText - "9cfc4e967edb808d679f777bc6702c7d" - "39f23369a9d9bacfa530e26304231461" - "b2eb05e2c39be9fcda6c19078c6a9d1b")} - ]. - -aes_cbc128() -> - [{aes_cbc128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cbc128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("7649ABAC8119B246CEE98E9B12E9197D"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cbc128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("5086CB9B507219EE95DB113A917678B2"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cbc128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("73BED6B8E3C1743B7116E69E22229516"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")} - ]. - -aes_cbc256() -> - [{aes_cbc256, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("000102030405060708090A0B0C0D0E0F"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cbc256, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("F58C4C04D6E5F1BA779EABFB5F7BFBD6"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cbc256, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("9CFC4E967EDB808D679F777BC6702C7D"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cbc256, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("39F23369A9D9BACFA530E26304231461"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")} - ]. - -aes_ecb() -> - [ - {aes_ecb, - <<"YELLOW SUBMARINE">>, - <<"YELLOW SUBMARINE">>}, - {aes_ecb, - <<"0000000000000000">>, - <<"0000000000000000">>}, - {aes_ecb, - <<"FFFFFFFFFFFFFFFF">>, - <<"FFFFFFFFFFFFFFFF">>}, - {aes_ecb, - <<"3000000000000000">>, - <<"1000000000000001">>}, - {aes_ecb, - <<"1111111111111111">>, - <<"1111111111111111">>}, - {aes_ecb, - <<"0123456789ABCDEF">>, - <<"1111111111111111">>}, - {aes_ecb, - <<"0000000000000000">>, - <<"0000000000000000">>}, - {aes_ecb, - <<"FEDCBA9876543210">>, - <<"0123456789ABCDEF">>}, - {aes_ecb, - <<"7CA110454A1A6E57">>, - <<"01A1D6D039776742">>}, - {aes_ecb, - <<"0131D9619DC1376E">>, - <<"5CD54CA83DEF57DA">>}, - {aes_ecb, - <<"07A1133E4A0B2686">>, - <<"0248D43806F67172">>}, - {aes_ecb, - <<"3849674C2602319E">>, - <<"51454B582DDF440A">>}, - {aes_ecb, - <<"04B915BA43FEB5B6">>, - <<"42FD443059577FA2">>}, - {aes_ecb, - <<"0113B970FD34F2CE">>, - <<"059B5E0851CF143A">>}, - {aes_ecb, - <<"0170F175468FB5E6">>, - <<"0756D8E0774761D2">>}, - {aes_ecb, - <<"43297FAD38E373FE">>, - <<"762514B829BF486A">>}, - {aes_ecb, - <<"07A7137045DA2A16">>, - <<"3BDD119049372802">>}, - {aes_ecb, - <<"04689104C2FD3B2F">>, - <<"26955F6835AF609A">>}, - {aes_ecb, - <<"37D06BB516CB7546">>, - <<"164D5E404F275232">>}, - {aes_ecb, - <<"1F08260D1AC2465E">>, - <<"6B056E18759F5CCA">>}, - {aes_ecb, - <<"584023641ABA6176">>, - <<"004BD6EF09176062">>}, - {aes_ecb, - <<"025816164629B007">>, - <<"480D39006EE762F2">>}, - {aes_ecb, - <<"49793EBC79B3258F">>, - <<"437540C8698F3CFA">>}, - {aes_ecb, - <<"018310DC409B26D6">>, - <<"1D9D5C5018F728C2">>}, - {aes_ecb, - <<"1C587F1C13924FEF">>, - <<"305532286D6F295A">>}, - {aes_ecb, - <<"0101010101010101">>, - <<"0123456789ABCDEF">>}, - {aes_ecb, - <<"1F1F1F1F0E0E0E0E">>, - <<"0123456789ABCDEF">>}, - {aes_ecb, - <<"E0FEE0FEF1FEF1FE">>, - <<"0123456789ABCDEF">>}, - {aes_ecb, - <<"0000000000000000">>, - <<"FFFFFFFFFFFFFFFF">>}, - {aes_ecb, - <<"FFFFFFFFFFFFFFFF">>, - <<"0000000000000000">>}, - {aes_ecb, - <<"0123456789ABCDEF">>, - <<"0000000000000000">>}, - {aes_ecb, - <<"FEDCBA9876543210">>, - <<"FFFFFFFFFFFFFFFF">>}, - %% AES ECB test vectors from http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf - %% F.1.1 ECB-AES128.Encrypt, F.1.2 ECB-AES128.Decrypt - {aes_ecb, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710")}, - %% F.1.3 ECB-AES192.Encrypt, F.1.4 ECB-AES192.Decrypt - {aes_ecb, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e5" - "62f8ead2522c6b7b"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710")}, - %% F.1.5 ECB-AES256.Encrypt, F.1.6 ECB-AES256.Decrypt - {aes_ecb, - hexstr2bin("603deb1015ca71be2b73aef0857d7781" - "1f352c073b6108d72d9810a30914dff4"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710")} - ]. +aes_cbc(Config) -> + read_rsp(Config, aes_cbc, + ["CBCVarTxt128.rsp", "CBCVarKey128.rsp", "CBCGFSbox128.rsp", "CBCKeySbox128.rsp", + "CBCVarTxt192.rsp", "CBCVarKey192.rsp", "CBCGFSbox192.rsp", "CBCKeySbox192.rsp", + "CBCVarTxt256.rsp", "CBCVarKey256.rsp", "CBCGFSbox256.rsp", "CBCKeySbox256.rsp", + "CBCMMT128.rsp", "CBCMMT192.rsp", "CBCMMT256.rsp" + ]). + +aes_cbc128(Config) -> + read_rsp(Config, aes_cbc128, + ["CBCVarTxt128.rsp", "CBCVarKey128.rsp", "CBCGFSbox128.rsp", "CBCKeySbox128.rsp", + "CBCMMT128.rsp"]). + +aes_cbc256(Config) -> + read_rsp(Config, aes_cbc256, + ["CBCVarTxt256.rsp", "CBCVarKey256.rsp", "CBCGFSbox256.rsp", "CBCKeySbox256.rsp", + "CBCMMT256.rsp"]). + +aes_ecb(Config) -> + read_rsp(Config, aes_ecb, + ["ECBVarTxt128.rsp", "ECBVarKey128.rsp", "ECBGFSbox128.rsp", "ECBKeySbox128.rsp", + "ECBVarTxt192.rsp", "ECBVarKey192.rsp", "ECBGFSbox192.rsp", "ECBKeySbox192.rsp", + "ECBVarTxt256.rsp", "ECBVarKey256.rsp", "ECBGFSbox256.rsp", "ECBKeySbox256.rsp", + "ECBMMT128.rsp", "ECBMMT192.rsp", "ECBMMT256.rsp"]). aes_ige256() -> [{aes_ige256, @@ -1824,107 +1667,19 @@ aes_ige256() -> hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")} ]. -aes_cfb8() -> - [{aes_cfb8, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb8, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("3B3FD92EB72DAD20333449F8E83CFB4A"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb8, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("C8A64537A0B3A93FCDE3CDAD9F1CE58B"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb8, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("26751F67A3CBB140B1808CF187A4F4DF"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}, - {aes_cfb8, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb8, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("cdc80d6fddf18cab34c25909c99a4174"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb8, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("67ce7f7f81173621961a2b70171d3d7a"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb8, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("2e1e8a1dd59b88b1c8e60fed1efac4c9"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}, - {aes_cfb8, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb8, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("dc7e84bfda79164b7ecd8486985d3860"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb8, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("39ffed143b28b1c832113c6331e5407b"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb8, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("df10132415e54b92a13ed0a8267ae2f9"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")} - ]. +aes_cfb8(Config) -> + read_rsp(Config, aes_cfb8, + ["CFB8VarTxt128.rsp", "CFB8VarKey128.rsp", "CFB8GFSbox128.rsp", "CFB8KeySbox128.rsp", + "CFB8VarTxt192.rsp", "CFB8VarKey192.rsp", "CFB8GFSbox192.rsp", "CFB8KeySbox192.rsp", + "CFB8VarTxt256.rsp", "CFB8VarKey256.rsp", "CFB8GFSbox256.rsp", "CFB8KeySbox256.rsp", + "CFB8MMT128.rsp", "CFB8MMT192.rsp", "CFB8MMT256.rsp"]). -aes_cfb128() -> - [{aes_cfb128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("3B3FD92EB72DAD20333449F8E83CFB4A"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("C8A64537A0B3A93FCDE3CDAD9F1CE58B"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb128, - hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - hexstr2bin("26751F67A3CBB140B1808CF187A4F4DF"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}, - {aes_cfb128, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb128, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("cdc80d6fddf18cab34c25909c99a4174"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb128, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("67ce7f7f81173621961a2b70171d3d7a"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb128, - hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"), - hexstr2bin("2e1e8a1dd59b88b1c8e60fed1efac4c9"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}, - {aes_cfb128, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("000102030405060708090a0b0c0d0e0f"), - hexstr2bin("6bc1bee22e409f96e93d7e117393172a")}, - {aes_cfb128, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("dc7e84bfda79164b7ecd8486985d3860"), - hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")}, - {aes_cfb128, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("39ffed143b28b1c832113c6331e5407b"), - hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")}, - {aes_cfb128, - hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"), - hexstr2bin("df10132415e54b92a13ed0a8267ae2f9"), - hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")} - ]. +aes_cfb128(Config) -> + read_rsp(Config, aes_cfb128, + ["CFB128VarTxt128.rsp", "CFB128VarKey128.rsp", "CFB128GFSbox128.rsp", "CFB128KeySbox128.rsp", + "CFB128VarTxt192.rsp", "CFB128VarKey192.rsp", "CFB128GFSbox192.rsp", "CFB128KeySbox192.rsp", + "CFB128VarTxt256.rsp", "CFB128VarKey256.rsp", "CFB128GFSbox256.rsp", "CFB128KeySbox256.rsp", + "CFB128MMT128.rsp", "CFB128MMT192.rsp", "CFB128MMT256.rsp"]). blowfish_cbc() -> [{blowfish_cbc, @@ -2813,3 +2568,36 @@ int_to_bin_neg(-1, Ds=[MSB|_]) when MSB >= 16#80 -> list_to_binary(Ds); int_to_bin_neg(X,Ds) -> int_to_bin_neg(X bsr 8, [(X band 255)|Ds]). + +datadir(Config) -> + proplists:get_value(data_dir, Config). + +read_rsp(Config, Type, Files) -> + lists:reverse( + lists:foldl( + fun(FileName, AccIn) -> + AccOut = read_rsp_file(filename:join(datadir(Config), FileName), + Type, AccIn), + erlang:garbage_collect(), + AccOut + end, [], Files)). + +read_rsp_file(FileName, Type, Acc) -> + {ok, Raw} = file:read_file(FileName), + Split = binary:split(Raw, [<<"\r">>, <<"\n">>], [global, trim_all]), + parse_rsp(Type, Split, Acc). + +parse_rsp(_Type, [], Acc) -> + Acc; +parse_rsp(_Type, [<<"DECRYPT">>|_], Acc) -> + Acc; +%% AES format +parse_rsp(Type, [<<"COUNT = ", _/binary>>, + <<"KEY = ", Key/binary>>, + <<"IV = ", IV/binary>>, + <<"PLAINTEXT = ", PlainText/binary>>, + <<"CIPHERTEXT = ", CipherText/binary>>|Next], Acc) -> + parse_rsp(Type, Next, [{Type, hexstr2bin(Key), hexstr2bin(IV), + hexstr2bin(PlainText), hexstr2bin(CipherText)}|Acc]); +parse_rsp(Type, [_|Next], Acc) -> + parse_rsp(Type, Next, Acc). diff --git a/lib/crypto/test/crypto_SUITE_data/KAT_AES.zip b/lib/crypto/test/crypto_SUITE_data/KAT_AES.zip new file mode 100644 index 0000000000..128a74c52e Binary files /dev/null and b/lib/crypto/test/crypto_SUITE_data/KAT_AES.zip differ diff --git a/lib/crypto/test/crypto_SUITE_data/aesmmt.zip b/lib/crypto/test/crypto_SUITE_data/aesmmt.zip new file mode 100644 index 0000000000..5024de1d06 Binary files /dev/null and b/lib/crypto/test/crypto_SUITE_data/aesmmt.zip differ -- cgit v1.2.3 From 451563199b4558b273b7878d6760b035e48c7974 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Thu, 30 Mar 2017 15:00:20 +0200 Subject: crypto: replace AES CMAC test vectors with NIST CAVP suite --- lib/crypto/test/crypto_SUITE.erl | 87 ++++++++++----------- .../test/crypto_SUITE_data/cmactestvectors.zip | Bin 0 -> 8823056 bytes 2 files changed, 41 insertions(+), 46 deletions(-) create mode 100644 lib/crypto/test/crypto_SUITE_data/cmactestvectors.zip (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 660ab80643..cf91461155 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -172,6 +172,7 @@ init_per_suite(Config) -> file:set_cwd(datadir(Config)), {ok, _} = zip:unzip("KAT_AES.zip"), {ok, _} = zip:unzip("aesmmt.zip"), + {ok, _} = zip:unzip("cmactestvectors.zip"), try crypto:start() of ok -> @@ -1203,12 +1204,12 @@ group_config(rc2_cbc, Config) -> Block = rc2_cbc(), [{block, Block} | Config]; group_config(aes_cbc128 = Type, Config) -> - Block = aes_cbc128(), - Pairs = cmac_nist(Type), + Block = aes_cbc128(Config), + Pairs = cmac_nist(Config, Type), [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_cbc256 = Type, Config) -> - Block = aes_cbc256(), - Pairs = cmac_nist(Type), + Block = aes_cbc256(Config), + Pairs = cmac_nist(Config, Type), [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_ecb, Config) -> Block = aes_ecb(Config), @@ -2505,49 +2506,13 @@ ecc() -> end, TestCases). -%% Test data from Appendix D of NIST Special Publication 800-38B -%% http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf -%% The same AES128 test data are also in the RFC 4493 -%% https://tools.ietf.org/html/rfc4493 -cmac_nist(aes_cbc128 = Type) -> - Key = hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"), - [{Type, Key, <<"">>, - hexstr2bin("bb1d6929e95937287fa37d129b756746")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), - hexstr2bin("070a16b46b4d4144f79bdd9dd04a287c")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411"), - hexstr2bin("dfa66747de9ae63030ca32611497c827")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710"), - hexstr2bin("51f0bebf7e3b9d92fc49741779363cfe")}, - % truncation - {Type, Key, <<"">>, 4, - hexstr2bin("bb1d6929")}]; - -cmac_nist(aes_cbc256 = Type) -> - Key = hexstr2bin("603deb1015ca71be2b73aef0857d7781" - "1f352c073b6108d72d9810a30914dff4"), - [{Type, Key, <<"">>, - hexstr2bin("028962f61b7bf89efc6b551f4667d983")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a"), - hexstr2bin("28a7023f452e8f82bd4bf28d8c37c35c")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411"), - hexstr2bin("aaf3d8f1de5640c232f5b169b9c911e6")}, - {Type, Key, hexstr2bin("6bc1bee22e409f96e93d7e117393172a" - "ae2d8a571e03ac9c9eb76fac45af8e51" - "30c81c46a35ce411e5fbc1191a0a52ef" - "f69f2445df4f9b17ad2b417be66c3710"), - hexstr2bin("e1992190549f6ed5696a2c056c315410")}, - % truncation - {Type, Key, <<"">>, 4, - hexstr2bin("028962f6")}]. +cmac_nist(Config, aes_cbc128 = Type) -> + read_rsp(Config, Type, + ["CMACGenAES128.rsp", "CMACVerAES128.rsp"]); +cmac_nist(Config, aes_cbc256 = Type) -> + read_rsp(Config, Type, + ["CMACGenAES256.rsp", "CMACVerAES256.rsp"]). no_padding() -> Public = [_, Mod] = rsa_public_stronger(), @@ -2599,5 +2564,35 @@ parse_rsp(Type, [<<"COUNT = ", _/binary>>, <<"CIPHERTEXT = ", CipherText/binary>>|Next], Acc) -> parse_rsp(Type, Next, [{Type, hexstr2bin(Key), hexstr2bin(IV), hexstr2bin(PlainText), hexstr2bin(CipherText)}|Acc]); +%% CMAC format +parse_rsp(Type, [<<"Count = ", _/binary>>, + <<"Klen = ", _/binary>>, + <<"Mlen = ", Mlen/binary>>, + <<"Tlen = ", Tlen/binary>>, + <<"Key = ", Key/binary>>, + <<"Msg = ", Msg/binary>>, + <<"Mac = ", MAC/binary>>|Rest], Acc) -> + case Rest of + [<<"Result = P">>|Next] -> + parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Next, Acc); + [<<"Result = ", _/binary>>|Next] -> + parse_rsp(Type, Next, Acc); + _ -> + parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Rest, Acc) + end; + parse_rsp(Type, [_|Next], Acc) -> parse_rsp(Type, Next, Acc). + +parse_rsp_cmac(Type, Key0, Msg0, Mlen0, Tlen, MAC0, Next, Acc) -> + Key = hexstr2bin(Key0), + Mlen = binary_to_integer(Mlen0), + <> = hexstr2bin(Msg0), + MAC = hexstr2bin(MAC0), + + case binary_to_integer(Tlen) of + 0 -> + parse_rsp(Type, Next, [{Type, Key, Msg, MAC}|Acc]); + I -> + parse_rsp(Type, Next, [{Type, Key, Msg, I, MAC}|Acc]) + end. diff --git a/lib/crypto/test/crypto_SUITE_data/cmactestvectors.zip b/lib/crypto/test/crypto_SUITE_data/cmactestvectors.zip new file mode 100644 index 0000000000..0d52444e57 Binary files /dev/null and b/lib/crypto/test/crypto_SUITE_data/cmactestvectors.zip differ -- cgit v1.2.3 From 44ae0703c559f78c4d2681e4e2620bf47fe7afd6 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Thu, 30 Mar 2017 15:00:57 +0200 Subject: crypto: replace AES GCM test vectors with NIST CAVP suite --- lib/crypto/test/crypto_SUITE.erl | 323 +++------------------ .../test/crypto_SUITE_data/gcmtestvectors.zip | Bin 0 -> 9154174 bytes 2 files changed, 45 insertions(+), 278 deletions(-) create mode 100644 lib/crypto/test/crypto_SUITE_data/gcmtestvectors.zip (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index cf91461155..01e57d75fb 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -173,6 +173,7 @@ init_per_suite(Config) -> {ok, _} = zip:unzip("KAT_AES.zip"), {ok, _} = zip:unzip("aesmmt.zip"), {ok, _} = zip:unzip("cmactestvectors.zip"), + {ok, _} = zip:unzip("gcmtestvectors.zip"), try crypto:start() of ok -> @@ -1854,284 +1855,14 @@ aes_ctr() -> ]. -%% AES GCM test vectors from http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-spec.pdf -aes_gcm() -> - [ - %% Test Case 1 - {aes_gcm, hexstr2bin("00000000000000000000000000000000"), %% Key - hexstr2bin(""), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin(""), %% CipherText - hexstr2bin("58e2fccefa7e3061367f1d57a4e7455a")}, %% CipherTag - - %% Test Case 2 - {aes_gcm, hexstr2bin("00000000000000000000000000000000"), %% Key - hexstr2bin("00000000000000000000000000000000"), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin("0388dace60b6a392f328c2b971b2fe78"), %% CipherText - hexstr2bin("ab6e47d42cec13bdf53a67b21257bddf")}, %% CipherTag - - %% Test Case 3 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308"), %% Key - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b391aafd255"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin("42831ec2217774244b7221b784d0d49c" %% CipherText - "e3aa212f2c02a4e035c17e2329aca12e" - "21d514b25466931c7d8f6a5aac84aa05" - "1ba30b396a0aac973d58e091473f5985"), - hexstr2bin("4d5c2af327cd64a62cf35abd2ba6fab4")}, %% CipherTag - - %% Test Case 4 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308"), %% Key - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("42831ec2217774244b7221b784d0d49c" %% CipherText - "e3aa212f2c02a4e035c17e2329aca12e" - "21d514b25466931c7d8f6a5aac84aa05" - "1ba30b396a0aac973d58e091"), - hexstr2bin("5bc94fbc3221a5db94fae95ae7121a47")}, %% CipherTag - - %% Test Case 5 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308"), %% Key - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbad"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("61353b4c2806934a777ff51fa22a4755" %% CipherText - "699b2a714fcdc6f83766e5f97b6c7423" - "73806900e49f24b22b097544d4896b42" - "4989b5e1ebac0f07c23f4598"), - hexstr2bin("3612d2e79e3b0785561be14aaca2fccb")}, %% CipherTag - - %% Test Case 6" - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308"), %% Key - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("9313225df88406e555909c5aff5269aa" %% IV - "6a7a9538534f7da1e4c303d2a318a728" - "c3c0c95156809539fcf0e2429a6b5254" - "16aedbf5a0de6a57a637b39b"), - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("8ce24998625615b603a033aca13fb894" %% CipherText - "be9112a5c3a211a8ba262a3cca7e2ca7" - "01e4a9a4fba43c90ccdcb281d48c7c6f" - "d62875d2aca417034c34aee5"), - hexstr2bin("619cc5aefffe0bfa462af43c1699d050")}, %% CipherTag - - %% Test Case 7 - {aes_gcm, hexstr2bin("00000000000000000000000000000000" %% Key - "0000000000000000"), - hexstr2bin(""), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin(""), %% CipherText - hexstr2bin("cd33b28ac773f74ba00ed1f312572435")}, %% CipherTag - - %% Test Case 8 - {aes_gcm, hexstr2bin("00000000000000000000000000000000" %% Key - "0000000000000000"), - hexstr2bin("00000000000000000000000000000000"), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin("98e7247c07f0fe411c267e4384b0f600"), %% CipherText - hexstr2bin("2ff58d80033927ab8ef4d4587514f0fb")}, %% CipherTag - - %% Test Case 9 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b391aafd255"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin(""), %% ADD - hexstr2bin("3980ca0b3c00e841eb06fac4872a2757" %% CipherText - "859e1ceaa6efd984628593b40ca1e19c" - "7d773d00c144c525ac619d18c84a3f47" - "18e2448b2fe324d9ccda2710acade256"), - hexstr2bin("9924a7c8587336bfb118024db8674a14")}, %% CipherTag - - %% Test Case 10 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("3980ca0b3c00e841eb06fac4872a2757" %% CipherText - "859e1ceaa6efd984628593b40ca1e19c" - "7d773d00c144c525ac619d18c84a3f47" - "18e2448b2fe324d9ccda2710"), - hexstr2bin("2519498e80f1478f37ba55bd6d27618c")}, %% CipherTag - - %% Test Case 11 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbad"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("0f10f599ae14a154ed24b36e25324db8" %% CipherText - "c566632ef2bbb34f8347280fc4507057" - "fddc29df9a471f75c66541d4d4dad1c9" - "e93a19a58e8b473fa0f062f7"), - hexstr2bin("65dcc57fcf623a24094fcca40d3533f8")}, %% CipherTag - - %% Test Case 12 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("9313225df88406e555909c5aff5269aa" %% IV - "6a7a9538534f7da1e4c303d2a318a728" - "c3c0c95156809539fcf0e2429a6b5254" - "16aedbf5a0de6a57a637b39b"), - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("d27e88681ce3243c4830165a8fdcf9ff" %% CipherText - "1de9a1d8e6b447ef6ef7b79828666e45" - "81e79012af34ddd9e2f037589b292db3" - "e67c036745fa22e7e9b7373b"), - hexstr2bin("dcf566ff291c25bbb8568fc3d376a6d9")}, %% CipherTag - - %% Test Case 13 - {aes_gcm, hexstr2bin("00000000000000000000000000000000" %% Key - "00000000000000000000000000000000"), - hexstr2bin(""), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin(""), %% CipherText - hexstr2bin("530f8afbc74536b9a963b4f1c4cb738b")}, %% CipherTag - - %% Test Case 14 - {aes_gcm, hexstr2bin("00000000000000000000000000000000" %% Key - "00000000000000000000000000000000"), - hexstr2bin("00000000000000000000000000000000"), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin("cea7403d4d606b6e074ec5d3baf39d18"), %% CipherText - hexstr2bin("d0d1c8a799996bf0265b98b5d48ab919")}, %% CipherTag - - %% Test Case 15 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c6d6a8f9467308308"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b391aafd255"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin("522dc1f099567d07f47f37a32a84427d" %% CipherText - "643a8cdcbfe5c0c97598a2bd2555d1aa" - "8cb08e48590dbb3da7b08b1056828838" - "c5f61e6393ba7a0abcc9f662898015ad"), - hexstr2bin("b094dac5d93471bdec1a502270e3cc6c")}, %% CipherTag - - %% Test Case 16 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c6d6a8f9467308308"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbaddecaf888"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("522dc1f099567d07f47f37a32a84427d" %% CipherText - "643a8cdcbfe5c0c97598a2bd2555d1aa" - "8cb08e48590dbb3da7b08b1056828838" - "c5f61e6393ba7a0abcc9f662"), - hexstr2bin("76fc6ece0f4e1768cddf8853bb2d551b")}, %% CipherTag - - %% Test Case 17 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c6d6a8f9467308308"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("cafebabefacedbad"), %% IV - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("c3762df1ca787d32ae47c13bf19844cb" %% CipherText - "af1ae14d0b976afac52ff7d79bba9de0" - "feb582d33934a4f0954cc2363bc73f78" - "62ac430e64abe499f47c9b1f"), - hexstr2bin("3a337dbf46a792c45e454913fe2ea8f2")}, %% CipherTag - - %% Test Case 18 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c6d6a8f9467308308"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("9313225df88406e555909c5aff5269aa" %% IV - "6a7a9538534f7da1e4c303d2a318a728" - "c3c0c95156809539fcf0e2429a6b5254" - "16aedbf5a0de6a57a637b39b"), - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("5a8def2f0c9e53f1f75d7853659e2a20" %% CipherText - "eeb2b22aafde6419a058ab4f6f746bf4" - "0fc0c3b780f244452da3ebf1c5d82cde" - "a2418997200ef82e44ae7e3f"), - hexstr2bin("a44a8266ee1c8eb0c8b5d4cf5ae9f19a")}, %% CipherTag - - %% Test Case 0 for TagLength = 1 - {aes_gcm, hexstr2bin("00000000000000000000000000000000"), %% Key - hexstr2bin(""), %% PlainText - hexstr2bin("000000000000000000000000"), %% IV - hexstr2bin(""), %% AAD - hexstr2bin(""), %% CipherText - hexstr2bin("58"), %% CipherTag - 1}, %% TagLength - - %% Test Case 18 for TagLength = 1 - {aes_gcm, hexstr2bin("feffe9928665731c6d6a8f9467308308" %% Key - "feffe9928665731c6d6a8f9467308308"), - hexstr2bin("d9313225f88406e5a55909c5aff5269a" %% PlainText - "86a7a9531534f7da2e4c303d8a318a72" - "1c3c0c95956809532fcf0e2449a6b525" - "b16aedf5aa0de657ba637b39"), - hexstr2bin("9313225df88406e555909c5aff5269aa" %% IV - "6a7a9538534f7da1e4c303d2a318a728" - "c3c0c95156809539fcf0e2429a6b5254" - "16aedbf5a0de6a57a637b39b"), - hexstr2bin("feedfacedeadbeeffeedfacedeadbeef" %% AAD - "abaddad2"), - hexstr2bin("5a8def2f0c9e53f1f75d7853659e2a20" %% CipherText - "eeb2b22aafde6419a058ab4f6f746bf4" - "0fc0c3b780f244452da3ebf1c5d82cde" - "a2418997200ef82e44ae7e3f"), - hexstr2bin("a4"), %% CipherTag - 1} %% TagLength - ]. +aes_gcm(Config) -> + read_rsp(Config, aes_gcm, + ["gcmDecrypt128.rsp", + "gcmDecrypt192.rsp", + "gcmDecrypt256.rsp", + "gcmEncryptExtIV128.rsp", + "gcmEncryptExtIV192.rsp", + "gcmEncryptExtIV256.rsp"]). %% https://tools.ietf.org/html/rfc7539#appendix-A.5 chacha20_poly1305() -> @@ -2580,6 +2311,42 @@ parse_rsp(Type, [<<"Count = ", _/binary>>, _ -> parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Rest, Acc) end; +%% GCM format decode format +parse_rsp(Type, [<<"Count = ", _/binary>>, + <<"Key = ", Key/binary>>, + <<"IV = ", IV/binary>>, + <<"CT = ", CipherText/binary>>, + <<"AAD = ", AAD/binary>>, + <<"Tag = ", CipherTag0/binary>>, + <<"PT = ", PlainText/binary>>|Next], Acc) -> + CipherTag = hexstr2bin(CipherTag0), + TestCase = {Type, + hexstr2bin(Key), + hexstr2bin(PlainText), + hexstr2bin(IV), + hexstr2bin(AAD), + hexstr2bin(CipherText), + CipherTag, + size(CipherTag)}, + parse_rsp(Type, Next, [TestCase|Acc]); +%% GCM format encode format +parse_rsp(Type, [<<"Count = ", _/binary>>, + <<"Key = ", Key/binary>>, + <<"IV = ", IV/binary>>, + <<"PT = ", PlainText/binary>>, + <<"AAD = ", AAD/binary>>, + <<"CT = ", CipherText/binary>>, + <<"Tag = ", CipherTag0/binary>>|Next], Acc) -> + CipherTag = hexstr2bin(CipherTag0), + TestCase = {Type, + hexstr2bin(Key), + hexstr2bin(PlainText), + hexstr2bin(IV), + hexstr2bin(AAD), + hexstr2bin(CipherText), + CipherTag, + size(CipherTag)}, + parse_rsp(Type, Next, [TestCase|Acc]); parse_rsp(Type, [_|Next], Acc) -> parse_rsp(Type, Next, Acc). diff --git a/lib/crypto/test/crypto_SUITE_data/gcmtestvectors.zip b/lib/crypto/test/crypto_SUITE_data/gcmtestvectors.zip new file mode 100644 index 0000000000..81eaa6c2f0 Binary files /dev/null and b/lib/crypto/test/crypto_SUITE_data/gcmtestvectors.zip differ -- cgit v1.2.3 From 16c1a5dab6435f595c2a8c252288f37039ceab12 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Wed, 3 May 2017 16:25:10 +0200 Subject: crypto: use lazy evaluation for test cases read from CAVP files It turns out that the excessive memory usage is cause by the test framework printing all the test vectors into the log output. A similar proplem was already diagnosed for long_msg/0. The root cause was not mentioned in the SUITE, but the same fix applies to the CAPV test vector data. Switch all CAPV data to lazy evaluation and have the test itself read the data. --- lib/crypto/test/crypto_SUITE.erl | 70 ++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 24 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 01e57d75fb..52bdd1ac41 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -336,7 +336,7 @@ no_hmac(Config) when is_list(Config) -> cmac() -> [{doc, "Test all different cmac functions"}]. cmac(Config) when is_list(Config) -> - Pairs = proplists:get_value(cmac, Config), + Pairs = lazy_eval(proplists:get_value(cmac, Config)), lists:foreach(fun cmac_check/1, Pairs), lists:foreach(fun cmac_check/1, cmac_iolistify(Pairs)). %%-------------------------------------------------------------------- @@ -356,7 +356,7 @@ block(Config) when is_list(Config) -> ok end, - Blocks = proplists:get_value(block, Config), + Blocks = lazy_eval(proplists:get_value(block, Config)), lists:foreach(fun block_cipher/1, Blocks), lists:foreach(fun block_cipher/1, block_iolistify(Blocks)), lists:foreach(fun block_cipher_increment/1, block_iolistify(Blocks)). @@ -365,7 +365,7 @@ block(Config) when is_list(Config) -> no_block() -> [{doc, "Test disabled block ciphers"}]. no_block(Config) when is_list(Config) -> - Blocks = proplists:get_value(block, Config), + Blocks = lazy_eval(proplists:get_value(block, Config)), Args = case Blocks of [{_Type, _Key, _PlainText} = A | _] -> tuple_to_list(A); @@ -382,7 +382,7 @@ no_aead() -> [{doc, "Test disabled aead ciphers"}]. no_aead(Config) when is_list(Config) -> [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag} | _] = - proplists:get_value(aead, Config), + lazy_eval(proplists:get_value(aead, Config)), EncryptArgs = [Type, Key, Nonce, {AAD, PlainText}], DecryptArgs = [Type, Key, Nonce, {AAD, CipherText, CipherTag}], notsup(fun crypto:block_encrypt/4, EncryptArgs), @@ -1205,24 +1205,24 @@ group_config(rc2_cbc, Config) -> Block = rc2_cbc(), [{block, Block} | Config]; group_config(aes_cbc128 = Type, Config) -> - Block = aes_cbc128(Config), - Pairs = cmac_nist(Config, Type), + Block = fun() -> aes_cbc128(Config) end, + Pairs = fun() -> cmac_nist(Config, Type) end, [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_cbc256 = Type, Config) -> - Block = aes_cbc256(Config), - Pairs = cmac_nist(Config, Type), + Block = fun() -> aes_cbc256(Config) end, + Pairs = fun() -> cmac_nist(Config, Type) end, [{block, Block}, {cmac, Pairs} | Config]; group_config(aes_ecb, Config) -> - Block = aes_ecb(Config), - [{block, Block} | Config]; + Block = fun() -> aes_ecb(Config) end, + [{block, Block} | Config]; group_config(aes_ige256, Config) -> Block = aes_ige256(), [{block, Block} | Config]; group_config(aes_cfb8, Config) -> - Block = aes_cfb8(Config), + Block = fun() -> aes_cfb8(Config) end, [{block, Block} | Config]; group_config(aes_cfb128, Config) -> - Block = aes_cfb128(Config), + Block = fun() -> aes_cfb128(Config) end, [{block, Block} | Config]; group_config(blowfish_cbc, Config) -> Block = blowfish_cbc(), @@ -1243,7 +1243,7 @@ group_config(aes_ctr, Config) -> Stream = aes_ctr(), [{stream, Stream} | Config]; group_config(aes_gcm, Config) -> - AEAD = aes_gcm(Config), + AEAD = fun() -> aes_gcm(Config) end, [{aead, AEAD} | Config]; group_config(chacha20_poly1305, Config) -> AEAD = chacha20_poly1305(), @@ -1335,9 +1335,10 @@ rfc_4634_sha512_digests() -> long_msg() -> fun() -> lists:duplicate(1000000, $a) end. -%% Building huge terms (like long_msg/0) in init_per_group seems to cause -%% test_server crash with 'no_answer_from_tc_supervisor' sometimes on some -%% machines. Therefore lazy evaluation when test case has started. +%% Passing huge terms (like long_msg/0) through config causes excessive memory +%% consumption and long runtimes in the test server. This results in test_server +%% crash with 'no_answer_from_tc_supervisor' sometimes on some machines. +%% Therefore lazy evaluation when test case has started. lazy_eval(F) when is_function(F) -> F(); lazy_eval(Lst) when is_list(Lst) -> lists:map(fun lazy_eval/1, Lst); lazy_eval(Tpl) when is_tuple(Tpl) -> list_to_tuple(lists:map(fun lazy_eval/1, tuple_to_list(Tpl))); @@ -2268,15 +2269,36 @@ int_to_bin_neg(X,Ds) -> datadir(Config) -> proplists:get_value(data_dir, Config). +-define(KiB, 1024). +-define(MiB, (1024 * 1024)). +-define(GiB, (1024 * 1024 * 1024)). + +fmt_words(Words) -> + BSize = Words * erlang:system_info(wordsize), + if BSize < ?KiB -> + integer_to_list(BSize); + BSize < ?MiB -> + io_lib:format("~8.2fKiB (~8w)", [BSize / ?KiB, BSize]); + BSize < ?GiB -> + io_lib:format("~8.2fMiB (~8w)", [BSize / ?MiB, BSize]); + true -> + io_lib:format("~8.2fGiB (~8w)", [BSize / ?GiB, BSize]) + end. + +log_rsp_size(Label, Term) -> + S = erts_debug:size(Term), + ct:pal("~s: ~w test(s), Memory used: ~s", + [Label, length(Term), fmt_words(S)]). + read_rsp(Config, Type, Files) -> - lists:reverse( - lists:foldl( - fun(FileName, AccIn) -> - AccOut = read_rsp_file(filename:join(datadir(Config), FileName), - Type, AccIn), - erlang:garbage_collect(), - AccOut - end, [], Files)). + Tests = + lists:foldl( + fun(FileName, Acc) -> + read_rsp_file(filename:join(datadir(Config), FileName), + Type, Acc) + end, [], Files), + log_rsp_size(Type, Tests), + Tests. read_rsp_file(FileName, Type, Acc) -> {ok, Raw} = file:read_file(FileName), -- cgit v1.2.3 From 83e20c62057ebc1d8064bf57b01be560cd244e1d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 4 May 2017 15:42:21 +0200 Subject: Update copyright year --- lib/crypto/c_src/crypto.c | 2 +- lib/crypto/c_src/crypto_callback.h | 2 +- lib/crypto/doc/src/crypto.xml | 2 +- lib/crypto/doc/src/crypto_app.xml | 2 +- lib/crypto/doc/src/fips.xml | 2 +- lib/crypto/doc/src/notes.xml | 2 +- lib/crypto/src/crypto.app.src | 2 +- lib/crypto/src/crypto.erl | 2 +- lib/crypto/test/crypto_SUITE.erl | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 1f4ce9a3da..3f0439ed80 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2010-2016. All Rights Reserved. + * Copyright Ericsson AB 2010-2017. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h index 489810116f..d46266fd8b 100644 --- a/lib/crypto/c_src/crypto_callback.h +++ b/lib/crypto/c_src/crypto_callback.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2012-2016. All Rights Reserved. + * Copyright Ericsson AB 2012-2017. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 2718ee9055..89ef529c5d 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -4,7 +4,7 @@

- 19992016 + 19992017 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml index 6950dfeec3..ba22557480 100644 --- a/lib/crypto/doc/src/crypto_app.xml +++ b/lib/crypto/doc/src/crypto_app.xml @@ -5,7 +5,7 @@
1999 - 2016 + 2017 Ericsson AB, All Rights Reserved diff --git a/lib/crypto/doc/src/fips.xml b/lib/crypto/doc/src/fips.xml index a6ed95bf5e..3e5c2db1e0 100644 --- a/lib/crypto/doc/src/fips.xml +++ b/lib/crypto/doc/src/fips.xml @@ -4,7 +4,7 @@
- 2014 + 20142017 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 887aeca680..62b013e463 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -4,7 +4,7 @@
- 19992016 + 19992017 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src index 3bf4279ae1..1d3f35e465 100644 --- a/lib/crypto/src/crypto.app.src +++ b/lib/crypto/src/crypto.app.src @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. +%% Copyright Ericsson AB 1999-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 765998b85d..d111525214 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. +%% Copyright Ericsson AB 1999-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 54bd729e7e..8cb08cade0 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. +%% Copyright Ericsson AB 1999-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. -- cgit v1.2.3 From dc57404252c47520f352834ad9be45ad684f96c9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 4 May 2017 17:05:25 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 112 +++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 113 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 62b013e463..58b9db3539 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,118 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.0 + +
Fixed Bugs and Malfunctions + + +

+ LibreSSL can now be used by the modernized crypto app.

+

+ Own Id: OTP-14247

+
+ +

+ Add compile option -compile(no_native) in modules + with on_load directive which is not yet supported + by HiPE.

+

+ Own Id: OTP-14316 Aux Id: PR-1390

+
+
+
+ + +
Improvements and New Features + + +

+ Add basic support for CMAC

+

+ Own Id: OTP-13779 Aux Id: ERL-82 PR-1138

+
+ +

+ Removed functions deprecated in crypto-3.0 first released + in OTP-R16B01

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13873

+
+ +

+ The crypto application now supports OpenSSL 1.1.

+

+ Own Id: OTP-13900

+
+ +

+ Allow Erlang/OTP to use OpenSSL in FIPS-140 mode, in + order to satisfy specific security requirements (mostly + by different parts of the US federal government).

+

+ See the new crypto users guide "FIPS mode" chapter about + building and using the FIPS support which is disabled by + default.

+

+ (Thanks to dszoboszlay and legoscia)

+

+ Own Id: OTP-13921 Aux Id: PR-1180

+
+ +

+ Crypto chacha20-poly1305 as in RFC 7539 enabled for + OpenSSL >= 1.1.

+

+ Thanks to mururu.

+

+ Own Id: OTP-14092 Aux Id: PR-1291

+
+ +

+ RSA key generation added to crypto:generate_key/2. + Thanks to wiml.

+

+ An interface is also added to + public_key:generate_key/1.

+

+ Own Id: OTP-14140 Aux Id: ERL-165, PR-1299

+
+ +

+ Raised minimum requeriment for OpenSSL version to + OpenSSL-9.0.8.c although we recommend a much higher + version, that is a version that is still maintained + officially by the OpenSSL project. Note that using such + an old version may restrict the crypto algorithms + supported.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14171

+
+ +

+ Deprecate crypto:rand_uniform/2 as it is not + cryptographically strong

+

+ Own Id: OTP-14274

+
+ +

+ The Crypto application now supports generation of + cryptographically strong random numbers (floats < 1.0 + and integer arbitrary ranges) as a plugin to the 'rand' + module.

+

+ Own Id: OTP-14317 Aux Id: PR-1372

+
+
+
+ +
+
Crypto 3.7.4
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index f3e0623ac9..796e3b6d84 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.4 +CRYPTO_VSN = 4.0 -- cgit v1.2.3 From eace29905be436d77245656b2511c9a9c2c67c90 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 5 May 2017 13:15:42 +0200 Subject: Revert "Prepare release" This reverts commit dc57404252c47520f352834ad9be45ad684f96c9. --- lib/crypto/doc/src/notes.xml | 112 ------------------------------------------- lib/crypto/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 113 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 58b9db3539..62b013e463 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,118 +31,6 @@

This document describes the changes made to the Crypto application.

-
Crypto 4.0 - -
Fixed Bugs and Malfunctions - - -

- LibreSSL can now be used by the modernized crypto app.

-

- Own Id: OTP-14247

-
- -

- Add compile option -compile(no_native) in modules - with on_load directive which is not yet supported - by HiPE.

-

- Own Id: OTP-14316 Aux Id: PR-1390

-
-
-
- - -
Improvements and New Features - - -

- Add basic support for CMAC

-

- Own Id: OTP-13779 Aux Id: ERL-82 PR-1138

-
- -

- Removed functions deprecated in crypto-3.0 first released - in OTP-R16B01

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13873

-
- -

- The crypto application now supports OpenSSL 1.1.

-

- Own Id: OTP-13900

-
- -

- Allow Erlang/OTP to use OpenSSL in FIPS-140 mode, in - order to satisfy specific security requirements (mostly - by different parts of the US federal government).

-

- See the new crypto users guide "FIPS mode" chapter about - building and using the FIPS support which is disabled by - default.

-

- (Thanks to dszoboszlay and legoscia)

-

- Own Id: OTP-13921 Aux Id: PR-1180

-
- -

- Crypto chacha20-poly1305 as in RFC 7539 enabled for - OpenSSL >= 1.1.

-

- Thanks to mururu.

-

- Own Id: OTP-14092 Aux Id: PR-1291

-
- -

- RSA key generation added to crypto:generate_key/2. - Thanks to wiml.

-

- An interface is also added to - public_key:generate_key/1.

-

- Own Id: OTP-14140 Aux Id: ERL-165, PR-1299

-
- -

- Raised minimum requeriment for OpenSSL version to - OpenSSL-9.0.8.c although we recommend a much higher - version, that is a version that is still maintained - officially by the OpenSSL project. Note that using such - an old version may restrict the crypto algorithms - supported.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14171

-
- -

- Deprecate crypto:rand_uniform/2 as it is not - cryptographically strong

-

- Own Id: OTP-14274

-
- -

- The Crypto application now supports generation of - cryptographically strong random numbers (floats < 1.0 - and integer arbitrary ranges) as a plugin to the 'rand' - module.

-

- Own Id: OTP-14317 Aux Id: PR-1372

-
-
-
- -
-
Crypto 3.7.4
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 796e3b6d84..f3e0623ac9 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.0 +CRYPTO_VSN = 3.7.4 -- cgit v1.2.3 From 76b7ae173b745d025fa2b6ec206670ee92d491c2 Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Tue, 9 May 2017 09:45:39 +0100 Subject: Remove duplicate aes_gcm from a list of ciphers --- lib/crypto/c_src/crypto.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 3f0439ed80..793cff166c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1089,9 +1089,6 @@ static void init_algorithms_types(ErlNifEnv* env) #ifndef OPENSSL_NO_RC4 algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"rc4"); #endif -#if defined(HAVE_GCM) - algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); -#endif #if defined(HAVE_CHACHA20_POLY1305) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"chacha20_poly1305"); #endif -- cgit v1.2.3 From 1bdf315bff02faec73c327c9c170123e928388f0 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Mon, 15 May 2017 18:45:48 -0700 Subject: Fix backwards equality check in aes cfb128 function --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 3f0439ed80..d08893b307 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1848,7 +1848,7 @@ static ERL_NIF_TERM aes_cfb_128_crypt_nif(ErlNifEnv* env, int argc, const ERL_NI AES_cfb128_encrypt((unsigned char *) text.data, enif_make_new_binary(env, text.size, &ret), text.size, &aes_key, ivec_clone, &new_ivlen, - (argv[3] != atom_true)); + (argv[3] == atom_true)); CONSUME_REDS(env,text); return ret; } -- cgit v1.2.3 From 0e624b9bda67305557a5d8de14ce67b461d8e382 Mon Sep 17 00:00:00 2001 From: Salikhov Dinislam Date: Tue, 9 May 2017 13:54:25 +0300 Subject: crypto: Make internal arrays static --- lib/crypto/c_src/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 793cff166c..3c7d5daff5 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -609,7 +609,7 @@ struct digest_type_t { }md; }; -struct digest_type_t digest_types[] = +static struct digest_type_t digest_types[] = { {{"md4"}, {&EVP_md4}}, {{"md5"}, {&EVP_md5}}, @@ -666,7 +666,7 @@ struct cipher_type_t { #define COND_NO_DES_PTR(Ptr) (Ptr) #endif -struct cipher_type_t cipher_types[] = +static struct cipher_type_t cipher_types[] = { {{"rc2_cbc"}, #ifndef OPENSSL_NO_RC2 -- cgit v1.2.3 From eaf8ca41dfa4850437ad270d3897399c9358ced0 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 30 May 2017 16:15:30 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 128 +++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 129 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 62b013e463..9a98bfc7c7 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,134 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.0 + +
Fixed Bugs and Malfunctions + + +

+ LibreSSL can now be used by the modernized crypto app.

+

+ Own Id: OTP-14247

+
+ +

+ Add compile option -compile(no_native) in modules + with on_load directive which is not yet supported + by HiPE.

+

+ Own Id: OTP-14316 Aux Id: PR-1390

+
+ +

+ Fix a bug in aes cfb128 function introduced by the bug + fix in GitHub pull request #1393.

+

+ Own Id: OTP-14435 Aux Id: PR-1462, PR-1393, OTP-14313

+
+
+
+ + +
Improvements and New Features + + +

+ Add basic support for CMAC

+

+ Own Id: OTP-13779 Aux Id: ERL-82 PR-1138

+
+ +

+ Removed functions deprecated in crypto-3.0 first released + in OTP-R16B01

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13873

+
+ +

+ The crypto application now supports OpenSSL 1.1.

+

+ Own Id: OTP-13900

+
+ +

+ Allow Erlang/OTP to use OpenSSL in FIPS-140 mode, in + order to satisfy specific security requirements (mostly + by different parts of the US federal government).

+

+ See the new crypto users guide "FIPS mode" chapter about + building and using the FIPS support which is disabled by + default.

+

+ (Thanks to dszoboszlay and legoscia)

+

+ Own Id: OTP-13921 Aux Id: PR-1180

+
+ +

+ Crypto chacha20-poly1305 as in RFC 7539 enabled for + OpenSSL >= 1.1.

+

+ Thanks to mururu.

+

+ Own Id: OTP-14092 Aux Id: PR-1291

+
+ +

+ RSA key generation added to crypto:generate_key/2. + Thanks to wiml.

+

+ An interface is also added to + public_key:generate_key/1.

+

+ Own Id: OTP-14140 Aux Id: ERL-165, PR-1299

+
+ +

+ Raised minimum requeriment for OpenSSL version to + OpenSSL-0.9.8.c although we recommend a much higher + version, that is a version that is still maintained + officially by the OpenSSL project. Note that using such + an old version may restrict the crypto algorithms + supported.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14171

+
+ +

+ Deprecate crypto:rand_uniform/2 as it is not + cryptographically strong

+

+ Own Id: OTP-14274

+
+ +

+ The Crypto application now supports generation of + cryptographically strong random numbers (floats < 1.0 + and integer arbitrary ranges) as a plugin to the 'rand' + module.

+

+ Own Id: OTP-14317 Aux Id: PR-1372

+
+ +

+ This replaces the hard coded test values for AES, CMAC + and GCM ciphers with the full validation set from NIST's + CAVP program.

+

+ Own Id: OTP-14436 Aux Id: PR-1396

+
+
+
+ +
+
Crypto 3.7.4
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index f3e0623ac9..796e3b6d84 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.4 +CRYPTO_VSN = 4.0 -- cgit v1.2.3 From 32275a2fc0b86d1f1b124706afc80f3ff92216eb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 31 May 2017 16:21:00 +0200 Subject: Revert "Prepare release" This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0. --- lib/crypto/doc/src/notes.xml | 128 ------------------------------------------- lib/crypto/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 129 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 9a98bfc7c7..62b013e463 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,134 +31,6 @@

This document describes the changes made to the Crypto application.

-
Crypto 4.0 - -
Fixed Bugs and Malfunctions - - -

- LibreSSL can now be used by the modernized crypto app.

-

- Own Id: OTP-14247

-
- -

- Add compile option -compile(no_native) in modules - with on_load directive which is not yet supported - by HiPE.

-

- Own Id: OTP-14316 Aux Id: PR-1390

-
- -

- Fix a bug in aes cfb128 function introduced by the bug - fix in GitHub pull request #1393.

-

- Own Id: OTP-14435 Aux Id: PR-1462, PR-1393, OTP-14313

-
-
-
- - -
Improvements and New Features - - -

- Add basic support for CMAC

-

- Own Id: OTP-13779 Aux Id: ERL-82 PR-1138

-
- -

- Removed functions deprecated in crypto-3.0 first released - in OTP-R16B01

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13873

-
- -

- The crypto application now supports OpenSSL 1.1.

-

- Own Id: OTP-13900

-
- -

- Allow Erlang/OTP to use OpenSSL in FIPS-140 mode, in - order to satisfy specific security requirements (mostly - by different parts of the US federal government).

-

- See the new crypto users guide "FIPS mode" chapter about - building and using the FIPS support which is disabled by - default.

-

- (Thanks to dszoboszlay and legoscia)

-

- Own Id: OTP-13921 Aux Id: PR-1180

-
- -

- Crypto chacha20-poly1305 as in RFC 7539 enabled for - OpenSSL >= 1.1.

-

- Thanks to mururu.

-

- Own Id: OTP-14092 Aux Id: PR-1291

-
- -

- RSA key generation added to crypto:generate_key/2. - Thanks to wiml.

-

- An interface is also added to - public_key:generate_key/1.

-

- Own Id: OTP-14140 Aux Id: ERL-165, PR-1299

-
- -

- Raised minimum requeriment for OpenSSL version to - OpenSSL-0.9.8.c although we recommend a much higher - version, that is a version that is still maintained - officially by the OpenSSL project. Note that using such - an old version may restrict the crypto algorithms - supported.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14171

-
- -

- Deprecate crypto:rand_uniform/2 as it is not - cryptographically strong

-

- Own Id: OTP-14274

-
- -

- The Crypto application now supports generation of - cryptographically strong random numbers (floats < 1.0 - and integer arbitrary ranges) as a plugin to the 'rand' - module.

-

- Own Id: OTP-14317 Aux Id: PR-1372

-
- -

- This replaces the hard coded test values for AES, CMAC - and GCM ciphers with the full validation set from NIST's - CAVP program.

-

- Own Id: OTP-14436 Aux Id: PR-1396

-
-
-
- -
-
Crypto 3.7.4
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 796e3b6d84..f3e0623ac9 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.0 +CRYPTO_VSN = 3.7.4 -- cgit v1.2.3 From 8a2640f29b4dce4ffe7fdc7480b7ac377ab96093 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 1 Jun 2017 17:17:39 +0200 Subject: crypto: filter out small mod in test suite for rsa keygen in FIPS mode --- lib/crypto/test/crypto_SUITE.erl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 30ee782fe9..1390ee9650 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -809,8 +809,15 @@ do_generate({ecdh = Type, Curve, Priv, Pub}) -> ct:fail({{crypto, generate_key, [Type, Priv, Curve]}, {expected, Pub}, {got, Other}}) end; do_generate({rsa = Type, Mod, Exp}) -> - {Pub,Priv} = crypto:generate_key(Type, {Mod,Exp}), - do_sign_verify({rsa, sha256, Pub, Priv, rsa_plain()}). + case crypto:info_fips() of + enabled when Mod < 3072 -> + ct:log("SKIP do_generate ~p FIPS=~p, Mod=~p Exp=~p", [Type, enabled, Mod, Exp]), + {skip, "FIPS violation"}; + FIPS -> + ct:log("do_generate ~p FIPS=~p, Mod=~p Exp=~p", [Type, FIPS, Mod, Exp]), + {Pub,Priv} = crypto:generate_key(Type, {Mod,Exp}), + do_sign_verify({rsa, sha256, Pub, Priv, rsa_plain()}) + end. notsup(Fun, Args) -> Result = -- cgit v1.2.3 From b803e2999a374aff4d20e8e30c66e8d5ee83f98b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 2 Jun 2017 10:54:59 +0200 Subject: crypto: add test for rsa keygen 1024/3 --- lib/crypto/test/crypto_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 1390ee9650..164f43dcb0 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1166,7 +1166,7 @@ group_config(rsa = Type, Config) -> rsa_oaep(), no_padding() ], - Generate = [{rsa, 2048, 17}, {rsa, 3072, 65537}], + Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), -- cgit v1.2.3 From c18b13d4c8aa31b145703bbbf228fb07d6b2a0a5 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 21 Jun 2017 10:53:19 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 128 +++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 129 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 62b013e463..574353ce7a 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,134 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.0 + +
Fixed Bugs and Malfunctions + + +

+ LibreSSL can now be used by the modernized crypto app.

+

+ Own Id: OTP-14247

+
+ +

+ Add compile option -compile(no_native) in modules + with on_load directive which is not yet supported + by HiPE.

+

+ Own Id: OTP-14316 Aux Id: PR-1390

+
+ +

+ Fix a bug in aes cfb128 function introduced by the bug + fix in GitHub pull request #1393.

+

+ Own Id: OTP-14435 Aux Id: PR-1462, PR-1393, OTP-14313

+
+
+
+ + +
Improvements and New Features + + +

+ Add basic support for CMAC

+

+ Own Id: OTP-13779 Aux Id: ERL-82 PR-1138

+
+ +

+ Removed functions deprecated in crypto-3.0 first released + in OTP-R16B01

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13873

+
+ +

+ The crypto application now supports OpenSSL 1.1.

+

+ Own Id: OTP-13900

+
+ +

+ Allow Erlang/OTP to use OpenSSL in FIPS-140 mode, in + order to satisfy specific security requirements (mostly + by different parts of the US federal government).

+

+ See the new crypto users guide "FIPS mode" chapter about + building and using the FIPS support which is disabled by + default.

+

+ (Thanks to dszoboszlay and legoscia)

+

+ Own Id: OTP-13921 Aux Id: PR-1180

+
+ +

+ Crypto chacha20-poly1305 as in RFC 7539 enabled for + OpenSSL >= 1.1.

+

+ Thanks to mururu.

+

+ Own Id: OTP-14092 Aux Id: PR-1291

+
+ +

+ RSA key generation added to crypto:generate_key/2. + Thanks to wiml.

+

+ An interface is also added to + public_key:generate_key/1.

+

+ Own Id: OTP-14140 Aux Id: ERL-165, PR-1299

+
+ +

+ Raised minimum requirement for OpenSSL version to + OpenSSL-0.9.8.c although we recommend a much higher + version, that is a version that is still maintained + officially by the OpenSSL project. Note that using such + an old version may restrict the crypto algorithms + supported.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14171

+
+ +

+ Deprecate crypto:rand_uniform/2 as it is not + cryptographically strong

+

+ Own Id: OTP-14274

+
+ +

+ The Crypto application now supports generation of + cryptographically strong random numbers (floats < 1.0 + and integer arbitrary ranges) as a plugin to the 'rand' + module.

+

+ Own Id: OTP-14317 Aux Id: PR-1372

+
+ +

+ This replaces the hard coded test values for AES, CMAC + and GCM ciphers with the full validation set from NIST's + CAVP program.

+

+ Own Id: OTP-14436 Aux Id: PR-1396

+
+
+
+ +
+
Crypto 3.7.4
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index f3e0623ac9..796e3b6d84 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 3.7.4 +CRYPTO_VSN = 4.0 -- cgit v1.2.3 From b1ced30ade0bf3f2d04ef3320bc0deb519f98283 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 5 Jul 2017 15:23:02 +0200 Subject: crypto: added a 'macs' entry to proplist in crypto:supports/0 --- lib/crypto/c_src/crypto.c | 20 ++++++++++++++++++-- lib/crypto/doc/src/crypto.xml | 4 +++- lib/crypto/src/crypto.erl | 5 +++-- 3 files changed, 24 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 688ec339aa..8cb9ec1e87 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1010,6 +1010,8 @@ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; static ERL_NIF_TERM algo_pubkey[7]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ +static int algo_mac_cnt, algo_mac_fips_cnt; +static ERL_NIF_TERM algo_mac[2]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { @@ -1093,9 +1095,19 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"chacha20_poly1305"); #endif + // Validated algorithms first + algo_mac_cnt = 0; + algo_mac[algo_mac_cnt++] = enif_make_atom(env,"hmac"); +#ifdef HAVE_CMAC + algo_mac[algo_mac_cnt++] = enif_make_atom(env,"cmac"); +#endif + // Non-validated algorithms follow + algo_mac_fips_cnt = algo_mac_cnt; + ASSERT(algo_hash_cnt <= sizeof(algo_hash)/sizeof(ERL_NIF_TERM)); ASSERT(algo_pubkey_cnt <= sizeof(algo_pubkey)/sizeof(ERL_NIF_TERM)); ASSERT(algo_cipher_cnt <= sizeof(algo_cipher)/sizeof(ERL_NIF_TERM)); + ASSERT(algo_mac_cnt <= sizeof(algo_mac)/sizeof(ERL_NIF_TERM)); } static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) @@ -1105,15 +1117,19 @@ static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv int hash_cnt = fips_mode ? algo_hash_fips_cnt : algo_hash_cnt; int pubkey_cnt = fips_mode ? algo_pubkey_fips_cnt : algo_pubkey_cnt; int cipher_cnt = fips_mode ? algo_cipher_fips_cnt : algo_cipher_cnt; + int mac_cnt = fips_mode ? algo_mac_fips_cnt : algo_mac_cnt; #else int hash_cnt = algo_hash_cnt; int pubkey_cnt = algo_pubkey_cnt; int cipher_cnt = algo_cipher_cnt; + int mac_cnt = algo_mac_cnt; #endif - return enif_make_tuple3(env, + return enif_make_tuple4(env, enif_make_list_from_array(env, algo_hash, hash_cnt), enif_make_list_from_array(env, algo_pubkey, pubkey_cnt), - enif_make_list_from_array(env, algo_cipher, cipher_cnt)); + enif_make_list_from_array(env, algo_cipher, cipher_cnt), + enif_make_list_from_array(env, algo_mac, mac_cnt) + ); } static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 89ef529c5d..ecc33aafc3 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -165,6 +165,7 @@ cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20_poly1305 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4 + mac_algorithms() = hmac | cmac public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m

Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported with ecdsa and ecdh. @@ -835,7 +836,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ AlgorithmList = [{hashs, [hash_algorithms()]}, {ciphers, [cipher_algorithms()]}, - {public_keys, [public_key_algorithms()]} + {public_keys, [public_key_algorithms()]}, + {macs, [mac_algorithms()]}] diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index d111525214..85206ce9e5 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -87,11 +87,12 @@ stop() -> application:stop(crypto). supports()-> - {Hashs, PubKeys, Ciphers} = algorithms(), + {Hashs, PubKeys, Ciphers, Macs} = algorithms(), [{hashs, Hashs}, {ciphers, Ciphers}, - {public_keys, PubKeys} + {public_keys, PubKeys}, + {macs, Macs} ]. info_lib() -> ?nif_stub. -- cgit v1.2.3 From f66e2fc4a37c23f147173cf3229bd24e335306e8 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 5 Jul 2017 16:48:11 +0200 Subject: crypto: test suites report openssl version, supports etc --- lib/crypto/test/blowfish_SUITE.erl | 5 +++++ lib/crypto/test/crypto_SUITE.erl | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index c2d0d2621b..c9033ac4f8 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -47,6 +47,11 @@ init_per_suite(Config) -> case catch crypto:start() of ok -> + catch ct:comment("~s",[element(3,hd(crypto:info_lib()))]), + catch ct:log("crypto:info_lib() -> ~p~n" + "crypto:supports() -> ~p~n" + "crypto:version() -> ~p~n" + ,[crypto:info_lib(), crypto:supports(), crypto:version()]), Config; _Else -> {skip,"Could not start crypto!"} diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 164f43dcb0..dbfe295900 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -177,6 +177,12 @@ init_per_suite(Config) -> try crypto:start() of ok -> + catch ct:comment("~s",[element(3,hd(crypto:info_lib()))]), + catch ct:log("crypto:info_lib() -> ~p~n" + "crypto:supports() -> ~p~n" + "crypto:version() -> ~p~n" + ,[crypto:info_lib(), crypto:supports(), crypto:version()]), + try crypto:strong_rand_bytes(1) of _ -> Config -- cgit v1.2.3 From d7dee753bb81a03ea8eb9071ad19a2b53341bceb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 29 Jun 2017 19:48:05 +0200 Subject: crypto: Made {rsa,dss,ecdsa}_{sign,verify}_nif similar and all with evp api --- lib/crypto/c_src/crypto.c | 448 +++++++++++++++++++++++++++++++--------------- 1 file changed, 301 insertions(+), 147 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 8cb9ec1e87..e0029d1d9a 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -2464,44 +2464,6 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg return ret; } -static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (sha, Digest, Signature,Key=[P, Q, G, Y]) */ - ErlNifBinary digest_bin, sign_bin; - BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL, *dsa_y = NULL; - ERL_NIF_TERM head, tail; - DSA *dsa; - int i; - - if (argv[0] != atom_sha - || !enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != SHA_DIGEST_LENGTH - || !enif_inspect_binary(env, argv[2], &sign_bin) - || !enif_get_list_cell(env, argv[3], &head, &tail) - || !get_bn_from_bin(env, head, &dsa_p) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa_q) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa_g) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dsa_y) - || !enif_is_empty_list(env,tail)) { - - if (dsa_p) BN_free(dsa_p); - if (dsa_q) BN_free(dsa_q); - if (dsa_g) BN_free(dsa_g); - if (dsa_y) BN_free(dsa_y); - return enif_make_badarg(env); - } - - dsa = DSA_new(); - DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g); - DSA_set0_key(dsa, dsa_y, NULL); - i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH, - sign_bin.data, sign_bin.size, dsa); - DSA_free(dsa); - return(i > 0) ? atom_true : atom_false; -} - static void init_digest_types(ErlNifEnv* env) { struct digest_type_t* p = digest_types; @@ -2548,73 +2510,6 @@ static struct cipher_type_t* get_cipher_type(ERL_NIF_TERM type, size_t key_len) return NULL; } -static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Type, Digest, Signature, Key=[E,N]) */ - ErlNifBinary digest_bin, sign_bin; - ERL_NIF_TERM head, tail, ret; - int i; - RSA *rsa; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; -#endif - const EVP_MD *md; - const ERL_NIF_TERM type = argv[0]; - struct digest_type_t *digp = NULL; - BIGNUM *rsa_e; - BIGNUM *rsa_n; - - digp = get_digest_type(type); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - rsa = RSA_new(); - - if (!enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != EVP_MD_size(md) - || !enif_inspect_binary(env, argv[2], &sign_bin) - || !enif_get_list_cell(env, argv[3], &head, &tail) - || !get_bn_from_bin(env, head, &rsa_e) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &rsa_n) - || !enif_is_empty_list(env, tail)) { - - ret = enif_make_badarg(env); - goto done; - } - - (void) RSA_set0_key(rsa, rsa_n, rsa_e, NULL); - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_RSA(pkey, rsa); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_verify_init(ctx); - EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, - digest_bin.data, digest_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - i = RSA_verify(md->type, digest_bin.data, EVP_MD_size(md), - sign_bin.data, sign_bin.size, rsa); -#endif - - ret = (i==1 ? atom_true : atom_false); - -done: - RSA_free(rsa); - return ret; -} - static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Data1, Data2) */ ErlNifBinary d1, d2; @@ -2718,6 +2613,26 @@ static int get_rsa_private_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) return 1; } + +static int get_rsa_public_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) +{ + /* key=[E,N] */ + ERL_NIF_TERM head, tail; + BIGNUM *e, *n; + + if (!enif_get_list_cell(env, key, &head, &tail) + || !get_bn_from_bin(env, head, &e) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &n) + || !enif_is_empty_list(env, tail)) { + return 0; + } + + (void) RSA_set0_key(rsa, n, e, NULL); + return 1; +} + + static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Digest, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */ ErlNifBinary digest_bin, ret_bin; @@ -2794,24 +2709,71 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar } } +static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Type, Digest, Signature, Key=[E,N]) */ + ErlNifBinary digest_bin, sign_bin; + int i; + RSA *rsa; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; +#endif + const EVP_MD *md; + const ERL_NIF_TERM type = argv[0]; + struct digest_type_t *digp = NULL; -static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (sha, Digest, Key=[P,Q,G,PrivKey]) */ - ErlNifBinary digest_bin, ret_bin; - ERL_NIF_TERM head, tail; - unsigned int dsa_s_len; - DSA* dsa; - BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL; - BIGNUM *dummy_pub_key, *priv_key = NULL; - int i; + digp = get_digest_type(type); + if (!digp) { + return enif_make_badarg(env); + } + md = digp->md.p; + if (!md) { + return atom_notsup; + } - if (argv[0] != atom_sha - || !enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != SHA_DIGEST_LENGTH) { + if (!enif_inspect_binary(env, argv[1], &digest_bin) + || digest_bin.size != EVP_MD_size(md) + || !enif_inspect_binary(env, argv[2], &sign_bin)) + { + return enif_make_badarg(env); + } + + rsa = RSA_new(); + if (!get_rsa_public_key(env, argv[3], rsa)) { + RSA_free(rsa); return enif_make_badarg(env); } + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + pkey = EVP_PKEY_new(); + EVP_PKEY_set1_RSA(pkey, rsa); - if (!enif_get_list_cell(env, argv[2], &head, &tail) + ctx = EVP_PKEY_CTX_new(pkey, NULL); + EVP_PKEY_verify_init(ctx); + EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); + EVP_PKEY_CTX_set_signature_md(ctx, md); + + i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, + digest_bin.data, digest_bin.size); + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); +#else + i = RSA_verify(md->type, digest_bin.data, EVP_MD_size(md), + sign_bin.data, sign_bin.size, rsa); +#endif + + RSA_free(rsa); + return(i > 0) ? atom_true : atom_false; +} + +static int get_dss_private_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) +{ + /* key=[P,Q,G,KEY] */ + ERL_NIF_TERM head, tail; + BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL; + BIGNUM *dummy_pub_key, *priv_key = NULL; + + if (!enif_get_list_cell(env, key, &head, &tail) || !get_bn_from_bin(env, head, &dsa_p) || !enif_get_list_cell(env, tail, &head, &tail) || !get_bn_from_bin(env, head, &dsa_q) @@ -2824,7 +2786,7 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (dsa_q) BN_free(dsa_q); if (dsa_g) BN_free(dsa_g); if (priv_key) BN_free(priv_key); - return enif_make_badarg(env); + return 0; } /* Note: DSA_set0_key() does not allow setting only the @@ -2834,12 +2796,102 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar */ dummy_pub_key = BN_dup(priv_key); - dsa = DSA_new(); DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g); DSA_set0_key(dsa, dummy_pub_key, priv_key); + return 1; +} + + +static int get_dss_public_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) +{ + /* key=[P, Q, G, Y] */ + ERL_NIF_TERM head, tail; + BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL, *dsa_y = NULL; + + if (!enif_get_list_cell(env, key, &head, &tail) + || !get_bn_from_bin(env, head, &dsa_p) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dsa_q) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dsa_g) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dsa_y) + || !enif_is_empty_list(env,tail)) { + if (dsa_p) BN_free(dsa_p); + if (dsa_q) BN_free(dsa_q); + if (dsa_g) BN_free(dsa_g); + if (dsa_y) BN_free(dsa_y); + return 0; + } + + DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g); + DSA_set0_key(dsa, dsa_y, NULL); + return 1; +} + +static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (sha, Digest, Key=[P,Q,G,PrivKey]) */ + ErlNifBinary digest_bin, ret_bin; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; + size_t dsa_s_len; +#else + unsigned dsa_s_len, len; +#endif + DSA *dsa; + int i; + struct digest_type_t *digp; + const EVP_MD *md; + + if (argv[0] != atom_sha) { /* dsa uses sha1 */ + return enif_make_badarg(env); + } + + digp = get_digest_type(argv[0]); + if (!digp) { + return enif_make_badarg(env); + } + md = digp->md.p; + if (!md) { + return atom_notsup; + } + + if (!enif_inspect_binary(env,argv[1],&digest_bin) + || digest_bin.size != EVP_MD_size(md)) { + return enif_make_badarg(env); + } + + dsa = DSA_new(); + if (!get_dss_private_key(env, argv[2], dsa)) { + DSA_free(dsa); + return enif_make_badarg(env); + } + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + pkey = EVP_PKEY_new(); + EVP_PKEY_set1_DSA(pkey, dsa); + dsa_s_len=(size_t)EVP_PKEY_size(pkey); + enif_alloc_binary(dsa_s_len, &ret_bin); + + ctx = EVP_PKEY_CTX_new(pkey, NULL); + EVP_PKEY_sign_init(ctx); + /* EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); */ + EVP_PKEY_CTX_set_signature_md(ctx, md); + + i = EVP_PKEY_sign(ctx, ret_bin.data, &dsa_s_len, + digest_bin.data, digest_bin.size); + ASSERT(i<=0 || dsa_s_len <= ret_bin.size); + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); +#else enif_alloc_binary(DSA_size(dsa), &ret_bin); - i = DSA_sign(NID_sha1, digest_bin.data, SHA_DIGEST_LENGTH, + len = EVP_MD_size(md); + + i = DSA_sign(md->type, digest_bin.data, len, ret_bin.data, &dsa_s_len, dsa); +#endif + DSA_free(dsa); if (i) { @@ -2854,6 +2906,66 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar } } +static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (sha, Digest, Signature,Key=[P, Q, G, Y]) */ + ErlNifBinary digest_bin, sign_bin; + int i; + DSA *dsa; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; +#endif + const EVP_MD *md; + const ERL_NIF_TERM type = argv[0]; + struct digest_type_t *digp = NULL; + + digp = get_digest_type(type); + if (!digp) { + return enif_make_badarg(env); + } + md = digp->md.p; + if (!md) { + return atom_notsup; + } + + if (argv[0] != atom_sha) { + return atom_notsup; + } + + if (!enif_inspect_binary(env, argv[1], &digest_bin) + || digest_bin.size != EVP_MD_size(md) + || !enif_inspect_binary(env, argv[2], &sign_bin)) + { + return enif_make_badarg(env); + } + + dsa = DSA_new(); + if (!get_dss_public_key(env, argv[3], dsa)) { + DSA_free(dsa); + return enif_make_badarg(env); + } + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + pkey = EVP_PKEY_new(); + EVP_PKEY_set1_DSA(pkey, dsa); + + ctx = EVP_PKEY_CTX_new(pkey, NULL); + EVP_PKEY_verify_init(ctx); + EVP_PKEY_CTX_set_signature_md(ctx, md); + + i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, + digest_bin.data, digest_bin.size); + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); +#else + i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH, + sign_bin.data, sign_bin.size, dsa); +#endif + + DSA_free(dsa); + return(i > 0) ? atom_true : atom_false; +} + static int rsa_pad(ERL_NIF_TERM term, int* padding) { @@ -3808,9 +3920,15 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM {/* (Type, Digest, Curve, Key) */ #if defined(HAVE_EC) ErlNifBinary digest_bin, ret_bin; - unsigned int dsa_s_len; - EC_KEY* key = NULL; - int i, len; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; + size_t ecdsa_s_len; +#else + unsigned ecdsa_s_len, len; +#endif + EC_KEY *ec = NULL; + int i; struct digest_type_t *digp; const EVP_MD *md; @@ -3822,22 +3940,42 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM if (!md) { return atom_notsup; } - len = EVP_MD_size(md); if (!enif_inspect_binary(env,argv[1],&digest_bin) - || digest_bin.size != len - || !get_ec_key(env, argv[2], argv[3], atom_undefined, &key)) + || digest_bin.size != EVP_MD_size(md)) goto badarg; - enif_alloc_binary(ECDSA_size(key), &ret_bin); + if (!get_ec_key(env, argv[2], argv[3], atom_undefined, &ec)) + goto badarg; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + pkey = EVP_PKEY_new(); + EVP_PKEY_set1_EC_KEY(pkey, ec); + ecdsa_s_len=(size_t)EVP_PKEY_size(pkey); + enif_alloc_binary(ecdsa_s_len, &ret_bin); + + ctx = EVP_PKEY_CTX_new(pkey, NULL); + EVP_PKEY_sign_init(ctx); + /* EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); */ + EVP_PKEY_CTX_set_signature_md(ctx, md); + + i = EVP_PKEY_sign(ctx, ret_bin.data, &ecdsa_s_len, + digest_bin.data, digest_bin.size); + ASSERT(i<=0 || ecdsa_s_len <= ret_bin.size); + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); +#else + enif_alloc_binary(ECDSA_size(ec), &ret_bin); + len = EVP_MD_size(md); + i = ECDSA_sign(EVP_MD_type(md), digest_bin.data, len, - ret_bin.data, &dsa_s_len, key); + ret_bin.data, &ecdsa_s_len, ec); +#endif - EC_KEY_free(key); + EC_KEY_free(ec); if (i) { - if (dsa_s_len != ret_bin.size) { - enif_realloc_binary(&ret_bin, dsa_s_len); + if (ecdsa_s_len != ret_bin.size) { + enif_realloc_binary(&ret_bin, ecdsa_s_len); } return enif_make_binary(env, &ret_bin); } @@ -3847,8 +3985,8 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM } badarg: - if (key) - EC_KEY_free(key); + if (ec) + EC_KEY_free(ec); return make_badarg_maybe(env); #else return atom_notsup; @@ -3859,7 +3997,12 @@ static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER {/* (Type, Digest, Signature, Curve, Key) */ #if defined(HAVE_EC) ErlNifBinary digest_bin, sign_bin; - int i, len; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; +#else +#endif + int i; EC_KEY* key = NULL; const ERL_NIF_TERM type = argv[0]; struct digest_type_t *digp = NULL; @@ -3873,25 +4016,36 @@ static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER if (!md) { return atom_notsup; } - len = EVP_MD_size(md); if (!enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != len + || digest_bin.size != EVP_MD_size(md) || !enif_inspect_binary(env, argv[2], &sign_bin) - || !get_ec_key(env, argv[3], atom_undefined, argv[4], &key)) - goto badarg; + || !get_ec_key(env, argv[3], atom_undefined, argv[4], &key)) { + if (key) + EC_KEY_free(key); + return make_badarg_maybe(env); + } - i = ECDSA_verify(EVP_MD_type(md), digest_bin.data, len, - sign_bin.data, sign_bin.size, key); +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + pkey = EVP_PKEY_new(); + EVP_PKEY_set1_EC_KEY(pkey, key); - EC_KEY_free(key); + ctx = EVP_PKEY_CTX_new(pkey, NULL); + EVP_PKEY_verify_init(ctx); + EVP_PKEY_CTX_set_signature_md(ctx, md); - return (i==1 ? atom_true : atom_false); + i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, + digest_bin.data, digest_bin.size); + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); +#else + i = ECDSA_verify(EVP_MD_type(md), digest_bin.data, EVP_MD_size(md), + sign_bin.data, sign_bin.size, key); +#endif + + EC_KEY_free(key); + return (i==1 ? atom_true : atom_false); -badarg: - if (key) - EC_KEY_free(key); - return make_badarg_maybe(env); #else return atom_notsup; #endif -- cgit v1.2.3 From 03f3ec41f5468413235e3923a542a11cfd631089 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 3 Jul 2017 18:27:50 +0200 Subject: crypto: pk sign with new function from PR838 The function pkey_verify_nif handles pk signing with a general approach that is enabled by EVP api in OpenSSL 1.0.0 The rejected PR838 introduced that function and lots of other stuff so far neglected. It also made some different rsa padding methods possible (included). Since the crypto code base has changed significantly, it was an overhelming work to try a git merge. Therefore this commit is a manual move of the source code from the PR into current maint. This commit concentrates to use the new function compatible with the old functions. This includes some #if:s for different versions, compatibility code for 0.9.8. Lacking: test cases, exporting the more general erlang api, documentation... --- lib/crypto/c_src/crypto.c | 625 +++++++++++++++++++++++++++++----------------- lib/crypto/src/crypto.erl | 45 ++-- 2 files changed, 416 insertions(+), 254 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index e0029d1d9a..028eebd7e6 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -438,8 +438,7 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -452,7 +451,6 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -511,8 +509,7 @@ static ErlNifFunc nif_funcs[] = { {"do_exor", 2, do_exor}, {"rc4_set_key", 1, rc4_set_key}, {"rc4_encrypt_with_state", 2, rc4_encrypt_with_state}, - {"rsa_sign_nif", 3, rsa_sign_nif}, - {"dss_sign_nif", 3, dss_sign_nif}, + {"pkey_sign_nif", 5, pkey_sign_nif}, {"rsa_public_crypt", 4, rsa_public_crypt}, {"rsa_private_crypt", 4, rsa_private_crypt}, {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, @@ -525,7 +522,6 @@ static ErlNifFunc nif_funcs[] = { {"srp_host_secret_nif", 5, srp_host_secret_nif}, {"ec_key_generate", 2, ec_key_generate}, - {"ecdsa_sign_nif", 4, ecdsa_sign_nif}, {"ecdsa_verify_nif", 5, ecdsa_verify_nif}, {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif}, @@ -589,6 +585,23 @@ static ERL_NIF_TERM atom_des_ecb; static ERL_NIF_TERM atom_blowfish_ecb; #endif +static ERL_NIF_TERM atom_rsa; +static ERL_NIF_TERM atom_dss; +static ERL_NIF_TERM atom_ecdsa; +static ERL_NIF_TERM atom_rsa_mgf1_md; +static ERL_NIF_TERM atom_rsa_padding; +static ERL_NIF_TERM atom_rsa_pkcs1_pss_padding; +static ERL_NIF_TERM atom_rsa_x931_padding; +static ERL_NIF_TERM atom_rsa_pss_saltlen; +static ERL_NIF_TERM atom_sha224; +static ERL_NIF_TERM atom_sha256; +static ERL_NIF_TERM atom_sha384; +static ERL_NIF_TERM atom_sha512; +static ERL_NIF_TERM atom_md5; +static ERL_NIF_TERM atom_ripemd160; + + + static ErlNifResourceType* hmac_context_rtype; struct hmac_context { @@ -916,6 +929,20 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #else atom_not_supported = enif_make_atom(env,"not_supported"); #endif + atom_rsa = enif_make_atom(env,"rsa"); + atom_dss = enif_make_atom(env,"dss"); + atom_ecdsa = enif_make_atom(env,"ecdsa"); + atom_rsa_mgf1_md = enif_make_atom(env,"rsa_mgf1_md"); + atom_rsa_padding = enif_make_atom(env,"rsa_padding"); + atom_rsa_pkcs1_pss_padding = enif_make_atom(env,"rsa_pkcs1_pss_padding"); + atom_rsa_x931_padding = enif_make_atom(env,"rsa_x931_padding"); + atom_rsa_pss_saltlen = enif_make_atom(env,"rsa_pss_saltlen"); + atom_sha224 = enif_make_atom(env,"sha224"); + atom_sha256 = enif_make_atom(env,"sha256"); + atom_sha384 = enif_make_atom(env,"sha384"); + atom_sha512 = enif_make_atom(env,"sha512"); + atom_md5 = enif_make_atom(env,"md5"); + atom_ripemd160 = enif_make_atom(env,"ripemd160"); init_digest_types(env); init_cipher_types(env); @@ -2633,82 +2660,6 @@ static int get_rsa_public_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) } -static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Type, Digest, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */ - ErlNifBinary digest_bin, ret_bin; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; - size_t rsa_s_len; -#else - unsigned rsa_s_len, len; -#endif - RSA *rsa; - int i; - struct digest_type_t *digp; - const EVP_MD *md; - - digp = get_digest_type(argv[0]); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (!enif_inspect_binary(env,argv[1],&digest_bin) - || digest_bin.size != EVP_MD_size(md)) { - return enif_make_badarg(env); - } - - rsa = RSA_new(); - if (!get_rsa_private_key(env, argv[2], rsa)) { - RSA_free(rsa); - return enif_make_badarg(env); - } - - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_RSA(pkey, rsa); - rsa_s_len=(size_t)EVP_PKEY_size(pkey); - enif_alloc_binary(rsa_s_len, &ret_bin); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_sign_init(ctx); - EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_sign(ctx, ret_bin.data, &rsa_s_len, - digest_bin.data, digest_bin.size); - ASSERT(i<=0 || rsa_s_len <= ret_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - enif_alloc_binary(RSA_size(rsa), &ret_bin); - len = EVP_MD_size(md); - - ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); - i = RSA_sign(md->type, digest_bin.data, len, - ret_bin.data, &rsa_s_len, rsa); -#endif - - RSA_free(rsa); - if (i > 0) { - ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, rsa_s_len); - if (rsa_s_len != ret_bin.size) { - enif_realloc_binary(&ret_bin, rsa_s_len); - ERL_VALGRIND_ASSERT_MEM_DEFINED(ret_bin.data, rsa_s_len); - } - return enif_make_binary(env,&ret_bin); - } - else { - enif_release_binary(&ret_bin); - return atom_error; - } -} - static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Digest, Signature, Key=[E,N]) */ ErlNifBinary digest_bin, sign_bin; @@ -2829,83 +2780,6 @@ static int get_dss_public_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) return 1; } -static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (sha, Digest, Key=[P,Q,G,PrivKey]) */ - ErlNifBinary digest_bin, ret_bin; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; - size_t dsa_s_len; -#else - unsigned dsa_s_len, len; -#endif - DSA *dsa; - int i; - struct digest_type_t *digp; - const EVP_MD *md; - - if (argv[0] != atom_sha) { /* dsa uses sha1 */ - return enif_make_badarg(env); - } - - digp = get_digest_type(argv[0]); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (!enif_inspect_binary(env,argv[1],&digest_bin) - || digest_bin.size != EVP_MD_size(md)) { - return enif_make_badarg(env); - } - - dsa = DSA_new(); - if (!get_dss_private_key(env, argv[2], dsa)) { - DSA_free(dsa); - return enif_make_badarg(env); - } - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_DSA(pkey, dsa); - dsa_s_len=(size_t)EVP_PKEY_size(pkey); - enif_alloc_binary(dsa_s_len, &ret_bin); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_sign_init(ctx); - /* EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); */ - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_sign(ctx, ret_bin.data, &dsa_s_len, - digest_bin.data, digest_bin.size); - ASSERT(i<=0 || dsa_s_len <= ret_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - enif_alloc_binary(DSA_size(dsa), &ret_bin); - len = EVP_MD_size(md); - - i = DSA_sign(md->type, digest_bin.data, len, - ret_bin.data, &dsa_s_len, dsa); -#endif - - DSA_free(dsa); - - if (i) { - if (dsa_s_len != ret_bin.size) { - enif_realloc_binary(&ret_bin, dsa_s_len); - } - return enif_make_binary(env, &ret_bin); - } - else { - enif_release_binary(&ret_bin); - return atom_error; - } -} - static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (sha, Digest, Signature,Key=[P, Q, G, Y]) */ ErlNifBinary digest_bin, sign_bin; @@ -3916,83 +3790,6 @@ badarg: #endif } -static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Type, Digest, Curve, Key) */ -#if defined(HAVE_EC) - ErlNifBinary digest_bin, ret_bin; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; - size_t ecdsa_s_len; -#else - unsigned ecdsa_s_len, len; -#endif - EC_KEY *ec = NULL; - int i; - struct digest_type_t *digp; - const EVP_MD *md; - - digp = get_digest_type(argv[0]); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (!enif_inspect_binary(env,argv[1],&digest_bin) - || digest_bin.size != EVP_MD_size(md)) - goto badarg; - - if (!get_ec_key(env, argv[2], argv[3], atom_undefined, &ec)) - goto badarg; - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_EC_KEY(pkey, ec); - ecdsa_s_len=(size_t)EVP_PKEY_size(pkey); - enif_alloc_binary(ecdsa_s_len, &ret_bin); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_sign_init(ctx); - /* EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); */ - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_sign(ctx, ret_bin.data, &ecdsa_s_len, - digest_bin.data, digest_bin.size); - ASSERT(i<=0 || ecdsa_s_len <= ret_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - enif_alloc_binary(ECDSA_size(ec), &ret_bin); - len = EVP_MD_size(md); - - i = ECDSA_sign(EVP_MD_type(md), digest_bin.data, len, - ret_bin.data, &ecdsa_s_len, ec); -#endif - - EC_KEY_free(ec); - if (i) { - if (ecdsa_s_len != ret_bin.size) { - enif_realloc_binary(&ret_bin, ecdsa_s_len); - } - return enif_make_binary(env, &ret_bin); - } - else { - enif_release_binary(&ret_bin); - return atom_error; - } - -badarg: - if (ec) - EC_KEY_free(ec); - return make_badarg_maybe(env); -#else - return atom_notsup; -#endif -} - static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Digest, Signature, Curve, Key) */ #if defined(HAVE_EC) @@ -4109,6 +3906,362 @@ out_err: #endif } +/*================================================================*/ +#define PKEY_BADARG -1 +#define PKEY_NOTSUP 0 +#define PKEY_OK 1 + +typedef struct PKeyCryptOptions { + const EVP_MD *rsa_mgf1_md; + ErlNifBinary rsa_oaep_label; + const EVP_MD *rsa_oaep_md; + int rsa_padding; + const EVP_MD *signature_md; +} PKeyCryptOptions; + +typedef struct PKeySignOptions { + const EVP_MD *rsa_mgf1_md; + int rsa_padding; + int rsa_pss_saltlen; +} PKeySignOptions; + +static int get_pkey_digest_type(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM type, + const EVP_MD **md) +{ + struct digest_type_t *digp = NULL; + *md = NULL; + + if (type == atom_none && algorithm == atom_rsa) return PKEY_OK; + + digp = get_digest_type(type); + if (!digp) return PKEY_BADARG; + if (!digp->md.p) return PKEY_NOTSUP; + + *md = digp->md.p; + return PKEY_OK; +} + + +static int get_pkey_sign_digest(ErlNifEnv *env, ERL_NIF_TERM algorithm, + ERL_NIF_TERM type, ERL_NIF_TERM data, + unsigned char *md_value, const EVP_MD **mdp, + unsigned char **tbsp, size_t *tbslenp) +{ + int i; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + ErlNifBinary tbs_bin; + EVP_MD_CTX *mdctx; + const EVP_MD *md = *mdp; + unsigned char *tbs = *tbsp; + size_t tbslen = *tbslenp; + unsigned int tbsleni; + + if ((i = get_pkey_digest_type(env, algorithm, type, &md)) != PKEY_OK) { + return i; + } + if (enif_get_tuple(env, data, &tpl_arity, &tpl_terms)) { + if (tpl_arity != 2 || tpl_terms[0] != atom_digest + || !enif_inspect_binary(env, tpl_terms[1], &tbs_bin) + || (md != NULL && tbs_bin.size != EVP_MD_size(md))) { + return PKEY_BADARG; + } + /* We have a digest (= hashed text) in tbs_bin */ + tbs = tbs_bin.data; + tbslen = tbs_bin.size; + } else if (md == NULL) { + if (!enif_inspect_binary(env, data, &tbs_bin)) { + return PKEY_BADARG; + } + /* md == NULL, that is no hashing because DigestType argument was atom_none */ + tbs = tbs_bin.data; + tbslen = tbs_bin.size; + } else { + if (!enif_inspect_binary(env, data, &tbs_bin)) { + return PKEY_BADARG; + } + /* We have the cleartext in tbs_bin and the hash algo info in md */ + tbs = md_value; + mdctx = EVP_MD_CTX_create(); + if (!mdctx) { + return PKEY_BADARG; + } + /* Looks well, now hash the plain text into a digest according to md */ + if (EVP_DigestInit_ex(mdctx, md, NULL) <= 0) { + EVP_MD_CTX_destroy(mdctx); + return PKEY_BADARG; + } + if (EVP_DigestUpdate(mdctx, tbs_bin.data, tbs_bin.size) <= 0) { + EVP_MD_CTX_destroy(mdctx); + return PKEY_BADARG; + } + if (EVP_DigestFinal_ex(mdctx, tbs, &tbsleni) <= 0) { + EVP_MD_CTX_destroy(mdctx); + return PKEY_BADARG; + } + tbslen = (size_t)(tbsleni); + EVP_MD_CTX_destroy(mdctx); + } + + *mdp = md; + *tbsp = tbs; + *tbslenp = tbslen; + + return PKEY_OK; +} + + +static int get_pkey_sign_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM options, + const EVP_MD *md, PKeySignOptions *opt) +{ + ERL_NIF_TERM head, tail; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + const EVP_MD *opt_md; + int i; + + if (!enif_is_list(env, options)) { + return PKEY_BADARG; + } + + /* defaults */ + if (algorithm == atom_rsa) { + opt->rsa_mgf1_md = NULL; + opt->rsa_padding = RSA_PKCS1_PADDING; + opt->rsa_pss_saltlen = -2; + } + + if (enif_is_empty_list(env, options)) { + return PKEY_OK; + } + + if (algorithm == atom_rsa) { + tail = options; + while (enif_get_list_cell(env, tail, &head, &tail)) { + if (enif_get_tuple(env, head, &tpl_arity, &tpl_terms) && tpl_arity == 2) { + if (tpl_terms[0] == atom_rsa_mgf1_md && enif_is_atom(env, tpl_terms[1])) { + i = get_pkey_digest_type(env, algorithm, tpl_terms[1], &opt_md); + if (i != PKEY_OK) { + return i; + } + opt->rsa_mgf1_md = opt_md; + } else if (tpl_terms[0] == atom_rsa_padding) { + if (tpl_terms[1] == atom_rsa_pkcs1_padding) { + opt->rsa_padding = RSA_PKCS1_PADDING; + /* } else if (tpl_terms[1] == atom_rsa_pkcs1_pss_padding) { */ + /* opt->rsa_padding = RSA_PKCS1_PSS_PADDING; */ + /* if (opt->rsa_mgf1_md == NULL) { */ + /* opt->rsa_mgf1_md = md; */ + /* } */ + } else if (tpl_terms[1] == atom_rsa_x931_padding) { + opt->rsa_padding = RSA_X931_PADDING; + } else if (tpl_terms[1] == atom_rsa_no_padding) { + opt->rsa_padding = RSA_NO_PADDING; + } else { + return PKEY_BADARG; + } + } else if (tpl_terms[0] == atom_rsa_pss_saltlen) { + if (!enif_get_int(env, tpl_terms[1], &(opt->rsa_pss_saltlen)) + || opt->rsa_pss_saltlen < -2) { + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + } + } else { + return PKEY_BADARG; + } + + return PKEY_OK; +} + +static int get_pkey_sign_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, EVP_PKEY **pkey) +{ + if (algorithm == atom_rsa) { + RSA *rsa = RSA_new(); + + if (!get_rsa_private_key(env, key, rsa)) { + RSA_free(rsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_RSA(*pkey, rsa)) { + EVP_PKEY_free(*pkey); + RSA_free(rsa); + return PKEY_BADARG; + } + } else if (algorithm == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = NULL; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + + if (enif_get_tuple(env, key, &tpl_arity, &tpl_terms) && tpl_arity == 2 + && enif_is_tuple(env, tpl_terms[0]) && enif_is_binary(env, tpl_terms[1]) + && get_ec_key(env, tpl_terms[0], tpl_terms[1], atom_undefined, &ec)) { + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_EC_KEY(*pkey, ec)) { + EVP_PKEY_free(*pkey); + EC_KEY_free(ec); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } +#else + return PKEY_NOTSUP; +#endif + } else if (algorithm == atom_dss) { + DSA *dsa = DSA_new(); + + if (!get_dss_private_key(env, key, dsa)) { + DSA_free(dsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_DSA(*pkey, dsa)) { + EVP_PKEY_free(*pkey); + DSA_free(dsa); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + + return PKEY_OK; +} + +static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) +{/* (Algorithm, Type, Data|{digest,Digest}, Key, Options) */ + int i; + const EVP_MD *md = NULL; + unsigned char md_value[EVP_MAX_MD_SIZE]; + EVP_PKEY *pkey; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY_CTX *ctx; + size_t siglen; +#else + unsigned len, siglen; +#endif + PKeySignOptions sig_opt; + ErlNifBinary sig_bin; /* signature */ + unsigned char *tbs; /* data to be signed */ + size_t tbslen; +/*char buf[1024]; +enif_get_atom(env,argv[0],buf,1024,ERL_NIF_LATIN1); printf("algo=%s ",buf); +enif_get_atom(env,argv[1],buf,1024,ERL_NIF_LATIN1); printf("hash=%s ",buf); +printf("\r\n"); +*/ + i = get_pkey_sign_digest(env, argv[0], argv[1], argv[2], md_value, &md, &tbs, &tbslen); + if (i != PKEY_OK) { + if (i == PKEY_NOTSUP) + return atom_notsup; + else + return enif_make_badarg(env); + } + + i = get_pkey_sign_options(env, argv[0], argv[4], md, &sig_opt); + if (i != PKEY_OK) { + if (i == PKEY_NOTSUP) + return atom_notsup; + else + return enif_make_badarg(env); + } + + if (get_pkey_sign_key(env, argv[0], argv[3], &pkey) != PKEY_OK) { + return enif_make_badarg(env); + } + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +/* printf("EVP interface\r\n"); + */ + ctx = EVP_PKEY_CTX_new(pkey, NULL); + if (!ctx) goto badarg; + if (EVP_PKEY_sign_init(ctx) <= 0) goto badarg; + if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + + if (argv[0] == atom_rsa) { + if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; + if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { + if (sig_opt.rsa_mgf1_md != NULL + && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; + if (sig_opt.rsa_pss_saltlen > -2 + && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) + goto badarg; + } + } + + if (EVP_PKEY_sign(ctx, NULL, &siglen, tbs, tbslen) <= 0) goto badarg; + enif_alloc_binary(siglen, &sig_bin); + + if (md != NULL) { + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); + } + i = EVP_PKEY_sign(ctx, sig_bin.data, &siglen, tbs, tbslen); + + EVP_PKEY_CTX_free(ctx); +#else +/*printf("Old interface\r\n"); + */ + if (argv[0] == atom_rsa) { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + enif_alloc_binary(RSA_size(rsa), &sig_bin); + len = EVP_MD_size(md); + ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + i = RSA_sign(md->type, tbs, len, sig_bin.data, &siglen, rsa); + + } else if (argv[0] == atom_dss) { + DSA *dsa = EVP_PKEY_get1_DSA(pkey); + enif_alloc_binary(DSA_size(dsa), &sig_bin); + len = EVP_MD_size(md); + ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + i = DSA_sign(md->type, tbs, len, sig_bin.data, &siglen, dsa); + + } else if (argv[0] == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + enif_alloc_binary(ECDSA_size(ec), &sig_bin); + len = EVP_MD_size(md); + ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + i = ECDSA_sign(md->type, tbs, len, sig_bin.data, &siglen, ec); +#else + return atom_notsup; +#endif + } else { + goto badarg; + } +#endif + + EVP_PKEY_free(pkey); + if (i == 1) { + ERL_VALGRIND_MAKE_MEM_DEFINED(sig_bin.data, siglen); + if (siglen != sig_bin.size) { + enif_realloc_binary(&sig_bin, siglen); + ERL_VALGRIND_ASSERT_MEM_DEFINED(sig_bin.data, siglen); + } + return enif_make_binary(env, &sig_bin); + } else { + enif_release_binary(&sig_bin); + return atom_error; + } + + badarg: +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY_CTX_free(ctx); +#endif + EVP_PKEY_free(pkey); + return enif_make_badarg(env); +} + +/*================================================================*/ + static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { ErlNifBinary seed_bin; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 85206ce9e5..fb34d54ab3 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -22,6 +22,11 @@ -module(crypto). +-export([rsa_sign_nif/3, + dss_sign_nif/3, + ecdsa_sign_nif/4]). + + -export([start/0, stop/0, info_lib/0, info_fips/0, supports/0, enable_fips_mode/1, version/0, bytes_to_integer/1]). -export([hash/2, hash_init/1, hash_update/2, hash_final/1]). @@ -401,24 +406,18 @@ verify(rsa, Type, {digest, Digest}, Signature, Key) -> verify(ecdsa, Type, {digest, Digest}, Signature, [Key, Curve]) -> notsup_to_error( ecdsa_verify_nif(Type, Digest, Signature, nif_curve_params(Curve), ensure_int_as_bin(Key))). -sign(dss, none, Data, Key) when is_binary(Data) -> - sign(dss, sha, {digest, Data}, Key); -sign(Alg, Type, Data, Key) when is_binary(Data) -> - sign(Alg, Type, {digest, hash(Type, Data)}, Key); -sign(rsa, Type, {digest, Digest}, Key) -> - case rsa_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [rsa, Type, {digest, Digest}, Key]); - Sign -> Sign - end; -sign(dss, Type, {digest, Digest}, Key) -> - case dss_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [dss, Type, {digest, Digest}, Key]); - Sign -> Sign - end; -sign(ecdsa, Type, {digest, Digest}, [Key, Curve]) -> - case ecdsa_sign_nif(Type, Digest, nif_curve_params(Curve), ensure_int_as_bin(Key)) of - error -> erlang:error(badkey, [ecdsa, Type, {digest, Digest}, [Key, Curve]]); - Sign -> Sign + +sign(Algorithm, Type, Data, Key) -> + sign(Algorithm, Type, Data, Key, []). + +%% Backwards compatible +sign(Algorithm = dss, none, Digest, Key, Options) -> + sign(Algorithm, sha, {digest, Digest}, Key, Options); +sign(Algorithm, Type, Data, Key, Options) -> + case pkey_sign_nif(Algorithm, Type, Data, format_pkey(Algorithm, Key), Options) of + error -> erlang:error(badkey, [Algorithm, Type, Data, Key, Options]); + notsup -> erlang:error(notsup); + Signature -> Signature end. -spec public_encrypt(rsa, binary(), [binary()], rsa_padding()) -> @@ -839,6 +838,7 @@ srp_value_B_nif(_Multiplier, _Verifier, _Generator, _Exponent, _Prime) -> ?nif_s %% Digital signatures -------------------------------------------------------------------- +pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. rsa_sign_nif(_Type,_Digest,_Key) -> ?nif_stub. dss_sign_nif(_Type,_Digest,_Key) -> ?nif_stub. ecdsa_sign_nif(_Type, _Digest, _Curve, _Key) -> ?nif_stub. @@ -962,6 +962,15 @@ ensure_int_as_bin(Int) when is_integer(Int) -> ensure_int_as_bin(Bin) -> Bin. +format_pkey(rsa, Key) -> + map_ensure_int_as_bin(Key); +format_pkey(ecdsa, [Key, Curve]) -> + {nif_curve_params(Curve), ensure_int_as_bin(Key)}; +format_pkey(dss, Key) -> + map_ensure_int_as_bin(Key); +format_pkey(_, Key) -> + Key. + %%-------------------------------------------------------------------- %% -type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. -- cgit v1.2.3 From c77d224cab6481178e9d1db4fcfdb79b11af2ba1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 4 Jul 2017 20:40:27 +0200 Subject: crypto: pk verify with new function from PR838 Same comment as previous commit applies. --- lib/crypto/c_src/crypto.c | 355 ++++++++++++++++++++++------------------------ lib/crypto/src/crypto.erl | 39 ++--- 2 files changed, 185 insertions(+), 209 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 028eebd7e6..042b8290be 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -433,12 +433,11 @@ static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NI static ERL_NIF_TERM strong_rand_range_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -451,7 +450,6 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -504,12 +502,11 @@ static ErlNifFunc nif_funcs[] = { {"strong_rand_range_nif", 1, strong_rand_range_nif}, {"rand_uniform_nif", 2, rand_uniform_nif}, {"mod_exp_nif", 4, mod_exp_nif}, - {"dss_verify_nif", 4, dss_verify_nif}, - {"rsa_verify_nif", 4, rsa_verify_nif}, {"do_exor", 2, do_exor}, {"rc4_set_key", 1, rc4_set_key}, {"rc4_encrypt_with_state", 2, rc4_encrypt_with_state}, {"pkey_sign_nif", 5, pkey_sign_nif}, + {"pkey_verify_nif", 6, pkey_verify_nif}, {"rsa_public_crypt", 4, rsa_public_crypt}, {"rsa_private_crypt", 4, rsa_private_crypt}, {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, @@ -522,7 +519,6 @@ static ErlNifFunc nif_funcs[] = { {"srp_host_secret_nif", 5, srp_host_secret_nif}, {"ec_key_generate", 2, ec_key_generate}, - {"ecdsa_verify_nif", 5, ecdsa_verify_nif}, {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif}, {"rand_seed_nif", 1, rand_seed_nif}, @@ -2659,64 +2655,6 @@ static int get_rsa_public_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) return 1; } - -static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Type, Digest, Signature, Key=[E,N]) */ - ErlNifBinary digest_bin, sign_bin; - int i; - RSA *rsa; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; -#endif - const EVP_MD *md; - const ERL_NIF_TERM type = argv[0]; - struct digest_type_t *digp = NULL; - - digp = get_digest_type(type); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (!enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != EVP_MD_size(md) - || !enif_inspect_binary(env, argv[2], &sign_bin)) - { - return enif_make_badarg(env); - } - - rsa = RSA_new(); - if (!get_rsa_public_key(env, argv[3], rsa)) { - RSA_free(rsa); - return enif_make_badarg(env); - } - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_RSA(pkey, rsa); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_verify_init(ctx); - EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING); - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, - digest_bin.data, digest_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - i = RSA_verify(md->type, digest_bin.data, EVP_MD_size(md), - sign_bin.data, sign_bin.size, rsa); -#endif - - RSA_free(rsa); - return(i > 0) ? atom_true : atom_false; -} - static int get_dss_private_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) { /* key=[P,Q,G,KEY] */ @@ -2780,67 +2718,6 @@ static int get_dss_public_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) return 1; } -static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (sha, Digest, Signature,Key=[P, Q, G, Y]) */ - ErlNifBinary digest_bin, sign_bin; - int i; - DSA *dsa; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; -#endif - const EVP_MD *md; - const ERL_NIF_TERM type = argv[0]; - struct digest_type_t *digp = NULL; - - digp = get_digest_type(type); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (argv[0] != atom_sha) { - return atom_notsup; - } - - if (!enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != EVP_MD_size(md) - || !enif_inspect_binary(env, argv[2], &sign_bin)) - { - return enif_make_badarg(env); - } - - dsa = DSA_new(); - if (!get_dss_public_key(env, argv[3], dsa)) { - DSA_free(dsa); - return enif_make_badarg(env); - } - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_DSA(pkey, dsa); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_verify_init(ctx); - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, - digest_bin.data, digest_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH, - sign_bin.data, sign_bin.size, dsa); -#endif - - DSA_free(dsa); - return(i > 0) ? atom_true : atom_false; -} - - static int rsa_pad(ERL_NIF_TERM term, int* padding) { if (term == atom_rsa_pkcs1_padding) { @@ -3790,64 +3667,6 @@ badarg: #endif } -static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Type, Digest, Signature, Curve, Key) */ -#if defined(HAVE_EC) - ErlNifBinary digest_bin, sign_bin; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - EVP_PKEY *pkey; - EVP_PKEY_CTX *ctx; -#else -#endif - int i; - EC_KEY* key = NULL; - const ERL_NIF_TERM type = argv[0]; - struct digest_type_t *digp = NULL; - const EVP_MD *md; - - digp = get_digest_type(type); - if (!digp) { - return enif_make_badarg(env); - } - md = digp->md.p; - if (!md) { - return atom_notsup; - } - - if (!enif_inspect_binary(env, argv[1], &digest_bin) - || digest_bin.size != EVP_MD_size(md) - || !enif_inspect_binary(env, argv[2], &sign_bin) - || !get_ec_key(env, argv[3], atom_undefined, argv[4], &key)) { - if (key) - EC_KEY_free(key); - return make_badarg_maybe(env); - } - -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - pkey = EVP_PKEY_new(); - EVP_PKEY_set1_EC_KEY(pkey, key); - - ctx = EVP_PKEY_CTX_new(pkey, NULL); - EVP_PKEY_verify_init(ctx); - EVP_PKEY_CTX_set_signature_md(ctx, md); - - i = EVP_PKEY_verify(ctx, sign_bin.data, sign_bin.size, - digest_bin.data, digest_bin.size); - EVP_PKEY_CTX_free(ctx); - EVP_PKEY_free(pkey); -#else - i = ECDSA_verify(EVP_MD_type(md), digest_bin.data, EVP_MD_size(md), - sign_bin.data, sign_bin.size, key); -#endif - - EC_KEY_free(key); - return (i==1 ? atom_true : atom_false); - -#else - return atom_notsup; -#endif -} - /* (_OthersPublicKey, _MyPrivateKey) (_OthersPublicKey, _MyEC_Point) @@ -4216,14 +4035,14 @@ printf("\r\n"); len = EVP_MD_size(md); ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); i = RSA_sign(md->type, tbs, len, sig_bin.data, &siglen, rsa); - + RSA_free(rsa); } else if (argv[0] == atom_dss) { DSA *dsa = EVP_PKEY_get1_DSA(pkey); enif_alloc_binary(DSA_size(dsa), &sig_bin); len = EVP_MD_size(md); ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); i = DSA_sign(md->type, tbs, len, sig_bin.data, &siglen, dsa); - + DSA_free(dsa); } else if (argv[0] == atom_ecdsa) { #if defined(HAVE_EC) EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); @@ -4231,6 +4050,7 @@ printf("\r\n"); len = EVP_MD_size(md); ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); i = ECDSA_sign(md->type, tbs, len, sig_bin.data, &siglen, ec); + EC_KEY_free(ec); #else return atom_notsup; #endif @@ -4260,6 +4080,171 @@ printf("\r\n"); return enif_make_badarg(env); } + +static int get_pkey_verify_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, + EVP_PKEY **pkey) +{ + if (algorithm == atom_rsa) { + RSA *rsa = RSA_new(); + + if (!get_rsa_public_key(env, key, rsa)) { + RSA_free(rsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_RSA(*pkey, rsa)) { + EVP_PKEY_free(*pkey); + RSA_free(rsa); + return PKEY_BADARG; + } + } else if (algorithm == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = NULL; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + + if (enif_get_tuple(env, key, &tpl_arity, &tpl_terms) && tpl_arity == 2 + && enif_is_tuple(env, tpl_terms[0]) && enif_is_binary(env, tpl_terms[1]) + && get_ec_key(env, tpl_terms[0], atom_undefined, tpl_terms[1], &ec)) { + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_EC_KEY(*pkey, ec)) { + EVP_PKEY_free(*pkey); + EC_KEY_free(ec); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } +#else + return PKEY_NOTSUP; +#endif + } else if (algorithm == atom_dss) { + DSA *dsa = DSA_new(); + + if (!get_dss_public_key(env, key, dsa)) { + DSA_free(dsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_DSA(*pkey, dsa)) { + EVP_PKEY_free(*pkey); + DSA_free(dsa); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + + return PKEY_OK; +} + +static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) +{/* (Algorithm, Type, Data|{digest,Digest}, Signature, Key, Options) */ + int i; + const EVP_MD *md = NULL; + unsigned char md_value[EVP_MAX_MD_SIZE]; + EVP_PKEY *pkey; +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY_CTX *ctx; +#else +#endif + PKeySignOptions sig_opt; + ErlNifBinary sig_bin; /* signature */ + unsigned char *tbs; /* data to be signed */ + size_t tbslen; + + if (!enif_inspect_binary(env, argv[3], &sig_bin)) { + return enif_make_badarg(env); + } + + i = get_pkey_sign_digest(env, argv[0], argv[1], argv[2], md_value, &md, &tbs, &tbslen); + if (i != PKEY_OK) { + if (i == PKEY_NOTSUP) + return atom_notsup; + else + return enif_make_badarg(env); + } + + i = get_pkey_sign_options(env, argv[0], argv[5], md, &sig_opt); + if (i != PKEY_OK) { + if (i == PKEY_NOTSUP) + return atom_notsup; + else + return enif_make_badarg(env); + } + + if (get_pkey_verify_key(env, argv[0], argv[4], &pkey) != PKEY_OK) { + return enif_make_badarg(env); + } + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +/* printf("EVP interface\r\n"); + */ + ctx = EVP_PKEY_CTX_new(pkey, NULL); + if (!ctx) goto badarg; + if (EVP_PKEY_verify_init(ctx) <= 0) goto badarg; + if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + + if (argv[0] == atom_rsa) { + if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; + if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { + if (sig_opt.rsa_mgf1_md != NULL + && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; + if (sig_opt.rsa_pss_saltlen > -2 + && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) + goto badarg; + } + } + + if (md != NULL) { + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); + } + i = EVP_PKEY_verify(ctx, sig_bin.data, sig_bin.size, tbs, tbslen); + + EVP_PKEY_CTX_free(ctx); +#else +/*printf("Old interface\r\n"); +*/ + if (argv[0] == atom_rsa) { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + i = RSA_verify(md->type, tbs, tbslen, sig_bin.data, sig_bin.size, rsa); + RSA_free(rsa); + } else if (argv[0] == atom_dss) { + DSA *dsa = EVP_PKEY_get1_DSA(pkey); + i = DSA_verify(0, tbs, tbslen, sig_bin.data, sig_bin.size, dsa); + DSA_free(dsa); + } else if (argv[0] == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + i = ECDSA_verify(EVP_MD_type(md), tbs, tbslen, sig_bin.data, sig_bin.size, ec); + EC_KEY_free(ec); +#else + return atom_notsup; +#endif + } else { + goto badarg; + } +#endif + + EVP_PKEY_free(pkey); + if (i == 1) { + return atom_true; + } else { + return atom_false; + } + + badarg: +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + EVP_PKEY_CTX_free(ctx); +#endif + EVP_PKEY_free(pkey); + return enif_make_badarg(env); +} + + /*================================================================*/ static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index fb34d54ab3..4939bcfd1f 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -22,11 +22,6 @@ -module(crypto). --export([rsa_sign_nif/3, - dss_sign_nif/3, - ecdsa_sign_nif/4]). - - -export([start/0, stop/0, info_lib/0, info_fips/0, supports/0, enable_fips_mode/1, version/0, bytes_to_integer/1]). -export([hash/2, hash_init/1, hash_update/2, hash_final/1]). @@ -394,18 +389,19 @@ mod_pow(Base, Exponent, Prime) -> <<0>> -> error; R -> R end. -verify(dss, none, Data, Signature, Key) when is_binary(Data) -> - verify(dss, sha, {digest, Data}, Signature, Key); -verify(Alg, Type, Data, Signature, Key) when is_binary(Data) -> - verify(Alg, Type, {digest, hash(Type, Data)}, Signature, Key); -verify(dss, Type, {digest, Digest}, Signature, Key) -> - dss_verify_nif(Type, Digest, Signature, map_ensure_int_as_bin(Key)); -verify(rsa, Type, {digest, Digest}, Signature, Key) -> - notsup_to_error( - rsa_verify_nif(Type, Digest, Signature, map_ensure_int_as_bin(Key))); -verify(ecdsa, Type, {digest, Digest}, Signature, [Key, Curve]) -> - notsup_to_error( - ecdsa_verify_nif(Type, Digest, Signature, nif_curve_params(Curve), ensure_int_as_bin(Key))). + +verify(Algorithm, Type, Data, Signature, Key) -> + verify(Algorithm, Type, Data, Signature, Key, []). + +%% Backwards compatible +verify(Algorithm = dss, none, Digest, Signature, Key, Options) -> + verify(Algorithm, sha, {digest, Digest}, Signature, Key, Options); +verify(Algorithm, Type, Data, Signature, Key, Options) -> + case pkey_verify_nif(Algorithm, Type, Data, Signature, format_pkey(Algorithm, Key), Options) of + notsup -> erlang:error(notsup); + Boolean -> Boolean + end. + sign(Algorithm, Type, Data, Key) -> sign(Algorithm, Type, Data, Key, []). @@ -838,14 +834,9 @@ srp_value_B_nif(_Multiplier, _Verifier, _Generator, _Exponent, _Prime) -> ?nif_s %% Digital signatures -------------------------------------------------------------------- -pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. -rsa_sign_nif(_Type,_Digest,_Key) -> ?nif_stub. -dss_sign_nif(_Type,_Digest,_Key) -> ?nif_stub. -ecdsa_sign_nif(_Type, _Digest, _Curve, _Key) -> ?nif_stub. -dss_verify_nif(_Type, _Digest, _Signature, _Key) -> ?nif_stub. -rsa_verify_nif(_Type, _Digest, _Signature, _Key) -> ?nif_stub. -ecdsa_verify_nif(_Type, _Digest, _Signature, _Curve, _Key) -> ?nif_stub. +pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. +pkey_verify_nif(_Algorithm, _Type, _Data, _Signature, _Key, _Options) -> ?nif_stub. %% Public Keys -------------------------------------------------------------------- %% RSA Rivest-Shamir-Adleman functions -- cgit v1.2.3 From a919aae4e5661944e8086ec7a44c95138e187c43 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 4 Jul 2017 20:50:32 +0200 Subject: crypto: introduced preproc symbol HAS_EVP_PKEY_CTX --- lib/crypto/c_src/crypto.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 042b8290be..d418a3c395 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -110,6 +110,10 @@ #endif +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +# define HAS_EVP_PKEY_CTX +#endif + #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) #include @@ -3963,7 +3967,7 @@ static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM a const EVP_MD *md = NULL; unsigned char md_value[EVP_MAX_MD_SIZE]; EVP_PKEY *pkey; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX *ctx; size_t siglen; #else @@ -3998,7 +4002,7 @@ printf("\r\n"); return enif_make_badarg(env); } -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX /* printf("EVP interface\r\n"); */ ctx = EVP_PKEY_CTX_new(pkey, NULL); @@ -4073,7 +4077,7 @@ printf("\r\n"); } badarg: -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX_free(ctx); #endif EVP_PKEY_free(pkey); @@ -4147,7 +4151,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM const EVP_MD *md = NULL; unsigned char md_value[EVP_MAX_MD_SIZE]; EVP_PKEY *pkey; -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX *ctx; #else #endif @@ -4180,7 +4184,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM return enif_make_badarg(env); } -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX /* printf("EVP interface\r\n"); */ ctx = EVP_PKEY_CTX_new(pkey, NULL); @@ -4237,7 +4241,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } badarg: -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX_free(ctx); #endif EVP_PKEY_free(pkey); -- cgit v1.2.3 From 06af9c6524ac4c0504e2b440dbce98a8587fa050 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 5 Jul 2017 12:18:31 +0200 Subject: crypto: Fix compatibility problems with openssl 1.0.0 cryptolib --- lib/crypto/c_src/crypto.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index d418a3c395..52ce00b937 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3871,11 +3871,15 @@ static int get_pkey_sign_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF } else if (tpl_terms[0] == atom_rsa_padding) { if (tpl_terms[1] == atom_rsa_pkcs1_padding) { opt->rsa_padding = RSA_PKCS1_PADDING; - /* } else if (tpl_terms[1] == atom_rsa_pkcs1_pss_padding) { */ - /* opt->rsa_padding = RSA_PKCS1_PSS_PADDING; */ - /* if (opt->rsa_mgf1_md == NULL) { */ - /* opt->rsa_mgf1_md = md; */ - /* } */ + } else if (tpl_terms[1] == atom_rsa_pkcs1_pss_padding) { +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) + opt->rsa_padding = RSA_PKCS1_PSS_PADDING; + if (opt->rsa_mgf1_md == NULL) { + opt->rsa_mgf1_md = md; + } +#else + return PKEY_NOTSUP; +#endif } else if (tpl_terms[1] == atom_rsa_x931_padding) { opt->rsa_padding = RSA_X931_PADDING; } else if (tpl_terms[1] == atom_rsa_no_padding) { @@ -4013,8 +4017,15 @@ printf("\r\n"); if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { - if (sig_opt.rsa_mgf1_md != NULL - && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; + if (sig_opt.rsa_mgf1_md != NULL) { +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) + if (EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; +#else + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); + return atom_notsup; +#endif + } if (sig_opt.rsa_pss_saltlen > -2 && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) goto badarg; @@ -4056,7 +4067,8 @@ printf("\r\n"); i = ECDSA_sign(md->type, tbs, len, sig_bin.data, &siglen, ec); EC_KEY_free(ec); #else - return atom_notsup; + EVP_PKEY_free(pkey); + return atom_notsup; #endif } else { goto badarg; @@ -4195,8 +4207,15 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { - if (sig_opt.rsa_mgf1_md != NULL - && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; + if (sig_opt.rsa_mgf1_md != NULL) { +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) + if (EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; +#else + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); + return atom_notsup; +#endif + } if (sig_opt.rsa_pss_saltlen > -2 && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) goto badarg; @@ -4226,6 +4245,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM i = ECDSA_verify(EVP_MD_type(md), tbs, tbslen, sig_bin.data, sig_bin.size, ec); EC_KEY_free(ec); #else + EVP_PKEY_free(pkey); return atom_notsup; #endif } else { -- cgit v1.2.3 From ee9df8b9518bd669b062fe2c7273d44adc015da1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 6 Jul 2017 12:52:45 +0200 Subject: crypto: tests for rsa sign/verify from PR838 --- lib/crypto/src/crypto.erl | 17 +++++++- lib/crypto/test/crypto_SUITE.erl | 90 +++++++++++++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 15 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 4939bcfd1f..1df05462c9 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -25,7 +25,7 @@ -export([start/0, stop/0, info_lib/0, info_fips/0, supports/0, enable_fips_mode/1, version/0, bytes_to_integer/1]). -export([hash/2, hash_init/1, hash_update/2, hash_final/1]). --export([sign/4, verify/5]). +-export([sign/4, sign/5, verify/5, verify/6]). -export([generate_key/2, generate_key/3, compute_key/4]). -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). @@ -45,6 +45,10 @@ -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). +%% Private. For tests. +-export([packed_openssl_version/4]). + + -deprecated({rand_uniform, 2, next_major_release}). %% This should correspond to the similar macro in crypto.c @@ -1004,3 +1008,14 @@ erlint(<>) -> %% mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub. + +%%%---------------------------------------------------------------- +%% 9470495 == V(0,9,8,zh). +%% 268435615 == V(1,0,0,i). +%% 268439663 == V(1,0,1,f). + +packed_openssl_version(MAJ, MIN, FIX, P0) -> + %% crypto.c + P1 = atom_to_list(P0), + P = lists:sum([C-$a||C<-P1]), + ((((((((MAJ bsl 8) bor MIN) bsl 8 ) bor FIX) bsl 8) bor (P+1)) bsl 4) bor 16#f). diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index dbfe295900..7f039297dd 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -751,10 +751,44 @@ do_sign_verify({Type, Hash, Public, Private, Msg}) -> Signature = crypto:sign(Type, Hash, Msg, Private), case crypto:verify(Type, Hash, Msg, Signature, Public) of true -> + ct:log("OK crypto:sign(~p, ~p, ..., ..., ...)", [Type,Hash]), negative_verify(Type, Hash, Msg, <<10,20>>, Public); false -> + ct:log("ERROR crypto:sign(~p, ~p, ..., ..., ...)", [Type,Hash]), ct:fail({{crypto, verify, [Type, Hash, Msg, Signature, Public]}}) - end. + end; +do_sign_verify({Type, Hash, Public, Private, Msg, Options}) -> + LibVer = + case crypto:info_lib() of + [{<<"OpenSSL">>,Ver,<<"OpenSSL",_/binary>>}] -> Ver; + _ -> infinity + end, + Pad = proplists:get_value(rsa_padding, Options), + NotSupLow = lists:member(Pad, [rsa_pkcs1_pss_padding]), + try + crypto:sign(Type, Hash, Msg, Private, Options) + of + Signature -> + case crypto:verify(Type, Hash, Msg, Signature, Public, Options) of + true -> + ct:log("OK crypto:sign(~p, ~p, ..., ..., ..., ~p)", [Type,Hash,Options]), + negative_verify(Type, Hash, Msg, <<10,20>>, Public, Options); + false -> + ct:log("ERROR crypto:sign(~p, ~p, ..., ..., ..., ~p)", [Type,Hash,Options]), + ct:fail({{crypto, verify, [Type, Hash, Msg, Signature, Public, Options]}}) + end + catch + error:notsup when NotSupLow == true, + is_integer(LibVer), + LibVer < 16#10001000 -> + %% Thoose opts where introduced in 1.0.1 + ct:log("notsup but OK in old cryptolib crypto:sign(~p, ~p, ..., ..., ..., ~p)", + [Type,Hash,Options]), + true; + C:E -> + ct:log("~p:~p crypto:sign(~p, ~p, ..., ..., ..., ~p)", [C,E,Type,Hash,Options]), + ct:fail({{crypto, sign_verify, [LibVer, Type, Hash, Msg, Public, Options]}}) + end. negative_verify(Type, Hash, Msg, Signature, Public) -> case crypto:verify(Type, Hash, Msg, Signature, Public) of @@ -764,6 +798,14 @@ negative_verify(Type, Hash, Msg, Signature, Public) -> ok end. +negative_verify(Type, Hash, Msg, Signature, Public, Options) -> + case crypto:verify(Type, Hash, Msg, Signature, Public, Options) of + true -> + ct:fail({{crypto, verify, [Type, Hash, Msg, Signature, Public, Options]}, should_fail}); + false -> + ok + end. + do_public_encrypt({Type, Public, Private, Msg, Padding}) -> PublicEcn = (catch crypto:public_encrypt(Type, Msg, Public, Padding)), case crypto:private_decrypt(Type, PublicEcn, Private, Padding) of @@ -1268,18 +1310,38 @@ group_config(_, Config) -> Config. sign_verify_tests(Type, Msg, Public, Private, PublicS, PrivateS) -> - sign_verify_tests(Type, [md5, sha, sha224, sha256], Msg, Public, Private) ++ - sign_verify_tests(Type, [sha384, sha512], Msg, PublicS, PrivateS). - -sign_verify_tests(Type, Hashs, Msg, Public, Private) -> - lists:foldl(fun(Hash, Acc) -> - case is_supported(Hash) of - true -> - [{Type, Hash, Public, Private, Msg}|Acc]; - false -> - Acc - end - end, [], Hashs). + gen_sign_verify_tests(Type, [md5, ripemd160, sha, sha224, sha256], Msg, Public, Private, + [undefined, + [{rsa_padding, rsa_pkcs1_pss_padding}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, 0}], + [{rsa_padding, rsa_x931_padding}] + ]) ++ + gen_sign_verify_tests(Type, [sha384, sha512], Msg, PublicS, PrivateS, + [undefined, + [{rsa_padding, rsa_pkcs1_pss_padding}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, 0}], + [{rsa_padding, rsa_x931_padding}] + ]). + +gen_sign_verify_tests(Type, Hashs, Msg, Public, Private, Opts) -> + lists:foldr(fun(Hash, Acc0) -> + case is_supported(Hash) of + true -> + lists:foldr(fun + (undefined, Acc1) -> + [{Type, Hash, Public, Private, Msg} | Acc1]; + ([{rsa_padding, rsa_x931_padding} | _], Acc1) + when Hash =:= md5 + orelse Hash =:= ripemd160 + orelse Hash =:= sha224 -> + Acc1; + (Opt, Acc1) -> + [{Type, Hash, Public, Private, Msg, Opt} | Acc1] + end, Acc0, Opts); + false -> + Acc0 + end + end, [], Hashs). rfc_1321_msgs() -> [<<"">>, @@ -2300,7 +2362,7 @@ fmt_words(Words) -> log_rsp_size(Label, Term) -> S = erts_debug:size(Term), - ct:pal("~s: ~w test(s), Memory used: ~s", + ct:log("~s: ~w test(s), Memory used: ~s", [Label, length(Term), fmt_words(S)]). read_rsp(Config, Type, Files) -> -- cgit v1.2.3 From cf5b798714e89923c9068720fcf5a0e31af72b2c Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 6 Jul 2017 14:38:41 +0200 Subject: crypto: doc sign/5 and verify/6 --- lib/crypto/doc/src/crypto.xml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index ecc33aafc3..5b2c46a004 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -159,6 +159,17 @@ digest_type() = md5 | sha | sha224 | sha256 | sha384 | sha512 + rsa_digest_type() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512 + + dss_digest_type() = sha | sha224 | sha256 | sha384 | sha512

Note that the actual supported + dss_digest_type depends on the underlying crypto library. In OpenSSL version >= 1.0.1 the listed digest are supported, while in 1.0.0 only sha, sha224 and sha256 are supported. In version 0.9.8 only sha is supported.

+ + ecdsa_digest_type() = sha | sha224 | sha256 | sha384 | sha512 + + sign_options() = [{rsa_pad, rsa_sign_padding()} | {rsa_pss_saltlen, integer()}] + + rsa_sign_padding() = rsa_pkcs1_padding | rsa_pkcs1_pss_padding + hash_algorithms() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512

md4 is also supported for hash_init/1 and hash/2. Note that both md4 and md5 are recommended only for compatibility with existing applications.

@@ -682,6 +693,7 @@ sign(Algorithm, DigestType, Msg, Key) -> binary() + sign(Algorithm, DigestType, Msg, Key, Options) -> binary() Create digital signature. Algorithm = rsa | dss | ecdsa @@ -689,8 +701,9 @@ The msg is either the binary "cleartext" data to be signed or it is the hashed value of "cleartext" i.e. the digest (plaintext). - DigestType = digest_type() + DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] + Options = sign_options()

Creates a digital signature.

@@ -871,15 +884,17 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ verify(Algorithm, DigestType, Msg, Signature, Key) -> boolean() + verify(Algorithm, DigestType, Msg, Signature, Key, Options) -> boolean() Verifies a digital signature. Algorithm = rsa | dss | ecdsa Msg = binary() | {digest,binary()} The msg is either the binary "cleartext" data or it is the hashed value of "cleartext" i.e. the digest (plaintext). - DigestType = digest_type() + DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Signature = binary() Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] + Options = sign_options()

Verifies a digital signature

-- cgit v1.2.3 From 0efea034a03db099a0e47fe49fc4f56e386e65d8 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 7 Jul 2017 12:18:56 +0200 Subject: crypto: test case for sign/verify dss with sha256 etc In OpenSSL version >= 1.0.1 the hash algos sha, sha224, sha256, sha384 and sha512 are supported. In 1.0.0 sha, sha224 and sha256 are supported In 0.9.8 sha is supported --- lib/crypto/test/crypto_SUITE.erl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 7f039297dd..d6e3b99aae 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1220,7 +1220,17 @@ group_config(dss = Type, Config) -> Msg = dss_plain(), Public = dss_params() ++ [dss_public()], Private = dss_params() ++ [dss_private()], - SignVerify = [{Type, sha, Public, Private, Msg}], + SupportedHashs = proplists:get_value(hashs, crypto:supports(), []), + DssHashs = + case crypto:info_lib() of + [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10001000 -> + [sha, sha224, sha256, sha384, sha512]; + _Else -> + [sha] + end, + SignVerify = [{Type, Hash, Public, Private, Msg} + || Hash <- DssHashs, + lists:member(Hash, SupportedHashs)], [{sign_verify, SignVerify} | Config]; group_config(ecdsa = Type, Config) -> -- cgit v1.2.3 From 0841976a87ac6eabcfee8d7f194d090b2790d0ff Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 7 Jul 2017 12:53:00 +0200 Subject: crypto: test case for sign/verify ecdsa with sha256 etc --- lib/crypto/test/crypto_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index d6e3b99aae..88f13d766c 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1225,6 +1225,8 @@ group_config(dss = Type, Config) -> case crypto:info_lib() of [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10001000 -> [sha, sha224, sha256, sha384, sha512]; + [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer > 16#10000000 -> + [sha, sha224, sha256]; _Else -> [sha] end, @@ -1236,7 +1238,11 @@ group_config(dss = Type, Config) -> group_config(ecdsa = Type, Config) -> {Private, Public} = ec_key_named(), Msg = ec_msg(), - SignVerify = [{Type, sha, Public, Private, Msg}], + SupportedHashs = proplists:get_value(hashs, crypto:supports(), []), + DssHashs = [sha, sha224, sha256, sha384, sha512], + SignVerify = [{Type, Hash, Public, Private, Msg} + || Hash <- DssHashs, + lists:member(Hash, SupportedHashs)], [{sign_verify, SignVerify} | Config]; group_config(srp, Config) -> GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()], -- cgit v1.2.3 From 077e96db54a1538f7d8dd1271cc216783493badf Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 12 Jul 2017 18:00:53 +0200 Subject: crypto: Fix compile errors for make target 'valgrind' introduced in 03f3ec41f5468413235e3923a542a11cfd631089 --- lib/crypto/c_src/crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 52ce00b937..1d9c1e0f88 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4048,14 +4048,14 @@ printf("\r\n"); RSA *rsa = EVP_PKEY_get1_RSA(pkey); enif_alloc_binary(RSA_size(rsa), &sig_bin); len = EVP_MD_size(md); - ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len); i = RSA_sign(md->type, tbs, len, sig_bin.data, &siglen, rsa); RSA_free(rsa); } else if (argv[0] == atom_dss) { DSA *dsa = EVP_PKEY_get1_DSA(pkey); enif_alloc_binary(DSA_size(dsa), &sig_bin); len = EVP_MD_size(md); - ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len); i = DSA_sign(md->type, tbs, len, sig_bin.data, &siglen, dsa); DSA_free(dsa); } else if (argv[0] == atom_ecdsa) { @@ -4063,7 +4063,7 @@ printf("\r\n"); EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); enif_alloc_binary(ECDSA_size(ec), &sig_bin); len = EVP_MD_size(md); - ERL_VALGRIND_ASSERT_MEM_DEFINED(digest_bin.data, len); + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, len); i = ECDSA_sign(md->type, tbs, len, sig_bin.data, &siglen, ec); EC_KEY_free(ec); #else -- cgit v1.2.3 From 2181428bcad2abb3265e796e0b84b10830c74a76 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Wed, 6 Sep 2017 21:56:22 +0200 Subject: Implement crypto rand cache --- lib/crypto/src/crypto.erl | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index d111525214..69c98c651f 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -30,11 +30,12 @@ -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). --export([rand_seed/0]). --export([rand_seed_s/0]). +-export([rand_seed/0, rand_seed_alg/1]). +-export([rand_seed_s/0, rand_seed_alg_s/1]). -export([rand_plugin_next/1]). -export([rand_plugin_uniform/1]). -export([rand_plugin_uniform/2]). +-export([rand_cache_plugin_next/1]). -export([rand_uniform/2]). -export([block_encrypt/3, block_decrypt/3, block_encrypt/4, block_decrypt/4]). -export([next_iv/2, next_iv/3]). @@ -299,6 +300,8 @@ stream_decrypt(State, Data0) -> -spec strong_rand_bytes(non_neg_integer()) -> binary(). -spec rand_seed() -> rand:state(). -spec rand_seed_s() -> rand:state(). +-spec rand_seed_alg(Alg :: atom()) -> rand:state(). +-spec rand_seed_alg_s(Alg :: atom()) -> rand:state(). -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). @@ -314,12 +317,24 @@ rand_seed() -> rand:seed(rand_seed_s()). rand_seed_s() -> + rand_seed_alg_s(?MODULE). + +rand_seed_alg(Alg) -> + rand:seed(rand_seed_alg_s(Alg)). + +-define(CRYPTO_CACHE_BITS, 56). +rand_seed_alg_s(?MODULE) -> {#{ type => ?MODULE, bits => 64, next => fun ?MODULE:rand_plugin_next/1, uniform => fun ?MODULE:rand_plugin_uniform/1, uniform_n => fun ?MODULE:rand_plugin_uniform/2}, - no_seed}. + no_seed}; +rand_seed_alg_s(crypto_cache) -> + {#{ type => crypto_cache, + bits => ?CRYPTO_CACHE_BITS, + next => fun ?MODULE:rand_cache_plugin_next/1}, + <<>>}. rand_plugin_next(Seed) -> {bytes_to_integer(strong_rand_range(1 bsl 64)), Seed}. @@ -330,6 +345,11 @@ rand_plugin_uniform(State) -> rand_plugin_uniform(Max, State) -> {bytes_to_integer(strong_rand_range(Max)) + 1, State}. +rand_cache_plugin_next(<<>>) -> + rand_cache_plugin_next( + strong_rand_bytes(?CRYPTO_CACHE_BITS * 16)); % Cache 16 * 8 words +rand_cache_plugin_next(<>) -> + {I, Cache}. strong_rand_range(Range) when is_integer(Range), Range > 0 -> BinRange = int_to_bin(Range), @@ -377,7 +397,7 @@ rand_uniform_nif(_From,_To) -> ?nif_stub. -spec rand_seed(binary()) -> ok. -rand_seed(Seed) -> +rand_seed(Seed) when is_binary(Seed) -> rand_seed_nif(Seed). rand_seed_nif(_Seed) -> ?nif_stub. -- cgit v1.2.3 From 1bf0b21344d951c65e54c6abfe7907ef8b63d946 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 22 Sep 2017 15:19:03 +0200 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 796e3b6d84..1dceebb4e4 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.0 +CRYPTO_VSN = 4.1 -- cgit v1.2.3 From af2073640c4b7c67c9b978ebc203d57ac43e96dc Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 22 Sep 2017 15:21:49 +0200 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 574353ce7a..9376e6f649 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,52 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.1 + +
Fixed Bugs and Malfunctions + + +

On macOS, crypto would crash if observer + had been started before crypto. On the beta for + macOS 10.13 (High Sierra), crypto would crash. + Both of those bugs have been fixed.

+

+ Own Id: OTP-14499 Aux Id: ERL-251 ERL-439

+
+
+
+ + +
Improvements and New Features + + +

+ Extend crypto:sign, crypto:verify, public_key:sign and + public_key:verify with:

+

+ * support for RSASSA-PS padding for signatures and for + saltlength setting
* X9.31 RSA padding.
* sha, + sha224, sha256, sha384, and sha512 for dss signatures as + mentioned in NIST SP 800-57 Part 1.
* ripemd160 to + be used for rsa signatures.

+

+ This is a manual merge of half of the pull request 838 by + potatosalad from Sept 2015.

+

+ Own Id: OTP-13704 Aux Id: PR838

+
+ +

+ A new tuple in crypto:supports/0 reports supported + MAC algorithms.

+

+ Own Id: OTP-14504

+
+
+
+ +
+
Crypto 4.0
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 29222f06f38e321e5a2ac8dae67ced92b6544bde Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Tue, 19 Sep 2017 15:33:53 +0200 Subject: Document crypto rand cache --- lib/crypto/doc/src/crypto.xml | 111 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 89ef529c5d..5afab632cd 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -739,9 +739,16 @@ random number generation, in order to generate cryptographically strong random numbers (based on OpenSSL's BN_rand_range), - and saves it on process dictionary before returning it as well. + and saves it in the process dictionary before returning it as well. See also - rand:seed/1. + rand:seed/1 and + rand_seed_s/0. +

+

+ When using the state object from this function the + rand functions using it + may throw exception low_entropy in case the random generator + failed due to lack of secure "randomness".

Example

@@ -763,6 +770,106 @@ _FloatValue = rand:uniform().     % [0.0; 1.0[
See also rand:seed_s/1.

+

+ When using the state object from this function the + rand functions using it + may throw exception low_entropy in case the random generator + failed due to lack of secure "randomness". +

+ +

+ The state returned from this function can not be used + to get a reproducable random sequence as from + the other + rand + functions, + since reproducability does not match cryptographically safe. +

+

+ The only supported usage is to generate one distinct + random sequence from this start state. +

+
+ + + + + rand_seed_alg(Alg) -> rand:state() + Strong random number generation plugin state + + Alg = crypto | crypto_cache + + +

+ Creates state object for + random number generation, + in order to generate cryptographically strong random numbers. + See also + rand:seed/1 and + rand_seed_alg_s/1. +

+

+ When using the state object from this function the + rand functions using it + may throw exception low_entropy in case the random generator + failed due to lack of secure "randomness". +

+

Example

+
+_ = crypto:rand_seed_alg(crypto_cache),
+_IntegerValue = rand:uniform(42), % [1; 42]
+_FloatValue = rand:uniform().     % [0.0; 1.0[
+
+
+ + + rand_seed_alg_s(Alg) -> rand:state() + Strong random number generation plugin state + + Alg = crypto | crypto_cache + + +

+ Creates state object for + random number generation, + in order to generate cryptographically strongly random numbers. + See also + rand:seed_s/1. +

+

+ If Alg is crypto this function behaves exactly like + rand_seed_s/0. +

+

+ If Alg is crypto_cache this function + fetches random data with OpenSSL's RAND_bytes + and caches it for speed using an internal word size + of 56 bits that makes calculations fast on 64 bit machines. +

+

+ When using the state object from this function the + rand functions using it + may throw exception low_entropy in case the random generator + failed due to lack of secure "randomness". +

+ +

+ The state returned from this function can not be used + to get a reproducable random sequence as from + the other + rand + functions, + since reproducability does not match cryptographically safe. +

+

+ In fact since random data is cached some numbers may + get reproduced if you try, but this is unpredictable. +

+

+ The only supported usage is to generate one distinct + random sequence from this start state. +

+
-- cgit v1.2.3 From 9395c7b4a2079349fdb881a1f537af5b73eacfd2 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Mon, 25 Sep 2017 15:15:37 +0200 Subject: Remove unused files from the documentation build --- lib/crypto/doc/src/fascicules.xml | 18 ------------------ lib/crypto/doc/src/note.gif | Bin 1539 -> 0 bytes lib/crypto/doc/src/warning.gif | Bin 1498 -> 0 bytes 3 files changed, 18 deletions(-) delete mode 100644 lib/crypto/doc/src/fascicules.xml delete mode 100644 lib/crypto/doc/src/note.gif delete mode 100644 lib/crypto/doc/src/warning.gif (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/fascicules.xml b/lib/crypto/doc/src/fascicules.xml deleted file mode 100644 index cbc266cd30..0000000000 --- a/lib/crypto/doc/src/fascicules.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - User's Guide - - - Reference Manual - - - Release Notes - - - Off-Print - - - diff --git a/lib/crypto/doc/src/note.gif b/lib/crypto/doc/src/note.gif deleted file mode 100644 index 6fffe30419..0000000000 Binary files a/lib/crypto/doc/src/note.gif and /dev/null differ diff --git a/lib/crypto/doc/src/warning.gif b/lib/crypto/doc/src/warning.gif deleted file mode 100644 index 96af52360e..0000000000 Binary files a/lib/crypto/doc/src/warning.gif and /dev/null differ -- cgit v1.2.3 From 7710c0d681a4b5f17253945dde0726de0e27cdcf Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 28 Sep 2017 14:48:44 +0200 Subject: Make cache size configurable --- lib/crypto/doc/src/crypto.xml | 14 ++++++++++++++ lib/crypto/doc/src/crypto_app.xml | 18 ++++++++++++++++++ lib/crypto/src/crypto.app.src | 2 +- lib/crypto/src/crypto.erl | 38 +++++++++++++++++++++++++++++--------- 4 files changed, 62 insertions(+), 10 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 5afab632cd..c32e3430ab 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -800,6 +800,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ Alg = crypto | crypto_cache +

Creates state object for random number generation, @@ -814,6 +815,12 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ may throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

+

+ The cache size can be changed from its default value using the + + crypto app's + configuration parameter rand_cache_size. +

Example

 _ = crypto:rand_seed_alg(crypto_cache),
@@ -829,6 +836,7 @@ _FloatValue = rand:uniform().     % [0.0; 1.0[
Alg = crypto | crypto_cache +

Creates state object for random number generation, @@ -852,6 +860,12 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ may throw exception low_entropy in case the random generator failed due to lack of secure "randomness".

+

+ The cache size can be changed from its default value using the + + crypto app's + configuration parameter rand_cache_size. +

The state returned from this function can not be used diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml index ba22557480..8296b1bc77 100644 --- a/lib/crypto/doc/src/crypto_app.xml +++ b/lib/crypto/doc/src/crypto_app.xml @@ -68,6 +68,24 @@ thus the crypto module will fail to load. This mechanism prevents the accidental use of non-validated algorithms.

+ rand_cache_size = integer() + +

+ Sets the cache size in bytes to use by + + crypto:rand_seed_alg(crypto_cache) + and + + crypto:rand_seed_alg_s(crypto_cache) + . + This parameter is read when a seed function is called, + and then kept in generators state object. It has a rather + small default value that causes reads of strong random bytes + about once per hundred calls for a random value. + The set value is rounded up to an integral number of words + of the size these seed functions use. +

+
diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src index 1d3f35e465..492aa10e51 100644 --- a/lib/crypto/src/crypto.app.src +++ b/lib/crypto/src/crypto.app.src @@ -24,7 +24,7 @@ crypto_ec_curves]}, {registered, []}, {applications, [kernel, stdlib]}, - {env, [{fips_mode, false}]}, + {env, [{fips_mode, false}, {rand_cache_size, 896}]}, {runtime_dependencies, ["erts-9.0","stdlib-3.4","kernel-5.3"]}]}. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 69c98c651f..69ca884471 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -297,11 +297,17 @@ stream_decrypt(State, Data0) -> %% %% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib %% +-type rand_cache_seed() :: + nonempty_improper_list(non_neg_integer(), binary()). -spec strong_rand_bytes(non_neg_integer()) -> binary(). -spec rand_seed() -> rand:state(). -spec rand_seed_s() -> rand:state(). --spec rand_seed_alg(Alg :: atom()) -> rand:state(). --spec rand_seed_alg_s(Alg :: atom()) -> rand:state(). +-spec rand_seed_alg(Alg :: atom()) -> + {rand:alg_handler(), + atom() | rand_cache_seed()}. +-spec rand_seed_alg_s(Alg :: atom()) -> + {rand:alg_handler(), + atom() | rand_cache_seed()}. -spec rand_uniform(crypto_integer(), crypto_integer()) -> crypto_integer(). @@ -319,10 +325,12 @@ rand_seed() -> rand_seed_s() -> rand_seed_alg_s(?MODULE). +-dialyzer({no_improper_lists, rand_seed_alg/1}). rand_seed_alg(Alg) -> rand:seed(rand_seed_alg_s(Alg)). - + -define(CRYPTO_CACHE_BITS, 56). +-dialyzer({no_improper_lists, rand_seed_alg_s/1}). rand_seed_alg_s(?MODULE) -> {#{ type => ?MODULE, bits => 64, @@ -331,10 +339,22 @@ rand_seed_alg_s(?MODULE) -> uniform_n => fun ?MODULE:rand_plugin_uniform/2}, no_seed}; rand_seed_alg_s(crypto_cache) -> + EnvCacheSize = + application:get_env( + crypto, rand_cache_size, + ?CRYPTO_CACHE_BITS * 16), % Cache 16 * 8 words + Bytes = (?CRYPTO_CACHE_BITS + 7) div 8, + CacheSize = + case ((EnvCacheSize + (Bytes - 1)) div Bytes) * Bytes of + Sz when is_integer(Sz), Bytes =< Sz -> + Sz; + _ -> + Bytes + end, {#{ type => crypto_cache, bits => ?CRYPTO_CACHE_BITS, next => fun ?MODULE:rand_cache_plugin_next/1}, - <<>>}. + [CacheSize|<<>>]}. rand_plugin_next(Seed) -> {bytes_to_integer(strong_rand_range(1 bsl 64)), Seed}. @@ -345,11 +365,11 @@ rand_plugin_uniform(State) -> rand_plugin_uniform(Max, State) -> {bytes_to_integer(strong_rand_range(Max)) + 1, State}. -rand_cache_plugin_next(<<>>) -> - rand_cache_plugin_next( - strong_rand_bytes(?CRYPTO_CACHE_BITS * 16)); % Cache 16 * 8 words -rand_cache_plugin_next(<>) -> - {I, Cache}. +-dialyzer({no_improper_lists, rand_cache_plugin_next/1}). +rand_cache_plugin_next([CacheSize|<<>>]) -> + rand_cache_plugin_next([CacheSize|strong_rand_bytes(CacheSize)]); +rand_cache_plugin_next([CacheSize|<>]) -> + {I, [CacheSize|Cache]}. strong_rand_range(Range) when is_integer(Range), Range > 0 -> BinRange = int_to_bin(Range), -- cgit v1.2.3 From a89405725c623d489643c2bd4a07ce626dccdcc3 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Mon, 2 Oct 2017 16:32:14 +0200 Subject: Future proof cache word size --- lib/crypto/src/crypto.erl | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 69ca884471..2ca5e4db9e 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -325,12 +325,10 @@ rand_seed() -> rand_seed_s() -> rand_seed_alg_s(?MODULE). --dialyzer({no_improper_lists, rand_seed_alg/1}). rand_seed_alg(Alg) -> rand:seed(rand_seed_alg_s(Alg)). -define(CRYPTO_CACHE_BITS, 56). --dialyzer({no_improper_lists, rand_seed_alg_s/1}). rand_seed_alg_s(?MODULE) -> {#{ type => ?MODULE, bits => 64, @@ -339,11 +337,11 @@ rand_seed_alg_s(?MODULE) -> uniform_n => fun ?MODULE:rand_plugin_uniform/2}, no_seed}; rand_seed_alg_s(crypto_cache) -> + CacheBits = ?CRYPTO_CACHE_BITS, EnvCacheSize = application:get_env( - crypto, rand_cache_size, - ?CRYPTO_CACHE_BITS * 16), % Cache 16 * 8 words - Bytes = (?CRYPTO_CACHE_BITS + 7) div 8, + crypto, rand_cache_size, CacheBits * 16), % Cache 16 * 8 words + Bytes = (CacheBits + 7) div 8, CacheSize = case ((EnvCacheSize + (Bytes - 1)) div Bytes) * Bytes of Sz when is_integer(Sz), Bytes =< Sz -> @@ -352,9 +350,9 @@ rand_seed_alg_s(crypto_cache) -> Bytes end, {#{ type => crypto_cache, - bits => ?CRYPTO_CACHE_BITS, + bits => CacheBits, next => fun ?MODULE:rand_cache_plugin_next/1}, - [CacheSize|<<>>]}. + {CacheBits, CacheSize, <<>>}}. rand_plugin_next(Seed) -> {bytes_to_integer(strong_rand_range(1 bsl 64)), Seed}. @@ -365,11 +363,12 @@ rand_plugin_uniform(State) -> rand_plugin_uniform(Max, State) -> {bytes_to_integer(strong_rand_range(Max)) + 1, State}. --dialyzer({no_improper_lists, rand_cache_plugin_next/1}). -rand_cache_plugin_next([CacheSize|<<>>]) -> - rand_cache_plugin_next([CacheSize|strong_rand_bytes(CacheSize)]); -rand_cache_plugin_next([CacheSize|<>]) -> - {I, [CacheSize|Cache]}. +rand_cache_plugin_next({CacheBits, CacheSize, <<>>}) -> + rand_cache_plugin_next( + {CacheBits, CacheSize, strong_rand_bytes(CacheSize)}); +rand_cache_plugin_next({CacheBits, CacheSize, Cache}) -> + <> = Cache, + {I, {CacheBits, CacheSize, NewCache}}. strong_rand_range(Range) when is_integer(Range), Range > 0 -> BinRange = int_to_bin(Range), -- cgit v1.2.3 From 4c448b6931c80c3e08232f01b15e3215216ff386 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 22 Sep 2017 13:24:46 +0200 Subject: crypto: Added pkey_crypt_nif from PR838 Testcases for ECDSA and DSA encrypt/decrypt and some other adaptions --- lib/crypto/c_src/crypto.c | 548 +++++++++++++++++++++++++++------------ lib/crypto/src/crypto.erl | 85 +++--- lib/crypto/test/crypto_SUITE.erl | 36 ++- 3 files changed, 462 insertions(+), 207 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 1d9c1e0f88..0eb149892d 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -442,8 +442,7 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -511,8 +510,7 @@ static ErlNifFunc nif_funcs[] = { {"rc4_encrypt_with_state", 2, rc4_encrypt_with_state}, {"pkey_sign_nif", 5, pkey_sign_nif}, {"pkey_verify_nif", 6, pkey_verify_nif}, - {"rsa_public_crypt", 4, rsa_public_crypt}, - {"rsa_private_crypt", 4, rsa_private_crypt}, + {"pkey_crypt_nif", 6, pkey_crypt_nif}, {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, {"dh_generate_parameters_nif", 2, dh_generate_parameters_nif}, {"dh_check", 1, dh_check}, @@ -549,6 +547,7 @@ static ERL_NIF_TERM atom_error; static ERL_NIF_TERM atom_rsa_pkcs1_padding; static ERL_NIF_TERM atom_rsa_pkcs1_oaep_padding; static ERL_NIF_TERM atom_rsa_no_padding; +static ERL_NIF_TERM atom_signature_md; static ERL_NIF_TERM atom_undefined; static ERL_NIF_TERM atom_ok; @@ -589,8 +588,12 @@ static ERL_NIF_TERM atom_rsa; static ERL_NIF_TERM atom_dss; static ERL_NIF_TERM atom_ecdsa; static ERL_NIF_TERM atom_rsa_mgf1_md; +static ERL_NIF_TERM atom_rsa_oaep_label; +static ERL_NIF_TERM atom_rsa_oaep_md; +static ERL_NIF_TERM atom_rsa_pad; /* backwards compatibility */ static ERL_NIF_TERM atom_rsa_padding; static ERL_NIF_TERM atom_rsa_pkcs1_pss_padding; +static ERL_NIF_TERM atom_rsa_sslv23_padding; static ERL_NIF_TERM atom_rsa_x931_padding; static ERL_NIF_TERM atom_rsa_pss_saltlen; static ERL_NIF_TERM atom_sha224; @@ -895,6 +898,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_rsa_pkcs1_padding = enif_make_atom(env,"rsa_pkcs1_padding"); atom_rsa_pkcs1_oaep_padding = enif_make_atom(env,"rsa_pkcs1_oaep_padding"); atom_rsa_no_padding = enif_make_atom(env,"rsa_no_padding"); + atom_signature_md = enif_make_atom(env,"signature_md"); atom_undefined = enif_make_atom(env,"undefined"); atom_ok = enif_make_atom(env,"ok"); atom_not_prime = enif_make_atom(env,"not_prime"); @@ -933,8 +937,12 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_dss = enif_make_atom(env,"dss"); atom_ecdsa = enif_make_atom(env,"ecdsa"); atom_rsa_mgf1_md = enif_make_atom(env,"rsa_mgf1_md"); + atom_rsa_oaep_label = enif_make_atom(env,"rsa_oaep_label"); + atom_rsa_oaep_md = enif_make_atom(env,"rsa_oaep_md"); + atom_rsa_pad = enif_make_atom(env,"rsa_pad"); /* backwards compatibility */ atom_rsa_padding = enif_make_atom(env,"rsa_padding"); atom_rsa_pkcs1_pss_padding = enif_make_atom(env,"rsa_pkcs1_pss_padding"); + atom_rsa_sslv23_padding = enif_make_atom(env,"rsa_sslv23_padding"); atom_rsa_x931_padding = enif_make_atom(env,"rsa_x931_padding"); atom_rsa_pss_saltlen = enif_make_atom(env,"rsa_pss_saltlen"); atom_sha224 = enif_make_atom(env,"sha224"); @@ -2739,100 +2747,6 @@ static int rsa_pad(ERL_NIF_TERM term, int* padding) return 1; } -static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Data, PublKey=[E,N], Padding, IsEncrypt) */ - ErlNifBinary data_bin, ret_bin; - ERL_NIF_TERM head, tail; - int padding, i; - RSA* rsa; - BIGNUM *e, *n; - - rsa = RSA_new(); - - if (!enif_inspect_binary(env, argv[0], &data_bin) - || !enif_get_list_cell(env, argv[1], &head, &tail) - || !get_bn_from_bin(env, head, &e) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &n) - || !enif_is_empty_list(env,tail) - || !rsa_pad(argv[2], &padding)) { - - RSA_free(rsa); - return enif_make_badarg(env); - } - (void) RSA_set0_key(rsa, n, e, NULL); - - enif_alloc_binary(RSA_size(rsa), &ret_bin); - - if (argv[3] == atom_true) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(data_bin.data,data_bin.size); - i = RSA_public_encrypt(data_bin.size, data_bin.data, - ret_bin.data, rsa, padding); - if (i > 0) { - ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, i); - } - } - else { - i = RSA_public_decrypt(data_bin.size, data_bin.data, - ret_bin.data, rsa, padding); - if (i > 0) { - ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, i); - enif_realloc_binary(&ret_bin, i); - } - } - RSA_free(rsa); - if (i > 0) { - return enif_make_binary(env,&ret_bin); - } - else { - enif_release_binary(&ret_bin); - return atom_error; - } -} - -static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Data, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Padding, IsEncrypt) */ - ErlNifBinary data_bin, ret_bin; - int padding, i; - RSA* rsa; - - rsa = RSA_new(); - - if (!enif_inspect_binary(env, argv[0], &data_bin) - || !get_rsa_private_key(env, argv[1], rsa) - || !rsa_pad(argv[2], &padding)) { - - RSA_free(rsa); - return enif_make_badarg(env); - } - - enif_alloc_binary(RSA_size(rsa), &ret_bin); - - if (argv[3] == atom_true) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(data_bin.data,data_bin.size); - i = RSA_private_encrypt(data_bin.size, data_bin.data, - ret_bin.data, rsa, padding); - if (i > 0) { - ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, i); - } - } - else { - i = RSA_private_decrypt(data_bin.size, data_bin.data, - ret_bin.data, rsa, padding); - if (i > 0) { - ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, i); - enif_realloc_binary(&ret_bin, i); - } - } - RSA_free(rsa); - if (i > 0) { - return enif_make_binary(env,&ret_bin); - } - else { - enif_release_binary(&ret_bin); - return atom_error; - } -} /* Creates a term which can be parsed by get_rsa_private_key(). This is a list of plain integer binaries (not mpints). */ static ERL_NIF_TERM put_rsa_private_key(ErlNifEnv* env, const RSA *rsa) @@ -3906,7 +3820,8 @@ static int get_pkey_sign_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF return PKEY_OK; } -static int get_pkey_sign_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, EVP_PKEY **pkey) + +static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, EVP_PKEY **pkey) { if (algorithm == atom_rsa) { RSA *rsa = RSA_new(); @@ -3965,6 +3880,67 @@ static int get_pkey_sign_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TER return PKEY_OK; } + +static int get_pkey_public_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, + EVP_PKEY **pkey) +{ + if (algorithm == atom_rsa) { + RSA *rsa = RSA_new(); + + if (!get_rsa_public_key(env, key, rsa)) { + RSA_free(rsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_RSA(*pkey, rsa)) { + EVP_PKEY_free(*pkey); + RSA_free(rsa); + return PKEY_BADARG; + } + } else if (algorithm == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = NULL; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + + if (enif_get_tuple(env, key, &tpl_arity, &tpl_terms) && tpl_arity == 2 + && enif_is_tuple(env, tpl_terms[0]) && enif_is_binary(env, tpl_terms[1]) + && get_ec_key(env, tpl_terms[0], atom_undefined, tpl_terms[1], &ec)) { + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_EC_KEY(*pkey, ec)) { + EVP_PKEY_free(*pkey); + EC_KEY_free(ec); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } +#else + return PKEY_NOTSUP; +#endif + } else if (algorithm == atom_dss) { + DSA *dsa = DSA_new(); + + if (!get_dss_public_key(env, key, dsa)) { + DSA_free(dsa); + return PKEY_BADARG; + } + + *pkey = EVP_PKEY_new(); + if (!EVP_PKEY_assign_DSA(*pkey, dsa)) { + EVP_PKEY_free(*pkey); + DSA_free(dsa); + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + + return PKEY_OK; +} + static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {/* (Algorithm, Type, Data|{digest,Digest}, Key, Options) */ int i; @@ -4002,7 +3978,7 @@ printf("\r\n"); return enif_make_badarg(env); } - if (get_pkey_sign_key(env, argv[0], argv[3], &pkey) != PKEY_OK) { + if (get_pkey_private_key(env, argv[0], argv[3], &pkey) != PKEY_OK) { return enif_make_badarg(env); } @@ -4097,66 +4073,6 @@ printf("\r\n"); } -static int get_pkey_verify_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, - EVP_PKEY **pkey) -{ - if (algorithm == atom_rsa) { - RSA *rsa = RSA_new(); - - if (!get_rsa_public_key(env, key, rsa)) { - RSA_free(rsa); - return PKEY_BADARG; - } - - *pkey = EVP_PKEY_new(); - if (!EVP_PKEY_assign_RSA(*pkey, rsa)) { - EVP_PKEY_free(*pkey); - RSA_free(rsa); - return PKEY_BADARG; - } - } else if (algorithm == atom_ecdsa) { -#if defined(HAVE_EC) - EC_KEY *ec = NULL; - const ERL_NIF_TERM *tpl_terms; - int tpl_arity; - - if (enif_get_tuple(env, key, &tpl_arity, &tpl_terms) && tpl_arity == 2 - && enif_is_tuple(env, tpl_terms[0]) && enif_is_binary(env, tpl_terms[1]) - && get_ec_key(env, tpl_terms[0], atom_undefined, tpl_terms[1], &ec)) { - - *pkey = EVP_PKEY_new(); - if (!EVP_PKEY_assign_EC_KEY(*pkey, ec)) { - EVP_PKEY_free(*pkey); - EC_KEY_free(ec); - return PKEY_BADARG; - } - } else { - return PKEY_BADARG; - } -#else - return PKEY_NOTSUP; -#endif - } else if (algorithm == atom_dss) { - DSA *dsa = DSA_new(); - - if (!get_dss_public_key(env, key, dsa)) { - DSA_free(dsa); - return PKEY_BADARG; - } - - *pkey = EVP_PKEY_new(); - if (!EVP_PKEY_assign_DSA(*pkey, dsa)) { - EVP_PKEY_free(*pkey); - DSA_free(dsa); - return PKEY_BADARG; - } - } else { - return PKEY_BADARG; - } - - return PKEY_OK; -} - static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {/* (Algorithm, Type, Data|{digest,Digest}, Signature, Key, Options) */ int i; @@ -4192,7 +4108,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM return enif_make_badarg(env); } - if (get_pkey_verify_key(env, argv[0], argv[4], &pkey) != PKEY_OK) { + if (get_pkey_public_key(env, argv[0], argv[4], &pkey) != PKEY_OK) { return enif_make_badarg(env); } @@ -4269,6 +4185,316 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } +/*--------------------------------*/ + +static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM options, + PKeyCryptOptions *opt) +{ + ERL_NIF_TERM head, tail; + const ERL_NIF_TERM *tpl_terms; + int tpl_arity; + const EVP_MD *opt_md; + int i; + + if (!enif_is_list(env, options)) { + return PKEY_BADARG; + } + + /* defaults */ + if (algorithm == atom_rsa) { + opt->rsa_mgf1_md = NULL; + opt->rsa_oaep_label.data = NULL; + opt->rsa_oaep_label.size = 0; + opt->rsa_oaep_md = NULL; + opt->rsa_padding = RSA_PKCS1_PADDING; + opt->signature_md = NULL; + } + + if (enif_is_empty_list(env, options)) { + return PKEY_OK; + } + + if (algorithm == atom_rsa) { + tail = options; + while (enif_get_list_cell(env, tail, &head, &tail)) { + if (enif_get_tuple(env, head, &tpl_arity, &tpl_terms) && tpl_arity == 2) { + if (tpl_terms[0] == atom_rsa_padding || tpl_terms[0] == atom_rsa_pad) { + if (tpl_terms[1] == atom_rsa_pkcs1_padding) { + opt->rsa_padding = RSA_PKCS1_PADDING; + } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) { + opt->rsa_padding = RSA_PKCS1_OAEP_PADDING; + } else if (tpl_terms[1] == atom_rsa_sslv23_padding) { + opt->rsa_padding = RSA_SSLV23_PADDING; + } else if (tpl_terms[1] == atom_rsa_x931_padding) { + opt->rsa_padding = RSA_X931_PADDING; + } else if (tpl_terms[1] == atom_rsa_no_padding) { + opt->rsa_padding = RSA_NO_PADDING; + } else { + return PKEY_BADARG; + } + } else if (tpl_terms[0] == atom_signature_md && enif_is_atom(env, tpl_terms[1])) { + i = get_pkey_digest_type(env, algorithm, tpl_terms[1], &opt_md); + if (i != PKEY_OK) { + return i; + } + opt->signature_md = opt_md; + } else if (tpl_terms[0] == atom_rsa_mgf1_md && enif_is_atom(env, tpl_terms[1])) { +#ifndef HAVE_RSA_OAEP_MD + if (tpl_terms[1] != atom_sha) + return PKEY_NOTSUP; +#endif + i = get_pkey_digest_type(env, algorithm, tpl_terms[1], &opt_md); + if (i != PKEY_OK) { + return i; + } + opt->rsa_mgf1_md = opt_md; + } else if (tpl_terms[0] == atom_rsa_oaep_label + && enif_inspect_binary(env, tpl_terms[1], &(opt->rsa_oaep_label))) { +#ifdef HAVE_RSA_OAEP_MD + continue; +#else + return PKEY_NOTSUP; +#endif + } else if (tpl_terms[0] == atom_rsa_oaep_md && enif_is_atom(env, tpl_terms[1])) { +#ifndef HAVE_RSA_OAEP_MD + if (tpl_terms[1] != atom_sha) + return PKEY_NOTSUP; +#endif + i = get_pkey_digest_type(env, algorithm, tpl_terms[1], &opt_md); + if (i != PKEY_OK) { + return i; + } + opt->rsa_oaep_md = opt_md; + } else { + return PKEY_BADARG; + } + } else { + return PKEY_BADARG; + } + } + } else { + return PKEY_BADARG; + } + + return PKEY_OK; +} + +static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) +{/* (Algorithm, Data, PublKey=[E,N]|[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Options, IsPrivate, IsEncrypt) */ + int i; + EVP_PKEY *pkey; + EVP_PKEY_CTX *ctx; + PKeyCryptOptions crypt_opt; + ErlNifBinary in_bin, out_bin, tmp_bin; + size_t outlen, tmplen; + int is_private = (argv[4] == atom_true), + is_encrypt = (argv[5] == atom_true); + +int algo_init = 0; +char algo[1024]; + + if (!enif_inspect_binary(env, argv[1], &in_bin)) { + return enif_make_badarg(env); + } + + i = get_pkey_crypt_options(env, argv[0], argv[3], &crypt_opt); + if (i != PKEY_OK) { + if (i == PKEY_NOTSUP) + return atom_notsup; + else + return enif_make_badarg(env); + } + + if (is_private) { + if (get_pkey_private_key(env, argv[0], argv[2], &pkey) != PKEY_OK) { + return enif_make_badarg(env); + } + } else { + if (get_pkey_public_key(env, argv[0], argv[2], &pkey) != PKEY_OK) { + return enif_make_badarg(env); + } + } + + out_bin.data = NULL; + out_bin.size = 0; + tmp_bin.data = NULL; + tmp_bin.size = 0; + + ctx = EVP_PKEY_CTX_new(pkey, NULL); + if (!ctx) goto badarg; + +enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); + + if (is_private) { + if (is_encrypt) { + /* private encrypt */ + if ((algo_init=EVP_PKEY_sign_init(ctx)) <= 0) { + /* fprintf(stderr,"BADARG %s private encrypt algo_init=%d %s:%d\r\n", algo, algo_init, __FILE__, __LINE__); */ + goto badarg; + } + } else { + /* private decrypt */ + if ((algo_init=EVP_PKEY_decrypt_init(ctx)) <= 0) { + /* fprintf(stderr,"BADARG %s private decrypt algo_init=%d %s:%d\r\n", algo, algo_init, __FILE__, __LINE__); */ + goto badarg; + } + } + } else { + if (is_encrypt) { + /* public encrypt */ + if ((algo_init=EVP_PKEY_encrypt_init(ctx)) <= 0) { + /* fprintf(stderr,"BADARG %s public encrypt algo_init=%d %s:%d\r\n", algo,algo_init,__FILE__, __LINE__); */ + goto badarg; + } + } else { + /* public decrypt */ + if ((algo_init=EVP_PKEY_verify_recover_init(ctx)) <= 0) { + /* fprintf(stderr,"BADARG %s public decrypt algo_init=%d %s:%d\r\n", algo,algo_init,__FILE__, __LINE__); */ + goto badarg; + } + } + } + + if (argv[0] == atom_rsa) { + if (crypt_opt.signature_md != NULL + && EVP_PKEY_CTX_set_signature_md(ctx, crypt_opt.signature_md) <= 0) + goto badarg; + if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { + if (is_encrypt) { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + if (rsa == NULL) goto badarg; + tmplen = RSA_size(rsa); + if (!enif_alloc_binary(tmplen, &tmp_bin)) goto badarg; + if (RSA_padding_add_SSLv23(tmp_bin.data, tmplen, in_bin.data, in_bin.size) <= 0) + goto badarg; + in_bin = tmp_bin; + } + if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_NO_PADDING) <= 0) goto badarg; + } else { + if (EVP_PKEY_CTX_set_rsa_padding(ctx, crypt_opt.rsa_padding) <= 0) goto badarg; + } +#ifdef HAVE_RSA_OAEP_MD + if (crypt_opt.rsa_padding == RSA_PKCS1_OAEP_PADDING) { + if (crypt_opt.rsa_oaep_md != NULL + && EVP_PKEY_CTX_set_rsa_oaep_md(ctx, crypt_opt.rsa_oaep_md) <= 0) + goto badarg; + if (crypt_opt.rsa_mgf1_md != NULL + && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, crypt_opt.rsa_mgf1_md) <= 0) goto badarg; + if (crypt_opt.rsa_oaep_label.data != NULL && crypt_opt.rsa_oaep_label.size > 0) { + unsigned char *label_copy; + label_copy = OPENSSL_malloc(crypt_opt.rsa_oaep_label.size); + if (label_copy == NULL) goto badarg; + memcpy((void *)(label_copy), (const void *)(crypt_opt.rsa_oaep_label.data), + crypt_opt.rsa_oaep_label.size); + if (EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, label_copy, + crypt_opt.rsa_oaep_label.size) <= 0) { + OPENSSL_free(label_copy); + label_copy = NULL; + goto badarg; + } + } + } +#endif + } + + if (is_private) { + if (is_encrypt) { + /* private_encrypt */ + i = EVP_PKEY_sign(ctx, NULL, &outlen, in_bin.data, in_bin.size); + } else { + /* private_decrypt */ + i = EVP_PKEY_decrypt(ctx, NULL, &outlen, in_bin.data, in_bin.size); + } + } else { + if (is_encrypt) { + /* public_encrypt */ + i = EVP_PKEY_encrypt(ctx, NULL, &outlen, in_bin.data, in_bin.size); + } else { + /* public_decrypt */ + i = EVP_PKEY_verify_recover(ctx, NULL, &outlen, in_bin.data, in_bin.size); + } + } + /* fprintf(stderr,"i = %d %s:%d\r\n", i, __FILE__, __LINE__); */ + + if (i != 1) goto badarg; + + enif_alloc_binary(outlen, &out_bin); + + ERL_VALGRIND_ASSERT_MEM_DEFINED(out_bin.data, out_bin.size); + if (is_private) { + if (is_encrypt) { + /* private_encrypt */ + i = EVP_PKEY_sign(ctx, out_bin.data, &outlen, in_bin.data, in_bin.size); + } else { + /* private_decrypt */ + i = EVP_PKEY_decrypt(ctx, out_bin.data, &outlen, in_bin.data, in_bin.size); + } + } else { + if (is_encrypt) { + /* public_encrypt */ + i = EVP_PKEY_encrypt(ctx, out_bin.data, &outlen, in_bin.data, in_bin.size); + } else { + /* public_decrypt */ + i = EVP_PKEY_verify_recover(ctx, out_bin.data, &outlen, in_bin.data, in_bin.size); + } + } + + if ((i == 1) && argv[0] == atom_rsa && !is_encrypt) { + if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + unsigned char *p; + if (rsa == NULL) goto badarg; + tmplen = RSA_size(rsa); + if (!enif_alloc_binary(tmplen, &tmp_bin)) goto badarg; + p = out_bin.data; + p++; + i = RSA_padding_check_SSLv23(tmp_bin.data, tmplen, p, out_bin.size - 1, tmplen); + if (i >= 0) { + outlen = i; + in_bin = out_bin; + out_bin = tmp_bin; + tmp_bin = in_bin; + i = 1; + } + } + } + + if (tmp_bin.data != NULL) { + enif_release_binary(&tmp_bin); + } + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); + if (i == 1) { + ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, outlen); + if (outlen != out_bin.size) { + enif_realloc_binary(&out_bin, outlen); + ERL_VALGRIND_ASSERT_MEM_DEFINED(out_bin.data, outlen); + } + return enif_make_binary(env, &out_bin); + } else { + enif_release_binary(&out_bin); + return atom_error; + } + + badarg: + if (out_bin.data != NULL) { + enif_release_binary(&out_bin); + } + if (tmp_bin.data != NULL) { + enif_release_binary(&tmp_bin); + } + EVP_PKEY_CTX_free(ctx); + EVP_PKEY_free(pkey); + if (algo_init == -2) + return atom_notsup; + else + return enif_make_badarg(env); +} + + + +/*--------------------------------*/ + /*================================================================*/ static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 1df05462c9..f9c4f7b71d 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -420,46 +420,55 @@ sign(Algorithm, Type, Data, Key, Options) -> Signature -> Signature end. --spec public_encrypt(rsa, binary(), [binary()], rsa_padding()) -> - binary(). --spec public_decrypt(rsa, binary(), [integer() | binary()], rsa_padding()) -> - binary(). --spec private_encrypt(rsa, binary(), [integer() | binary()], rsa_padding()) -> - binary(). --spec private_decrypt(rsa, binary(), [integer() | binary()], rsa_padding()) -> - binary(). - -public_encrypt(rsa, BinMesg, Key, Padding) -> - case rsa_public_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, true) of - error -> - erlang:error(encrypt_failed, [rsa, BinMesg,Key, Padding]); - Sign -> Sign - end. -%% Binary, Key = [E,N,D] -private_decrypt(rsa, BinMesg, Key, Padding) -> - case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, false) of - error -> - erlang:error(decrypt_failed, [rsa, BinMesg,Key, Padding]); - Sign -> Sign - end. +-type pk_algs() :: rsa | ecdsa | dss . +-type pk_opt() :: list() | rsa_padding() . +-spec public_encrypt(pk_algs(), binary(), [binary()], pk_opt()) -> binary(). +-spec public_decrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). +-spec private_encrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). +-spec private_decrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). -%% Binary, Key = [E,N,D] -private_encrypt(rsa, BinMesg, Key, Padding) -> - case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, true) of - error -> - erlang:error(encrypt_failed, [rsa, BinMesg,Key, Padding]); - Sign -> Sign - end. +public_encrypt(Algorithm, In, Key, Options) when is_list(Options) -> + case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, false, true) of + error -> erlang:error(encrypt_failed, [Algorithm, In, Key, Options]); + notsup -> erlang:error(notsup); + Out -> Out + end; +%% Backwards compatible +public_encrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> + public_encrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). + +private_decrypt(Algorithm, In, Key, Options) when is_list(Options) -> + case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, true, false) of + error -> erlang:error(decrypt_failed, [Algorithm, In, Key, Options]); + notsup -> erlang:error(notsup); + Out -> Out + end; +%% Backwards compatible +private_decrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> + private_decrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). + +private_encrypt(Algorithm, In, Key, Options) when is_list(Options) -> + case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, true, true) of + error -> erlang:error(encrypt_failed, [Algorithm, In, Key, Options]); + notsup -> erlang:error(notsup); + Out -> Out + end; +%% Backwards compatible +private_encrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> + private_encrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). + +public_decrypt(Algorithm, In, Key, Options) when is_list(Options) -> + case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, false, false) of + error -> erlang:error(decrypt_failed, [Algorithm, In, Key, Options]); + notsup -> erlang:error(notsup); + Out -> Out + end; +%% Backwards compatible +public_decrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> + public_decrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). -%% Binary, Key = [E,N] -public_decrypt(rsa, BinMesg, Key, Padding) -> - case rsa_public_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, false) of - error -> - erlang:error(decrypt_failed, [rsa, BinMesg,Key, Padding]); - Sign -> Sign - end. %% %% XOR - xor to iolists and return a binary @@ -970,9 +979,7 @@ format_pkey(_, Key) -> %% -type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. -rsa_public_crypt(_BinMsg, _Key, _Padding, _IsEncrypt) -> ?nif_stub. - -rsa_private_crypt(_BinMsg, _Key, _Padding, _IsEncrypt) -> ?nif_stub. +pkey_crypt_nif(_Algorithm, _In, _Key, _Options, _IsPrivate, _IsEncrypt) -> ?nif_stub. %% large integer in a binary with 32bit length %% MP representaion (SSH2) diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 88f13d766c..5d80ad64ab 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -122,10 +122,17 @@ groups() -> {sha512, [], [hash, hmac]}, {rsa, [], [sign_verify, public_encrypt, + private_encrypt, generate ]}, - {dss, [], [sign_verify]}, - {ecdsa, [], [sign_verify]}, + {dss, [], [sign_verify, + public_encrypt, + private_encrypt + ]}, + {ecdsa, [], [sign_verify, + public_encrypt, + private_encrypt + ]}, {dh, [], [generate_compute]}, {ecdh, [], [compute, generate]}, {srp, [], [generate_compute]}, @@ -439,10 +446,16 @@ sign_verify(Config) when is_list(Config) -> %%-------------------------------------------------------------------- public_encrypt() -> - [{doc, "Test public_encrypt/decrypt and private_encrypt/decrypt functions. "}]. + [{doc, "Test public_encrypt/decrypt "}]. public_encrypt(Config) when is_list(Config) -> Params = proplists:get_value(pub_priv_encrypt, Config), - lists:foreach(fun do_public_encrypt/1, Params), + lists:foreach(fun do_public_encrypt/1, Params). + +%%-------------------------------------------------------------------- +private_encrypt() -> + [{doc, "Test private_encrypt/decrypt functions. "}]. +private_encrypt(Config) when is_list(Config) -> + Params = proplists:get_value(pub_priv_encrypt, Config), lists:foreach(fun do_private_encrypt/1, Params). %%-------------------------------------------------------------------- @@ -807,7 +820,9 @@ negative_verify(Type, Hash, Msg, Signature, Public, Options) -> end. do_public_encrypt({Type, Public, Private, Msg, Padding}) -> + ct:pal("public_encrypt",[]), PublicEcn = (catch crypto:public_encrypt(Type, Msg, Public, Padding)), + ct:pal("private_decrypt of ~p",[PublicEcn]), case crypto:private_decrypt(Type, PublicEcn, Private, Padding) of Msg -> ok; @@ -816,10 +831,13 @@ do_public_encrypt({Type, Public, Private, Msg, Padding}) -> end. do_private_encrypt({_Type, _Public, _Private, _Msg, rsa_pkcs1_oaep_padding}) -> + ct:pal("do_private_encrypt: ~p not supported by openssl(?)",[rsa_pkcs1_oaep_padding]), ok; %% Not supported by openssl do_private_encrypt({Type, Public, Private, Msg, Padding}) -> + ct:pal("private_encrypt",[]), PrivEcn = (catch crypto:private_encrypt(Type, Msg, Private, Padding)), - case crypto:public_decrypt(rsa, PrivEcn, Public, Padding) of + ct:pal("public_decrypt of ~p",[PrivEcn]), + case crypto:public_decrypt(Type, PrivEcn, Public, Padding) of Msg -> ok; Other -> @@ -1233,7 +1251,9 @@ group_config(dss = Type, Config) -> SignVerify = [{Type, Hash, Public, Private, Msg} || Hash <- DssHashs, lists:member(Hash, SupportedHashs)], - [{sign_verify, SignVerify} | Config]; + MsgPubEnc = <<"7896345786348 Asldi">>, + PubPrivEnc = [{dss, Public, Private, MsgPubEnc, []}], + [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc} | Config]; group_config(ecdsa = Type, Config) -> {Private, Public} = ec_key_named(), @@ -1243,7 +1263,9 @@ group_config(ecdsa = Type, Config) -> SignVerify = [{Type, Hash, Public, Private, Msg} || Hash <- DssHashs, lists:member(Hash, SupportedHashs)], - [{sign_verify, SignVerify} | Config]; + MsgPubEnc = <<"7896345786348 Asldi">>, + PubPrivEnc = [{ecdsa, Public, Private, MsgPubEnc, []}], + [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc} | Config]; group_config(srp, Config) -> GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()], [{generate_compute, GenerateCompute} | Config]; -- cgit v1.2.3 From 6a65091780893820220c55f1beae8ffa234c2fc5 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 28 Sep 2017 19:20:49 +0200 Subject: crypto: disable tests of non-working assymetric ciphers ECDSA and DSA (DSS) public/private encryption/decryption does not work --- lib/crypto/test/crypto_SUITE.erl | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 5d80ad64ab..69f02d3da6 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -125,13 +125,11 @@ groups() -> private_encrypt, generate ]}, - {dss, [], [sign_verify, - public_encrypt, - private_encrypt + {dss, [], [sign_verify + %% Does not work yet: ,public_encrypt, private_encrypt ]}, - {ecdsa, [], [sign_verify, - public_encrypt, - private_encrypt + {ecdsa, [], [sign_verify + %% Does not work yet: ,public_encrypt, private_encrypt ]}, {dh, [], [generate_compute]}, {ecdh, [], [compute, generate]}, @@ -820,9 +818,7 @@ negative_verify(Type, Hash, Msg, Signature, Public, Options) -> end. do_public_encrypt({Type, Public, Private, Msg, Padding}) -> - ct:pal("public_encrypt",[]), PublicEcn = (catch crypto:public_encrypt(Type, Msg, Public, Padding)), - ct:pal("private_decrypt of ~p",[PublicEcn]), case crypto:private_decrypt(Type, PublicEcn, Private, Padding) of Msg -> ok; @@ -831,12 +827,9 @@ do_public_encrypt({Type, Public, Private, Msg, Padding}) -> end. do_private_encrypt({_Type, _Public, _Private, _Msg, rsa_pkcs1_oaep_padding}) -> - ct:pal("do_private_encrypt: ~p not supported by openssl(?)",[rsa_pkcs1_oaep_padding]), ok; %% Not supported by openssl do_private_encrypt({Type, Public, Private, Msg, Padding}) -> - ct:pal("private_encrypt",[]), PrivEcn = (catch crypto:private_encrypt(Type, Msg, Private, Padding)), - ct:pal("public_decrypt of ~p",[PrivEcn]), case crypto:public_decrypt(Type, PrivEcn, Public, Padding) of Msg -> ok; -- cgit v1.2.3 From 298df541fd7c9d52dc8e13595c8a9a2ac74b8e24 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 29 Sep 2017 17:16:21 +0200 Subject: crypto: ifdef of EVP for old cryptolibs (< 1.0.0) --- lib/crypto/c_src/crypto.c | 96 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 24 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0eb149892d..53fe233790 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -2730,24 +2730,6 @@ static int get_dss_public_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) return 1; } -static int rsa_pad(ERL_NIF_TERM term, int* padding) -{ - if (term == atom_rsa_pkcs1_padding) { - *padding = RSA_PKCS1_PADDING; - } - else if (term == atom_rsa_pkcs1_oaep_padding) { - *padding = RSA_PKCS1_OAEP_PADDING; - } - else if (term == atom_rsa_no_padding) { - *padding = RSA_NO_PADDING; - } - else { - return 0; - } - return 1; -} - - /* Creates a term which can be parsed by get_rsa_private_key(). This is a list of plain integer binaries (not mpints). */ static ERL_NIF_TERM put_rsa_private_key(ErlNifEnv* env, const RSA *rsa) { @@ -4218,7 +4200,9 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI tail = options; while (enif_get_list_cell(env, tail, &head, &tail)) { if (enif_get_tuple(env, head, &tpl_arity, &tpl_terms) && tpl_arity == 2) { - if (tpl_terms[0] == atom_rsa_padding || tpl_terms[0] == atom_rsa_pad) { + if (tpl_terms[0] == atom_rsa_padding + || tpl_terms[0] == atom_rsa_pad /* Compatibility */ + ) { if (tpl_terms[1] == atom_rsa_pkcs1_padding) { opt->rsa_padding = RSA_PKCS1_PADDING; } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) { @@ -4283,15 +4267,19 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM {/* (Algorithm, Data, PublKey=[E,N]|[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Options, IsPrivate, IsEncrypt) */ int i; EVP_PKEY *pkey; +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX *ctx; +#else + RSA *rsa; +#endif PKeyCryptOptions crypt_opt; ErlNifBinary in_bin, out_bin, tmp_bin; size_t outlen, tmplen; int is_private = (argv[4] == atom_true), is_encrypt = (argv[5] == atom_true); + int algo_init = 0; -int algo_init = 0; -char algo[1024]; +/* char algo[1024]; */ if (!enif_inspect_binary(env, argv[1], &in_bin)) { return enif_make_badarg(env); @@ -4320,10 +4308,11 @@ char algo[1024]; tmp_bin.data = NULL; tmp_bin.size = 0; +#ifdef HAS_EVP_PKEY_CTX ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; -enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); +/* enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); */ if (is_private) { if (is_encrypt) { @@ -4439,7 +4428,59 @@ enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); } } - if ((i == 1) && argv[0] == atom_rsa && !is_encrypt) { +#else + /* Non-EVP cryptolib. Only support RSA */ + + if (argv[0] != atom_rsa) { + algo_init = -2; /* exitcode: notsup */ + goto badarg; + } + rsa = EVP_PKEY_get1_RSA(pkey); + enif_alloc_binary(RSA_size(rsa), &out_bin); + + if (is_private) { + if (is_encrypt) { + /* non-evp rsa private encrypt */ + ERL_VALGRIND_ASSERT_MEM_DEFINED(in_bin.data,in_bin.size); + i = RSA_private_encrypt(in_bin.size, in_bin.data, + out_bin.data, rsa, crypt_opt.rsa_padding); + if (i > 0) { + ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); + } + } else { + /* non-evp rsa private decrypt */ + i = RSA_private_decrypt(in_bin.size, in_bin.data, + out_bin.data, rsa, crypt_opt.rsa_padding); + if (i > 0) { + ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); + enif_realloc_binary(&out_bin, i); + } + } + } else { + if (is_encrypt) { + /* non-evp rsa public encrypt */ + ERL_VALGRIND_ASSERT_MEM_DEFINED(in_bin.data,in_bin.size); + i = RSA_public_encrypt(in_bin.size, in_bin.data, + out_bin.data, rsa, crypt_opt.rsa_padding); + if (i > 0) { + ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); + } + } else { + /* non-evp rsa public decrypt */ + i = RSA_public_decrypt(in_bin.size, in_bin.data, + out_bin.data, rsa, crypt_opt.rsa_padding); + if (i > 0) { + ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); + enif_realloc_binary(&out_bin, i); + } + } + } + + outlen = i; + RSA_free(rsa); +#endif + + if ((i > 0) && argv[0] == atom_rsa && !is_encrypt) { if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { RSA *rsa = EVP_PKEY_get1_RSA(pkey); unsigned char *p; @@ -4462,9 +4503,13 @@ enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); if (tmp_bin.data != NULL) { enif_release_binary(&tmp_bin); } + +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX_free(ctx); +#else +#endif EVP_PKEY_free(pkey); - if (i == 1) { + if (i > 0) { ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, outlen); if (outlen != out_bin.size) { enif_realloc_binary(&out_bin, outlen); @@ -4483,7 +4528,10 @@ enif_get_atom(env,argv[0],algo,1024,ERL_NIF_LATIN1); if (tmp_bin.data != NULL) { enif_release_binary(&tmp_bin); } +#ifdef HAS_EVP_PKEY_CTX EVP_PKEY_CTX_free(ctx); +#else +#endif EVP_PKEY_free(pkey); if (algo_init == -2) return atom_notsup; -- cgit v1.2.3 From ce84ec6d4ec9e015a76fb81c986d973e6f43c028 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 30 Oct 2017 15:17:54 +0100 Subject: crypto: Remove returnvalue from void C-fn --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 53fe233790..5d411785e9 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -277,7 +277,7 @@ static HMAC_CTX *HMAC_CTX_new() static void HMAC_CTX_free(HMAC_CTX *ctx) { HMAC_CTX_cleanup(ctx); - return CRYPTO_free(ctx); + CRYPTO_free(ctx); } #define EVP_MD_CTX_new() EVP_MD_CTX_create() -- cgit v1.2.3 From 56cde6ea14c6b2d81e94d7f4517aedbd5ffb8582 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 30 Oct 2017 15:38:20 +0100 Subject: crypto: replaced deprecated DH_generate_parameters --- lib/crypto/c_src/crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 53fe233790..ed728c3b49 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -2846,7 +2846,7 @@ static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrimeLen, Generator) */ int prime_len, generator; - DH* dh_params; + DH* dh_params = NULL; int p_len, g_len; unsigned char *p_ptr, *g_ptr; ERL_NIF_TERM ret_p, ret_g; @@ -2857,8 +2857,8 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E return enif_make_badarg(env); } - dh_params = DH_generate_parameters(prime_len, generator, NULL, NULL); - if (dh_params == NULL) { + + if (DH_generate_parameters_ex(dh_params, prime_len, generator, NULL)) { return atom_error; } DH_get0_pqg(dh_params, &dh_p, &dh_q, &dh_g); -- cgit v1.2.3 From b950289736287275307f1b5579d82c3bd2271db9 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 22 Jun 2017 13:13:09 +0200 Subject: [crypto] Add support for loading an alternative Engine Add support to plug in alternative implementations for some or all of the cryptographic operations supported by the OpenSSL Engine API. When configured appropriately, OpenSSL calls the engine's implementation of these operations instead of its own. --- lib/crypto/c_src/Makefile.in | 25 +- lib/crypto/c_src/crypto.c | 790 +++++++++++++++++++++++++++++++++++-- lib/crypto/c_src/otp_test_engine.c | 177 +++++++++ lib/crypto/doc/src/Makefile | 18 +- lib/crypto/doc/src/crypto.xml | 165 ++++++-- lib/crypto/doc/src/engine_load.xml | 110 ++++++ lib/crypto/doc/src/usersguide.xml | 6 +- lib/crypto/src/Makefile | 18 +- lib/crypto/src/crypto.erl | 261 +++++++++++- lib/crypto/test/Makefile | 7 +- lib/crypto/test/crypto_SUITE.erl | 2 +- lib/crypto/test/engine_SUITE.erl | 312 +++++++++++++++ 12 files changed, 1782 insertions(+), 109 deletions(-) create mode 100644 lib/crypto/c_src/otp_test_engine.c create mode 100644 lib/crypto/doc/src/engine_load.xml create mode 100644 lib/crypto/test/engine_SUITE.erl (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in index af7c209c75..31124ba477 100644 --- a/lib/crypto/c_src/Makefile.in +++ b/lib/crypto/c_src/Makefile.in @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1999-2016. All Rights Reserved. +# Copyright Ericsson AB 1999-2017. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,12 +78,16 @@ CRYPTO_STATIC_OBJS = $(OBJDIR)/crypto_static$(TYPEMARKER).o\ NIF_ARCHIVE = $(LIBDIR)/crypto$(TYPEMARKER).a +TEST_ENGINE_OBJS = $(OBJDIR)/otp_test_engine$(TYPEMARKER).o + ifeq ($(findstring win32,$(TARGET)), win32) NIF_LIB = $(LIBDIR)/crypto$(TYPEMARKER).dll CALLBACK_LIB = $(LIBDIR)/crypto_callback$(TYPEMARKER).dll +TEST_ENGINE_LIB = $(LIBDIR)/otp_test_engine$(TYPEMARKER).dll else NIF_LIB = $(LIBDIR)/crypto$(TYPEMARKER).so CALLBACK_LIB = $(LIBDIR)/crypto_callback$(TYPEMARKER).so +TEST_ENGINE_LIB = $(LIBDIR)/otp_test_engine$(TYPEMARKER).so endif ifeq ($(HOST_OS),) @@ -129,10 +133,22 @@ ALL_STATIC_CFLAGS = $(DED_STATIC_CFLAGS) $(INCLUDES) _create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR)) -debug opt valgrind: $(NIF_LIB) $(CALLBACK_LIB) +debug opt valgrind: $(NIF_LIB) $(CALLBACK_LIB) $(TEST_ENGINE_LIB) static_lib: $(NIF_ARCHIVE) +$(OBJDIR)/otp_test_engine$(TYPEMARKER).o: otp_test_engine.c + $(V_at)$(INSTALL_DIR) $(OBJDIR) + $(V_CC) -c -o $@ $(ALL_CFLAGS) $< + +$(LIBDIR)/otp_test_engine$(TYPEMARKER).so: $(TEST_ENGINE_OBJS) + $(V_at)$(INSTALL_DIR) $(LIBDIR) + $(V_LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB) + +$(LIBDIR)/otp_test_engine$(TYPEMARKER).dll: $(TEST_ENGINE_OBJS) + $(V_at)$(INSTALL_DIR) $(LIBDIR) + $(V_LD) $(LDFLAGS) -o $@ $(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) $(TEST_ENGINE_OBJS) -l$(SSL_CRYPTO_LIBNAME) -l$(SSL_SSL_LIBNAME) + $(OBJDIR)/%$(TYPEMARKER).o: %.c $(V_at)$(INSTALL_DIR) $(OBJDIR) $(V_CC) -c -o $@ $(ALL_CFLAGS) $< @@ -170,6 +186,7 @@ ifeq ($(findstring win32,$(TARGET)), win32) rm -f $(LIBDIR)/crypto.debug.dll rm -f $(LIBDIR)/crypto_callback.dll rm -f $(LIBDIR)/crypto_callback.debug.dll + rm -f $(LIBDIR)/otp_test_engine.dll else rm -f $(LIBDIR)/crypto.so rm -f $(LIBDIR)/crypto.debug.so @@ -177,6 +194,7 @@ else rm -f $(LIBDIR)/crypto_callback.so rm -f $(LIBDIR)/crypto_callback.debug.so rm -f $(LIBDIR)/crypto_callback.valgrind.so + rm -f $(LIBDIR)/otp_test_engine.so endif rm -f $(OBJDIR)/crypto.o rm -f $(OBJDIR)/crypto_static.o @@ -187,6 +205,7 @@ endif rm -f $(OBJDIR)/crypto_callback.o rm -f $(OBJDIR)/crypto_callback.debug.o rm -f $(OBJDIR)/crypto_callback.valgrind.o + rm -f $(OBJDIR)/otp_test_engine.o rm -f core *~ docs: @@ -206,6 +225,8 @@ ifeq ($(DYNAMIC_CRYPTO_LIB),yes) $(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj" $(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib" endif + $(INSTALL_PROGRAM) $(TEST_ENGINE_OBJS) "$(RELSYSDIR)/priv/obj" + $(INSTALL_PROGRAM) $(TEST_ENGINE_LIB) "$(RELSYSDIR)/priv/lib" release_docs_spec: diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index c4e80e3153..0f07a862d2 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1,4 +1,4 @@ -/* +/* * %CopyrightBegin% * * Copyright Ericsson AB 2010-2017. All Rights Reserved. @@ -19,8 +19,8 @@ */ /* - * Purpose: Dynamically loadable NIF library for cryptography. - * Based on OpenSSL. + * Purpose: Dynamically loadable NIF library for cryptography. + * Based on OpenSSL. */ #ifdef __WIN32__ @@ -60,6 +60,8 @@ #include #include #include +#include +#include /* Helper macro to construct a OPENSSL_VERSION_NUMBER. * See openssl/opensslv.h @@ -79,9 +81,9 @@ * * Therefor works tests like this as intendend: * OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) - * (The test is for example "2.4.2" >= "1.0.0" although the test + * (The test is for example "2.4.2" >= "1.0.0" although the test * with the cloned OpenSSL test would be "1.0.1" >= "1.0.0") - * + * * But tests like this gives wrong result: * OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) * (The test is false since "2.4.2" < "1.1.0". It should have been @@ -119,6 +121,10 @@ #include #endif +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') +#define HAS_ENGINE_SUPPORT +#endif + #include "crypto_callback.h" #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ @@ -240,7 +246,7 @@ /* This shall correspond to the similar macro in crypto.erl */ /* Current value is: erlang:system_info(context_reductions) * 10 */ -#define MAX_BYTES_TO_NIF 20000 +#define MAX_BYTES_TO_NIF 20000 #define CONSUME_REDS(NifEnv, Ibin) \ do { \ @@ -466,6 +472,22 @@ static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_N static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, char **cmds, int i); +static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_finish_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_free_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_load_dynamic_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_register_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_unregister_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_add_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_remove_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_first_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_next_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_all_methods_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + /* helpers */ static void init_algorithms_types(ErlNifEnv*); static void init_digest_types(ErlNifEnv* env); @@ -529,12 +551,27 @@ static ErlNifFunc nif_funcs[] = { {"aes_gcm_decrypt", 5, aes_gcm_decrypt}, {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, - {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt} + {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt}, + + {"engine_by_id_nif", 1, engine_by_id_nif}, + {"engine_init_nif", 1, engine_init_nif}, + {"engine_finish_nif", 1, engine_finish_nif}, + {"engine_free_nif", 1, engine_free_nif}, + {"engine_load_dynamic_nif", 0, engine_load_dynamic_nif}, + {"engine_ctrl_cmd_strings_nif", 2, engine_ctrl_cmd_strings_nif}, + {"engine_register_nif", 2, engine_register_nif}, + {"engine_unregister_nif", 2, engine_unregister_nif}, + {"engine_add_nif", 1, engine_add_nif}, + {"engine_remove_nif", 1, engine_remove_nif}, + {"engine_get_first_nif", 0, engine_get_first_nif}, + {"engine_get_next_nif", 1, engine_get_next_nif}, + {"engine_get_id_nif", 1, engine_get_id_nif}, + {"engine_get_all_methods_nif", 0, engine_get_all_methods_nif} + }; ERL_NIF_INIT(crypto,nif_funcs,load,NULL,upgrade,unload) - #define MD5_CTX_LEN (sizeof(MD5_CTX)) #define MD4_CTX_LEN (sizeof(MD4_CTX)) #define RIPEMD160_CTX_LEN (sizeof(RIPEMD160_CTX)) @@ -603,8 +640,30 @@ static ERL_NIF_TERM atom_sha512; static ERL_NIF_TERM atom_md5; static ERL_NIF_TERM atom_ripemd160; - - +#ifdef HAS_ENGINE_SUPPORT +static ERL_NIF_TERM atom_bad_engine; +static ERL_NIF_TERM atom_bad_engine_method; +static ERL_NIF_TERM atom_bad_engine_id; +static ERL_NIF_TERM atom_ctrl_cmd_failed; +static ERL_NIF_TERM atom_engine_init_failed; +static ERL_NIF_TERM atom_register_engine_failed; +static ERL_NIF_TERM atom_add_engine_failed; +static ERL_NIF_TERM atom_remove_engine_failed; +static ERL_NIF_TERM atom_engine_method_not_supported; + +static ERL_NIF_TERM atom_engine_method_rsa; +static ERL_NIF_TERM atom_engine_method_dsa; +static ERL_NIF_TERM atom_engine_method_dh; +static ERL_NIF_TERM atom_engine_method_rand; +static ERL_NIF_TERM atom_engine_method_ecdh; +static ERL_NIF_TERM atom_engine_method_ecdsa; +static ERL_NIF_TERM atom_engine_method_ciphers; +static ERL_NIF_TERM atom_engine_method_digests; +static ERL_NIF_TERM atom_engine_method_store; +static ERL_NIF_TERM atom_engine_method_pkey_meths; +static ERL_NIF_TERM atom_engine_method_pkey_asn1_meths; +static ERL_NIF_TERM atom_engine_method_ec; +#endif static ErlNifResourceType* hmac_context_rtype; struct hmac_context { @@ -728,11 +787,13 @@ static struct cipher_type_t cipher_types[] = static struct cipher_type_t* get_cipher_type(ERL_NIF_TERM type, size_t key_len); + /* #define PRINTF_ERR0(FMT) enif_fprintf(stderr, FMT "\n") #define PRINTF_ERR1(FMT, A1) enif_fprintf(stderr, FMT "\n", A1) #define PRINTF_ERR2(FMT, A1, A2) enif_fprintf(stderr, FMT "\n", A1, A2) */ + #define PRINTF_ERR0(FMT) #define PRINTF_ERR1(FMT,A1) #define PRINTF_ERR2(FMT,A1,A2) @@ -758,6 +819,23 @@ static void evp_cipher_ctx_dtor(ErlNifEnv* env, struct evp_cipher_ctx* ctx) { } #endif +// Engine +#ifdef HAS_ENGINE_SUPPORT +static ErlNifResourceType* engine_ctx_rtype; +struct engine_ctx { + ENGINE *engine; + char *id; +}; +static void engine_ctx_dtor(ErlNifEnv* env, struct engine_ctx* ctx) { + PRINTF_ERR0("engine_ctx_dtor"); + if(ctx->id) { + PRINTF_ERR1(" non empty ctx->id=%s", ctx->id); + enif_free(ctx->id); + } else + PRINTF_ERR0(" empty ctx->id=NULL"); +} +#endif + static int verify_lib_version(void) { const unsigned long libv = SSLeay(); @@ -793,7 +871,7 @@ static char crypto_callback_name[] = "crypto_callback"; static int change_basename(ErlNifBinary* bin, char* buf, int bufsz, const char* newfile) { int i; - + for (i = bin->size; i > 0; i--) { if (bin->data[i-1] == '/') break; @@ -869,12 +947,23 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) return __LINE__; } #endif +#ifdef HAS_ENGINE_SUPPORT + engine_ctx_rtype = enif_open_resource_type(env, NULL, "ENGINE_CTX", + (ErlNifResourceDtor*) engine_ctx_dtor, + ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER, + NULL); + if (!engine_ctx_rtype) { + PRINTF_ERR0("CRYPTO: Could not open resource type 'ENGINE_CTX'"); + return __LINE__; + } + if (library_refc > 0) { /* Repeated loading of this library (module upgrade). * Atoms and callbacks are already set, we are done. */ return 0; } +#endif atom_true = enif_make_atom(env,"true"); atom_false = enif_make_atom(env,"false"); @@ -952,6 +1041,30 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_md5 = enif_make_atom(env,"md5"); atom_ripemd160 = enif_make_atom(env,"ripemd160"); +#ifdef HAS_ENGINE_SUPPORT + atom_bad_engine = enif_make_atom(env,"bad_engine"); + atom_bad_engine_method = enif_make_atom(env,"bad_engine_method"); + atom_bad_engine_id = enif_make_atom(env,"bad_engine_id"); + atom_ctrl_cmd_failed = enif_make_atom(env,"ctrl_cmd_failed"); + atom_engine_init_failed = enif_make_atom(env,"engine_init_failed"); + atom_engine_method_not_supported = enif_make_atom(env,"engine_method_not_supported"); + atom_add_engine_failed = enif_make_atom(env,"add_engine_failed"); + atom_remove_engine_failed = enif_make_atom(env,"remove_engine_failed"); + + atom_engine_method_rsa = enif_make_atom(env,"engine_method_rsa"); + atom_engine_method_dsa = enif_make_atom(env,"engine_method_dsa"); + atom_engine_method_dh = enif_make_atom(env,"engine_method_dh"); + atom_engine_method_rand = enif_make_atom(env,"engine_method_rand"); + atom_engine_method_ecdh = enif_make_atom(env,"engine_method_ecdh"); + atom_engine_method_ecdsa = enif_make_atom(env,"engine_method_ecdsa"); + atom_engine_method_store = enif_make_atom(env,"engine_method_store"); + atom_engine_method_ciphers = enif_make_atom(env,"engine_method_ciphers"); + atom_engine_method_digests = enif_make_atom(env,"engine_method_digests"); + atom_engine_method_pkey_meths = enif_make_atom(env,"engine_method_pkey_meths"); + atom_engine_method_pkey_asn1_meths = enif_make_atom(env,"engine_method_pkey_asn1_meths"); + atom_engine_method_ec = enif_make_atom(env,"engine_method_ec"); +#endif + init_digest_types(env); init_cipher_types(env); init_algorithms_types(env); @@ -973,24 +1086,24 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #else /* !HAVE_DYNAMIC_CRYPTO_LIB */ funcp = &get_crypto_callbacks; #endif - + #ifdef OPENSSL_THREADS enif_system_info(&sys_info, sizeof(sys_info)); if (sys_info.scheduler_threads > 1) { - nlocks = CRYPTO_num_locks(); + nlocks = CRYPTO_num_locks(); } /* else no need for locks */ #endif - + ccb = (*funcp)(nlocks); - + if (!ccb || ccb->sizeof_me != sizeof(*ccb)) { PRINTF_ERR0("Invalid 'crypto_callbacks'"); return __LINE__; } - + CRYPTO_set_mem_functions(ccb->crypto_alloc, ccb->crypto_realloc, ccb->crypto_free); - + #ifdef OPENSSL_THREADS if (nlocks > 0) { CRYPTO_set_locking_callback(ccb->locking_function); @@ -1186,11 +1299,11 @@ static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] * Version string is still from library though. */ - memcpy(enif_make_new_binary(env, name_sz, &name_term), libname, name_sz); + memcpy(enif_make_new_binary(env, name_sz, &name_term), libname, name_sz); memcpy(enif_make_new_binary(env, ver_sz, &ver_term), ver, ver_sz); return enif_make_list1(env, enif_make_tuple3(env, name_term, - enif_make_int(env, ver_num), + enif_make_int(env, ver_num), ver_term)); } @@ -1225,6 +1338,8 @@ static ERL_NIF_TERM enable_fips_mode(ErlNifEnv* env, int argc, const ERL_NIF_TER } } + +#if defined(HAVE_EC) static ERL_NIF_TERM make_badarg_maybe(ErlNifEnv* env) { ERL_NIF_TERM reason; @@ -1233,6 +1348,7 @@ static ERL_NIF_TERM make_badarg_maybe(ErlNifEnv* env) else return enif_make_badarg(env); } +#endif static ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Data) */ @@ -1668,7 +1784,7 @@ static ERL_NIF_TERM hmac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM {/* (Context, Data) */ ErlNifBinary data; struct hmac_context* obj; - + if (!enif_get_resource(env, argv[0], hmac_context_rtype, (void**)&obj) || !enif_inspect_iolist_as_binary(env, argv[1], &data)) { return enif_make_badarg(env); @@ -1704,13 +1820,13 @@ static ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM enif_mutex_unlock(obj->mtx); return enif_make_badarg(env); } - + HMAC_Final(obj->ctx, mac_buf, &mac_len); HMAC_CTX_free(obj->ctx); obj->alive = 0; enif_mutex_unlock(obj->mtx); - if (argc == 2 && req_len < mac_len) { + if (argc == 2 && req_len < mac_len) { /* Only truncate to req_len bytes if asked. */ mac_len = req_len; } @@ -2021,7 +2137,7 @@ static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_ } static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* ({Key, IVec, ECount, Num}, Data) */ +{/* ({Key, IVec, ECount, Num}, Data) */ ErlNifBinary key_bin, ivec_bin, text_bin, ecount_bin; AES_KEY aes_key; unsigned int num; @@ -2042,14 +2158,14 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N return enif_make_badarg(env); } - ivec2_buf = enif_make_new_binary(env, ivec_bin.size, &ivec2_term); + ivec2_buf = enif_make_new_binary(env, ivec_bin.size, &ivec2_term); ecount2_buf = enif_make_new_binary(env, ecount_bin.size, &ecount2_term); - + memcpy(ivec2_buf, ivec_bin.data, 16); memcpy(ecount2_buf, ecount_bin.data, ecount_bin.size); AES_ctr128_encrypt((unsigned char *) text_bin.data, - enif_make_new_binary(env, text_bin.size, &cipher_term), + enif_make_new_binary(env, text_bin.size, &cipher_term), text_bin.size, &aes_key, ivec2_buf, ecount2_buf, &num); num2_term = enif_make_uint(env, num); @@ -2352,7 +2468,7 @@ out_err: } static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Bytes) */ +{/* (Bytes) */ unsigned bytes; unsigned char* data; ERL_NIF_TERM ret; @@ -2446,7 +2562,7 @@ static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER bn_to = BN_new(); BN_sub(bn_to, bn_rand, bn_from); - BN_pseudo_rand_range(bn_rand, bn_to); + BN_pseudo_rand_range(bn_rand, bn_to); BN_add(bn_rand, bn_rand, bn_from); dlen = BN_num_bytes(bn_rand); data = enif_make_new_binary(env, dlen+4, &ret); @@ -2464,7 +2580,7 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg BIGNUM *bn_base=NULL, *bn_exponent=NULL, *bn_modulo=NULL, *bn_result; BN_CTX *bn_ctx; unsigned char* ptr; - unsigned dlen; + unsigned dlen; unsigned bin_hdr; /* return type: 0=plain binary, 4: mpint */ unsigned extra_byte; ERL_NIF_TERM ret; @@ -2485,7 +2601,7 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg dlen = BN_num_bytes(bn_result); extra_byte = bin_hdr && BN_is_bit_set(bn_result, dlen*8-1); ptr = enif_make_new_binary(env, bin_hdr+extra_byte+dlen, &ret); - if (bin_hdr) { + if (bin_hdr) { put_int32(ptr, extra_byte+dlen); ptr[4] = 0; /* extra zeroed byte to ensure a positive mpint */ ptr += bin_hdr + extra_byte; @@ -2545,6 +2661,7 @@ static struct cipher_type_t* get_cipher_type(ERL_NIF_TERM type, size_t key_len) return NULL; } + static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Data1, Data2) */ ErlNifBinary d1, d2; @@ -2578,7 +2695,7 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg return enif_make_badarg(env); } RC4_set_key((RC4_KEY*)enif_make_new_binary(env, sizeof(RC4_KEY), &ret), - key.size, key.data); + key.size, key.data); return ret; #else return enif_raise_exception(env, atom_notsup); @@ -2871,7 +2988,7 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E BN_bn2bin(dh_g, g_ptr); ERL_VALGRIND_MAKE_MEM_DEFINED(p_ptr, p_len); ERL_VALGRIND_MAKE_MEM_DEFINED(g_ptr, g_len); - return enif_make_list2(env, ret_p, ret_g); + return enif_make_list2(env, ret_p, ret_g); } static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) @@ -2881,9 +2998,9 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] ERL_NIF_TERM ret, head, tail; BIGNUM *dh_p, *dh_g; - if (!enif_get_list_cell(env, argv[0], &head, &tail) + if (!enif_get_list_cell(env, argv[0], &head, &tail) || !get_bn_from_bin(env, head, &dh_p) - || !enif_get_list_cell(env, tail, &head, &tail) + || !enif_get_list_cell(env, tail, &head, &tail) || !get_bn_from_bin(env, head, &dh_g) || !enif_is_empty_list(env,tail)) { @@ -2900,12 +3017,12 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] else if (i & DH_NOT_SUITABLE_GENERATOR) ret = atom_not_suitable_generator; else ret = enif_make_tuple2(env, atom_unknown, enif_make_uint(env, i)); } - else { /* Check Failed */ + else { /* Check Failed */ ret = enif_make_tuple2(env, atom_error, atom_check_failed); } DH_free(dh_params); return ret; -} +} static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ @@ -3007,7 +3124,7 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T i = DH_compute_key(ret_bin.data, other_pub_key, dh_params); if (i > 0) { if (i != ret_bin.size) { - enif_realloc_binary(&ret_bin, i); + enif_realloc_binary(&ret_bin, i); } ret = enif_make_binary(env, &ret_bin); } @@ -3965,7 +4082,7 @@ printf("\r\n"); } #ifdef HAS_EVP_PKEY_CTX -/* printf("EVP interface\r\n"); +/* printf("EVP interface\r\n"); */ ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; @@ -4095,7 +4212,7 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } #ifdef HAS_EVP_PKEY_CTX -/* printf("EVP interface\r\n"); +/* printf("EVP interface\r\n"); */ ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; @@ -4554,3 +4671,598 @@ static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a RAND_seed(seed_bin.data,seed_bin.size); return atom_ok; } + +/*================================================================*/ +/* Engine */ +/*================================================================*/ +static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (EngineId) */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM ret; + ErlNifBinary engine_id_bin; + unsigned int engine_id_len = 0; + char *engine_id; + ENGINE *engine; + struct engine_ctx *ctx; + + // Get Engine Id + if(!enif_inspect_binary(env, argv[0], &engine_id_bin)) { + PRINTF_ERR0("engine_by_id_nif Leaved: badarg"); + return enif_make_badarg(env); + } else { + engine_id_len = engine_id_bin.size+1; + engine_id = enif_alloc(engine_id_len); + (void) memcpy(engine_id, engine_id_bin.data, engine_id_len); + engine_id[engine_id_len-1] = '\0'; + } + + engine = ENGINE_by_id(engine_id); + if(!engine) { + PRINTF_ERR0("engine_by_id_nif Leaved: {error, bad_engine_id}"); + return enif_make_tuple2(env, atom_error, atom_bad_engine_id); + } + + ctx = enif_alloc_resource(engine_ctx_rtype, sizeof(struct engine_ctx)); + ctx->engine = engine; + ctx->id = engine_id; + + ret = enif_make_resource(env, ctx); + enif_release_resource(ctx); + + return enif_make_tuple2(env, atom_ok, ret); +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM ret = atom_ok; + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_init_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + if (!ENGINE_init(ctx->engine)) { + //ERR_print_errors_fp(stderr); + PRINTF_ERR0("engine_init_nif Leaved: {error, engine_init_failed}"); + return enif_make_tuple2(env, atom_error, atom_engine_init_failed); + } + + return ret; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_free_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_free_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + ENGINE_free(ctx->engine); + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_finish_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_finish_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + ENGINE_finish(ctx->engine); + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_load_dynamic_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* () */ +#ifdef HAS_ENGINE_SUPPORT + ENGINE_load_dynamic(); + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine, Commands) */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM ret = atom_ok; + unsigned int cmds_len = 0; + char **cmds = NULL; + struct engine_ctx *ctx; + int i; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + PRINTF_ERR1("Engine Id: %s\r\n", ENGINE_get_id(ctx->engine)); + + // Get Command List + if(!enif_get_list_length(env, argv[1], &cmds_len)) { + PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: Bad Command List"); + return enif_make_badarg(env); + } else { + cmds_len *= 2; // Key-Value list from erlang + cmds = enif_alloc((cmds_len+1)*sizeof(char*)); + if(get_engine_load_cmd_list(env, argv[1], cmds, 0)) { + PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: Couldn't read Command List"); + ret = enif_make_badarg(env); + goto error; + } + } + + for(i = 0; i < cmds_len; i+=2) { + PRINTF_ERR2("Cmd: %s:%s\r\n", + cmds[i] ? cmds[i] : "(NULL)", + cmds[i+1] ? cmds[i+1] : "(NULL)"); + if(!ENGINE_ctrl_cmd_string(ctx->engine, cmds[i], cmds[i+1], 0)) { + PRINTF_ERR2("Command failed: %s:%s\r\n", + cmds[i] ? cmds[i] : "(NULL)", + cmds[i+1] ? cmds[i+1] : "(NULL)"); + //ENGINE_free(ctx->engine); + ret = enif_make_tuple2(env, atom_error, atom_ctrl_cmd_failed); + PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: {error, ctrl_cmd_failed}"); + goto error; + } +} + + error: + for(i = 0; cmds != NULL && cmds[i] != NULL; i++) + enif_free(cmds[i]); + return ret; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_add_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_add_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + if (!ENGINE_add(ctx->engine)) { + PRINTF_ERR0("engine_add_nif Leaved: {error, add_engine_failed}"); + return enif_make_tuple2(env, atom_error, atom_add_engine_failed); + } + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_remove_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_remove_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + if (!ENGINE_remove(ctx->engine)) { + PRINTF_ERR0("engine_remove_nif Leaved: {error, remove_engine_failed}"); + return enif_make_tuple2(env, atom_error, atom_remove_engine_failed); + } + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_register_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine, EngineMethod) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + unsigned int method; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_register_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + // Get Method + if (!enif_get_uint(env, argv[1], &method)) { + PRINTF_ERR0("engine_register_nif Leaved: Parameter Method not an uint"); + return enif_make_badarg(env); + } + + switch(method) + { +#ifdef ENGINE_METHOD_RSA + case ENGINE_METHOD_RSA: + if (!ENGINE_register_RSA(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_DSA + case ENGINE_METHOD_DSA: + if (!ENGINE_register_DSA(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_DH + case ENGINE_METHOD_DH: + if (!ENGINE_register_DH(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_RAND + case ENGINE_METHOD_RAND: + if (!ENGINE_register_RAND(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_ECDH + case ENGINE_METHOD_ECDH: + if (!ENGINE_register_ECDH(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_ECDSA + case ENGINE_METHOD_ECDSA: + if (!ENGINE_register_ECDSA(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_STORE + case ENGINE_METHOD_STORE: + if (!ENGINE_register_STORE(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_CIPHERS + case ENGINE_METHOD_CIPHERS: + if (!ENGINE_register_ciphers(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_DIGESTS + case ENGINE_METHOD_DIGESTS: + if (!ENGINE_register_digests(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_PKEY_METHS + case ENGINE_METHOD_PKEY_METHS: + if (!ENGINE_register_pkey_meths(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_PKEY_ASN1_METHS + case ENGINE_METHOD_PKEY_ASN1_METHS: + if (!ENGINE_register_pkey_asn1_meths(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif +#ifdef ENGINE_METHOD_EC + case ENGINE_METHOD_EC: + if (!ENGINE_register_EC(ctx->engine)) + return enif_make_tuple2(env, atom_error, atom_register_engine_failed); + break; +#endif + default: + return enif_make_tuple2(env, atom_error, atom_engine_method_not_supported); + break; + } + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_unregister_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine, EngineMethod) */ +#ifdef HAS_ENGINE_SUPPORT + struct engine_ctx *ctx; + unsigned int method; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_unregister_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + // Get Method + if (!enif_get_uint(env, argv[1], &method)) { + PRINTF_ERR0("engine_unregister_nif Leaved: Parameter Method not an uint"); + return enif_make_badarg(env); + } + + switch(method) + { +#ifdef ENGINE_METHOD_RSA + case ENGINE_METHOD_RSA: + ENGINE_unregister_RSA(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_DSA + case ENGINE_METHOD_DSA: + ENGINE_unregister_DSA(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_DH + case ENGINE_METHOD_DH: + ENGINE_unregister_DH(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_RAND + case ENGINE_METHOD_RAND: + ENGINE_unregister_RAND(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_ECDH + case ENGINE_METHOD_ECDH: + ENGINE_unregister_ECDH(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_ECDSA + case ENGINE_METHOD_ECDSA: + ENGINE_unregister_ECDSA(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_STORE + case ENGINE_METHOD_STORE: + ENGINE_unregister_STORE(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_CIPHERS + case ENGINE_METHOD_CIPHERS: + ENGINE_unregister_ciphers(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_DIGESTS + case ENGINE_METHOD_DIGESTS: + ENGINE_unregister_digests(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_PKEY_METHS + case ENGINE_METHOD_PKEY_METHS: + ENGINE_unregister_pkey_meths(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_PKEY_ASN1_METHS + case ENGINE_METHOD_PKEY_ASN1_METHS: + ENGINE_unregister_pkey_asn1_meths(ctx->engine); + break; +#endif +#ifdef ENGINE_METHOD_EC + case ENGINE_METHOD_EC: + ENGINE_unregister_EC(ctx->engine); + break; +#endif + default: + break; + } + return atom_ok; +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_first_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM ret; + ENGINE *engine; + ErlNifBinary engine_bin; + struct engine_ctx *ctx; + + engine = ENGINE_get_first(); + if(!engine) { + enif_alloc_binary(0, &engine_bin); + engine_bin.size = 0; + return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_bin)); + } + + ctx = enif_alloc_resource(engine_ctx_rtype, sizeof(struct engine_ctx)); + ctx->engine = engine; + ctx->id = NULL; + + ret = enif_make_resource(env, ctx); + enif_release_resource(ctx); + + return enif_make_tuple2(env, atom_ok, ret); +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_next_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM ret; + ENGINE *engine; + ErlNifBinary engine_bin; + struct engine_ctx *ctx, *next_ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_get_next_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + engine = ENGINE_get_next(ctx->engine); + if (!engine) { + enif_alloc_binary(0, &engine_bin); + engine_bin.size = 0; + return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_bin)); + } + + next_ctx = enif_alloc_resource(engine_ctx_rtype, sizeof(struct engine_ctx)); + next_ctx->engine = engine; + next_ctx->id = NULL; + + ret = enif_make_resource(env, next_ctx); + enif_release_resource(next_ctx); + + return enif_make_tuple2(env, atom_ok, ret); +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ErlNifBinary engine_id_bin; + const char *engine_id; + int size; + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_get_id_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + engine_id = ENGINE_get_id(ctx->engine); + if (!engine_id) { + enif_alloc_binary(0, &engine_id_bin); + engine_id_bin.size = 0; + return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); + } + + size = strlen(engine_id); + enif_alloc_binary(size, &engine_id_bin); + engine_id_bin.size = size; + memcpy(engine_id_bin.data, engine_id, size); + + return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); +#else + return atom_notsup; +#endif +} + +static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, char **cmds, int i) +{ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM head, tail; + const ERL_NIF_TERM *tmp_tuple; + ErlNifBinary tmpbin; + int arity; + char* tmpstr; + int tmplen = 0; + + if(!enif_is_empty_list(env, term)) { + if(!enif_get_list_cell(env, term, &head, &tail)) { + cmds[i] = NULL; + return -1; + } else { + if(!enif_get_tuple(env, head, &arity, &tmp_tuple) || arity != 2) { + cmds[i] = NULL; + return -1; + } else { + if(!enif_inspect_binary(env, tmp_tuple[0], &tmpbin)) { + cmds[i] = NULL; + return -1; + } else { + tmplen = tmpbin.size+1; + tmpstr = enif_alloc(tmplen); + (void) memcpy(tmpstr, tmpbin.data, tmplen); + tmpstr[tmplen-1] = '\0'; + cmds[i++] = tmpstr; + } + if(!enif_inspect_binary(env, tmp_tuple[1], &tmpbin)) { + cmds[i] = NULL; + return -1; + } else { + if(tmpbin.size == 0) + cmds[i++] = NULL; + else { + tmplen = tmpbin.size+1; + tmpstr = enif_alloc(tmplen); + (void) memcpy(tmpstr, tmpbin.data, tmplen); + tmpstr[tmplen-1] = '\0'; + cmds[i++] = tmpstr; + } + } + return get_engine_load_cmd_list(env, tail, cmds, i); + } + } + } else { + cmds[i] = NULL; + return 0; + } +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_all_methods_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* () */ +#ifdef HAS_ENGINE_SUPPORT + ERL_NIF_TERM method_array[12]; + int i = 0; + +#ifdef ENGINE_METHOD_RSA + method_array[i++] = atom_engine_method_rsa; +#endif +#ifdef ENGINE_METHOD_DSA + method_array[i++] = atom_engine_method_dsa; +#endif +#ifdef ENGINE_METHOD_DH + method_array[i++] = atom_engine_method_dh; +#endif +#ifdef ENGINE_METHOD_RAND + method_array[i++] = atom_engine_method_rand; +#endif +#ifdef ENGINE_METHOD_ECDH + method_array[i++] = atom_engine_method_ecdh; +#endif +#ifdef ENGINE_METHOD_ECDSA + method_array[i++] = atom_engine_method_ecdsa; +#endif +#ifdef ENGINE_METHOD_STORE + method_array[i++] = atom_engine_method_store; +#endif +#ifdef ENGINE_METHOD_CIPHERS + method_array[i++] = atom_engine_method_ciphers; +#endif +#ifdef ENGINE_METHOD_DIGESTS + method_array[i++] = atom_engine_method_digests; +#endif +#ifdef ENGINE_METHOD_PKEY_METHS + method_array[i++] = atom_engine_method_pkey_meths; +#endif +#ifdef ENGINE_METHOD_PKEY_ASN1_METHS + method_array[i++] = atom_engine_method_pkey_asn1_meths; +#endif +#ifdef ENGINE_METHOD_EC + method_array[i++] = atom_engine_method_ec; +#endif + + return enif_make_list_from_array(env, method_array, i); +#else + return atom_notsup; +#endif +} diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c new file mode 100644 index 0000000000..414e89c0f6 --- /dev/null +++ b/lib/crypto/c_src/otp_test_engine.c @@ -0,0 +1,177 @@ +/* + * %CopyrightBegin% + * + * Copyright Ericsson AB 2017-2017. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * %CopyrightEnd% + */ + +#ifdef _WIN32 +#define OPENSSL_OPT_WINDLL +#endif +#include +#include + +#include +#include + +#define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \ + ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf) + +#define PACKED_OPENSSL_VERSION_PLAIN(MAJ, MIN, FIX) \ + PACKED_OPENSSL_VERSION(MAJ,MIN,FIX,('a'-1)) + +#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) \ + || defined(LIBRESSL_VERSION_NUMBER) +#define OLD +#endif + +static const char *test_engine_id = "MD5"; +static const char *test_engine_name = "MD5 test engine"; + +static int test_init(ENGINE *e) { + printf("OTP Test Engine Initializatzion!\r\n"); + return 111; +} + +static void add_test_data(unsigned char *md, unsigned int len) +{ + unsigned int i; + + for (i=0; imd_data) +#endif + +static int test_engine_md5_init(EVP_MD_CTX *ctx) { + fprintf(stderr, "MD5 initialized\r\n"); +#ifdef OLD + return MD5_Init(data(ctx)); +#else + return 1; +#endif +} + +static int test_engine_md5_update(EVP_MD_CTX *ctx,const void *data, size_t count) +{ + fprintf(stderr, "MD5 update\r\n"); +#ifdef OLD + return MD5_Update(data(ctx), data, (size_t)count); +#else + return 1; +#endif +} + +static int test_engine_md5_final(EVP_MD_CTX *ctx,unsigned char *md) { +#ifdef OLD + int ret; + + fprintf(stderr, "MD5 final size of EVP_MD: %lu\r\n", sizeof(EVP_MD)); + ret = MD5_Final(md, data(ctx)); + + if (ret > 0) { + add_test_data(md, MD5_DIGEST_LENGTH); + } + return ret; +#else + fprintf(stderr, "MD5 final\r\n"); + add_test_data(md, MD5_DIGEST_LENGTH); + return 1; +#endif +} + +#ifdef OLD +static EVP_MD test_engine_md5_method= { + NID_md5, /* The name ID for MD5 */ + NID_undef, /* IGNORED: MD5 with private key encryption NID */ + MD5_DIGEST_LENGTH, /* Size of MD5 result, in bytes */ + 0, /* Flags */ + test_engine_md5_init, /* digest init */ + test_engine_md5_update, /* digest update */ + test_engine_md5_final, /* digest final */ + NULL, /* digest copy */ + NULL, /* digest cleanup */ + EVP_PKEY_NULL_method, /* IGNORED: pkey methods */ + MD5_CBLOCK, /* Internal blocksize, see rfc1321/md5.h */ + sizeof(EVP_MD *) + sizeof(MD5_CTX), + NULL, /* IGNORED: control function */ +}; +#endif + +static int test_digest_ids[] = {NID_md5}; + +static int test_engine_digest_selector(ENGINE *e, const EVP_MD **digest, + const int **nids, int nid) { + int ok = 1; + if (!digest) { + *nids = test_digest_ids; + fprintf(stderr, "Digest is empty! Nid:%d\r\n", nid); + return 2; + } + fprintf(stderr, "Digest no %d requested\r\n",nid); + if (nid == NID_md5) { +#ifdef OLD + *digest = &test_engine_md5_method; +#else + EVP_MD *md = EVP_MD_meth_new(NID_md5, NID_undef); + if (!md || + !EVP_MD_meth_set_result_size(md, MD5_DIGEST_LENGTH) || + !EVP_MD_meth_set_flags(md, 0) || + !EVP_MD_meth_set_init(md, test_engine_md5_init) || + !EVP_MD_meth_set_update(md, test_engine_md5_update) || + !EVP_MD_meth_set_final(md, test_engine_md5_final) || + !EVP_MD_meth_set_copy(md, NULL) || + !EVP_MD_meth_set_cleanup(md, NULL) || + !EVP_MD_meth_set_input_blocksize(md, MD5_CBLOCK) || + !EVP_MD_meth_set_app_datasize(md, sizeof(EVP_MD *) + sizeof(MD5_CTX)) || + !EVP_MD_meth_set_ctrl(md, NULL)) + { + ok = 0; + *digest = NULL; + } else + { + *digest = md; + } +#endif + } + else { + ok = 0; + *digest = NULL; + } + return ok; +} + + +static int bind_helper(ENGINE * e, const char *id) +{ + if (!ENGINE_set_id(e, test_engine_id) || + !ENGINE_set_name(e, test_engine_name) || + !ENGINE_set_init_function(e, test_init) || + !ENGINE_set_digests(e, &test_engine_digest_selector) + ) + return 0; + + return 1; +} + +IMPLEMENT_DYNAMIC_CHECK_FN(); + +IMPLEMENT_DYNAMIC_BIND_FN(bind_helper); diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index 9c503b8fe0..937bb1419f 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -9,11 +9,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# # The Initial Developer of the Original Code is Ericsson Utvecklings AB. # Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings # AB. All Rights Reserved.'' -# +# # $Id$ # include $(ERL_TOP)/make/target.mk @@ -39,12 +39,12 @@ XML_REF3_FILES = crypto.xml XML_REF6_FILES = crypto_app.xml XML_PART_FILES = release_notes.xml usersguide.xml -XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml +XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml BOOK_FILES = book.xml XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \ - $(XML_PART_FILES) $(XML_CHAPTER_FILES) + $(XML_PART_FILES) $(XML_CHAPTER_FILES) GIF_FILES = @@ -63,9 +63,9 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf # ---------------------------------------------------- -# FLAGS +# FLAGS # ---------------------------------------------------- -XML_FLAGS += +XML_FLAGS += # ---------------------------------------------------- # Targets @@ -73,7 +73,6 @@ XML_FLAGS += $(HTMLDIR)/%.gif: %.gif $(INSTALL_DATA) $< $@ - docs: pdf html man $(TOP_PDF_FILE): $(XML_FILES) @@ -86,7 +85,7 @@ man: $(MAN3_FILES) $(MAN6_FILES) gifs: $(GIF_FILES:%=$(HTMLDIR)/%) -debug opt valgrind: +debug opt valgrind: clean clean_docs clean_tex: rm -rf $(HTMLDIR)/* @@ -97,7 +96,7 @@ clean clean_docs clean_tex: # ---------------------------------------------------- # Release Target -# ---------------------------------------------------- +# ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mk release_docs_spec: docs @@ -114,4 +113,3 @@ release_docs_spec: docs release_spec: - diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 5b2c46a004..c0f85945a7 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -11,7 +11,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software @@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - crypto @@ -68,11 +67,11 @@
DATA TYPES - - key_value() = integer() | binary() + + key_value() = integer() | binary()

Always binary() when used as return value

- rsa_public() = [key_value()] = [E, N] + rsa_public() = [key_value()] = [E, N]

Where E is the public exponent and N is public modulus.

rsa_private() = [key_value()] = [E, N, D] | [E, N, D, P1, P2, E1, E2, C] @@ -85,7 +84,7 @@ dss_public() = [key_value()] = [P, Q, G, Y]

Where P, Q and G are the dss parameters and Y is the public key.

- dss_private() = [key_value()] = [P, Q, G, X] + dss_private() = [key_value()] = [P, Q, G, X]

Where P, Q and G are the dss parameters and X is the private key.

srp_public() = key_value() @@ -109,15 +108,16 @@ ecdh_private() = key_value() - ecdh_params() = ec_named_curve() | ec_explicit_curve() + ecdh_params() = ec_named_curve() | ec_explicit_curve() ec_explicit_curve() = - {ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), CoFactor :: none | integer()} + {ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), + CoFactor :: none | integer()} ec_field() = {prime_field, Prime :: integer()} | {characteristic_two_field, M :: integer(), Basis :: ec_basis()} - ec_basis() = {tpbasis, K :: non_neg_integer()} | + ec_basis() = {tpbasis, K :: non_neg_integer()} | {ppbasis, K1 :: non_neg_integer(), K2 :: non_neg_integer(), K3 :: non_neg_integer()} | onbasis @@ -138,14 +138,14 @@ stream_cipher() = rc4 | aes_ctr - block_cipher() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc | + block_cipher() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc | blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc - aead_cipher() = aes_gcm | chacha20_poly1305 + aead_cipher() = aes_gcm | chacha20_poly1305 - stream_key() = aes_key() | rc4_key() + stream_key() = aes_key() | rc4_key() - block_key() = aes_key() | blowfish_key() | des_key()| des3_key() + block_key() = aes_key() | blowfish_key() | des_key()| des3_key() aes_key() = iodata()

Key length is 128, 192 or 256 bits

@@ -174,13 +174,17 @@ Note that both md4 and md5 are recommended only for compatibility with existing applications.

cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | - aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20_poly1305 | des_cbc | des_cfb | - des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4 - mac_algorithms() = hmac | cmac - public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m + aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20_poly1305 | des_cbc | + des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4
+ mac_algorithms() = hmac | cmac + public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m

Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported with ecdsa and ecdh.

+ engine_method_type() = engine_method_rsa | engine_method_dsa | engine_method_dh | + engine_method_rand | engine_method_ecdh | engine_method_ecdsa | + engine_method_ciphers | engine_method_digests | engine_method_store | + engine_method_pkey_meths | engine_method_pkey_asn1_meths
@@ -261,13 +265,13 @@ is not supported by the underlying OpenSSL implementation.

- + bytes_to_integer(Bin) -> Integer Convert binary representation, of an integer, to an Erlang integer. Bin = binary() - as returned by crypto functions - + Integer = integer() @@ -439,7 +443,7 @@

Updates the HMAC represented by Context using the given Data. Context - must have been generated using an HMAC init function (such as + must have been generated using an HMAC init function (such as hmac_init). Data can be any length. NewContext must be passed into the next call to hmac_update or to one of the functions hmac_final and @@ -594,7 +598,7 @@

- + private_encrypt(Type, PlainText, PrivateKey, Padding) -> CipherText Encrypts PlainText using the private Key. @@ -905,6 +909,124 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ + + + engine_get_all_methods() -> Result + Return list of all possible engine methods + + Result = [EngineMethod::atom()] + + +

+ Returns a list of all possible engine methods. +

+

+ May throw exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + engine_load(EngineId, PreCmds, PostCmds) -> Result + Dynamical load an encryption engine + + EngineId = unicode:chardata() + PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] + Result = {ok, Engine::term()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId if it is available and then returns ok and + an engine handle. This function is the same as calling engine_load/4 with + EngineMethods set to a list of all the possible methods. An error tuple is + returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + engine_load(EngineId, PreCmds, PostCmds, EngineMethods) -> Result + Dynamical load an encryption engine + + EngineId = unicode:chardata() + PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] + EngineMethods = [engine_method_type()] + Result = {ok, Engine::term()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId if it is available and then returns ok and + an engine handle. An error tuple is returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + engine_unload(Engine) -> Result + Dynamical load an encryption engine + + Engine = term() + Result = ok | {error, Reason::term()} + + +

+ Unloads the OpenSSL engine given by EngineId. + An error tuple is returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameter is in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + engine_list() -> Result + List the known engine ids + + Result = [EngineId::unicode:chardata()] + + +

List the id's of all engines in OpenSSL's internal list.

+

+ It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ @@ -979,4 +1101,3 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - diff --git a/lib/crypto/doc/src/engine_load.xml b/lib/crypto/doc/src/engine_load.xml new file mode 100644 index 0000000000..e5c3f5d561 --- /dev/null +++ b/lib/crypto/doc/src/engine_load.xml @@ -0,0 +1,110 @@ + + + + +
+ + 20172017 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + Engine Load + Lars Thorsén + 2017-08-22 + engine_load.xml +
+

+ + This chapter describes the support for loading encryption engines in the crypto application. +

+ +
+ Background +

+ OpenSSL exposes an Engine API, which makes it possible to plug in alternative + implementations for some or all of the cryptographic operations implemented by OpenSSL. + When configured appropriately, OpenSSL calls the engine's implementation of these + operations instead of its own. +

+

+ Typically, OpenSSL engines provide a hardware implementation of specific cryptographic + operations. The hardware implementation usually offers improved performance over its + software-based counterpart, which is known as cryptographic acceleration. +

+
+ +
+ Use Cases +
+ Dynamically load an engine from default directory +

+ If the engine is located in the OpenSSL/LibreSSL installation engines directory. +

+ +1> {ok, Engine} = crypto:engine_load(<<"otp_test_engine">>, [], []). + {ok, #Ref} + +

The file name requirement on the engine dynamic library can differ between SSL versions.

+
+
+ +
+ Load an engine with the dynamic engine +

+ Load an engine with the help of the dynamic engine by giving the path to the library. +

+ + 2> {ok, Engine} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, + <<"/some/path/otp_test_engine.so">>}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []). + {ok, #Ref} + +

The dynamic engine is not supported in LibreSSL from version 2.2.1

+
+
+ +
+ Load an engine and replace some methods +

+ Load an engine with the help of the dynamic engine and just + replace some engine methods. +

+ + 3> Methods = crypto:engine_get_all_methods() -- [engine_method_dh,engine_method_rand, +engine_method_ciphers,engine_method_digests, engine_method_store, +engine_method_pkey_meths, engine_method_pkey_asn1_meths]. +[engine_method_rsa,engine_method_dsa, + engine_method_ecdh,engine_method_ecdsa] + 4> {ok, Engine} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, + <<"/some/path/otp_test_engine.so">>}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + [], + Methods). + {ok, #Ref} +
+ +
+ List all engines currently loaded + + 5> crypto:engine_list(). +[<<"dynamic">>, <<"MD5">>] +
+ +
+
diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml index 7971aefff4..f637a1db79 100644 --- a/lib/crypto/doc/src/usersguide.xml +++ b/lib/crypto/doc/src/usersguide.xml @@ -11,7 +11,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - + Crypto User's Guide @@ -48,5 +48,5 @@ + - diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile index aea8a5a71c..edad0e6b61 100644 --- a/lib/crypto/src/Makefile +++ b/lib/crypto/src/Makefile @@ -39,8 +39,7 @@ MODULES= \ crypto \ crypto_ec_curves -HRL_FILES= - +HRL_FILES= ERL_FILES= $(MODULES:%=%.erl) TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) @@ -56,16 +55,16 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE) # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- -ERL_COMPILE_FLAGS += -DCRYPTO_VSN=\"$(VSN)\" -Werror +ERL_COMPILE_FLAGS += -DCRYPTO_VSN=\"$(VSN)\" -Werror -I../include # ---------------------------------------------------- # Targets # ---------------------------------------------------- -debug opt valgrind: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) +debug opt valgrind: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) clean: - rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) + rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) rm -f errs core *~ $(APP_TARGET): $(APP_SRC) ../vsn.mk @@ -78,7 +77,7 @@ docs: # ---------------------------------------------------- # Release Target -# ---------------------------------------------------- +# ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt @@ -89,10 +88,3 @@ release_spec: opt $(APPUP_TARGET) "$(RELSYSDIR)/ebin" release_docs_spec: - - - - - - - diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index f9c4f7b71d..9eba4561e1 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -44,10 +44,18 @@ -export([dh_generate_parameters/2, dh_check/1]). %% Testing see -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). +%% Engine +-export([ + engine_get_all_methods/0, + engine_load/3, + engine_load/4, + engine_unload/1, + engine_list/0 + ]). -%% Private. For tests. --export([packed_openssl_version/4]). +%% Private. For tests. +-export([packed_openssl_version/4, engine_methods_convert_to_bitmask/2, get_test_engine/0]). -deprecated({rand_uniform, 2, next_major_release}). @@ -568,10 +576,143 @@ compute_key(ecdh, Others, My, Curve) -> nif_curve_params(Curve), ensure_int_as_bin(My)). +%%====================================================================== +%% Engine functions +%%====================================================================== +%%---------------------------------------------------------------------- +%% Function: engine_get_all_methods/0 +%%---------------------------------------------------------------------- +-type engine_method_type() :: engine_method_rsa | engine_method_dsa | engine_method_dh | + engine_method_rand | engine_method_ecdh | engine_method_ecdsa | + engine_method_ciphers | engine_method_digests | engine_method_store | + engine_method_pkey_meths | engine_method_pkey_asn1_meths | + engine_method_ec. + +-spec engine_get_all_methods() -> + [engine_method_type()]. +engine_get_all_methods() -> + notsup_to_error(engine_get_all_methods_nif()). + +%%---------------------------------------------------------------------- +%% Function: engine_load/3 +%%---------------------------------------------------------------------- +-spec engine_load(EngineId::unicode:chardata(), + PreCmds::[{unicode:chardata(), unicode:chardata()}], + PostCmds::[{unicode:chardata(), unicode:chardata()}]) -> + {ok, Engine::term()} | {error, Reason::term()}. +engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), is_list(PostCmds) -> + engine_load(EngineId, PreCmds, PostCmds, engine_get_all_methods()). + +%%---------------------------------------------------------------------- +%% Function: engine_load/4 +%%---------------------------------------------------------------------- +-spec engine_load(EngineId::unicode:chardata(), + PreCmds::[{unicode:chardata(), unicode:chardata()}], + PostCmds::[{unicode:chardata(), unicode:chardata()}], + EngineMethods::[engine_method_type()]) -> + {ok, Engine::term()} | {error, Reason::term()}. +engine_load(EngineId, PreCmds, PostCmds, EngineMethods) when is_list(PreCmds), + is_list(PostCmds) -> + try + ok = notsup_to_error(engine_load_dynamic_nif()), + case notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) of + {ok, Engine} -> + ok = engine_load_1(Engine, PreCmds, PostCmds, EngineMethods), + {ok, Engine}; + {error, Error1} -> + {error, Error1} + end + catch + throw:Error2 -> + Error2 + end. + +engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> + try + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds))), + ok = engine_nif_wrapper(engine_add_nif(Engine)), + ok = engine_nif_wrapper(engine_init_nif(Engine)), + engine_load_2(Engine, PostCmds, EngineMethods), + ok + catch + throw:Error -> + %% The engine couldn't initialise, release the structural reference + ok = engine_free_nif(Engine), + throw(Error) + end. + +engine_load_2(Engine, PostCmds, EngineMethods) -> + try + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PostCmds))), + [ok = engine_nif_wrapper(engine_register_nif(Engine, engine_method_atom_to_int(Method))) || + Method <- EngineMethods], + ok + catch + throw:Error -> + %% The engine registration failed, release the functional reference + ok = engine_finish_nif(Engine), + throw(Error) + end. + +%%---------------------------------------------------------------------- +%% Function: engine_unload/1 +%%---------------------------------------------------------------------- +-spec engine_unload(Engine::term()) -> + ok | {error, Reason::term()}. +engine_unload(Engine) -> + engine_unload(Engine, engine_get_all_methods()). + +-spec engine_unload(Engine::term(), EngineMethods::[engine_method_type()]) -> + ok | {error, Reason::term()}. +engine_unload(Engine, EngineMethods) -> + try + [ok = engine_nif_wrapper(engine_unregister_nif(Engine, engine_method_atom_to_int(Method))) || + Method <- EngineMethods], + ok = engine_nif_wrapper(engine_remove_nif(Engine)), + %% Release the functional reference from engine_init_nif + ok = engine_nif_wrapper(engine_finish_nif(Engine)), + %% Release the structural reference from engine_by_id_nif + ok = engine_nif_wrapper(engine_free_nif(Engine)) + catch + throw:Error -> + Error + end. + +%%---------------------------------------------------------------------- +%% Function: engine_list/0 +%%---------------------------------------------------------------------- +-spec engine_list() -> + [EngineId::binary()]. +engine_list() -> + case notsup_to_error(engine_get_first_nif()) of + {ok, <<>>} -> + []; + {ok, Engine} -> + case notsup_to_error(engine_get_id_nif(Engine)) of + {ok, <<>>} -> + engine_list(Engine, []); + {ok, EngineId} -> + engine_list(Engine, [EngineId]) + end + end. + +engine_list(Engine0, IdList) -> + case notsup_to_error(engine_get_next_nif(Engine0)) of + {ok, <<>>} -> + lists:reverse(IdList); + {ok, Engine1} -> + case notsup_to_error(engine_get_id_nif(Engine1)) of + {ok, <<>>} -> + engine_list(Engine1, IdList); + {ok, EngineId} -> + engine_list(Engine1, [EngineId |IdList]) + end + end. + + %%-------------------------------------------------------------------- %%% On load %%-------------------------------------------------------------------- - on_load() -> LibBaseName = "crypto", PrivDir = code:priv_dir(crypto), @@ -631,12 +772,12 @@ path2bin(Path) when is_list(Path) -> end. %%-------------------------------------------------------------------- -%%% Internal functions +%%% Internal functions %%-------------------------------------------------------------------- max_bytes() -> ?MAX_BYTES_TO_NIF. -notsup_to_error(notsup) -> +notsup_to_error(notsup) -> erlang:error(notsup); notsup_to_error(Other) -> Other. @@ -760,7 +901,7 @@ do_stream_decrypt({rc4, State0}, Data) -> %% -%% AES - in counter mode (CTR) with state maintained for multi-call streaming +%% AES - in counter mode (CTR) with state maintained for multi-call streaming %% -type ctr_state() :: { iodata(), binary(), binary(), integer() } | binary(). @@ -769,11 +910,11 @@ do_stream_decrypt({rc4, State0}, Data) -> { ctr_state(), binary() }. -spec aes_ctr_stream_decrypt(ctr_state(), binary()) -> { ctr_state(), binary() }. - + aes_ctr_stream_init(_Key, _IVec) -> ?nif_stub. aes_ctr_stream_encrypt(_State, _Data) -> ?nif_stub. aes_ctr_stream_decrypt(_State, _Cipher) -> ?nif_stub. - + %% %% RC4 - symmetric stream cipher %% @@ -858,22 +999,22 @@ pkey_verify_nif(_Algorithm, _Type, _Data, _Signature, _Key, _Options) -> ?nif_st rsa_generate_key_nif(_Bits, _Exp) -> ?nif_stub. %% DH Diffie-Hellman functions -%% +%% %% Generate (and check) Parameters is not documented because they are implemented %% for testing (and offline parameter generation) only. -%% From the openssl doc: +%% From the openssl doc: %% DH_generate_parameters() may run for several hours before finding a suitable prime. -%% Thus dh_generate_parameters may in this implementation block +%% Thus dh_generate_parameters may in this implementation block %% the emulator for several hours. %% -%% usage: dh_generate_parameters(1024, 2 or 5) -> +%% usage: dh_generate_parameters(1024, 2 or 5) -> %% [Prime=mpint(), SharedGenerator=mpint()] dh_generate_parameters(PrimeLen, Generator) -> case dh_generate_parameters_nif(PrimeLen, Generator) of error -> erlang:error(generation_failed, [PrimeLen,Generator]); Ret -> Ret - end. + end. dh_generate_parameters_nif(_PrimeLen, _Generator) -> ?nif_stub. @@ -985,7 +1126,7 @@ pkey_crypt_nif(_Algorithm, _In, _Key, _Options, _IsPrivate, _IsEncrypt) -> ?nif_ %% MP representaion (SSH2) mpint(X) when X < 0 -> mpint_neg(X); mpint(X) -> mpint_pos(X). - + -define(UINT32(X), X:32/unsigned-big-integer). @@ -993,7 +1134,7 @@ mpint_neg(X) -> Bin = int_to_bin_neg(X, []), Sz = byte_size(Bin), <>. - + mpint_pos(X) -> Bin = int_to_bin_pos(X, []), <> = Bin, @@ -1015,7 +1156,6 @@ erlint(<>) -> %% mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub. - %%%---------------------------------------------------------------- %% 9470495 == V(0,9,8,zh). %% 268435615 == V(1,0,0,i). @@ -1026,3 +1166,92 @@ packed_openssl_version(MAJ, MIN, FIX, P0) -> P1 = atom_to_list(P0), P = lists:sum([C-$a||C<-P1]), ((((((((MAJ bsl 8) bor MIN) bsl 8 ) bor FIX) bsl 8) bor (P+1)) bsl 4) bor 16#f). + +%%-------------------------------------------------------------------- +%% Engine nifs +engine_by_id_nif(_EngineId) -> ?nif_stub. +engine_init_nif(_Engine) -> ?nif_stub. +engine_finish_nif(_Engine) -> ?nif_stub. +engine_free_nif(_Engine) -> ?nif_stub. +engine_load_dynamic_nif() -> ?nif_stub. +engine_ctrl_cmd_strings_nif(_Engine, _Cmds) -> ?nif_stub. +engine_add_nif(_Engine) -> ?nif_stub. +engine_remove_nif(_Engine) -> ?nif_stub. +engine_register_nif(_Engine, _EngineMethod) -> ?nif_stub. +engine_unregister_nif(_Engine, _EngineMethod) -> ?nif_stub. +engine_get_first_nif() -> ?nif_stub. +engine_get_next_nif(_Engine) -> ?nif_stub. +engine_get_id_nif(_Engine) -> ?nif_stub. +engine_get_all_methods_nif() -> ?nif_stub. + +%%-------------------------------------------------------------------- +%% Engine internals +engine_nif_wrapper(ok) -> + ok; +engine_nif_wrapper(notsup) -> + erlang:error(notsup); +engine_nif_wrapper({error, Error}) -> + throw({error, Error}). + +ensure_bin_chardata(CharData) when is_binary(CharData) -> + CharData; +ensure_bin_chardata(CharData) -> + unicode:characters_to_binary(CharData). + +ensure_bin_cmds(CMDs) -> + ensure_bin_cmds(CMDs, []). + +ensure_bin_cmds([], Acc) -> + lists:reverse(Acc); +ensure_bin_cmds([{Key, Value} |CMDs], Acc) -> + ensure_bin_cmds(CMDs, [{ensure_bin_chardata(Key), ensure_bin_chardata(Value)} | Acc]); +ensure_bin_cmds([Key | CMDs], Acc) -> + ensure_bin_cmds(CMDs, [{ensure_bin_chardata(Key), <<"">>} | Acc]). + +engine_methods_convert_to_bitmask([], BitMask) -> + BitMask; +engine_methods_convert_to_bitmask(engine_method_all, _BitMask) -> + 16#FFFF; +engine_methods_convert_to_bitmask(engine_method_none, _BitMask) -> + 16#0000; +engine_methods_convert_to_bitmask([M |Ms], BitMask) -> + engine_methods_convert_to_bitmask(Ms, BitMask bor engine_method_atom_to_int(M)). + +engine_method_atom_to_int(engine_method_rsa) -> 16#0001; +engine_method_atom_to_int(engine_method_dsa) -> 16#0002; +engine_method_atom_to_int(engine_method_dh) -> 16#0004; +engine_method_atom_to_int(engine_method_rand) -> 16#0008; +engine_method_atom_to_int(engine_method_ecdh) -> 16#0010; +engine_method_atom_to_int(engine_method_ecdsa) -> 16#0020; +engine_method_atom_to_int(engine_method_ciphers) -> 16#0040; +engine_method_atom_to_int(engine_method_digests) -> 16#0080; +engine_method_atom_to_int(engine_method_store) -> 16#0100; +engine_method_atom_to_int(engine_method_pkey_meths) -> 16#0200; +engine_method_atom_to_int(engine_method_pkey_asn1_meths) -> 16#0400; +engine_method_atom_to_int(engine_method_ec) -> 16#0800; +engine_method_atom_to_int(X) -> + erlang:error(badarg, [X]). + +get_test_engine() -> + Type = erlang:system_info(system_architecture), + LibDir = filename:join([code:priv_dir(crypto), "lib"]), + ArchDir = filename:join([LibDir, Type]), + case filelib:is_dir(ArchDir) of + true -> check_otp_test_engine(ArchDir); + false -> check_otp_test_engine(LibDir) + end. + +check_otp_test_engine(LibDir) -> + case filelib:wildcard("otp_test_engine*", LibDir) of + [] -> + {error, notexist}; + [LibName] -> + LibPath = filename:join(LibDir,LibName), + case filelib:is_file(LibPath) of + true -> + {ok, unicode:characters_to_binary(LibPath)}; + false -> + {error, notexist} + end + end. + diff --git a/lib/crypto/test/Makefile b/lib/crypto/test/Makefile index 138081d386..e046a25338 100644 --- a/lib/crypto/test/Makefile +++ b/lib/crypto/test/Makefile @@ -7,7 +7,8 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk MODULES = \ blowfish_SUITE \ - crypto_SUITE + crypto_SUITE \ + engine_SUITE ERL_FILES= $(MODULES:%=%.erl) @@ -27,7 +28,7 @@ RELSYSDIR = $(RELEASE_PATH)/crypto_test # FLAGS # ---------------------------------------------------- ERL_MAKE_FLAGS += -ERL_COMPILE_FLAGS += +ERL_COMPILE_FLAGS += +nowarn_export_all EBIN = . MAKE_EMAKE = $(wildcard $(ERL_TOP)/make/make_emakefile) @@ -77,7 +78,7 @@ release_spec: release_tests_spec: $(TEST_TARGET) $(INSTALL_DIR) "$(RELSYSDIR)" $(INSTALL_DATA) crypto.spec crypto.cover $(RELTEST_FILES) "$(RELSYSDIR)" - @tar cfh - crypto_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -) + @tar cfh - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -) chmod -R u+w "$(RELSYSDIR)" release_docs_spec: diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 69f02d3da6..6dab459df6 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -198,7 +198,7 @@ init_per_suite(Config) -> %% This is NOT how you want to do seeding, it is just here %% to make the tests pass. Check your OS manual for how you %% really want to seed. - {H,M,L} = erlang:now(), + {H,M,L} = erlang:timestamp(), Bin = <>, crypto:rand_seed(<< <> || _ <- lists:seq(1,16) >>), Config diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl new file mode 100644 index 0000000000..5f74304fe7 --- /dev/null +++ b/lib/crypto/test/engine_SUITE.erl @@ -0,0 +1,312 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2017-2017. All Rights Reserved. +%% +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%% +%% %CopyrightEnd% +%% +%% + +-module(engine_SUITE). + +-include_lib("common_test/include/ct.hrl"). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +%%-------------------------------------------------------------------- +%% Common Test interface functions ----------------------------------- +%%-------------------------------------------------------------------- +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{seconds, 10}} + ]. + +all() -> + [ + get_all_possible_methods, + engine_load_all_methods, + engine_load_some_methods, + bad_arguments, + unknown_engine, + pre_command_fail_bad_value, + pre_command_fail_bad_key, + failed_engine_init + ]. + +init_per_suite(Config) -> + try crypto:start() of + ok -> + Config; + {error,{already_started,crypto}} -> + Config + catch _:_ -> + {skip, "Crypto did not start"} + end. +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +init_per_group(_Group, Config0) -> + Config0. + +end_per_group(_, _) -> + ok. + +%%-------------------------------------------------------------------- +init_per_testcase(_Case, Config) -> + Config. +end_per_testcase(_Case, _Config) -> + ok. + +%%------------------------------------------------------------------------- +%% Test cases starts here. +%%------------------------------------------------------------------------- +get_all_possible_methods() -> + [{doc, "Just fetch all possible engine methods supported."}]. + +get_all_possible_methods(Config) when is_list(Config) -> + try + List = crypto:engine_get_all_methods(), + ct:log("crypto:engine_get_all_methods() -> ~p\n", [List]), + ok + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + +engine_load_all_methods()-> + [{doc, "Use a dummy md5 engine that does not implement md5" + "but rather returns a static binary to test that crypto:engine_load " + "functions works."}]. + +engine_load_all_methods(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) of + {ok, E} -> + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end + end. + +engine_load_some_methods()-> + [{doc, "Use a dummy md5 engine that does not implement md5" + "but rather returns a static binary to test that crypto:engine_load " + "functions works."}]. + +engine_load_some_methods(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + EngineMethods = crypto:engine_get_all_methods() -- + [engine_method_dh,engine_method_rand, + engine_method_ciphers, engine_method_store, + engine_method_pkey_meths, engine_method_pkey_asn1_meths], + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + [], + EngineMethods) of + {ok, E} -> + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_engine_still_original); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end + end. + +%%------------------------------------------------------------------------- +%% Error cases +bad_arguments()-> + [{doc, "Test different arguments in bad format."}]. + +bad_arguments(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + try + crypto:engine_load(fail_engine, [], []) + catch + error:badarg -> + ok + end, + try + crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + 1, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) + catch + error:badarg -> + ok + end, + try + crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {'ID', <<"MD5">>}, + <<"LOAD">>], + []) + catch + error:badarg -> + ok + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end + end. + +unknown_engine() -> + [{doc, "Try to load a non existent engine."}]. + +unknown_engine(Config) when is_list(Config) -> + try + {error, bad_engine_id} = crypto:engine_load(<<"fail_engine">>, [], []), + ok + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + +pre_command_fail_bad_value() -> + [{doc, "Test pre command due to bad value"}]. + +pre_command_fail_bad_value(Config) when is_list(Config) -> + DataDir = unicode:characters_to_binary(code:priv_dir(crypto)), + try + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, + <>/binary >>}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) of + {error, ctrl_cmd_failed} -> + ok; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + +pre_command_fail_bad_key() -> + [{doc, "Test pre command due to bad key"}]. + +pre_command_fail_bad_key(Config) when is_list(Config) -> + try + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_WRONG_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) of + {error, ctrl_cmd_failed} -> + ok; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + +failed_engine_init()-> + [{doc, "Test failing engine init due to missed pre command"}]. + +failed_engine_init(Config) when is_list(Config) -> + try + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}], + []) of + {error, add_engine_failed} -> + ok; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. -- cgit v1.2.3 From f5c169e343c62e57c2a640186b1ff77ce7ce8620 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Oct 2017 15:43:28 +0200 Subject: crypto: Enable using pub/priv PKCS8 keys stored in an Engine --- lib/crypto/c_src/crypto.c | 120 +++++++++++++++++++++++++++++++++++++++++++--- lib/crypto/src/crypto.erl | 19 ++++++-- 2 files changed, 128 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0f07a862d2..4d8854ad8b 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -499,6 +499,10 @@ static int term2point(ErlNifEnv* env, ERL_NIF_TERM term, #endif static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn); +#ifdef HAS_ENGINE_SUPPORT +static int zero_terminate(ErlNifBinary bin, char **buf); +#endif + static int library_refc = 0; /* number of users of this dynamic library */ static ErlNifFunc nif_funcs[] = { @@ -663,7 +667,12 @@ static ERL_NIF_TERM atom_engine_method_store; static ERL_NIF_TERM atom_engine_method_pkey_meths; static ERL_NIF_TERM atom_engine_method_pkey_asn1_meths; static ERL_NIF_TERM atom_engine_method_ec; + +static ERL_NIF_TERM atom_engine; +static ERL_NIF_TERM atom_key_id; +static ERL_NIF_TERM atom_password; #endif + static ErlNifResourceType* hmac_context_rtype; struct hmac_context { @@ -1063,6 +1072,10 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_engine_method_pkey_meths = enif_make_atom(env,"engine_method_pkey_meths"); atom_engine_method_pkey_asn1_meths = enif_make_atom(env,"engine_method_pkey_asn1_meths"); atom_engine_method_ec = enif_make_atom(env,"engine_method_ec"); + + atom_engine = enif_make_atom(env,"engine"); + atom_key_id = enif_make_atom(env,"key_id"); + atom_password = enif_make_atom(env,"password"); #endif init_digest_types(env); @@ -3920,9 +3933,69 @@ static int get_pkey_sign_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF } +#ifdef HAS_ENGINE_SUPPORT +static int get_engine_and_key_id(ErlNifEnv *env, ERL_NIF_TERM key, char ** id, ENGINE **e) +{ + ERL_NIF_TERM engine_res, key_id_term; + struct engine_ctx *ctx; + ErlNifBinary key_id_bin; + + if (!enif_get_map_value(env, key, atom_engine, &engine_res) || + !enif_get_resource(env, engine_res, engine_ctx_rtype, (void**)&ctx) || + !enif_get_map_value(env, key, atom_key_id, &key_id_term) || + !enif_inspect_binary(env, key_id_term, &key_id_bin)) { + return 0; + } + else { + *e = ctx->engine; + return zero_terminate(key_id_bin, id); + } +} + + +static char *get_key_password(ErlNifEnv *env, ERL_NIF_TERM key) { + ERL_NIF_TERM tmp_term; + ErlNifBinary pwd_bin; + char *pwd; + if (enif_get_map_value(env, key, atom_password, &tmp_term) && + enif_inspect_binary(env, tmp_term, &pwd_bin) && + zero_terminate(pwd_bin, &pwd) + ) return pwd; + + return NULL; +} + +static int zero_terminate(ErlNifBinary bin, char **buf) { + *buf = enif_alloc(bin.size+1); + if (!*buf) + return 0; + memcpy(*buf, bin.data, bin.size); + *(*buf+bin.size) = 0; + return 1; +} +#endif + static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, EVP_PKEY **pkey) { - if (algorithm == atom_rsa) { + if (enif_is_map(env, key)) { +#ifdef HAS_ENGINE_SUPPORT + /* Use key stored in engine */ + ENGINE *e; + char *id; + char *password; + + if (!get_engine_and_key_id(env, key, &id, &e)) + return PKEY_BADARG; + password = get_key_password(env, key); + *pkey = ENGINE_load_private_key(e, id, NULL, password); + if (!pkey) + return PKEY_BADARG; + enif_free(id); +#else + return PKEY_BADARG; +#endif + } + else if (algorithm == atom_rsa) { RSA *rsa = RSA_new(); if (!get_rsa_private_key(env, key, rsa)) { @@ -3983,7 +4056,24 @@ static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_ static int get_pkey_public_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_TERM key, EVP_PKEY **pkey) { - if (algorithm == atom_rsa) { + if (enif_is_map(env, key)) { +#ifdef HAS_ENGINE_SUPPORT + /* Use key stored in engine */ + ENGINE *e; + char *id; + char *password; + + if (!get_engine_and_key_id(env, key, &id, &e)) + return PKEY_BADARG; + password = get_key_password(env, key); + *pkey = ENGINE_load_public_key(e, id, NULL, password); + if (!pkey) + return PKEY_BADARG; + enif_free(id); +#else + return PKEY_BADARG; +#endif + } else if (algorithm == atom_rsa) { RSA *rsa = RSA_new(); if (!get_rsa_public_key(env, key, rsa)) { @@ -4041,7 +4131,7 @@ static int get_pkey_public_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_T } static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) -{/* (Algorithm, Type, Data|{digest,Digest}, Key, Options) */ +{/* (Algorithm, Type, Data|{digest,Digest}, Key|#{}, Options) */ int i; const EVP_MD *md = NULL; unsigned char md_value[EVP_MAX_MD_SIZE]; @@ -4061,6 +4151,13 @@ enif_get_atom(env,argv[0],buf,1024,ERL_NIF_LATIN1); printf("algo=%s ",buf); enif_get_atom(env,argv[1],buf,1024,ERL_NIF_LATIN1); printf("hash=%s ",buf); printf("\r\n"); */ + +#ifndef HAS_ENGINE_SUPPORT + if (enif_is_map(env, argv[3])) { + return atom_notsup; + } +#endif + i = get_pkey_sign_digest(env, argv[0], argv[1], argv[2], md_value, &md, &tbs, &tbslen); if (i != PKEY_OK) { if (i == PKEY_NOTSUP) @@ -4082,10 +4179,9 @@ printf("\r\n"); } #ifdef HAS_EVP_PKEY_CTX -/* printf("EVP interface\r\n"); - */ ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; + if (EVP_PKEY_sign_init(ctx) <= 0) goto badarg; if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; @@ -4187,6 +4283,12 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM unsigned char *tbs; /* data to be signed */ size_t tbslen; +#ifndef HAS_ENGINE_SUPPORT + if (enif_is_map(env, argv[4])) { + return atom_notsup; + } +#endif + if (!enif_inspect_binary(env, argv[3], &sig_bin)) { return enif_make_badarg(env); } @@ -4397,7 +4499,13 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM int algo_init = 0; /* char algo[1024]; */ - + +#ifndef HAS_ENGINE_SUPPORT + if (enif_is_map(env, argv[2])) { + return atom_notsup; + } +#endif + if (!enif_inspect_binary(env, argv[1], &in_bin)) { return enif_make_badarg(env); } diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 9eba4561e1..90efbc9e9c 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -430,12 +430,13 @@ sign(Algorithm, Type, Data, Key, Options) -> -type pk_algs() :: rsa | ecdsa | dss . --type pk_opt() :: list() | rsa_padding() . +-type pk_key() :: map() | [integer() | binary()] . +-type pk_opt() :: list() | rsa_padding() . --spec public_encrypt(pk_algs(), binary(), [binary()], pk_opt()) -> binary(). --spec public_decrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). --spec private_encrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). --spec private_decrypt(pk_algs(), binary(), [integer() | binary()], pk_opt()) -> binary(). +-spec public_encrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). +-spec public_decrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). +-spec private_encrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). +-spec private_decrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). public_encrypt(Algorithm, In, Key, Options) when is_list(Options) -> case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, false, true) of @@ -1107,6 +1108,11 @@ ensure_int_as_bin(Int) when is_integer(Int) -> ensure_int_as_bin(Bin) -> Bin. +format_pkey(_Alg, #{engine:=_, key_id:=T}=M) when is_binary(T) -> format_pwd(M); +format_pkey(_Alg, #{engine:=_, key_id:=T}=M) when is_list(T) -> format_pwd(M#{key_id:=list_to_binary(T)}); +format_pkey(_Alg, #{engine:=_ }=M) -> error({bad_key_id, M}); +format_pkey(_Alg, #{}=M) -> error({bad_engine_map, M}); +%%% format_pkey(rsa, Key) -> map_ensure_int_as_bin(Key); format_pkey(ecdsa, [Key, Curve]) -> @@ -1116,6 +1122,9 @@ format_pkey(dss, Key) -> format_pkey(_, Key) -> Key. +format_pwd(#{password := Pwd}=M) when is_list(Pwd) -> M#{password := list_to_binary(Pwd)}; +format_pwd(M) -> M. + %%-------------------------------------------------------------------- %% -type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. -- cgit v1.2.3 From 218ad10d42af1e2b61fc63dd8c7523972e87ad99 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 1 Nov 2017 17:25:19 +0100 Subject: crypto: Define and export some types for engine --- lib/crypto/src/crypto.erl | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 90efbc9e9c..7510babdde 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -53,6 +53,11 @@ engine_list/0 ]). +-export_type([engine_ref/0, + key_id/0, + password/0 + ]). + %% Private. For tests. -export([packed_openssl_version/4, engine_methods_convert_to_bitmask/2, get_test_engine/0]). @@ -429,8 +434,18 @@ sign(Algorithm, Type, Data, Key, Options) -> end. + +-type key_id() :: string() | binary() . +-type password() :: string() | binary() . + +-type engine_key_ref() :: #{engine := engine_ref(), + key_id := key_id(), + password => password(), + term() => term() + }. + -type pk_algs() :: rsa | ecdsa | dss . --type pk_key() :: map() | [integer() | binary()] . +-type pk_key() :: engine_key_ref() | [integer() | binary()] . -type pk_opt() :: list() | rsa_padding() . -spec public_encrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). @@ -589,6 +604,8 @@ compute_key(ecdh, Others, My, Curve) -> engine_method_pkey_meths | engine_method_pkey_asn1_meths | engine_method_ec. +-type engine_ref() :: term(). + -spec engine_get_all_methods() -> [engine_method_type()]. engine_get_all_methods() -> @@ -600,7 +617,7 @@ engine_get_all_methods() -> -spec engine_load(EngineId::unicode:chardata(), PreCmds::[{unicode:chardata(), unicode:chardata()}], PostCmds::[{unicode:chardata(), unicode:chardata()}]) -> - {ok, Engine::term()} | {error, Reason::term()}. + {ok, Engine::engine_ref()} | {error, Reason::term()}. engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), is_list(PostCmds) -> engine_load(EngineId, PreCmds, PostCmds, engine_get_all_methods()). -- cgit v1.2.3 From f9578f8971fe7b59744216661dbb9797dc8455f7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 27 Oct 2017 16:06:13 +0200 Subject: crypto: Documentation for pkey engine loading --- lib/crypto/doc/src/crypto.xml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index c0f85945a7..36295c84cd 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -134,6 +134,23 @@

Note that the sect curves are GF2m (characteristic two) curves and are only supported if the underlying OpenSSL has support for them. See also crypto:supports/0 +

+ + engine_key_ref() = #{engine := engine_ref(), + key_id := key_id(), + password => password()} + + engine_key_ref() = term() +

The result of a call to engine_load/3. +

+ + key_id() = string() | binary() +

Identifies the key to be used. The format depends on the loaded engine. It is passed to + the ENGINE_load_(private|public)_key functions in libcrypto. +

+ + password() = string() | binary() +

The key's password

stream_cipher() = rc4 | aes_ctr @@ -584,7 +601,7 @@ Type = rsa CipherText = binary() - PrivateKey = rsa_private() + PrivateKey = rsa_private() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding PlainText = binary() @@ -609,7 +626,7 @@ than byte_size(N)-11 if rsa_pkcs1_padding is used, and byte_size(N) if rsa_no_padding is used, where N is public modulus of the RSA key. - PrivateKey = rsa_private() + PrivateKey = rsa_private() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_no_padding CipherText = binary() @@ -628,7 +645,7 @@ Type = rsa CipherText = binary() - PublicKey = rsa_public() + PublicKey = rsa_public() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_no_padding PlainText = binary() @@ -653,7 +670,7 @@ than byte_size(N)-11 if rsa_pkcs1_padding is used, and byte_size(N) if rsa_no_padding is used, where N is public modulus of the RSA key. - PublicKey = rsa_public() + PublicKey = rsa_public() | engine_key_ref() Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding CipherText = binary() @@ -706,7 +723,7 @@ signed or it is the hashed value of "cleartext" i.e. the digest (plaintext). DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() - Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] + Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] | engine_key_ref() Options = sign_options() @@ -897,7 +914,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ or it is the hashed value of "cleartext" i.e. the digest (plaintext). DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() Signature = binary() - Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] + Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] | engine_key_ref() Options = sign_options() -- cgit v1.2.3 From f9ad2d679fffc258532740ff7f69da2ccd23cde7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Oct 2017 15:44:17 +0200 Subject: crypto: Update the OTP test engine with pub/priv key storage --- lib/crypto/c_src/otp_test_engine.c | 89 +++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index 414e89c0f6..a66bee2ddf 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -26,6 +26,8 @@ #include #include +#include +#include #define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \ ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf) @@ -41,8 +43,16 @@ static const char *test_engine_id = "MD5"; static const char *test_engine_name = "MD5 test engine"; +/* The callback that does the job of fetching keys on demand by the Engine */ +EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data); + + static int test_init(ENGINE *e) { printf("OTP Test Engine Initializatzion!\r\n"); + + /* Load all digest and cipher algorithms. Needed for password protected private keys */ + OpenSSL_add_all_algorithms(); + return 111; } @@ -156,6 +166,7 @@ static int test_engine_digest_selector(ENGINE *e, const EVP_MD **digest, ok = 0; *digest = NULL; } + return ok; } @@ -165,8 +176,11 @@ static int bind_helper(ENGINE * e, const char *id) if (!ENGINE_set_id(e, test_engine_id) || !ENGINE_set_name(e, test_engine_name) || !ENGINE_set_init_function(e, test_init) || - !ENGINE_set_digests(e, &test_engine_digest_selector) - ) + !ENGINE_set_digests(e, &test_engine_digest_selector) || + /* For testing of key storage in an Engine: */ + !ENGINE_set_load_privkey_function(e, &test_key_load) || + !ENGINE_set_load_pubkey_function(e, &test_key_load) + ) return 0; return 1; @@ -175,3 +189,74 @@ static int bind_helper(ENGINE * e, const char *id) IMPLEMENT_DYNAMIC_CHECK_FN(); IMPLEMENT_DYNAMIC_BIND_FN(bind_helper); + +/******************************************************** + * + * Engine storage simulation + * + */ +int pem_passwd_cb_fun(char *buf, int size, int rwflag, void *password); + +EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data) +{ + EVP_PKEY *pkey = NULL; + FILE *f = fopen(id, "r"); + + if (!f) { + fprintf(stderr, "%s:%d fopen(%s) failed\r\n", __FILE__,__LINE__,id); + return NULL; + } + + /* First try to read as a private key. If that fails, try to read as a public key: */ + pkey = PEM_read_PrivateKey(f, NULL, pem_passwd_cb_fun, callback_data); + if (!pkey) { + /* ERR_print_errors_fp (stderr); */ + fclose(f); + f = fopen(id, "r"); + pkey = PEM_read_PUBKEY(f, NULL, NULL, NULL); + } + fclose(f); + + if (!pkey) { + fprintf(stderr, "%s:%d Key read from file failed. ", __FILE__,__LINE__); + if (callback_data) + fprintf(stderr, "Pwd = \"%s\". ", (char *)callback_data); + fprintf(stderr, "Contents of file \"%s\":\r\n",id); + f = fopen(id, "r"); + { /* Print the contents of the key file */ + char c; + while (!feof(f)) { + switch (c=fgetc(f)) { + case '\n': + case '\r': putc('\r',stdout); putc('\n',stdout); break; + default: putc(c, stdout); + } + } + } + fclose(f); + } + + return pkey; +} + + +int pem_passwd_cb_fun(char *buf, int size, int rwflag, void *password) +{ + int i; + + fprintf(stderr, "In pem_passwd_cb_fun\r\n"); + if (!password) + return 0; + + i = strlen(password); + if (i < size) { + /* whole pwd (incl terminating 0) fits */ + fprintf(stderr, "Got FULL pwd %d(%d) chars\r\n", i, size); + memcpy(buf, (char*)password, i+1); + return i+1; + } else { + fprintf(stderr, "Got TO LONG pwd %d(%d) chars\r\n", i, size); + /* meaningless with a truncated password */ + return 0; + } +} -- cgit v1.2.3 From 50d829f019320ba28f5da8b4068e1ad051dede00 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Oct 2017 15:45:51 +0200 Subject: crypto: Extend engine_SUITE with tests of the pub/priv key fetches --- lib/crypto/test/engine_SUITE.erl | 178 ++++++++++++++++++++- .../engine_SUITE_data/pkcs8/dsa_private_key.pem | 9 ++ .../engine_SUITE_data/pkcs8/dsa_public_key.pem | 12 ++ .../engine_SUITE_data/pkcs8/ecdsa_private_key.pem | 8 + .../engine_SUITE_data/pkcs8/ecdsa_public_key.pem | 6 + .../engine_SUITE_data/pkcs8/rsa_private_key.pem | 28 ++++ .../pkcs8/rsa_private_key_pwd.pem | 30 ++++ .../engine_SUITE_data/pkcs8/rsa_public_key.pem | 9 ++ .../engine_SUITE_data/pkcs8/rsa_public_key_pwd.pem | 9 ++ 9 files changed, 287 insertions(+), 2 deletions(-) create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/dsa_private_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/dsa_public_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_private_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_public_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key_pwd.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key.pem create mode 100644 lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key_pwd.pem (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 5f74304fe7..aac8946893 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -43,10 +43,24 @@ all() -> unknown_engine, pre_command_fail_bad_value, pre_command_fail_bad_key, - failed_engine_init + failed_engine_init, + {group, engine_stored_key} ]. -init_per_suite(Config) -> +groups() -> + [{engine_stored_key, [], + [sign_verify_rsa, + sign_verify_dsa, + sign_verify_ecdsa, + sign_verify_rsa_pwd, + priv_encrypt_pub_decrypt_rsa, + priv_encrypt_pub_decrypt_rsa_pwd, + pub_encrypt_priv_decrypt_rsa, + pub_encrypt_priv_decrypt_rsa_pwd + ]}]. + + +init_per_suite(Config) -> try crypto:start() of ok -> Config; @@ -59,9 +73,31 @@ end_per_suite(_Config) -> ok. %%-------------------------------------------------------------------- +init_per_group(engine_stored_key, Config) -> + case load_storage_engine(Config) of + {ok, E} -> + KeyDir = key_dir(Config), + [{storage_engine,E}, {storage_dir,KeyDir} | Config]; + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {error, notsup} -> + {skip, "Engine not supported on this OpenSSL version"}; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"}; + Other -> + ct:log("Engine load failed: ~p",[Other]), + {fail, "Engine load failed"} + end; init_per_group(_Group, Config0) -> Config0. +end_per_group(engine_stored_key, Config) -> + case proplists:get_value(storage_engine, Config) of + undefined -> + ok; + E -> + ok = crypto:engine_unload(E) + end; end_per_group(_, _) -> ok. @@ -310,3 +346,141 @@ failed_engine_init(Config) when is_list(Config) -> error:notsup -> {skip, "Engine not supported on this OpenSSL version"} end. + +%%%---------------------------------------------------------------- +%%% Pub/priv key storage tests. Thoose are for testing the crypto.erl +%%% support for using priv/pub keys stored in an engine. + +sign_verify_rsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key.pem")}, + sign_verify(rsa, sha, Priv, Pub). + +sign_verify_dsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "dsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "dsa_public_key.pem")}, + sign_verify(dss, sha, Priv, Pub). + +sign_verify_ecdsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "ecdsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "ecdsa_public_key.pem")}, + sign_verify(ecdsa, sha, Priv, Pub). + +sign_verify_rsa_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), + password => "password"}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key_pwd.pem")}, + sign_verify(rsa, sha, Priv, Pub). + +priv_encrypt_pub_decrypt_rsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key.pem")}, + priv_enc_pub_dec(rsa, Priv, Pub, rsa_pkcs1_padding). + +priv_encrypt_pub_decrypt_rsa_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), + password => "password"}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key_pwd.pem")}, + priv_enc_pub_dec(rsa, Priv, Pub, rsa_pkcs1_padding). + +pub_encrypt_priv_decrypt_rsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key.pem")}, + pub_enc_priv_dec(rsa, Pub, Priv, rsa_pkcs1_padding). + +pub_encrypt_priv_decrypt_rsa_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem"), + password => "password"}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key.pem")}, + pub_enc_priv_dec(rsa, Pub, Priv, rsa_pkcs1_padding). + +%%%================================================================ +%%% Help for engine_stored_pub_priv_keys* test cases +%%% +load_storage_engine(_Config) -> + case crypto:get_test_engine() of + {ok, Engine} -> + try crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) + catch + error:notsup -> + {error, notsup} + end; + + {error, Error} -> + {error, Error} + end. + + +key_dir(Config) -> + DataDir = unicode:characters_to_binary(proplists:get_value(data_dir, Config)), + filename:join(DataDir, "pkcs8"). + + +engine_ref(Config) -> + proplists:get_value(storage_engine, Config). + +key_id(Config, File) -> + filename:join(proplists:get_value(storage_dir,Config), File). + +pubkey_alg_supported(Alg) -> + lists:member(Alg, + proplists:get_value(public_keys, crypto:supports())). + + +pub_enc_priv_dec(Alg, KeyEnc, KeyDec, Padding) -> + case pubkey_alg_supported(Alg) of + true -> + PlainText = <<"Hej på dig">>, + CryptoText = crypto:public_encrypt(Alg, PlainText, KeyEnc, Padding), + case crypto:private_decrypt(Alg, CryptoText, KeyDec, Padding) of + PlainText -> ok; + _ -> {fail, "Encrypt-decrypt error"} + end; + false -> + {skip, lists:concat([Alg," is not supported by cryptolib"])} + end. + +priv_enc_pub_dec(Alg, KeyEnc, KeyDec, Padding) -> + case pubkey_alg_supported(Alg) of + true -> + PlainText = <<"Hej på dig">>, + CryptoText = crypto:private_encrypt(Alg, PlainText, KeyEnc, Padding), + case crypto:public_decrypt(Alg, CryptoText, KeyDec, Padding) of + PlainText -> ok; + _ -> {fail, "Encrypt-decrypt error"} + end; + false -> + {skip, lists:concat([Alg," is not supported by cryptolib"])} + end. + +sign_verify(Alg, Sha, KeySign, KeyVerify) -> + case pubkey_alg_supported(Alg) of + true -> + PlainText = <<"Hej på dig">>, + Signature = crypto:sign(Alg, Sha, PlainText, KeySign), + case crypto:verify(Alg, Sha, PlainText, Signature, KeyVerify) of + true -> ok; + _ -> {fail, "Sign-verify error"} + end; + false -> + {skip, lists:concat([Alg," is not supported by cryptolib"])} + end. diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_private_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_private_key.pem new file mode 100644 index 0000000000..778ffac675 --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_private_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PRIVATE KEY----- +MIIBSwIBADCCASwGByqGSM44BAEwggEfAoGBAMyitTMR7vPbpqyAXJpqnB0AhFwQ +F87IE+JKFl5bD/MSkhhRV5sM73HUU1ooXY0FjhZ+cdLUCATuZR5ta4ydANqWIcAB +gX3IwF1B4zf5SXEKTWkUYneL9dOKtiZLtoG28swrk8xMxwX+0fLHkltCEj6FiTW9 +PFrv8GmIfV6DjcI9AhUAqXWbb3RtoN9Ld28fVMhGZrj3LJUCgYEAwnxGHGBMpJaF +2w7zAw3jHjL8PMYlV6vnufGHQlwF0ZUXJxRsvagMb/X1qACTu2VPYEVoLQGM3cfH +EhHoQmvSXGAyTfR7Bmn3gf1n/s/DcFbdZduUCZ/rAyIrfd0eSbc1I+kZk85UCsKK +w/IYdlqcuYa4Cgm2TapT5uEMqH4jhzEEFgIULh8swEUWmU8aJNWsrWl4eCiuUUg= +-----END PRIVATE KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_public_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_public_key.pem new file mode 100644 index 0000000000..0fa5428828 --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/dsa_public_key.pem @@ -0,0 +1,12 @@ +-----BEGIN PUBLIC KEY----- +MIIBtzCCASwGByqGSM44BAEwggEfAoGBAMyitTMR7vPbpqyAXJpqnB0AhFwQF87I +E+JKFl5bD/MSkhhRV5sM73HUU1ooXY0FjhZ+cdLUCATuZR5ta4ydANqWIcABgX3I +wF1B4zf5SXEKTWkUYneL9dOKtiZLtoG28swrk8xMxwX+0fLHkltCEj6FiTW9PFrv +8GmIfV6DjcI9AhUAqXWbb3RtoN9Ld28fVMhGZrj3LJUCgYEAwnxGHGBMpJaF2w7z +Aw3jHjL8PMYlV6vnufGHQlwF0ZUXJxRsvagMb/X1qACTu2VPYEVoLQGM3cfHEhHo +QmvSXGAyTfR7Bmn3gf1n/s/DcFbdZduUCZ/rAyIrfd0eSbc1I+kZk85UCsKKw/IY +dlqcuYa4Cgm2TapT5uEMqH4jhzEDgYQAAoGAXPygOFYdeKgfLmuIC303cESYXvic +e2GNJomv8vaWLZmbLVVDfwA1fNsuF1hZkWw8f7aYaN9iZ3yl9u4Yk4TbJKkqfJqd +dgVt288SUqvi+NMHODUzYi9KAOXxupXffZSvdu54gKRaDuFTZ5XNcRqIJWGYlJYg +NVHF5FPZ4Bk2FYA= +-----END PUBLIC KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_private_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_private_key.pem new file mode 100644 index 0000000000..a45522064f --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_private_key.pem @@ -0,0 +1,8 @@ +-----BEGIN PRIVATE KEY----- +MIHuAgEAMBAGByqGSM49AgEGBSuBBAAjBIHWMIHTAgEBBEIBparGjr0KcdNrVM2J +G0mW5ltP1QyvxDqBMyWLWo3fruRZv6Qoohl5skd1u4O+KJoM/UrrSTOXI/MDR7NN +i1yl7O+hgYkDgYYABAG8K2XVsK0ahG9+HIIPwCO0pJY8ulwSTXwIjkCGyB2lpglh +8qJmRzuyGcfRTslv8wfv0sPlT9H9PKDvgrTUL7rvQQDdOODNgVPXSecUoXoPn+X+ +eqxs77bjx+A5x0t/i3m5PfkaNPh5MZ1H/bWuOOdj2ZXZw0R4rlVc0zVrgnPU8L8S +BQ== +-----END PRIVATE KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_public_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_public_key.pem new file mode 100644 index 0000000000..6d22fe43fe --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/ecdsa_public_key.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBvCtl1bCtGoRvfhyCD8AjtKSWPLpc +Ek18CI5AhsgdpaYJYfKiZkc7shnH0U7Jb/MH79LD5U/R/Tyg74K01C+670EA3Tjg +zYFT10nnFKF6D5/l/nqsbO+248fgOcdLf4t5uT35GjT4eTGdR/21rjjnY9mV2cNE +eK5VXNM1a4Jz1PC/EgU= +-----END PUBLIC KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key.pem new file mode 100644 index 0000000000..ea0e3d3958 --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCwwb0/ddXGXTFK +4FLxXdV6a/WJMSoPPS55RvZIAHFsiTtvPLbJ8LxDsZ6wSVZLN0/UQ4wdWn9jftyj +U5/IxBVG8XOtKimTMvm3/ZOzVLueGHBbrLYscRv9oL85ulTKHWgrZDu0lBX5JJTI +v5UTCErzJRQbka9DG1GaBgDb1PlXfkzBWMwfsBZmwoC77KvCcIGCgbW/XCY03TP2 +3Tg8drvpByMStddP2FQ4fZ91qFUzPu8uhZEsqSQTFlmhgGEx7dLlky0xvu62RuAD +RTpINpcWZtWDHTdssOqu653LwwqBY8lBopCZ/4Af8QR3ZYkQhen1YLEbVheXRuzI +LSCZIiJNAgMBAAECggEBAJH4/fxpqQkvr2Shy33Pu1xlyhnpw01gfn/jrcKasxEq +aC4eWup86E2TY3U8q4pkfIXU3uLi+O9HNpmflwargNLc1mY8uqb44ygiv5bLNEKE +9k2PXcdoBfC4jxPyoNFl5cBn/7LK1TazEjiTl15na9ZPWcLG1pG5/vMPYCgsQ1sP +8J3c4E3aaXIj9QceYxBprl490OCzieGyZlRipncz3g4UShRc/b4cycvDZOJpmAy4 +zbWTcBcSMPVPi5coF0K8UcimiqZkotfb/2RLc433i34IdsIXMM+brdq+g8rmjg5a ++oQPy02M6tFApBruEhAz8DGgaLtDY6MLtyZAt3SjXnUCgYEA1zLgamdTHOqrrmIi +eIQBnAJiyIfcY8B9SX1OsLGYFCHiPVwgUY35B2c7MavMsGcExJhtE+uxU7o5djtM +R6r9cRHOXJ6EQwa8OwzzPqbM17/YqNDeK39bc9WOFUqRWrhDhVMPy6z8rmZr73mG +IUC7mBNx/1GBdVYXIlsXzC96dI8CgYEA0kUAhz6I5nyPa70NDEUYHLHf3IW1BCmE +UoVbraSePJtIEY/IqFx7oDuFo30d4n5z+8ICCtyid1h/Cp3mf3akOiqltYUfgV1G +JgcEjKKYWEnO7cfFyO7LB7Y3GYYDJNy6EzVWPiwTGk9ZTfFJEESmHC45Unxgd17m +Dx/R58rFgWMCgYBQXQWFdtSI5fH7C1bIHrPjKNju/h2FeurOuObcAVZDnmu4cmD3 +U8d9xkVKxVeJQM99A1coq0nrdI3k4zwXP3mp8fZYjDHkPe2pN6rW6L9yiohEcsuk +/siON1/5/4DMmidM8LnjW9R45HLGWWGHpX7oyco2iJ+Jy/6Tq+T1MX3PbQKBgQCm +hdsbQJ0u3CrBSmFQ/E9SOlRt0r4+45pVuCOY6yweF2QF9HcXTtbhWQJHLclDHJ5C +Ha18aKuKFN3XzKFFBPKe1jOSBDGlQ/dQGnKx5fr8wMdObM3oiaTlIJuWbRmEUgJT +QARjDIi8Z2b0YUhZx+Q9oSXoe3PyVYehJrQX+/BavQKBgQCIr7Zp0rQPbfqcTL+M +OYHUoNcb14f9f8hXeXHQOqVpsGwxGdRQAU9wbx/4+obKB5xIkzBsVNcJwavisNja +hegnGjTB/9Hc4m+5bMGwH0bhS2eQO4o+YYM2ypDmFQqDLRfFUlZ5PVHffm/aA9+g +GanNBCsmtoHtV6CJ1UZ7NmBuIA== +-----END PRIVATE KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key_pwd.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key_pwd.pem new file mode 100644 index 0000000000..501662fc35 --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_private_key_pwd.pem @@ -0,0 +1,30 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIh888Iq6gxuMCAggA +MBQGCCqGSIb3DQMHBAic/11YZ8Nt5gSCBMjG/Jb4qiMoBS50iQvHXqcETPE+0NBr +jhsn9w94LkdRBstMPAsoKmY98Er96Rnde/NfmqlU9CupKTkd7Ce5poBf72Y6KMED +cPURyjbGRFsu6x9skXB2obhyKYEqAEF2oQAg4Qbe5v1qXBIgDuC/NgiJnM+w2zCZ +LkHSZB2/NmcnvDzcgPF7TM8pTO23xCJ33m37qjfWvHsgocVqZmL9wQ4+wr/NMYjJ +pJvX1OHW1vBsZsXh40WchalYRSB1VeO368QfsE8coRJztqbMzdce9EQdMB6Q6jlO +cetd3moLIoMP4I7HW0/SgokbycTbRiYSvRyU1TGc2WbW6BrFZV24IckcnnVUFatf +6HKUcaYLG68dJcRgs5QMGkcmgVvlddENHFmHZlo0eym/xSiUl/AT8/5odscm6ML8 +wW5sneax+TF4J2eYmiN7yjAUCodXVTNYNDVKo6uUhntlymbM0o4UitVIbPIfTDHl +sxJAEZ7vpuPqeNMxUk6G6zipuEjqsVbnuFSBSZmgKiGYcifRPUmqqINa3DdS4WVx +xaPWdHbHVRD//ze3h/FsA+1lIE5q2kUE0xXseJA1ISog++kJp14XeaaL2j/tx3Ob +OsbcaOAD/IUw/ItDt9kn0qzfnar7sS0Wov8AmJQxHmH7Lm93jHTLM05yE0AR/eBr +Mig2ZdC+9OqVC+GPuBkRjSs8NpltQIDroz6EV9IMwPwXm0szSYoyoPLmlHJUdnLs +ZUef+au6hYkEJBrvuisagnq5eT/fCV3hsjD7yODebNU2CmBTo6X2PRx/xsBHRMWl +QkoM9PBdSCnKv6HpHl4pchuoqU2NpFjN0BCaad6aHfZSTnqgzK4bEh1oO6dI8/rB +/eh71JyFFG5J4xbpaqz5Su01V1iwU5leK5bDwqals4M4+ZGHGciou7qnXUmX2fJl +r6DlMUa/xy+A2ZG0NuZR05yk2oB3+KVNMgp6zFty3XaxwoNtc8GTLtLnBnIh2rlP +mE1+I65LRWwrNQalPeOAUrYuEzhyp2Df7a8Ykas5PUH7MGR/S0Ge/dLxtE2bJuK4 +znbLAsGhvo/SbNxYqIp6D4iDtd3va6yUGncy41paA/vTKFVvXZDrXcwJQYYCVOGT +OwdzNuozU8Dc7oxsd8oakfC46kvmVaOrGvZbm56PFfprcaL/Hslska5xxEni/eZe +WRxZbCBhAVqS1pn5zkDQVUe9uFlR/x39Qi01HIlKLBsjpSs6qQsFArMe8hgXmXLG +xP+dyVuOE18NzSewdEjeqSRKIM7Qi8EOjZsI4HdSRBY7bh9VhmaVXDZiCSf33TTE +3y8nimzQAeuGoYg6WqHmWWC2Qnpki2HlaIH/ayXEyQWkP/qvg61e8ovdg9Fy8JOO +0AacXVt5zj0q00AW5bKx7usi4NIjZedi86hUm6H19aBm7r86BKjwYTEI/GOcdrbV +9HC/8ayOimgwiAG3gq+aLioWym+Z6KnsbVd7XReVbvM/InQx54WA2y5im0A+/c67 +oQFFPV84XGX9waeqv/K4Wzkm6HW+qVAEM67482VGOf0PVrlQMno6dOotT/Y7ljoZ +2iz0LmN9yylJnLPDrr1i6gzbs5OhhUgbF5LI2YP2wWdCZTl/DrKSIvQZWl8U+tw3 +ciA= +-----END ENCRYPTED PRIVATE KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key.pem new file mode 100644 index 0000000000..d3fb5a2cc9 --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsMG9P3XVxl0xSuBS8V3V +emv1iTEqDz0ueUb2SABxbIk7bzy2yfC8Q7GesElWSzdP1EOMHVp/Y37co1OfyMQV +RvFzrSopkzL5t/2Ts1S7nhhwW6y2LHEb/aC/ObpUyh1oK2Q7tJQV+SSUyL+VEwhK +8yUUG5GvQxtRmgYA29T5V35MwVjMH7AWZsKAu+yrwnCBgoG1v1wmNN0z9t04PHa7 +6QcjErXXT9hUOH2fdahVMz7vLoWRLKkkExZZoYBhMe3S5ZMtMb7utkbgA0U6SDaX +FmbVgx03bLDqruudy8MKgWPJQaKQmf+AH/EEd2WJEIXp9WCxG1YXl0bsyC0gmSIi +TQIDAQAB +-----END PUBLIC KEY----- diff --git a/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key_pwd.pem b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key_pwd.pem new file mode 100644 index 0000000000..f74361cead --- /dev/null +++ b/lib/crypto/test/engine_SUITE_data/pkcs8/rsa_public_key_pwd.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxquo1Na8C+kjeW0YESGm +vE1bgNW9xh+SQjU1fv/97ePK8mQW2zO1h/vUNz23pfZAKjQu3rlFW/VgGJQ0LgCs +8Gr/HbMwNcCJzuFMePUrnWn/qBeR7OKUZCJ3E1pp4kwsTdGDDO7jPtNzKf0bdKlg +G2GHfZWhUediRX8NsRg12X1odVPuRGVRsyJ952YODk9PFjK7pro7Ynf3Icx7di9d +PXL5vEcKSRdomXvt1rgM8XVHES94RQqoz60ZhfV2JnPfa9V8qu0KaGntpEr7p4rQ +5BSiLFPjPOArjsD5tKyo8ldKCdQjLfisEp7AetfMjLPVVPw9o/SmCjDxsYWTVRQ2 +tQIDAQAB +-----END PUBLIC KEY----- -- cgit v1.2.3 From 66b3e6ddbf49f9862433ceb52aa98d4c5bf22094 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 10 Nov 2017 12:21:46 +0100 Subject: crypto: Remove 'relasenotes.xml' from doc/src/Makefile --- lib/crypto/doc/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index 937bb1419f..a902779383 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -38,7 +38,7 @@ XML_APPLICATION_FILES = ref_man.xml XML_REF3_FILES = crypto.xml XML_REF6_FILES = crypto_app.xml -XML_PART_FILES = release_notes.xml usersguide.xml +XML_PART_FILES = usersguide.xml XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml BOOK_FILES = book.xml -- cgit v1.2.3 From 04c2b4316b41598a7d249193db3930e628c1a5fb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 10 Nov 2017 12:23:34 +0100 Subject: crypto: Remove unused 'atom_bad_engine' --- lib/crypto/c_src/crypto.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 4d8854ad8b..28cc982c1e 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -645,7 +645,6 @@ static ERL_NIF_TERM atom_md5; static ERL_NIF_TERM atom_ripemd160; #ifdef HAS_ENGINE_SUPPORT -static ERL_NIF_TERM atom_bad_engine; static ERL_NIF_TERM atom_bad_engine_method; static ERL_NIF_TERM atom_bad_engine_id; static ERL_NIF_TERM atom_ctrl_cmd_failed; @@ -1051,7 +1050,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_ripemd160 = enif_make_atom(env,"ripemd160"); #ifdef HAS_ENGINE_SUPPORT - atom_bad_engine = enif_make_atom(env,"bad_engine"); atom_bad_engine_method = enif_make_atom(env,"bad_engine_method"); atom_bad_engine_id = enif_make_atom(env,"bad_engine_id"); atom_ctrl_cmd_failed = enif_make_atom(env,"ctrl_cmd_failed"); -- cgit v1.2.3 From e394689e748ac582c6b4556e41556137c583b21a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 31 Oct 2017 15:31:47 +0100 Subject: crypto: Add privkey_to_pubkey/2 to get the public key from a priv key in an Engine Only RSA and DSA so far. --- lib/crypto/c_src/crypto.c | 106 +++++++++++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 19 +++++++++ 2 files changed, 123 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 28cc982c1e..b29c5082ba 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -348,6 +348,10 @@ static INLINE void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); +static INLINE void DSA_get0_pqg(const DSA *dsa, + const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); +static INLINE void DSA_get0_key(const DSA *dsa, + const BIGNUM **pub_key, const BIGNUM **priv_key); static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) { @@ -364,6 +368,23 @@ static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) return 1; } +static INLINE void +DSA_get0_pqg(const DSA *dsa, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) +{ + *p = dsa->p; + *q = dsa->q; + *g = dsa->g; +} + +static INLINE void +DSA_get0_key(const DSA *dsa, const BIGNUM **pub_key, const BIGNUM **priv_key) +{ + if (pub_key) *pub_key = dsa->pub_key; + if (priv_key) *priv_key = dsa->priv_key; +} + + + static INLINE int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); static INLINE int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); static INLINE int DH_set_length(DH *dh, long length); @@ -393,6 +414,8 @@ static INLINE int DH_set_length(DH *dh, long length) return 1; } + + static INLINE void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { @@ -404,8 +427,8 @@ DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) static INLINE void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) { - *pub_key = dh->pub_key; - *priv_key = dh->priv_key; + if (pub_key) *pub_key = dh->pub_key; + if (priv_key) *priv_key = dh->priv_key; } #else /* End of compatibility definitions. */ @@ -454,6 +477,7 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -542,6 +566,7 @@ static ErlNifFunc nif_funcs[] = { {"dh_check", 1, dh_check}, {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, + {"privkey_to_pubkey_nif", 2, privkey_to_pubkey_nif}, {"srp_value_B_nif", 5, srp_value_B_nif}, {"srp_user_secret_nif", 7, srp_user_secret_nif}, {"srp_host_secret_nif", 5, srp_host_secret_nif}, @@ -4765,6 +4790,83 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM /*--------------------------------*/ +static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{ /* (Algorithm, PrivKey | KeyMap) */ + EVP_PKEY *pkey; + ERL_NIF_TERM alg = argv[0]; + ERL_NIF_TERM result[8]; + + if (get_pkey_private_key(env, alg, argv[1], &pkey) != PKEY_OK) { + return enif_make_badarg(env); + } + + if (alg == atom_rsa) { + const BIGNUM *n = NULL, *e = NULL, *d = NULL; + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + if (rsa) { + RSA_get0_key(rsa, &n, &e, &d); + result[0] = bin_from_bn(env, e); // Exponent E + result[1] = bin_from_bn(env, n); // Modulus N = p*q + EVP_PKEY_free(pkey); + return enif_make_list_from_array(env, result, 2); + } + + } else if (argv[0] == atom_dss) { + const BIGNUM *p = NULL, *q = NULL, *g = NULL, *pub_key = NULL; + DSA *dsa = EVP_PKEY_get1_DSA(pkey); + if (dsa) { + DSA_get0_pqg(dsa, &p, &q, &g); + DSA_get0_key(dsa, &pub_key, NULL); + result[0] = bin_from_bn(env, p); + result[1] = bin_from_bn(env, q); + result[2] = bin_from_bn(env, g); + result[3] = bin_from_bn(env, pub_key); + EVP_PKEY_free(pkey); + return enif_make_list_from_array(env, result, 4); + } + + } else if (argv[0] == atom_ecdsa) { +#if defined(HAVE_EC) + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + if (ec) { + /* Example of result: + { + Curve = {Field, Prime, Point, Order, CoFactor} = + { + Field = {prime_field,<<255,...,255>>}, + Prime = {<<255,...,252>>, + <<90,...,75>>, + <<196,...,144>> + }, + Point = <<4,...,245>>, + Order = <<255,...,81>>, + CoFactor = <<1>> + }, + Key = <<151,...,62>> + } + or + { + Curve = + {characteristic_two_field, + M, + Basis = {tpbasis, _} + | {ppbasis, k1, k2, k3} + }, + Key + } + */ + EVP_PKEY_free(pkey); + return atom_notsup; + } +#else + EVP_PKEY_free(pkey); + return atom_notsup; +#endif + } + + if (pkey) EVP_PKEY_free(pkey); + return enif_make_badarg(env); +} /*================================================================*/ diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 7510babdde..0d39dcc76e 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -42,6 +42,7 @@ -export([public_encrypt/4, private_decrypt/4]). -export([private_encrypt/4, public_decrypt/4]). -export([dh_generate_parameters/2, dh_check/1]). %% Testing see +-export([privkey_to_pubkey/2]). -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). %% Engine @@ -1058,6 +1059,16 @@ ec_curves() -> ec_curve(X) -> crypto_ec_curves:curve(X). + +privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> + case privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap)) of + [_|_]=L -> map_ensure_bin_as_int(L); + X -> X + end. + +privkey_to_pubkey_nif(_Alg, _EngineMap) -> ?nif_stub. + + %% %% EC %% @@ -1125,6 +1136,14 @@ ensure_int_as_bin(Int) when is_integer(Int) -> ensure_int_as_bin(Bin) -> Bin. +map_ensure_bin_as_int(List) when is_list(List) -> + lists:map(fun ensure_bin_as_int/1, List). + +ensure_bin_as_int(Bin) when is_binary(Bin) -> + bin_to_int(Bin); +ensure_bin_as_int(E) -> + E. + format_pkey(_Alg, #{engine:=_, key_id:=T}=M) when is_binary(T) -> format_pwd(M); format_pkey(_Alg, #{engine:=_, key_id:=T}=M) when is_list(T) -> format_pwd(M#{key_id:=list_to_binary(T)}); format_pkey(_Alg, #{engine:=_ }=M) -> error({bad_key_id, M}); -- cgit v1.2.3 From 646f2984a2c18972bfc9374dee364b0a25db7f4a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 26 Oct 2017 15:45:51 +0200 Subject: crypto: Extend engine_SUITE with tests of the pub key extraction from priv keys --- lib/crypto/test/engine_SUITE.erl | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index aac8946893..72bd59f8ab 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -56,7 +56,9 @@ groups() -> priv_encrypt_pub_decrypt_rsa, priv_encrypt_pub_decrypt_rsa_pwd, pub_encrypt_priv_decrypt_rsa, - pub_encrypt_priv_decrypt_rsa_pwd + pub_encrypt_priv_decrypt_rsa_pwd, + get_pub_from_priv_key_dsa, + get_pub_from_priv_key_ecdsa ]}]. @@ -410,6 +412,31 @@ pub_encrypt_priv_decrypt_rsa_pwd(Config) -> key_id => key_id(Config, "rsa_public_key.pem")}, pub_enc_priv_dec(rsa, Pub, Priv, rsa_pkcs1_padding). +get_pub_from_priv_key_rsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem")}, + Pub = crypto:privkey_to_pubkey(rsa, Priv), + ct:log("rsa Pub = ~p",[Pub]), + sign_verify(rsa, sha, Priv, Pub). + +get_pub_from_priv_key_dsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "dsa_private_key.pem")}, + Pub = crypto:privkey_to_pubkey(dss, Priv), + ct:log("dsa Pub = ~p",[Pub]), + sign_verify(dss, sha, Priv, Pub). + +get_pub_from_priv_key_ecdsa(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "ecdsa_private_key.pem")}, + Pub = crypto:privkey_to_pubkey(ecdsa, Priv), + case Pub of + notsup -> {skip, "ECDSA not implemented"}; + _ -> + ct:log("ecdsa Pub = ~p",[Pub]), + sign_verify(ecdsa, sha, Priv, Pub) + end. + %%%================================================================ %%% Help for engine_stored_pub_priv_keys* test cases %%% -- cgit v1.2.3 From c1179c3b152b7b31f56aebf2a6d21b3fa2e9366f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 8 Nov 2017 11:58:24 +0100 Subject: crypto: Doc privkey_to_pubkey/2 --- lib/crypto/doc/src/crypto.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 36295c84cd..8e2d33c928 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -616,6 +616,21 @@ + + privkey_to_pubkey(Type, EnginePrivateKeyRef) -> PublicKey + Fetches a public key from an Engine stored private key. + + Type = rsa | dss + EnginePrivateKeyRef = engine_key_ref() + PublicKey = rsa_public() | dss_public() + + +

Fetches the corresponding public key from a private key stored in an Engine. + The key must be of the type indicated by the Type parameter. +

+
+
+ private_encrypt(Type, PlainText, PrivateKey, Padding) -> CipherText Encrypts PlainText using the private Key. -- cgit v1.2.3 From 42119f94643225f98370cd2f42a5c9abbf590211 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 10 Nov 2017 18:36:45 +0100 Subject: crypto: Remove faulty valgrind assertion --- lib/crypto/c_src/crypto.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index c4e80e3153..76feab4f8a 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4409,7 +4409,6 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM enif_alloc_binary(outlen, &out_bin); - ERL_VALGRIND_ASSERT_MEM_DEFINED(out_bin.data, out_bin.size); if (is_private) { if (is_encrypt) { /* private_encrypt */ -- cgit v1.2.3 From 223b6a3f4d53f7d5b5d0b9756c1eec4a5b8c862b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 10 Nov 2017 16:19:36 +0100 Subject: crypto: Engine stored keys doc --- lib/crypto/doc/src/Makefile | 2 +- lib/crypto/doc/src/crypto.xml | 3 +- lib/crypto/doc/src/engine_keys.xml | 128 +++++++++++++++++++++++++++++++++++++ lib/crypto/doc/src/usersguide.xml | 1 + 4 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 lib/crypto/doc/src/engine_keys.xml (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index a902779383..aa987d2b39 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -39,7 +39,7 @@ XML_REF3_FILES = crypto.xml XML_REF6_FILES = crypto_app.xml XML_PART_FILES = usersguide.xml -XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml +XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml engine_keys.xml BOOK_FILES = book.xml diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 8e2d33c928..dbc42812a8 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -136,11 +136,12 @@ See also crypto:supports/0

+ engine_key_ref() = #{engine := engine_ref(), key_id := key_id(), password => password()} - engine_key_ref() = term() + engine_ref() = term()

The result of a call to engine_load/3.

diff --git a/lib/crypto/doc/src/engine_keys.xml b/lib/crypto/doc/src/engine_keys.xml new file mode 100644 index 0000000000..64d1e6c2a3 --- /dev/null +++ b/lib/crypto/doc/src/engine_keys.xml @@ -0,0 +1,128 @@ + + + + +
+ + 20172017 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + Engine Stored Keys + Hans Nilsson + 2017-11-10 + engine_keys.xml +
+

+ + This chapter describes the support in the crypto application for using public and private keys stored in encryption engines. +

+ +
+ Background +

+ OpenSSL exposes an Engine API, which makes + it possible to plug in alternative implementations for some of the cryptographic + operations implemented by OpenSSL. + See the chapter Engine Load + for details and how to load an Engine. +

+

+ In addition to provide alternative cryptographic implementations, an engine could provide a storage for + private or public keys. Such a storage could be made safer than the normal file system. Such techniques are not + described in this User's Guide. Here we concentrate on how to use private or public keys stored in + such an engine. +

+

+ The storage engine must call ENGINE_set_load_privkey_function and ENGINE_set_load_pubkey_function. + See the OpenSSL cryptolib's manpages. +

+

+ OTP/Crypto requires that the user provides two or three items of information about the key. The application used + by the user is usually on a higher level, for example SSL. If using + the crypto application directly, it is required that: +

+ + an Engine is loaded, see the chapter on Engine Load + or the Reference Manual + + a reference to a key in the Engine is available. This should be an Erlang string or binary and depends + on the Engine loaded + + an Erlang map is constructed with the Engine reference, the key reference and possibly a key passphrase if + needed by the Engine. See the Reference Manual for + details of the map. + + +
+ +
+ Use Cases +
+ Sign with an engine stored private key +

+ This example shows how to construct a key reference that is used in a sign operation. + The actual key is stored in the engine that is loaded at prompt 1. +

+ +1> {ok, EngineRef} = crypto:engine_load(....). +... +{ok,#Ref<0.2399045421.3028942852.173962>} +2> PrivKey = #{engine => EngineRef, + key_id => "id of the private key in Engine"}. +... +3> Signature = crypto:sign(rsa, sha, <<"The message">>, PrivKey). +<<65,6,125,254,54,233,84,77,83,63,168,28,169,214,121,76, + 207,177,124,183,156,185,160,243,36,79,125,230,231,...>> + +
+ +
+ Verify with an engine stored public key +

+ Here the signature and message in the last example is verifyed using the public key. + The public key is stored in an engine, only to exemplify that it is possible. The public + key could of course be handled openly as usual. +

+ +4> PublicKey = #{engine => EngineRef, + key_id => "id of the public key in Engine"}. +... +5> crypto:verify(rsa, sha, <<"The message">>, Signature, PublicKey). +true +6> + +
+ +
+ Using a password protected private key +

+ The same example as the first sign example, except that a password protects the key down in the Engine. +

+ +6> PrivKeyPwd = #{engine => EngineRef, + key_id => "id of the pwd protected private key in Engine", + password => "password"}. +... +7> crypto:sign(rsa, sha, <<"The message">>, PrivKeyPwd). +<<140,80,168,101,234,211,146,183,231,190,160,82,85,163, + 175,106,77,241,141,120,72,149,181,181,194,154,175,76, + 223,...>> +8> + + +
+ +
+
diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml index f637a1db79..e2ba1fe160 100644 --- a/lib/crypto/doc/src/usersguide.xml +++ b/lib/crypto/doc/src/usersguide.xml @@ -49,4 +49,5 @@ + -- cgit v1.2.3 From bb1b3046fb606cdecc6ba275d96bee89f0502355 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 20 Nov 2017 16:16:57 +0100 Subject: crypto: Correct and extends tests of key fetching/usage --- lib/crypto/test/engine_SUITE.erl | 48 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 72bd59f8ab..dc93259a70 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -53,10 +53,15 @@ groups() -> sign_verify_dsa, sign_verify_ecdsa, sign_verify_rsa_pwd, + sign_verify_rsa_pwd_bad_pwd, priv_encrypt_pub_decrypt_rsa, priv_encrypt_pub_decrypt_rsa_pwd, pub_encrypt_priv_decrypt_rsa, pub_encrypt_priv_decrypt_rsa_pwd, + get_pub_from_priv_key_rsa, + get_pub_from_priv_key_rsa_pwd, + get_pub_from_priv_key_rsa_pwd_no_pwd, + get_pub_from_priv_key_rsa_pwd_bad_pwd, get_pub_from_priv_key_dsa, get_pub_from_priv_key_ecdsa ]}]. @@ -382,6 +387,18 @@ sign_verify_rsa_pwd(Config) -> key_id => key_id(Config, "rsa_public_key_pwd.pem")}, sign_verify(rsa, sha, Priv, Pub). +sign_verify_rsa_pwd_bad_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), + password => "Bad password"}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key_pwd.pem")}, + try sign_verify(rsa, sha, Priv, Pub) of + _ -> {fail, "PWD prot pubkey sign succeded with no pwd!"} + catch + error:badarg -> ok + end. + priv_encrypt_pub_decrypt_rsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key.pem")}, @@ -406,10 +423,10 @@ pub_encrypt_priv_decrypt_rsa(Config) -> pub_encrypt_priv_decrypt_rsa_pwd(Config) -> Priv = #{engine => engine_ref(Config), - key_id => key_id(Config, "rsa_private_key.pem"), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), password => "password"}, Pub = #{engine => engine_ref(Config), - key_id => key_id(Config, "rsa_public_key.pem")}, + key_id => key_id(Config, "rsa_public_key_pwd.pem")}, pub_enc_priv_dec(rsa, Pub, Priv, rsa_pkcs1_padding). get_pub_from_priv_key_rsa(Config) -> @@ -419,6 +436,33 @@ get_pub_from_priv_key_rsa(Config) -> ct:log("rsa Pub = ~p",[Pub]), sign_verify(rsa, sha, Priv, Pub). +get_pub_from_priv_key_rsa_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), + password => "password"}, + Pub = crypto:privkey_to_pubkey(rsa, Priv), + ct:log("rsa Pub = ~p",[Pub]), + sign_verify(rsa, sha, Priv, Pub). + +get_pub_from_priv_key_rsa_pwd_no_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem")}, + try crypto:privkey_to_pubkey(rsa, Priv) of + _ -> {fail, "PWD prot pubkey fetch succeded with no pwd!"} + catch + error:badarg -> ok + end. + +get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) -> + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key_pwd.pem"), + password => "Bad password"}, + try crypto:privkey_to_pubkey(rsa, Priv) of + _ -> {fail, "PWD prot pubkey fetch succeded with bad pwd!"} + catch + error:badarg -> ok + end. + get_pub_from_priv_key_dsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "dsa_private_key.pem")}, -- cgit v1.2.3 From 27d73755ff62a828be8a14597a20e7762049c727 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 20 Nov 2017 16:45:46 +0100 Subject: crypto: Printout polishing --- lib/crypto/c_src/otp_test_engine.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index a66bee2ddf..5c6122c06a 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -218,9 +218,9 @@ EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void * fclose(f); if (!pkey) { - fprintf(stderr, "%s:%d Key read from file failed. ", __FILE__,__LINE__); + fprintf(stderr, "%s:%d Key read from file %s failed.\r\n", __FILE__,__LINE__,id); if (callback_data) - fprintf(stderr, "Pwd = \"%s\". ", (char *)callback_data); + fprintf(stderr, "Pwd = \"%s\".\r\n", (char *)callback_data); fprintf(stderr, "Contents of file \"%s\":\r\n",id); f = fopen(id, "r"); { /* Print the contents of the key file */ @@ -228,12 +228,14 @@ EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void * while (!feof(f)) { switch (c=fgetc(f)) { case '\n': - case '\r': putc('\r',stdout); putc('\n',stdout); break; - default: putc(c, stdout); + case '\r': putc('\r',stderr); putc('\n',stderr); break; + default: putc(c, stderr); } } } + fprintf(stderr, "File contents printed.\r\n"); fclose(f); + return NULL; } return pkey; -- cgit v1.2.3 From f99f4c02676686935276f0df07c1eb6e2ae35fe7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 20 Nov 2017 16:55:31 +0100 Subject: Remove core dump risk in crypto.c --- lib/crypto/c_src/crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index b29c5082ba..ec77bf88bb 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4011,7 +4011,7 @@ static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_ return PKEY_BADARG; password = get_key_password(env, key); *pkey = ENGINE_load_private_key(e, id, NULL, password); - if (!pkey) + if (!*pkey) return PKEY_BADARG; enif_free(id); #else @@ -4795,7 +4795,6 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI EVP_PKEY *pkey; ERL_NIF_TERM alg = argv[0]; ERL_NIF_TERM result[8]; - if (get_pkey_private_key(env, alg, argv[1], &pkey) != PKEY_OK) { return enif_make_badarg(env); } -- cgit v1.2.3 From 6817c0a02c1271d5c92a4fbceafaf71a0cb7e5e2 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 21 Nov 2017 12:16:57 +0100 Subject: crypto: Fixes to make privkey_to_pubkey behave similar to other functions --- lib/crypto/doc/src/crypto.xml | 4 ++++ lib/crypto/src/crypto.erl | 2 +- lib/crypto/test/engine_SUITE.erl | 40 ++++++++++++++++++++++++++-------------- 3 files changed, 31 insertions(+), 15 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 8e2d33c928..565bede7e8 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -628,6 +628,10 @@

Fetches the corresponding public key from a private key stored in an Engine. The key must be of the type indicated by the Type parameter.

+

+ May throw exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 0d39dcc76e..8e3d41c1e9 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1061,7 +1061,7 @@ ec_curve(X) -> privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> - case privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap)) of + case notsup_to_error(privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap))) of [_|_]=L -> map_ensure_bin_as_int(L); X -> X end. diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index dc93259a70..5967331d8e 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -432,23 +432,31 @@ pub_encrypt_priv_decrypt_rsa_pwd(Config) -> get_pub_from_priv_key_rsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key.pem")}, - Pub = crypto:privkey_to_pubkey(rsa, Priv), - ct:log("rsa Pub = ~p",[Pub]), - sign_verify(rsa, sha, Priv, Pub). + try crypto:privkey_to_pubkey(rsa, Priv) of + Pub -> + ct:log("rsa Pub = ~p",[Pub]), + sign_verify(rsa, sha, Priv, Pub) + catch + error:notsup -> {skip, "RSA not implemented"} + end. get_pub_from_priv_key_rsa_pwd(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key_pwd.pem"), password => "password"}, - Pub = crypto:privkey_to_pubkey(rsa, Priv), - ct:log("rsa Pub = ~p",[Pub]), - sign_verify(rsa, sha, Priv, Pub). + try crypto:privkey_to_pubkey(rsa, Priv) of + Pub -> + ct:log("rsa Pub = ~p",[Pub]), + sign_verify(rsa, sha, Priv, Pub) + catch + error:notsup -> {skip, "RSA not supported"} + end. get_pub_from_priv_key_rsa_pwd_no_pwd(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key_pwd.pem")}, try crypto:privkey_to_pubkey(rsa, Priv) of - _ -> {fail, "PWD prot pubkey fetch succeded with no pwd!"} + _ -> {fail, "PWD prot pubkey fetch succeded although no pwd!"} catch error:badarg -> ok end. @@ -466,19 +474,23 @@ get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) -> get_pub_from_priv_key_dsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "dsa_private_key.pem")}, - Pub = crypto:privkey_to_pubkey(dss, Priv), - ct:log("dsa Pub = ~p",[Pub]), - sign_verify(dss, sha, Priv, Pub). + try crypto:privkey_to_pubkey(dss, Priv) of + Pub -> + ct:log("dsa Pub = ~p",[Pub]), + sign_verify(dss, sha, Priv, Pub) + catch + error:notsup -> {skip, "DSA not supported"} + end. get_pub_from_priv_key_ecdsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "ecdsa_private_key.pem")}, - Pub = crypto:privkey_to_pubkey(ecdsa, Priv), - case Pub of - notsup -> {skip, "ECDSA not implemented"}; - _ -> + try crypto:privkey_to_pubkey(ecdsa, Priv) of + Pub -> ct:log("ecdsa Pub = ~p",[Pub]), sign_verify(ecdsa, sha, Priv, Pub) + catch + error:notsup -> {skip, "ECDSA not supported"} end. %%%================================================================ -- cgit v1.2.3 From e0f51124fb37cc6287bc710a537b92d3a179cc72 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 21 Nov 2017 14:33:54 +0100 Subject: crypto: Changes after review --- lib/crypto/doc/src/engine_keys.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/engine_keys.xml b/lib/crypto/doc/src/engine_keys.xml index 64d1e6c2a3..38714fed8a 100644 --- a/lib/crypto/doc/src/engine_keys.xml +++ b/lib/crypto/doc/src/engine_keys.xml @@ -39,8 +39,8 @@ for details and how to load an Engine.

- In addition to provide alternative cryptographic implementations, an engine could provide a storage for - private or public keys. Such a storage could be made safer than the normal file system. Such techniques are not + An engine could among other tasks provide a storage for + private or public keys. Such a storage could be made safer than the normal file system. Thoose techniques are not described in this User's Guide. Here we concentrate on how to use private or public keys stored in such an engine.

@@ -50,7 +50,8 @@

OTP/Crypto requires that the user provides two or three items of information about the key. The application used - by the user is usually on a higher level, for example SSL. If using + by the user is usually on a higher level, for example in + SSL. If using the crypto application directly, it is required that:

-- cgit v1.2.3 From ae25b9bde6276a60f0148691d1eed21e30e433dd Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 24 Nov 2017 13:25:09 +0100 Subject: [crypto] Fix memory leak Fix memory leak in engine load code found by valgrind. --- lib/crypto/c_src/crypto.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index f05bfa10b3..ca6917d56e 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4886,7 +4886,6 @@ static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER #ifdef HAS_ENGINE_SUPPORT ERL_NIF_TERM ret; ErlNifBinary engine_id_bin; - unsigned int engine_id_len = 0; char *engine_id; ENGINE *engine; struct engine_ctx *ctx; @@ -4896,14 +4895,14 @@ static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER PRINTF_ERR0("engine_by_id_nif Leaved: badarg"); return enif_make_badarg(env); } else { - engine_id_len = engine_id_bin.size+1; - engine_id = enif_alloc(engine_id_len); - (void) memcpy(engine_id, engine_id_bin.data, engine_id_len); - engine_id[engine_id_len-1] = '\0'; + engine_id = enif_alloc(engine_id_bin.size+1); + (void) memcpy(engine_id, engine_id_bin.data, engine_id_bin.size); + engine_id[engine_id_bin.size] = '\0'; } engine = ENGINE_by_id(engine_id); if(!engine) { + enif_free(engine_id); PRINTF_ERR0("engine_by_id_nif Leaved: {error, bad_engine_id}"); return enif_make_tuple2(env, atom_error, atom_bad_engine_id); } @@ -5038,7 +5037,8 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const error: for(i = 0; cmds != NULL && cmds[i] != NULL; i++) - enif_free(cmds[i]); + enif_free(cmds[i]); + enif_free(cmds); return ret; #else return atom_notsup; @@ -5377,7 +5377,6 @@ static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, cha ErlNifBinary tmpbin; int arity; char* tmpstr; - int tmplen = 0; if(!enif_is_empty_list(env, term)) { if(!enif_get_list_cell(env, term, &head, &tail)) { @@ -5392,10 +5391,9 @@ static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, cha cmds[i] = NULL; return -1; } else { - tmplen = tmpbin.size+1; - tmpstr = enif_alloc(tmplen); - (void) memcpy(tmpstr, tmpbin.data, tmplen); - tmpstr[tmplen-1] = '\0'; + tmpstr = enif_alloc(tmpbin.size+1); + (void) memcpy(tmpstr, tmpbin.data, tmpbin.size); + tmpstr[tmpbin.size] = '\0'; cmds[i++] = tmpstr; } if(!enif_inspect_binary(env, tmp_tuple[1], &tmpbin)) { @@ -5405,10 +5403,9 @@ static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, cha if(tmpbin.size == 0) cmds[i++] = NULL; else { - tmplen = tmpbin.size+1; - tmpstr = enif_alloc(tmplen); - (void) memcpy(tmpstr, tmpbin.data, tmplen); - tmpstr[tmplen-1] = '\0'; + tmpstr = enif_alloc(tmpbin.size+1); + (void) memcpy(tmpstr, tmpbin.data, tmpbin.size); + tmpstr[tmpbin.size] = '\0'; cmds[i++] = tmpstr; } } -- cgit v1.2.3 From bd4fc9ce5e7fc0feab83e0452511dfdd17ae4ec8 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 28 Nov 2017 12:15:05 +0100 Subject: crypto: fix pubkey_to_privkey --- lib/crypto/c_src/crypto.c | 20 +++++++++----------- lib/crypto/doc/src/crypto.xml | 4 ---- lib/crypto/src/crypto.erl | 10 +++++++++- 3 files changed, 18 insertions(+), 16 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ca6917d56e..3914a48679 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4825,9 +4825,10 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI } else if (argv[0] == atom_ecdsa) { #if defined(HAVE_EC) - EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); - if (ec) { - /* Example of result: + /* not yet implemented + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + if (ec) { + / * Example of result: { Curve = {Field, Prime, Point, Order, CoFactor} = { @@ -4841,7 +4842,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI CoFactor = <<1>> }, Key = <<151,...,62>> - } + } or { Curve = @@ -4852,16 +4853,13 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI }, Key } - */ + * / EVP_PKEY_free(pkey); - return atom_notsup; - } -#else - EVP_PKEY_free(pkey); - return atom_notsup; + return enif_make_list_from_array(env, ..., ...); + */ #endif } - + if (pkey) EVP_PKEY_free(pkey); return enif_make_badarg(env); } diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 554e9f5bc1..dbc42812a8 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -629,10 +629,6 @@

Fetches the corresponding public key from a private key stored in an Engine. The key must be of the type indicated by the Type parameter.

-

- May throw exception notsup in case there is - no engine support in the underlying OpenSSL implementation. -

diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 8e3d41c1e9..641e526537 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1061,9 +1061,17 @@ ec_curve(X) -> privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> - case notsup_to_error(privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap))) of + try privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap)) + of [_|_]=L -> map_ensure_bin_as_int(L); X -> X + catch + error:badarg when Alg==ecdsa -> + {error, notsup}; + error:badarg -> + {error, not_found}; + error:notsup -> + {error, notsup} end. privkey_to_pubkey_nif(_Alg, _EngineMap) -> ?nif_stub. -- cgit v1.2.3 From e3a55e0e3d9772b89bcad88e88d914ac2477d2e5 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 29 Nov 2017 12:52:17 +0100 Subject: crypto: engine_SUITE update --- lib/crypto/test/engine_SUITE.erl | 68 ++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 20 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 5967331d8e..06cce832ac 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -432,65 +432,93 @@ pub_encrypt_priv_decrypt_rsa_pwd(Config) -> get_pub_from_priv_key_rsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key.pem")}, - try crypto:privkey_to_pubkey(rsa, Priv) of + case crypto:privkey_to_pubkey(rsa, Priv) of + {error, not_found} -> + {fail, "Key not found"}; + {error, notsup} -> + {skip, "RSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; Pub -> ct:log("rsa Pub = ~p",[Pub]), sign_verify(rsa, sha, Priv, Pub) - catch - error:notsup -> {skip, "RSA not implemented"} end. get_pub_from_priv_key_rsa_pwd(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key_pwd.pem"), password => "password"}, - try crypto:privkey_to_pubkey(rsa, Priv) of + case crypto:privkey_to_pubkey(rsa, Priv) of + {error, not_found} -> + {fail, "Key not found"}; + {error, notsup} -> + {skip, "RSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; Pub -> ct:log("rsa Pub = ~p",[Pub]), sign_verify(rsa, sha, Priv, Pub) - catch - error:notsup -> {skip, "RSA not supported"} end. get_pub_from_priv_key_rsa_pwd_no_pwd(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key_pwd.pem")}, - try crypto:privkey_to_pubkey(rsa, Priv) of - _ -> {fail, "PWD prot pubkey fetch succeded although no pwd!"} - catch - error:badarg -> ok + case crypto:privkey_to_pubkey(rsa, Priv) of + {error, not_found} -> + ok; + {error, notsup} -> + {skip, "RSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; + Pub -> + ct:log("rsa Pub = ~p",[Pub]), + {fail, "PWD prot pubkey fetch succeded although no pwd!"} end. get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "rsa_private_key_pwd.pem"), password => "Bad password"}, - try crypto:privkey_to_pubkey(rsa, Priv) of - _ -> {fail, "PWD prot pubkey fetch succeded with bad pwd!"} - catch - error:badarg -> ok + case crypto:privkey_to_pubkey(rsa, Priv) of + {error, not_found} -> + ok; + {error, notsup} -> + {skip, "RSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; + Pub -> + ct:log("rsa Pub = ~p",[Pub]), + {fail, "PWD prot pubkey fetch succeded with bad pwd!"} end. get_pub_from_priv_key_dsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "dsa_private_key.pem")}, - try crypto:privkey_to_pubkey(dss, Priv) of + case crypto:privkey_to_pubkey(dss, Priv) of + {error, not_found} -> + {fail, "Key not found"}; + {error, notsup} -> + {skip, "DSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; Pub -> ct:log("dsa Pub = ~p",[Pub]), sign_verify(dss, sha, Priv, Pub) - catch - error:notsup -> {skip, "DSA not supported"} end. get_pub_from_priv_key_ecdsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "ecdsa_private_key.pem")}, - try crypto:privkey_to_pubkey(ecdsa, Priv) of + case crypto:privkey_to_pubkey(ecdsa, Priv) of + {error, not_found} -> + {fail, "Key not found"}; + {error, notsup} -> + {skip, "ECDSA not supported"}; + {error, Error} -> + {fail, {wrong_error,Error}}; Pub -> ct:log("ecdsa Pub = ~p",[Pub]), sign_verify(ecdsa, sha, Priv, Pub) - catch - error:notsup -> {skip, "ECDSA not supported"} end. %%%================================================================ -- cgit v1.2.3 From 4f43c3962b552d67fe2a25579c92ebfba97e2b21 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 1 Dec 2017 10:08:24 +0100 Subject: [crypto] Add engine_ctrl_cmd_string() to API --- lib/crypto/c_src/crypto.c | 13 ++++++--- lib/crypto/doc/src/crypto.xml | 51 ++++++++++++++++++++++++++++++++ lib/crypto/src/crypto.erl | 42 ++++++++++++++++++++++++--- lib/crypto/test/engine_SUITE.erl | 63 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 8 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 3914a48679..6957d25774 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -587,7 +587,7 @@ static ErlNifFunc nif_funcs[] = { {"engine_finish_nif", 1, engine_finish_nif}, {"engine_free_nif", 1, engine_free_nif}, {"engine_load_dynamic_nif", 0, engine_load_dynamic_nif}, - {"engine_ctrl_cmd_strings_nif", 2, engine_ctrl_cmd_strings_nif}, + {"engine_ctrl_cmd_strings_nif", 3, engine_ctrl_cmd_strings_nif}, {"engine_register_nif", 2, engine_register_nif}, {"engine_unregister_nif", 2, engine_unregister_nif}, {"engine_add_nif", 1, engine_add_nif}, @@ -4994,7 +4994,7 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const unsigned int cmds_len = 0; char **cmds = NULL; struct engine_ctx *ctx; - int i; + int i, optional = 0; // Get Engine if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { @@ -5018,11 +5018,16 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const } } + if(!enif_get_int(env, argv[2], &optional)) { + PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: Parameter optional not an integer"); + return enif_make_badarg(env); + } + for(i = 0; i < cmds_len; i+=2) { PRINTF_ERR2("Cmd: %s:%s\r\n", cmds[i] ? cmds[i] : "(NULL)", cmds[i+1] ? cmds[i+1] : "(NULL)"); - if(!ENGINE_ctrl_cmd_string(ctx->engine, cmds[i], cmds[i+1], 0)) { + if(!ENGINE_ctrl_cmd_string(ctx->engine, cmds[i], cmds[i+1], optional)) { PRINTF_ERR2("Command failed: %s:%s\r\n", cmds[i] ? cmds[i] : "(NULL)", cmds[i+1] ? cmds[i+1] : "(NULL)"); @@ -5031,7 +5036,7 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const PRINTF_ERR0("engine_ctrl_cmd_strings_nif Leaved: {error, ctrl_cmd_failed}"); goto error; } -} + } error: for(i = 0; cmds != NULL && cmds[i] != NULL; i++) diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index dbc42812a8..464799b320 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -1060,6 +1060,57 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ + + engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> Result + Sends ctrl commands to an OpenSSL engine + + Engine = term() + CmdName = unicode:chardata() + CmdArg = unicode:chardata() + Result = ok | {error, Reason::term()} + + +

+ Sends ctrl commands to the OpenSSL engine given by Engine. + This function is the same as calling engine_ctrl_cmd_string/4 with + Optional set to false. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> Result + Sends ctrl commands to an OpenSSL engine + + Engine = term() + CmdName = unicode:chardata() + CmdArg = unicode:chardata() + Optional = boolean() + Result = ok | {error, Reason::term()} + + +

+ Sends ctrl commands to the OpenSSL engine given by Engine. + Optional is a boolean argument that can relax the semantics of the function. + If set to true it will only return failure if the ENGINE supported the given + command name but failed while executing it, if the ENGINE doesn't support the command + name it will simply return success without doing anything. In this case we assume + the user is only supplying commands specific to the given ENGINE so we set this to + false. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 641e526537..1a1b4f98b5 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -51,7 +51,9 @@ engine_load/3, engine_load/4, engine_unload/1, - engine_list/0 + engine_list/0, + engine_ctrl_cmd_string/3, + engine_ctrl_cmd_string/4 ]). -export_type([engine_ref/0, @@ -648,7 +650,7 @@ engine_load(EngineId, PreCmds, PostCmds, EngineMethods) when is_list(PreCmds), engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> try - ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds))), + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds), 0)), ok = engine_nif_wrapper(engine_add_nif(Engine)), ok = engine_nif_wrapper(engine_init_nif(Engine)), engine_load_2(Engine, PostCmds, EngineMethods), @@ -662,7 +664,7 @@ engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> engine_load_2(Engine, PostCmds, EngineMethods) -> try - ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PostCmds))), + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PostCmds), 0)), [ok = engine_nif_wrapper(engine_register_nif(Engine, engine_method_atom_to_int(Method))) || Method <- EngineMethods], ok @@ -728,6 +730,35 @@ engine_list(Engine0, IdList) -> end end. +%%---------------------------------------------------------------------- +%% Function: engine_ctrl_cmd_string/3 +%%---------------------------------------------------------------------- +-spec engine_ctrl_cmd_string(Engine::term(), + CmdName::unicode:chardata(), + CmdArg::unicode:chardata()) -> + ok | {error, Reason::term()}. +engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> + engine_ctrl_cmd_string(Engine, CmdName, CmdArg, false). + +%%---------------------------------------------------------------------- +%% Function: engine_ctrl_cmd_string/4 +%%---------------------------------------------------------------------- +-spec engine_ctrl_cmd_string(Engine::term(), + CmdName::unicode:chardata(), + CmdArg::unicode:chardata(), + Optional::boolean()) -> + ok | {error, Reason::term()}. +engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> + case engine_ctrl_cmd_strings_nif(Engine, + ensure_bin_cmds([{CmdName, CmdArg}]), + bool_to_int(Optional)) of + ok -> + ok; + notsup -> + erlang:error(notsup); + {error, Error} -> + {error, Error} + end. %%-------------------------------------------------------------------- %%% On load @@ -1227,7 +1258,7 @@ engine_init_nif(_Engine) -> ?nif_stub. engine_finish_nif(_Engine) -> ?nif_stub. engine_free_nif(_Engine) -> ?nif_stub. engine_load_dynamic_nif() -> ?nif_stub. -engine_ctrl_cmd_strings_nif(_Engine, _Cmds) -> ?nif_stub. +engine_ctrl_cmd_strings_nif(_Engine, _Cmds, _Optional) -> ?nif_stub. engine_add_nif(_Engine) -> ?nif_stub. engine_remove_nif(_Engine) -> ?nif_stub. engine_register_nif(_Engine, _EngineMethod) -> ?nif_stub. @@ -1270,6 +1301,9 @@ engine_methods_convert_to_bitmask(engine_method_none, _BitMask) -> engine_methods_convert_to_bitmask([M |Ms], BitMask) -> engine_methods_convert_to_bitmask(Ms, BitMask bor engine_method_atom_to_int(M)). +bool_to_int(true) -> 1; +bool_to_int(false) -> 0. + engine_method_atom_to_int(engine_method_rsa) -> 16#0001; engine_method_atom_to_int(engine_method_dsa) -> 16#0002; engine_method_atom_to_int(engine_method_dh) -> 16#0004; diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 06cce832ac..f206f967c7 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -44,6 +44,8 @@ all() -> pre_command_fail_bad_value, pre_command_fail_bad_key, failed_engine_init, + ctrl_cmd_string, + ctrl_cmd_string_optional, {group, engine_stored_key} ]. @@ -354,6 +356,67 @@ failed_engine_init(Config) when is_list(Config) -> {skip, "Engine not supported on this OpenSSL version"} end. + +ctrl_cmd_string()-> + [{doc, "Test that a not known optional ctrl comand do not fail"}]. +ctrl_cmd_string(Config) when is_list(Config) -> + try + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) of + {ok, E} -> + case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>) of + ok -> + ct:fail(fail_ctrl_cmd_should_fail); + {error,ctrl_cmd_failed} -> + ok + end, + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + +ctrl_cmd_string_optional()-> + [{doc, "Test that a not known optional ctrl comand do not fail"}]. +ctrl_cmd_string_optional(Config) when is_list(Config) -> + try + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + {<<"ID">>, <<"MD5">>}, + <<"LOAD">>], + []) of + {ok, E} -> + case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>, true) of + ok -> + ok; + _ -> + ct:fail(fail_ctrl_cmd_string) + end, + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + end + catch + error:notsup -> + {skip, "Engine not supported on this OpenSSL version"} + end. + %%%---------------------------------------------------------------- %%% Pub/priv key storage tests. Thoose are for testing the crypto.erl %%% support for using priv/pub keys stored in an engine. -- cgit v1.2.3 From f3a74a7dfb633b21b7d06e48bf430071cdc0f779 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 8 Dec 2017 10:53:22 +0100 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 1dceebb4e4..da3915a4fc 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.1 +CRYPTO_VSN = 4.2 -- cgit v1.2.3 From 47198f179ab14cf8cfcdab0d976650cd1519b236 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 8 Dec 2017 10:57:50 +0100 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 9376e6f649..dbeb886d7b 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,76 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.2 + +
Fixed Bugs and Malfunctions + + +

+ The compatibility function void HMAC_CTX_free in + crypto.c erroneously tried to return a value.

+

+ Own Id: OTP-14720

+
+
+
+ + +
Improvements and New Features + + +

+ Rewrite public and private key encode/decode with EVP + api. New RSA padding options added. This is a modified + half of PR-838.

+

+ Own Id: OTP-14446

+
+ +

+ The crypto API is extended to use private/public keys + stored in an Engine for sign/verify or encrypt/decrypt + operations.

+

+ The ssl application provides an API to use this new + engine concept in TLS.

+

+ Own Id: OTP-14448

+
+ +

Add support to plug in alternative implementations + for some or all of the cryptographic operations supported + by the OpenSSL Engine API. When configured appropriately, + OpenSSL calls the engine's implementation of these + operations instead of its own.

+

+ Own Id: OTP-14567

+
+ +

+ Replaced a call of the OpenSSL deprecated function + DH_generate_parameters in crypto.c.

+

+ Own Id: OTP-14639

+
+ +

+ Documentation added about how to use keys stored in an + Engine.

+

+ Own Id: OTP-14735 Aux Id: OTP-14448

+
+ +

Add engine_ ctrl_cmd_string/3,4 the OpenSSL Engine + support in crypto.

+

+ Own Id: OTP-14801

+
+
+
+ +
+
Crypto 4.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b5b6c7695c5377b5aa474d8620df7c3e9a1ba629 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 11 Jan 2018 15:29:23 +0100 Subject: crypto: Disable RSA sslv23 padding for LibreSSL >= 2.6.1 Not supported in newer LibreSSL. --- lib/crypto/c_src/crypto.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6957d25774..9a3ea07c97 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -179,6 +179,12 @@ # define HAVE_ECB_IVEC_BUG #endif +#define HAVE_RSA_SSLV23_PADDING +#if defined(HAS_LIBRESSL) \ + && LIBRESSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(2,6,1) +# undef HAVE_RSA_SSLV23_PADDING +#endif + #if defined(HAVE_CMAC) #include #endif @@ -659,7 +665,9 @@ static ERL_NIF_TERM atom_rsa_oaep_md; static ERL_NIF_TERM atom_rsa_pad; /* backwards compatibility */ static ERL_NIF_TERM atom_rsa_padding; static ERL_NIF_TERM atom_rsa_pkcs1_pss_padding; +#ifdef HAVE_RSA_SSLV23_PADDING static ERL_NIF_TERM atom_rsa_sslv23_padding; +#endif static ERL_NIF_TERM atom_rsa_x931_padding; static ERL_NIF_TERM atom_rsa_pss_saltlen; static ERL_NIF_TERM atom_sha224; @@ -1064,7 +1072,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_rsa_pad = enif_make_atom(env,"rsa_pad"); /* backwards compatibility */ atom_rsa_padding = enif_make_atom(env,"rsa_padding"); atom_rsa_pkcs1_pss_padding = enif_make_atom(env,"rsa_pkcs1_pss_padding"); +#ifdef HAVE_RSA_SSLV23_PADDING atom_rsa_sslv23_padding = enif_make_atom(env,"rsa_sslv23_padding"); +#endif atom_rsa_x931_padding = enif_make_atom(env,"rsa_x931_padding"); atom_rsa_pss_saltlen = enif_make_atom(env,"rsa_pss_saltlen"); atom_sha224 = enif_make_atom(env,"sha224"); @@ -4449,8 +4459,10 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI opt->rsa_padding = RSA_PKCS1_PADDING; } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) { opt->rsa_padding = RSA_PKCS1_OAEP_PADDING; +#ifdef HAVE_RSA_SSLV23_PADDING } else if (tpl_terms[1] == atom_rsa_sslv23_padding) { opt->rsa_padding = RSA_SSLV23_PADDING; +#endif } else if (tpl_terms[1] == atom_rsa_x931_padding) { opt->rsa_padding = RSA_X931_PADDING; } else if (tpl_terms[1] == atom_rsa_no_padding) { @@ -4516,7 +4528,10 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM #endif PKeyCryptOptions crypt_opt; ErlNifBinary in_bin, out_bin, tmp_bin; - size_t outlen, tmplen; + size_t outlen; +#ifdef HAVE_RSA_SSLV23_PADDING + size_t tmplen; +#endif int is_private = (argv[4] == atom_true), is_encrypt = (argv[5] == atom_true); int algo_init = 0; @@ -4596,6 +4611,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM if (crypt_opt.signature_md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, crypt_opt.signature_md) <= 0) goto badarg; +#ifdef HAVE_RSA_SSLV23_PADDING if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { if (is_encrypt) { RSA *rsa = EVP_PKEY_get1_RSA(pkey); @@ -4607,9 +4623,11 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM in_bin = tmp_bin; } if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_NO_PADDING) <= 0) goto badarg; - } else { + } else +#endif + { if (EVP_PKEY_CTX_set_rsa_padding(ctx, crypt_opt.rsa_padding) <= 0) goto badarg; - } + } #ifdef HAVE_RSA_OAEP_MD if (crypt_opt.rsa_padding == RSA_PKCS1_OAEP_PADDING) { if (crypt_opt.rsa_oaep_md != NULL @@ -4728,6 +4746,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM #endif if ((i > 0) && argv[0] == atom_rsa && !is_encrypt) { +#ifdef HAVE_RSA_SSLV23_PADDING if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { RSA *rsa = EVP_PKEY_get1_RSA(pkey); unsigned char *p; @@ -4745,6 +4764,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM i = 1; } } +#endif } if (tmp_bin.data != NULL) { -- cgit v1.2.3 From 26386f23a0ae27b61dd011975411eb6bb7e8898c Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 12 Jan 2018 08:15:59 +0100 Subject: [crypto] Fix hanging test case on outdated lab machine --- lib/crypto/test/engine_SUITE.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index f206f967c7..f410542f72 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -72,7 +72,12 @@ groups() -> init_per_suite(Config) -> try crypto:start() of ok -> - Config; + case crypto:info_lib() of + [{_,_, <<"OpenSSL 1.0.1s-freebsd 1 Mar 2016">>}] -> + {skip, "Problem with engine on OpenSSL 1.0.1s-freebsd"}; + _ -> + Config + end; {error,{already_started,crypto}} -> Config catch _:_ -> -- cgit v1.2.3 From d93ec4cfd4f312049232d35942a952bb5be7d33a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 9 Mar 2018 09:21:01 +0100 Subject: crypto: Remove undocumented, unused and erroneous functions crypto:dh_generate_parameters and crypto:dh_check --- lib/crypto/c_src/crypto.c | 68 ----------------------------------------------- lib/crypto/src/crypto.erl | 22 --------------- 2 files changed, 90 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 9a3ea07c97..149387bcee 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -479,8 +479,6 @@ static ERL_NIF_TERM pkey_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -568,8 +566,6 @@ static ErlNifFunc nif_funcs[] = { {"pkey_verify_nif", 6, pkey_verify_nif}, {"pkey_crypt_nif", 6, pkey_crypt_nif}, {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, - {"dh_generate_parameters_nif", 2, dh_generate_parameters_nif}, - {"dh_check", 1, dh_check}, {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, {"privkey_to_pubkey_nif", 2, privkey_to_pubkey_nif}, @@ -3006,70 +3002,6 @@ static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF rsa_generate_key, argc, argv); } -static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (PrimeLen, Generator) */ - int prime_len, generator; - DH* dh_params = NULL; - int p_len, g_len; - unsigned char *p_ptr, *g_ptr; - ERL_NIF_TERM ret_p, ret_g; - const BIGNUM *dh_p, *dh_q, *dh_g; - - if (!enif_get_int(env, argv[0], &prime_len) - || !enif_get_int(env, argv[1], &generator)) { - - return enif_make_badarg(env); - } - - if (DH_generate_parameters_ex(dh_params, prime_len, generator, NULL)) { - return atom_error; - } - DH_get0_pqg(dh_params, &dh_p, &dh_q, &dh_g); - DH_free(dh_params); - p_len = BN_num_bytes(dh_p); - g_len = BN_num_bytes(dh_g); - p_ptr = enif_make_new_binary(env, p_len, &ret_p); - g_ptr = enif_make_new_binary(env, g_len, &ret_g); - BN_bn2bin(dh_p, p_ptr); - BN_bn2bin(dh_g, g_ptr); - ERL_VALGRIND_MAKE_MEM_DEFINED(p_ptr, p_len); - ERL_VALGRIND_MAKE_MEM_DEFINED(g_ptr, g_len); - return enif_make_list2(env, ret_p, ret_g); -} - -static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* ([PrimeLen, Generator]) */ - DH* dh_params; - int i; - ERL_NIF_TERM ret, head, tail; - BIGNUM *dh_p, *dh_g; - - if (!enif_get_list_cell(env, argv[0], &head, &tail) - || !get_bn_from_bin(env, head, &dh_p) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_g) - || !enif_is_empty_list(env,tail)) { - - return enif_make_badarg(env); - } - - dh_params = DH_new(); - DH_set0_pqg(dh_params, dh_p, NULL, dh_g); - if (DH_check(dh_params, &i)) { - if (i == 0) ret = atom_ok; - else if (i & DH_CHECK_P_NOT_PRIME) ret = atom_not_prime; - else if (i & DH_CHECK_P_NOT_SAFE_PRIME) ret = atom_not_strong_prime; - else if (i & DH_UNABLE_TO_CHECK_GENERATOR) ret = atom_unable_to_check_generator; - else if (i & DH_NOT_SUITABLE_GENERATOR) ret = atom_not_suitable_generator; - else ret = enif_make_tuple2(env, atom_unknown, enif_make_uint(env, i)); - } - else { /* Check Failed */ - ret = enif_make_tuple2(env, atom_error, atom_check_failed); - } - DH_free(dh_params); - return ret; -} - static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ DH* dh_params; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index df259d5419..ec2a1dba0a 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -42,7 +42,6 @@ -export([stream_init/2, stream_init/3, stream_encrypt/2, stream_decrypt/2]). -export([public_encrypt/4, private_decrypt/4]). -export([private_encrypt/4, public_decrypt/4]). --export([dh_generate_parameters/2, dh_check/1]). %% Testing see -export([privkey_to_pubkey/2]). -export([ec_curve/1, ec_curves/0]). -export([rand_seed/1]). @@ -1090,27 +1089,6 @@ rsa_generate_key_nif(_Bits, _Exp) -> ?nif_stub. %% DH Diffie-Hellman functions %% -%% Generate (and check) Parameters is not documented because they are implemented -%% for testing (and offline parameter generation) only. -%% From the openssl doc: -%% DH_generate_parameters() may run for several hours before finding a suitable prime. -%% Thus dh_generate_parameters may in this implementation block -%% the emulator for several hours. -%% -%% usage: dh_generate_parameters(1024, 2 or 5) -> -%% [Prime=mpint(), SharedGenerator=mpint()] -dh_generate_parameters(PrimeLen, Generator) -> - case dh_generate_parameters_nif(PrimeLen, Generator) of - error -> erlang:error(generation_failed, [PrimeLen,Generator]); - Ret -> Ret - end. - -dh_generate_parameters_nif(_PrimeLen, _Generator) -> ?nif_stub. - -%% Checks that the DHParameters are ok. -%% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] -dh_check([_Prime,_Gen]) -> ?nif_stub. - %% DHParameters = [P (Prime)= mpint(), G(Generator) = mpint()] %% PrivKey = mpint() dh_generate_key_nif(_PrivateKey, _DHParameters, _Mpint, _Length) -> ?nif_stub. -- cgit v1.2.3 From db5a9ef5e49f55338369f088bbef1d492f8c3c0c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Mar 2018 10:59:22 +0100 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index da3915a4fc..3432f00836 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2 +CRYPTO_VSN = 4.2.1 -- cgit v1.2.3 From 7c7ba7191a3932e737fa81fd0166df1c637d4b31 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Mar 2018 11:01:07 +0100 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index dbeb886d7b..1f788a4e35 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.2.1 + +
Fixed Bugs and Malfunctions + + +

+ Fix build error caused by removed RSA padding functions + in LibreSSL >= 2.6.1

+

+ Own Id: OTP-14873

+
+
+
+ +
+
Crypto 4.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 6ee8cc56db53fd7951fb3bacfd6621c72fdf3ced Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Mar 2018 21:22:29 +0100 Subject: crypto: Improve load error message to only suggest missing OpenSSL if dlopen fails (load_failed). --- lib/crypto/src/crypto.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index ec2a1dba0a..46775989ae 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -847,8 +847,13 @@ on_load() -> case Status of ok -> ok; {error, {E, Str}} -> - error_logger:error_msg("Unable to load crypto library. Failed with error:~n\"~p, ~s\"~n" - "OpenSSL might not be installed on this system.~n",[E,Str]), + Fmt = "Unable to load crypto library. Failed with error:~n\"~p, ~s\"~n~s", + Extra = case E of + load_failed -> + "OpenSSL might not be installed on this system.\n"; + _ -> "" + end, + error_logger:error_msg(Fmt, [E,Str,Extra]), Status end. -- cgit v1.2.3 From e8effb2faa19b18ca5f3be9cd1df5d19897a52ae Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 20 Apr 2018 16:25:40 +0200 Subject: crypto: Add marker for engine_ref --- lib/crypto/doc/src/crypto.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 3a5efd0bea..af676d9021 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -136,6 +136,7 @@ See also crypto:supports/0

+ engine_key_ref() = #{engine := engine_ref(), key_id := key_id(), -- cgit v1.2.3 From 93c3f85a708fd3e645a8da08350693f755c3bff6 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 20 Mar 2018 19:47:09 +0100 Subject: crypto: Use EVP-api in dh_compute_key_nif and dh_generate_key_nif --- lib/crypto/c_src/crypto.c | 175 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 129 insertions(+), 46 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 149387bcee..dbb6bf8135 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3004,16 +3004,21 @@ static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ - DH* dh_params; + DH* dh_params = NULL; int pub_len, prv_len; unsigned char *pub_ptr, *prv_ptr; ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail; int mpint; /* 0 or 4 */ - BIGNUM *priv_key = NULL; + BIGNUM *priv_key_in = NULL; BIGNUM *dh_p = NULL, *dh_g = NULL; unsigned long len = 0; +#ifdef HAS_EVP_PKEY_CTX + EVP_PKEY_CTX *ctx = NULL; + EVP_PKEY *dhkey = NULL, + *params = NULL; +#endif - if (!(get_bn_from_bin(env, argv[0], &priv_key) + if (!(get_bn_from_bin(env, argv[0], &priv_key_in) || argv[0] == atom_undefined) || !enif_get_list_cell(env, argv[1], &head, &tail) || !get_bn_from_bin(env, head, &dh_p) @@ -3021,40 +3026,63 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ || !get_bn_from_bin(env, head, &dh_g) || !enif_is_empty_list(env, tail) || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4) - || !enif_get_ulong(env, argv[3], &len) ) { - - if (priv_key) BN_free(priv_key); + || !enif_get_ulong(env, argv[3], &len) + + /* Load dh_params with values to use by the generator. + Mem mgmnt transfered from dh_p etc to dh_params */ + || !(dh_params = DH_new()) + || (priv_key_in && !DH_set0_key(dh_params, NULL, priv_key_in)) + || !DH_set0_pqg(dh_params, dh_p, NULL, dh_g) + ) { + if (priv_key_in) BN_free(priv_key_in); if (dh_p) BN_free(dh_p); if (dh_g) BN_free(dh_g); + if (dh_params) DH_free(dh_params); return enif_make_badarg(env); } - dh_params = DH_new(); - DH_set0_key(dh_params, NULL, priv_key); - DH_set0_pqg(dh_params, dh_p, NULL, dh_g); - if (len) { if (len < BN_num_bits(dh_p)) DH_set_length(dh_params, len); else { - DH_free(dh_params); + if (priv_key_in) BN_free(priv_key_in); + if (dh_p) BN_free(dh_p); + if (dh_g) BN_free(dh_g); + if (dh_params) DH_free(dh_params); return enif_make_badarg(env); } } +#ifdef HAS_EVP_PKEY_CTX + if ((dhkey = EVP_PKEY_new()) + && (params = EVP_PKEY_new()) + && EVP_PKEY_set1_DH(params, dh_params) /* set the key referenced by params to dh_params. + dh_params (and params) must be freed by us*/ + && (ctx = EVP_PKEY_CTX_new(params, NULL)) + && EVP_PKEY_keygen_init(ctx) + && EVP_PKEY_keygen(ctx, &dhkey) + && (dh_params = EVP_PKEY_get1_DH(dhkey)) /* return the referenced key. dh_params and dhkey must be freed */ + ) { +#else if (DH_generate_key(dh_params)) { - const BIGNUM *pub_key, *priv_key; - DH_get0_key(dh_params, &pub_key, &priv_key); - pub_len = BN_num_bytes(pub_key); - prv_len = BN_num_bytes(priv_key); +#endif + const BIGNUM *pub_key_gen, *priv_key_gen; + + DH_get0_key(dh_params, + &pub_key_gen, &priv_key_gen); /* Get pub_key_gen and priv_key_gen. + "The values point to the internal representation of + the public key and private key values. This memory + should not be freed directly." says man */ + pub_len = BN_num_bytes(pub_key_gen); + prv_len = BN_num_bytes(priv_key_gen); pub_ptr = enif_make_new_binary(env, pub_len+mpint, &ret_pub); prv_ptr = enif_make_new_binary(env, prv_len+mpint, &ret_prv); if (mpint) { put_int32(pub_ptr, pub_len); pub_ptr += 4; put_int32(prv_ptr, prv_len); prv_ptr += 4; } - BN_bn2bin(pub_key, pub_ptr); - BN_bn2bin(priv_key, prv_ptr); + BN_bn2bin(pub_key_gen, pub_ptr); + BN_bn2bin(priv_key_gen, prv_ptr); ERL_VALGRIND_MAKE_MEM_DEFINED(pub_ptr, pub_len); ERL_VALGRIND_MAKE_MEM_DEFINED(prv_ptr, prv_len); ret = enif_make_tuple2(env, ret_pub, ret_prv); @@ -3062,21 +3090,33 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ else { ret = atom_error; } + DH_free(dh_params); +#ifdef HAS_EVP_PKEY_CTX + if (ctx) EVP_PKEY_CTX_free(ctx); + /* if (dhkey) EVP_PKEY_free(dhkey); */ + /* if (params) EVP_PKEY_free(params); */ +#endif return ret; } static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */ - DH* dh_params; - BIGNUM *dummy_pub_key = NULL, *priv_key = NULL; - BIGNUM *other_pub_key; - BIGNUM *dh_p = NULL, *dh_g = NULL; - int i; + BIGNUM *dummy_pub_key = NULL, + *priv_key = NULL, + *other_pub_key = NULL, + *dh_p = NULL, + *dh_g = NULL; ErlNifBinary ret_bin; ERL_NIF_TERM ret, head, tail; - - dh_params = DH_new(); + DH *dh_priv = DH_new(), *dh_pub = DH_new(); +#ifdef HAS_EVP_PKEY_CTX + EVP_PKEY_CTX *ctx = NULL; + EVP_PKEY *my_priv_key = NULL, *peer_pub_key = NULL; + size_t skeylen; +#else + int i; +#endif if (!get_bn_from_bin(env, argv[0], &other_pub_key) || !get_bn_from_bin(env, argv[1], &priv_key) @@ -3084,35 +3124,78 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T || !get_bn_from_bin(env, head, &dh_p) || !enif_get_list_cell(env, tail, &head, &tail) || !get_bn_from_bin(env, head, &dh_g) - || !enif_is_empty_list(env, tail)) { + || !enif_is_empty_list(env, tail) + + /* Note: DH_set0_key() does not allow setting only the + * private key, although DH_compute_key() does not use the + * public key. Work around this limitation by setting + * the public key to a copy of the private key. + */ + || !(dummy_pub_key = BN_dup(priv_key)) + || !DH_set0_key(dh_priv, dummy_pub_key, priv_key) + || !DH_set0_pqg(dh_priv, dh_p, NULL, dh_g) + ) { if (dh_p) BN_free(dh_p); if (dh_g) BN_free(dh_g); - ret = enif_make_badarg(env); + if (other_pub_key) BN_free(other_pub_key); + if (dummy_pub_key) BN_free(dummy_pub_key); + if (priv_key) BN_free(priv_key); + return enif_make_badarg(env); + } + +#ifdef HAS_EVP_PKEY_CTX + if (!(my_priv_key = EVP_PKEY_new()) + || !EVP_PKEY_set1_DH(my_priv_key, dh_priv) /* set the key referenced by my_priv_key to dh_priv. + dh_priv (and my_priv_key) must be freed by us*/ + + || !(peer_pub_key = EVP_PKEY_new()) + || !DH_set0_key(dh_pub, other_pub_key, NULL) + || !DH_set0_pqg(dh_pub, dh_p, NULL, dh_g) + || !EVP_PKEY_set1_DH(peer_pub_key, dh_pub) + + || !(ctx = EVP_PKEY_CTX_new(my_priv_key, NULL)) + || (EVP_PKEY_derive_init(ctx) <= 0) + || (EVP_PKEY_derive_set_peer(ctx, peer_pub_key) <= 0) + || (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0)) { + + ret = atom_error; } else { - /* Note: DH_set0_key() does not allow setting only the - * private key, although DH_compute_key() does not use the - * public key. Work around this limitation by setting - * the public key to a copy of the private key. - */ - dummy_pub_key = BN_dup(priv_key); - DH_set0_key(dh_params, dummy_pub_key, priv_key); - DH_set0_pqg(dh_params, dh_p, NULL, dh_g); - enif_alloc_binary(DH_size(dh_params), &ret_bin); - i = DH_compute_key(ret_bin.data, other_pub_key, dh_params); - if (i > 0) { - if (i != ret_bin.size) { - enif_realloc_binary(&ret_bin, i); - } - ret = enif_make_binary(env, &ret_bin); - } - else { + enif_alloc_binary(skeylen, &ret_bin); + + if ((EVP_PKEY_derive(ctx, ret_bin.data, &skeylen) > 0) + && (ret_bin.size >= skeylen)) { + /* Derivation succeded */ + if (ret_bin.size > skeylen) enif_realloc_binary(&ret_bin, skeylen); + ret = enif_make_binary(env, &ret_bin); + } + else { enif_release_binary(&ret_bin); - ret = atom_error; - } + ret = atom_error; + } } + +#else + enif_alloc_binary(DH_size(dh_priv), &ret_bin); + i = DH_compute_key(ret_bin.data, other_pub_key, dh_priv); + if (i > 0) { + if (i != ret_bin.size) enif_realloc_binary(&ret_bin, i); + ret = enif_make_binary(env, &ret_bin); + } + else { + enif_release_binary(&ret_bin); + ret = atom_error; + } +#endif + if (other_pub_key) BN_free(other_pub_key); - DH_free(dh_params); + if (dh_priv) DH_free(dh_priv); + if (dh_pub) DH_free(dh_pub); +#ifdef HAS_EVP_PKEY_CTX + if (ctx) EVP_PKEY_CTX_free(ctx); + /* if (my_priv_key) EVP_PKEY_free(my_priv_key); */ + /* if (peer_pub_key) EVP_PKEY_free(peer_pub_key); */ +#endif return ret; } -- cgit v1.2.3 From 93ac4697e3289f0fd1623a4b44b312f5196d91c5 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 26 Mar 2018 13:49:01 +0200 Subject: crypto: Test case with a failing Pub/Priv/P/G combination This quadruple is from a failing test when trying to EVP-ify the dh functions. --- lib/crypto/test/crypto_SUITE.erl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 6dab459df6..d148fa3856 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -131,7 +131,8 @@ groups() -> {ecdsa, [], [sign_verify %% Does not work yet: ,public_encrypt, private_encrypt ]}, - {dh, [], [generate_compute]}, + {dh, [], [generate_compute, + compute_bug]}, {ecdh, [], [compute, generate]}, {srp, [], [generate_compute]}, {des_cbc, [], [block]}, @@ -463,6 +464,24 @@ generate_compute(Config) when is_list(Config) -> GenCom = proplists:get_value(generate_compute, Config), lists:foreach(fun do_generate_compute/1, GenCom). %%-------------------------------------------------------------------- +compute_bug() -> + [{doc, "Test that it works even if the Secret is smaller than expected"}]. +compute_bug(Config) -> + ExpectedSecret = <<118,89,171,16,156,18,156,103,189,134,130,49,28,144,111,241,247,82,79,32,228,11,209,141,119,176,251,80,105,143,235,251,203,121,223,211,129,3,233,133,45,2,31,157,24,111,5,75,153,66,135,185,128,115,229,178,216,39,73,52,80,151,8,241,34,52,226,71,137,167,53,48,59,224,175,154,89,110,76,83,24,117,149,21,72,6,186,78,149,74,188,56,98,244,30,77,108,248,88,194,195,237,23,51,20,242,254,123,21,12,209,74,217,168,230,65,7,60,211,139,128,239,234,153,22,229,180,59,159,121,41,156,121,200,177,130,163,162,54,224,93,1,94,11,177,254,118,28,156,26,116,10,207,145,219,166,214,189,214,230,221,170,228,15,69,88,31,68,94,255,113,58,49,82,86,192,248,176,131,133,39,186,194,172,206,84,184,16,66,68,153,128,178,227,27,118,52,130,122,92,24,222,102,195,221,207,255,13,152,175,65,32,167,84,54,244,243,109,244,18,234,16,159,224,188,2,106,123,27,17,131,171,226,34,111,251,62,119,155,124,221,124,254,62,97,167,1,105,116,98,98,19,197,30,72,180,79,221,100,134,120,117,124,85,73,132,224,223,222,41,155,137,218,130,238,237,157,161,134,150,69,206,91,141,17,89,120,218,235,229,37,150,76,197,7,157,56,144,42,203,137,100,200,72,141,194,239,1,67,236,238,183,48,214,75,76,108,235,3,237,67,40,137,45,182,236,246,37,116,103,144,237,142,211,88,233,11,24,21,218,41,245,250,51,130,250,104,74,189,17,69,145,70,50,50,215,253,155,10,128,41,114,185,211,82,164,72,92,17,145,104,66,6,140,226,80,43,62,1,166,216,153,118,96,15,147,126,137,118,191,192,75,149,241,206,18,92,17,154,215,219,18,6,139,190,103,210,156,184,29,224,213,157,60,112,189,104,220,125,40,186,50,119,17,143,136,149,38,74,107,21,192,59,61,59,42,231,144,59,175,3,176,87,23,16,122,54,31,82,34,230,211,44,81,41,47,86,37,228,175,130,148,88,136,131,254,241,202,99,199,175,1,141,215,124,155,120,43,141,89,11,140,120,141,29,35,82,219,155,204,75,12,66,241,253,33,250,84,24,85,68,13,80,85,142,227,34,139,26,146,24>>, + OthersPublicKey = 635619632099733175381667940709387641100492974601603060984753028943194386334921787463327680809776598322996634648015962954045728174069768874873236397421720142610982770302060309928552098274817978606093380781524199673890631795310930242601197479471368910519338301177304682162189801040921618559902948819107531088646753320486728060005223263561551402855338732899079439899705951063999951507319258050864346087428042978411873495523439615429804957374639092580169417598963105885529553632847023899713490485619763926900318508906706745060947269748612049634207985438016935262521715769812475329234748426647554362991758104620357149045960316987533503707855364806010494793980069245562784050236811004893018183726397041999426883788660276453352521120006817370050691205529335316794439089316232980047277245051173281601960196573681285904611182521967067911862467395705665888521948321299521549941618586026714676885890192323289343756440666276226084448279082483536164085883288884231665240707495770544705648564889889198060417915693315346959170105413290799314390963124178046425737828369059171472978294050322371452255088799865552038756937873388385970088906560408959959429398326288750834357514847891423941047433478384621074116184703014798814515161475596555032391555842, + MyPrivateKey = 387759582879975726965038486537011291913744975764132199838375902680222019267527675651273586836110220500657652661706223760165097275862806031329642160439090779625708664007910974206651834216043397115514725827856461492311499129200688538220719685637154290305617686974719521885238198226075381217068175824097878445476010193039590876624464274744156624589136789060427283492343902761765833713520850870233407503430180028104167029073459918756981323130062648615262139444306321256382009848217866984408901761817655567071716275177768316006340055589170095799943481591033461616307776069027985761229636731465482676467627154100912586936231051371168178564599296638350391246393336702334311781595616786107810962134407697848002331639021101685320844880636050048769216986088652236979636019052557155807310341483407890060105599892252118584570558049301477535792498672552850760356632076013402382600669875697284264329434950712239302528367835155163504374877787288116104285944993818319105835423479332617802010952731990182088670508346704423006877514817882782443833997288652405892920173712497948376815825396272381214976859009518623799156300136570204539240675245115597412280078940442452936425561984312708387584800789375684525365060589104566195610526570099527133097201479, + P = 818034524162384276004384029858643530286875094391273833506734966261806257117433972760379103507630310628953496150318170372254219924175532996281953750642804369831900894594960807970232131410638888573275563720690293481410915588408505771183615664441221559618326229227448328879290185035795866796496147000467456347856187771645103733376761936369144682074588463621004219054111244232031965820058057143484947957179035662640791007685559024477920075136419228662974090561346329074935312181886940693299380892129818458511403741106419480550004799657220331973244248753744516935739033770420884365608406478656143540532371463443324228730693491647103274058971797182813283112583029849186056551355376851686616057869624968077484471229044125401535456699914745876082047459812392122562460031611344154642406382436701361983114768023990405077450124649862159757605118611426368650203370143674925598905779061402007525955196464201496773278952462368223659263492419274489020447849336502432222101793313731259141617677580646998184158969477474527427664187763741360356528830301163614618231141541403007931347398186427059736520580903587497382362610721261644208653717495736748724114113311672504064943864203789205551568648546606356374830209356446449765364678719909024329058480379, + G = 2, + DHParameters = [P, G], + case crypto:compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) of + ExpectedSecret -> + ok; + Others -> + ct:log("Got ~p",[Others]), + {fail, "crypto:compute_key(dh,...) failed for the bug test"} + end. + +%%-------------------------------------------------------------------- no_generate_compute() -> [{doc, "Test crypto:genarate_key and crypto:compute_key " "for disabled algorithms"}]. -- cgit v1.2.3 From 495d56f879be31be660961393ece4d3b9103a09a Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Wed, 4 Apr 2018 14:40:46 +0200 Subject: [crypto] Skip test cases for specific ssl version on old machine Skip the test cases in the engine_SUITE on a specific ssl version used on one test machine. --- lib/crypto/test/engine_SUITE.erl | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index f410542f72..3f176f165d 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -70,19 +70,21 @@ groups() -> init_per_suite(Config) -> - try crypto:start() of - ok -> - case crypto:info_lib() of - [{_,_, <<"OpenSSL 1.0.1s-freebsd 1 Mar 2016">>}] -> - {skip, "Problem with engine on OpenSSL 1.0.1s-freebsd"}; - _ -> + case crypto:info_lib() of + [{_,_, <<"OpenSSL 1.0.1s-freebsd 1 Mar 2016">>}] -> + {skip, "Problem with engine on OpenSSL 1.0.1s-freebsd"}; + Res -> + ct:log("crypto:info_lib() -> ~p\n", [Res]), + try crypto:start() of + ok -> + Config; + {error,{already_started,crypto}} -> Config - end; - {error,{already_started,crypto}} -> - Config - catch _:_ -> - {skip, "Crypto did not start"} + catch _:_ -> + {skip, "Crypto did not start"} + end end. + end_per_suite(_Config) -> ok. -- cgit v1.2.3 From 345f7f527a4c26ef49cef0d81e2c8b71bf01ebc3 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 30 Apr 2018 10:03:17 +0200 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 3432f00836..cc34c20ac6 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.1 +CRYPTO_VSN = 4.3 -- cgit v1.2.3 From 202bb737e3deabfebee683266f4b7c42781eb521 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 30 Apr 2018 10:06:42 +0200 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 1f788a4e35..bad78a9113 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,45 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3 + +
Fixed Bugs and Malfunctions + + +

+ Removed two undocumented and erroneous functions + (crypto:dh_generate_parameters/2 and + crypto:dh_check/1).

+

+ Own Id: OTP-14956 Aux Id: ERL-579

+
+
+
+ + +
Improvements and New Features + + +

+ A new rand plugin algorithm has been implemented + in crypto, that is: crypto_cache. It uses + strong random bytes as randomness source and caches them + to get good speed. See crypto:rand_seed_alg/1.

+

+ Own Id: OTP-13370 Aux Id: PR-1573

+
+ +

+ Diffie-Hellman key functions are re-written with the + EVP_PKEY api.

+

+ Own Id: OTP-14864

+
+
+
+ +
+
Crypto 4.2.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From ff819e79274c4638c9c9cf77ba4f45f24a0a2ab0 Mon Sep 17 00:00:00 2001 From: Henrik Date: Wed, 2 May 2018 09:18:58 +0200 Subject: Revert "Update version numbers" This reverts commit 345f7f527a4c26ef49cef0d81e2c8b71bf01ebc3. --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index cc34c20ac6..3432f00836 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3 +CRYPTO_VSN = 4.2.1 -- cgit v1.2.3 From 561e871d680a081d531ff205b8331eacca1d7a3c Mon Sep 17 00:00:00 2001 From: Henrik Date: Wed, 2 May 2018 09:19:05 +0200 Subject: Revert "Update release notes" This reverts commit 202bb737e3deabfebee683266f4b7c42781eb521. --- lib/crypto/doc/src/notes.xml | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index bad78a9113..1f788a4e35 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,45 +31,6 @@

This document describes the changes made to the Crypto application.

-
Crypto 4.3 - -
Fixed Bugs and Malfunctions - - -

- Removed two undocumented and erroneous functions - (crypto:dh_generate_parameters/2 and - crypto:dh_check/1).

-

- Own Id: OTP-14956 Aux Id: ERL-579

-
-
-
- - -
Improvements and New Features - - -

- A new rand plugin algorithm has been implemented - in crypto, that is: crypto_cache. It uses - strong random bytes as randomness source and caches them - to get good speed. See crypto:rand_seed_alg/1.

-

- Own Id: OTP-13370 Aux Id: PR-1573

-
- -

- Diffie-Hellman key functions are re-written with the - EVP_PKEY api.

-

- Own Id: OTP-14864

-
-
-
- -
-
Crypto 4.2.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 0c0054aabef5a76e32957dbfa583cabeb051a8d0 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 4 May 2018 12:16:03 +0200 Subject: crypto: disable engine if OPENSSL_NO_EC* is set If that flag is set, and openssl/engine.h is included, there will be an erro further down in files included by engine.h --- lib/crypto/c_src/crypto.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 9a3ea07c97..7e02e6c15c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -60,7 +60,6 @@ #include #include #include -#include #include /* Helper macro to construct a OPENSSL_VERSION_NUMBER. @@ -121,10 +120,6 @@ #include #endif -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') -#define HAS_ENGINE_SUPPORT -#endif - #include "crypto_callback.h" #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \ @@ -185,6 +180,19 @@ # undef HAVE_RSA_SSLV23_PADDING #endif +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') \ + && defined(HAVE_EC) +/* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h + So if EC is disabled, you can't use Engine either.... +*/ +# define HAS_ENGINE_SUPPORT +#endif + + +#if defined(HAS_ENGINE_SUPPORT) +# include +#endif + #if defined(HAVE_CMAC) #include #endif -- cgit v1.2.3 From cb1a8a13adcf53ff08a9ea7023b24c760885f7d4 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 4 May 2018 12:17:30 +0200 Subject: crypto: Disable test_engine if engine is disabled --- lib/crypto/c_src/otp_test_engine.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index 5c6122c06a..d0e23a2a3e 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -24,10 +24,8 @@ #include #include -#include #include #include -#include #define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \ ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf) @@ -40,6 +38,21 @@ #define OLD #endif +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \ + && !defined(OPENSSL_NO_EC) \ + && !defined(OPENSSL_NO_ECDH) \ + && !defined(OPENSSL_NO_ECDSA) +# define HAVE_EC +#endif + +#if defined(HAVE_EC) +/* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h + So if EC is disabled, you can't use Engine either.... +*/ +#include +#include + + static const char *test_engine_id = "MD5"; static const char *test_engine_name = "MD5 test engine"; @@ -262,3 +275,5 @@ int pem_passwd_cb_fun(char *buf, int size, int rwflag, void *password) return 0; } } + +#endif -- cgit v1.2.3 From 7f58c389fe626389e0a2c572dbe930e86694b257 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 3 May 2018 16:52:45 +0200 Subject: crypto: Fix compilation for LibreSSL 2.7.x --- lib/crypto/c_src/crypto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 9a3ea07c97..4e045179a1 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -102,8 +102,10 @@ # undef FIPS_SUPPORT # endif +# if LIBRESSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(2,7,0) /* LibreSSL wants the 1.0.1 API */ # define NEED_EVP_COMPATIBILITY_FUNCTIONS +# endif #endif @@ -112,8 +114,10 @@ #endif -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) -# define HAS_EVP_PKEY_CTX +#ifndef HAS_LIBRESSL +# if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +# define HAS_EVP_PKEY_CTX +# endif #endif -- cgit v1.2.3 From d5510298be8fa0a9b841b17581581e99769b3bc3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 4 May 2018 12:59:04 +0200 Subject: crypto: get_engine_load_cmd_list excluded if no engine support --- lib/crypto/c_src/crypto.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 4e045179a1..00292c795d 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -506,7 +506,6 @@ static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_N static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, char **cmds, int i); static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_finish_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -534,6 +533,7 @@ static int term2point(ErlNifEnv* env, ERL_NIF_TERM term, static ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn); #ifdef HAS_ENGINE_SUPPORT +static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, char **cmds, int i); static int zero_terminate(ErlNifBinary bin, char **buf); #endif @@ -5396,9 +5396,9 @@ static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE #endif } +#ifdef HAS_ENGINE_SUPPORT static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, char **cmds, int i) { -#ifdef HAS_ENGINE_SUPPORT ERL_NIF_TERM head, tail; const ERL_NIF_TERM *tmp_tuple; ErlNifBinary tmpbin; @@ -5443,10 +5443,8 @@ static int get_engine_load_cmd_list(ErlNifEnv* env, const ERL_NIF_TERM term, cha cmds[i] = NULL; return 0; } -#else - return atom_notsup; -#endif } +#endif static ERL_NIF_TERM engine_get_all_methods_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* () */ -- cgit v1.2.3 From fb7a6857c0b35da88548c05910f34be813d1d81d Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 7 May 2018 12:49:59 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 22 ++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 1f788a4e35..66619c9e11 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,28 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.2.2 + +
Fixed Bugs and Malfunctions + + +

+ If OPENSSL_NO_EC was set, the compilation of the crypto + nifs failed.

+

+ Own Id: OTP-15073

+
+ +

+ C-compile errors for LibreSSL 2.7.0 - 2.7.2 fixed

+

+ Own Id: OTP-15074 Aux Id: ERL-618

+
+
+
+ +
+
Crypto 4.2.1
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 3432f00836..778aff9d13 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.1 +CRYPTO_VSN = 4.2.2 -- cgit v1.2.3 From 4b8a81dd49fbeda8f2da118d43f3690a61f2283a Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 17 May 2018 18:46:41 +0200 Subject: crypto: Fix upgrade bug when engine support is missing library_refc was not checked causing crash when init_digest_types() was called a second time. --- lib/crypto/c_src/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6957d25774..9e7e1e81ae 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -989,6 +989,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) PRINTF_ERR0("CRYPTO: Could not open resource type 'ENGINE_CTX'"); return __LINE__; } +#endif if (library_refc > 0) { /* Repeated loading of this library (module upgrade). @@ -996,7 +997,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) */ return 0; } -#endif atom_true = enif_make_atom(env,"true"); atom_false = enif_make_atom(env,"false"); -- cgit v1.2.3 From 93b48f41103a7491ae1c6955ff5ceb5ee15ee666 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 17 May 2018 19:29:45 +0200 Subject: crypto: Robustify the do-once-initialization Introduce boolean 'library_initialized' that is set once and never cleared as that is how initialization must be done. Kept 'library_refc' as it may be interesting for debugging. Moved the three init_*_types() functions last as those must only be called once and there were error cases bailing out after them. --- lib/crypto/c_src/crypto.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 9e7e1e81ae..5f10e93728 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -528,6 +528,7 @@ static int zero_terminate(ErlNifBinary bin, char **buf); #endif static int library_refc = 0; /* number of users of this dynamic library */ +static int library_initialized = 0; static ErlNifFunc nif_funcs[] = { {"info_lib", 0, info_lib}, @@ -991,7 +992,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) } #endif - if (library_refc > 0) { + if (library_initialized) { /* Repeated loading of this library (module upgrade). * Atoms and callbacks are already set, we are done. */ @@ -1101,10 +1102,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_password = enif_make_atom(env,"password"); #endif - init_digest_types(env); - init_cipher_types(env); - init_algorithms_types(env); - #ifdef HAVE_DYNAMIC_CRYPTO_LIB { void* handle; @@ -1150,6 +1147,11 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) } #endif /* OPENSSL_THREADS */ + init_digest_types(env); + init_cipher_types(env); + init_algorithms_types(env); + + library_initialized = 1; return 0; } -- cgit v1.2.3 From fd8e49b5bddceaae803670121b603b5eee8c5c08 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 25 May 2018 12:14:27 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 47 ++++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 66619c9e11..a6a1287a85 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,53 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3 + +
Fixed Bugs and Malfunctions + + +

+ Removed two undocumented and erroneous functions + (crypto:dh_generate_parameters/2 and + crypto:dh_check/1).

+

+ Own Id: OTP-14956 Aux Id: ERL-579

+
+ +

+ Fixed bug causing VM crash if doing runtime upgrade of a + crypto module built against OpenSSL older than 0.9.8h. + Bug exists since OTP-20.2.

+

+ Own Id: OTP-15088

+
+
+
+ + +
Improvements and New Features + + +

+ A new rand plugin algorithm has been implemented + in crypto, that is: crypto_cache. It uses + strong random bytes as randomness source and caches them + to get good speed. See crypto:rand_seed_alg/1.

+

+ Own Id: OTP-13370 Aux Id: PR-1573

+
+ +

+ Diffie-Hellman key functions are re-written with the + EVP_PKEY api.

+

+ Own Id: OTP-14864

+
+
+
+ +
+
Crypto 4.2.2
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 778aff9d13..cc34c20ac6 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.2 +CRYPTO_VSN = 4.3 -- cgit v1.2.3 From b9faca269de1de51ae33577cc204befbea24243c Mon Sep 17 00:00:00 2001 From: Henrik Date: Tue, 29 May 2018 10:47:25 +0200 Subject: Revert "Prepare release" This reverts commit fd8e49b5bddceaae803670121b603b5eee8c5c08. --- lib/crypto/doc/src/notes.xml | 47 -------------------------------------------- lib/crypto/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 48 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index a6a1287a85..66619c9e11 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,53 +31,6 @@

This document describes the changes made to the Crypto application.

-
Crypto 4.3 - -
Fixed Bugs and Malfunctions - - -

- Removed two undocumented and erroneous functions - (crypto:dh_generate_parameters/2 and - crypto:dh_check/1).

-

- Own Id: OTP-14956 Aux Id: ERL-579

-
- -

- Fixed bug causing VM crash if doing runtime upgrade of a - crypto module built against OpenSSL older than 0.9.8h. - Bug exists since OTP-20.2.

-

- Own Id: OTP-15088

-
-
-
- - -
Improvements and New Features - - -

- A new rand plugin algorithm has been implemented - in crypto, that is: crypto_cache. It uses - strong random bytes as randomness source and caches them - to get good speed. See crypto:rand_seed_alg/1.

-

- Own Id: OTP-13370 Aux Id: PR-1573

-
- -

- Diffie-Hellman key functions are re-written with the - EVP_PKEY api.

-

- Own Id: OTP-14864

-
-
-
- -
-
Crypto 4.2.2
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index cc34c20ac6..778aff9d13 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3 +CRYPTO_VSN = 4.2.2 -- cgit v1.2.3 From a9c7e47957c77b74f2b2261ad79a4f0f257dfbf7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 7 May 2018 14:00:38 +0200 Subject: crypto: Valgrind suggestions --- lib/crypto/c_src/crypto.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6e113ef39e..2c69dbb5ff 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3071,10 +3071,11 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ if ((dhkey = EVP_PKEY_new()) && (params = EVP_PKEY_new()) && EVP_PKEY_set1_DH(params, dh_params) /* set the key referenced by params to dh_params. - dh_params (and params) must be freed by us*/ + dh_params (and params) must be freed */ && (ctx = EVP_PKEY_CTX_new(params, NULL)) && EVP_PKEY_keygen_init(ctx) - && EVP_PKEY_keygen(ctx, &dhkey) + && EVP_PKEY_keygen(ctx, &dhkey) /* "performs a key generation operation, the + generated key is written to ppkey." (=last arg) */ && (dh_params = EVP_PKEY_get1_DH(dhkey)) /* return the referenced key. dh_params and dhkey must be freed */ ) { #else @@ -3108,8 +3109,8 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ DH_free(dh_params); #ifdef HAS_EVP_PKEY_CTX if (ctx) EVP_PKEY_CTX_free(ctx); - /* if (dhkey) EVP_PKEY_free(dhkey); */ - /* if (params) EVP_PKEY_free(params); */ + if (dhkey) EVP_PKEY_free(dhkey); + if (params) EVP_PKEY_free(params); #endif return ret; } @@ -3207,7 +3208,7 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T if (dh_pub) DH_free(dh_pub); #ifdef HAS_EVP_PKEY_CTX if (ctx) EVP_PKEY_CTX_free(ctx); - /* if (my_priv_key) EVP_PKEY_free(my_priv_key); */ + if (my_priv_key) EVP_PKEY_free(my_priv_key); /* if (peer_pub_key) EVP_PKEY_free(peer_pub_key); */ #endif return ret; -- cgit v1.2.3 From fc7ae23305a2de8ebb27e0ce723c4b3a71c9d4fc Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 25 May 2018 10:21:35 +0200 Subject: crypto: Extend crypto:supports with 'curves' "curves" in crypto:supports returns list of actually supported ec_curves --- lib/crypto/c_src/crypto.c | 22 +++++++++++++++++++--- lib/crypto/src/crypto.erl | 5 +++-- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 2c69dbb5ff..01e77700a9 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1120,6 +1120,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_password = enif_make_atom(env,"password"); #endif + #ifdef HAVE_DYNAMIC_CRYPTO_LIB { void* handle; @@ -1216,6 +1217,8 @@ static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ static int algo_mac_cnt, algo_mac_fips_cnt; static ERL_NIF_TERM algo_mac[2]; /* increase when extending the list */ +static int algo_curve_cnt, algo_curve_fips_cnt; +static ERL_NIF_TERM algo_curve[87]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { @@ -1308,10 +1311,19 @@ static void init_algorithms_types(ErlNifEnv* env) // Non-validated algorithms follow algo_mac_fips_cnt = algo_mac_cnt; + + // Validated algorithms first + algo_curve_cnt = 0; + // Non-validated algorithms follow + algo_curve_fips_cnt = algo_curve_cnt; + //-- + + // Check that the max number of algos is updated ASSERT(algo_hash_cnt <= sizeof(algo_hash)/sizeof(ERL_NIF_TERM)); ASSERT(algo_pubkey_cnt <= sizeof(algo_pubkey)/sizeof(ERL_NIF_TERM)); ASSERT(algo_cipher_cnt <= sizeof(algo_cipher)/sizeof(ERL_NIF_TERM)); ASSERT(algo_mac_cnt <= sizeof(algo_mac)/sizeof(ERL_NIF_TERM)); + ASSERT(algo_curve_cnt <= sizeof(algo_curve)/sizeof(ERL_NIF_TERM)); } static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) @@ -1322,17 +1334,20 @@ static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv int pubkey_cnt = fips_mode ? algo_pubkey_fips_cnt : algo_pubkey_cnt; int cipher_cnt = fips_mode ? algo_cipher_fips_cnt : algo_cipher_cnt; int mac_cnt = fips_mode ? algo_mac_fips_cnt : algo_mac_cnt; + int curve_cnt = fips_mode ? algo_curve_fips_cnt : algo_curve_cnt; #else int hash_cnt = algo_hash_cnt; int pubkey_cnt = algo_pubkey_cnt; int cipher_cnt = algo_cipher_cnt; int mac_cnt = algo_mac_cnt; + int curve_cnt = algo_curve_cnt; #endif - return enif_make_tuple4(env, - enif_make_list_from_array(env, algo_hash, hash_cnt), + return enif_make_tuple5(env, + enif_make_list_from_array(env, algo_hash, hash_cnt), enif_make_list_from_array(env, algo_pubkey, pubkey_cnt), enif_make_list_from_array(env, algo_cipher, cipher_cnt), - enif_make_list_from_array(env, algo_mac, mac_cnt) + enif_make_list_from_array(env, algo_mac, mac_cnt), + enif_make_list_from_array(env, algo_curve, curve_cnt) ); } @@ -1753,6 +1768,7 @@ static ERL_NIF_TERM hash_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM } #endif /* OPENSSL_VERSION_NUMBER < 1.0 */ + static ERL_NIF_TERM hmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Key, Data) or (Type, Key, Data, MacSize) */ struct digest_type_t *digp = NULL; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 46775989ae..6cff8a487a 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -107,12 +107,13 @@ stop() -> application:stop(crypto). supports()-> - {Hashs, PubKeys, Ciphers, Macs} = algorithms(), + {Hashs, PubKeys, Ciphers, Macs, Curves} = algorithms(), [{hashs, Hashs}, {ciphers, Ciphers}, {public_keys, PubKeys}, - {macs, Macs} + {macs, Macs}, + {curves, Curves} ]. info_lib() -> ?nif_stub. -- cgit v1.2.3 From af11bc83244f67b9ed1fe1b75d951daadc370219 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 5 Jun 2018 17:37:41 +0200 Subject: crypto: Make 'curve' entry in crypto:supports() appear iff Curves is non-empty --- lib/crypto/src/crypto.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 6cff8a487a..37c3e557a4 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -112,8 +112,13 @@ supports()-> [{hashs, Hashs}, {ciphers, Ciphers}, {public_keys, PubKeys}, - {macs, Macs}, - {curves, Curves} + {macs, Macs} + | case Curves of + [] -> []; + _ -> [{curves, Curves}] % Only show this experimental feature + % if OpenSSL 1.1.1 beta4 or higher (where + % eddsa and eddh is enabled) + end ]. info_lib() -> ?nif_stub. -- cgit v1.2.3 From 0ccdbaca9ab7a7965cc8ff358f1364cbde67854e Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 25 May 2018 14:08:01 +0200 Subject: crypto: Add experimental x25519 and x448 Not to be used. Uses not yet released functions in OpenSSL 1.1.1-pre8-dev --- lib/crypto/c_src/crypto.c | 155 +++++++++++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 22 ++++++- 2 files changed, 174 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 01e77700a9..e4eb2bc3b6 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -155,6 +155,14 @@ # define HAVE_EC #endif +// (test for == 1.1.1pre8) +#if OPENSSL_VERSION_NUMBER == (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) - 7) \ + && !defined(HAS_LIBRESSL) \ + && defined(HAVE_EC) +// EXPERIMENTAL: +# define HAVE_EDDH +#endif + #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'c') # define HAVE_AES_IGE #endif @@ -501,6 +509,9 @@ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -581,6 +592,10 @@ static ErlNifFunc nif_funcs[] = { {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, + + {"evp_compute_key_nif", 3, evp_compute_key_nif}, + {"evp_generate_key_nif", 1, evp_generate_key_nif}, + {"privkey_to_pubkey_nif", 2, privkey_to_pubkey_nif}, {"srp_value_B_nif", 5, srp_value_B_nif}, {"srp_user_secret_nif", 7, srp_user_secret_nif}, @@ -668,6 +683,13 @@ static ERL_NIF_TERM atom_blowfish_ecb; static ERL_NIF_TERM atom_rsa; static ERL_NIF_TERM atom_dss; static ERL_NIF_TERM atom_ecdsa; + +#ifdef HAVE_EDDH +static ERL_NIF_TERM atom_eddh; +static ERL_NIF_TERM atom_x25519; +static ERL_NIF_TERM atom_x448; +#endif + static ERL_NIF_TERM atom_rsa_mgf1_md; static ERL_NIF_TERM atom_rsa_oaep_label; static ERL_NIF_TERM atom_rsa_oaep_md; @@ -1075,6 +1097,11 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_rsa = enif_make_atom(env,"rsa"); atom_dss = enif_make_atom(env,"dss"); atom_ecdsa = enif_make_atom(env,"ecdsa"); +#ifdef HAVE_EDDH + atom_eddh = enif_make_atom(env,"eddh"); + atom_x25519 = enif_make_atom(env,"x25519"); + atom_x448 = enif_make_atom(env,"x448"); +#endif atom_rsa_mgf1_md = enif_make_atom(env,"rsa_mgf1_md"); atom_rsa_oaep_label = enif_make_atom(env,"rsa_oaep_label"); atom_rsa_oaep_md = enif_make_atom(env,"rsa_oaep_md"); @@ -1212,7 +1239,7 @@ static void unload(ErlNifEnv* env, void* priv_data) static int algo_hash_cnt, algo_hash_fips_cnt; static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; -static ERL_NIF_TERM algo_pubkey[7]; /* increase when extending the list */ +static ERL_NIF_TERM algo_pubkey[11]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ static int algo_mac_cnt, algo_mac_fips_cnt; @@ -1256,6 +1283,9 @@ static void init_algorithms_types(ErlNifEnv* env) #endif // Non-validated algorithms follow algo_pubkey_fips_cnt = algo_pubkey_cnt; +#ifdef HAVE_EDDH + algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "eddh"); +#endif algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "srp"); // Validated algorithms first @@ -1317,7 +1347,11 @@ static void init_algorithms_types(ErlNifEnv* env) // Non-validated algorithms follow algo_curve_fips_cnt = algo_curve_cnt; //-- - +#ifdef HAVE_EDDH + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x25519"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x448"); +#endif + // Check that the max number of algos is updated ASSERT(algo_hash_cnt <= sizeof(algo_hash)/sizeof(ERL_NIF_TERM)); ASSERT(algo_pubkey_cnt <= sizeof(algo_pubkey)/sizeof(ERL_NIF_TERM)); @@ -3834,6 +3868,123 @@ out_err: #endif } +// EXPERIMENTAL! +static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) + /* (Curve, PeerBin, MyBin) */ +{ +#ifdef HAVE_EDDH + int type; + EVP_PKEY_CTX *ctx; + ErlNifBinary peer_bin, my_bin, key_bin; + EVP_PKEY *peer_key, *my_key; + size_t max_size; + + if (argv[0] == atom_x25519) type = EVP_PKEY_X25519; + else if (argv[0] == atom_x448) type = EVP_PKEY_X448; + else return enif_make_badarg(env); + + if (!enif_inspect_binary(env, argv[1], &peer_bin) || + !enif_inspect_binary(env, argv[2], &my_bin)) { + return enif_make_badarg(env); + } + + if (!(my_key = EVP_PKEY_new_raw_private_key(type, NULL, my_bin.data, my_bin.size)) || + !(ctx = EVP_PKEY_CTX_new(my_key, NULL))) { + return enif_make_badarg(env); + } + + if (!EVP_PKEY_derive_init(ctx)) { + return enif_make_badarg(env); + } + + if (!(peer_key = EVP_PKEY_new_raw_public_key(type, NULL, peer_bin.data, peer_bin.size)) || + !EVP_PKEY_derive_set_peer(ctx, peer_key)) { + return enif_make_badarg(env); + } + + if (!EVP_PKEY_derive(ctx, NULL, &max_size)) { + return enif_make_badarg(env); + } + + if (!enif_alloc_binary(max_size, &key_bin) || + !EVP_PKEY_derive(ctx, key_bin.data, &key_bin.size)) { + return enif_make_badarg(env); + } + + if (key_bin.size < max_size) { + size_t actual_size = key_bin.size; + if (!enif_realloc_binary(&key_bin, actual_size)) { + return enif_make_badarg(env); + } + } + + return enif_make_binary(env, &key_bin); + +/* Importing the other side's public key from raw binary format can be done with the EVP_PKEY_new_raw_public_key() function. Man page here: */ +/* https://www.openssl.org/docs/man1.1.1/man3/EVP_PKEY_new_raw_public_key.html */ + + +/* You need two EVP_PKEY objects. One containing your private/public key pair (i.e. the one you generated in the EVP_PKEY_keygen() call in your question), and one containing the public key of the peer (e.g. created using EVP_PKEY_new_raw_public_key()). To generate the X25519 shared secret you then call EVP_PKEY_derive(). See the example on the man page: openssl.org/docs/man1.1.1/man3/EVP_PKEY_derive.html – Matt Caswell May 15 at 20:39 */ + +#else + return atom_notsup; +#endif +} + +// EXPERIMENTAL! +static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +/* (Curve) */ +{ +#ifdef HAVE_EDDH + int type; + EVP_PKEY_CTX *ctx; + EVP_PKEY *pkey = NULL; + ERL_NIF_TERM ret_pub, ret_prv; + size_t key_len; + + if (argv[0] == atom_x25519) type = EVP_PKEY_X25519; + else if (argv[0] == atom_x448) type = EVP_PKEY_X448; + else return enif_make_badarg(env); + + if (!(ctx = EVP_PKEY_CTX_new_id(type, NULL))) return enif_make_badarg(env); + + if (!EVP_PKEY_keygen_init(ctx)) return enif_make_atom(env,"EVP_PKEY_keygen_init failed"); + if (!EVP_PKEY_keygen(ctx, &pkey)) return enif_make_atom(env,"EVP_PKEY_keygen failed"); + + /* + int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len) + int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub, size_t *len) + + +EVP_PKEY_get_raw_private_key() fills the buffer provided by B with raw + +private key data. The number of bytes written is populated in B<*len>. If the + +buffer B is NULL then B<*len> is populated with the number of bytes + +required in the buffer. The calling application is responsible for ensuring that + +the buffer is large enough to receive the private key data. This function only + +works for algorithms that support raw private keys. Currently this is: + +B, B, B, B, + +B, B or B. + */ + + if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) + return enif_make_atom(env,"EVP_PKEY_get_raw_public_key 1 failed"); + if (!EVP_PKEY_get_raw_public_key(pkey, + enif_make_new_binary(env, key_len, &ret_pub), + &key_len)) + return enif_make_atom(env,"EVP_PKEY_get_raw_public_key 2 failed"); + + if (!EVP_PKEY_get_raw_private_key(pkey, NULL, &key_len)) + return enif_make_atom(env,"EVP_PKEY_get_raw_private_key 1 failed"); + if (!EVP_PKEY_get_raw_private_key(pkey, + enif_make_new_binary(env, key_len, &ret_prv), + &key_len)) + return enif_make_atom(env,"EVP_PKEY_get_raw_private_key 2 failed"); + + return enif_make_tuple2(env, ret_pub, ret_prv); +#else + return atom_notsup; +#endif +} + /*================================================================*/ #define PKEY_BADARG -1 #define PKEY_NOTSUP 0 diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 37c3e557a4..85b484011c 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -592,9 +592,18 @@ generate_key(rsa, {ModulusSize, PublicExponent}, undefined) -> {lists:sublist(Private, 2), Private} end; + +generate_key(ecdh, Curve, undefined) when Curve == x448 ; + Curve == x25519 -> + evp_generate_key_nif(Curve); generate_key(ecdh, Curve, PrivKey) -> ec_key_generate(nif_curve_params(Curve), ensure_int_as_bin(PrivKey)). + +evp_generate_key_nif(_Curve) -> ?nif_stub. + + + compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) -> case dh_compute_key_nif(ensure_int_as_bin(OthersPublicKey), ensure_int_as_bin(MyPrivateKey), @@ -634,11 +643,18 @@ compute_key(srp, UserPublic, {HostPublic, HostPrivate}, srp_host_secret_nif(Verifier, ensure_int_as_bin(HostPrivate), Scrambler, UserPubBin, Prime)); +compute_key(ecdh, Others, My, Curve) when Curve == x448 ; + Curve == x25519 -> + evp_compute_key_nif(Curve, ensure_int_as_bin(Others), ensure_int_as_bin(My)); + compute_key(ecdh, Others, My, Curve) -> ecdh_compute_key_nif(ensure_int_as_bin(Others), nif_curve_params(Curve), ensure_int_as_bin(My)). + +evp_compute_key_nif(_Curve, _OthersBin, _MyBin) -> ?nif_stub. + %%====================================================================== %% Engine functions %%====================================================================== @@ -1150,7 +1166,11 @@ nif_curve_params({PrimeField, Curve, BasePoint, Order, CoFactor}) -> {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), ensure_int_as_bin(Order), ensure_int_as_bin(CoFactor)}; nif_curve_params(Curve) when is_atom(Curve) -> %% named curve - crypto_ec_curves:curve(Curve). + case Curve of + x448 -> {evp,Curve}; + x25519 -> {evp,Curve}; + _ -> crypto_ec_curves:curve(Curve) + end. %% MISC -------------------------------------------------------------------- -- cgit v1.2.3 From 79c114b216d5d92380feea7ed6d9ec40f0b75444 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 12 Jun 2018 15:56:17 +0200 Subject: crypto: Remove comments --- lib/crypto/c_src/crypto.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index e4eb2bc3b6..ef7830262f 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3919,13 +3919,6 @@ static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ } return enif_make_binary(env, &key_bin); - -/* Importing the other side's public key from raw binary format can be done with the EVP_PKEY_new_raw_public_key() function. Man page here: */ -/* https://www.openssl.org/docs/man1.1.1/man3/EVP_PKEY_new_raw_public_key.html */ - - -/* You need two EVP_PKEY objects. One containing your private/public key pair (i.e. the one you generated in the EVP_PKEY_keygen() call in your question), and one containing the public key of the peer (e.g. created using EVP_PKEY_new_raw_public_key()). To generate the X25519 shared secret you then call EVP_PKEY_derive(). See the example on the man page: openssl.org/docs/man1.1.1/man3/EVP_PKEY_derive.html – Matt Caswell May 15 at 20:39 */ - #else return atom_notsup; #endif @@ -3951,20 +3944,6 @@ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF if (!EVP_PKEY_keygen_init(ctx)) return enif_make_atom(env,"EVP_PKEY_keygen_init failed"); if (!EVP_PKEY_keygen(ctx, &pkey)) return enif_make_atom(env,"EVP_PKEY_keygen failed"); - /* - int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len) - int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub, size_t *len) - - +EVP_PKEY_get_raw_private_key() fills the buffer provided by B with raw - +private key data. The number of bytes written is populated in B<*len>. If the - +buffer B is NULL then B<*len> is populated with the number of bytes - +required in the buffer. The calling application is responsible for ensuring that - +the buffer is large enough to receive the private key data. This function only - +works for algorithms that support raw private keys. Currently this is: - +B, B, B, B, - +B, B or B. - */ - if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) return enif_make_atom(env,"EVP_PKEY_get_raw_public_key 1 failed"); if (!EVP_PKEY_get_raw_public_key(pkey, -- cgit v1.2.3 From 4f5e7a82943eaca6453953cb028a9fb00c3c48a1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 11 Jun 2018 13:26:36 +0200 Subject: crypto: Try fix valgrind errors Re-structure dh_compute_key_nif and dh_generate_key_nif to see variable scoping and alloc/dealloc pairs better --- lib/crypto/c_src/crypto.c | 381 ++++++++++++++++++++++++++-------------------- 1 file changed, 219 insertions(+), 162 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ef7830262f..1c746b2ee1 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3068,202 +3068,259 @@ static ERL_NIF_TERM rsa_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrivKey|undefined, DHParams=[P,G], Mpint, Len|0) */ - DH* dh_params = NULL; - int pub_len, prv_len; - unsigned char *pub_ptr, *prv_ptr; - ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail; + DH *dh_params = NULL; int mpint; /* 0 or 4 */ - BIGNUM *priv_key_in = NULL; - BIGNUM *dh_p = NULL, *dh_g = NULL; - unsigned long len = 0; -#ifdef HAS_EVP_PKEY_CTX - EVP_PKEY_CTX *ctx = NULL; - EVP_PKEY *dhkey = NULL, - *params = NULL; -#endif - - if (!(get_bn_from_bin(env, argv[0], &priv_key_in) - || argv[0] == atom_undefined) - || !enif_get_list_cell(env, argv[1], &head, &tail) - || !get_bn_from_bin(env, head, &dh_p) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_g) - || !enif_is_empty_list(env, tail) - || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4) - || !enif_get_ulong(env, argv[3], &len) - - /* Load dh_params with values to use by the generator. - Mem mgmnt transfered from dh_p etc to dh_params */ - || !(dh_params = DH_new()) - || (priv_key_in && !DH_set0_key(dh_params, NULL, priv_key_in)) - || !DH_set0_pqg(dh_params, dh_p, NULL, dh_g) - ) { - if (priv_key_in) BN_free(priv_key_in); - if (dh_p) BN_free(dh_p); - if (dh_g) BN_free(dh_g); - if (dh_params) DH_free(dh_params); - return enif_make_badarg(env); - } - if (len) { - if (len < BN_num_bits(dh_p)) - DH_set_length(dh_params, len); - else { + { + ERL_NIF_TERM head, tail; + BIGNUM + *dh_p = NULL, + *dh_g = NULL, + *priv_key_in = NULL; + unsigned long + len = 0; + + if (!(get_bn_from_bin(env, argv[0], &priv_key_in) + || argv[0] == atom_undefined) + || !enif_get_list_cell(env, argv[1], &head, &tail) + || !get_bn_from_bin(env, head, &dh_p) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dh_g) + || !enif_is_empty_list(env, tail) + || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4) + || !enif_get_ulong(env, argv[3], &len) + + /* Load dh_params with values to use by the generator. + Mem mgmnt transfered from dh_p etc to dh_params */ + || !(dh_params = DH_new()) + || (priv_key_in && !DH_set0_key(dh_params, NULL, priv_key_in)) + || !DH_set0_pqg(dh_params, dh_p, NULL, dh_g) + ) { if (priv_key_in) BN_free(priv_key_in); if (dh_p) BN_free(dh_p); if (dh_g) BN_free(dh_g); if (dh_params) DH_free(dh_params); return enif_make_badarg(env); } + + if (len) { + if (len < BN_num_bits(dh_p)) + DH_set_length(dh_params, len); + else { + if (priv_key_in) BN_free(priv_key_in); + if (dh_p) BN_free(dh_p); + if (dh_g) BN_free(dh_g); + if (dh_params) DH_free(dh_params); + return enif_make_badarg(env); + } + } } #ifdef HAS_EVP_PKEY_CTX - if ((dhkey = EVP_PKEY_new()) - && (params = EVP_PKEY_new()) - && EVP_PKEY_set1_DH(params, dh_params) /* set the key referenced by params to dh_params. - dh_params (and params) must be freed */ - && (ctx = EVP_PKEY_CTX_new(params, NULL)) - && EVP_PKEY_keygen_init(ctx) - && EVP_PKEY_keygen(ctx, &dhkey) /* "performs a key generation operation, the - generated key is written to ppkey." (=last arg) */ - && (dh_params = EVP_PKEY_get1_DH(dhkey)) /* return the referenced key. dh_params and dhkey must be freed */ - ) { + { + EVP_PKEY_CTX *ctx; + EVP_PKEY *dhkey, *params; + int success; + + params = EVP_PKEY_new(); + success = EVP_PKEY_set1_DH(params, dh_params); /* set the key referenced by params to dh_params... */ + DH_free(dh_params); /* ...dh_params (and params) must be freed */ + if (!success) return atom_error; + + ctx = EVP_PKEY_CTX_new(params, NULL); + EVP_PKEY_free(params); + if (!ctx) { + return atom_error; + } + + if (!EVP_PKEY_keygen_init(ctx)) { + /* EVP_PKEY_CTX_free(ctx); */ + return atom_error; + } + + dhkey = EVP_PKEY_new(); + if (!EVP_PKEY_keygen(ctx, &dhkey)) { /* "performs a key generation operation, the ... */ + /*... generated key is written to ppkey." (=last arg) */ + /* EVP_PKEY_CTX_free(ctx); */ + /* EVP_PKEY_free(dhkey); */ + return atom_error; + } + + dh_params = EVP_PKEY_get1_DH(dhkey); /* return the referenced key. dh_params and dhkey must be freed */ + EVP_PKEY_free(dhkey); + if (!dh_params) { + /* EVP_PKEY_CTX_free(ctx); */ + return atom_error; + } + EVP_PKEY_CTX_free(ctx); + } #else - if (DH_generate_key(dh_params)) { -#endif + if (!DH_generate_key(dh_params)) return atom_error; +#endif + { + unsigned char *pub_ptr, *prv_ptr; + int pub_len, prv_len; + ERL_NIF_TERM ret_pub, ret_prv; const BIGNUM *pub_key_gen, *priv_key_gen; - - DH_get0_key(dh_params, - &pub_key_gen, &priv_key_gen); /* Get pub_key_gen and priv_key_gen. - "The values point to the internal representation of - the public key and private key values. This memory + + DH_get0_key(dh_params, + &pub_key_gen, &priv_key_gen); /* Get pub_key_gen and priv_key_gen. + "The values point to the internal representation of + the public key and private key values. This memory should not be freed directly." says man */ - pub_len = BN_num_bytes(pub_key_gen); - prv_len = BN_num_bytes(priv_key_gen); - pub_ptr = enif_make_new_binary(env, pub_len+mpint, &ret_pub); - prv_ptr = enif_make_new_binary(env, prv_len+mpint, &ret_prv); - if (mpint) { - put_int32(pub_ptr, pub_len); pub_ptr += 4; - put_int32(prv_ptr, prv_len); prv_ptr += 4; - } - BN_bn2bin(pub_key_gen, pub_ptr); - BN_bn2bin(priv_key_gen, prv_ptr); - ERL_VALGRIND_MAKE_MEM_DEFINED(pub_ptr, pub_len); - ERL_VALGRIND_MAKE_MEM_DEFINED(prv_ptr, prv_len); - ret = enif_make_tuple2(env, ret_pub, ret_prv); - } - else { - ret = atom_error; - } + pub_len = BN_num_bytes(pub_key_gen); + prv_len = BN_num_bytes(priv_key_gen); + pub_ptr = enif_make_new_binary(env, pub_len+mpint, &ret_pub); + prv_ptr = enif_make_new_binary(env, prv_len+mpint, &ret_prv); + if (mpint) { + put_int32(pub_ptr, pub_len); pub_ptr += 4; + put_int32(prv_ptr, prv_len); prv_ptr += 4; + } + BN_bn2bin(pub_key_gen, pub_ptr); + BN_bn2bin(priv_key_gen, prv_ptr); + ERL_VALGRIND_MAKE_MEM_DEFINED(pub_ptr, pub_len); + ERL_VALGRIND_MAKE_MEM_DEFINED(prv_ptr, prv_len); - DH_free(dh_params); -#ifdef HAS_EVP_PKEY_CTX - if (ctx) EVP_PKEY_CTX_free(ctx); - if (dhkey) EVP_PKEY_free(dhkey); - if (params) EVP_PKEY_free(params); -#endif - return ret; + DH_free(dh_params); + + return enif_make_tuple2(env, ret_pub, ret_prv); + } } static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */ - BIGNUM *dummy_pub_key = NULL, - *priv_key = NULL, - *other_pub_key = NULL, + BIGNUM *other_pub_key = NULL, *dh_p = NULL, *dh_g = NULL; - ErlNifBinary ret_bin; - ERL_NIF_TERM ret, head, tail; - DH *dh_priv = DH_new(), *dh_pub = DH_new(); -#ifdef HAS_EVP_PKEY_CTX - EVP_PKEY_CTX *ctx = NULL; - EVP_PKEY *my_priv_key = NULL, *peer_pub_key = NULL; - size_t skeylen; -#else - int i; -#endif + DH *dh_priv = DH_new(); - if (!get_bn_from_bin(env, argv[0], &other_pub_key) - || !get_bn_from_bin(env, argv[1], &priv_key) - || !enif_get_list_cell(env, argv[2], &head, &tail) - || !get_bn_from_bin(env, head, &dh_p) - || !enif_get_list_cell(env, tail, &head, &tail) - || !get_bn_from_bin(env, head, &dh_g) - || !enif_is_empty_list(env, tail) + /* Check the arguments and get + my private key (dh_priv), + the peer's public key (other_pub_key), + the parameters p & q + */ - /* Note: DH_set0_key() does not allow setting only the - * private key, although DH_compute_key() does not use the - * public key. Work around this limitation by setting - * the public key to a copy of the private key. - */ - || !(dummy_pub_key = BN_dup(priv_key)) - || !DH_set0_key(dh_priv, dummy_pub_key, priv_key) - || !DH_set0_pqg(dh_priv, dh_p, NULL, dh_g) - ) { - if (dh_p) BN_free(dh_p); - if (dh_g) BN_free(dh_g); - if (other_pub_key) BN_free(other_pub_key); - if (dummy_pub_key) BN_free(dummy_pub_key); - if (priv_key) BN_free(priv_key); - return enif_make_badarg(env); + { + BIGNUM *dummy_pub_key = NULL, + *priv_key = NULL; + ERL_NIF_TERM head, tail; + + if (!get_bn_from_bin(env, argv[0], &other_pub_key) + || !get_bn_from_bin(env, argv[1], &priv_key) + || !enif_get_list_cell(env, argv[2], &head, &tail) + || !get_bn_from_bin(env, head, &dh_p) + || !enif_get_list_cell(env, tail, &head, &tail) + || !get_bn_from_bin(env, head, &dh_g) + || !enif_is_empty_list(env, tail) + + /* Note: DH_set0_key() does not allow setting only the + * private key, although DH_compute_key() does not use the + * public key. Work around this limitation by setting + * the public key to a copy of the private key. + */ + || !(dummy_pub_key = BN_dup(priv_key)) + || !DH_set0_key(dh_priv, dummy_pub_key, priv_key) + || !DH_set0_pqg(dh_priv, dh_p, NULL, dh_g) + ) { + if (dh_p) BN_free(dh_p); + if (dh_g) BN_free(dh_g); + if (other_pub_key) BN_free(other_pub_key); + if (dummy_pub_key) BN_free(dummy_pub_key); + if (priv_key) BN_free(priv_key); + return enif_make_badarg(env); + } } +#ifdef HAS_EVP_PKEY_CTX + { + EVP_PKEY_CTX *ctx = NULL; + /* Prepare my private key dh_priv and assign to CTX */ + { + EVP_PKEY *my_priv_key = EVP_PKEY_new(); + if (!EVP_PKEY_set1_DH(my_priv_key, dh_priv)) { /* set the key referenced by my_priv_key to dh_priv. + dh_priv (and my_priv_key) must be freed by us */ + DH_free(dh_priv); + EVP_PKEY_free(my_priv_key); + return atom_error; + } + DH_free(dh_priv); + ctx = EVP_PKEY_CTX_new(my_priv_key, NULL); + EVP_PKEY_free(my_priv_key); + } + /* Prepare derivation */ + EVP_PKEY_derive_init(ctx); -#ifdef HAS_EVP_PKEY_CTX - if (!(my_priv_key = EVP_PKEY_new()) - || !EVP_PKEY_set1_DH(my_priv_key, dh_priv) /* set the key referenced by my_priv_key to dh_priv. - dh_priv (and my_priv_key) must be freed by us*/ - - || !(peer_pub_key = EVP_PKEY_new()) - || !DH_set0_key(dh_pub, other_pub_key, NULL) - || !DH_set0_pqg(dh_pub, dh_p, NULL, dh_g) - || !EVP_PKEY_set1_DH(peer_pub_key, dh_pub) - - || !(ctx = EVP_PKEY_CTX_new(my_priv_key, NULL)) - || (EVP_PKEY_derive_init(ctx) <= 0) - || (EVP_PKEY_derive_set_peer(ctx, peer_pub_key) <= 0) - || (EVP_PKEY_derive(ctx, NULL, &skeylen) <= 0)) { + /* Prepare the peers public key other_pub_key and assign to CTX */ + { + EVP_PKEY *peer_pub_key = EVP_PKEY_new(); + DH *dh_pub = DH_new(); - ret = atom_error; - } - else { - enif_alloc_binary(skeylen, &ret_bin); - - if ((EVP_PKEY_derive(ctx, ret_bin.data, &skeylen) > 0) - && (ret_bin.size >= skeylen)) { - /* Derivation succeded */ - if (ret_bin.size > skeylen) enif_realloc_binary(&ret_bin, skeylen); - ret = enif_make_binary(env, &ret_bin); + if (!DH_set0_key(dh_pub, other_pub_key, NULL) + || !DH_set0_pqg(dh_pub, dh_p, NULL, dh_g) + || !EVP_PKEY_set1_DH(peer_pub_key, dh_pub)) { + EVP_PKEY_CTX_free(ctx); + return atom_error; + } + DH_free(dh_pub); + if (EVP_PKEY_derive_set_peer(ctx, peer_pub_key) <= 0) { + return atom_error; + } } - else { - enif_release_binary(&ret_bin); - ret = atom_error; + + /* Derive the common secret and return it in an Erlang binary */ + { + size_t maxkeylen, len; + unsigned char *buf; + ErlNifBinary ret_bin; + int success; + + /* Get the common key MAX length: */ + if (EVP_PKEY_derive(ctx, NULL, &maxkeylen) <= 0) { + EVP_PKEY_CTX_free(ctx); + return atom_error; + } + + buf = enif_alloc(maxkeylen); + len = maxkeylen; + + success = + (EVP_PKEY_derive(ctx, buf, &len) > 0) + && (maxkeylen >= len); + + EVP_PKEY_CTX_free(ctx); + + if (!success) { + enif_free(buf); + return atom_error; + } + + enif_alloc_binary(len, &ret_bin); + memcpy(ret_bin.data, buf, ret_bin.size); + enif_free(buf); + + return enif_make_binary(env, &ret_bin); } } - #else - enif_alloc_binary(DH_size(dh_priv), &ret_bin); - i = DH_compute_key(ret_bin.data, other_pub_key, dh_priv); - if (i > 0) { - if (i != ret_bin.size) enif_realloc_binary(&ret_bin, i); - ret = enif_make_binary(env, &ret_bin); - } - else { - enif_release_binary(&ret_bin); - ret = atom_error; - } -#endif + { + ErlNifBinary ret_bin; + int size; + + enif_alloc_binary(DH_size(dh_priv), &ret_bin); + size = DH_compute_key(ret_bin.data, other_pub_key, dh_priv); + BN_free(other_pub_key); + DH_free(dh_priv); + if (size<=0) { + enif_release_binary(&ret_bin); + return atom_error; + } - if (other_pub_key) BN_free(other_pub_key); - if (dh_priv) DH_free(dh_priv); - if (dh_pub) DH_free(dh_pub); -#ifdef HAS_EVP_PKEY_CTX - if (ctx) EVP_PKEY_CTX_free(ctx); - if (my_priv_key) EVP_PKEY_free(my_priv_key); - /* if (peer_pub_key) EVP_PKEY_free(peer_pub_key); */ + if (size != ret_bin.size) enif_realloc_binary(&ret_bin, size); + return enif_make_binary(env, &ret_bin); + } #endif - return ret; } + static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Multiplier, Verifier, Generator, Exponent, Prime) */ BIGNUM *bn_verifier = NULL; -- cgit v1.2.3 From 5c2f4277badf33a518683c44617a64863f606726 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 14 Jun 2018 09:48:45 +0200 Subject: crypto: Remove EVP_PKEY from dh_compute_key_nif According to valgrind, there is a memory leak. When fixing that there is a core-dump instead. Since generate_key is the part that is important for the quality of the key we keep the old compute_key part to avoid memory leakage. --- lib/crypto/c_src/crypto.c | 72 ----------------------------------------------- 1 file changed, 72 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 1c746b2ee1..0a2a235209 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3230,77 +3230,6 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T return enif_make_badarg(env); } } -#ifdef HAS_EVP_PKEY_CTX - { - EVP_PKEY_CTX *ctx = NULL; - /* Prepare my private key dh_priv and assign to CTX */ - { - EVP_PKEY *my_priv_key = EVP_PKEY_new(); - if (!EVP_PKEY_set1_DH(my_priv_key, dh_priv)) { /* set the key referenced by my_priv_key to dh_priv. - dh_priv (and my_priv_key) must be freed by us */ - DH_free(dh_priv); - EVP_PKEY_free(my_priv_key); - return atom_error; - } - DH_free(dh_priv); - ctx = EVP_PKEY_CTX_new(my_priv_key, NULL); - EVP_PKEY_free(my_priv_key); - } - /* Prepare derivation */ - EVP_PKEY_derive_init(ctx); - - /* Prepare the peers public key other_pub_key and assign to CTX */ - { - EVP_PKEY *peer_pub_key = EVP_PKEY_new(); - DH *dh_pub = DH_new(); - - if (!DH_set0_key(dh_pub, other_pub_key, NULL) - || !DH_set0_pqg(dh_pub, dh_p, NULL, dh_g) - || !EVP_PKEY_set1_DH(peer_pub_key, dh_pub)) { - EVP_PKEY_CTX_free(ctx); - return atom_error; - } - DH_free(dh_pub); - if (EVP_PKEY_derive_set_peer(ctx, peer_pub_key) <= 0) { - return atom_error; - } - } - - /* Derive the common secret and return it in an Erlang binary */ - { - size_t maxkeylen, len; - unsigned char *buf; - ErlNifBinary ret_bin; - int success; - - /* Get the common key MAX length: */ - if (EVP_PKEY_derive(ctx, NULL, &maxkeylen) <= 0) { - EVP_PKEY_CTX_free(ctx); - return atom_error; - } - - buf = enif_alloc(maxkeylen); - len = maxkeylen; - - success = - (EVP_PKEY_derive(ctx, buf, &len) > 0) - && (maxkeylen >= len); - - EVP_PKEY_CTX_free(ctx); - - if (!success) { - enif_free(buf); - return atom_error; - } - - enif_alloc_binary(len, &ret_bin); - memcpy(ret_bin.data, buf, ret_bin.size); - enif_free(buf); - - return enif_make_binary(env, &ret_bin); - } - } -#else { ErlNifBinary ret_bin; int size; @@ -3317,7 +3246,6 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T if (size != ret_bin.size) enif_realloc_binary(&ret_bin, size); return enif_make_binary(env, &ret_bin); } -#endif } -- cgit v1.2.3 From 5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Mon, 18 Jun 2018 14:51:18 +0200 Subject: Update copyright year --- lib/crypto/c_src/crypto.c | 2 +- lib/crypto/c_src/otp_test_engine.c | 2 +- lib/crypto/doc/src/crypto.xml | 2 +- lib/crypto/doc/src/notes.xml | 2 +- lib/crypto/doc/src/usersguide.xml | 2 +- lib/crypto/src/Makefile | 2 +- lib/crypto/src/crypto.erl | 2 +- lib/crypto/test/blowfish_SUITE.erl | 2 +- lib/crypto/test/crypto_SUITE.erl | 2 +- lib/crypto/test/engine_SUITE.erl | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0a2a235209..6eeebb67a2 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2010-2017. All Rights Reserved. + * Copyright Ericsson AB 2010-2018. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index d0e23a2a3e..b6c9067964 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2017-2017. All Rights Reserved. + * Copyright Ericsson AB 2017-2018. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index af676d9021..42e411a0e3 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -4,7 +4,7 @@
- 19992017 + 19992018 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 66619c9e11..7c5d0d44f8 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -4,7 +4,7 @@
- 19992017 + 19992018 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml index e2ba1fe160..0124121433 100644 --- a/lib/crypto/doc/src/usersguide.xml +++ b/lib/crypto/doc/src/usersguide.xml @@ -4,7 +4,7 @@
- 20032016 + 20032018 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile index edad0e6b61..1753ba4f36 100644 --- a/lib/crypto/src/Makefile +++ b/lib/crypto/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1999-2016. All Rights Reserved. +# Copyright Ericsson AB 1999-2018. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 85b484011c..714cba58b9 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2017. All Rights Reserved. +%% Copyright Ericsson AB 1999-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index c9033ac4f8..a931ebb47e 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2016. All Rights Reserved. +%% Copyright Ericsson AB 2009-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index d148fa3856..ebb55c4a34 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2017. All Rights Reserved. +%% Copyright Ericsson AB 1999-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 3f176f165d..f708d7272d 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2017-2017. All Rights Reserved. +%% Copyright Ericsson AB 2017-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. -- cgit v1.2.3 From bb19e24a485e9ef43bcca3fbe9757da83f70c3a0 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 19 Jun 2018 08:24:54 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 47 ++++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 7c5d0d44f8..2e48b48d67 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,53 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3 + +
Fixed Bugs and Malfunctions + + +

+ Removed two undocumented and erroneous functions + (crypto:dh_generate_parameters/2 and + crypto:dh_check/1).

+

+ Own Id: OTP-14956 Aux Id: ERL-579

+
+ +

+ Fixed bug causing VM crash if doing runtime upgrade of a + crypto module built against OpenSSL older than 0.9.8h. + Bug exists since OTP-20.2.

+

+ Own Id: OTP-15088

+
+
+
+ + +
Improvements and New Features + + +

+ A new rand plugin algorithm has been implemented + in crypto, that is: crypto_cache. It uses + strong random bytes as randomness source and caches them + to get good speed. See crypto:rand_seed_alg/1.

+

+ Own Id: OTP-13370 Aux Id: PR-1573

+
+ +

+ Diffie-Hellman key functions are re-written with the + EVP_PKEY api.

+

+ Own Id: OTP-14864

+
+
+
+ +
+
Crypto 4.2.2
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 778aff9d13..cc34c20ac6 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.2 +CRYPTO_VSN = 4.3 -- cgit v1.2.3 From b453f67879df577fcf5b0eb6062ec444b0c43958 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 13 Jul 2018 15:10:57 +0200 Subject: docs: make clean all XMLDIR --- lib/crypto/doc/src/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index aa987d2b39..2148062e78 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -89,6 +89,7 @@ debug opt valgrind: clean clean_docs clean_tex: rm -rf $(HTMLDIR)/* + rm -rf $(XMLDIR) rm -f $(MAN3DIR)/* rm -f $(MAN6DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) -- cgit v1.2.3 From 209d778c494d66445326bb3da4232f567298327a Mon Sep 17 00:00:00 2001 From: Stevie Graham Date: Thu, 26 Jul 2018 14:27:07 +0100 Subject: Fixes ERL-675 RSA options rsa_mgf1_md, rsa_oaep_md, and rsa_oaep_label do not work. PR #838, which reimplemented various parts of the crypto application to use OpenSSL EVP APIs was merged manually. During the manual merge the macro define for HAVE_RSA_OAEP_MD was lost. The result being that setting rsa_mgf1_md and rsa_oaep_md for any other value than sha causes the nif to return not_sup. Support for configurable MGF1 digests and OAEP labels is available in OpenSSL version 1.1.0, a cursory look at libressl does not seem to reveal support, so it is not added in this PR. The defective functionality has been returned by defining HAVE_RSA_OAEP_MD alongside HAVE_CHACHA20_POLY1305, i.e. OpenSSL >= 1.1.0 and NOT libressl. --- lib/crypto/c_src/crypto.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6eeebb67a2..2fa1082dbb 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -179,6 +179,7 @@ #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0) # ifndef HAS_LIBRESSL # define HAVE_CHACHA20_POLY1305 +# define HAVE_RSA_OAEP_MD # endif #endif -- cgit v1.2.3 From 806a409df7cf2b07a39b3876fd36099579df126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Wed, 18 Jul 2018 10:23:51 +0200 Subject: crypto: Fix crash in compute_key(ecdh, ...) on badarg When term2point was passed a non-binary argument, `my_ecpoint` would be left uninitialized and the cleanup code would free a garbage pointer. --- lib/crypto/c_src/crypto.c | 2 +- lib/crypto/test/crypto_SUITE.erl | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 94a207cba6..6e855939f7 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -3757,7 +3757,7 @@ static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF int i; EC_GROUP *group; const BIGNUM *priv_key; - EC_POINT *my_ecpoint; + EC_POINT *my_ecpoint = NULL; EC_KEY *other_ecdh = NULL; if (!get_ec_key(env, argv[1], argv[2], atom_undefined, &key)) diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 6dab459df6..c07e937737 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -31,6 +31,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [app, + {group, api_errors}, appup, {group, fips}, {group, non_fips}, @@ -169,7 +170,8 @@ groups() -> {no_aes_ige256, [], [no_support, no_block]}, {no_chacha20_poly1305, [], [no_support, no_aead]}, {no_rc2_cbc, [], [no_support, no_block]}, - {no_rc4, [], [no_support, no_stream]} + {no_rc4, [], [no_support, no_stream]}, + {api_errors, [], [api_errors_ecdh]} ]. %%------------------------------------------------------------------- @@ -237,6 +239,8 @@ init_per_group(non_fips, Config) -> _NotEnabled -> NonFIPSConfig end; +init_per_group(api_errors, Config) -> + Config; init_per_group(GroupName, Config) -> case atom_to_list(GroupName) of "no_" ++ TypeStr -> @@ -2491,3 +2495,14 @@ parse_rsp_cmac(Type, Key0, Msg0, Mlen0, Tlen, MAC0, Next, Acc) -> I -> parse_rsp(Type, Next, [{Type, Key, Msg, I, MAC}|Acc]) end. + +api_errors_ecdh(Config) when is_list(Config) -> + %% Check that we don't segfault when fed garbage. + Test = fun(Others, Curve) -> + {_Pub, Priv} = crypto:generate_key(ecdh, Curve), + crypto:compute_key(ecdh, Others, Priv, Curve) + end, + Others = [gurka, 0, <<0>>], + Curves = [gaffel, 0, sect571r1], + [_= (catch Test(O, C)) || O <- Others, C <- Curves], + ok. -- cgit v1.2.3 From c5a344a3cace51ef9697adbab05e45f41d44bf13 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 9 Aug 2018 17:28:32 +0200 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 778aff9d13..93a97ec88b 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.2 +CRYPTO_VSN = 4.2.2.1 -- cgit v1.2.3 From 962ea06fa99e36a4631ec6459895d9466e61964c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 9 Aug 2018 17:29:04 +0200 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 66619c9e11..0f8c50a35d 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.2.2.1 + +
Fixed Bugs and Malfunctions + + +

Fixed a node crash in crypto:compute_key(ecdh, + ...) when passing a wrongly typed Others + argument.

+

+ Own Id: OTP-15194 Aux Id: ERL-673

+
+
+
+ +
+
Crypto 4.2.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 671dfd2acde87f5727ea442c942e1083a391aaee Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 10 Aug 2018 19:02:30 +0200 Subject: Update version numbers --- lib/crypto/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index cc34c20ac6..0d7b0e5575 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3 +CRYPTO_VSN = 4.3.1 -- cgit v1.2.3 From d41ed9524c7fc93b27aa28f51e8a07be4703a27b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 10 Aug 2018 19:02:49 +0200 Subject: Update release notes --- lib/crypto/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 2e48b48d67..5d2065c8d8 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3.1 + +
Fixed Bugs and Malfunctions + + +

Fixed a node crash in crypto:compute_key(ecdh, + ...) when passing a wrongly typed Others + argument.

+

+ Own Id: OTP-15194 Aux Id: ERL-673

+
+
+
+ +
+
Crypto 4.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d1288431f3b8c3258077f6f17882539aea671ec9 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 6 Aug 2018 13:53:20 +0200 Subject: crypto: Added tests for rsa opts from PR838 Just testing to use rsa_pkcs1_oaep_padding, rsa_x931_padding and rsa_sslv23_padding to see that it does not core dum --- lib/crypto/test/crypto_SUITE.erl | 105 +++++++++++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 16 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index ebb55c4a34..040f136fb4 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -836,26 +836,69 @@ negative_verify(Type, Hash, Msg, Signature, Public, Options) -> ok end. +-define(PUB_PRIV_ENC_DEC_CATCH(Type,Padding), + CC:EE -> + ct:log("~p:~p in ~p:~p/~p, line ~p.~n" + "Type = ~p~nPadding = ~p", + [CC,EE,?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,?LINE,(Type),(Padding)]), + MaybeUnsupported = + case crypto:info_lib() of + [{<<"OpenSSL">>,_,_}] -> + is_list(Padding) andalso + lists:any(fun(P) -> lists:member(P,(Padding)) end, + [{rsa_padding, rsa_pkcs1_oaep_padding}, + {rsa_padding, rsa_sslv23_padding}, + {rsa_padding, rsa_x931_padding}]); + _ -> + false + end, + case CC of + error when MaybeUnsupported -> + ct:comment("Padding unsupported?",[]); + _ -> + ct:fail({?FUNCTION_NAME,CC,EE,(Type),(Padding)}) + end + ). + do_public_encrypt({Type, Public, Private, Msg, Padding}) -> - PublicEcn = (catch crypto:public_encrypt(Type, Msg, Public, Padding)), - case crypto:private_decrypt(Type, PublicEcn, Private, Padding) of - Msg -> - ok; - Other -> - ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, Other}}) + try + crypto:public_encrypt(Type, Msg, Public, Padding) + of + PublicEcn -> + try + crypto:private_decrypt(Type, PublicEcn, Private, Padding) + of + Msg -> + ok; + Other -> + ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, Other}}) + catch + ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + end + catch + ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) end. -do_private_encrypt({_Type, _Public, _Private, _Msg, rsa_pkcs1_oaep_padding}) -> - ok; %% Not supported by openssl + do_private_encrypt({Type, Public, Private, Msg, Padding}) -> - PrivEcn = (catch crypto:private_encrypt(Type, Msg, Private, Padding)), - case crypto:public_decrypt(Type, PrivEcn, Public, Padding) of - Msg -> - ok; - Other -> - ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, Other}}) + try + crypto:private_encrypt(Type, Msg, Private, Padding) + of + PrivEcn -> + try + crypto:public_decrypt(Type, PrivEcn, Public, Padding) + of + Msg -> + ok; + Other -> + ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, Other}}) + catch + ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + end + catch + ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) end. - + do_generate_compute({srp = Type, UserPrivate, UserGenParams, UserComParams, HostPublic, HostPrivate, HostGenParams, HostComParam, SessionKey}) -> {UserPublic, UserPrivate} = crypto:generate_key(Type, UserGenParams, UserPrivate), @@ -1241,7 +1284,12 @@ group_config(rsa = Type, Config) -> end, MsgPubEnc = <<"7896345786348 Asldi">>, PubPrivEnc = [{rsa, PublicS, PrivateS, MsgPubEnc, rsa_pkcs1_padding}, + {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_pkcs1_padding}]}, + {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_sslv23_padding}]}, + {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_x931_padding}]}, rsa_oaep(), + rsa_oaep_label(), + rsa_oaep256(), no_padding() ], Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], @@ -2334,7 +2382,32 @@ rsa_oaep() -> hexstr2bin("4f456c502493bdc0ed2ab756a3a6ed4d67352a697d4216e93212b127a63d5411ce6fa98d5dbefd73263e3728142743818166ed7dd63687dd2a8ca1d2f4fbd8e1")], %%Msg = hexstr2bin("6628194e12073db03ba94cda9ef9532397d50dba79b987004afefe34"), Msg = hexstr2bin("750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5"), - {rsa, Public, Private, Msg, rsa_pkcs1_oaep_padding}. + {rsa, Public, Private, Msg, [{rsa_padding, rsa_pkcs1_oaep_padding}]}. + +rsa_oaep_label() -> + Public = [hexstr2bin("010001"), + hexstr2bin("a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb")], + Private = Public ++ [hexstr2bin("53339cfdb79fc8466a655c7316aca85c55fd8f6dd898fdaf119517ef4f52e8fd8e258df93fee180fa0e4ab29693cd83b152a553d4ac4d1812b8b9fa5af0e7f55fe7304df41570926f3311f15c4d65a732c483116ee3d3d2d0af3549ad9bf7cbfb78ad884f84d5beb04724dc7369b31def37d0cf539e9cfcdd3de653729ead5d1"), + hexstr2bin("d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d"), + hexstr2bin("cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77"), + hexstr2bin("0e12bf1718e9cef5599ba1c3882fe8046a90874eefce8f2ccc20e4f2741fb0a33a3848aec9c9305fbecbd2d76819967d4671acc6431e4037968db37878e695c1"), + hexstr2bin("95297b0f95a2fa67d00707d609dfd4fc05c89dafc2ef6d6ea55bec771ea333734d9251e79082ecda866efef13c459e1a631386b7e354c899f5f112ca85d71583"), + hexstr2bin("4f456c502493bdc0ed2ab756a3a6ed4d67352a697d4216e93212b127a63d5411ce6fa98d5dbefd73263e3728142743818166ed7dd63687dd2a8ca1d2f4fbd8e1")], + Msg = hexstr2bin("750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5"), + Lbl = hexstr2bin("1332a67ca7088f75c9b8fb5e3d072882"), + {rsa, Public, Private, Msg, [{rsa_padding, rsa_pkcs1_oaep_padding}, {rsa_oaep_label, Lbl}]}. + +rsa_oaep256() -> + Public = [hexstr2bin("010001"), + hexstr2bin("a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb")], + Private = Public ++ [hexstr2bin("53339cfdb79fc8466a655c7316aca85c55fd8f6dd898fdaf119517ef4f52e8fd8e258df93fee180fa0e4ab29693cd83b152a553d4ac4d1812b8b9fa5af0e7f55fe7304df41570926f3311f15c4d65a732c483116ee3d3d2d0af3549ad9bf7cbfb78ad884f84d5beb04724dc7369b31def37d0cf539e9cfcdd3de653729ead5d1"), + hexstr2bin("d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d"), + hexstr2bin("cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77"), + hexstr2bin("0e12bf1718e9cef5599ba1c3882fe8046a90874eefce8f2ccc20e4f2741fb0a33a3848aec9c9305fbecbd2d76819967d4671acc6431e4037968db37878e695c1"), + hexstr2bin("95297b0f95a2fa67d00707d609dfd4fc05c89dafc2ef6d6ea55bec771ea333734d9251e79082ecda866efef13c459e1a631386b7e354c899f5f112ca85d71583"), + hexstr2bin("4f456c502493bdc0ed2ab756a3a6ed4d67352a697d4216e93212b127a63d5411ce6fa98d5dbefd73263e3728142743818166ed7dd63687dd2a8ca1d2f4fbd8e1")], + Msg = hexstr2bin("750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5"), + {rsa, Public, Private, Msg, [{rsa_padding, rsa_pkcs1_oaep_padding}, {rsa_oaep_md, sha256}]}. ecc() -> %% http://point-at-infinity.org/ecc/nisttv -- cgit v1.2.3 From 4d3e88383f8705f34fe30abf85060ea1b91ac0e0 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 14 Aug 2018 09:58:18 +0200 Subject: crypto: Fail tests if crypto cannot start --- lib/crypto/test/crypto_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index aa2278dbdd..d32eadab30 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -207,7 +207,7 @@ init_per_suite(Config) -> Config end catch _:_ -> - {skip, "Crypto did not start"} + {fail, "Crypto did not start"} end. end_per_suite(_Config) -> -- cgit v1.2.3 From 31d03ad85a194ea332a1525dbe669135982855e1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 14:19:39 +0200 Subject: crypto: Put curve list in C --- lib/crypto/c_src/crypto.c | 92 ++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 10 +--- lib/crypto/src/crypto_ec_curves.erl | 36 +-------------- 3 files changed, 94 insertions(+), 44 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index a9fef65e03..68d2c44b5e 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1342,11 +1342,101 @@ static void init_algorithms_types(ErlNifEnv* env) // Non-validated algorithms follow algo_mac_fips_cnt = algo_mac_cnt; - // Validated algorithms first algo_curve_cnt = 0; +#if defined(HAVE_EC) + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp160k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp160r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp160r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp192r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp192k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp224k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp224r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp256k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp256r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp384r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp521r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime192v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime192v2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime192v3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime239v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime239v2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime239v3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"prime256v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls7"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls9"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls12"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP160r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP160t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP192r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP192t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP224r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP224t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP256r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP256t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP320r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP320t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP384r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP384t1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP512r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"brainpoolP512t1"); +#if !defined(OPENSSL_NO_EC2M) + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect163k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect163r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect163r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect193r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect193r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect233k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect233r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect239k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect283k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect283r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect409k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect409r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect571k1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect571r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb163v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb163v2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb163v3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb176v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb191v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb191v2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb191v3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb208w1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb239v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb239v2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb239v3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb272w1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb304w1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb359v1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2pnb368w1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"c2tnb431r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls5"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls10"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls11"); +#endif +#endif // Non-validated algorithms follow algo_curve_fips_cnt = algo_curve_cnt; +#if defined(HAVE_EC) + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp112r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp112r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp128r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"secp128r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls6"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls8"); +#if !defined(OPENSSL_NO_EC2M) + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect113r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect113r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect131r1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"sect131r2"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls1"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"wtls4"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"ipsec3"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"ipsec4"); +#endif +#endif //-- #ifdef HAVE_EDDH algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x25519"); diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 714cba58b9..835cadce47 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -108,17 +108,11 @@ stop() -> supports()-> {Hashs, PubKeys, Ciphers, Macs, Curves} = algorithms(), - [{hashs, Hashs}, {ciphers, Ciphers}, {public_keys, PubKeys}, - {macs, Macs} - | case Curves of - [] -> []; - _ -> [{curves, Curves}] % Only show this experimental feature - % if OpenSSL 1.1.1 beta4 or higher (where - % eddsa and eddh is enabled) - end + {macs, Macs}, + {curves, Curves} ]. info_lib() -> ?nif_stub. diff --git a/lib/crypto/src/crypto_ec_curves.erl b/lib/crypto/src/crypto_ec_curves.erl index 9602a7e24b..a0a2f99601 100644 --- a/lib/crypto/src/crypto_ec_curves.erl +++ b/lib/crypto/src/crypto_ec_curves.erl @@ -3,41 +3,7 @@ -export([curve/1, curves/0]). curves() -> - CryptoSupport = crypto:supports(), - PubKeys = proplists:get_value(public_keys, CryptoSupport), - HasEC = proplists:get_bool(ecdh, PubKeys), - HasGF2m = proplists:get_bool(ec_gf2m, PubKeys), - FIPSMode = crypto:info_fips() == enabled, - prime_curves(HasEC, FIPSMode) ++ characteristic_two_curves(HasGF2m, FIPSMode). - - -prime_curves(true, true) -> - [secp160k1,secp160r1,secp160r2, - secp192r1,secp192k1,secp224k1,secp224r1,secp256k1,secp256r1,secp384r1, - secp521r1,prime192v1,prime192v2,prime192v3,prime239v1,prime239v2,prime239v3, - prime256v1,wtls7,wtls9,wtls12, - brainpoolP160r1,brainpoolP160t1,brainpoolP192r1,brainpoolP192t1, - brainpoolP224r1,brainpoolP224t1,brainpoolP256r1,brainpoolP256t1, - brainpoolP320r1,brainpoolP320t1,brainpoolP384r1,brainpoolP384t1, - brainpoolP512r1,brainpoolP512t1]; -prime_curves(true, false) -> - [secp112r1,secp112r2,secp128r1,secp128r2,wtls6,wtls8] - ++ prime_curves(true, true); -prime_curves(_, _) -> - []. - -characteristic_two_curves(true, true) -> - [sect163k1,sect163r1, - sect163r2,sect193r1,sect193r2,sect233k1,sect233r1,sect239k1,sect283k1, - sect283r1,sect409k1,sect409r1,sect571k1,sect571r1,c2pnb163v1,c2pnb163v2, - c2pnb163v3,c2pnb176v1,c2tnb191v1,c2tnb191v2,c2tnb191v3,c2pnb208w1,c2tnb239v1, - c2tnb239v2,c2tnb239v3,c2pnb272w1,c2pnb304w1,c2tnb359v1,c2pnb368w1,c2tnb431r1, - wtls3,wtls5,wtls10,wtls11]; -characteristic_two_curves(true, _) -> - [sect113r1,sect113r2,sect131r1,sect131r2,wtls1,wtls4,ipsec3,ipsec4] - ++ characteristic_two_curves(true, true); -characteristic_two_curves(_, _) -> - []. + proplists:get_value(curves, crypto:supports()) -- [x25519,x448]. curve(secp112r1) -> { -- cgit v1.2.3 From cc674152dca738da434872f78a85f6cf7070d29b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 14 Aug 2018 10:21:58 +0200 Subject: crypto: Try to generate ecdh for all crypto:curves() --- lib/crypto/test/crypto_SUITE.erl | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index d32eadab30..13b1fbd047 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -134,7 +134,7 @@ groups() -> ]}, {dh, [], [generate_compute, compute_bug]}, - {ecdh, [], [compute, generate]}, + {ecdh, [], [generate_all_supported, compute, generate]}, {srp, [], [generate_compute]}, {des_cbc, [], [block]}, {des_cfb, [], [block]}, @@ -510,6 +510,33 @@ compute(Config) when is_list(Config) -> Gen = proplists:get_value(compute, Config), lists:foreach(fun do_compute/1, Gen). %%-------------------------------------------------------------------- +generate_all_supported() -> + [{doc, " Test that all curves from crypto:ec_curves/0 returns two binaries"}]. +generate_all_supported(_Config) -> + Results = + [try + crypto:generate_key(ecdh, C) + of + {B1,B2} when is_binary(B1) and is_binary(B2) -> + %% That is, seems like it works as expected. + {ok,C}; + Err -> + ct:log("ERROR: Curve ~p generated ~p", [C,Err]), + {error,{C,Err}} + catch + Cls:Err:Stack -> + ct:log("ERROR: Curve ~p exception ~p:~p~n~p", [C,Cls,Err,Stack]), + {error,{C,{Cls,Err}}} + end + || C <- crypto:ec_curves() + ], + OK = [C || {ok,C} <- Results], + ct:log("Ok (len=~p): ~p", [length(OK), OK]), + false = lists:any(fun({error,_}) -> true; + (_) -> false + end, Results). + +%%-------------------------------------------------------------------- generate() -> [{doc, " Test crypto:generate_key"}]. generate(Config) when is_list(Config) -> -- cgit v1.2.3 From 5b51f9d9875750f27f2fa8a75f22e0fcb9a6bec0 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Wed, 15 Aug 2018 12:26:44 +0200 Subject: Updated the engine load functionality - engine_load/3/4 can be called multiple times for same engine if it allows it (eg doesn't contain global data) - ensure_engine_loaded/2/3 is new functions that guarantees that the engine is just loaded once by adding it to OpenSSL internal engine list and check that before loading. - ensure_engine_unloaded/1/2 is new functions that is used to unload engines loaded with ensure_engine_loaded (remove it from OpenSSL internal engine list and then unload). - new utility functions engine_by_id/1, engine_add/1, engine_remove/1, engine_get_id/1 and engine_get_name/1 --- lib/crypto/c_src/crypto.c | 56 ++++++-- lib/crypto/doc/src/crypto.xml | 263 ++++++++++++++++++++++++++++++---- lib/crypto/doc/src/engine_load.xml | 31 +++- lib/crypto/src/crypto.erl | 174 +++++++++++++++++++---- lib/crypto/test/engine_SUITE.erl | 280 ++++++++++++++++++++++++++++++++----- 5 files changed, 694 insertions(+), 110 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6e855939f7..6dd263adb2 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2010-2017. All Rights Reserved. + * Copyright Ericsson AB 2010-2018. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -527,6 +527,7 @@ static ERL_NIF_TERM engine_remove_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE static ERL_NIF_TERM engine_get_first_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_next_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_name_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_all_methods_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); /* helpers */ @@ -613,6 +614,7 @@ static ErlNifFunc nif_funcs[] = { {"engine_get_first_nif", 0, engine_get_first_nif}, {"engine_get_next_nif", 1, engine_get_next_nif}, {"engine_get_id_nif", 1, engine_get_id_nif}, + {"engine_get_name_nif", 1, engine_get_name_nif}, {"engine_get_all_methods_nif", 0, engine_get_all_methods_nif} }; @@ -1016,7 +1018,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) */ return 0; } -#endif +#endif atom_true = enif_make_atom(env,"true"); atom_false = enif_make_atom(env,"false"); @@ -4727,7 +4729,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } else { /* non-evp rsa private decrypt */ i = RSA_private_decrypt(in_bin.size, in_bin.data, - out_bin.data, rsa, crypt_opt.rsa_padding); + out_bin.data, rsa, crypt_opt.rsa_padding); if (i > 0) { ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); enif_realloc_binary(&out_bin, i); @@ -4745,7 +4747,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } else { /* non-evp rsa public decrypt */ i = RSA_public_decrypt(in_bin.size, in_bin.data, - out_bin.data, rsa, crypt_opt.rsa_padding); + out_bin.data, rsa, crypt_opt.rsa_padding); if (i > 0) { ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); enif_realloc_binary(&out_bin, i); @@ -4863,7 +4865,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI / * Example of result: { Curve = {Field, Prime, Point, Order, CoFactor} = - { + { Field = {prime_field,<<255,...,255>>}, Prime = {<<255,...,252>>, <<90,...,75>>, @@ -4876,9 +4878,9 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI Key = <<151,...,62>> } or - { + { Curve = - {characteristic_two_field, + {characteristic_two_field, M, Basis = {tpbasis, _} | {ppbasis, k1, k2, k3} @@ -4891,7 +4893,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI */ #endif } - + if (pkey) EVP_PKEY_free(pkey); return enif_make_badarg(env); } @@ -5072,7 +5074,7 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const error: for(i = 0; cmds != NULL && cmds[i] != NULL; i++) - enif_free(cmds[i]); + enif_free(cmds[i]); enif_free(cmds); return ret; #else @@ -5390,7 +5392,7 @@ static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE if (!engine_id) { enif_alloc_binary(0, &engine_id_bin); engine_id_bin.size = 0; - return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); + return enif_make_binary(env, &engine_id_bin); } size = strlen(engine_id); @@ -5398,7 +5400,39 @@ static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE engine_id_bin.size = size; memcpy(engine_id_bin.data, engine_id, size); - return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); + return enif_make_binary(env, &engine_id_bin); +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_name_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ErlNifBinary engine_name_bin; + const char *engine_name; + int size; + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_get_id_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + engine_name = ENGINE_get_name(ctx->engine); + if (!engine_name) { + enif_alloc_binary(0, &engine_name_bin); + engine_name_bin.size = 0; + return enif_make_binary(env, &engine_name_bin); + } + + size = strlen(engine_name); + enif_alloc_binary(size, &engine_name_bin); + engine_name_bin.size = size; + memcpy(engine_name_bin.data, engine_name, size); + + return enif_make_binary(env, &engine_name_bin); #else return atom_notsup; #endif diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 464799b320..8eb414b9bf 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -4,7 +4,7 @@
- 19992017 + 19992018 Ericsson AB. All Rights Reserved. @@ -142,7 +142,7 @@ password => password()} engine_ref() = term() -

The result of a call to engine_load/3. +

The result of a call to for example engine_load/3.

key_id() = string() | binary() @@ -628,7 +628,7 @@

Fetches the corresponding public key from a private key stored in an Engine. The key must be of the type indicated by the Type parameter. -

+

@@ -953,8 +953,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Returns a list of all possible engine methods.

-

- May throw exception notsup in case there is +

+ May throw exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -970,18 +970,18 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ EngineId = unicode:chardata() PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] - Result = {ok, Engine::term()} | {error, Reason::term()} + Result = {ok, Engine::engine_ref()} | {error, Reason::term()}

Loads the OpenSSL engine given by EngineId if it is available and then returns ok and - an engine handle. This function is the same as calling engine_load/4 with - EngineMethods set to a list of all the possible methods. An error tuple is + an engine handle. This function is the same as calling engine_load/4 with + EngineMethods set to a list of all the possible methods. An error tuple is returned if the engine can't be loaded.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -998,7 +998,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ EngineId = unicode:chardata() PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] EngineMethods = [engine_method_type()] - Result = {ok, Engine::term()} | {error, Reason::term()} + Result = {ok, Engine::engine_ref()} | {error, Reason::term()}

@@ -1007,7 +1007,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1021,17 +1021,17 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_unload(Engine) -> Result Dynamical load an encryption engine - Engine = term() + Engine = engine_ref() Result = ok | {error, Reason::term()}

- Unloads the OpenSSL engine given by EngineId. + Unloads the OpenSSL engine given by Engine. An error tuple is returned if the engine can't be unloaded.

The function throws a badarg if the parameter is in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1042,19 +1042,24 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_list() -> Result - List the known engine ids + engine_by_id(EngineId) -> Result + Get a reference to an already loaded engine - Result = [EngineId::unicode:chardata()] + EngineID = unicode:chardata()engine_ref() + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

List the id's of all engines in OpenSSL's internal list.

- It may also throw the exception notsup in case there is + Get a reference to an already loaded engine with EngineId. + An error tuple is returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameter is in wrong format. + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

- See also the chapter Engine Load + See also the chapter Engine Load in the User's Guide.

@@ -1064,7 +1069,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> Result Sends ctrl commands to an OpenSSL engine - Engine = term() + Engine = engine_ref() CmdName = unicode:chardata() CmdArg = unicode:chardata() Result = ok | {error, Reason::term()} @@ -1072,12 +1077,12 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Sends ctrl commands to the OpenSSL engine given by Engine. - This function is the same as calling engine_ctrl_cmd_string/4 with + This function is the same as calling engine_ctrl_cmd_string/4 with Optional set to false.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1087,7 +1092,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> Result Sends ctrl commands to an OpenSSL engine - Engine = term() + Engine = engine_ref() CmdName = unicode:chardata() CmdArg = unicode:chardata() Optional = boolean() @@ -1096,18 +1101,218 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Sends ctrl commands to the OpenSSL engine given by Engine. - Optional is a boolean argument that can relax the semantics of the function. - If set to true it will only return failure if the ENGINE supported the given - command name but failed while executing it, if the ENGINE doesn't support the command - name it will simply return success without doing anything. In this case we assume + Optional is a boolean argument that can relax the semantics of the function. + If set to true it will only return failure if the ENGINE supported the given + command name but failed while executing it, if the ENGINE doesn't support the command + name it will simply return success without doing anything. In this case we assume the user is only supplying commands specific to the given ENGINE so we set this to false.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+ + + + engine_add(Engine) -> Result + Add engine to OpenSSL internal list + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

Add the engine to OpenSSL's internal list.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_remove(Engine) -> Result + Remove engine to OpenSSL internal list + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

Remove the engine from OpenSSL's internal list.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_get_id(Engine) -> EngineId + Fetch engine ID + + Engine = engine_ref() + EngineId = unicode:chardata() + + +

Return the ID for the engine, or an empty binary if there is no id set.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_get_name(Engine) -> EngineName + Fetch engine name + + Engine = engine_ref() + EngineName = unicode:chardata() + + +

Return the name (eg a description) for the engine, or an empty binary if there is no name set.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_list() -> Result + List the known engine ids + + Result = [EngineId::unicode:chardata()] + + +

List the id's of all engines in OpenSSL's internal list.

+

+ It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+

+ May throw exception notsup in case engine functionality is not supported by the underlying + OpenSSL implementation. +

+
+
+ + + ensure_engine_loaded(EngineId, LibPath) -> Result + Ensure encryption engine just loaded once + + EngineId = unicode:chardata() + LibPath = unicode:chardata() + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId and the path to the dynamic library + implementing the engine. This function is the same as calling ensure_engine_loaded/3 with + EngineMethods set to a list of all the possible methods. An error tuple is + returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> Result + Ensure encryption engine just loaded once + + EngineId = unicode:chardata() + LibPath = unicode:chardata() + EngineMethods = [engine_method_type()] + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId and the path to the dynamic library + implementing the engine. This function differs from the normal engine_load in that sense it + also add the engine id to the internal list in OpenSSL. Then in the following calls to the function + it just fetch the reference to the engine instead of loading it again. + An error tuple is returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_unloaded(Engine) -> Result + Unload an engine loaded with the ensure function + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

+ Unloads an engine loaded with the ensure_engine_loaded function. + It both removes the label from the OpenSSL internal engine list and unloads the engine. + This function is the same as calling ensure_engine_unloaded/2 with + EngineMethods set to a list of all the possible methods. An error tuple is + returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_unloaded(Engine, EngineMethods) -> Result + Unload an engine loaded with the ensure function + + Engine = engine_ref() + EngineMethods = [engine_method_type()] + Result = ok | {error, Reason::term()} + + +

+ Unloads an engine loaded with the ensure_engine_loaded function. + It both removes the label from the OpenSSL internal engine list and unloads the engine. + An error tuple is returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

diff --git a/lib/crypto/doc/src/engine_load.xml b/lib/crypto/doc/src/engine_load.xml index e5c3f5d561..3d0aa0c32a 100644 --- a/lib/crypto/doc/src/engine_load.xml +++ b/lib/crypto/doc/src/engine_load.xml @@ -42,6 +42,9 @@ operations. The hardware implementation usually offers improved performance over its software-based counterpart, which is known as cryptographic acceleration.

+ +

The file name requirement on the engine dynamic library can differ between SSL versions.

+
@@ -54,9 +57,6 @@ 1> {ok, Engine} = crypto:engine_load(<<"otp_test_engine">>, [], []). {ok, #Ref} - -

The file name requirement on the engine dynamic library can differ between SSL versions.

-
@@ -72,9 +72,6 @@ <<"LOAD">>], []). {ok, #Ref} - -

The dynamic engine is not supported in LibreSSL from version 2.2.1

-
@@ -99,6 +96,28 @@ engine_method_pkey_meths, engine_method_pkey_asn1_meths]. {ok, #Ref}
+
+ Load with the ensure loaded function +

+ This function makes sure the engine is loaded just once and the ID is added to the internal + engine list of OpenSSL. The following calls to the function will check if the ID is loaded + and then just get a new reference to the engine. +

+ + 5> {ok, Engine} = crypto:ensure_engine_loaded(<<"MD5">>, + <<"/some/path/otp_test_engine.so">>). + {ok, #Ref} +

+ To unload it use crypto:ensure_engine_unloaded/1 which removes the ID from the internal list + before unloading the engine. +

+ + 6> crypto:ensure_engine_unloaded(<<"MD5">>). + ok +
+ + +
List all engines currently loaded diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 1a1b4f98b5..0d85b94b57 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2017. All Rights Reserved. +%% Copyright Ericsson AB 1999-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -51,9 +51,18 @@ engine_load/3, engine_load/4, engine_unload/1, + engine_by_id/1, engine_list/0, engine_ctrl_cmd_string/3, - engine_ctrl_cmd_string/4 + engine_ctrl_cmd_string/4, + engine_add/1, + engine_remove/1, + engine_get_id/1, + engine_get_name/1, + ensure_engine_loaded/2, + ensure_engine_loaded/3, + ensure_engine_unloaded/1, + ensure_engine_unloaded/2 ]). -export_type([engine_ref/0, @@ -444,7 +453,7 @@ sign(Algorithm, Type, Data, Key, Options) -> -type engine_key_ref() :: #{engine := engine_ref(), key_id := key_id(), password => password(), - term() => term() + term() => term() }. -type pk_algs() :: rsa | ecdsa | dss . @@ -604,7 +613,7 @@ compute_key(ecdh, Others, My, Curve) -> -type engine_method_type() :: engine_method_rsa | engine_method_dsa | engine_method_dh | engine_method_rand | engine_method_ecdh | engine_method_ecdsa | engine_method_ciphers | engine_method_digests | engine_method_store | - engine_method_pkey_meths | engine_method_pkey_asn1_meths | + engine_method_pkey_meths | engine_method_pkey_asn1_meths | engine_method_ec. -type engine_ref() :: term(). @@ -621,7 +630,8 @@ engine_get_all_methods() -> PreCmds::[{unicode:chardata(), unicode:chardata()}], PostCmds::[{unicode:chardata(), unicode:chardata()}]) -> {ok, Engine::engine_ref()} | {error, Reason::term()}. -engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), is_list(PostCmds) -> +engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), + is_list(PostCmds) -> engine_load(EngineId, PreCmds, PostCmds, engine_get_all_methods()). %%---------------------------------------------------------------------- @@ -638,28 +648,26 @@ engine_load(EngineId, PreCmds, PostCmds, EngineMethods) when is_list(PreCmds), ok = notsup_to_error(engine_load_dynamic_nif()), case notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) of {ok, Engine} -> - ok = engine_load_1(Engine, PreCmds, PostCmds, EngineMethods), - {ok, Engine}; + engine_load_1(Engine, PreCmds, PostCmds, EngineMethods); {error, Error1} -> {error, Error1} end catch - throw:Error2 -> - Error2 + throw:Error2 -> + Error2 end. engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> try ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds), 0)), - ok = engine_nif_wrapper(engine_add_nif(Engine)), ok = engine_nif_wrapper(engine_init_nif(Engine)), engine_load_2(Engine, PostCmds, EngineMethods), - ok + {ok, Engine} catch - throw:Error -> - %% The engine couldn't initialise, release the structural reference - ok = engine_free_nif(Engine), - throw(Error) + throw:Error -> + %% The engine couldn't initialise, release the structural reference + ok = engine_free_nif(Engine), + throw(Error) end. engine_load_2(Engine, PostCmds, EngineMethods) -> @@ -689,7 +697,6 @@ engine_unload(Engine, EngineMethods) -> try [ok = engine_nif_wrapper(engine_unregister_nif(Engine, engine_method_atom_to_int(Method))) || Method <- EngineMethods], - ok = engine_nif_wrapper(engine_remove_nif(Engine)), %% Release the functional reference from engine_init_nif ok = engine_nif_wrapper(engine_finish_nif(Engine)), %% Release the structural reference from engine_by_id_nif @@ -699,6 +706,41 @@ engine_unload(Engine, EngineMethods) -> Error end. +%%---------------------------------------------------------------------- +%% Function: engine_by_id/1 +%%---------------------------------------------------------------------- +engine_by_id(EngineId) -> + try + notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) + catch + throw:Error -> + Error + end. + +%%---------------------------------------------------------------------- +%% Function: engine_add/1 +%%---------------------------------------------------------------------- +engine_add(Engine) -> + notsup_to_error(engine_add_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_remove/1 +%%---------------------------------------------------------------------- +engine_remove(Engine) -> + notsup_to_error(engine_remove_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_get_id/1 +%%---------------------------------------------------------------------- +engine_get_id(Engine) -> + notsup_to_error(engine_get_id_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_get_name/1 +%%---------------------------------------------------------------------- +engine_get_name(Engine) -> + notsup_to_error(engine_get_name_nif(Engine)). + %%---------------------------------------------------------------------- %% Function: engine_list/0 %%---------------------------------------------------------------------- @@ -710,9 +752,9 @@ engine_list() -> []; {ok, Engine} -> case notsup_to_error(engine_get_id_nif(Engine)) of - {ok, <<>>} -> + <<>> -> engine_list(Engine, []); - {ok, EngineId} -> + EngineId -> engine_list(Engine, [EngineId]) end end. @@ -723,9 +765,9 @@ engine_list(Engine0, IdList) -> lists:reverse(IdList); {ok, Engine1} -> case notsup_to_error(engine_get_id_nif(Engine1)) of - {ok, <<>>} -> + <<>> -> engine_list(Engine1, IdList); - {ok, EngineId} -> + EngineId -> engine_list(Engine1, [EngineId |IdList]) end end. @@ -734,7 +776,7 @@ engine_list(Engine0, IdList) -> %% Function: engine_ctrl_cmd_string/3 %%---------------------------------------------------------------------- -spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), + CmdName::unicode:chardata(), CmdArg::unicode:chardata()) -> ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> @@ -744,13 +786,13 @@ engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> %% Function: engine_ctrl_cmd_string/4 %%---------------------------------------------------------------------- -spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), + CmdName::unicode:chardata(), CmdArg::unicode:chardata(), Optional::boolean()) -> ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> - case engine_ctrl_cmd_strings_nif(Engine, - ensure_bin_cmds([{CmdName, CmdArg}]), + case engine_ctrl_cmd_strings_nif(Engine, + ensure_bin_cmds([{CmdName, CmdArg}]), bool_to_int(Optional)) of ok -> ok; @@ -760,6 +802,82 @@ engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> {error, Error} end. +%%---------------------------------------------------------------------- +%% Function: ensure_engine_loaded/2 +%% Special version of load that only uses dynamic engine to load +%%---------------------------------------------------------------------- +ensure_engine_loaded(EngineId, LibPath) -> + ensure_engine_loaded(EngineId, LibPath, engine_get_all_methods()). + +%%---------------------------------------------------------------------- +%% Function: ensure_engine_loaded/3 +%% Special version of load that only uses dynamic engine to load +%%---------------------------------------------------------------------- +ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> + try + List = crypto:engine_list(), + case lists:member(EngineId, List) of + true -> + notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))); + false -> + ok = notsup_to_error(engine_load_dynamic_nif()), + case notsup_to_error(engine_by_id_nif(ensure_bin_chardata(<<"dynamic">>))) of + {ok, Engine} -> + PreCommands = [{<<"SO_PATH">>, ensure_bin_chardata(LibPath)}, + {<<"ID">>, ensure_bin_chardata(EngineId)}, + <<"LOAD">>], + ensure_engine_loaded_1(Engine, PreCommands, EngineMethods); + {error, Error1} -> + {error, Error1} + end + end + catch + throw:Error2 -> + Error2 + end. + +ensure_engine_loaded_1(Engine, PreCmds, Methods) -> + try + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds), 0)), + ok = engine_nif_wrapper(engine_add_nif(Engine)), + ok = engine_nif_wrapper(engine_init_nif(Engine)), + ensure_engine_loaded_2(Engine, Methods), + {ok, Engine} + catch + throw:Error -> + %% The engine couldn't initialise, release the structural reference + ok = engine_free_nif(Engine), + throw(Error) + end. + +ensure_engine_loaded_2(Engine, Methods) -> + try + [ok = engine_nif_wrapper(engine_register_nif(Engine, engine_method_atom_to_int(Method))) || + Method <- Methods], + ok + catch + throw:Error -> + %% The engine registration failed, release the functional reference + ok = engine_finish_nif(Engine), + throw(Error) + end. +%%---------------------------------------------------------------------- +%% Function: ensure_engine_unloaded/1 +%%---------------------------------------------------------------------- +ensure_engine_unloaded(Engine) -> + ensure_engine_unloaded(Engine, engine_get_all_methods()). + +%%---------------------------------------------------------------------- +%% Function: ensure_engine_unloaded/2 +%%---------------------------------------------------------------------- +ensure_engine_unloaded(Engine, EngineMethods) -> + case engine_remove(Engine) of + ok -> + engine_unload(Engine, EngineMethods); + {error, E} -> + {error, E} + end. + %%-------------------------------------------------------------------- %%% On load %%-------------------------------------------------------------------- @@ -827,7 +945,7 @@ path2bin(Path) when is_list(Path) -> max_bytes() -> ?MAX_BYTES_TO_NIF. -notsup_to_error(notsup) -> +notsup_to_error(notsup) -> erlang:error(notsup); notsup_to_error(Other) -> Other. @@ -1104,7 +1222,7 @@ privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> error:notsup -> {error, notsup} end. - + privkey_to_pubkey_nif(_Alg, _EngineMap) -> ?nif_stub. @@ -1266,6 +1384,7 @@ engine_unregister_nif(_Engine, _EngineMethod) -> ?nif_stub. engine_get_first_nif() -> ?nif_stub. engine_get_next_nif(_Engine) -> ?nif_stub. engine_get_id_nif(_Engine) -> ?nif_stub. +engine_get_name_nif(_Engine) -> ?nif_stub. engine_get_all_methods_nif() -> ?nif_stub. %%-------------------------------------------------------------------- @@ -1323,7 +1442,7 @@ get_test_engine() -> Type = erlang:system_info(system_architecture), LibDir = filename:join([code:priv_dir(crypto), "lib"]), ArchDir = filename:join([LibDir, Type]), - case filelib:is_dir(ArchDir) of + case filelib:is_dir(ArchDir) of true -> check_otp_test_engine(ArchDir); false -> check_otp_test_engine(LibDir) end. @@ -1341,4 +1460,3 @@ check_otp_test_engine(LibDir) -> {error, notexist} end end. - diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index f410542f72..891eaff23b 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2017-2017. All Rights Reserved. +%% Copyright Ericsson AB 2017-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -39,6 +39,10 @@ all() -> get_all_possible_methods, engine_load_all_methods, engine_load_some_methods, + multiple_engine_load, + engine_list, + get_id_and_name, + engine_by_id, bad_arguments, unknown_engine, pre_command_fail_bad_value, @@ -46,6 +50,7 @@ all() -> failed_engine_init, ctrl_cmd_string, ctrl_cmd_string_optional, + ensure_load, {group, engine_stored_key} ]. @@ -95,7 +100,7 @@ init_per_group(engine_stored_key, Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {error, notsup} -> - {skip, "Engine not supported on this OpenSSL version"}; + {skip, "Engine not supported on this SSL version"}; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"}; Other -> @@ -130,11 +135,12 @@ get_all_possible_methods() -> get_all_possible_methods(Config) when is_list(Config) -> try List = crypto:engine_get_all_methods(), + true = erlang:is_list(List), ct:log("crypto:engine_get_all_methods() -> ~p\n", [List]), ok catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. engine_load_all_methods()-> @@ -147,13 +153,12 @@ engine_load_all_methods(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, Md5Hash1 = crypto:hash(md5, "Don't panic"), Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, case crypto:engine_load(<<"dynamic">>, [{<<"SO_PATH">>, Engine}, - {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of {ok, E} -> @@ -179,7 +184,7 @@ engine_load_all_methods(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end end. @@ -193,21 +198,20 @@ engine_load_some_methods(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, Md5Hash1 = crypto:hash(md5, "Don't panic"), Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, EngineMethods = crypto:engine_get_all_methods() -- - [engine_method_dh,engine_method_rand, + [engine_method_dh, engine_method_rand, engine_method_ciphers, engine_method_store, engine_method_pkey_meths, engine_method_pkey_asn1_meths], case crypto:engine_load(<<"dynamic">>, [{<<"SO_PATH">>, Engine}, - {<<"ID">>, <<"MD5">>}, <<"LOAD">>], [], EngineMethods) of - {ok, E} -> + {ok, E} -> case crypto:hash(md5, "Don't panic") of Md5Hash1 -> ct:fail(fail_to_load_engine_still_original); @@ -230,7 +234,168 @@ engine_load_some_methods(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} + end + end. + +multiple_engine_load()-> + [{doc, "Use a dummy md5 engine that does not implement md5" + "but rather returns a static binary to test that crypto:engine_load " + "functions works when called multiple times."}]. + +multiple_engine_load(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + {ok, E1} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []), + {ok, E2} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E2), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E1), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +engine_list()-> + [{doc, "Test add and remove engine ID to the SSL internal engine list."}]. + +engine_list(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + EngineList0 = crypto:engine_list(), + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + EngineList0 = crypto:engine_list(), + ok = crypto:engine_add(E), + [<<"MD5">>] = lists:subtract(crypto:engine_list(), EngineList0), + ok = crypto:engine_remove(E), + EngineList0 = crypto:engine_list(), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +get_id_and_name()-> + [{doc, "Test fetching id and name from an engine."}]. + +get_id_and_name(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + <<"MD5">> = crypto:engine_get_id(E), + <<"MD5 test engine">> = crypto:engine_get_name(E), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +engine_by_id()-> + [{doc, "Test fetching a new reference the the engine when the" + "engine id is added to the SSL engine list."}]. + +engine_by_id(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + case crypto:engine_by_id(<<"MD5">>) of + {error,bad_engine_id} -> + ok; + {ok, _} -> + ct:fail(fail_engine_found) + end, + ok = crypto:engine_add(E), + {ok, _E1} = crypto:engine_by_id(<<"MD5">>), + ok = crypto:engine_remove(E), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} end end. @@ -244,7 +409,7 @@ bad_arguments(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try try crypto:engine_load(fail_engine, [], []) catch @@ -274,7 +439,7 @@ bad_arguments(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end end. @@ -287,7 +452,7 @@ unknown_engine(Config) when is_list(Config) -> ok catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. pre_command_fail_bad_value() -> @@ -309,7 +474,7 @@ pre_command_fail_bad_value(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. pre_command_fail_bad_key() -> @@ -332,9 +497,9 @@ pre_command_fail_bad_key(Config) when is_list(Config) -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. failed_engine_init()-> @@ -350,18 +515,20 @@ failed_engine_init(Config) when is_list(Config) -> [{<<"SO_PATH">>, Engine}, {<<"ID">>, <<"MD5">>}], []) of - {error, add_engine_failed} -> + {error, engine_init_failed} -> ok; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. +%%------------------------------------------------------------------------- +%% Test the optional flag in ctrl comands ctrl_cmd_string()-> [{doc, "Test that a not known optional ctrl comand do not fail"}]. ctrl_cmd_string(Config) when is_list(Config) -> @@ -375,22 +542,22 @@ ctrl_cmd_string(Config) when is_list(Config) -> {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of - {ok, E} -> + {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>) of ok -> ct:fail(fail_ctrl_cmd_should_fail); - {error,ctrl_cmd_failed} -> + {error,ctrl_cmd_failed} -> ok end, - ok = crypto:engine_unload(E); + ok = crypto:engine_unload(E); {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} - end. + {skip, "Engine not supported on this SSL version"} + end. ctrl_cmd_string_optional()-> [{doc, "Test that a not known optional ctrl comand do not fail"}]. @@ -405,22 +572,63 @@ ctrl_cmd_string_optional(Config) when is_list(Config) -> {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of - {ok, E} -> + {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>, true) of ok -> ok; - _ -> + _ -> ct:fail(fail_ctrl_cmd_string) end, - ok = crypto:engine_unload(E); + ok = crypto:engine_unload(E); {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} - end. + {skip, "Engine not supported on this SSL version"} + end. + +ensure_load()-> + [{doc, "Test the special ensure load function."}]. + +ensure_load(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + case crypto:ensure_engine_loaded(<<"MD5">>, Engine) of + {ok, E} -> + {ok, _E1} = crypto:ensure_engine_loaded(<<"MD5">>, Engine), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:ensure_engine_unloaded(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. %%%---------------------------------------------------------------- %%% Pub/priv key storage tests. Thoose are for testing the crypto.erl @@ -465,7 +673,7 @@ sign_verify_rsa_pwd_bad_pwd(Config) -> _ -> {fail, "PWD prot pubkey sign succeded with no pwd!"} catch error:badarg -> ok - end. + end. priv_encrypt_pub_decrypt_rsa(Config) -> Priv = #{engine => engine_ref(Config), @@ -538,7 +746,7 @@ get_pub_from_priv_key_rsa_pwd_no_pwd(Config) -> {skip, "RSA not supported"}; {error, Error} -> {fail, {wrong_error,Error}}; - Pub -> + Pub -> ct:log("rsa Pub = ~p",[Pub]), {fail, "PWD prot pubkey fetch succeded although no pwd!"} end. @@ -554,7 +762,7 @@ get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) -> {skip, "RSA not supported"}; {error, Error} -> {fail, {wrong_error,Error}}; - Pub -> + Pub -> ct:log("rsa Pub = ~p",[Pub]), {fail, "PWD prot pubkey fetch succeded with bad pwd!"} end. @@ -588,7 +796,7 @@ get_pub_from_priv_key_ecdsa(Config) -> ct:log("ecdsa Pub = ~p",[Pub]), sign_verify(ecdsa, sha, Priv, Pub) end. - + %%%================================================================ %%% Help for engine_stored_pub_priv_keys* test cases %%% -- cgit v1.2.3 From b7d7cc2c3ce83c1206c3ba98a2b90958f4c50693 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Wed, 15 Aug 2018 12:26:44 +0200 Subject: Updated the engine load functionality - engine_load/3/4 can be called multiple times for same engine if it allows it (eg doesn't contain global data) - ensure_engine_loaded/2/3 is new functions that guarantees that the engine is just loaded once by adding it to OpenSSL internal engine list and check that before loading. - ensure_engine_unloaded/1/2 is new functions that is used to unload engines loaded with ensure_engine_loaded (remove it from OpenSSL internal engine list and then unload). - new utility functions engine_by_id/1, engine_add/1, engine_remove/1, engine_get_id/1 and engine_get_name/1 Conflicts: lib/crypto/c_src/crypto.c --- lib/crypto/c_src/crypto.c | 52 +++++-- lib/crypto/doc/src/crypto.xml | 261 ++++++++++++++++++++++++++++++---- lib/crypto/doc/src/engine_load.xml | 31 ++++- lib/crypto/src/crypto.erl | 172 +++++++++++++++++++---- lib/crypto/test/engine_SUITE.erl | 278 ++++++++++++++++++++++++++++++++----- 5 files changed, 689 insertions(+), 105 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index f8d1778bb9..7f0dd28020 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -536,6 +536,7 @@ static ERL_NIF_TERM engine_remove_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE static ERL_NIF_TERM engine_get_first_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_next_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM engine_get_name_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_get_all_methods_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); /* helpers */ @@ -625,6 +626,7 @@ static ErlNifFunc nif_funcs[] = { {"engine_get_first_nif", 0, engine_get_first_nif}, {"engine_get_next_nif", 1, engine_get_next_nif}, {"engine_get_id_nif", 1, engine_get_id_nif}, + {"engine_get_name_nif", 1, engine_get_name_nif}, {"engine_get_all_methods_nif", 0, engine_get_all_methods_nif} }; @@ -4876,7 +4878,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } else { /* non-evp rsa private decrypt */ i = RSA_private_decrypt(in_bin.size, in_bin.data, - out_bin.data, rsa, crypt_opt.rsa_padding); + out_bin.data, rsa, crypt_opt.rsa_padding); if (i > 0) { ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); enif_realloc_binary(&out_bin, i); @@ -4894,7 +4896,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } else { /* non-evp rsa public decrypt */ i = RSA_public_decrypt(in_bin.size, in_bin.data, - out_bin.data, rsa, crypt_opt.rsa_padding); + out_bin.data, rsa, crypt_opt.rsa_padding); if (i > 0) { ERL_VALGRIND_MAKE_MEM_DEFINED(out_bin.data, i); enif_realloc_binary(&out_bin, i); @@ -5012,7 +5014,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI / * Example of result: { Curve = {Field, Prime, Point, Order, CoFactor} = - { + { Field = {prime_field,<<255,...,255>>}, Prime = {<<255,...,252>>, <<90,...,75>>, @@ -5025,9 +5027,9 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI Key = <<151,...,62>> } or - { + { Curve = - {characteristic_two_field, + {characteristic_two_field, M, Basis = {tpbasis, _} | {ppbasis, k1, k2, k3} @@ -5040,7 +5042,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI */ #endif } - + if (pkey) EVP_PKEY_free(pkey); return enif_make_badarg(env); } @@ -5221,7 +5223,7 @@ static ERL_NIF_TERM engine_ctrl_cmd_strings_nif(ErlNifEnv* env, int argc, const error: for(i = 0; cmds != NULL && cmds[i] != NULL; i++) - enif_free(cmds[i]); + enif_free(cmds[i]); enif_free(cmds); return ret; #else @@ -5539,7 +5541,7 @@ static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE if (!engine_id) { enif_alloc_binary(0, &engine_id_bin); engine_id_bin.size = 0; - return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); + return enif_make_binary(env, &engine_id_bin); } size = strlen(engine_id); @@ -5547,7 +5549,39 @@ static ERL_NIF_TERM engine_get_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE engine_id_bin.size = size; memcpy(engine_id_bin.data, engine_id, size); - return enif_make_tuple2(env, atom_ok, enif_make_binary(env, &engine_id_bin)); + return enif_make_binary(env, &engine_id_bin); +#else + return atom_notsup; +#endif +} + +static ERL_NIF_TERM engine_get_name_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Engine) */ +#ifdef HAS_ENGINE_SUPPORT + ErlNifBinary engine_name_bin; + const char *engine_name; + int size; + struct engine_ctx *ctx; + + // Get Engine + if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx)) { + PRINTF_ERR0("engine_get_id_nif Leaved: Parameter not an engine resource object"); + return enif_make_badarg(env); + } + + engine_name = ENGINE_get_name(ctx->engine); + if (!engine_name) { + enif_alloc_binary(0, &engine_name_bin); + engine_name_bin.size = 0; + return enif_make_binary(env, &engine_name_bin); + } + + size = strlen(engine_name); + enif_alloc_binary(size, &engine_name_bin); + engine_name_bin.size = size; + memcpy(engine_name_bin.data, engine_name, size); + + return enif_make_binary(env, &engine_name_bin); #else return atom_notsup; #endif diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 42e411a0e3..e6147ddffc 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -143,7 +143,7 @@ password => password()} engine_ref() = term() -

The result of a call to engine_load/3. +

The result of a call to for example engine_load/3.

key_id() = string() | binary() @@ -629,7 +629,7 @@

Fetches the corresponding public key from a private key stored in an Engine. The key must be of the type indicated by the Type parameter. -

+

@@ -1075,8 +1075,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Returns a list of all possible engine methods.

-

- May throw exception notsup in case there is +

+ May throw exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1092,18 +1092,18 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ EngineId = unicode:chardata() PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] - Result = {ok, Engine::term()} | {error, Reason::term()} + Result = {ok, Engine::engine_ref()} | {error, Reason::term()}

Loads the OpenSSL engine given by EngineId if it is available and then returns ok and - an engine handle. This function is the same as calling engine_load/4 with - EngineMethods set to a list of all the possible methods. An error tuple is + an engine handle. This function is the same as calling engine_load/4 with + EngineMethods set to a list of all the possible methods. An error tuple is returned if the engine can't be loaded.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1120,7 +1120,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ EngineId = unicode:chardata() PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] EngineMethods = [engine_method_type()] - Result = {ok, Engine::term()} | {error, Reason::term()} + Result = {ok, Engine::engine_ref()} | {error, Reason::term()}

@@ -1129,7 +1129,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1143,17 +1143,17 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_unload(Engine) -> Result Dynamical load an encryption engine - Engine = term() + Engine = engine_ref() Result = ok | {error, Reason::term()}

- Unloads the OpenSSL engine given by EngineId. + Unloads the OpenSSL engine given by Engine. An error tuple is returned if the engine can't be unloaded.

The function throws a badarg if the parameter is in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1164,19 +1164,24 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_list() -> Result - List the known engine ids + engine_by_id(EngineId) -> Result + Get a reference to an already loaded engine - Result = [EngineId::unicode:chardata()] + EngineID = unicode:chardata()engine_ref() + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

List the id's of all engines in OpenSSL's internal list.

- It may also throw the exception notsup in case there is + Get a reference to an already loaded engine with EngineId. + An error tuple is returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameter is in wrong format. + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

- See also the chapter Engine Load + See also the chapter Engine Load in the User's Guide.

@@ -1186,7 +1191,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> Result Sends ctrl commands to an OpenSSL engine - Engine = term() + Engine = engine_ref() CmdName = unicode:chardata() CmdArg = unicode:chardata() Result = ok | {error, Reason::term()} @@ -1194,12 +1199,12 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Sends ctrl commands to the OpenSSL engine given by Engine. - This function is the same as calling engine_ctrl_cmd_string/4 with + This function is the same as calling engine_ctrl_cmd_string/4 with Optional set to false.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1209,7 +1214,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> Result Sends ctrl commands to an OpenSSL engine - Engine = term() + Engine = engine_ref() CmdName = unicode:chardata() CmdArg = unicode:chardata() Optional = boolean() @@ -1218,18 +1223,218 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Sends ctrl commands to the OpenSSL engine given by Engine. - Optional is a boolean argument that can relax the semantics of the function. - If set to true it will only return failure if the ENGINE supported the given - command name but failed while executing it, if the ENGINE doesn't support the command - name it will simply return success without doing anything. In this case we assume + Optional is a boolean argument that can relax the semantics of the function. + If set to true it will only return failure if the ENGINE supported the given + command name but failed while executing it, if the ENGINE doesn't support the command + name it will simply return success without doing anything. In this case we assume the user is only supplying commands specific to the given ENGINE so we set this to false.

The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+ + + + engine_add(Engine) -> Result + Add engine to OpenSSL internal list + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

Add the engine to OpenSSL's internal list.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_remove(Engine) -> Result + Remove engine to OpenSSL internal list + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

Remove the engine from OpenSSL's internal list.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_get_id(Engine) -> EngineId + Fetch engine ID + + Engine = engine_ref() + EngineId = unicode:chardata() + + +

Return the ID for the engine, or an empty binary if there is no id set.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_get_name(Engine) -> EngineName + Fetch engine name + + Engine = engine_ref() + EngineName = unicode:chardata() + + +

Return the name (eg a description) for the engine, or an empty binary if there is no name set.

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+
+
+ + + engine_list() -> Result + List the known engine ids + + Result = [EngineId::unicode:chardata()] + + +

List the id's of all engines in OpenSSL's internal list.

+

+ It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+

+ May throw exception notsup in case engine functionality is not supported by the underlying + OpenSSL implementation. +

+
+
+ + + ensure_engine_loaded(EngineId, LibPath) -> Result + Ensure encryption engine just loaded once + + EngineId = unicode:chardata() + LibPath = unicode:chardata() + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId and the path to the dynamic library + implementing the engine. This function is the same as calling ensure_engine_loaded/3 with + EngineMethods set to a list of all the possible methods. An error tuple is + returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is no engine support in the underlying OpenSSL implementation.

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> Result + Ensure encryption engine just loaded once + + EngineId = unicode:chardata() + LibPath = unicode:chardata() + EngineMethods = [engine_method_type()] + Result = {ok, Engine::engine_ref()} | {error, Reason::term()} + + +

+ Loads the OpenSSL engine given by EngineId and the path to the dynamic library + implementing the engine. This function differs from the normal engine_load in that sense it + also add the engine id to the internal list in OpenSSL. Then in the following calls to the function + it just fetch the reference to the engine instead of loading it again. + An error tuple is returned if the engine can't be loaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_unloaded(Engine) -> Result + Unload an engine loaded with the ensure function + + Engine = engine_ref() + Result = ok | {error, Reason::term()} + + +

+ Unloads an engine loaded with the ensure_engine_loaded function. + It both removes the label from the OpenSSL internal engine list and unloads the engine. + This function is the same as calling ensure_engine_unloaded/2 with + EngineMethods set to a list of all the possible methods. An error tuple is + returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

+
+
+ + + ensure_engine_unloaded(Engine, EngineMethods) -> Result + Unload an engine loaded with the ensure function + + Engine = engine_ref() + EngineMethods = [engine_method_type()] + Result = ok | {error, Reason::term()} + + +

+ Unloads an engine loaded with the ensure_engine_loaded function. + It both removes the label from the OpenSSL internal engine list and unloads the engine. + An error tuple is returned if the engine can't be unloaded. +

+

+ The function throws a badarg if the parameters are in wrong format. + It may also throw the exception notsup in case there is + no engine support in the underlying OpenSSL implementation. +

+

+ See also the chapter Engine Load + in the User's Guide. +

diff --git a/lib/crypto/doc/src/engine_load.xml b/lib/crypto/doc/src/engine_load.xml index e5c3f5d561..3d0aa0c32a 100644 --- a/lib/crypto/doc/src/engine_load.xml +++ b/lib/crypto/doc/src/engine_load.xml @@ -42,6 +42,9 @@ operations. The hardware implementation usually offers improved performance over its software-based counterpart, which is known as cryptographic acceleration.

+ +

The file name requirement on the engine dynamic library can differ between SSL versions.

+
@@ -54,9 +57,6 @@ 1> {ok, Engine} = crypto:engine_load(<<"otp_test_engine">>, [], []). {ok, #Ref} - -

The file name requirement on the engine dynamic library can differ between SSL versions.

-
@@ -72,9 +72,6 @@ <<"LOAD">>], []). {ok, #Ref} - -

The dynamic engine is not supported in LibreSSL from version 2.2.1

-
@@ -99,6 +96,28 @@ engine_method_pkey_meths, engine_method_pkey_asn1_meths]. {ok, #Ref}
+
+ Load with the ensure loaded function +

+ This function makes sure the engine is loaded just once and the ID is added to the internal + engine list of OpenSSL. The following calls to the function will check if the ID is loaded + and then just get a new reference to the engine. +

+ + 5> {ok, Engine} = crypto:ensure_engine_loaded(<<"MD5">>, + <<"/some/path/otp_test_engine.so">>). + {ok, #Ref} +

+ To unload it use crypto:ensure_engine_unloaded/1 which removes the ID from the internal list + before unloading the engine. +

+ + 6> crypto:ensure_engine_unloaded(<<"MD5">>). + ok +
+ + +
List all engines currently loaded diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 714cba58b9..11e5ab327d 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -51,9 +51,18 @@ engine_load/3, engine_load/4, engine_unload/1, + engine_by_id/1, engine_list/0, engine_ctrl_cmd_string/3, - engine_ctrl_cmd_string/4 + engine_ctrl_cmd_string/4, + engine_add/1, + engine_remove/1, + engine_get_id/1, + engine_get_name/1, + ensure_engine_loaded/2, + ensure_engine_loaded/3, + ensure_engine_unloaded/1, + ensure_engine_unloaded/2 ]). -export_type([engine_ref/0, @@ -488,7 +497,7 @@ sign(Algorithm, Type, Data, Key, Options) -> -type engine_key_ref() :: #{engine := engine_ref(), key_id := key_id(), password => password(), - term() => term() + term() => term() }. -type pk_algs() :: rsa | ecdsa | dss . @@ -664,7 +673,7 @@ evp_compute_key_nif(_Curve, _OthersBin, _MyBin) -> ?nif_stub. -type engine_method_type() :: engine_method_rsa | engine_method_dsa | engine_method_dh | engine_method_rand | engine_method_ecdh | engine_method_ecdsa | engine_method_ciphers | engine_method_digests | engine_method_store | - engine_method_pkey_meths | engine_method_pkey_asn1_meths | + engine_method_pkey_meths | engine_method_pkey_asn1_meths | engine_method_ec. -type engine_ref() :: term(). @@ -681,7 +690,8 @@ engine_get_all_methods() -> PreCmds::[{unicode:chardata(), unicode:chardata()}], PostCmds::[{unicode:chardata(), unicode:chardata()}]) -> {ok, Engine::engine_ref()} | {error, Reason::term()}. -engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), is_list(PostCmds) -> +engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), + is_list(PostCmds) -> engine_load(EngineId, PreCmds, PostCmds, engine_get_all_methods()). %%---------------------------------------------------------------------- @@ -698,28 +708,26 @@ engine_load(EngineId, PreCmds, PostCmds, EngineMethods) when is_list(PreCmds), ok = notsup_to_error(engine_load_dynamic_nif()), case notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) of {ok, Engine} -> - ok = engine_load_1(Engine, PreCmds, PostCmds, EngineMethods), - {ok, Engine}; + engine_load_1(Engine, PreCmds, PostCmds, EngineMethods); {error, Error1} -> {error, Error1} end catch - throw:Error2 -> - Error2 + throw:Error2 -> + Error2 end. engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> try ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds), 0)), - ok = engine_nif_wrapper(engine_add_nif(Engine)), ok = engine_nif_wrapper(engine_init_nif(Engine)), engine_load_2(Engine, PostCmds, EngineMethods), - ok + {ok, Engine} catch - throw:Error -> - %% The engine couldn't initialise, release the structural reference - ok = engine_free_nif(Engine), - throw(Error) + throw:Error -> + %% The engine couldn't initialise, release the structural reference + ok = engine_free_nif(Engine), + throw(Error) end. engine_load_2(Engine, PostCmds, EngineMethods) -> @@ -749,7 +757,6 @@ engine_unload(Engine, EngineMethods) -> try [ok = engine_nif_wrapper(engine_unregister_nif(Engine, engine_method_atom_to_int(Method))) || Method <- EngineMethods], - ok = engine_nif_wrapper(engine_remove_nif(Engine)), %% Release the functional reference from engine_init_nif ok = engine_nif_wrapper(engine_finish_nif(Engine)), %% Release the structural reference from engine_by_id_nif @@ -759,6 +766,41 @@ engine_unload(Engine, EngineMethods) -> Error end. +%%---------------------------------------------------------------------- +%% Function: engine_by_id/1 +%%---------------------------------------------------------------------- +engine_by_id(EngineId) -> + try + notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) + catch + throw:Error -> + Error + end. + +%%---------------------------------------------------------------------- +%% Function: engine_add/1 +%%---------------------------------------------------------------------- +engine_add(Engine) -> + notsup_to_error(engine_add_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_remove/1 +%%---------------------------------------------------------------------- +engine_remove(Engine) -> + notsup_to_error(engine_remove_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_get_id/1 +%%---------------------------------------------------------------------- +engine_get_id(Engine) -> + notsup_to_error(engine_get_id_nif(Engine)). + +%%---------------------------------------------------------------------- +%% Function: engine_get_name/1 +%%---------------------------------------------------------------------- +engine_get_name(Engine) -> + notsup_to_error(engine_get_name_nif(Engine)). + %%---------------------------------------------------------------------- %% Function: engine_list/0 %%---------------------------------------------------------------------- @@ -770,9 +812,9 @@ engine_list() -> []; {ok, Engine} -> case notsup_to_error(engine_get_id_nif(Engine)) of - {ok, <<>>} -> + <<>> -> engine_list(Engine, []); - {ok, EngineId} -> + EngineId -> engine_list(Engine, [EngineId]) end end. @@ -783,9 +825,9 @@ engine_list(Engine0, IdList) -> lists:reverse(IdList); {ok, Engine1} -> case notsup_to_error(engine_get_id_nif(Engine1)) of - {ok, <<>>} -> + <<>> -> engine_list(Engine1, IdList); - {ok, EngineId} -> + EngineId -> engine_list(Engine1, [EngineId |IdList]) end end. @@ -794,7 +836,7 @@ engine_list(Engine0, IdList) -> %% Function: engine_ctrl_cmd_string/3 %%---------------------------------------------------------------------- -spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), + CmdName::unicode:chardata(), CmdArg::unicode:chardata()) -> ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> @@ -804,13 +846,13 @@ engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> %% Function: engine_ctrl_cmd_string/4 %%---------------------------------------------------------------------- -spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), + CmdName::unicode:chardata(), CmdArg::unicode:chardata(), Optional::boolean()) -> ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> - case engine_ctrl_cmd_strings_nif(Engine, - ensure_bin_cmds([{CmdName, CmdArg}]), + case engine_ctrl_cmd_strings_nif(Engine, + ensure_bin_cmds([{CmdName, CmdArg}]), bool_to_int(Optional)) of ok -> ok; @@ -820,6 +862,82 @@ engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> {error, Error} end. +%%---------------------------------------------------------------------- +%% Function: ensure_engine_loaded/2 +%% Special version of load that only uses dynamic engine to load +%%---------------------------------------------------------------------- +ensure_engine_loaded(EngineId, LibPath) -> + ensure_engine_loaded(EngineId, LibPath, engine_get_all_methods()). + +%%---------------------------------------------------------------------- +%% Function: ensure_engine_loaded/3 +%% Special version of load that only uses dynamic engine to load +%%---------------------------------------------------------------------- +ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> + try + List = crypto:engine_list(), + case lists:member(EngineId, List) of + true -> + notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))); + false -> + ok = notsup_to_error(engine_load_dynamic_nif()), + case notsup_to_error(engine_by_id_nif(ensure_bin_chardata(<<"dynamic">>))) of + {ok, Engine} -> + PreCommands = [{<<"SO_PATH">>, ensure_bin_chardata(LibPath)}, + {<<"ID">>, ensure_bin_chardata(EngineId)}, + <<"LOAD">>], + ensure_engine_loaded_1(Engine, PreCommands, EngineMethods); + {error, Error1} -> + {error, Error1} + end + end + catch + throw:Error2 -> + Error2 + end. + +ensure_engine_loaded_1(Engine, PreCmds, Methods) -> + try + ok = engine_nif_wrapper(engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds(PreCmds), 0)), + ok = engine_nif_wrapper(engine_add_nif(Engine)), + ok = engine_nif_wrapper(engine_init_nif(Engine)), + ensure_engine_loaded_2(Engine, Methods), + {ok, Engine} + catch + throw:Error -> + %% The engine couldn't initialise, release the structural reference + ok = engine_free_nif(Engine), + throw(Error) + end. + +ensure_engine_loaded_2(Engine, Methods) -> + try + [ok = engine_nif_wrapper(engine_register_nif(Engine, engine_method_atom_to_int(Method))) || + Method <- Methods], + ok + catch + throw:Error -> + %% The engine registration failed, release the functional reference + ok = engine_finish_nif(Engine), + throw(Error) + end. +%%---------------------------------------------------------------------- +%% Function: ensure_engine_unloaded/1 +%%---------------------------------------------------------------------- +ensure_engine_unloaded(Engine) -> + ensure_engine_unloaded(Engine, engine_get_all_methods()). + +%%---------------------------------------------------------------------- +%% Function: ensure_engine_unloaded/2 +%%---------------------------------------------------------------------- +ensure_engine_unloaded(Engine, EngineMethods) -> + case engine_remove(Engine) of + ok -> + engine_unload(Engine, EngineMethods); + {error, E} -> + {error, E} + end. + %%-------------------------------------------------------------------- %%% On load %%-------------------------------------------------------------------- @@ -892,7 +1010,7 @@ path2bin(Path) when is_list(Path) -> max_bytes() -> ?MAX_BYTES_TO_NIF. -notsup_to_error(notsup) -> +notsup_to_error(notsup) -> erlang:error(notsup); notsup_to_error(Other) -> Other. @@ -1148,7 +1266,7 @@ privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> error:notsup -> {error, notsup} end. - + privkey_to_pubkey_nif(_Alg, _EngineMap) -> ?nif_stub. @@ -1314,6 +1432,7 @@ engine_unregister_nif(_Engine, _EngineMethod) -> ?nif_stub. engine_get_first_nif() -> ?nif_stub. engine_get_next_nif(_Engine) -> ?nif_stub. engine_get_id_nif(_Engine) -> ?nif_stub. +engine_get_name_nif(_Engine) -> ?nif_stub. engine_get_all_methods_nif() -> ?nif_stub. %%-------------------------------------------------------------------- @@ -1371,7 +1490,7 @@ get_test_engine() -> Type = erlang:system_info(system_architecture), LibDir = filename:join([code:priv_dir(crypto), "lib"]), ArchDir = filename:join([LibDir, Type]), - case filelib:is_dir(ArchDir) of + case filelib:is_dir(ArchDir) of true -> check_otp_test_engine(ArchDir); false -> check_otp_test_engine(LibDir) end. @@ -1389,4 +1508,3 @@ check_otp_test_engine(LibDir) -> {error, notexist} end end. - diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index f708d7272d..b083b30d70 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -39,6 +39,10 @@ all() -> get_all_possible_methods, engine_load_all_methods, engine_load_some_methods, + multiple_engine_load, + engine_list, + get_id_and_name, + engine_by_id, bad_arguments, unknown_engine, pre_command_fail_bad_value, @@ -46,6 +50,7 @@ all() -> failed_engine_init, ctrl_cmd_string, ctrl_cmd_string_optional, + ensure_load, {group, engine_stored_key} ]. @@ -97,7 +102,7 @@ init_per_group(engine_stored_key, Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {error, notsup} -> - {skip, "Engine not supported on this OpenSSL version"}; + {skip, "Engine not supported on this SSL version"}; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"}; Other -> @@ -132,11 +137,12 @@ get_all_possible_methods() -> get_all_possible_methods(Config) when is_list(Config) -> try List = crypto:engine_get_all_methods(), + true = erlang:is_list(List), ct:log("crypto:engine_get_all_methods() -> ~p\n", [List]), ok catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. engine_load_all_methods()-> @@ -149,13 +155,12 @@ engine_load_all_methods(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, Md5Hash1 = crypto:hash(md5, "Don't panic"), Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, case crypto:engine_load(<<"dynamic">>, [{<<"SO_PATH">>, Engine}, - {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of {ok, E} -> @@ -181,7 +186,7 @@ engine_load_all_methods(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end end. @@ -195,21 +200,20 @@ engine_load_some_methods(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, Md5Hash1 = crypto:hash(md5, "Don't panic"), Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, EngineMethods = crypto:engine_get_all_methods() -- - [engine_method_dh,engine_method_rand, + [engine_method_dh, engine_method_rand, engine_method_ciphers, engine_method_store, engine_method_pkey_meths, engine_method_pkey_asn1_meths], case crypto:engine_load(<<"dynamic">>, [{<<"SO_PATH">>, Engine}, - {<<"ID">>, <<"MD5">>}, <<"LOAD">>], [], EngineMethods) of - {ok, E} -> + {ok, E} -> case crypto:hash(md5, "Don't panic") of Md5Hash1 -> ct:fail(fail_to_load_engine_still_original); @@ -232,7 +236,168 @@ engine_load_some_methods(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} + end + end. + +multiple_engine_load()-> + [{doc, "Use a dummy md5 engine that does not implement md5" + "but rather returns a static binary to test that crypto:engine_load " + "functions works when called multiple times."}]. + +multiple_engine_load(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + {ok, E1} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []), + {ok, E2} = crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E2), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:engine_unload(E1), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +engine_list()-> + [{doc, "Test add and remove engine ID to the SSL internal engine list."}]. + +engine_list(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + EngineList0 = crypto:engine_list(), + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + EngineList0 = crypto:engine_list(), + ok = crypto:engine_add(E), + [<<"MD5">>] = lists:subtract(crypto:engine_list(), EngineList0), + ok = crypto:engine_remove(E), + EngineList0 = crypto:engine_list(), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +get_id_and_name()-> + [{doc, "Test fetching id and name from an engine."}]. + +get_id_and_name(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + <<"MD5">> = crypto:engine_get_id(E), + <<"MD5 test engine">> = crypto:engine_get_name(E), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. + +engine_by_id()-> + [{doc, "Test fetching a new reference the the engine when the" + "engine id is added to the SSL engine list."}]. + +engine_by_id(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + case crypto:engine_load(<<"dynamic">>, + [{<<"SO_PATH">>, Engine}, + <<"LOAD">>], + []) of + {ok, E} -> + case crypto:engine_by_id(<<"MD5">>) of + {error,bad_engine_id} -> + ok; + {ok, _} -> + ct:fail(fail_engine_found) + end, + ok = crypto:engine_add(E), + {ok, _E1} = crypto:engine_by_id(<<"MD5">>), + ok = crypto:engine_remove(E), + ok = crypto:engine_unload(E); + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} end end. @@ -246,7 +411,7 @@ bad_arguments(Config) when is_list(Config) -> {error, notexist} -> {skip, "OTP Test engine not found"}; {ok, Engine} -> - try + try try crypto:engine_load(fail_engine, [], []) catch @@ -276,7 +441,7 @@ bad_arguments(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end end. @@ -289,7 +454,7 @@ unknown_engine(Config) when is_list(Config) -> ok catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. pre_command_fail_bad_value() -> @@ -311,7 +476,7 @@ pre_command_fail_bad_value(Config) when is_list(Config) -> end catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. pre_command_fail_bad_key() -> @@ -334,9 +499,9 @@ pre_command_fail_bad_key(Config) when is_list(Config) -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. failed_engine_init()-> @@ -352,18 +517,20 @@ failed_engine_init(Config) when is_list(Config) -> [{<<"SO_PATH">>, Engine}, {<<"ID">>, <<"MD5">>}], []) of - {error, add_engine_failed} -> + {error, engine_init_failed} -> ok; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} + {skip, "Engine not supported on this SSL version"} end. +%%------------------------------------------------------------------------- +%% Test the optional flag in ctrl comands ctrl_cmd_string()-> [{doc, "Test that a not known optional ctrl comand do not fail"}]. ctrl_cmd_string(Config) when is_list(Config) -> @@ -377,22 +544,22 @@ ctrl_cmd_string(Config) when is_list(Config) -> {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of - {ok, E} -> + {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>) of ok -> ct:fail(fail_ctrl_cmd_should_fail); - {error,ctrl_cmd_failed} -> + {error,ctrl_cmd_failed} -> ok end, - ok = crypto:engine_unload(E); + ok = crypto:engine_unload(E); {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} - end. + {skip, "Engine not supported on this SSL version"} + end. ctrl_cmd_string_optional()-> [{doc, "Test that a not known optional ctrl comand do not fail"}]. @@ -407,22 +574,63 @@ ctrl_cmd_string_optional(Config) when is_list(Config) -> {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) of - {ok, E} -> + {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>, true) of ok -> ok; - _ -> + _ -> ct:fail(fail_ctrl_cmd_string) end, - ok = crypto:engine_unload(E); + ok = crypto:engine_unload(E); {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end end - catch + catch error:notsup -> - {skip, "Engine not supported on this OpenSSL version"} - end. + {skip, "Engine not supported on this SSL version"} + end. + +ensure_load()-> + [{doc, "Test the special ensure load function."}]. + +ensure_load(Config) when is_list(Config) -> + case crypto:get_test_engine() of + {error, notexist} -> + {skip, "OTP Test engine not found"}; + {ok, Engine} -> + try + Md5Hash1 = <<106,30,3,246,166,222,229,158,244,217,241,179,50,232,107,109>>, + Md5Hash1 = crypto:hash(md5, "Don't panic"), + Md5Hash2 = <<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15>>, + case crypto:ensure_engine_loaded(<<"MD5">>, Engine) of + {ok, E} -> + {ok, _E1} = crypto:ensure_engine_loaded(<<"MD5">>, Engine), + case crypto:hash(md5, "Don't panic") of + Md5Hash1 -> + ct:fail(fail_to_load_still_original_engine); + Md5Hash2 -> + ok; + _ -> + ct:fail(fail_to_load_engine) + end, + ok = crypto:ensure_engine_unloaded(E), + case crypto:hash(md5, "Don't panic") of + Md5Hash2 -> + ct:fail(fail_to_unload_still_test_engine); + Md5Hash1 -> + ok; + _ -> + ct:fail(fail_to_unload_engine) + end; + {error, bad_engine_id} -> + {skip, "Dynamic Engine not supported"} + end + catch + error:notsup -> + {skip, "Engine not supported on this SSL version"} + end + end. %%%---------------------------------------------------------------- %%% Pub/priv key storage tests. Thoose are for testing the crypto.erl @@ -467,7 +675,7 @@ sign_verify_rsa_pwd_bad_pwd(Config) -> _ -> {fail, "PWD prot pubkey sign succeded with no pwd!"} catch error:badarg -> ok - end. + end. priv_encrypt_pub_decrypt_rsa(Config) -> Priv = #{engine => engine_ref(Config), @@ -540,7 +748,7 @@ get_pub_from_priv_key_rsa_pwd_no_pwd(Config) -> {skip, "RSA not supported"}; {error, Error} -> {fail, {wrong_error,Error}}; - Pub -> + Pub -> ct:log("rsa Pub = ~p",[Pub]), {fail, "PWD prot pubkey fetch succeded although no pwd!"} end. @@ -556,7 +764,7 @@ get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) -> {skip, "RSA not supported"}; {error, Error} -> {fail, {wrong_error,Error}}; - Pub -> + Pub -> ct:log("rsa Pub = ~p",[Pub]), {fail, "PWD prot pubkey fetch succeded with bad pwd!"} end. @@ -590,7 +798,7 @@ get_pub_from_priv_key_ecdsa(Config) -> ct:log("ecdsa Pub = ~p",[Pub]), sign_verify(ecdsa, sha, Priv, Pub) end. - + %%%================================================================ %%% Help for engine_stored_pub_priv_keys* test cases %%% -- cgit v1.2.3 From 7baf76378a2a2f8e0c5ded7d7b9278f48e2b2573 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 23 Aug 2018 08:00:44 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 31 +++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 0f8c50a35d..21ce2891dc 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,37 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.2.2.2 + +
Improvements and New Features + + +

Update the crypto engine functions to handle multiple + loads of an engine.

engine_load/3/4 is + updated so it doesn't add the engine ID to OpenSSLs + internal list of engines which makes it possible to run + the engine_load more than once if it doesn't contain + global data.

Added ensure_engine_loaded/2/3 + which guarantees that the engine just is loaded once and + the following calls just returns a reference to it. This + is done by add the ID to the internal OpenSSL list and + check if it is already registered when the function is + called.

Added ensure_engine_unloaded/1/2 to + unload engines loaded with ensure_engine_loaded.

+

Then some more utility functions are added.

+

engine_add/1, adds the engine to OpenSSL + internal list

engine_remove/1, remove the + engine from OpenSSL internal list

+

engine_get_id/1, fetch the engines id

+

engine_get_name/1, fetch the engine name

+

+ Own Id: OTP-15233

+
+
+
+ +
+
Crypto 4.2.2.1
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 93a97ec88b..fe9c19b971 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.2.2.1 +CRYPTO_VSN = 4.2.2.2 -- cgit v1.2.3 From 91ae48fedc6986a19c6d79c4371b743e8b39ab31 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 28 Jun 2018 17:49:34 +0200 Subject: crypto: Mac POLY1305 if >=OpenSSL 1.1.1-pre8 --- lib/crypto/c_src/crypto.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 9 +++++- 2 files changed, 79 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 72aa44e7db..41277ada60 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -183,6 +183,13 @@ # endif #endif +// OPENSSL_VERSION_NUMBER >= 1.1.1-pre8 +#if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1)-7) +# ifndef HAS_LIBRESSL +# define HAVE_POLY1305 +# endif +#endif + #if OPENSSL_VERSION_NUMBER <= PACKED_OPENSSL_VERSION(0,9,8,'l') # define HAVE_ECB_IVEC_BUG #endif @@ -524,6 +531,8 @@ static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_N static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM poly1305_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_finish_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -614,6 +623,8 @@ static ErlNifFunc nif_funcs[] = { {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt}, + {"poly1305_nif", 2, poly1305_nif}, + {"engine_by_id_nif", 1, engine_by_id_nif}, {"engine_init_nif", 1, engine_init_nif}, {"engine_finish_nif", 1, engine_finish_nif}, @@ -1246,7 +1257,7 @@ static ERL_NIF_TERM algo_pubkey[11]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ static int algo_mac_cnt, algo_mac_fips_cnt; -static ERL_NIF_TERM algo_mac[2]; /* increase when extending the list */ +static ERL_NIF_TERM algo_mac[3]; /* increase when extending the list */ static int algo_curve_cnt, algo_curve_fips_cnt; static ERL_NIF_TERM algo_curve[87]; /* increase when extending the list */ @@ -1340,6 +1351,9 @@ static void init_algorithms_types(ErlNifEnv* env) algo_mac[algo_mac_cnt++] = enif_make_atom(env,"hmac"); #ifdef HAVE_CMAC algo_mac[algo_mac_cnt++] = enif_make_atom(env,"cmac"); +#endif +#ifdef HAVE_POLY1305 + algo_mac[algo_mac_cnt++] = enif_make_atom(env,"poly1305"); #endif // Non-validated algorithms follow algo_mac_fips_cnt = algo_mac_cnt; @@ -2082,6 +2096,62 @@ static ERL_NIF_TERM cmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[] #endif } +/* For OpenSSL >= 1.1.1 the hmac_nif and cmac_nif could be integrated into poly1305 (with 'type' as parameter) */ +static ERL_NIF_TERM poly1305_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Key, Text) */ +#ifdef HAVE_POLY1305 + ErlNifBinary key_bin, text, ret_bin; + ERL_NIF_TERM ret = atom_error; + EVP_PKEY *key = NULL; + EVP_MD_CTX *mctx = NULL; + EVP_PKEY_CTX *pctx = NULL; + const EVP_MD *md = NULL; + size_t size; + int type; + + type = EVP_PKEY_POLY1305; + + if (!enif_inspect_binary(env, argv[0], &key_bin) || + !(key_bin.size == 32) ) { + return enif_make_badarg(env); + } + + if (!enif_inspect_binary(env, argv[1], &text) ) { + return enif_make_badarg(env); + } + + key = EVP_PKEY_new_raw_private_key(type, /*engine*/ NULL, key_bin.data, key_bin.size); + + if (!key || + !(mctx = EVP_MD_CTX_new()) || + !EVP_DigestSignInit(mctx, &pctx, md, /*engine*/ NULL, key) || + !EVP_DigestSignUpdate(mctx, text.data, text.size)) { + goto err; + } + + if (!EVP_DigestSignFinal(mctx, NULL, &size) || + !enif_alloc_binary(size, &ret_bin) || + !EVP_DigestSignFinal(mctx, ret_bin.data, &size)) { + goto err; + } + + if ((size != ret_bin.size) && + !enif_realloc_binary(&ret_bin, size)) { + goto err; + } + + ret = enif_make_binary(env, &ret_bin); + + err: + EVP_MD_CTX_free(mctx); + EVP_PKEY_free(key); + return ret; + +#else + return atom_notsup; +#endif +} + static ERL_NIF_TERM block_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Key, Ivec, Text, IsEncrypt) or (Type, Key, Text, IsEncrypt) */ struct cipher_type_t *cipherp = NULL; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 81ab4e5ea1..3774f936e7 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -29,6 +29,7 @@ -export([generate_key/2, generate_key/3, compute_key/4]). -export([hmac/3, hmac/4, hmac_init/2, hmac_update/2, hmac_final/1, hmac_final_n/2]). -export([cmac/3, cmac/4]). +-export([poly1305/2]). -export([exor/2, strong_rand_bytes/1, mod_pow/3]). -export([rand_seed/0, rand_seed_alg/1]). -export([rand_seed_s/0, rand_seed_alg_s/1]). @@ -194,6 +195,9 @@ cmac(Type, Key, Data) -> cmac(Type, Key, Data, MacSize) -> erlang:binary_part(cmac(Type, Key, Data), 0, MacSize). +poly1305(Key, Data) -> + poly1305_nif(Key, Data). + %% Ecrypt/decrypt %%% -spec block_encrypt(des_cbc | des_cfb | @@ -1060,9 +1064,12 @@ hmac_final_nif(_Context) -> ?nif_stub. hmac_final_nif(_Context, _MacSize) -> ?nif_stub. %% CMAC - cmac_nif(_Type, _Key, _Data) -> ?nif_stub. +%% POLY1305 +poly1305_nif(_Key, _Data) -> ?nif_stub. + + %% CIPHERS -------------------------------------------------------------------- block_crypt_nif(_Type, _Key, _Ivec, _Text, _IsEncrypt) -> ?nif_stub. -- cgit v1.2.3 From b477eba47bda21a034c7610fdb41e6fd005b83df Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 31 Jul 2018 16:21:43 +0200 Subject: crypto: chacha20 cipher --- lib/crypto/c_src/crypto.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 22 ++++++++++++-- 2 files changed, 94 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 41277ada60..d409ea7dcf 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -178,6 +178,7 @@ #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0) # ifndef HAS_LIBRESSL +# define HAVE_CHACHA20 # define HAVE_CHACHA20_POLY1305 # define HAVE_RSA_OAEP_MD # endif @@ -531,6 +532,9 @@ static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_N static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM chacha20_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM chacha20_stream_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM poly1305_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM engine_by_id_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -623,6 +627,10 @@ static ErlNifFunc nif_funcs[] = { {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt}, + {"chacha20_stream_init", 2, chacha20_stream_init}, + {"chacha20_stream_encrypt", 2, chacha20_stream_crypt}, + {"chacha20_stream_decrypt", 2, chacha20_stream_crypt}, + {"poly1305_nif", 2, poly1305_nif}, {"engine_by_id_nif", 1, engine_by_id_nif}, @@ -1345,7 +1353,10 @@ static void init_algorithms_types(ErlNifEnv* env) #if defined(HAVE_CHACHA20_POLY1305) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"chacha20_poly1305"); #endif - +#if defined(HAVE_CHACHA20) + algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"chacha20"); +#endif + // Validated algorithms first algo_mac_cnt = 0; algo_mac[algo_mac_cnt++] = enif_make_atom(env,"hmac"); @@ -2736,6 +2747,69 @@ out_err: #endif } + +static ERL_NIF_TERM chacha20_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Key, IV) */ +#if defined(HAVE_CHACHA20) + ErlNifBinary key_bin, ivec_bin; + struct evp_cipher_ctx *ctx; + const EVP_CIPHER *cipher; + ERL_NIF_TERM ret; + + if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin) + || !enif_inspect_binary(env, argv[1], &ivec_bin) + || key_bin.size != 32 + || ivec_bin.size != 16) { + return enif_make_badarg(env); + } + + cipher = EVP_chacha20(); + + ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx)); + ctx->ctx = EVP_CIPHER_CTX_new(); + + + EVP_CipherInit_ex(ctx->ctx, cipher, NULL, + key_bin.data, ivec_bin.data, 1); + EVP_CIPHER_CTX_set_padding(ctx->ctx, 0); + ret = enif_make_resource(env, ctx); + enif_release_resource(ctx); + return ret; +#else + return enif_raise_exception(env, atom_notsup); +#endif +}; + +static ERL_NIF_TERM chacha20_stream_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (State, Data) */ +#if defined(HAVE_CHACHA20) + struct evp_cipher_ctx *ctx, *new_ctx; + ErlNifBinary data_bin; + ERL_NIF_TERM ret, cipher_term; + unsigned char *out; + int outl = 0; + + if (!enif_get_resource(env, argv[0], evp_cipher_ctx_rtype, (void**)&ctx) + || !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) { + return enif_make_badarg(env); + } + new_ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx)); + new_ctx->ctx = EVP_CIPHER_CTX_new(); + EVP_CIPHER_CTX_copy(new_ctx->ctx, ctx->ctx); + out = enif_make_new_binary(env, data_bin.size, &cipher_term); + EVP_CipherUpdate(new_ctx->ctx, out, &outl, data_bin.data, data_bin.size); + ASSERT(outl == data_bin.size); + + ret = enif_make_tuple2(env, enif_make_resource(env, new_ctx), cipher_term); + enif_release_resource(new_ctx); + CONSUME_REDS(env,data_bin); + return ret; +#else + return enif_raise_exception(env, atom_notsup); +#endif +}; + + static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Bytes) */ unsigned bytes; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 3774f936e7..443e7fc12a 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -313,7 +313,10 @@ next_iv(Type, Data, _Ivec) -> next_iv(Type, Data). stream_init(aes_ctr, Key, Ivec) -> - {aes_ctr, aes_ctr_stream_init(Key, Ivec)}. + {aes_ctr, aes_ctr_stream_init(Key, Ivec)}; +stream_init(chacha20, Key, Ivec) -> + {chacha20, chacha20_stream_init(Key,Ivec)}. + stream_init(rc4, Key) -> {rc4, notsup_to_error(rc4_set_key(Key))}. @@ -1124,14 +1127,20 @@ do_stream_encrypt({aes_ctr, State0}, Data) -> {{aes_ctr, State}, Cipher}; do_stream_encrypt({rc4, State0}, Data) -> {State, Cipher} = rc4_encrypt_with_state(State0, Data), - {{rc4, State}, Cipher}. + {{rc4, State}, Cipher}; +do_stream_encrypt({chacha20, State0}, Data) -> + {State, Cipher} = chacha20_stream_encrypt(State0, Data), + {{chacha20, State}, Cipher}. do_stream_decrypt({aes_ctr, State0}, Data) -> {State, Text} = aes_ctr_stream_decrypt(State0, Data), {{aes_ctr, State}, Text}; do_stream_decrypt({rc4, State0}, Data) -> {State, Text} = rc4_encrypt_with_state(State0, Data), - {{rc4, State}, Text}. + {{rc4, State}, Text}; +do_stream_decrypt({chacha20, State0}, Data) -> + {State, Cipher} = chacha20_stream_decrypt(State0, Data), + {{chacha20, State}, Cipher}. %% @@ -1155,6 +1164,13 @@ aes_ctr_stream_decrypt(_State, _Cipher) -> ?nif_stub. rc4_set_key(_Key) -> ?nif_stub. rc4_encrypt_with_state(_State, _Data) -> ?nif_stub. +%% +%% CHACHA20 - stream cipher +%% +chacha20_stream_init(_Key, _IVec) -> ?nif_stub. +chacha20_stream_encrypt(_State, _Data) -> ?nif_stub. +chacha20_stream_decrypt(_State, _Data) -> ?nif_stub. + %% Secure remote password ------------------------------------------------------------------- user_srp_gen_key(Private, Generator, Prime) -> -- cgit v1.2.3 From 41f75ef413c7ce53aefcfea080e22217d607daf1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 2 Aug 2018 15:08:21 +0200 Subject: crypto: -spec --- lib/crypto/src/crypto.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 443e7fc12a..f6a785303b 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -195,6 +195,8 @@ cmac(Type, Key, Data) -> cmac(Type, Key, Data, MacSize) -> erlang:binary_part(cmac(Type, Key, Data), 0, MacSize). +-spec poly1305(iodata(), iodata()) -> binary(). + poly1305(Key, Data) -> poly1305_nif(Key, Data). @@ -1167,6 +1169,11 @@ rc4_encrypt_with_state(_State, _Data) -> ?nif_stub. %% %% CHACHA20 - stream cipher %% +-type chacha20_state() :: term(). +-spec chacha20_stream_init(iodata(), binary()) -> chacha20_state(). +-spec chacha20_stream_encrypt(chacha20_state(), binary()) -> {chacha20_state(), binary()}. +-spec chacha20_stream_decrypt(chacha20_state(), binary()) -> {chacha20_state(), binary()}. + chacha20_stream_init(_Key, _IVec) -> ?nif_stub. chacha20_stream_encrypt(_State, _Data) -> ?nif_stub. chacha20_stream_decrypt(_State, _Data) -> ?nif_stub. -- cgit v1.2.3 From 8826488b71e47bb7dab0237bb2c43849502b3a1e Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 28 Jun 2018 18:11:20 +0200 Subject: crypto: poly1305 test case --- lib/crypto/test/crypto_SUITE.erl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 13b1fbd047..0013b9dee5 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -77,6 +77,7 @@ groups() -> {group, aes_ctr}, {group, aes_gcm}, {group, chacha20_poly1305}, + {group, poly1305}, {group, aes_cbc}]}, {fips, [], [{group, no_md4}, {group, no_md5}, @@ -157,6 +158,7 @@ groups() -> {aes_ctr, [], [stream]}, {aes_gcm, [], [aead]}, {chacha20_poly1305, [], [aead]}, + {poly1305, [], [poly1305]}, {aes_cbc, [], [block]}, {no_md4, [], [no_support, no_hash]}, {no_md5, [], [no_support, no_hash, no_hmac]}, @@ -356,6 +358,20 @@ cmac(Config) when is_list(Config) -> lists:foreach(fun cmac_check/1, Pairs), lists:foreach(fun cmac_check/1, cmac_iolistify(Pairs)). %%-------------------------------------------------------------------- +poly1305() -> + [{doc, "Test poly1305 function"}]. +poly1305(Config) -> + lists:foreach( + fun({Key, Txt, Expect}) -> + case crypto:poly1305(Key,Txt) of + Expect -> + ok; + Other -> + ct:fail({{crypto, poly1305, [Key, Txt]}, {expected, Expect}, {got, Other}}) + end + end, proplists:get_value(poly1305, Config)). + +%%-------------------------------------------------------------------- block() -> [{doc, "Test block ciphers"}]. block(Config) when is_list(Config) -> @@ -1432,6 +1448,15 @@ group_config(aes_gcm, Config) -> group_config(chacha20_poly1305, Config) -> AEAD = chacha20_poly1305(), [{aead, AEAD} | Config]; +group_config(poly1305, Config) -> + V = [%% {Key, Txt, Expect} + {%% RFC7539 2.5.2 + crypto_SUITE:hexstr2bin("85d6be7857556d337f4452fe42d506a80103808afb0db2fd4abff6af4149f51b"), + <<"Cryptographic Forum Research Group">>, + crypto_SUITE:hexstr2bin("a8061dc1305136c6c22b8baf0c0127a9") + } + ], + [{poly1305,V} | Config]; group_config(aes_cbc, Config) -> Block = aes_cbc(Config), [{block, Block} | Config]; -- cgit v1.2.3 From d7cd0c0005bc765ac1b1217aff89b0453ac8ced2 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 31 Jul 2018 16:22:05 +0200 Subject: crypto: chacha20 test case --- lib/crypto/test/crypto_SUITE.erl | 143 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 137 insertions(+), 6 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 0013b9dee5..be1fc330c6 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -77,6 +77,7 @@ groups() -> {group, aes_ctr}, {group, aes_gcm}, {group, chacha20_poly1305}, + {group, chacha20}, {group, poly1305}, {group, aes_cbc}]}, {fips, [], [{group, no_md4}, @@ -113,6 +114,7 @@ groups() -> {group, aes_ctr}, {group, aes_gcm}, {group, no_chacha20_poly1305}, + {group, no_chacha20}, {group, aes_cbc}]}, {md4, [], [hash]}, {md5, [], [hash, hmac]}, @@ -158,6 +160,7 @@ groups() -> {aes_ctr, [], [stream]}, {aes_gcm, [], [aead]}, {chacha20_poly1305, [], [aead]}, + {chacha20, [], [stream]}, {poly1305, [], [poly1305]}, {aes_cbc, [], [block]}, {no_md4, [], [no_support, no_hash]}, @@ -172,6 +175,7 @@ groups() -> {no_blowfish_ofb64, [], [no_support, no_block]}, {no_aes_ige256, [], [no_support, no_block]}, {no_chacha20_poly1305, [], [no_support, no_aead]}, + {no_chacha20, [], [no_support, no_stream_ivec]}, {no_rc2_cbc, [], [no_support, no_block]}, {no_rc4, [], [no_support, no_stream]}, {api_errors, [], [api_errors_ecdh]} @@ -435,6 +439,13 @@ no_stream(Config) when is_list(Config) -> Type = ?config(type, Config), notsup(fun crypto:stream_init/2, [Type, <<"Key">>]). +%%-------------------------------------------------------------------- +no_stream_ivec() -> + [{doc, "Test disabled stream ciphers that uses ivec"}]. +no_stream_ivec(Config) when is_list(Config) -> + Type = ?config(type, Config), + notsup(fun crypto:stream_init/2, [Type, <<"Key">>, <<"Ivec">>]). + %%-------------------------------------------------------------------- aead() -> [{doc, "Test AEAD ciphers"}]. @@ -773,16 +784,33 @@ stream_cipher({Type, Key, IV, PlainText}) -> ok; Other -> ct:fail({{crypto, stream_decrypt, [State, CipherText]}, {expected, PlainText}, {got, Other}}) + end; +stream_cipher({Type, Key, IV, PlainText, CipherText}) -> + Plain = iolist_to_binary(PlainText), + State = crypto:stream_init(Type, Key, IV), + case crypto:stream_encrypt(State, PlainText) of + {_, CipherText} -> + ok; + {_, Other0} -> + ct:fail({{crypto, stream_encrypt, [State, Type, Key, IV, Plain]}, {expected, CipherText}, {got, Other0}}) + end, + case crypto:stream_decrypt(State, CipherText) of + {_, Plain} -> + ok; + Other1 -> + ct:fail({{crypto, stream_decrypt, [State, CipherText]}, {expected, PlainText}, {got, Other1}}) end. stream_cipher_incment({Type, Key, PlainTexts}) -> State = crypto:stream_init(Type, Key), - stream_cipher_incment(State, State, PlainTexts, [], iolist_to_binary(PlainTexts)); + stream_cipher_incment_loop(State, State, PlainTexts, [], iolist_to_binary(PlainTexts)); stream_cipher_incment({Type, Key, IV, PlainTexts}) -> State = crypto:stream_init(Type, Key, IV), - stream_cipher_incment(State, State, PlainTexts, [], iolist_to_binary(PlainTexts)). + stream_cipher_incment_loop(State, State, PlainTexts, [], iolist_to_binary(PlainTexts)); +stream_cipher_incment({Type, Key, IV, PlainTexts, _CipherText}) -> + stream_cipher_incment({Type, Key, IV, PlainTexts}). -stream_cipher_incment(_State, OrigState, [], Acc, Plain) -> +stream_cipher_incment_loop(_State, OrigState, [], Acc, Plain) -> CipherText = iolist_to_binary(lists:reverse(Acc)), case crypto:stream_decrypt(OrigState, CipherText) of {_, Plain} -> @@ -790,9 +818,9 @@ stream_cipher_incment(_State, OrigState, [], Acc, Plain) -> Other -> ct:fail({{crypto, stream_decrypt, [OrigState, CipherText]}, {expected, Plain}, {got, Other}}) end; -stream_cipher_incment(State0, OrigState, [PlainText | PlainTexts], Acc, Plain) -> +stream_cipher_incment_loop(State0, OrigState, [PlainText | PlainTexts], Acc, Plain) -> {State, CipherText} = crypto:stream_encrypt(State0, PlainText), - stream_cipher_incment(State, OrigState, PlainTexts, [CipherText | Acc], Plain). + stream_cipher_incment_loop(State, OrigState, PlainTexts, [CipherText | Acc], Plain). aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag}) -> Plain = iolist_to_binary(PlainText), @@ -1043,7 +1071,9 @@ do_cmac_iolistify({Type, Key, Text, Size, CMac}) -> do_stream_iolistify({Type, Key, PlainText}) -> {Type, iolistify(Key), iolistify(PlainText)}; do_stream_iolistify({Type, Key, IV, PlainText}) -> - {Type, iolistify(Key), IV, iolistify(PlainText)}. + {Type, iolistify(Key), IV, iolistify(PlainText)}; +do_stream_iolistify({Type, Key, IV, PlainText, CipherText}) -> + {Type, iolistify(Key), IV, iolistify(PlainText), CipherText}. do_block_iolistify({des_cbc = Type, Key, IV, PlainText}) -> {Type, Key, IV, des_iolistify(PlainText)}; @@ -1448,6 +1478,9 @@ group_config(aes_gcm, Config) -> group_config(chacha20_poly1305, Config) -> AEAD = chacha20_poly1305(), [{aead, AEAD} | Config]; +group_config(chacha20, Config) -> + Stream = chacha20(), + [{stream, Stream} | Config]; group_config(poly1305, Config) -> V = [%% {Key, Txt, Expect} {%% RFC7539 2.5.2 @@ -2094,6 +2127,7 @@ aes_gcm(Config) -> "gcmEncryptExtIV192.rsp", "gcmEncryptExtIV256.rsp"]). + %% https://tools.ietf.org/html/rfc7539#appendix-A.5 chacha20_poly1305() -> [ @@ -2139,6 +2173,103 @@ chacha20_poly1305() -> hexstr2bin("eead9d67890cbb22392336fea1851f38")} %% CipherTag ]. + +chacha20() -> +%%% chacha20 (no mode) test vectors from RFC 7539 A.2 + [ + %% Test Vector #1: + {chacha20, + hexstr2bin("00000000000000000000000000000000" + "00000000000000000000000000000000"), %% Key + hexstr2bin("00000000" % Initial counter = 0, little-endian + "000000000000000000000000"), %% IV + hexstr2bin("00000000000000000000000000000000" %% PlainText + "00000000000000000000000000000000" + "00000000000000000000000000000000" + "00000000000000000000000000000000"), + hexstr2bin("76b8e0ada0f13d90405d6ae55386bd28" %% CipherText + "bdd219b8a08ded1aa836efcc8b770dc7" + "da41597c5157488d7724e03fb8d84a37" + "6a43b8f41518a11cc387b669b2ee6586")}, + %% Test Vector #2: + {chacha20, + hexstr2bin("00000000000000000000000000000000" + "00000000000000000000000000000001"), %% Key + hexstr2bin("01000000" % Initial counter = 1, little-endian + "000000000000000000000002"), %% IV + hexstr2bin("416e79207375626d697373696f6e2074" %% PlainText + "6f20746865204945544620696e74656e" + "6465642062792074686520436f6e7472" + "696275746f7220666f72207075626c69" + "636174696f6e20617320616c6c206f72" + "2070617274206f6620616e2049455446" + "20496e7465726e65742d447261667420" + "6f722052464320616e6420616e792073" + "746174656d656e74206d616465207769" + "7468696e2074686520636f6e74657874" + "206f6620616e20494554462061637469" + "7669747920697320636f6e7369646572" + "656420616e20224945544620436f6e74" + "7269627574696f6e222e205375636820" + "73746174656d656e747320696e636c75" + "6465206f72616c2073746174656d656e" + "747320696e2049455446207365737369" + "6f6e732c2061732077656c6c20617320" + "7772697474656e20616e6420656c6563" + "74726f6e696320636f6d6d756e696361" + "74696f6e73206d61646520617420616e" + "792074696d65206f7220706c6163652c" + "20776869636820617265206164647265" + "7373656420746f"), + hexstr2bin("a3fbf07df3fa2fde4f376ca23e827370" %% CipherText + "41605d9f4f4f57bd8cff2c1d4b7955ec" + "2a97948bd3722915c8f3d337f7d37005" + "0e9e96d647b7c39f56e031ca5eb6250d" + "4042e02785ececfa4b4bb5e8ead0440e" + "20b6e8db09d881a7c6132f420e527950" + "42bdfa7773d8a9051447b3291ce1411c" + "680465552aa6c405b7764d5e87bea85a" + "d00f8449ed8f72d0d662ab052691ca66" + "424bc86d2df80ea41f43abf937d3259d" + "c4b2d0dfb48a6c9139ddd7f76966e928" + "e635553ba76c5c879d7b35d49eb2e62b" + "0871cdac638939e25e8a1e0ef9d5280f" + "a8ca328b351c3c765989cbcf3daa8b6c" + "cc3aaf9f3979c92b3720fc88dc95ed84" + "a1be059c6499b9fda236e7e818b04b0b" + "c39c1e876b193bfe5569753f88128cc0" + "8aaa9b63d1a16f80ef2554d7189c411f" + "5869ca52c5b83fa36ff216b9c1d30062" + "bebcfd2dc5bce0911934fda79a86f6e6" + "98ced759c3ff9b6477338f3da4f9cd85" + "14ea9982ccafb341b2384dd902f3d1ab" + "7ac61dd29c6f21ba5b862f3730e37cfd" + "c4fd806c22f221")}, + %%Test Vector #3: + {chacha20, + hexstr2bin("1c9240a5eb55d38af333888604f6b5f0" + "473917c1402b80099dca5cbc207075c0"), %% Key + hexstr2bin("2a000000" % Initial counter = 42 (decimal), little-endian + "000000000000000000000002"), %% IV + hexstr2bin("2754776173206272696c6c69672c2061" %% PlainText + "6e642074686520736c6974687920746f" + "7665730a446964206779726520616e64" + "2067696d626c6520696e207468652077" + "6162653a0a416c6c206d696d73792077" + "6572652074686520626f726f676f7665" + "732c0a416e6420746865206d6f6d6520" + "7261746873206f757467726162652e"), + hexstr2bin("62e6347f95ed87a45ffae7426f27a1df" %% CipherText + "5fb69110044c0d73118effa95b01e5cf" + "166d3df2d721caf9b21e5fb14c616871" + "fd84c54f9d65b283196c7fe4f60553eb" + "f39c6402c42234e32a356b3e764312a6" + "1a5532055716ead6962568f87d3f3f77" + "04c6a8d1bcd1bf4d50d6154b6da731b1" + "87b58dfd728afa36757a797ac188d1")} + ]. + + rsa_plain() -> <<"7896345786348756234 Hejsan Svejsan, erlang crypto debugger" "09812312908312378623487263487623412039812 huagasd">>. -- cgit v1.2.3 From 9aed3ae7f1506d14e6251291db395d598386f0ab Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 6 Aug 2018 15:42:54 +0200 Subject: crypto: Error in test case --- lib/crypto/test/crypto_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index be1fc330c6..aff35f4571 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -444,7 +444,7 @@ no_stream_ivec() -> [{doc, "Test disabled stream ciphers that uses ivec"}]. no_stream_ivec(Config) when is_list(Config) -> Type = ?config(type, Config), - notsup(fun crypto:stream_init/2, [Type, <<"Key">>, <<"Ivec">>]). + notsup(fun crypto:stream_init/3, [Type, <<"Key">>, <<"Ivec">>]). %%-------------------------------------------------------------------- aead() -> -- cgit v1.2.3 From 8b7db7f7a3cad9bd44c940a1299b9c593461821d Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 10:52:25 +0200 Subject: crypto: doc chacha20 --- lib/crypto/doc/src/crypto.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index e6147ddffc..c104e29a1e 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -155,7 +155,7 @@

The key's password

- stream_cipher() = rc4 | aes_ctr + stream_cipher() = rc4 | aes_ctr | chacha20 block_cipher() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc | blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc @@ -193,7 +193,7 @@ Note that both md4 and md5 are recommended only for compatibility with existing applications.

cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | - aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20_poly1305 | des_cbc | + aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20 | chacha20_poly1305 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4 mac_algorithms() = hmac | cmac public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m @@ -958,7 +958,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ stream_init(Type, Key, IVec) -> State - Type = aes_ctr + Type = aes_ctr | chacha20 State = opaque() Key = iodata() IVec = binary() -- cgit v1.2.3 From c8d09a8237f1d610ab0806fae3e929652811549b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 11:36:49 +0200 Subject: crypto: doc poly1305 --- lib/crypto/doc/src/crypto.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index c104e29a1e..889e5616dd 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -195,7 +195,7 @@ cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20 | chacha20_poly1305 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4 - mac_algorithms() = hmac | cmac + mac_algorithms() = hmac | cmac | poly1305 public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m

Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported with ecdsa and ecdh. @@ -597,6 +597,20 @@ + + poly1305(Key, Data) -> Mac + + + Key = iodata() + Data = iodata() + Mac = binary() + + +

Computes a POLY1305 message authentication code (Mac) from Data using + Key as the authentication key.

+ + + private_decrypt(Type, CipherText, PrivateKey, Padding) -> PlainText Decrypts CipherText using the private Key. -- cgit v1.2.3 From 83b8e18eb82054462e8f7a75af29cbf5791b9d7a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 21 Jun 2018 15:57:21 +0200 Subject: crypto: SHA3 hash on OpenSSL-1.1.1 crypto:hash/2, crypto:hash_init/1, crypto:hash_update/2, crypto:hash_final/1 --- lib/crypto/c_src/crypto.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 72aa44e7db..0ddcae3a64 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -148,6 +148,20 @@ # define HAVE_DES_ede3_cfb_encrypt #endif +// SHA3: +# ifdef NID_sha3_224 +# define HAVE_SHA3_224 +# endif +# ifdef NID_sha3_256 +# define HAVE_SHA3_256 +# endif +# ifdef NID_sha3_384 +# define HAVE_SHA3_384 +# endif +# ifdef NID_sha3_512 +# define HAVE_SHA3_512 +# endif + #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \ && !defined(OPENSSL_NO_EC) \ && !defined(OPENSSL_NO_ECDH) \ @@ -708,6 +722,10 @@ static ERL_NIF_TERM atom_sha224; static ERL_NIF_TERM atom_sha256; static ERL_NIF_TERM atom_sha384; static ERL_NIF_TERM atom_sha512; +static ERL_NIF_TERM atom_sha3_224; +static ERL_NIF_TERM atom_sha3_256; +static ERL_NIF_TERM atom_sha3_384; +static ERL_NIF_TERM atom_sha3_512; static ERL_NIF_TERM atom_md5; static ERL_NIF_TERM atom_ripemd160; @@ -793,6 +811,35 @@ static struct digest_type_t digest_types[] = {NULL} #endif }, + {{"sha3_224"}, +#ifdef HAVE_SHA3_224 + {&EVP_sha3_224} +#else + {NULL} +#endif + }, + {{"sha3_256"}, +#ifdef HAVE_SHA3_256 + {&EVP_sha3_256} +#else + {NULL} +#endif + }, + {{"sha3_384"}, +#ifdef HAVE_SHA3_384 + {&EVP_sha3_384} +#else + {NULL} +#endif + }, + {{"sha3_512"}, +#ifdef HAVE_SHA3_512 + {&EVP_sha3_512} +#else + {NULL} +#endif + }, + {{NULL}} }; @@ -1120,6 +1167,10 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_sha256 = enif_make_atom(env,"sha256"); atom_sha384 = enif_make_atom(env,"sha384"); atom_sha512 = enif_make_atom(env,"sha512"); + atom_sha3_224 = enif_make_atom(env,"sha3_224"); + atom_sha3_256 = enif_make_atom(env,"sha3_256"); + atom_sha3_384 = enif_make_atom(env,"sha3_384"); + atom_sha3_512 = enif_make_atom(env,"sha3_512"); atom_md5 = enif_make_atom(env,"md5"); atom_ripemd160 = enif_make_atom(env,"ripemd160"); @@ -1240,7 +1291,7 @@ static void unload(ErlNifEnv* env, void* priv_data) } static int algo_hash_cnt, algo_hash_fips_cnt; -static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */ +static ERL_NIF_TERM algo_hash[12]; /* increase when extending the list */ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; static ERL_NIF_TERM algo_pubkey[11]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; @@ -1266,6 +1317,18 @@ static void init_algorithms_types(ErlNifEnv* env) #endif #ifdef HAVE_SHA512 algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha512"); +#endif +#ifdef HAVE_SHA3_224 + algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha3_224"); +#endif +#ifdef HAVE_SHA3_256 + algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha3_256"); +#endif +#ifdef HAVE_SHA3_384 + algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha3_384"); +#endif +#ifdef HAVE_SHA3_512 + algo_hash[algo_hash_cnt++] = enif_make_atom(env, "sha3_512"); #endif // Non-validated algorithms follow algo_hash_fips_cnt = algo_hash_cnt; -- cgit v1.2.3 From 13afdc0c72121ca26e6dd8d9a41502218d5c04ae Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 21 Jun 2018 16:54:59 +0200 Subject: crypto: Tests for SHA3 --- lib/crypto/test/crypto_SUITE.erl | 214 +++++++++++++++++++++++++++++++++++---- 1 file changed, 194 insertions(+), 20 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 13b1fbd047..da2fd7a30e 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -51,6 +51,10 @@ groups() -> {group, sha256}, {group, sha384}, {group, sha512}, + {group, sha3_224}, + {group, sha3_256}, + {group, sha3_384}, + {group, sha3_512}, {group, rsa}, {group, dss}, {group, ecdsa}, @@ -121,6 +125,10 @@ groups() -> {sha256, [], [hash, hmac]}, {sha384, [], [hash, hmac]}, {sha512, [], [hash, hmac]}, + {sha3_224, [], [hash, hmac]}, + {sha3_256, [], [hash, hmac]}, + {sha3_384, [], [hash, hmac]}, + {sha3_512, [], [hash, hmac]}, {rsa, [], [sign_verify, public_encrypt, private_encrypt, @@ -470,7 +478,7 @@ generate_compute(Config) when is_list(Config) -> %%-------------------------------------------------------------------- compute_bug() -> [{doc, "Test that it works even if the Secret is smaller than expected"}]. -compute_bug(Config) -> +compute_bug(_Config) -> ExpectedSecret = <<118,89,171,16,156,18,156,103,189,134,130,49,28,144,111,241,247,82,79,32,228,11,209,141,119,176,251,80,105,143,235,251,203,121,223,211,129,3,233,133,45,2,31,157,24,111,5,75,153,66,135,185,128,115,229,178,216,39,73,52,80,151,8,241,34,52,226,71,137,167,53,48,59,224,175,154,89,110,76,83,24,117,149,21,72,6,186,78,149,74,188,56,98,244,30,77,108,248,88,194,195,237,23,51,20,242,254,123,21,12,209,74,217,168,230,65,7,60,211,139,128,239,234,153,22,229,180,59,159,121,41,156,121,200,177,130,163,162,54,224,93,1,94,11,177,254,118,28,156,26,116,10,207,145,219,166,214,189,214,230,221,170,228,15,69,88,31,68,94,255,113,58,49,82,86,192,248,176,131,133,39,186,194,172,206,84,184,16,66,68,153,128,178,227,27,118,52,130,122,92,24,222,102,195,221,207,255,13,152,175,65,32,167,84,54,244,243,109,244,18,234,16,159,224,188,2,106,123,27,17,131,171,226,34,111,251,62,119,155,124,221,124,254,62,97,167,1,105,116,98,98,19,197,30,72,180,79,221,100,134,120,117,124,85,73,132,224,223,222,41,155,137,218,130,238,237,157,161,134,150,69,206,91,141,17,89,120,218,235,229,37,150,76,197,7,157,56,144,42,203,137,100,200,72,141,194,239,1,67,236,238,183,48,214,75,76,108,235,3,237,67,40,137,45,182,236,246,37,116,103,144,237,142,211,88,233,11,24,21,218,41,245,250,51,130,250,104,74,189,17,69,145,70,50,50,215,253,155,10,128,41,114,185,211,82,164,72,92,17,145,104,66,6,140,226,80,43,62,1,166,216,153,118,96,15,147,126,137,118,191,192,75,149,241,206,18,92,17,154,215,219,18,6,139,190,103,210,156,184,29,224,213,157,60,112,189,104,220,125,40,186,50,119,17,143,136,149,38,74,107,21,192,59,61,59,42,231,144,59,175,3,176,87,23,16,122,54,31,82,34,230,211,44,81,41,47,86,37,228,175,130,148,88,136,131,254,241,202,99,199,175,1,141,215,124,155,120,43,141,89,11,140,120,141,29,35,82,219,155,204,75,12,66,241,253,33,250,84,24,85,68,13,80,85,142,227,34,139,26,146,24>>, OthersPublicKey = 635619632099733175381667940709387641100492974601603060984753028943194386334921787463327680809776598322996634648015962954045728174069768874873236397421720142610982770302060309928552098274817978606093380781524199673890631795310930242601197479471368910519338301177304682162189801040921618559902948819107531088646753320486728060005223263561551402855338732899079439899705951063999951507319258050864346087428042978411873495523439615429804957374639092580169417598963105885529553632847023899713490485619763926900318508906706745060947269748612049634207985438016935262521715769812475329234748426647554362991758104620357149045960316987533503707855364806010494793980069245562784050236811004893018183726397041999426883788660276453352521120006817370050691205529335316794439089316232980047277245051173281601960196573681285904611182521967067911862467395705665888521948321299521549941618586026714676885890192323289343756440666276226084448279082483536164085883288884231665240707495770544705648564889889198060417915693315346959170105413290799314390963124178046425737828369059171472978294050322371452255088799865552038756937873388385970088906560408959959429398326288750834357514847891423941047433478384621074116184703014798814515161475596555032391555842, MyPrivateKey = 387759582879975726965038486537011291913744975764132199838375902680222019267527675651273586836110220500657652661706223760165097275862806031329642160439090779625708664007910974206651834216043397115514725827856461492311499129200688538220719685637154290305617686974719521885238198226075381217068175824097878445476010193039590876624464274744156624589136789060427283492343902761765833713520850870233407503430180028104167029073459918756981323130062648615262139444306321256382009848217866984408901761817655567071716275177768316006340055589170095799943481591033461616307776069027985761229636731465482676467627154100912586936231051371168178564599296638350391246393336702334311781595616786107810962134407697848002331639021101685320844880636050048769216986088652236979636019052557155807310341483407890060105599892252118584570558049301477535792498672552850760356632076013402382600669875697284264329434950712239302528367835155163504374877787288116104285944993818319105835423479332617802010952731990182088670508346704423006877514817882782443833997288652405892920173712497948376815825396272381214976859009518623799156300136570204539240675245115597412280078940442452936425561984312708387584800789375684525365060589104566195610526570099527133097201479, @@ -602,31 +610,29 @@ hash_increment(State0, [Increment | Rest]) -> hmac(_, [],[],[]) -> ok; hmac(sha = Type, [Key | Keys], [ <<"Test With Truncation">> = Data| Rest], [Expected | Expects]) -> - case crypto:hmac(Type, Key, Data, 20) of - Expected -> - ok; - Other -> - ct:fail({{crypto, hmac, [Type, Key, Data]}, {expected, Expected}, {got, Other}}) - end, + call_crypto_hmac([Type, Key, Data, 20], Type, Expected), hmac(Type, Keys, Rest, Expects); - hmac(Type, [Key | Keys], [ <<"Test With Truncation">> = Data| Rest], [Expected | Expects]) -> - case crypto:hmac(Type, Key, Data, 16) of - Expected -> - ok; - Other -> - ct:fail({{crypto, hmac, [Type, Key, Data]}, {expected, Expected}, {got, Other}}) - end, + call_crypto_hmac([Type, Key, Data, 16], Type, Expected), hmac(Type, Keys, Rest, Expects); - hmac(Type, [Key | Keys], [Data| Rest], [Expected | Expects]) -> - case crypto:hmac(Type, Key, Data) of + call_crypto_hmac([Type, Key, Data], Type, Expected), + hmac(Type, Keys, Rest, Expects). + +call_crypto_hmac(Args, Type, Expected) -> + try apply(crypto, hmac, Args) + of Expected -> ok; Other -> - ct:fail({{crypto, hmac, [Type, Key, Data]}, {expected, Expected}, {got, Other}}) - end, - hmac(Type, Keys, Rest, Expects). + ct:fail({{crypto,hmac,Args}, {expected,Expected}, {got,Other}}) + catch + error:notsup -> + ct:fail("HMAC ~p not supported", [Type]); + Class:Cause -> + ct:fail({{crypto,hmac,Args}, {expected,Expected}, {got,{Class,Cause}}}) + end. + hmac_increment(Type) -> Key = hmac_key(Type), @@ -998,6 +1004,8 @@ hexstr2bin(S) when is_binary(S) -> hexstr2bin(S) -> list_to_binary(hexstr2list(S)). +hexstr2list([$ |T]) -> + hexstr2list(T); hexstr2list([X,Y|T]) -> [mkint(X)*16 + mkint(Y) | hexstr2list(T)]; hexstr2list([]) -> @@ -1273,7 +1281,7 @@ group_config(sha224 = Type, Config) -> Keys = rfc_4231_keys(), Data = rfc_4231_msgs(), Hmac = rfc4231_hmac_sha224(), - [{hash, {Type, Msgs, Digests}}, {hmac, {Type, Keys, Data, Hmac}} | Config]; + [{hash, {Type, Msgs, Digests}}, {hmac, {Type, Keys, Data, Hmac}} | Config]; group_config(sha256 = Type, Config) -> Msgs = [rfc_4634_test1(), rfc_4634_test2_1(), long_msg()], Digests = rfc_4634_sha256_digests() ++ [long_sha256_digest()], @@ -1295,6 +1303,18 @@ group_config(sha512 = Type, Config) -> Data = rfc_4231_msgs() ++ [long_msg()], Hmac = rfc4231_hmac_sha512() ++ [long_hmac(sha512)], [{hash, {Type, Msgs, Digests}}, {hmac, {Type, Keys, Data, Hmac}} | Config]; +group_config(sha3_224 = Type, Config) -> + {Msgs,Digests} = sha3_test_vectors(Type), + [{hash, {Type, Msgs, Digests}}, {hmac, hmac_sha3(Type)} | Config]; +group_config(sha3_256 = Type, Config) -> + {Msgs,Digests} = sha3_test_vectors(Type), + [{hash, {Type, Msgs, Digests}}, {hmac, hmac_sha3(Type)} | Config]; +group_config(sha3_384 = Type, Config) -> + {Msgs,Digests} = sha3_test_vectors(Type), + [{hash, {Type, Msgs, Digests}}, {hmac, hmac_sha3(Type)} | Config]; +group_config(sha3_512 = Type, Config) -> + {Msgs,Digests} = sha3_test_vectors(Type), + [{hash, {Type, Msgs, Digests}}, {hmac, hmac_sha3(Type)} | Config]; group_config(rsa = Type, Config) -> Msg = rsa_plain(), Public = rsa_public(), @@ -1500,6 +1520,160 @@ rfc_1321_md5_digests() -> hexstr2bin("d174ab98d277d9f5a5611c2c9f419d9f"), hexstr2bin("57edf4a22be3c955ac49da2e2107b67a")]. +%%% https://www.di-mgt.com.au/sha_testvectors.html +sha3_msgs() -> + ["abc", + "", + "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", % length 448 bits + "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", % length 896 bits + lists:duplicate(1000000,$a) + ]. + +sha3_test_vectors(sha3_224) -> + {sha3_msgs(), + [hexstr2bin("e642824c3f8cf24a d09234ee7d3c766f c9a3a5168d0c94ad 73b46fdf"), + hexstr2bin("6b4e03423667dbb7 3b6e15454f0eb1ab d4597f9a1b078e3f 5b5a6bc7"), + hexstr2bin("8a24108b154ada21 c9fd5574494479ba 5c7e7ab76ef264ea d0fcce33"), + hexstr2bin("543e6868e1666c1a 643630df77367ae5 a62a85070a51c14c bf665cbc"), + hexstr2bin("d69335b93325192e 516a912e6d19a15c b51c6ed5c15243e7 a7fd653c") + ] + }; +sha3_test_vectors(sha3_256) -> + {sha3_msgs(), + [hexstr2bin("3a985da74fe225b2 045c172d6bd390bd 855f086e3e9d525b 46bfe24511431532"), + hexstr2bin("a7ffc6f8bf1ed766 51c14756a061d662 f580ff4de43b49fa 82d80a4b80f8434a"), + hexstr2bin("41c0dba2a9d62408 49100376a8235e2c 82e1b9998a999e21 db32dd97496d3376"), + hexstr2bin("916f6061fe879741 ca6469b43971dfdb 28b1a32dc36cb325 4e812be27aad1d18"), + hexstr2bin("5c8875ae474a3634 ba4fd55ec85bffd6 61f32aca75c6d699 d0cdcb6c115891c1") + ] + }; +sha3_test_vectors(sha3_384) -> + {sha3_msgs(), + [hexstr2bin("ec01498288516fc9 26459f58e2c6ad8d f9b473cb0fc08c25 96da7cf0e49be4b2 98d88cea927ac7f5 39f1edf228376d25"), + hexstr2bin("0c63a75b845e4f7d 01107d852e4c2485 c51a50aaaa94fc61 995e71bbee983a2a c3713831264adb47 fb6bd1e058d5f004"), + hexstr2bin("991c665755eb3a4b 6bbdfb75c78a492e 8c56a22c5c4d7e42 9bfdbc32b9d4ad5a a04a1f076e62fea1 9eef51acd0657c22"), + hexstr2bin("79407d3b5916b59c 3e30b09822974791 c313fb9ecc849e40 6f23592d04f625dc 8c709b98b43b3852 b337216179aa7fc7"), + hexstr2bin("eee9e24d78c18553 37983451df97c8ad 9eedf256c6334f8e 948d252d5e0e7684 7aa0774ddb90a842 190d2c558b4b8340") + ] + }; +sha3_test_vectors(sha3_512) -> + {sha3_msgs(), + [hexstr2bin("b751850b1a57168a 5693cd924b6b096e 08f621827444f70d 884f5d0240d2712e 10e116e9192af3c9 1a7ec57647e39340 57340b4cf408d5a5 6592f8274eec53f0"), + hexstr2bin("a69f73cca23a9ac5 c8b567dc185a756e 97c982164fe25859 e0d1dcc1475c80a6 15b2123af1f5f94c 11e3e9402c3ac558 f500199d95b6d3e3 01758586281dcd26"), + hexstr2bin("04a371e84ecfb5b8 b77cb48610fca818 2dd457ce6f326a0f d3d7ec2f1e91636d ee691fbe0c985302 ba1b0d8dc78c0863 46b533b49c030d99 a27daf1139d6e75e"), + hexstr2bin("afebb2ef542e6579 c50cad06d2e578f9 f8dd6881d7dc824d 26360feebf18a4fa 73e3261122948efc fd492e74e82e2189 ed0fb440d187f382 270cb455f21dd185"), + hexstr2bin("3c3a876da14034ab 60627c077bb98f7e 120a2a5370212dff b3385a18d4f38859 ed311d0a9d5141ce 9cc5c66ee689b266 a8aa18ace8282a0e 0db596c90b0a7b87") + ] + }. + + + +%%% http://www.wolfgang-ehrhardt.de/hmac-sha3-testvectors.html + +hmac_sha3(Type) -> + N = case Type of + sha3_224 -> 1; + sha3_256 -> 2; + sha3_384 -> 3; + sha3_512 -> 4 + end, + {Keys, Datas, Hmacs} = + lists:unzip3( + [{hexstr2bin(Key), hexstr2bin(Data), hexstr2bin(element(N,Hmacs))} + || {Key,Data,Hmacs} <- hmac_sha3_data()]), + {Type, Keys, Datas, Hmacs}. + + +hmac_sha3_data() -> + [ + {"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 0b0b0b0b", + "4869205468657265", + {"3b16546bbc7be2706a031dcafd56373d 9884367641d8c59af3c860f7", + "ba85192310dffa96e2a3a40e69774351 140bb7185e1202cdcc917589f95e16bb", + "68d2dcf7fd4ddd0a2240c8a437305f61 fb7334cfb5d0226e1bc27dc10a2e723a 20d370b47743130e26ac7e3d532886bd", + "eb3fbd4b2eaab8f5c504bd3a41465aac ec15770a7cabac531e482f860b5ec7ba 47ccb2c6f2afce8f88d22b6dc61380f2 3a668fd3888bb80537c0a0b86407689e" + }}, + + {"4a656665", + "7768617420646f2079612077616e7420 666f72206e6f7468696e673f", + {"7fdb8dd88bd2f60d1b798634ad386811 c2cfc85bfaf5d52bbace5e66", + "c7d4072e788877ae3596bbb0da73b887 c9171f93095b294ae857fbe2645e1ba5", + "f1101f8cbf9766fd6764d2ed61903f21 ca9b18f57cf3e1a23ca13508a93243ce 48c045dc007f26a21b3f5e0e9df4c20a", + "5a4bfeab6166427c7a3647b747292b83 84537cdb89afb3bf5665e4c5e709350b 287baec921fd7ca0ee7a0c31d022a95e 1fc92ba9d77df883960275beb4e62024" + }}, + + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaa", + "dddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddd dddd", + {"676cfc7d16153638780390692be142d2 df7ce924b909c0c08dbfdc1a", + "84ec79124a27107865cedd8bd82da996 5e5ed8c37b0ac98005a7f39ed58a4207", + "275cd0e661bb8b151c64d288f1f782fb 91a8abd56858d72babb2d476f0458373 b41b6ab5bf174bec422e53fc3135ac6e", + "309e99f9ec075ec6c6d475eda1180687 fcf1531195802a99b5677449a8625182 851cb332afb6a89c411325fbcbcd42af cb7b6e5aab7ea42c660f97fd8584bf03" + }}, + + {"0102030405060708090a0b0c0d0e0f10 111213141516171819", + "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd cdcd", + {"a9d7685a19c4e0dbd9df2556cc8a7d2a 7733b67625ce594c78270eeb", + "57366a45e2305321a4bc5aa5fe2ef8a9 21f6af8273d7fe7be6cfedb3f0aea6d7", + "3a5d7a879702c086bc96d1dd8aa15d9c 46446b95521311c606fdc4e308f4b984 da2d0f9449b3ba8425ec7fb8c31bc136", + "b27eab1d6e8d87461c29f7f5739dd58e 98aa35f8e823ad38c5492a2088fa0281 993bbfff9a0e9c6bf121ae9ec9bb09d8 4a5ebac817182ea974673fb133ca0d1d" + }}, + + %% {"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c 0c0c0c0c", + %% "546573742057697468205472756e6361 74696f6e", + %% {"49fdd3abd005ebb8ae63fea946d1883c", + %% "6e02c64537fb118057abb7fb66a23b3c", + %% "47c51ace1ffacffd7494724682615783", + %% "0fa7475948f43f48ca0516671e18978c" + %% }}, + + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa", + "54657374205573696e67204c61726765 72205468616e20426c6f636b2d53697a 65204b6579202d2048617368204b6579 204669727374", + {"b4a1f04c00287a9b7f6075b313d279b8 33bc8f75124352d05fb9995f", + "ed73a374b96c005235f948032f09674a 58c0ce555cfc1f223b02356560312c3b", + "0fc19513bf6bd878037016706a0e57bc 528139836b9a42c3d419e498e0e1fb96 16fd669138d33a1105e07c72b6953bcc", + "00f751a9e50695b090ed6911a4b65524 951cdc15a73a5d58bb55215ea2cd839a c79d2b44a39bafab27e83fde9e11f634 0b11d991b1b91bf2eee7fc872426c3a4" + }}, + + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa", + "54657374205573696e67204c61726765 72205468616e20426c6f636b2d53697a 65204b6579202d2048617368204b6579 204669727374", + { + "b96d730c148c2daad8649d83defaa371 9738d34775397b7571c38515", + "a6072f86de52b38bb349fe84cd6d97fb 6a37c4c0f62aae93981193a7229d3467", + "713dff0302c85086ec5ad0768dd65a13 ddd79068d8d4c6212b712e4164944911 1480230044185a99103ed82004ddbfcc", + "b14835c819a290efb010ace6d8568dc6 b84de60bc49b004c3b13eda763589451 e5dd74292884d1bdce64e6b919dd61dc 9c56a282a81c0bd14f1f365b49b83a5b" + }}, + + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa", + "54686973206973206120746573742075 73696e672061206c6172676572207468 616e20626c6f636b2d73697a65206b65 7920616e642061206c61726765722074 68616e20626c6f636b2d73697a652064 6174612e20546865206b6579206e6565 647320746f2062652068617368656420 6265666f7265206265696e6720757365 642062792074686520484d414320616c 676f726974686d2e", + { + "05d8cd6d00faea8d1eb68ade28730bbd 3cbab6929f0a086b29cd62a0", + "65c5b06d4c3de32a7aef8763261e49ad b6e2293ec8e7c61e8de61701fc63e123", + "026fdf6b50741e373899c9f7d5406d4e b09fc6665636fc1a530029ddf5cf3ca5 a900edce01f5f61e2f408cdf2fd3e7e8", + "38a456a004bd10d32c9ab83366841128 62c3db61adcca31829355eaf46fd5c73 d06a1f0d13fec9a652fb3811b577b1b1 d1b9789f97ae5b83c6f44dfcf1d67eba" + }}, + + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa", + "54686973206973206120746573742075 73696e672061206c6172676572207468 616e20626c6f636b2d73697a65206b65 7920616e642061206c61726765722074 68616e20626c6f636b2d73697a652064 6174612e20546865206b6579206e6565 647320746f2062652068617368656420 6265666f7265206265696e6720757365 642062792074686520484d414320616c 676f726974686d2e", + { + "c79c9b093424e588a9878bbcb089e018 270096e9b4b1a9e8220c866a", + "e6a36d9b915f86a093cac7d110e9e04c f1d6100d30475509c2475f571b758b5a", + "cad18a8ff6c4cc3ad487b95f9769e9b6 1c062aefd6952569e6e6421897054cfc 70b5fdc6605c18457112fc6aaad45585", + "dc030ee7887034f32cf402df34622f31 1f3e6cf04860c6bbd7fa488674782b46 59fdbdf3fd877852885cfe6e22185fe7 b2ee952043629bc9d5f3298a41d02c66" + }} + %%, + + %% {"4a656665", + %% "'11001' or LSB 13 or MSB c8", + %% { + %% "5f8c0ea7fafecd0c3463aad09742cece b142fe0ab6f4539438c59de8", + %% "ec8222773fac68b3d3dcb182aec8b050 7ace4448d20a1147e682118da4e3f44c", + %% "21fbd3bf3ebba3cfc9ef64c0591c92c5 acb265e92d8761d1f91a52a103a6c796 94cfd67a9a2ac1324f02fea63b81effc", + %% "27f9388c1567ef4ef200602a6cf871d6 8a6fb048d4737ac4418a2f021289d13d 1fd1120fecb9cf964c5b117ab5b11c61 4b2da39dadd51f2f5e22aaccec7d576e" + %% }} + ]. + + + rfc_4634_test1() -> <<"abc">>. rfc_4634_test2_1() -> -- cgit v1.2.3 From e647193db8c0781dafb965f6ba5c050dfb50fd42 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 11:47:52 +0200 Subject: crypto: doc SHA3 (hash & hmac) --- lib/crypto/doc/src/crypto.xml | 6 +++++- lib/crypto/src/crypto.erl | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index e6147ddffc..af689d3ddb 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -161,6 +161,7 @@ blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc
aead_cipher() = aes_gcm | chacha20_poly1305 +

Note that the actual supported algorithms depends on the underlying crypto library.

stream_key() = aes_key() | rc4_key() @@ -189,8 +190,11 @@ rsa_sign_padding() = rsa_pkcs1_padding | rsa_pkcs1_pss_padding - hash_algorithms() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512

md4 is also supported for hash_init/1 and hash/2. + hash_algorithms() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512 | + sha3_224 | sha3_256 | sha3_384 | sha3_512 +

md4 is also supported for hash_init/1 and hash/2. Note that both md4 and md5 are recommended only for compatibility with existing applications. + Note that the actual supported hash_algorithms depends on the underlying crypto library.

cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20_poly1305 | des_cbc | diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 81ab4e5ea1..c788e890a8 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -142,7 +142,8 @@ hash(Hash, Data0) -> hash(Hash, Data, erlang:byte_size(Data), MaxBytes). -spec hash_init('md5'|'md4'|'ripemd160'| - 'sha'|'sha224'|'sha256'|'sha384'|'sha512') -> any(). + 'sha'|'sha224'|'sha256'|'sha384'|'sha512'| + 'sha3_224' | 'sha3_256' | 'sha3_384' | 'sha3_512') -> any(). hash_init(Hash) -> notsup_to_error(hash_init_nif(Hash)). -- cgit v1.2.3 From 99818214c45ebbe9e7a20f739ab1f9e801d61d98 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 15:50:05 +0200 Subject: crypto: Disable non-working SHA3_224 and SHA3_256 --- lib/crypto/c_src/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 0ddcae3a64..5ee7961fd5 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -150,10 +150,10 @@ // SHA3: # ifdef NID_sha3_224 -# define HAVE_SHA3_224 +//Error # define HAVE_SHA3_224 # endif # ifdef NID_sha3_256 -# define HAVE_SHA3_256 +//Error # define HAVE_SHA3_256 # endif # ifdef NID_sha3_384 # define HAVE_SHA3_384 -- cgit v1.2.3 From 2825b2bddfed374b3cebb0f432e1f97aaa811bfa Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 26 Jun 2018 16:40:12 +0200 Subject: crypto: Enable EDDH all OpenSSL cryptolib over beta version 1.1.1-pre8 --- lib/crypto/c_src/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 72aa44e7db..06953b162d 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -155,8 +155,8 @@ # define HAVE_EC #endif -// (test for == 1.1.1pre8) -#if OPENSSL_VERSION_NUMBER == (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) - 7) \ +// (test for >= 1.1.1pre8) +#if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) - 7) \ && !defined(HAS_LIBRESSL) \ && defined(HAVE_EC) // EXPERIMENTAL: -- cgit v1.2.3 From d45a879079d0baca8c8be7fdddc2dc2bfdb59d80 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 27 Jun 2018 20:13:51 +0200 Subject: crypto: Remove the term 'eddh' --- lib/crypto/c_src/crypto.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 06953b162d..66ffc2e8ff 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -160,7 +160,7 @@ && !defined(HAS_LIBRESSL) \ && defined(HAVE_EC) // EXPERIMENTAL: -# define HAVE_EDDH +# define HAVE_ED_CURVE_DH #endif #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'c') @@ -687,8 +687,7 @@ static ERL_NIF_TERM atom_rsa; static ERL_NIF_TERM atom_dss; static ERL_NIF_TERM atom_ecdsa; -#ifdef HAVE_EDDH -static ERL_NIF_TERM atom_eddh; +#ifdef HAVE_ED_CURVE_DH static ERL_NIF_TERM atom_x25519; static ERL_NIF_TERM atom_x448; #endif @@ -1100,8 +1099,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_rsa = enif_make_atom(env,"rsa"); atom_dss = enif_make_atom(env,"dss"); atom_ecdsa = enif_make_atom(env,"ecdsa"); -#ifdef HAVE_EDDH - atom_eddh = enif_make_atom(env,"eddh"); +#ifdef HAVE_ED_CURVE_DH atom_x25519 = enif_make_atom(env,"x25519"); atom_x448 = enif_make_atom(env,"x448"); #endif @@ -1286,9 +1284,6 @@ static void init_algorithms_types(ErlNifEnv* env) #endif // Non-validated algorithms follow algo_pubkey_fips_cnt = algo_pubkey_cnt; -#ifdef HAVE_EDDH - algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "eddh"); -#endif algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "srp"); // Validated algorithms first @@ -1440,7 +1435,7 @@ static void init_algorithms_types(ErlNifEnv* env) #endif #endif //-- -#ifdef HAVE_EDDH +#ifdef HAVE_ED_CURVE_DH algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x25519"); algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x448"); #endif @@ -3950,7 +3945,7 @@ out_err: static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* (Curve, PeerBin, MyBin) */ { -#ifdef HAVE_EDDH +#ifdef HAVE_ED_CURVE_DH int type; EVP_PKEY_CTX *ctx; ErlNifBinary peer_bin, my_bin, key_bin; @@ -4006,7 +4001,7 @@ static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* (Curve) */ { -#ifdef HAVE_EDDH +#ifdef HAVE_ED_CURVE_DH int type; EVP_PKEY_CTX *ctx; EVP_PKEY *pkey = NULL; -- cgit v1.2.3 From 38dc3946610f3cad794411f1ac73819df0c26300 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 26 Jun 2018 16:38:44 +0200 Subject: crypto: Test vectors for ecdh x25519 and x448 --- lib/crypto/test/crypto_SUITE.erl | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 13b1fbd047..9d1ccc1c5d 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -2309,7 +2309,9 @@ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPriv SessionKey}. ecdh() -> %% http://csrc.nist.gov/groups/STM/cavp/ - Curves = crypto:ec_curves(), + Curves = crypto:ec_curves() ++ + [X || X <- proplists:get_value(curves, crypto:supports(), []), + lists:member(X, [x25519,x448])], TestCases = [{ecdh, hexstr2point("42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", "dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523"), hexstr2bin("f17d3fea367b74d340851ca4270dcb24c271f445bed9d527"), @@ -2392,7 +2394,32 @@ ecdh() -> "2FDC313095BCDD5FB3A91636F07A959C8E86B5636A1E930E8396049CB481961D365CC11453A06C719835475B12CB52FC3C383BCE35E27EF194512B71876285FA"), hexstr2bin("16302FF0DBBB5A8D733DAB7141C1B45ACBC8715939677F6A56850A38BD87BD59B09E80279609FF333EB9D4C061231FB26F92EEB04982A5F1D1764CAD57665422"), brainpoolP512r1, - hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")}], + hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")}, + + %% RFC 7748, 6.1 + {ecdh, + 16#8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a, + 16#5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb, + x25519, + hexstr2bin("4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742")}, + {ecdh, + 16#de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f, + 16#77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a, + x25519, + hexstr2bin("4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742")}, + + %% RFC 7748, 6.2 + {ecdh, + 16#9b08f7cc31b7e3e67d22d5aea121074a273bd2b83de09c63faa73d2c22c5d9bbc836647241d953d40c5b12da88120d53177f80e532c41fa0, + 16#1c306a7ac2a0e2e0990b294470cba339e6453772b075811d8fad0d1d6927c120bb5ee8972b0d3e21374c9c921b09d1b0366f10b65173992d, + x448, + hexstr2bin("07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2464c335543936521c24403085d59a449a5037514a879d")}, + {ecdh, + 16#3eb7a829b0cd20f5bcfc0b599b6feccf6da4627107bdb0d4f345b43027d8b972fc3e34fb4232a13ca706dcb57aec3dae07bdc1c67bf33609, + 16#9a8f4925d1519f5775cf46b04b5800d4ee9ee8bae8bc5565d498c28dd9c9baf574a9419744897391006382a6f127ab1d9ac2d8c0a598726b, + x448, + hexstr2bin("07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2464c335543936521c24403085d59a449a5037514a879d")} + ], lists:filter(fun ({_Type, _Pub, _Priv, Curve, _SharedSecret}) -> lists:member(Curve, Curves) end, -- cgit v1.2.3 From 9f8ed79b8049b772dcd6d9cdee148735f0b5beee Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 15 Aug 2018 12:06:25 +0200 Subject: crypto: doc x25519 & x448 --- lib/crypto/doc/src/crypto.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index e6147ddffc..36dc88efba 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -110,6 +110,9 @@ ecdh_params() = ec_named_curve() | ec_explicit_curve() + ed_named_curves_ecdh() -> x448 | x25519 +

Note that the curves are only supported if the underlying OpenSSL has support for them.

+ ec_explicit_curve() = {ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), CoFactor :: none | integer()} @@ -306,7 +309,7 @@ Type = dh | ecdh | srp OthersPublicKey = dh_public() | ecdh_public() | srp_public() MyKey = dh_private() | ecdh_private() | {srp_public(),srp_private()} - Params = dh_params() | ecdh_params() | SrpUserParams | SrpHostParams + Params = dh_params() | ecdh_params() | ed_named_curves_ecdh() | SrpUserParams | SrpHostParams SrpUserParams = {user, [DerivedKey::binary(), Prime::binary(), Generator::binary(), Version::atom() | [Scrambler:binary()]]} SrpHostParams = {host, [Verifier::binary(), Prime::binary(), Version::atom() | [Scrambler::binary]]} SharedSecret = binary() @@ -336,7 +339,7 @@ Generates a public key of type Type Type = dh | ecdh | rsa | srp - Params = dh_params() | ecdh_params() | RsaParams | SrpUserParams | SrpHostParams + Params = dh_params() | ecdh_params() | ed_named_curves_ecdh()| RsaParams | SrpUserParams | SrpHostParams RsaParams = {ModulusSizeInBits::integer(), PublicExponent::key_value()} SrpUserParams = {user, [Generator::binary(), Prime::binary(), Version::atom()]} SrpHostParams = {host, [Verifier::binary(), Generator::binary(), Prime::binary(), Version::atom()]} -- cgit v1.2.3 From 2f7bffa9f620e6218a7333a79e416fcce0bc054e Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 23 Aug 2018 14:47:30 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 31 +++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 5d2065c8d8..0eff12dfe5 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,37 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3.2 + +
Fixed Bugs and Malfunctions + + +

Update the crypto engine functions to handle multiple + loads of an engine.

engine_load/3/4 is + updated so it doesn't add the engine ID to OpenSSLs + internal list of engines which makes it possible to run + the engine_load more than once if it doesn't contain + global data.

Added ensure_engine_loaded/2/3 + which guarantees that the engine just is loaded once and + the following calls just returns a reference to it. This + is done by add the ID to the internal OpenSSL list and + check if it is already registered when the function is + called.

Added ensure_engine_unloaded/1/2 to + unload engines loaded with ensure_engine_loaded.

+

Then some more utility functions are added.

+

engine_add/1, adds the engine to OpenSSL + internal list

engine_remove/1, remove the + engine from OpenSSL internal list

+

engine_get_id/1, fetch the engines id

+

engine_get_name/1, fetch the engine name

+

+ Own Id: OTP-15233

+
+
+
+ +
+
Crypto 4.3.1
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 0d7b0e5575..d262492668 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3.1 +CRYPTO_VSN = 4.3.2 -- cgit v1.2.3 From 734ca41ae58ea5cf6d73cccb6ec6e37868991642 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 29 Aug 2018 12:21:22 +0200 Subject: crypto: Let otp_test_engine only add what is needed OpenSSL_add_all_algorithms hangs on some test machines --- lib/crypto/c_src/otp_test_engine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index b6c9067964..34c825059f 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -64,7 +64,8 @@ static int test_init(ENGINE *e) { printf("OTP Test Engine Initializatzion!\r\n"); /* Load all digest and cipher algorithms. Needed for password protected private keys */ - OpenSSL_add_all_algorithms(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); return 111; } -- cgit v1.2.3 From 0a173490c5348ffd045482fc5f29a3b49d3cf325 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 3 Sep 2018 10:24:51 +0200 Subject: crypto: Bug fix - blowfish_cbc allowed in crypto:next_iv --- lib/crypto/src/crypto.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index a9d933f5d7..3c3e9a7f34 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -298,6 +298,7 @@ next_iv(Type, Data) when is_binary(Data) -> IVecSize = case Type of des_cbc -> 8; des3_cbc -> 8; + blowfish_cbc -> 8; aes_cbc -> 16; aes_ige -> 32 end, -- cgit v1.2.3 From 5107b29a1bca592c0ea3840d263d0dd1f48e2ed3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 22 Aug 2018 18:59:14 +0200 Subject: crypto: Bug fix - crypto:next_iv regarding aes_ige256 --- lib/crypto/src/crypto.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 3c3e9a7f34..17351d10ea 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -300,7 +300,8 @@ next_iv(Type, Data) when is_binary(Data) -> des3_cbc -> 8; blowfish_cbc -> 8; aes_cbc -> 16; - aes_ige -> 32 + aes_ige -> 32; % For compatibility if someone has bug-adapted code + aes_ige256 -> 32 % The name used in block_encrypt et al end, {_, IVec} = split_binary(Data, size(Data) - IVecSize), IVec; -- cgit v1.2.3 From a07e6e158a6c47a0a95620b40050fa216a824538 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 10 Sep 2018 12:33:05 +0200 Subject: crypto: Remove 'experimental' comments for ecdh --- lib/crypto/c_src/crypto.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 66ffc2e8ff..6210b63288 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -159,7 +159,6 @@ #if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) - 7) \ && !defined(HAS_LIBRESSL) \ && defined(HAVE_EC) -// EXPERIMENTAL: # define HAVE_ED_CURVE_DH #endif @@ -3941,7 +3940,6 @@ out_err: #endif } -// EXPERIMENTAL! static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* (Curve, PeerBin, MyBin) */ { @@ -3997,7 +3995,6 @@ static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ #endif } -// EXPERIMENTAL! static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* (Curve) */ { @@ -4014,22 +4011,20 @@ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF if (!(ctx = EVP_PKEY_CTX_new_id(type, NULL))) return enif_make_badarg(env); - if (!EVP_PKEY_keygen_init(ctx)) return enif_make_atom(env,"EVP_PKEY_keygen_init failed"); - if (!EVP_PKEY_keygen(ctx, &pkey)) return enif_make_atom(env,"EVP_PKEY_keygen failed"); + if (!EVP_PKEY_keygen_init(ctx)) return atom_error; + if (!EVP_PKEY_keygen(ctx, &pkey)) return atom_error; - if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) - return enif_make_atom(env,"EVP_PKEY_get_raw_public_key 1 failed"); + if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) return atom_error; if (!EVP_PKEY_get_raw_public_key(pkey, enif_make_new_binary(env, key_len, &ret_pub), &key_len)) - return enif_make_atom(env,"EVP_PKEY_get_raw_public_key 2 failed"); + return atom_error; - if (!EVP_PKEY_get_raw_private_key(pkey, NULL, &key_len)) - return enif_make_atom(env,"EVP_PKEY_get_raw_private_key 1 failed"); + if (!EVP_PKEY_get_raw_private_key(pkey, NULL, &key_len)) return atom_error; if (!EVP_PKEY_get_raw_private_key(pkey, enif_make_new_binary(env, key_len, &ret_prv), &key_len)) - return enif_make_atom(env,"EVP_PKEY_get_raw_private_key 2 failed"); + return atom_error; return enif_make_tuple2(env, ret_pub, ret_prv); #else -- cgit v1.2.3 From 46ddd7939820a48f72aa980ff2a1728cf935d4c3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 4 Sep 2018 18:57:00 +0200 Subject: crypto: Fix valgrind error --- lib/crypto/c_src/crypto.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 550342a88d..c7f36c95f1 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -5203,7 +5203,10 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM unsigned char *p; if (rsa == NULL) goto badarg; tmplen = RSA_size(rsa); - if (!enif_alloc_binary(tmplen, &tmp_bin)) goto badarg; + if (!enif_alloc_binary(tmplen, &tmp_bin)) { + RSA_free(rsa); + goto badarg; + } p = out_bin.data; p++; i = RSA_padding_check_SSLv23(tmp_bin.data, tmplen, p, out_bin.size - 1, tmplen); @@ -5214,6 +5217,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM tmp_bin = in_bin; i = 1; } + RSA_free(rsa); } #endif } -- cgit v1.2.3 From 304f75806ce1a2462948fc6da22b89256a501ce0 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 12 Sep 2018 13:40:10 +0200 Subject: crypto: sha3_224 and sha3_256 errors fixed --- lib/crypto/c_src/crypto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 5ee7961fd5..ba50dd4a53 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -149,12 +149,15 @@ #endif // SHA3: +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,1) +// An error in beta releases of 1.1.1 fixed in production release # ifdef NID_sha3_224 -//Error # define HAVE_SHA3_224 +# define HAVE_SHA3_224 # endif # ifdef NID_sha3_256 -//Error # define HAVE_SHA3_256 +# define HAVE_SHA3_256 # endif +#endif # ifdef NID_sha3_384 # define HAVE_SHA3_384 # endif -- cgit v1.2.3 From 0a833d0339fe5bb4c26c30430d74f83d7f2b6519 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 22 Aug 2018 16:50:15 +0200 Subject: crypto: A user's guide chapter on algorithm details Such as keylengths, blocksizes and IV lengths are hard to find otherwise Conflicts: lib/crypto/doc/src/crypto.xml --- lib/crypto/doc/src/Makefile | 2 +- lib/crypto/doc/src/algorithm_details.xml | 290 +++++++++++++++++++++++++++++++ lib/crypto/doc/src/usersguide.xml | 1 + 3 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 lib/crypto/doc/src/algorithm_details.xml (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index 2148062e78..3203324954 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -39,7 +39,7 @@ XML_REF3_FILES = crypto.xml XML_REF6_FILES = crypto_app.xml XML_PART_FILES = usersguide.xml -XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml engine_keys.xml +XML_CHAPTER_FILES = notes.xml licenses.xml fips.xml engine_load.xml engine_keys.xml algorithm_details.xml BOOK_FILES = book.xml diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml new file mode 100644 index 0000000000..088f5e8e97 --- /dev/null +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -0,0 +1,290 @@ + + + + +
+ + 20142017 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + Algorithm Details + Hans Nilsson + + 2018-08-22 + A + algorithm_details.xml +
+

+ This chapter describes details of algorithms in the crypto application. +

+

The tables only documents the supported cryptos and key lengths. The user should not draw any conclusion + on security from the supplied tables. +

+ +
+ Ciphers +
+ Block Ciphers +

To be used in + block_encrypt/3, + block_encrypt/4, + block_decrypt/3 and + block_decrypt/4. +

+

Available in all OpenSSL compatible with Erlang CRYPTO if not disabled by configuration. +

+

To dynamically check availability, check that the name in the Cipher and Mode column is present in the + list with the cipher tag in the return value of + crypto:supports(). +

+ + Cipher and ModeKey length
[bytes]
IV length
[bytes]
Block size
[bytes]
+ aes_cbc 16, 24, 321616 + aes_cbc128161616 + aes_cbc256321616 + + aes_cfb8 16, 24, 3216any + + aes_ecb16, 24, 32 16 + + aes_ige256163216 + blowfish_cbc 4-56 8 8 + blowfish_cfb64 1- 8 any + blowfish_ecb1- 8 + blowfish_ofb641-8any + + des3_cbc
(=DES EDE3 CBC)
[8,8,8]88
+ des3_cfb
(=DES EDE3 CFB)
[8,8,8]8any
+ + des_cbc88 8 + des_cfb88any + des_ecb8 8 + des_ede3
(=DES EDE3 CBC)
[8,8,8]88
+ rc2_cbc1-88 + Block cipher key lengths +
+
+ +
+ AEAD Ciphers +

To be used in block_encrypt/4 and + block_decrypt/4. +

+

To dynamically check availability, check that the name in the Cipher and Mode column is present in the + list with the cipher tag in the return value of + crypto:supports(). +

+ + Cipher and ModeKey length
[bytes]
IV length
[bytes]
AAD length
[bytes]
Block size
[bytes]
Supported with
OpenSSL versions
+ aes_gcm 16 16 0-16 any1.0.1 - + chacha20_poly130532 1-16 any any1.1.0 - + AEAD cipher key lengths +
+
+ +
+ Stream Ciphers +

To be used in stream_init/2 and + stream_init/3. +

+

To dynamically check availability, check that the name in the Cipher and Mode column is present in the + list with the cipher tag in the return value of + crypto:supports(). +

+ + Cipher and ModeKey length
[bytes]
IV length
[bytes]
Supported with
OpenSSL versions
+ aes_ctr16, 24, 32161.0.1 - + rc41- all + Stream cipher key lengths +
+
+
+ +
+ Message Authentication Codes (MACs) + +
+ CMAC +

To be used in cmac/3 and + cmac/4. +

+

CMAC with the following ciphers are available with OpenSSL 1.0.1 or later if not disabled by configuration. +

+ +

To dynamically check availability, check that the name cmac is present in the + list with the macs tag in the return value of + crypto:supports(). + Also check that the name in the Cipher and Mode column is present in the + list with the cipher tag in the return value. +

+ + Cipher and ModeKey length
[bytes]
Max Mac Length
[bytes]
+ aes_cbc 16, 24, 3216 + aes_cbc1281616 + aes_cbc2563216 + + aes_cfb8 161 + + blowfish_cbc 4-56 8 + blowfish_cfb64 1- 1 + blowfish_ecb1- 8 + blowfish_ofb641- 1 + + des3_cbc
(=DES EDE3 CBC)
[8,8,8]8
+ des3_cfb
(=DES EDE3 CFB)
[8,8,8]1
+ + des_cbc88 + + des_cfb81 + des_ecb81 + rc2_cbc1-8 + CMAC cipher key lengths +
+
+ +
+ HMAC +

Available in all OpenSSL compatible with Erlang CRYPTO if not disabled by configuration. +

+

To dynamically check availability, check that the name hmac is present in the + list with the macs tag in the return value of + crypto:supports(). +

+
+ +
+ POLY1305 +

POLY1305 is available with OpenSSL 1.1.1 or later if not disabled by configuration. +

+

To dynamically check availability, check that the name poly1305 is present in the + list with the macs tag in the return value of + crypto:supports(). +

+
+ +
+ +
+ Hash + +

To dynamically check availability, check that the wanted name in the Names column is present in the + list with the hashs tag in the return value of + crypto:supports(). +

+ + + + Type + Names + Supported with
OpenSSL versions
+
+ SHA1shaall + SHA2sha224, sha256, sha384, sha512all + SHA3sha3_224, sha3_256, sha3_384, sha3_5121.1.1 - + MD4md4all + MD5md5all + RIPEMDripemd160all + +
+
+ +
+ Public Key Cryptography + +
+ RSA +

RSA is available with all OpenSSL versions compatible with Erlang CRYPTO if not disabled by configuration. + To dynamically check availability, check that the atom rsa is present in the + list with the public_keys tag in the return value of + crypto:supports(). +

+ + + Option sign/verify encrypt/decrypt Supported with
OpenSSL versions
+ {rsa_mgf1_md,atom()} x x 1.0.1 + {rsa_oaep_label, binary()} x + {rsa_oaep_md, atom()} x + {rsa_padding,rsa_pkcs1_pss_padding} x 1.0.0 + {rsa_pss_saltlen, -2..} x 1.0.0 + {rsa_padding,rsa_no_padding} x x + {rsa_padding,rsa_pkcs1_padding} x x + {rsa_padding,rsa_sslv23_padding} x + {rsa_padding,rsa_x931_padding} x + +
+
+ +
+ DSS +

DSS is available with OpenSSL versions compatible with Erlang CRYPTO if not disabled by configuration. + To dynamically check availability, check that the atom dss is present in the + list with the public_keys tag in the return value of + crypto:supports(). +

+
+ +
+ ECDSA +

ECDSA is available with OpenSSL 0.9.8o or later if not disabled by configuration. + To dynamically check availability, check that the atom ecdsa is present in the + list with the public_keys tag in the return value of + crypto:supports(). + If the atom ec_gf2m characteristic two field curves are available. +

+

The actual supported named curves could be checked by examining the list with the + curves tag in the return value of + crypto:supports(). +

+
+ +
+ Diffie-Hellman +

Diffie-Hellman computations are available with OpenSSL versions compatible with Erlang CRYPTO + if not disabled by configuration. + To dynamically check availability, check that the atom dh is present in the + list with the public_keys tag in the return value of + crypto:supports(). +

+
+ +
+ Elliptic Curve Diffie-Hellman +

Elliptic Curve Diffie-Hellman is available with OpenSSL 0.9.8o or later if not disabled by configuration. + To dynamically check availability, check that the atom ecdh is present in the + list with the public_keys tag in the return value of + crypto:supports(). +

+ +

The Edward curves x25519 and x448 are supported with OpenSSL 1.1.1 or later + if not disabled by configuration. +

+ +

The actual supported named curves could be checked by examining the list with the + curves tag in the return value of + crypto:supports(). +

+
+ +
+ + +
+ + + + + diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml index 0124121433..2dfc966609 100644 --- a/lib/crypto/doc/src/usersguide.xml +++ b/lib/crypto/doc/src/usersguide.xml @@ -50,4 +50,5 @@ + -- cgit v1.2.3 From fa60c386364e4a1852151a56ec6942e394545983 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 28 Aug 2018 16:04:42 +0200 Subject: crypto: Setup for doc generation --- lib/crypto/doc/specs/.gitignore | 1 + lib/crypto/doc/src/Makefile | 7 +++++++ lib/crypto/doc/src/specs.xml | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 lib/crypto/doc/specs/.gitignore create mode 100644 lib/crypto/doc/src/specs.xml (limited to 'lib/crypto') diff --git a/lib/crypto/doc/specs/.gitignore b/lib/crypto/doc/specs/.gitignore new file mode 100644 index 0000000000..322eebcb06 --- /dev/null +++ b/lib/crypto/doc/specs/.gitignore @@ -0,0 +1 @@ +specs_*.xml diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile index 3203324954..cbcafb7375 100644 --- a/lib/crypto/doc/src/Makefile +++ b/lib/crypto/doc/src/Makefile @@ -62,11 +62,17 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf +SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml) + +TOP_SPECS_FILE = specs.xml + # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- XML_FLAGS += +#in ssh it looks like this: SPECS_FLAGS = -I../../../public_key/include -I../../../public_key/src -I../../.. + # ---------------------------------------------------- # Targets # ---------------------------------------------------- @@ -93,6 +99,7 @@ clean clean_docs clean_tex: rm -f $(MAN3DIR)/* rm -f $(MAN6DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) + rm -f $(SPECS_FILES) rm -f errs core *~ # ---------------------------------------------------- diff --git a/lib/crypto/doc/src/specs.xml b/lib/crypto/doc/src/specs.xml new file mode 100644 index 0000000000..66c79a906b --- /dev/null +++ b/lib/crypto/doc/src/specs.xml @@ -0,0 +1,4 @@ + + + + -- cgit v1.2.3 From 35848c8ba5968b0d9aec3f7aaac6d31000e4da15 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 28 Aug 2018 16:07:21 +0200 Subject: crypto: Rework -type and -spec Check code and documentation and write -type/-spec or adjust existing. Prepare for doc generation --- lib/crypto/src/crypto.erl | 976 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 739 insertions(+), 237 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 17351d10ea..a841f0f168 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -66,12 +66,31 @@ ensure_engine_unloaded/2 ]). +-export_type([ %% A minimum exported: only what public_key needs. + dh_private/0, + dh_public/0, + dss_digest_type/0, + ec_named_curve/0, + ecdsa_digest_type/0, + pk_encrypt_decrypt_opts/0, + pk_sign_verify_opts/0, + rsa_digest_type/0, + sha1/0, + sha2/0 + ]). + -export_type([engine_ref/0, key_id/0, password/0 ]). - +%%% Opaque types must be exported :( +-export_type([ + stream_state/0, + hmac_state/0, + hash_state/0 + ]). + %% Private. For tests. -export([packed_openssl_version/4, engine_methods_convert_to_bitmask/2, get_test_engine/0]). @@ -83,16 +102,187 @@ %% Used by strong_rand_float/0 -define(HALF_DBL_EPSILON, 1.1102230246251565e-16). % math:pow(2, -53) -%%-type ecdsa_digest_type() :: 'md5' | 'sha' | 'sha256' | 'sha384' | 'sha512'. + +%%% ===== BEGIN NEW TYPING ==== + +%%% Basic +-type key_integer() :: integer() | binary(). % Always binary() when used as return value + +%%% Keys +-type rsa_public() :: [key_integer()] . % [E, N] +-type rsa_private() :: [key_integer()] . % [E, N, D] | [E, N, D, P1, P2, E1, E2, C] +-type rsa_params() :: {ModulusSizeInBits::integer(), PublicExponent::key_integer()} . + +-type dss_public() :: [key_integer()] . % [P, Q, G, Y] +-type dss_private() :: [key_integer()] . % [P, Q, G, X] + +-type ecdsa_public() :: key_integer() . +-type ecdsa_private() :: key_integer() . +-type ecdsa_params() :: ec_named_curve() | edwards_curve() | ec_explicit_curve() . + +-type srp_public() :: key_integer() . +-type srp_private() :: key_integer() . +-type srp_gen_params() :: {user,srp_user_gen_params()} | {host,srp_host_gen_params()}. +-type srp_comp_params() :: {user,srp_user_comp_params()} | {host,srp_host_comp_params()}. +-type srp_user_gen_params() :: list(binary() | atom() | list()) . +-type srp_host_gen_params() :: list(binary() | atom() | list()) . +-type srp_user_comp_params() :: list(binary() | atom()) . +-type srp_host_comp_params() :: list(binary() | atom()) . + +-type dh_public() :: key_integer() . +-type dh_private() :: key_integer() . +-type dh_params() :: [key_integer()] . % [P, G] | [P, G, PrivateKeyBitLength] + +-type ecdh_public() :: key_integer() . +-type ecdh_private() :: key_integer() . +-type ecdh_params() :: ec_named_curve() | edwards_curve() | ec_explicit_curve() . + + +%%% Curves + +-type ec_explicit_curve() :: {Field :: ec_field(), + Curve :: ec_curve(), + BasePoint :: binary(), + Order :: binary(), + CoFactor :: none | % FIXME: Really? + binary() + } . + +-type ec_curve() :: {A :: binary(), + B :: binary(), + Seed :: none | binary() + } . + +-type ec_field() :: ec_prime_field() | ec_characteristic_two_field() . + +-type ec_prime_field() :: {prime_field, Prime :: integer()} . +-type ec_characteristic_two_field() :: {characteristic_two_field, M :: integer(), Basis :: ec_basis()} . + +-type ec_basis() :: {tpbasis, K :: non_neg_integer()} + | {ppbasis, K1 :: non_neg_integer(), K2 :: non_neg_integer(), K3 :: non_neg_integer()} + | onbasis . + +-type ec_named_curve() :: brainpoolP160r1 + | brainpoolP160t1 + | brainpoolP192r1 + | brainpoolP192t1 + | brainpoolP224r1 + | brainpoolP224t1 + | brainpoolP256r1 + | brainpoolP256t1 + | brainpoolP320r1 + | brainpoolP320t1 + | brainpoolP384r1 + | brainpoolP384t1 + | brainpoolP512r1 + | brainpoolP512t1 + | c2pnb163v1 + | c2pnb163v2 + | c2pnb163v3 + | c2pnb176v1 + | c2pnb208w1 + | c2pnb272w1 + | c2pnb304w1 + | c2pnb368w1 + | c2tnb191v1 + | c2tnb191v2 + | c2tnb191v3 + | c2tnb239v1 + | c2tnb239v2 + | c2tnb239v3 + | c2tnb359v1 + | c2tnb431r1 + | ipsec3 + | ipsec4 + | prime192v1 + | prime192v2 + | prime192v3 + | prime239v1 + | prime239v2 + | prime239v3 + | prime256v1 + | secp112r1 + | secp112r2 + | secp128r1 + | secp128r2 + | secp160k1 + | secp160r1 + | secp160r2 + | secp192k1 + | secp192r1 + | secp224k1 + | secp224r1 + | secp256k1 + | secp256r1 + | secp384r1 + | secp521r1 + | sect113r1 + | sect113r2 + | sect131r1 + | sect131r2 + | sect163k1 + | sect163r1 + | sect163r2 + | sect193r1 + | sect193r2 + | sect233k1 + | sect233r1 + | sect239k1 + | sect283k1 + | sect283r1 + | sect409k1 + | sect409r1 + | sect571k1 + | sect571r1 + | wtls1 + | wtls10 + | wtls11 + | wtls12 + | wtls3 + | wtls4 + | wtls5 + | wtls6 + | wtls7 + | wtls8 + | wtls9 + . + +-type edwards_curve() :: x25519 + | x448 . + +%%% +-type block_cipher_with_iv() :: cbc_cipher() + | cfb_cipher() + | aes_cbc128 + | aes_cbc256 + | aes_ige256 + | blowfish_ofb64 + | des3_cbf % cfb misspelled + | des_ede3 + | rc2_cbc . + +-type cbc_cipher() :: des_cbc | des3_cbc | aes_cbc | blowfish_cbc . +-type aead_cipher() :: aes_gcm | chacha20_poly1305 . +-type cfb_cipher() :: aes_cfb128 | aes_cfb8 | blowfish_cfb64 | des3_cfb | des_cfb . + +-type block_cipher_without_iv() :: ecb_cipher() . +-type ecb_cipher() :: des_ecb | blowfish_ecb | aes_ecb . + +-type key() :: iodata(). +-type des3_key() :: [key()]. + +%%% +-type rsa_digest_type() :: sha1() | sha2() | md5 | ripemd160 . +-type dss_digest_type() :: sha1() | sha2() . +-type ecdsa_digest_type() :: sha1() | sha2() . + +-type sha1() :: sha . +-type sha2() :: sha224 | sha256 | sha384 | sha512 . +-type sha3() :: sha3_224 | sha3_256 | sha3_384 | sha3_512 . + +-type compatibility_only_hash() :: md5 | md4 . + -type crypto_integer() :: binary() | integer(). -%%-type ec_named_curve() :: atom(). -%%-type ec_point() :: crypto_integer(). -%%-type ec_basis() :: {tpbasis, K :: non_neg_integer()} | {ppbasis, K1 :: non_neg_integer(), K2 :: non_neg_integer(), K3 :: non_neg_integer()} | onbasis. -%%-type ec_field() :: {prime_field, Prime :: integer()} | {characteristic_two_field, M :: integer(), Basis :: ec_basis()}. -%%-type ec_prime() :: {A :: crypto_integer(), B :: crypto_integer(), Seed :: binary() | none}. -%%-type ec_curve_spec() :: {Field :: ec_field(), Prime :: ec_prime(), Point :: crypto_integer(), Order :: integer(), CoFactor :: none | integer()}. -%%-type ec_curve() :: ec_named_curve() | ec_curve_spec(). -%%-type ec_key() :: {Curve :: ec_curve(), PrivKey :: binary() | undefined, PubKey :: ec_point() | undefined}. -compile(no_native). -on_load(on_load/0). @@ -108,14 +298,36 @@ nif_stub_error(Line) -> %% Crypto app version history: %% (no version): Driver implementation %% 2.0 : NIF implementation, requires OTP R14 + +%% When generating documentation from crypto.erl, the macro ?CRYPTO_VSN is not defined. +%% That causes the doc generation to stop... +-ifndef(CRYPTO_VSN). +-define(CRYPTO_VSN, "??"). +-endif. version() -> ?CRYPTO_VSN. +-spec start() -> ok | {error, Reason::term()}. start() -> application:start(crypto). +-spec stop() -> ok | {error, Reason::term()}. stop() -> application:stop(crypto). +-spec supports() -> [Support] + when Support :: {hashs, Hashs} + | {ciphers, Ciphers} + | {public_keys, PKs} + | {macs, Macs} + | {curves, Curves}, + Hashs :: [sha1() | sha2() | sha3() | ripemd160 | compatibility_only_hash()], + Ciphers :: [stream_cipher() + | block_cipher_with_iv() | block_cipher_without_iv() + | aead_cipher() + ], + PKs :: [rsa | dss | ecdsa | dh | ecdh | ec_gf2m], + Macs :: [hmac | cmac | poly1305], + Curves :: [ec_named_curve() | edwards_curve()]. supports()-> {Hashs, PubKeys, Ciphers, Macs, Curves} = algorithms(), [{hashs, Hashs}, @@ -125,6 +337,9 @@ supports()-> {curves, Curves} ]. +-spec info_lib() -> [{Name,VerNum,VerStr}] when Name :: binary(), + VerNum :: integer(), + VerStr :: binary() . info_lib() -> ?nif_stub. -spec info_fips() -> not_supported | not_enabled | enabled. @@ -135,85 +350,150 @@ info_fips() -> ?nif_stub. enable_fips_mode(_) -> ?nif_stub. --spec hash(_, iodata()) -> binary(). +%%%================================================================ +%%% +%%% Hashing +%%% +%%%================================================================ -hash(Hash, Data0) -> - Data = iolist_to_binary(Data0), - MaxBytes = max_bytes(), - hash(Hash, Data, erlang:byte_size(Data), MaxBytes). +-define(HASH_HASH_ALGORITHM, sha1() | sha2() | sha3() | ripemd160 | compatibility_only_hash() ). --spec hash_init('md5'|'md4'|'ripemd160'| - 'sha'|'sha224'|'sha256'|'sha384'|'sha512'| - 'sha3_224' | 'sha3_256' | 'sha3_384' | 'sha3_512') -> any(). +-spec hash(Type, Data) -> Digest when Type :: ?HASH_HASH_ALGORITHM, + Data :: iodata(), + Digest :: binary(). +hash(Type, Data) -> + Data1 = iolist_to_binary(Data), + MaxBytes = max_bytes(), + hash(Type, Data1, erlang:byte_size(Data1), MaxBytes). -hash_init(Hash) -> - notsup_to_error(hash_init_nif(Hash)). +-opaque hash_state() :: reference(). --spec hash_update(_, iodata()) -> any(). +-spec hash_init(Type) -> State when Type :: ?HASH_HASH_ALGORITHM, + State :: hash_state(). +hash_init(Type) -> + notsup_to_error(hash_init_nif(Type)). -hash_update(State, Data0) -> - Data = iolist_to_binary(Data0), +-spec hash_update(State, Data) -> NewState when State :: hash_state(), + NewState :: hash_state(), + Data :: iodata() . +hash_update(Context, Data) -> + Data1 = iolist_to_binary(Data), MaxBytes = max_bytes(), - hash_update(State, Data, erlang:byte_size(Data), MaxBytes). + hash_update(Context, Data1, erlang:byte_size(Data1), MaxBytes). --spec hash_final(_) -> binary(). +-spec hash_final(State) -> Digest when State :: hash_state(), + Digest :: binary(). +hash_final(Context) -> + notsup_to_error(hash_final_nif(Context)). -hash_final(State) -> - notsup_to_error(hash_final_nif(State)). +%%%================================================================ +%%% +%%% MACs (Message Authentication Codes) +%%% +%%%================================================================ +%%%---- HMAC --spec hmac(_, iodata(), iodata()) -> binary(). --spec hmac(_, iodata(), iodata(), integer()) -> binary(). --spec hmac_init(atom(), iodata()) -> binary(). --spec hmac_update(binary(), iodata()) -> binary(). --spec hmac_final(binary()) -> binary(). --spec hmac_final_n(binary(), integer()) -> binary(). +-define(HMAC_HASH_ALGORITHM, sha1() | sha2() | sha3() | compatibility_only_hash()). -hmac(Type, Key, Data0) -> - Data = iolist_to_binary(Data0), - hmac(Type, Key, Data, undefined, erlang:byte_size(Data), max_bytes()). -hmac(Type, Key, Data0, MacSize) -> - Data = iolist_to_binary(Data0), - hmac(Type, Key, Data, MacSize, erlang:byte_size(Data), max_bytes()). +%%%---- hmac/3,4 + +-spec hmac(Type, Key, Data) -> + Mac when Type :: ?HMAC_HASH_ALGORITHM, + Key :: iodata(), + Data :: iodata(), + Mac :: binary() . +hmac(Type, Key, Data) -> + Data1 = iolist_to_binary(Data), + hmac(Type, Key, Data1, undefined, erlang:byte_size(Data1), max_bytes()). + +-spec hmac(Type, Key, Data, MacLength) -> + Mac when Type :: ?HMAC_HASH_ALGORITHM, + Key :: iodata(), + Data :: iodata(), + MacLength :: integer(), + Mac :: binary() . + +hmac(Type, Key, Data, MacLength) -> + Data1 = iolist_to_binary(Data), + hmac(Type, Key, Data1, MacLength, erlang:byte_size(Data1), max_bytes()). +%%%---- hmac_init, hamc_update, hmac_final + +-opaque hmac_state() :: binary(). + +-spec hmac_init(Type, Key) -> + State when Type :: ?HMAC_HASH_ALGORITHM, + Key :: iodata(), + State :: hmac_state() . hmac_init(Type, Key) -> notsup_to_error(hmac_init_nif(Type, Key)). +%%%---- hmac_update + +-spec hmac_update(State, Data) -> NewState when Data :: iodata(), + State :: hmac_state(), + NewState :: hmac_state(). hmac_update(State, Data0) -> Data = iolist_to_binary(Data0), hmac_update(State, Data, erlang:byte_size(Data), max_bytes()). +%%%---- hmac_final + +-spec hmac_final(State) -> Mac when State :: hmac_state(), + Mac :: binary(). hmac_final(Context) -> notsup_to_error(hmac_final_nif(Context)). + +-spec hmac_final_n(State, HashLen) -> Mac when State :: hmac_state(), + HashLen :: integer(), + Mac :: binary(). hmac_final_n(Context, HashLen) -> notsup_to_error(hmac_final_nif(Context, HashLen)). --spec cmac(_, iodata(), iodata()) -> binary(). --spec cmac(_, iodata(), iodata(), integer()) -> binary(). +%%%---- CMAC + +-define(CMAC_CIPHER_ALGORITHM, cbc_cipher() | cfb_cipher() | blowfish_cbc | des_ede3 | rc2_cbc ). +-spec cmac(Type, Key, Data) -> + Mac when Type :: ?CMAC_CIPHER_ALGORITHM, + Key :: iodata(), + Data :: iodata(), + Mac :: binary(). cmac(Type, Key, Data) -> notsup_to_error(cmac_nif(Type, Key, Data)). -cmac(Type, Key, Data, MacSize) -> - erlang:binary_part(cmac(Type, Key, Data), 0, MacSize). --spec poly1305(iodata(), iodata()) -> binary(). +-spec cmac(Type, Key, Data, MacLength) -> + Mac when Type :: ?CMAC_CIPHER_ALGORITHM, + Key :: iodata(), + Data :: iodata(), + MacLength :: integer(), + Mac :: binary(). +cmac(Type, Key, Data, MacLength) -> + erlang:binary_part(cmac(Type, Key, Data), 0, MacLength). + +%%%---- POLY1305 + +-spec poly1305(iodata(), iodata()) -> Mac when Mac :: binary(). poly1305(Key, Data) -> poly1305_nif(Key, Data). -%% Ecrypt/decrypt %%% +%%%================================================================ +%%% +%%% Encrypt/decrypt +%%% +%%%================================================================ + +%%%---- Block ciphers --spec block_encrypt(des_cbc | des_cfb | - des3_cbc | des3_cbf | des3_cfb | des_ede3 | - blowfish_cbc | blowfish_cfb64 | blowfish_ofb64 | - aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | aes_ige256 | - aes_cbc | - rc2_cbc, - Key::iodata(), Ivec::binary(), Data::iodata()) -> binary(); - (aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata()}) -> {binary(), binary()}; - (aes_gcm, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata(), TagLength::1..16}) -> {binary(), binary()}. +-spec block_encrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), PlainText::iodata()) -> binary(); + (Type::aead_cipher(), Key::iodata(), Ivec::binary(), {AAD::binary(), PlainText::iodata()}) -> + {binary(), binary()}; + (aes_gcm, Key::iodata(), Ivec::binary(), {AAD::binary(), PlainText::iodata(), TagLength::1..16}) -> + {binary(), binary()}. -block_encrypt(Type, Key, Ivec, Data) when Type =:= des_cbc; +block_encrypt(Type, Key, Ivec, PlainText) when Type =:= des_cbc; Type =:= des_cfb; Type =:= blowfish_cbc; Type =:= blowfish_cfb64; @@ -224,34 +504,28 @@ block_encrypt(Type, Key, Ivec, Data) when Type =:= des_cbc; Type =:= aes_cbc256; Type =:= aes_cbc; Type =:= rc2_cbc -> - block_crypt_nif(Type, Key, Ivec, Data, true); -block_encrypt(Type, Key0, Ivec, Data) when Type =:= des3_cbc; + block_crypt_nif(Type, Key, Ivec, PlainText, true); +block_encrypt(Type, Key0, Ivec, PlainText) when Type =:= des3_cbc; Type =:= des_ede3 -> Key = check_des3_key(Key0), - block_crypt_nif(des_ede3_cbc, Key, Ivec, Data, true); -block_encrypt(des3_cbf, Key0, Ivec, Data) -> + block_crypt_nif(des_ede3_cbc, Key, Ivec, PlainText, true); +block_encrypt(des3_cbf, Key0, Ivec, PlainText) -> % cfb misspelled Key = check_des3_key(Key0), - block_crypt_nif(des_ede3_cbf, Key, Ivec, Data, true); -block_encrypt(des3_cfb, Key0, Ivec, Data) -> + block_crypt_nif(des_ede3_cbf, Key, Ivec, PlainText, true); +block_encrypt(des3_cfb, Key0, Ivec, PlainText) -> Key = check_des3_key(Key0), - block_crypt_nif(des_ede3_cfb, Key, Ivec, Data, true); -block_encrypt(aes_ige256, Key, Ivec, Data) -> - notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, true)); -block_encrypt(aes_gcm, Key, Ivec, {AAD, Data}) -> - aes_gcm_encrypt(Key, Ivec, AAD, Data); -block_encrypt(aes_gcm, Key, Ivec, {AAD, Data, TagLength}) -> - aes_gcm_encrypt(Key, Ivec, AAD, Data, TagLength); -block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, Data}) -> - chacha20_poly1305_encrypt(Key, Ivec, AAD, Data). - --spec block_decrypt(des_cbc | des_cfb | - des3_cbc | des3_cbf | des3_cfb | des_ede3 | - blowfish_cbc | blowfish_cfb64 | blowfish_ofb64 | - aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | aes_ige256 | - aes_cbc | - rc2_cbc, - Key::iodata(), Ivec::binary(), Data::iodata()) -> binary(); - (aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(), + block_crypt_nif(des_ede3_cfb, Key, Ivec, PlainText, true); +block_encrypt(aes_ige256, Key, Ivec, PlainText) -> + notsup_to_error(aes_ige_crypt_nif(Key, Ivec, PlainText, true)); +block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText}) -> + aes_gcm_encrypt(Key, Ivec, AAD, PlainText); +block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText, TagLength}) -> + aes_gcm_encrypt(Key, Ivec, AAD, PlainText, TagLength); +block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> + chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). + +-spec block_decrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), Data::iodata()) -> binary(); + (Type::aead_cipher(), Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata(), Tag::binary()}) -> binary() | error. block_decrypt(Type, Key, Ivec, Data) when Type =:= des_cbc; Type =:= des_cfb; @@ -269,7 +543,7 @@ block_decrypt(Type, Key0, Ivec, Data) when Type =:= des3_cbc; Type =:= des_ede3 -> Key = check_des3_key(Key0), block_crypt_nif(des_ede3_cbc, Key, Ivec, Data, false); -block_decrypt(des3_cbf, Key0, Ivec, Data) -> +block_decrypt(des3_cbf, Key0, Ivec, Data) -> % cfb misspelled Key = check_des3_key(Key0), block_crypt_nif(des_ede3_cbf, Key, Ivec, Data, false); block_decrypt(des3_cfb, Key0, Ivec, Data) -> @@ -282,18 +556,23 @@ block_decrypt(aes_gcm, Key, Ivec, {AAD, Data, Tag}) -> block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). --spec block_encrypt(des_ecb | blowfish_ecb | aes_ecb, Key::iodata(), Data::iodata()) -> binary(). -block_encrypt(Type, Key, Data) -> - block_crypt_nif(Type, Key, Data, true). --spec block_decrypt(des_ecb | blowfish_ecb | aes_ecb, Key::iodata(), Data::iodata()) -> binary(). +-spec block_encrypt(Type::block_cipher_without_iv(), Key::key(), PlainText::iodata()) -> binary(). + +block_encrypt(Type, Key, PlainText) -> + block_crypt_nif(Type, Key, PlainText, true). + + +-spec block_decrypt(Type::block_cipher_without_iv(), Key::key(), Data::iodata()) -> binary(). block_decrypt(Type, Key, Data) -> block_crypt_nif(Type, Key, Data, false). --spec next_iv(des_cbc | des3_cbc | aes_cbc | aes_ige, Data::iodata()) -> binary(). +-spec next_iv(Type:: cbc_cipher(), Data) -> NextIVec when % Type :: cbc_cipher(), %des_cbc | des3_cbc | aes_cbc | aes_ige, + Data :: iodata(), + NextIVec :: binary(). next_iv(Type, Data) when is_binary(Data) -> IVecSize = case Type of des_cbc -> 8; @@ -308,7 +587,9 @@ next_iv(Type, Data) when is_binary(Data) -> next_iv(Type, Data) when is_list(Data) -> next_iv(Type, list_to_binary(Data)). --spec next_iv(des_cfb, Data::iodata(), Ivec::binary()) -> binary(). +-spec next_iv(des_cfb, Data, IVec) -> NextIVec when Data :: iodata(), + IVec :: binary(), + NextIVec :: binary(). next_iv(des_cfb, Data, IVec) -> IVecAndData = list_to_binary([IVec, Data]), @@ -317,41 +598,57 @@ next_iv(des_cfb, Data, IVec) -> next_iv(Type, Data, _Ivec) -> next_iv(Type, Data). +%%%---- Stream ciphers + +-opaque stream_state() :: {stream_cipher(), reference()}. + +-type stream_cipher() :: rc4 | aes_ctr | chacha20 . + +-spec stream_init(Type, Key, IVec) -> State when Type :: aes_ctr | chacha20, + Key :: iodata(), + IVec :: binary(), + State :: stream_state() . stream_init(aes_ctr, Key, Ivec) -> {aes_ctr, aes_ctr_stream_init(Key, Ivec)}; stream_init(chacha20, Key, Ivec) -> {chacha20, chacha20_stream_init(Key,Ivec)}. +-spec stream_init(Type, Key) -> State when Type :: rc4, + Key :: iodata(), + State :: stream_state() . stream_init(rc4, Key) -> {rc4, notsup_to_error(rc4_set_key(Key))}. +-spec stream_encrypt(State, PlainText) -> {NewState, CipherText} + when State :: stream_state(), + PlainText :: iodata(), + NewState :: stream_state(), + CipherText :: iodata() . stream_encrypt(State, Data0) -> Data = iolist_to_binary(Data0), MaxByts = max_bytes(), stream_crypt(fun do_stream_encrypt/2, State, Data, erlang:byte_size(Data), MaxByts, []). +-spec stream_decrypt(State, CipherText) -> {NewState, PlainText} + when State :: stream_state(), + CipherText :: iodata(), + NewState :: stream_state(), + PlainText :: iodata() . stream_decrypt(State, Data0) -> Data = iolist_to_binary(Data0), MaxByts = max_bytes(), stream_crypt(fun do_stream_decrypt/2, State, Data, erlang:byte_size(Data), MaxByts, []). -%% -%% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib -%% + +%%%================================================================ +%%% +%%% RAND - pseudo random numbers using RN_ and BN_ functions in crypto lib +%%% +%%%================================================================ -type rand_cache_seed() :: nonempty_improper_list(non_neg_integer(), binary()). --spec strong_rand_bytes(non_neg_integer()) -> binary(). --spec rand_seed() -> rand:state(). --spec rand_seed_s() -> rand:state(). --spec rand_seed_alg(Alg :: atom()) -> - {rand:alg_handler(), - atom() | rand_cache_seed()}. --spec rand_seed_alg_s(Alg :: atom()) -> - {rand:alg_handler(), - atom() | rand_cache_seed()}. --spec rand_uniform(crypto_integer(), crypto_integer()) -> - crypto_integer(). +-spec strong_rand_bytes(N::non_neg_integer()) -> binary(). strong_rand_bytes(Bytes) -> case strong_rand_bytes_nif(Bytes) of false -> erlang:error(low_entropy); @@ -360,16 +657,24 @@ strong_rand_bytes(Bytes) -> strong_rand_bytes_nif(_Bytes) -> ?nif_stub. +-spec rand_seed() -> rand:state(). rand_seed() -> rand:seed(rand_seed_s()). +-spec rand_seed_s() -> rand:state(). rand_seed_s() -> rand_seed_alg_s(?MODULE). +-spec rand_seed_alg(Alg :: atom()) -> + {rand:alg_handler(), + atom() | rand_cache_seed()}. rand_seed_alg(Alg) -> rand:seed(rand_seed_alg_s(Alg)). -define(CRYPTO_CACHE_BITS, 56). +-spec rand_seed_alg_s(Alg :: atom()) -> + {rand:alg_handler(), + atom() | rand_cache_seed()}. rand_seed_alg_s(?MODULE) -> {#{ type => ?MODULE, bits => 64, @@ -427,7 +732,9 @@ strong_rand_float() -> WholeRange = strong_rand_range(1 bsl 53), ?HALF_DBL_EPSILON * bytes_to_integer(WholeRange). -rand_uniform(From,To) when is_binary(From), is_binary(To) -> +-spec rand_uniform(crypto_integer(), crypto_integer()) -> + crypto_integer(). +rand_uniform(From, To) when is_binary(From), is_binary(To) -> case rand_uniform_nif(From,To) of <> when MSB > 127 -> <<(Len + 1):32/integer, 0, MSB, Rest/binary>>; @@ -462,116 +769,228 @@ rand_seed(Seed) when is_binary(Seed) -> rand_seed_nif(_Seed) -> ?nif_stub. --spec mod_pow(binary()|integer(), binary()|integer(), binary()|integer()) -> binary() | error. -mod_pow(Base, Exponent, Prime) -> - case mod_exp_nif(ensure_int_as_bin(Base), ensure_int_as_bin(Exponent), ensure_int_as_bin(Prime), 0) of - <<0>> -> error; - R -> R - end. +%%%================================================================ +%%% +%%% Sign/verify +%%% +%%%================================================================ +-type pk_sign_verify_algs() :: rsa | dss | ecdsa . -verify(Algorithm, Type, Data, Signature, Key) -> - verify(Algorithm, Type, Data, Signature, Key, []). +-type pk_sign_verify_opts() :: [ rsa_sign_verify_opt() ] . -%% Backwards compatible -verify(Algorithm = dss, none, Digest, Signature, Key, Options) -> - verify(Algorithm, sha, {digest, Digest}, Signature, Key, Options); -verify(Algorithm, Type, Data, Signature, Key, Options) -> - case pkey_verify_nif(Algorithm, Type, Data, Signature, format_pkey(Algorithm, Key), Options) of - notsup -> erlang:error(notsup); - Boolean -> Boolean - end. +-type rsa_sign_verify_opt() :: {rsa_padding, rsa_sign_verify_padding()} + | {rsa_pss_saltlen, integer()} . +-type rsa_sign_verify_padding() :: rsa_pkcs1_padding | rsa_pkcs1_pss_padding + | rsa_x931_padding | rsa_no_padding + . + + +%%%---------------------------------------------------------------- +%%% Sign + +-spec sign(Algorithm, DigestType, Msg, Key) + -> Signature + when Algorithm :: pk_sign_verify_algs(), + DigestType :: rsa_digest_type() + | dss_digest_type() + | ecdsa_digest_type(), + Msg :: binary() | {digest,binary()}, + Key :: rsa_private() + | dss_private() + | [ecdsa_private()|ecdsa_params()] + | engine_key_ref(), + Signature :: binary() . sign(Algorithm, Type, Data, Key) -> sign(Algorithm, Type, Data, Key, []). -%% Backwards compatible -sign(Algorithm = dss, none, Digest, Key, Options) -> - sign(Algorithm, sha, {digest, Digest}, Key, Options); -sign(Algorithm, Type, Data, Key, Options) -> + +-spec sign(Algorithm, DigestType, Msg, Key, Options) + -> Signature + when Algorithm :: pk_sign_verify_algs(), + DigestType :: rsa_digest_type() + | dss_digest_type() + | ecdsa_digest_type() + | none, + Msg :: binary() | {digest,binary()}, + Key :: rsa_private() + | dss_private() + | [ecdsa_private() | ecdsa_params()] + | engine_key_ref(), + Options :: pk_sign_verify_opts(), + Signature :: binary() . + +sign(Algorithm0, Type0, Data, Key, Options) -> + {Algorithm, Type} = sign_verify_compatibility(Algorithm0, Type0, Data), case pkey_sign_nif(Algorithm, Type, Data, format_pkey(Algorithm, Key), Options) of error -> erlang:error(badkey, [Algorithm, Type, Data, Key, Options]); notsup -> erlang:error(notsup); Signature -> Signature end. +pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. +%%%---------------------------------------------------------------- +%%% Verify + +-spec verify(Algorithm, DigestType, Msg, Signature, Key) + -> Result + when Algorithm :: pk_sign_verify_algs(), + DigestType :: rsa_digest_type() + | dss_digest_type() + | ecdsa_digest_type(), + Msg :: binary() | {digest,binary()}, + Signature :: binary(), + Key :: rsa_private() + | dss_private() + | [ecdsa_private() | ecdsa_params()] + | engine_key_ref(), + Result :: boolean(). --type key_id() :: string() | binary() . --type password() :: string() | binary() . - --type engine_key_ref() :: #{engine := engine_ref(), - key_id := key_id(), - password => password(), - term() => term() - }. - --type pk_algs() :: rsa | ecdsa | dss . --type pk_key() :: engine_key_ref() | [integer() | binary()] . --type pk_opt() :: list() | rsa_padding() . - --spec public_encrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). --spec public_decrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). --spec private_encrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). --spec private_decrypt(pk_algs(), binary(), pk_key(), pk_opt()) -> binary(). +verify(Algorithm, Type, Data, Signature, Key) -> + verify(Algorithm, Type, Data, Signature, Key, []). -public_encrypt(Algorithm, In, Key, Options) when is_list(Options) -> - case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, false, true) of - error -> erlang:error(encrypt_failed, [Algorithm, In, Key, Options]); +-spec verify(Algorithm, DigestType, Msg, Signature, Key, Options) + -> Result + when Algorithm :: pk_sign_verify_algs(), + DigestType :: rsa_digest_type() + | dss_digest_type() + | ecdsa_digest_type(), + Msg :: binary() | {digest,binary()}, + Signature :: binary(), + Key :: rsa_public() + | dss_public() + | [ecdsa_public() | ecdsa_params()] + | engine_key_ref(), + Options :: pk_sign_verify_opts(), + Result :: boolean(). + +verify(Algorithm0, Type0, Data, Signature, Key, Options) -> + {Algorithm, Type} = sign_verify_compatibility(Algorithm0, Type0, Data), + case pkey_verify_nif(Algorithm, Type, Data, Signature, format_pkey(Algorithm, Key), Options) of notsup -> erlang:error(notsup); - Out -> Out - end; -%% Backwards compatible -public_encrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> - public_encrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). + Boolean -> Boolean + end. -private_decrypt(Algorithm, In, Key, Options) when is_list(Options) -> - case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, true, false) of - error -> erlang:error(decrypt_failed, [Algorithm, In, Key, Options]); - notsup -> erlang:error(notsup); - Out -> Out - end; -%% Backwards compatible -private_decrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> - private_decrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). +pkey_verify_nif(_Algorithm, _Type, _Data, _Signature, _Key, _Options) -> ?nif_stub. -private_encrypt(Algorithm, In, Key, Options) when is_list(Options) -> - case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, true, true) of - error -> erlang:error(encrypt_failed, [Algorithm, In, Key, Options]); - notsup -> erlang:error(notsup); - Out -> Out - end; -%% Backwards compatible -private_encrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> - private_encrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). +%% Backwards compatible: +sign_verify_compatibility(dss, none, Digest) -> + {sha, {digest, Digest}}; +sign_verify_compatibility(Algorithm0, Type0, _Digest) -> + {Algorithm0, Type0}. -public_decrypt(Algorithm, In, Key, Options) when is_list(Options) -> - case pkey_crypt_nif(Algorithm, In, format_pkey(Algorithm, Key), Options, false, false) of - error -> erlang:error(decrypt_failed, [Algorithm, In, Key, Options]); +%%%================================================================ +%%% +%%% Public/private encrypt/decrypt +%%% +%%% Only rsa works so far (although ecdsa | dss should do it) +%%%================================================================ +-type pk_encrypt_decrypt_algs() :: rsa . + +-type pk_encrypt_decrypt_opts() :: [rsa_opt()] | rsa_compat_opts(). + +-type rsa_compat_opts() :: [{rsa_pad, rsa_padding()}] + | rsa_padding() . + +-type rsa_padding() :: rsa_pkcs1_padding + | rsa_pkcs1_oaep_padding + | rsa_sslv23_padding + | rsa_x931_padding + | rsa_no_padding. + +-type rsa_opt() :: {rsa_padding, rsa_padding()} + | {signature_md, atom()} + | {rsa_mgf1_md, sha} + | {rsa_oaep_label, binary()} + | {rsa_oaep_md, sha} . + +%%%---- Encrypt with public key + +-spec public_encrypt(Algorithm, PlainText, PublicKey, Options) -> + CipherText when Algorithm :: pk_encrypt_decrypt_algs(), + PlainText :: binary(), + PublicKey :: rsa_public() | engine_key_ref(), + Options :: pk_encrypt_decrypt_opts(), + CipherText :: binary(). +public_encrypt(Algorithm, PlainText, PublicKey, Options) -> + pkey_crypt(Algorithm, PlainText, PublicKey, Options, false, true). + +%%%---- Decrypt with private key + +-spec private_decrypt(Algorithm, CipherText, PrivateKey, Options) -> + PlainText when Algorithm :: pk_encrypt_decrypt_algs(), + CipherText :: binary(), + PrivateKey :: rsa_private() | engine_key_ref(), + Options :: pk_encrypt_decrypt_opts(), + PlainText :: binary() . +private_decrypt(Algorithm, CipherText, PrivateKey, Options) -> + pkey_crypt(Algorithm, CipherText, PrivateKey, Options, true, false). + +%%%---- Encrypt with private key + +-spec private_encrypt(Algorithm, PlainText, PrivateKey, Options) -> + CipherText when Algorithm :: pk_encrypt_decrypt_algs(), + PlainText :: binary(), + PrivateKey :: rsa_private() | engine_key_ref(), + Options :: pk_encrypt_decrypt_opts(), + CipherText :: binary(). +private_encrypt(Algorithm, PlainText, PrivateKey, Options) -> + pkey_crypt(Algorithm, PlainText, PrivateKey, Options, true, true). + +%%%---- Decrypt with public key + +-spec public_decrypt(Algorithm, CipherText, PublicKey, Options) -> + PlainText when Algorithm :: pk_encrypt_decrypt_algs(), + CipherText :: binary(), + PublicKey :: rsa_public() | engine_key_ref(), + Options :: pk_encrypt_decrypt_opts(), + PlainText :: binary() . +public_decrypt(Algorithm, CipherText, PublicKey, Options) -> + pkey_crypt(Algorithm, CipherText, PublicKey, Options, false, false). + +%%%---- Call the nif, but fix a compatibility issue first + +%% Backwards compatible (rsa_pad -> rsa_padding is handled by the pkey_crypt_nif): +pkey_crypt(rsa, Text, Key, Padding, PubPriv, EncDec) when is_atom(Padding) -> + pkey_crypt(rsa, Text, Key, [{rsa_padding, Padding}], PubPriv, EncDec); + +pkey_crypt(Alg, Text, Key, Options, PubPriv, EncDec) -> + case pkey_crypt_nif(Alg, Text, format_pkey(Alg,Key), Options, PubPriv, EncDec) of + error when EncDec==true -> erlang:error(encrypt_failed, [Alg, Text, Key, Options]); + error when EncDec==false -> erlang:error(decrypt_failed, [Alg, Text, Key, Options]); notsup -> erlang:error(notsup); Out -> Out - end; -%% Backwards compatible -public_decrypt(Algorithm = rsa, In, Key, Padding) when is_atom(Padding) -> - public_decrypt(Algorithm, In, Key, [{rsa_padding, Padding}]). - - -%% -%% XOR - xor to iolists and return a binary -%% NB doesn't check that they are the same size, just concatenates -%% them and sends them to the driver -%% --spec exor(iodata(), iodata()) -> binary(). + end. -exor(Bin1, Bin2) -> - Data1 = iolist_to_binary(Bin1), - Data2 = iolist_to_binary(Bin2), - MaxBytes = max_bytes(), - exor(Data1, Data2, erlang:byte_size(Data1), MaxBytes, []). +pkey_crypt_nif(_Algorithm, _In, _Key, _Options, _IsPrivate, _IsEncrypt) -> ?nif_stub. +%%%================================================================ +%%% +%%% +%%% +%%%================================================================ + +-spec generate_key(Type, Params) + -> {PublicKey, PrivKeyOut} + when Type :: dh | ecdh | rsa | srp, + PublicKey :: dh_public() | ecdh_public() | rsa_public() | srp_public(), + PrivKeyOut :: dh_private() | ecdh_private() | rsa_private() | {srp_public(),srp_private()}, + Params :: dh_params() | ecdh_params() | rsa_params() | srp_gen_params() + . generate_key(Type, Params) -> generate_key(Type, Params, undefined). +-spec generate_key(Type, Params, PrivKeyIn) + -> {PublicKey, PrivKeyOut} + when Type :: dh | ecdh | rsa | srp, + PublicKey :: dh_public() | ecdh_public() | rsa_public() | srp_public(), + PrivKeyIn :: undefined | dh_private() | ecdh_private() | rsa_private() | {srp_public(),srp_private()}, + PrivKeyOut :: dh_private() | ecdh_private() | rsa_private() | {srp_public(),srp_private()}, + Params :: dh_params() | ecdh_params() | rsa_params() | srp_comp_params() + . + generate_key(dh, DHParameters0, PrivateKey) -> {DHParameters, Len} = case DHParameters0 of @@ -618,6 +1037,14 @@ generate_key(ecdh, Curve, PrivKey) -> evp_generate_key_nif(_Curve) -> ?nif_stub. +-spec compute_key(Type, OthersPublicKey, MyPrivateKey, Params) + -> SharedSecret + when Type :: dh | ecdh | srp, + SharedSecret :: binary(), + OthersPublicKey :: dh_public() | ecdh_public() | srp_public(), + MyPrivateKey :: dh_private() | ecdh_private() | {srp_public(),srp_private()}, + Params :: dh_params() | ecdh_params() | srp_comp_params() + . compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) -> case dh_compute_key_nif(ensure_int_as_bin(OthersPublicKey), @@ -670,9 +1097,59 @@ compute_key(ecdh, Others, My, Curve) -> evp_compute_key_nif(_Curve, _OthersBin, _MyBin) -> ?nif_stub. -%%====================================================================== -%% Engine functions -%%====================================================================== + +%%%================================================================ +%%% +%%% XOR - xor to iolists and return a binary +%%% NB doesn't check that they are the same size, just concatenates +%%% them and sends them to the driver +%%% +%%%================================================================ + +-spec exor(iodata(), iodata()) -> binary(). + +exor(Bin1, Bin2) -> + Data1 = iolist_to_binary(Bin1), + Data2 = iolist_to_binary(Bin2), + MaxBytes = max_bytes(), + exor(Data1, Data2, erlang:byte_size(Data1), MaxBytes, []). + + +%%%================================================================ +%%% +%%% Exponentiation modulo +%%% +%%%================================================================ + +-spec mod_pow(N, P, M) -> Result when N :: binary() | integer(), + P :: binary() | integer(), + M :: binary() | integer(), + Result :: binary() | error . +mod_pow(Base, Exponent, Prime) -> + case mod_exp_nif(ensure_int_as_bin(Base), ensure_int_as_bin(Exponent), ensure_int_as_bin(Prime), 0) of + <<0>> -> error; + R -> R + end. + +%%%====================================================================== +%%% +%%% Engine functions +%%% +%%%====================================================================== + +%%%---- Refering to keys stored in an engine: +-type key_id() :: string() | binary() . +-type password() :: string() | binary() . + +-type engine_key_ref() :: #{engine := engine_ref(), + key_id := key_id(), + password => password(), + term() => term() + }. + +%%%---- Commands: +-type engine_cmnd() :: {unicode:chardata(), unicode:chardata()}. + %%---------------------------------------------------------------------- %% Function: engine_get_all_methods/0 %%---------------------------------------------------------------------- @@ -684,18 +1161,18 @@ evp_compute_key_nif(_Curve, _OthersBin, _MyBin) -> ?nif_stub. -type engine_ref() :: term(). --spec engine_get_all_methods() -> - [engine_method_type()]. +-spec engine_get_all_methods() -> Result when Result :: [engine_method_type()]. engine_get_all_methods() -> notsup_to_error(engine_get_all_methods_nif()). %%---------------------------------------------------------------------- %% Function: engine_load/3 %%---------------------------------------------------------------------- --spec engine_load(EngineId::unicode:chardata(), - PreCmds::[{unicode:chardata(), unicode:chardata()}], - PostCmds::[{unicode:chardata(), unicode:chardata()}]) -> - {ok, Engine::engine_ref()} | {error, Reason::term()}. +-spec engine_load(EngineId, PreCmds, PostCmds) -> + Result when EngineId::unicode:chardata(), + PreCmds::[engine_cmnd()], + PostCmds::[engine_cmnd()], + Result :: {ok, Engine::engine_ref()} | {error, Reason::term()}. engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), is_list(PostCmds) -> engine_load(EngineId, PreCmds, PostCmds, engine_get_all_methods()). @@ -703,11 +1180,12 @@ engine_load(EngineId, PreCmds, PostCmds) when is_list(PreCmds), %%---------------------------------------------------------------------- %% Function: engine_load/4 %%---------------------------------------------------------------------- --spec engine_load(EngineId::unicode:chardata(), - PreCmds::[{unicode:chardata(), unicode:chardata()}], - PostCmds::[{unicode:chardata(), unicode:chardata()}], - EngineMethods::[engine_method_type()]) -> - {ok, Engine::term()} | {error, Reason::term()}. +-spec engine_load(EngineId, PreCmds, PostCmds, EngineMethods) -> + Result when EngineId::unicode:chardata(), + PreCmds::[engine_cmnd()], + PostCmds::[engine_cmnd()], + EngineMethods::[engine_method_type()], + Result :: {ok, Engine::engine_ref()} | {error, Reason::term()}. engine_load(EngineId, PreCmds, PostCmds, EngineMethods) when is_list(PreCmds), is_list(PostCmds) -> try @@ -752,13 +1230,14 @@ engine_load_2(Engine, PostCmds, EngineMethods) -> %%---------------------------------------------------------------------- %% Function: engine_unload/1 %%---------------------------------------------------------------------- --spec engine_unload(Engine::term()) -> - ok | {error, Reason::term()}. +-spec engine_unload(Engine) -> Result when Engine :: engine_ref(), + Result :: ok | {error, Reason::term()}. engine_unload(Engine) -> engine_unload(Engine, engine_get_all_methods()). --spec engine_unload(Engine::term(), EngineMethods::[engine_method_type()]) -> - ok | {error, Reason::term()}. +-spec engine_unload(Engine, EngineMethods) -> Result when Engine :: engine_ref(), + EngineMethods :: [engine_method_type()], + Result :: ok | {error, Reason::term()}. engine_unload(Engine, EngineMethods) -> try [ok = engine_nif_wrapper(engine_unregister_nif(Engine, engine_method_atom_to_int(Method))) || @@ -775,6 +1254,8 @@ engine_unload(Engine, EngineMethods) -> %%---------------------------------------------------------------------- %% Function: engine_by_id/1 %%---------------------------------------------------------------------- +-spec engine_by_id(EngineId) -> Result when EngineId :: unicode:chardata(), + Result :: {ok, Engine::engine_ref()} | {error, Reason::term()} . engine_by_id(EngineId) -> try notsup_to_error(engine_by_id_nif(ensure_bin_chardata(EngineId))) @@ -786,32 +1267,39 @@ engine_by_id(EngineId) -> %%---------------------------------------------------------------------- %% Function: engine_add/1 %%---------------------------------------------------------------------- +-spec engine_add(Engine) -> Result when Engine :: engine_ref(), + Result :: ok | {error, Reason::term()} . engine_add(Engine) -> notsup_to_error(engine_add_nif(Engine)). %%---------------------------------------------------------------------- %% Function: engine_remove/1 %%---------------------------------------------------------------------- +-spec engine_remove(Engine) -> Result when Engine :: engine_ref(), + Result :: ok | {error, Reason::term()} . engine_remove(Engine) -> notsup_to_error(engine_remove_nif(Engine)). %%---------------------------------------------------------------------- %% Function: engine_get_id/1 %%---------------------------------------------------------------------- +-spec engine_get_id(Engine) -> EngineId when Engine :: engine_ref(), + EngineId :: unicode:chardata(). engine_get_id(Engine) -> notsup_to_error(engine_get_id_nif(Engine)). %%---------------------------------------------------------------------- %% Function: engine_get_name/1 %%---------------------------------------------------------------------- +-spec engine_get_name(Engine) -> EngineName when Engine :: engine_ref(), + EngineName :: unicode:chardata(). engine_get_name(Engine) -> notsup_to_error(engine_get_name_nif(Engine)). %%---------------------------------------------------------------------- %% Function: engine_list/0 %%---------------------------------------------------------------------- --spec engine_list() -> - [EngineId::binary()]. +-spec engine_list() -> Result when Result :: [EngineId::unicode:chardata()]. engine_list() -> case notsup_to_error(engine_get_first_nif()) of {ok, <<>>} -> @@ -841,21 +1329,23 @@ engine_list(Engine0, IdList) -> %%---------------------------------------------------------------------- %% Function: engine_ctrl_cmd_string/3 %%---------------------------------------------------------------------- --spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), - CmdArg::unicode:chardata()) -> - ok | {error, Reason::term()}. +-spec engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> + Result when Engine::term(), + CmdName::unicode:chardata(), + CmdArg::unicode:chardata(), + Result :: ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> engine_ctrl_cmd_string(Engine, CmdName, CmdArg, false). %%---------------------------------------------------------------------- %% Function: engine_ctrl_cmd_string/4 %%---------------------------------------------------------------------- --spec engine_ctrl_cmd_string(Engine::term(), - CmdName::unicode:chardata(), - CmdArg::unicode:chardata(), - Optional::boolean()) -> - ok | {error, Reason::term()}. +-spec engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> + Result when Engine::term(), + CmdName::unicode:chardata(), + CmdArg::unicode:chardata(), + Optional::boolean(), + Result :: ok | {error, Reason::term()}. engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> case engine_ctrl_cmd_strings_nif(Engine, ensure_bin_cmds([{CmdName, CmdArg}]), @@ -872,6 +1362,10 @@ engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> %% Function: ensure_engine_loaded/2 %% Special version of load that only uses dynamic engine to load %%---------------------------------------------------------------------- +-spec ensure_engine_loaded(EngineId, LibPath) -> + Result when EngineId :: unicode:chardata(), + LibPath :: unicode:chardata(), + Result :: {ok, Engine::engine_ref()} | {error, Reason::term()}. ensure_engine_loaded(EngineId, LibPath) -> ensure_engine_loaded(EngineId, LibPath, engine_get_all_methods()). @@ -879,6 +1373,11 @@ ensure_engine_loaded(EngineId, LibPath) -> %% Function: ensure_engine_loaded/3 %% Special version of load that only uses dynamic engine to load %%---------------------------------------------------------------------- +-spec ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> + Result when EngineId :: unicode:chardata(), + LibPath :: unicode:chardata(), + EngineMethods :: [engine_method_type()], + Result :: {ok, Engine::engine_ref()} | {error, Reason::term()}. ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> try List = crypto:engine_list(), @@ -930,12 +1429,18 @@ ensure_engine_loaded_2(Engine, Methods) -> %%---------------------------------------------------------------------- %% Function: ensure_engine_unloaded/1 %%---------------------------------------------------------------------- +-spec ensure_engine_unloaded(Engine) -> Result when Engine :: engine_ref(), + Result :: ok | {error, Reason::term()}. ensure_engine_unloaded(Engine) -> ensure_engine_unloaded(Engine, engine_get_all_methods()). %%---------------------------------------------------------------------- %% Function: ensure_engine_unloaded/2 %%---------------------------------------------------------------------- +-spec ensure_engine_unloaded(Engine, EngineMethods) -> + Result when Engine :: engine_ref(), + EngineMethods :: [engine_method_type()], + Result :: ok | {error, Reason::term()}. ensure_engine_unloaded(Engine, EngineMethods) -> case engine_remove(Engine) of ok -> @@ -1010,9 +1515,13 @@ path2bin(Path) when is_list(Path) -> Bin end. -%%-------------------------------------------------------------------- +%%%================================================================ +%%%================================================================ +%%% %%% Internal functions -%%-------------------------------------------------------------------- +%%% +%%%================================================================ + max_bytes() -> ?MAX_BYTES_TO_NIF. @@ -1151,14 +1660,6 @@ do_stream_decrypt({chacha20, State0}, Data) -> %% %% AES - in counter mode (CTR) with state maintained for multi-call streaming %% --type ctr_state() :: { iodata(), binary(), binary(), integer() } | binary(). - --spec aes_ctr_stream_init(iodata(), binary()) -> ctr_state(). --spec aes_ctr_stream_encrypt(ctr_state(), binary()) -> - { ctr_state(), binary() }. --spec aes_ctr_stream_decrypt(ctr_state(), binary()) -> - { ctr_state(), binary() }. - aes_ctr_stream_init(_Key, _IVec) -> ?nif_stub. aes_ctr_stream_encrypt(_State, _Data) -> ?nif_stub. aes_ctr_stream_decrypt(_State, _Cipher) -> ?nif_stub. @@ -1172,11 +1673,6 @@ rc4_encrypt_with_state(_State, _Data) -> ?nif_stub. %% %% CHACHA20 - stream cipher %% --type chacha20_state() :: term(). --spec chacha20_stream_init(iodata(), binary()) -> chacha20_state(). --spec chacha20_stream_encrypt(chacha20_state(), binary()) -> {chacha20_state(), binary()}. --spec chacha20_stream_decrypt(chacha20_state(), binary()) -> {chacha20_state(), binary()}. - chacha20_stream_init(_Key, _IVec) -> ?nif_stub. chacha20_stream_encrypt(_State, _Data) -> ?nif_stub. chacha20_stream_decrypt(_State, _Data) -> ?nif_stub. @@ -1247,11 +1743,6 @@ srp_user_secret_nif(_A, _U, _B, _Multiplier, _Generator, _Exponent, _Prime) -> ? srp_value_B_nif(_Multiplier, _Verifier, _Generator, _Exponent, _Prime) -> ?nif_stub. -%% Digital signatures -------------------------------------------------------------------- - -pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. -pkey_verify_nif(_Algorithm, _Type, _Data, _Signature, _Key, _Options) -> ?nif_stub. - %% Public Keys -------------------------------------------------------------------- %% RSA Rivest-Shamir-Adleman functions %% @@ -1273,13 +1764,20 @@ ec_key_generate(_Curve, _Key) -> ?nif_stub. ecdh_compute_key_nif(_Others, _Curve, _My) -> ?nif_stub. +-spec ec_curves() -> [EllipticCurve] when EllipticCurve :: ec_named_curve() | edwards_curve() . + ec_curves() -> crypto_ec_curves:curves(). +-spec ec_curve(CurveName) -> ExplicitCurve when CurveName :: ec_named_curve(), + ExplicitCurve :: ec_explicit_curve() . ec_curve(X) -> crypto_ec_curves:curve(X). +-spec privkey_to_pubkey(Type, EnginePrivateKeyRef) -> PublicKey when Type :: rsa | dss, + EnginePrivateKeyRef :: engine_key_ref(), + PublicKey :: rsa_public() | dss_public() . privkey_to_pubkey(Alg, EngineMap) when Alg == rsa; Alg == dss; Alg == ecdsa -> try privkey_to_pubkey_nif(Alg, format_pkey(Alg,EngineMap)) of @@ -1305,10 +1803,16 @@ term_to_nif_prime({prime_field, Prime}) -> {prime_field, ensure_int_as_bin(Prime)}; term_to_nif_prime(PrimeField) -> PrimeField. + term_to_nif_curve({A, B, Seed}) -> {ensure_int_as_bin(A), ensure_int_as_bin(B), Seed}. + nif_curve_params({PrimeField, Curve, BasePoint, Order, CoFactor}) -> - {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), ensure_int_as_bin(Order), ensure_int_as_bin(CoFactor)}; + {term_to_nif_prime(PrimeField), + term_to_nif_curve(Curve), + ensure_int_as_bin(BasePoint), + ensure_int_as_bin(Order), + ensure_int_as_bin(CoFactor)}; nif_curve_params(Curve) when is_atom(Curve) -> %% named curve case Curve of @@ -1348,6 +1852,7 @@ int_to_bin_neg(-1, Ds=[MSB|_]) when MSB >= 16#80 -> int_to_bin_neg(X,Ds) -> int_to_bin_neg(X bsr 8, [(X band 255)|Ds]). +-spec bytes_to_integer(binary()) -> integer() . bytes_to_integer(Bin) -> bin_to_int(Bin). @@ -1395,9 +1900,6 @@ format_pwd(M) -> M. %%-------------------------------------------------------------------- %% --type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. - -pkey_crypt_nif(_Algorithm, _In, _Key, _Options, _IsPrivate, _IsEncrypt) -> ?nif_stub. %% large integer in a binary with 32bit length %% MP representaion (SSH2) -- cgit v1.2.3 From cb654518a4fa58fa65f46e1386ff91c6375f6f5a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 28 Aug 2018 16:08:13 +0200 Subject: crypto: Generate refman from types and specs and fix links in engine chapter for generated crypto module refman --- lib/crypto/doc/src/crypto.xml | 1104 ++++++++++++++++-------------------- lib/crypto/doc/src/engine_keys.xml | 2 +- 2 files changed, 481 insertions(+), 625 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 4289bd4a64..9d436847ac 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -46,6 +46,12 @@

Block ciphers - DES and AES in Block Cipher Modes - ECB, CBC, CFB, OFB, CTR and GCM

+ +

GCM: Dworkin, M., + "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", + National Institute of Standards and Technology SP 800-38D, November 2007. +

+

RSA encryption RFC 1321

@@ -56,192 +62,358 @@

Secure Remote Password Protocol (SRP - RFC 2945)

- -

gcm: Dworkin, M., "Recommendation for Block Cipher Modes of - Operation: Galois/Counter Mode (GCM) and GMAC", - National Institute of Standards and Technology SP 800- - 38D, November 2007.

-
- -
- DATA TYPES - - key_value() = integer() | binary() -

Always binary() when used as return value

+ +

The actual supported algorithms and features depends on their availability in the actual libcrypto used. + See the crypto (App) about dependencies. +

+

Enabling FIPS mode will also disable algorithms and features. +

+
- rsa_public() = [key_value()] = [E, N] -

Where E is the public exponent and N is public modulus.

+

The CRYPTO User's Guide has more information on + FIPS, Engines and Algorithm Details like key lengths. +

+ - rsa_private() = [key_value()] = [E, N, D] | [E, N, D, P1, P2, E1, E2, C] -

Where E is the public exponent, N is public modulus and D is - the private exponent. The longer key format contains redundant - information that will make the calculation faster. P1,P2 are first - and second prime factors. E1,E2 are first and second exponents. C - is the CRT coefficient. Terminology is taken from RFC 3447.

+ + Ciphers + + + +

Stream ciphers for + stream_encrypt/2 and + stream_decrypt/2 . +

+
+
- dss_public() = [key_value()] = [P, Q, G, Y] -

Where P, Q and G are the dss parameters and Y is the public key.

+ + + + + +

Block ciphers with initialization vector for + block_encrypt/4 and + block_decrypt/4 . +

+
+
- dss_private() = [key_value()] = [P, Q, G, X] -

Where P, Q and G are the dss parameters and X is the private key.

+ + + + +

Block ciphers without initialization vector for + block_encrypt/3 and + block_decrypt/3 . +

+
+
- srp_public() = key_value() -

Where is A or B from SRP design

+ + + +

Ciphers with simultaneous MAC-calculation or MAC-checking. + block_encrypt/4 and + block_decrypt/4 . +

+
+
- srp_private() = key_value() -

Where is a or b from SRP design

+ Digests + + + + + + + -

Where Verifier is v, Generator is g and Prime is N, DerivedKey is X, and Scrambler is - u (optional will be generated if not provided) from SRP design - Version = '3' | '6' | '6a' -

+ + + +

The compatibility_only_hash() algorithms are recommended only for compatibility with existing applications.

+
+
- dh_public() = key_value() + + + + + - dh_private() = key_value() + + + + + - dh_params() = [key_value()] = [P, G] | [P, G, PrivateKeyBitLength] + + + + + - ecdh_public() = key_value() + Elliptic Curves + + + + +

Note that some curves are disabled if FIPS is enabled.

+
+
- ecdh_private() = key_value() + + + + + +

Parametric curve definition.

+
+
- ecdh_params() = ec_named_curve() | ec_explicit_curve() + + + + + +

Curve definition details.

+
+
- ed_named_curves_ecdh() -> x448 | x25519 -

Note that the curves are only supported if the underlying OpenSSL has support for them.

+ Keys + + + + +

For keylengths, iv-sizes and blocksizes see the + User's Guide. +

+

A key for des3 is a list of three iolists

+
+
- ec_explicit_curve() = - {ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), - CoFactor :: none | integer()} + + + +

Always binary() when used as return value

+
+
- ec_field() = {prime_field, Prime :: integer()} | - {characteristic_two_field, M :: integer(), Basis :: ec_basis()} + Public/Private Keys + + + + + + rsa_public() = [E, N] + rsa_private() = [E, N, D] | [E, N, D, P1, P2, E1, E2, C] +

Where E is the public exponent, N is public modulus and D is + the private exponent. The longer key format contains redundant + information that will make the calculation faster. P1,P2 are first + and second prime factors. E1,E2 are first and second exponents. C + is the CRT coefficient. Terminology is taken from RFC 3447.

+
+
- ec_basis() = {tpbasis, K :: non_neg_integer()} | - {ppbasis, K1 :: non_neg_integer(), K2 :: non_neg_integer(), K3 :: non_neg_integer()} | - onbasis + + + + + dss_public() = [P, Q, G, Y] +

Where P, Q and G are the dss parameters and Y is the public key.

- ec_named_curve() -> - sect571r1| sect571k1| sect409r1| sect409k1| secp521r1| secp384r1| secp224r1| secp224k1| - secp192k1| secp160r2| secp128r2| secp128r1| sect233r1| sect233k1| sect193r2| sect193r1| - sect131r2| sect131r1| sect283r1| sect283k1| sect163r2| secp256k1| secp160k1| secp160r1| - secp112r2| secp112r1| sect113r2| sect113r1| sect239k1| sect163r1| sect163k1| secp256r1| - secp192r1| - brainpoolP160r1| brainpoolP160t1| brainpoolP192r1| brainpoolP192t1| brainpoolP224r1| - brainpoolP224t1| brainpoolP256r1| brainpoolP256t1| brainpoolP320r1| brainpoolP320t1| - brainpoolP384r1| brainpoolP384t1| brainpoolP512r1| brainpoolP512t1 - -

Note that the sect curves are GF2m (characteristic two) curves and are only supported if the - underlying OpenSSL has support for them. - See also crypto:supports/0 -

+ dss_private() = [P, Q, G, X] +

Where P, Q and G are the dss parameters and X is the private key.

+
+
- - - engine_key_ref() = #{engine := engine_ref(), - key_id := key_id(), - password => password()} + + + + + + + - engine_ref() = term() -

The result of a call to for example engine_load/3. -

+ + + + + srp_public() = key_integer() +

Where is A or B from SRP design

+ + srp_private() = key_integer() +

Where is a or b from SRP design

+
+
- key_id() = string() | binary() -

Identifies the key to be used. The format depends on the loaded engine. It is passed to - the ENGINE_load_(private|public)_key functions in libcrypto. -

+ + + + + + srp_user_gen_params() = [DerivedKey::binary(), Prime::binary(), Generator::binary(), Version::atom()] + + srp_host_gen_params() = [Verifier::binary(), Prime::binary(), Version::atom() ] + + srp_user_comp_params() = [DerivedKey::binary(), Prime::binary(), Generator::binary(), Version::atom() | ScramblerArg::list()] + + srp_host_comp_params() = [Verifier::binary(), Prime::binary(), Version::atom() | ScramblerArg::list()] +

Where Verifier is v, Generator is g and Prime is N, DerivedKey is X, and Scrambler is + u (optional will be generated if not provided) from SRP design + Version = '3' | '6' | '6a' +

+
+
- password() = string() | binary() -

The key's password -

+ Public Key Ciphers - stream_cipher() = rc4 | aes_ctr | chacha20 + + + +

Algorithms for public key encrypt/decrypt. Only RSA is supported.

+
+
- block_cipher() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc | - blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc + + + + + +

Options for public key encrypt/decrypt. Only RSA is supported.

+
+
- aead_cipher() = aes_gcm | chacha20_poly1305 -

Note that the actual supported algorithms depends on the underlying crypto library.

+ + + +

Those option forms are kept only for compatibility and should not be used in new code.

+
+
- stream_key() = aes_key() | rc4_key() + Public Key Sign and Verify - block_key() = aes_key() | blowfish_key() | des_key()| des3_key() + + + +

Algorithms for sign and verify.

+
+
- aes_key() = iodata()

Key length is 128, 192 or 256 bits

+ + + + + +

Options for sign and verify.

+
+
- rc4_key() = iodata()

Variable key length from 8 bits up to 2048 bits (usually between 40 and 256)

+ Diffie-Hellman Keys and parameters + + + + + + - blowfish_key() = iodata()

Variable key length from 32 bits up to 448 bits

+ + + + dh_params() = [P, G] | [P, G, PrivateKeyBitLength] + + - des_key() = iodata()

Key length is 64 bits (in CBC mode only 8 bits are used)

+ + + + + + + - des3_key() = [binary(), binary(), binary()]

Each key part is 64 bits (in CBC mode only 8 bits are used)

+ Types for Engines - digest_type() = md5 | sha | sha224 | sha256 | sha384 | sha512 + + + + +

The result of a call to engine_load/3. +

+
+
- rsa_digest_type() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512 + + + +

Identifies the key to be used. The format depends on the loaded engine. It is passed to + the ENGINE_load_(private|public)_key functions in libcrypto. +

+
+
- dss_digest_type() = sha | sha224 | sha256 | sha384 | sha512

Note that the actual supported - dss_digest_type depends on the underlying crypto library. In OpenSSL version >= 1.0.1 the listed digest are supported, while in 1.0.0 only sha, sha224 and sha256 are supported. In version 0.9.8 only sha is supported.

+ + + +

The password of the key stored in an engine. +

+
+
- ecdsa_digest_type() = sha | sha224 | sha256 | sha384 | sha512 + + + - sign_options() = [{rsa_pad, rsa_sign_padding()} | {rsa_pss_saltlen, integer()}] + + + +

Pre and Post commands for engine_load/3 and /4. +

+
+
- rsa_sign_padding() = rsa_pkcs1_padding | rsa_pkcs1_pss_padding + Internal data types - hash_algorithms() = md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512 | - sha3_224 | sha3_256 | sha3_384 | sha3_512 -

md4 is also supported for hash_init/1 and hash/2. - Note that both md4 and md5 are recommended only for compatibility with existing applications. - Note that the actual supported hash_algorithms depends on the underlying crypto library. -

- cipher_algorithms() = aes_cbc | aes_cfb8 | aes_cfb128 | aes_ctr | aes_gcm | - aes_ige256 | blowfish_cbc | blowfish_cfb64 | chacha20 | chacha20_poly1305 | des_cbc | - des_cfb | des3_cbc | des3_cfb | des_ede3 | rc2_cbc | rc4 - mac_algorithms() = hmac | cmac | poly1305 - public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m -

Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported - with ecdsa and ecdh. -

- engine_method_type() = engine_method_rsa | engine_method_dsa | engine_method_dh | - engine_method_rand | engine_method_ecdh | engine_method_ecdsa | - engine_method_ciphers | engine_method_digests | engine_method_store | - engine_method_pkey_meths | engine_method_pkey_asn1_meths + + + + + +

Contexts with an internal state that should not be manipulated but passed between function calls. +

+
+
-
+ + - block_encrypt(Type, Key, PlainText) -> CipherText + Encrypt PlainText according to Type block cipher - - Type = des_ecb | blowfish_ecb | aes_ecb - Key = block_key() - PlainText = iodata() - -

Encrypt PlainText according to Type block cipher.

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

Encrypt PlainText according to Type block cipher.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

+

For keylengths and blocksizes see the + User's Guide. +

- block_decrypt(Type, Key, CipherText) -> PlainText + Decrypt CipherText according to Type block cipher - - Type = des_ecb | blowfish_ecb | aes_ecb - Key = block_key() - PlainText = iodata() -

Decrypt CipherText according to Type block cipher.

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

+

For keylengths and blocksizes see the + User's Guide. +

@@ -251,10 +423,10 @@ block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} Encrypt PlainText according to Type block cipher - Type = block_cipher() - AeadType = aead_cipher() - Key = block_key() - PlainText = iodata() + Type = block_cipher_with_iv() + AeadType = aead_cipher() + Key = key() | des3_key() + PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() TagLength = 1..16 @@ -264,8 +436,11 @@

In AEAD (Authenticated Encryption with Associated Data) mode, encrypt PlainTextaccording to Type block cipher and calculate CipherTag that also authenticates the AAD (Associated Authenticated Data).

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

+

For keylengths, iv-sizes and blocksizes see the + User's Guide. +

@@ -274,10 +449,10 @@ block_decrypt(AeadType, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | error Decrypt CipherText according to Type block cipher - Type = block_cipher() - AeadType = aead_cipher() - Key = block_key() - PlainText = iodata() + Type = block_cipher_with_iv() + AeadType = aead_cipher() + Key = key() | des3_key() + PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() @@ -287,19 +462,17 @@ CipherTextaccording to Type block cipher and check the authenticity the PlainText and AAD (Associated Authenticated Data) using the CipherTag. May return error if the decryption or validation fail's

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

+

For keylengths, iv-sizes and blocksizes see the + User's Guide. +

- bytes_to_integer(Bin) -> Integer + Convert binary representation, of an integer, to an Erlang integer. - - Bin = binary() - as returned by crypto functions - - Integer = integer() -

Convert binary representation, of an integer, to an Erlang integer.

@@ -307,17 +480,8 @@
- compute_key(Type, OthersPublicKey, MyKey, Params) -> SharedSecret + Computes the shared secret - - Type = dh | ecdh | srp - OthersPublicKey = dh_public() | ecdh_public() | srp_public() - MyKey = dh_private() | ecdh_private() | {srp_public(),srp_private()} - Params = dh_params() | ecdh_params() | ed_named_curves_ecdh() | SrpUserParams | SrpHostParams - SrpUserParams = {user, [DerivedKey::binary(), Prime::binary(), Generator::binary(), Version::atom() | [Scrambler:binary()]]} - SrpHostParams = {host, [Verifier::binary(), Prime::binary(), Version::atom() | [Scrambler::binary]]} - SharedSecret = binary() -

Computes the shared secret from the private key and the other party's public key. See also public_key:compute_key/2 @@ -326,85 +490,61 @@ - exor(Data1, Data2) -> Result + XOR data - - Data1, Data2 = iodata() - Result = binary() -

Performs bit-wise XOR (exclusive or) on the data supplied.

- - generate_key(Type, Params) -> {PublicKey, PrivKeyOut} - generate_key(Type, Params, PrivKeyIn) -> {PublicKey, PrivKeyOut} + + + + Generates a public key of type Type - - Type = dh | ecdh | rsa | srp - Params = dh_params() | ecdh_params() | ed_named_curves_ecdh()| RsaParams | SrpUserParams | SrpHostParams - RsaParams = {ModulusSizeInBits::integer(), PublicExponent::key_value()} - SrpUserParams = {user, [Generator::binary(), Prime::binary(), Version::atom()]} - SrpHostParams = {host, [Verifier::binary(), Generator::binary(), Prime::binary(), Version::atom()]} - PublicKey = dh_public() | ecdh_public() | rsa_public() | srp_public() - PrivKeyIn = undefined | dh_private() | ecdh_private() | srp_private() - PrivKeyOut = dh_private() | ecdh_private() | rsa_private() | srp_private() -

Generates a public key of type Type. See also public_key:generate_key/1. - May throw exception an exception of class error: + May raise exception:

- badarg: an argument is of wrong type or has an illegal value, - low_entropy: the random generator failed due to lack of secure "randomness", - computation_failed: the computation fails of another reason than low_entropy. + error:badarg: an argument is of wrong type or has an illegal value, + error:low_entropy: the random generator failed due to lack of secure "randomness", + error:computation_failed: the computation fails of another reason than low_entropy.

RSA key generation is only available if the runtime was built with dirty scheduler support. Otherwise, attempting to - generate an RSA key will throw exception error:notsup.

+ generate an RSA key will raise exception error:notsup.

- hash(Type, Data) -> Digest + - - Type = md4 | hash_algorithms() - Data = iodata() - Digest = binary() -

Computes a message digest of type Type from Data.

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

- hash_init(Type) -> Context + - - Type = md4 | hash_algorithms() -

Initializes the context for streaming hash operations. Type determines which digest to use. The returned context should be used as argument to hash_update.

-

May throw exception notsup in case the chosen Type - is not supported by the underlying OpenSSL implementation.

+

May raise exception error:notsup in case the chosen Type + is not supported by the underlying libcrypto implementation.

- hash_update(Context, Data) -> NewContext + - - Data = iodata() -

Updates the digest represented by Context using the given Data. Context must have been generated using hash_init @@ -413,12 +553,10 @@ or hash_final.

+ - hash_final(Context) -> Digest + - - Digest = binary() -

Finalizes the hash operation referenced by Context returned from a previous call to hash_update. @@ -428,16 +566,9 @@ - hmac(Type, Key, Data) -> Mac - hmac(Type, Key, Data, MacLength) -> Mac + + - - Type = hash_algorithms() - except ripemd160 - Key = iodata() - Data = iodata() - MacLength = integer() - Mac = binary() -

Computes a HMAC of type Type from Data using Key as the authentication key.

MacLength @@ -446,13 +577,8 @@ - hmac_init(Type, Key) -> Context + - - Type = hash_algorithms() - except ripemd160 - Key = iodata() - Context = binary() -

Initializes the context for streaming HMAC operations. Type determines which hash function to use in the HMAC operation. Key is the authentication @@ -461,12 +587,8 @@ - hmac_update(Context, Data) -> NewContext + - - Context = NewContext = binary() - Data = iodata() -

Updates the HMAC represented by Context using the given Data. Context must have been generated using an HMAC init function (such as @@ -479,16 +601,13 @@ call to hmac_update or hmac_final. The semantics of reusing old contexts in any way is undefined and could even crash the VM in earlier releases. The reason for this limitation is a lack of support in the underlying - OpenSSL API.

+ libcrypto API.

- hmac_final(Context) -> Mac + - - Context = Mac = binary() -

Finalizes the HMAC operation referenced by Context. The size of the resultant MAC is determined by the type of hash function used to generate it.

@@ -496,12 +615,8 @@
- hmac_final_n(Context, HashLen) -> Mac + - - Context = Mac = binary() - HashLen = non_neg_integer() -

Finalizes the HMAC operation referenced by Context. HashLen must be greater than zero. Mac will be a binary with at most HashLen bytes. Note that if HashLen is greater than the actual number of bytes returned from the underlying hash, the returned hash will have fewer than HashLen bytes.

@@ -509,16 +624,9 @@
- cmac(Type, Key, Data) -> Mac - cmac(Type, Key, Data, MacLength) -> Mac + + Calculates the Cipher-based Message Authentication Code. - - Type = block_cipher() - Key = iodata() - Data = iodata() - MacLength = integer() - Mac = binary() -

Computes a CMAC of type Type from Data using Key as the authentication key.

MacLength @@ -527,20 +635,17 @@ - info_fips() -> Status + Provides information about the FIPS operating status. - - Status = enabled | not_enabled | not_supported -

Provides information about the FIPS operating status of - crypto and the underlying OpenSSL library. If crypto was built + crypto and the underlying libcrypto library. If crypto was built with FIPS support this can be either enabled (when running in FIPS mode) or not_enabled. For other builds this value is always not_supported.

In FIPS mode all non-FIPS compliant algorithms are - disabled and throw exception not_supported. Check + disabled and raise exception error:notsup. Check supports that in FIPS mode returns the restricted list of available algorithms.

@@ -549,13 +654,8 @@
- info_lib() -> [{Name,VerNum,VerStr}] + Provides information about the libraries used by crypto. - - Name = binary() - VerNum = integer() - VerStr = binary() -

Provides the name and version of the libraries used by crypto.

Name is the name of the library. VerNum is @@ -568,50 +668,36 @@

From OTP R16 the numeric version represents the version of the OpenSSL header files (openssl/opensslv.h) used when crypto was compiled. - The text variant represents the OpenSSL library used at runtime. + The text variant represents the libcrypto library used at runtime. In earlier OTP versions both numeric and text was taken from the library.

- mod_pow(N, P, M) -> Result + Computes the function: N^P mod M - - N, P, M = binary() | integer() - Result = binary() | error -

Computes the function N^P mod M.

- next_iv(Type, Data) -> NextIVec - next_iv(Type, Data, IVec) -> NextIVec - - - Type = des_cbc | des3_cbc | aes_cbc | des_cfb - Data = iodata() - IVec = NextIVec = binary() - - -

Returns the initialization vector to be used in the next - iteration of encrypt/decrypt of type Type. Data is the - encrypted data from the previous iteration step. The IVec - argument is only needed for des_cfb as the vector used - in the previous iteration step.

-
+ + + + +

Returns the initialization vector to be used in the next + iteration of encrypt/decrypt of type Type. Data is the + encrypted data from the previous iteration step. The IVec + argument is only needed for des_cfb as the vector used + in the previous iteration step.

+
- poly1305(Key, Data) -> Mac + - - Key = iodata() - Data = iodata() - Mac = binary() -

Computes a POLY1305 message authentication code (Mac) from Data using Key as the authentication key.

@@ -619,15 +705,8 @@
- private_decrypt(Type, CipherText, PrivateKey, Padding) -> PlainText + Decrypts CipherText using the private Key. - - Type = rsa - CipherText = binary() - PrivateKey = rsa_private() | engine_key_ref() - Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding - PlainText = binary() -

Decrypts the CipherText, encrypted with public_encrypt/4 (or equivalent function) @@ -640,34 +719,8 @@ - privkey_to_pubkey(Type, EnginePrivateKeyRef) -> PublicKey - Fetches a public key from an Engine stored private key. - - Type = rsa | dss - EnginePrivateKeyRef = engine_key_ref() - PublicKey = rsa_public() | dss_public() - - -

Fetches the corresponding public key from a private key stored in an Engine. - The key must be of the type indicated by the Type parameter. -

-
-
- - - private_encrypt(Type, PlainText, PrivateKey, Padding) -> CipherText + Encrypts PlainText using the private Key. - - Type = rsa - PlainText = binary() - The size of the PlainText must be less - than byte_size(N)-11 if rsa_pkcs1_padding is - used, and byte_size(N) if rsa_no_padding is - used, where N is public modulus of the RSA key. - PrivateKey = rsa_private() | engine_key_ref() - Padding = rsa_pkcs1_padding | rsa_no_padding - CipherText = binary() -

Encrypts the PlainText using the PrivateKey and returns the ciphertext. This is a low level signature operation @@ -677,16 +730,10 @@

+ - public_decrypt(Type, CipherText, PublicKey, Padding) -> PlainText + Decrypts CipherText using the public Key. - - Type = rsa - CipherText = binary() - PublicKey = rsa_public() | engine_key_ref() - Padding = rsa_pkcs1_padding | rsa_no_padding - PlainText = binary() -

Decrypts the CipherText, encrypted with private_encrypt/4(or equivalent function) @@ -699,19 +746,8 @@ - public_encrypt(Type, PlainText, PublicKey, Padding) -> CipherText + Encrypts PlainText using the public Key. - - Type = rsa - PlainText = binary() - The size of the PlainText must be less - than byte_size(N)-11 if rsa_pkcs1_padding is - used, and byte_size(N) if rsa_no_padding is - used, where N is public modulus of the RSA key. - PublicKey = rsa_public() | engine_key_ref() - Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding - CipherText = binary() -

Encrypts the PlainText (message digest) using the PublicKey and returns the CipherText. This is a low level signature operation @@ -722,18 +758,15 @@ - rand_seed(Seed) -> ok + Set the seed for random bytes generation - - Seed = binary() -

Set the seed for PRNG to the given binary. This calls the RAND_seed function from openssl. Only use this if the system you are running on does not have enough "randomness" built in. Normally this is when strong_rand_bytes/1 - throws low_entropy

+ raises error:low_entropy

@@ -751,36 +784,15 @@
- sign(Algorithm, DigestType, Msg, Key) -> binary() - sign(Algorithm, DigestType, Msg, Key, Options) -> binary() - Create digital signature. - - Algorithm = rsa | dss | ecdsa - Msg = binary() | {digest,binary()} - The msg is either the binary "cleartext" data to be - signed or it is the hashed value of "cleartext" i.e. the - digest (plaintext). - DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() - Key = rsa_private() | dss_private() | [ecdh_private(),ecdh_params()] | engine_key_ref() - Options = sign_options() - - -

Creates a digital signature.

-

Algorithm dss can only be used together with digest type - sha.

-

See also public_key:sign/3.

-
-
- - - start() -> ok + Equivalent to application:start(crypto).

Equivalent to application:start(crypto).

+ - stop() -> ok + Equivalent to application:stop(crypto).

Equivalent to application:stop(crypto).

@@ -788,23 +800,20 @@
- strong_rand_bytes(N) -> binary() + Generate a binary of random bytes - - N = integer() -

Generates N bytes randomly uniform 0..255, and returns the result in a binary. Uses a cryptographically secure prng seeded and periodically mixed with operating system provided entropy. By default this is the RAND_bytes method from OpenSSL.

-

May throw exception low_entropy in case the random generator +

May raise exception error:low_entropy in case the random generator failed due to lack of secure "randomness".

- rand_seed() -> rand:state() + Strong random number generation plugin state

@@ -820,7 +829,7 @@

When using the state object from this function the rand functions using it - may throw exception low_entropy in case the random generator + may raise exception error:low_entropy in case the random generator failed due to lack of secure "randomness".

Example

@@ -832,7 +841,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[
- rand_seed_s() -> rand:state() + Strong random number generation plugin state

@@ -846,7 +855,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

When using the state object from this function the rand functions using it - may throw exception low_entropy in case the random generator + may raise exception error:low_entropy in case the random generator failed due to lack of secure "randomness".

@@ -885,7 +894,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

When using the state object from this function the rand functions using it - may throw exception low_entropy in case the random generator + may raise exception error:low_entropy in case the random generator failed due to lack of secure "randomness".

@@ -930,7 +939,7 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

When using the state object from this function the rand functions using it - may throw exception low_entropy in case the random generator + may raise exception error:low_entropy in case the random generator failed due to lack of secure "randomness".

@@ -961,45 +970,36 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - stream_init(Type, Key) -> State + - - Type = rc4 - State = opaque() - Key = iodata() -

Initializes the state for use in RC4 stream encryption stream_encrypt and stream_decrypt

+

For keylengths see the + User's Guide. +

- stream_init(Type, Key, IVec) -> State + - - Type = aes_ctr | chacha20 - State = opaque() - Key = iodata() - IVec = binary() -

Initializes the state for use in streaming AES encryption using Counter mode (CTR). Key is the AES key and must be either 128, 192, or 256 bits long. IVec is an arbitrary initializing vector of 128 bits (16 bytes). This state is for use with stream_encrypt and stream_decrypt.

+

For keylengths and iv-sizes see the + User's Guide. +

- stream_encrypt(State, PlainText) -> { NewState, CipherText} + - - Text = iodata() - CipherText = binary() -

Encrypts PlainText according to the stream cipher Type specified in stream_init/3. Text can be any number of bytes. The initial State is created using @@ -1009,12 +1009,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - stream_decrypt(State, CipherText) -> { NewState, PlainText } + - - CipherText = iodata() - PlainText = binary() -

Decrypts CipherText according to the stream cipher Type specified in stream_init/3. PlainText can be any number of bytes. The initial State is created using @@ -1024,60 +1020,54 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - supports() -> AlgorithmList + Provide a list of available crypto algorithms. - - AlgorithmList = [{hashs, [hash_algorithms()]}, - {ciphers, [cipher_algorithms()]}, - {public_keys, [public_key_algorithms()]}, - {macs, [mac_algorithms()]}] - -

Can be used to determine which crypto algorithms that are supported - by the underlying OpenSSL library

+ by the underlying libcrypto library

- ec_curves() -> EllipticCurveList + Provide a list of available named elliptic curves. - - EllipticCurveList = [ec_named_curve()] -

Can be used to determine which named elliptic curves are supported.

- ec_curve(NamedCurve) -> EllipticCurve + Get the defining parameters of a elliptic curve. - - NamedCurve = ec_named_curve() - EllipticCurve = ec_explicit_curve() -

Return the defining parameters of a elliptic curve.

- - verify(Algorithm, DigestType, Msg, Signature, Key) -> boolean() - verify(Algorithm, DigestType, Msg, Signature, Key, Options) -> boolean() + + + + Create digital signature. + +

Creates a digital signature.

+

The msg is either the binary "cleartext" data to be + signed or it is the hashed value of "cleartext" i.e. the + digest (plaintext).

+

Algorithm dss can only be used together with digest type + sha.

+

See also public_key:sign/3.

+
+
+ + + + Verifies a digital signature. - - Algorithm = rsa | dss | ecdsa - Msg = binary() | {digest,binary()} - The msg is either the binary "cleartext" data - or it is the hashed value of "cleartext" i.e. the digest (plaintext). - DigestType = rsa_digest_type() | dss_digest_type() | ecdsa_digest_type() - Signature = binary() - Key = rsa_public() | dss_public() | [ecdh_public(),ecdh_params()] | engine_key_ref() - Options = sign_options() -

Verifies a digital signature

+

The msg is either the binary "cleartext" data to be + signed or it is the hashed value of "cleartext" i.e. the + digest (plaintext).

Algorithm dss can only be used together with digest type sha.

@@ -1087,17 +1077,24 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_get_all_methods() -> Result + + Fetches a public key from an Engine stored private key. + +

Fetches the corresponding public key from a private key stored in an Engine. + The key must be of the type indicated by the Type parameter. +

+
+
+ + + Return list of all possible engine methods - - Result = [EngineMethod::atom()] -

Returns a list of all possible engine methods.

- May throw exception notsup in case there is + May raise exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1108,13 +1105,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_load(EngineId, PreCmds, PostCmds) -> Result + Dynamical load an encryption engine - - EngineId = unicode:chardata() - PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] - Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

Loads the OpenSSL engine given by EngineId if it is available and then returns ok and @@ -1123,8 +1115,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ returned if the engine can't be loaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1135,22 +1127,16 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_load(EngineId, PreCmds, PostCmds, EngineMethods) -> Result + Dynamical load an encryption engine - - EngineId = unicode:chardata() - PreCmds, PostCmds = [{unicode:chardata(), unicode:chardata()}] - EngineMethods = [engine_method_type()] - Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

Loads the OpenSSL engine given by EngineId if it is available and then returns ok and an engine handle. An error tuple is returned if the engine can't be loaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1161,20 +1147,16 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_unload(Engine) -> Result + Dynamical load an encryption engine - - Engine = engine_ref() - Result = ok | {error, Reason::term()} -

Unloads the OpenSSL engine given by Engine. An error tuple is returned if the engine can't be unloaded.

- The function throws a badarg if the parameter is in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameter is in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1185,20 +1167,16 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_by_id(EngineId) -> Result + Get a reference to an already loaded engine - - EngineID = unicode:chardata()engine_ref() - Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

Get a reference to an already loaded engine with EngineId. An error tuple is returned if the engine can't be unloaded.

- The function throws a badarg if the parameter is in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameter is in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1209,14 +1187,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - engine_ctrl_cmd_string(Engine, CmdName, CmdArg) -> Result + Sends ctrl commands to an OpenSSL engine - - Engine = engine_ref() - CmdName = unicode:chardata() - CmdArg = unicode:chardata() - Result = ok | {error, Reason::term()} -

Sends ctrl commands to the OpenSSL engine given by Engine. @@ -1224,23 +1196,16 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ Optional set to false.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_ctrl_cmd_string(Engine, CmdName, CmdArg, Optional) -> Result + Sends ctrl commands to an OpenSSL engine - - Engine = engine_ref() - CmdName = unicode:chardata() - CmdArg = unicode:chardata() - Optional = boolean() - Result = ok | {error, Reason::term()} -

Sends ctrl commands to the OpenSSL engine given by Engine. @@ -1252,91 +1217,72 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ false.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_add(Engine) -> Result + Add engine to OpenSSL internal list - - Engine = engine_ref() - Result = ok | {error, Reason::term()} -

Add the engine to OpenSSL's internal list.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_remove(Engine) -> Result + Remove engine to OpenSSL internal list - - Engine = engine_ref() - Result = ok | {error, Reason::term()} -

Remove the engine from OpenSSL's internal list.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_get_id(Engine) -> EngineId + Fetch engine ID - - Engine = engine_ref() - EngineId = unicode:chardata() -

Return the ID for the engine, or an empty binary if there is no id set.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_get_name(Engine) -> EngineName + Fetch engine name - - Engine = engine_ref() - EngineName = unicode:chardata() -

Return the name (eg a description) for the engine, or an empty binary if there is no name set.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

- engine_list() -> Result + List the known engine ids - - Result = [EngineId::unicode:chardata()] -

List the id's of all engines in OpenSSL's internal list.

- It may also throw the exception notsup in case there is + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1344,20 +1290,15 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ in the User's Guide.

- May throw exception notsup in case engine functionality is not supported by the underlying + May raise exception error:notsup in case engine functionality is not supported by the underlying OpenSSL implementation.

- ensure_engine_loaded(EngineId, LibPath) -> Result + Ensure encryption engine just loaded once - - EngineId = unicode:chardata() - LibPath = unicode:chardata() - Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

Loads the OpenSSL engine given by EngineId and the path to the dynamic library @@ -1366,8 +1307,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ returned if the engine can't be loaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1378,14 +1319,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - ensure_engine_loaded(EngineId, LibPath, EngineMethods) -> Result + Ensure encryption engine just loaded once - - EngineId = unicode:chardata() - LibPath = unicode:chardata() - EngineMethods = [engine_method_type()] - Result = {ok, Engine::engine_ref()} | {error, Reason::term()} -

Loads the OpenSSL engine given by EngineId and the path to the dynamic library @@ -1395,8 +1330,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ An error tuple is returned if the engine can't be loaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1407,12 +1342,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - ensure_engine_unloaded(Engine) -> Result + Unload an engine loaded with the ensure function - - Engine = engine_ref() - Result = ok | {error, Reason::term()} -

Unloads an engine loaded with the ensure_engine_loaded function. @@ -1422,8 +1353,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ returned if the engine can't be unloaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1434,13 +1365,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - ensure_engine_unloaded(Engine, EngineMethods) -> Result + Unload an engine loaded with the ensure function - - Engine = engine_ref() - EngineMethods = [engine_method_type()] - Result = ok | {error, Reason::term()} -

Unloads an engine loaded with the ensure_engine_loaded function. @@ -1448,8 +1374,8 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ An error tuple is returned if the engine can't be unloaded.

- The function throws a badarg if the parameters are in wrong format. - It may also throw the exception notsup in case there is + The function raises a error:badarg if the parameters are in wrong format. + It may also raise the exception error:notsup in case there is no engine support in the underlying OpenSSL implementation.

@@ -1461,75 +1387,5 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/lib/crypto/doc/src/engine_keys.xml b/lib/crypto/doc/src/engine_keys.xml index 38714fed8a..4f7b0243fb 100644 --- a/lib/crypto/doc/src/engine_keys.xml +++ b/lib/crypto/doc/src/engine_keys.xml @@ -62,7 +62,7 @@ on the Engine loaded an Erlang map is constructed with the Engine reference, the key reference and possibly a key passphrase if - needed by the Engine. See the Reference Manual for + needed by the Engine. See the Reference Manual for details of the map. -- cgit v1.2.3 From 882fa794883e6dbc0e56f22645cd3aec21920c53 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 7 Sep 2018 13:46:52 +0200 Subject: crypto: Add missing documentation for enable_fips_mode/1 --- lib/crypto/doc/src/crypto.xml | 21 ++++++++++++++++++++- lib/crypto/src/crypto.erl | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 9d436847ac..d5f5009297 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -642,7 +642,11 @@ crypto and the underlying libcrypto library. If crypto was built with FIPS support this can be either enabled (when running in FIPS mode) or not_enabled. For other builds - this value is always not_supported.

+ this value is always not_supported. +

+

See enable_fips_mode/1 about how to enable + FIPS mode. +

In FIPS mode all non-FIPS compliant algorithms are disabled and raise exception error:notsup. Check @@ -653,6 +657,21 @@ + + + Change FIPS mode. + +

Enables (Enable = true) or disables (Enable = false) FIPS mode. Returns true if + the operation was successful or false otherwise. +

+

Note that to enable FIPS mode succesfully, OTP must be built with the configure option --enable-fips, + and the underlying libcrypto must also support FIPS. +

+

See also info_fips/0. +

+
+
+ Provides information about the libraries used by crypto. diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index a841f0f168..c64586897e 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -346,8 +346,8 @@ info_lib() -> ?nif_stub. info_fips() -> ?nif_stub. --spec enable_fips_mode(boolean()) -> boolean(). - +-spec enable_fips_mode(Enable) -> Result when Enable :: boolean(), + Result :: boolean(). enable_fips_mode(_) -> ?nif_stub. %%%================================================================ -- cgit v1.2.3 From ff4dee51f4c6602cdbbdbad9ad0ce2068f34265d Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 6 Sep 2018 12:55:34 +0200 Subject: crypto: Add 'rsa_opts' to crypto:supports/0 Needed in future versions of the SSL application. --- lib/crypto/c_src/crypto.c | 48 ++++++++++++++++++++++++++++++++++++++++------- lib/crypto/src/crypto.erl | 11 +++++++---- 2 files changed, 48 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6949df4b8e..ad84d9cd35 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -211,12 +211,17 @@ # define HAVE_ECB_IVEC_BUG #endif -#define HAVE_RSA_SSLV23_PADDING -#if defined(HAS_LIBRESSL) \ - && LIBRESSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(2,6,1) -# undef HAVE_RSA_SSLV23_PADDING +#ifdef RSA_SSLV23_PADDING +# define HAVE_RSA_SSLV23_PADDING #endif +// OpenSSL >= 1.0.2 +#ifdef RSA_PKCS1_PSS_PADDING +# define HAVE_RSA_PKCS1_PSS_PADDING +#endif + + + #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') \ && defined(HAVE_EC) /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h @@ -1319,6 +1324,8 @@ static int algo_mac_cnt, algo_mac_fips_cnt; static ERL_NIF_TERM algo_mac[3]; /* increase when extending the list */ static int algo_curve_cnt, algo_curve_fips_cnt; static ERL_NIF_TERM algo_curve[87]; /* increase when extending the list */ +static int algo_rsa_opts_cnt, algo_rsa_opts_fips_cnt; +static ERL_NIF_TERM algo_rsa_opts[10]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { @@ -1530,12 +1537,36 @@ static void init_algorithms_types(ErlNifEnv* env) algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x448"); #endif + // Validated algorithms first + algo_rsa_opts_cnt = 0; +#ifdef HAS_EVP_PKEY_CTX +# ifdef HAVE_RSA_PKCS1_PSS_PADDING + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pkcs1_pss_padding"); + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pss_saltlen"); +# endif + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_mgf1_md"); +# ifdef HAVE_RSA_OAEP_MD + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_oaep_label"); + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_oaep_md"); +# endif + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"signature_md"); +#endif + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pkcs1_padding"); + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_x931_padding"); +#ifdef HAVE_RSA_SSLV23_PADDING + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_sslv23_padding"); +#endif + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_no_padding"); + algo_rsa_opts_fips_cnt = algo_rsa_opts_cnt; + + // Check that the max number of algos is updated ASSERT(algo_hash_cnt <= sizeof(algo_hash)/sizeof(ERL_NIF_TERM)); ASSERT(algo_pubkey_cnt <= sizeof(algo_pubkey)/sizeof(ERL_NIF_TERM)); ASSERT(algo_cipher_cnt <= sizeof(algo_cipher)/sizeof(ERL_NIF_TERM)); ASSERT(algo_mac_cnt <= sizeof(algo_mac)/sizeof(ERL_NIF_TERM)); ASSERT(algo_curve_cnt <= sizeof(algo_curve)/sizeof(ERL_NIF_TERM)); + ASSERT(algo_rsa_opts_cnt <= sizeof(algo_rsa_opts)/sizeof(ERL_NIF_TERM)); } static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) @@ -1547,19 +1578,22 @@ static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv int cipher_cnt = fips_mode ? algo_cipher_fips_cnt : algo_cipher_cnt; int mac_cnt = fips_mode ? algo_mac_fips_cnt : algo_mac_cnt; int curve_cnt = fips_mode ? algo_curve_fips_cnt : algo_curve_cnt; + int rsa_opts_cnt = fips_mode ? algo_rsa_opts_fips_cnt : algo_rsa_opts_cnt; #else int hash_cnt = algo_hash_cnt; int pubkey_cnt = algo_pubkey_cnt; int cipher_cnt = algo_cipher_cnt; int mac_cnt = algo_mac_cnt; int curve_cnt = algo_curve_cnt; + int rsa_opts_cnt = algo_rsa_opts_cnt; #endif - return enif_make_tuple5(env, + return enif_make_tuple6(env, enif_make_list_from_array(env, algo_hash, hash_cnt), enif_make_list_from_array(env, algo_pubkey, pubkey_cnt), enif_make_list_from_array(env, algo_cipher, cipher_cnt), enif_make_list_from_array(env, algo_mac, mac_cnt), - enif_make_list_from_array(env, algo_curve, curve_cnt) + enif_make_list_from_array(env, algo_curve, curve_cnt), + enif_make_list_from_array(env, algo_rsa_opts, rsa_opts_cnt) ); } @@ -4385,7 +4419,7 @@ static int get_pkey_sign_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF if (tpl_terms[1] == atom_rsa_pkcs1_padding) { opt->rsa_padding = RSA_PKCS1_PADDING; } else if (tpl_terms[1] == atom_rsa_pkcs1_pss_padding) { -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +#ifdef HAVE_RSA_PKCS1_PSS_PADDING opt->rsa_padding = RSA_PKCS1_PSS_PADDING; if (opt->rsa_mgf1_md == NULL) { opt->rsa_mgf1_md = md; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index c64586897e..7d8f0479ee 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -319,7 +319,8 @@ stop() -> | {ciphers, Ciphers} | {public_keys, PKs} | {macs, Macs} - | {curves, Curves}, + | {curves, Curves} + | {rsa_opts, RSAopts}, Hashs :: [sha1() | sha2() | sha3() | ripemd160 | compatibility_only_hash()], Ciphers :: [stream_cipher() | block_cipher_with_iv() | block_cipher_without_iv() @@ -327,14 +328,16 @@ stop() -> ], PKs :: [rsa | dss | ecdsa | dh | ecdh | ec_gf2m], Macs :: [hmac | cmac | poly1305], - Curves :: [ec_named_curve() | edwards_curve()]. + Curves :: [ec_named_curve() | edwards_curve()], + RSAopts :: [rsa_sign_verify_opt() | rsa_opt()] . supports()-> - {Hashs, PubKeys, Ciphers, Macs, Curves} = algorithms(), + {Hashs, PubKeys, Ciphers, Macs, Curves, RsaOpts} = algorithms(), [{hashs, Hashs}, {ciphers, Ciphers}, {public_keys, PubKeys}, {macs, Macs}, - {curves, Curves} + {curves, Curves}, + {rsa_opts, RsaOpts} ]. -spec info_lib() -> [{Name,VerNum,VerStr}] when Name :: binary(), -- cgit v1.2.3 From 769c73a8cbe40c865d337d1d2eb651ea1ea68e31 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 13 Sep 2018 12:55:30 +0200 Subject: crypto: RSA options list disclaimer in documentation for crypto:supports/0 The final appearence of the rs_opts entry is still not completly decided. --- lib/crypto/doc/src/crypto.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index d5f5009297..dab6e4ed4f 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -1044,6 +1044,9 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[

Can be used to determine which crypto algorithms that are supported by the underlying libcrypto library

+

Note: the rsa_opts entry is in an experimental state and may change or be removed without notice. + No guarantee for the accuarcy of the rsa option's value list should be assumed. +

-- cgit v1.2.3 From 35eac8acb8c47416a0fde79280a2fef60bc9339e Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 12 Sep 2018 10:42:10 +0200 Subject: crypto: Change condition for RSA_PKCS1_PSS Trubble on a couple of cross-building machines --- lib/crypto/c_src/crypto.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ad84d9cd35..592027d946 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -215,13 +215,12 @@ # define HAVE_RSA_SSLV23_PADDING #endif -// OpenSSL >= 1.0.2 -#ifdef RSA_PKCS1_PSS_PADDING -# define HAVE_RSA_PKCS1_PSS_PADDING +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) +# ifdef RSA_PKCS1_PSS_PADDING +# define HAVE_RSA_PKCS1_PSS_PADDING +# endif #endif - - #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'h') \ && defined(HAVE_EC) /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h -- cgit v1.2.3 From 94d4676a7f73cb948d3baa617d1f8fcd8ee5aec2 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 13 Sep 2018 11:41:35 +0200 Subject: crypto: Add forgotten #ifdef MAY prevent compilation errors if the symbol is configured to not be defined in an OpenSSL version where it exists by default. --- lib/crypto/c_src/crypto.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 592027d946..3939a6f309 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4707,6 +4707,7 @@ printf("\r\n"); if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; +#ifdef HAVE_RSA_PKCS1_PSS_PADDING if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { if (sig_opt.rsa_mgf1_md != NULL) { #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) @@ -4721,6 +4722,7 @@ printf("\r\n"); && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) goto badarg; } +#endif } if (EVP_PKEY_sign(ctx, NULL, &siglen, tbs, tbslen) <= 0) goto badarg; -- cgit v1.2.3 From f11391139c4165e8541a52d45cd1525343a83927 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 10 Sep 2018 14:37:15 +0200 Subject: crypto: Generalize aes_gcm_(de|en)crypt nifs The EVP_CIPHER_CTX interface aims at enabling using the same code for many ciphers. Since we are going to add aes_ccm which is similar to aes_gcm, this commit is a preparation. It creates the aead_(de|en)crypt nifs and removes the old ones. --- lib/crypto/c_src/crypto.c | 185 ++++++++++++++++++++++++++-------------------- lib/crypto/src/crypto.erl | 20 +++-- 2 files changed, 112 insertions(+), 93 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6949df4b8e..4442692537 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -185,6 +185,7 @@ #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) # define HAVE_EVP_AES_CTR +# define HAVE_AEAD # define HAVE_GCM # define HAVE_CMAC # if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION(1,0,1,'d') @@ -539,8 +540,8 @@ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); #ifdef HAVE_GCM_EVP_DECRYPT_BUG static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); #endif @@ -637,8 +638,8 @@ static ErlNifFunc nif_funcs[] = { {"rand_seed_nif", 1, rand_seed_nif}, - {"aes_gcm_encrypt", 5, aes_gcm_encrypt}, - {"aes_gcm_decrypt", 5, aes_gcm_decrypt}, + {"aead_encrypt", 6, aead_encrypt}, + {"aead_decrypt", 6, aead_decrypt}, {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt}, @@ -712,6 +713,9 @@ static ERL_NIF_TERM atom_onbasis; static ERL_NIF_TERM atom_aes_cfb8; static ERL_NIF_TERM atom_aes_cfb128; +#ifdef HAVE_GCM +static ERL_NIF_TERM atom_aes_gcm; +#endif #ifdef HAVE_ECB_IVEC_BUG static ERL_NIF_TERM atom_aes_ecb; static ERL_NIF_TERM atom_des_ecb; @@ -1152,6 +1156,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #endif atom_aes_cfb8 = enif_make_atom(env, "aes_cfb8"); atom_aes_cfb128 = enif_make_atom(env, "aes_cfb128"); +#ifdef HAVE_GCM + atom_aes_gcm = enif_make_atom(env, "aes_gcm"); +#endif #ifdef HAVE_ECB_IVEC_BUG atom_aes_ecb = enif_make_atom(env, "aes_ecb"); atom_des_ecb = enif_make_atom(env, "des_ecb"); @@ -2516,66 +2523,72 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N } #endif /* !HAVE_EVP_AES_CTR */ -static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key,Iv,AAD,In) */ -#if defined(HAVE_GCM) +static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Type,Key,Iv,AAD,In) */ +#if defined(HAVE_AEAD) EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in; unsigned int tag_len; unsigned char *outp, *tagp; - ERL_NIF_TERM out, out_tag; - int len; + ERL_NIF_TERM type, out, out_tag; + int len, ctx_ctrl_set_ivlen, ctx_ctrl_get_tag; - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) - || (key.size != 16 && key.size != 24 && key.size != 32) - || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 - || !enif_inspect_iolist_as_binary(env, argv[2], &aad) - || !enif_inspect_iolist_as_binary(env, argv[3], &in) - || !enif_get_uint(env, argv[4], &tag_len) || tag_len < 1 || tag_len > 16) { + type = argv[0]; + + if (!enif_is_atom(env, type) + || !enif_inspect_iolist_as_binary(env, argv[1], &key) + || !enif_inspect_binary(env, argv[2], &iv) + || !enif_inspect_iolist_as_binary(env, argv[3], &aad) + || !enif_inspect_iolist_as_binary(env, argv[4], &in) + || !enif_get_uint(env, argv[5], &tag_len)) { return enif_make_badarg(env); } - if (key.size == 16) - cipher = EVP_aes_128_gcm(); - else if (key.size == 24) - cipher = EVP_aes_192_gcm(); - else if (key.size == 32) - cipher = EVP_aes_256_gcm(); + /* Use cipher_type some day. Must check block_encrypt|decrypt first */ +#if defined(HAVE_GCM) + if ((type == atom_aes_gcm) + && (iv.size > 0) + && (1 <= tag_len && tag_len <= 16)) { + ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_GCM_GET_TAG; + if (key.size == 16) cipher = EVP_aes_128_gcm(); + else if (key.size == 24) cipher = EVP_aes_192_gcm(); + else if (key.size == 32) cipher = EVP_aes_256_gcm(); + else + enif_make_badarg(env); + } else +#endif + enif_make_badarg(env); + ctx = EVP_CIPHER_CTX_new(); + if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_set_ivlen, iv.size, NULL) != 1) goto out_err; - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - goto out_err; - - EVP_CIPHER_CTX_set_padding(ctx, 0); +#if defined(HAVE_GCM) + if (type == atom_aes_gcm) { + if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; + } else +#endif + goto out_err; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) - goto out_err; - if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) - goto out_err; - if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) - goto out_err; + if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; outp = enif_make_new_binary(env, in.size, &out); - if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) - goto out_err; - if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1) - goto out_err; + if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; + if (EVP_EncryptFinal_ex(ctx, outp, &len) != 1) goto out_err; tagp = enif_make_new_binary(env, tag_len, &out_tag); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, tag_len, tagp) != 1) - goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_get_tag, tag_len, tagp) != 1) goto out_err; EVP_CIPHER_CTX_free(ctx); - CONSUME_REDS(env, in); - return enif_make_tuple2(env, out, out_tag); -out_err: +out_err: EVP_CIPHER_CTX_free(ctx); return atom_error; @@ -2584,58 +2597,66 @@ out_err: #endif } -static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key,Iv,AAD,In,Tag) */ -#if defined(HAVE_GCM_EVP_DECRYPT_BUG) - return aes_gcm_decrypt_NO_EVP(env, argc, argv); -#elif defined(HAVE_GCM) +static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) +{/* (Type,Key,Iv,AAD,In,Tag) */ +#if defined(HAVE_AEAD) EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher = NULL; ErlNifBinary key, iv, aad, in, tag; unsigned char *outp; - ERL_NIF_TERM out; - int len; + ERL_NIF_TERM type, out; + int len, ctx_ctrl_set_ivlen; - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) - || (key.size != 16 && key.size != 24 && key.size != 32) - || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 - || !enif_inspect_iolist_as_binary(env, argv[2], &aad) - || !enif_inspect_iolist_as_binary(env, argv[3], &in) - || !enif_inspect_iolist_as_binary(env, argv[4], &tag)) { + type = argv[0]; +#if defined(HAVE_GCM_EVP_DECRYPT_BUG) + if (type == atom_aes_gcm) + return aes_gcm_decrypt_NO_EVP(env, argc, argv); +#endif + + if (!enif_is_atom(env, type) + || !enif_inspect_iolist_as_binary(env, argv[1], &key) + || !enif_inspect_binary(env, argv[2], &iv) + || !enif_inspect_iolist_as_binary(env, argv[3], &aad) + || !enif_inspect_iolist_as_binary(env, argv[4], &in) + || !enif_inspect_iolist_as_binary(env, argv[5], &tag)) { return enif_make_badarg(env); } - if (key.size == 16) - cipher = EVP_aes_128_gcm(); - else if (key.size == 24) - cipher = EVP_aes_192_gcm(); - else if (key.size == 32) - cipher = EVP_aes_256_gcm(); - - ctx = EVP_CIPHER_CTX_new(); + /* Use cipher_type some day. Must check block_encrypt|decrypt first */ +#if defined(HAVE_GCM) + if ((type == atom_aes_gcm) + && (iv.size > 0)) { + ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; + if (key.size == 16) cipher = EVP_aes_128_gcm(); + else if (key.size == 24) cipher = EVP_aes_192_gcm(); + else if (key.size == 32) cipher = EVP_aes_256_gcm(); + else + enif_make_badarg(env); - if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - goto out_err; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1) - goto out_err; - if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) - goto out_err; - if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) - goto out_err; + } else +#endif + enif_make_badarg(env); outp = enif_make_new_binary(env, in.size, &out); - if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) - goto out_err; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1) - goto out_err; - if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) - goto out_err; + ctx = EVP_CIPHER_CTX_new(); + if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_set_ivlen, iv.size, NULL) != 1) goto out_err; + + if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; + if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; + if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; + +#if defined(HAVE_GCM) + if (type == atom_aes_gcm) { + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1) goto out_err; + if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) goto out_err; + } +#endif EVP_CIPHER_CTX_free(ctx); CONSUME_REDS(env, in); - return out; out_err: @@ -2648,19 +2669,19 @@ out_err: #ifdef HAVE_GCM_EVP_DECRYPT_BUG static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{ +{/* (Type,Key,Iv,AAD,In,Tag) */ GCM128_CONTEXT *ctx; ErlNifBinary key, iv, aad, in, tag; AES_KEY aes_key; unsigned char *outp; ERL_NIF_TERM out; - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) + if (!enif_inspect_iolist_as_binary(env, argv[1], &key) || AES_set_encrypt_key(key.data, key.size*8, &aes_key) != 0 - || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 - || !enif_inspect_iolist_as_binary(env, argv[2], &aad) - || !enif_inspect_iolist_as_binary(env, argv[3], &in) - || !enif_inspect_iolist_as_binary(env, argv[4], &tag)) { + || !enif_inspect_binary(env, argv[2], &iv) || iv.size == 0 + || !enif_inspect_iolist_as_binary(env, argv[3], &aad) + || !enif_inspect_iolist_as_binary(env, argv[4], &in) + || !enif_inspect_iolist_as_binary(env, argv[5], &tag)) { return enif_make_badarg(env); } diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index c64586897e..cb281aac42 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -518,9 +518,9 @@ block_encrypt(des3_cfb, Key0, Ivec, PlainText) -> block_encrypt(aes_ige256, Key, Ivec, PlainText) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, PlainText, true)); block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText}) -> - aes_gcm_encrypt(Key, Ivec, AAD, PlainText); + aead_encrypt(Key, Ivec, AAD, PlainText); block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText, TagLength}) -> - aes_gcm_encrypt(Key, Ivec, AAD, PlainText, TagLength); + aead_encrypt(Key, Ivec, AAD, PlainText, TagLength); block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). @@ -551,8 +551,8 @@ block_decrypt(des3_cfb, Key0, Ivec, Data) -> block_crypt_nif(des_ede3_cfb, Key, Ivec, Data, false); block_decrypt(aes_ige256, Key, Ivec, Data) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, false)); -block_decrypt(aes_gcm, Key, Ivec, {AAD, Data, Tag}) -> - aes_gcm_decrypt(Key, Ivec, AAD, Data, Tag); +block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm -> + aead_decrypt(Type, Key, Ivec, AAD, Data, Tag); block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). @@ -577,10 +577,8 @@ next_iv(Type, Data) when is_binary(Data) -> IVecSize = case Type of des_cbc -> 8; des3_cbc -> 8; - blowfish_cbc -> 8; aes_cbc -> 16; - aes_ige -> 32; % For compatibility if someone has bug-adapted code - aes_ige256 -> 32 % The name used in block_encrypt et al + aes_ige -> 32 end, {_, IVec} = split_binary(Data, size(Data) - IVecSize), IVec; @@ -1606,10 +1604,10 @@ check_des3_key(Key) -> %% AES - in Galois/Counter Mode (GCM) %% %% The default tag length is EVP_GCM_TLS_TAG_LEN(16), -aes_gcm_encrypt(Key, Ivec, AAD, In) -> - aes_gcm_encrypt(Key, Ivec, AAD, In, 16). -aes_gcm_encrypt(_Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. -aes_gcm_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. +aead_encrypt(Type=aes_gcm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, AAD, In, 16). + +aead_encrypt(_Type, _Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. +aead_decrypt(_Type, _Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. %% %% Chacha20/Ppoly1305 -- cgit v1.2.3 From 2cf63f4e429c60b7d77bd15c73fd298ee53710ae Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 11 Sep 2018 17:21:30 +0200 Subject: crypto: Add AES_CCM crypto Will be increase interoperability of future SSL application versions. --- lib/crypto/c_src/crypto.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++- lib/crypto/src/crypto.erl | 40 +++++++++++++++++--------------- 2 files changed, 80 insertions(+), 19 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 4442692537..e99c1bb38c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -187,6 +187,7 @@ # define HAVE_EVP_AES_CTR # define HAVE_AEAD # define HAVE_GCM +# define HAVE_CCM # define HAVE_CMAC # if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION(1,0,1,'d') # define HAVE_GCM_EVP_DECRYPT_BUG @@ -716,6 +717,9 @@ static ERL_NIF_TERM atom_aes_cfb128; #ifdef HAVE_GCM static ERL_NIF_TERM atom_aes_gcm; #endif +#ifdef HAVE_CCM +static ERL_NIF_TERM atom_aes_ccm; +#endif #ifdef HAVE_ECB_IVEC_BUG static ERL_NIF_TERM atom_aes_ecb; static ERL_NIF_TERM atom_des_ecb; @@ -1159,6 +1163,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #ifdef HAVE_GCM atom_aes_gcm = enif_make_atom(env, "aes_gcm"); #endif +#ifdef HAVE_CCM + atom_aes_ccm = enif_make_atom(env, "aes_ccm"); +#endif #ifdef HAVE_ECB_IVEC_BUG atom_aes_ecb = enif_make_atom(env, "aes_ecb"); atom_des_ecb = enif_make_atom(env, "des_ecb"); @@ -1321,7 +1328,7 @@ static ERL_NIF_TERM algo_hash[12]; /* increase when extending the list */ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; static ERL_NIF_TERM algo_pubkey[11]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; -static ERL_NIF_TERM algo_cipher[24]; /* increase when extending the list */ +static ERL_NIF_TERM algo_cipher[25]; /* increase when extending the list */ static int algo_mac_cnt, algo_mac_fips_cnt; static ERL_NIF_TERM algo_mac[3]; /* increase when extending the list */ static int algo_curve_cnt, algo_curve_fips_cnt; @@ -1396,6 +1403,9 @@ static void init_algorithms_types(ErlNifEnv* env) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "aes_ecb"); #if defined(HAVE_GCM) algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_gcm"); +#endif +#if defined(HAVE_CCM) + algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_ccm"); #endif // Non-validated algorithms follow algo_cipher_fips_cnt = algo_cipher_cnt; @@ -2558,6 +2568,22 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar else enif_make_badarg(env); + } else +#endif +#if defined(HAVE_CCM) + if ((type == atom_aes_ccm) + && (7 <= iv.size && iv.size <= 13) + && (4 <= tag_len && tag_len <= 16) + && ((tag_len & 1) == 0) + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_CCM_GET_TAG; + if (key.size == 16) cipher = EVP_aes_128_ccm(); + else if (key.size == 24) cipher = EVP_aes_192_ccm(); + else if (key.size == 32) cipher = EVP_aes_256_ccm(); + else + enif_make_badarg(env); + } else #endif enif_make_badarg(env); @@ -2571,6 +2597,13 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; } else #endif +#if defined(HAVE_CCM) + if (type == atom_aes_ccm) { + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, tag_len, NULL) != 1) goto out_err; + if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; + if (EVP_EncryptUpdate(ctx, NULL, &len, NULL, in.size) != 1) goto out_err; + } else +#endif goto out_err; if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; @@ -2633,6 +2666,18 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar else enif_make_badarg(env); + } else +#endif +#if defined(HAVE_CCM) + if ((type == atom_aes_ccm) + && (iv.size > 0)) { + ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; + if (key.size == 16) cipher = EVP_aes_128_ccm(); + else if (key.size == 24) cipher = EVP_aes_192_ccm(); + else if (key.size == 32) cipher = EVP_aes_256_ccm(); + else + enif_make_badarg(env); + } else #endif enif_make_badarg(env); @@ -2643,8 +2688,20 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_set_ivlen, iv.size, NULL) != 1) goto out_err; +#if defined(HAVE_CCM) + if (type == atom_aes_ccm) { + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, tag.size, tag.data) != 1) goto out_err; + } +#endif + if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; +#if defined(HAVE_CCM) + if (type == atom_aes_ccm) { + if (1 != EVP_DecryptUpdate(ctx, NULL, &len, NULL, in.size)) goto out_err; + } +#endif + if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index cb281aac42..2f612b6121 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -262,7 +262,7 @@ | rc2_cbc . -type cbc_cipher() :: des_cbc | des3_cbc | aes_cbc | blowfish_cbc . --type aead_cipher() :: aes_gcm | chacha20_poly1305 . +-type aead_cipher() :: aes_gcm | aes_ccm | chacha20_poly1305 . -type cfb_cipher() :: aes_cfb128 | aes_cfb8 | blowfish_cfb64 | des3_cfb | des_cfb . -type block_cipher_without_iv() :: ecb_cipher() . @@ -490,23 +490,23 @@ poly1305(Key, Data) -> -spec block_encrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), PlainText::iodata()) -> binary(); (Type::aead_cipher(), Key::iodata(), Ivec::binary(), {AAD::binary(), PlainText::iodata()}) -> {binary(), binary()}; - (aes_gcm, Key::iodata(), Ivec::binary(), {AAD::binary(), PlainText::iodata(), TagLength::1..16}) -> + (aes_gcm | aes_ccm, Key::iodata(), Ivec::binary(), {AAD::binary(), PlainText::iodata(), TagLength::1..16}) -> {binary(), binary()}. block_encrypt(Type, Key, Ivec, PlainText) when Type =:= des_cbc; - Type =:= des_cfb; - Type =:= blowfish_cbc; - Type =:= blowfish_cfb64; - Type =:= blowfish_ofb64; - Type =:= aes_cbc128; - Type =:= aes_cfb8; - Type =:= aes_cfb128; - Type =:= aes_cbc256; - Type =:= aes_cbc; - Type =:= rc2_cbc -> + Type =:= des_cfb; + Type =:= blowfish_cbc; + Type =:= blowfish_cfb64; + Type =:= blowfish_ofb64; + Type =:= aes_cbc128; + Type =:= aes_cfb8; + Type =:= aes_cfb128; + Type =:= aes_cbc256; + Type =:= aes_cbc; + Type =:= rc2_cbc -> block_crypt_nif(Type, Key, Ivec, PlainText, true); block_encrypt(Type, Key0, Ivec, PlainText) when Type =:= des3_cbc; - Type =:= des_ede3 -> + Type =:= des_ede3 -> Key = check_des3_key(Key0), block_crypt_nif(des_ede3_cbc, Key, Ivec, PlainText, true); block_encrypt(des3_cbf, Key0, Ivec, PlainText) -> % cfb misspelled @@ -517,10 +517,12 @@ block_encrypt(des3_cfb, Key0, Ivec, PlainText) -> block_crypt_nif(des_ede3_cfb, Key, Ivec, PlainText, true); block_encrypt(aes_ige256, Key, Ivec, PlainText) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, PlainText, true)); -block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText}) -> - aead_encrypt(Key, Ivec, AAD, PlainText); -block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText, TagLength}) -> - aead_encrypt(Key, Ivec, AAD, PlainText, TagLength); +block_encrypt(Type, Key, Ivec, {AAD, PlainText}) when Type =:= aes_gcm; + Type =:= aes_ccm -> + aead_encrypt(Type, Key, Ivec, AAD, PlainText); +block_encrypt(Type, Key, Ivec, {AAD, PlainText, TagLength}) when Type =:= aes_gcm; + Type =:= aes_ccm -> + aead_encrypt(Type, Key, Ivec, AAD, PlainText, TagLength); block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). @@ -551,7 +553,8 @@ block_decrypt(des3_cfb, Key0, Ivec, Data) -> block_crypt_nif(des_ede3_cfb, Key, Ivec, Data, false); block_decrypt(aes_ige256, Key, Ivec, Data) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, false)); -block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm -> +block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm; + Type =:= aes_ccm -> aead_decrypt(Type, Key, Ivec, AAD, Data, Tag); block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). @@ -1604,6 +1607,7 @@ check_des3_key(Key) -> %% AES - in Galois/Counter Mode (GCM) %% %% The default tag length is EVP_GCM_TLS_TAG_LEN(16), +aead_encrypt(Type=aes_ccm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, AAD, In, 12); aead_encrypt(Type=aes_gcm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, AAD, In, 16). aead_encrypt(_Type, _Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. -- cgit v1.2.3 From 04972a7d88ebbf138ac20bbbd566439ffa83c1c7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 12 Sep 2018 15:22:04 +0200 Subject: crypto: All aes_ccm vectors (including unused) This directory contains all aes_ccm vectors. However, effort is needed to include them in the test suite so they are left for later. The aes_ccm cipher is already covered by the vectors in crypt_SUITE_data Source: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program --- .../crypto_SUITE_data/aes_ccm_vectors/DVPT128.rsp | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/DVPT128.txt | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/DVPT192.rsp | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/DVPT192.txt | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/DVPT256.rsp | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/DVPT256.txt | 1589 +++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/Readme.txt | 9 + .../crypto_SUITE_data/aes_ccm_vectors/VADT128.rsp | 1823 ++++++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VADT192.rsp | 1823 ++++++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VADT256.rsp | 1823 ++++++++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VNT128.rsp | 456 +++++ .../crypto_SUITE_data/aes_ccm_vectors/VNT192.rsp | 456 +++++ .../crypto_SUITE_data/aes_ccm_vectors/VNT256.rsp | 456 +++++ .../crypto_SUITE_data/aes_ccm_vectors/VPT128.rsp | 1383 +++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VPT192.rsp | 1383 +++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VPT256.rsp | 1383 +++++++++++++++ .../crypto_SUITE_data/aes_ccm_vectors/VTT128.rsp | 393 +++++ .../crypto_SUITE_data/aes_ccm_vectors/VTT192.rsp | 393 +++++ .../crypto_SUITE_data/aes_ccm_vectors/VTT256.rsp | 393 +++++ .../aes_ccm_vectors/ccmtestvectors.zip | Bin 0 -> 319267 bytes 20 files changed, 21708 insertions(+) create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.txt create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.txt create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.txt create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/Readme.txt create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/ccmtestvectors.zip (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.rsp new file mode 100644 index 0000000000..0e56a03d42 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.rsp @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:25 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 4ae701103c63deca5b5a3939d7d05992 + +Count = 0 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 02209f55 +Result = Pass +Payload = 00 + +Count = 1 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 9a04c241 +Result = Fail + +Count = 2 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = f5f915df +Result = Fail + +Count = 3 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 7a3c3499 +Result = Fail + +Count = 4 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = f09c2986 +Result = Pass +Payload = 00 + +Count = 5 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 4ae97e71 +Result = Fail + +Count = 6 +Nonce = 06d102a9328863 +Adata = 00 +CT = ecb38c8b +Result = Fail + +Count = 7 +Nonce = c288b810fb5334 +Adata = 00 +CT = 9c4dc530 +Result = Fail + +Count = 8 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = 67299ef6 +Result = Fail + +Count = 9 +Nonce = 4a5810b121c91b +Adata = 00 +CT = b0538d02 +Result = Fail + +Count = 10 +Nonce = 44077341139bf9 +Adata = 00 +CT = 88200ea8 +Result = Fail + +Count = 11 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 19867aa5 +Result = Pass +Payload = 00 + +Count = 12 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 3b392a52 +Result = Pass +Payload = 00 + +Count = 13 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 1c5e47e0 +Result = Pass +Payload = 00 + +Count = 14 +Nonce = 9dc18698731b27 +Adata = 00 +CT = 97a56b8b +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3 + +Count = 15 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 75d582db43ce9b13ab4b6f7f14341330 +Result = Pass +Payload = 00 + +Count = 16 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 3a65e03af37b81d05acc7ec1bc39deb0 +Result = Fail + +Count = 17 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = efc5721e0b9e4c3c90deab0e1d5c11bd +Result = Fail + +Count = 18 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 91b4b779823f4f0e3979ced93b99736c +Result = Fail + +Count = 19 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = e2e87ca82523ccfeb416b42af9d9aadc +Result = Pass +Payload = 00 + +Count = 20 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 7b85fd105cc960df86ad86846d178274 +Result = Fail + +Count = 21 +Nonce = 06d102a9328863 +Adata = 00 +CT = ffa140be27b25f307a6efd9697d66c9b +Result = Fail + +Count = 22 +Nonce = c288b810fb5334 +Adata = 00 +CT = ed356542e0a804a724bfaa422e98a970 +Result = Fail + +Count = 23 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = e31dd8dc920fe7900e1b1817fe845c7d +Result = Fail + +Count = 24 +Nonce = 4a5810b121c91b +Adata = 00 +CT = ae5a0777f03bbf541f305d00acff0396 +Result = Fail + +Count = 25 +Nonce = 44077341139bf9 +Adata = 00 +CT = 957dca58616c1cbe99f94fd8f7c257d9 +Result = Fail + +Count = 26 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 0e150af422f6da238bb476810b2d5bc2 +Result = Pass +Payload = 00 + +Count = 27 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 8e1150756ff3a733a1274470f072b74c +Result = Pass +Payload = 00 + +Count = 28 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = a1f70df3fa9cfeb95f869b3fe08466e0 +Result = Pass +Payload = 00 + +Count = 29 +Nonce = 9dc18698731b27 +Adata = 00 +CT = fdf3f6c177aa1d71fe3474a5a2eb6bb1 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3 + +Count = 30 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 90156f3f +Result = Pass +Payload = 00 + +Count = 31 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 88909016 +Result = Fail + +Count = 32 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = de547d03 +Result = Fail + +Count = 33 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = ea4bad52 +Result = Fail + +Count = 34 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 1bc82b3d +Result = Pass +Payload = 00 + +Count = 35 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 92e72250 +Result = Fail + +Count = 36 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = e81f0647 +Result = Fail + +Count = 37 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 7cb906ec +Result = Fail + +Count = 38 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = d60f815b +Result = Fail + +Count = 39 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = d3d4f3b0 +Result = Fail + +Count = 40 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = a9df97ad +Result = Fail + +Count = 41 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 36a37a59 +Result = Pass +Payload = 00 + +Count = 42 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = dba02a36 +Result = Pass +Payload = 00 + +Count = 43 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 25dcb3c5 +Result = Pass +Payload = 00 + +Count = 44 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = 1d2832d0 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 19ebfde2d5468ba0a3031bde629b11fd + +Count = 45 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = fb04dc5a44c6bb000f2440f5154364b4 +Result = Pass +Payload = 00 + +Count = 46 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 5447075bf42a59b91f08064738b015ab +Result = Fail + +Count = 47 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = fdc992847f0815fac67aa935b35208ed +Result = Fail + +Count = 48 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = 2cabd690a45e59854b7587b26dd77f8e +Result = Fail + +Count = 49 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 3dacc71169f6da77ec91ff1d2f649ed1 +Result = Pass +Payload = 00 + +Count = 50 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 97a2eb170ef03fa12124f1315e3b694f +Result = Fail + +Count = 51 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 94d85a83169d8dc76f58baf4d63ecfee +Result = Fail + +Count = 52 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = d3903c6289ca3684b8ce1174c23153a4 +Result = Fail + +Count = 53 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = 5cbac5c418374a68bd7085454c4b0c13 +Result = Fail + +Count = 54 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = 26317f6b8b0130097441ed04b8009aef +Result = Fail + +Count = 55 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = b82ab6f3bbf59b6caafc54f05570f74e +Result = Fail + +Count = 56 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 1ae34207e74c8c78890ae17e320e84bd +Result = Pass +Payload = 00 + +Count = 57 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 5c5fa254c0be503b02caffade6b85259 +Result = Pass +Payload = 00 + +Count = 58 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 9340266730ea36207bb734819d3553e9 +Result = Pass +Payload = 00 + +Count = 59 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = ec17cccf33bd9a0d4ce7aa20690c1333 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 19ebfde2d5468ba0a3031bde629b11fd + +Count = 60 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = a90e8ea44085ced791b2fdb7fd44b5cf0bd7d27718029bb703e1fa6b +Result = Pass +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 61 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 50aafe0578c115c4a8e126ff7b3ccb64dce8ccaa8ceda69f23e5d81c +Result = Fail + +Count = 62 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = 512ed208bf10d57406537e94d20a5b6e2e9ab0683dfdc685869a97f0 +Result = Fail + +Count = 63 +Nonce = 9cbce402511b89 +Adata = 00 +CT = af72db9cd9d6f46607d6f9542ca69988dd15255c5c91171c838e7f95 +Result = Fail + +Count = 64 +Nonce = 123a0beace4e39 +Adata = 00 +CT = 47d71409a03c330be9451b3f92c9d21c584391ad1010e9d609b89801 +Result = Pass +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 65 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = e562c7af0384ea16431ca20934a293a058d722cbfc3186c8eaf5f825 +Result = Fail + +Count = 66 +Nonce = 5a7743e59e82da +Adata = 00 +CT = 004d9d89c401aa79919c2805fcd5de69316e191df56426c05ec1aa6a +Result = Fail + +Count = 67 +Nonce = f477f754d7ee76 +Adata = 00 +CT = d623673d7f6d57c208bde112ca858561f3af5cc2bf5de926f3586c6f +Result = Fail + +Count = 68 +Nonce = 040a257dede70e +Adata = 00 +CT = fd4733d158b5630f4f6c03ab26b11bff0cbe0d5d3df99a735fa40618 +Result = Fail + +Count = 69 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = d352cb996c3075ff367a8dcacbbae46a12fbef08aa96ec835bf4f930 +Result = Fail + +Count = 70 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 31730fac20e21eca0aef591faa9fa90b3c058e32af1ce48a66f0496e +Result = Fail + +Count = 71 +Nonce = f67b98efd39b55 +Adata = 00 +CT = dd175905a7ea3aef9fce068e6cb78e9cc60519755a178c77b753181c +Result = Pass +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 72 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 8ad6b76f54392ee0f2834f09142545bcde9bf03d04d64aa10876f2da +Result = Pass +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 73 +Nonce = 098e053fa08043 +Adata = 00 +CT = 808eb3e04c39abde64674f0f7716dde11699cff8dd367c4cd4f7fc07 +Result = Pass +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 74 +Nonce = 4bf48328725514 +Adata = 00 +CT = e074d13aad43f7b2364d47db0a02326641ca3b2ad61a1c49973a2712 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 197afb02ffbd8f699dacae87094d5243 + +Count = 75 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 24ab9eeb0e5508cae80074f1070ee188a637171860881f1f2d9a3fbc210595b7b8b1b41523111a8e +Result = Pass +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 76 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 7ebfda6fa5da1dbffd82dc29b875798fbcef8ba0084fbd2463af747cc88a001fa94e060290f209c4 +Result = Fail + +Count = 77 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = cbf133643851f91ddc7a1e19a0c21990459f2b7728da58f5cf3b8e6c8aeb5eeb0a5efb3700be45a2 +Result = Fail + +Count = 78 +Nonce = 9cbce402511b89 +Adata = 00 +CT = 0de7567a945c0af4a2291a651de411e8d0438508f2d4da80f7bd61a0158accbca28913e39fe80906 +Result = Fail + +Count = 79 +Nonce = 123a0beace4e39 +Adata = 00 +CT = d43035cdb5a1868aa430e8b41a1dc57a639087238e38bd628feeda2e8f249dd93a8358def7639875 +Result = Pass +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 80 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = 389547260b354a6cbc909de057d367677049e80613877f6fbf19f89da977e56f308373c616299ad4 +Result = Fail + +Count = 81 +Nonce = 5a7743e59e82da +Adata = 00 +CT = a95aa33483ed3711470025394616bf98fe624fbca8aa6fbc21366b9da457ede2a673351475b53d41 +Result = Fail + +Count = 82 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 3d53b6ab8925f429ae14a0065cd203d4f9deddd402a79ac6d889a7cae55efd71b369cd6d43ef363b +Result = Fail + +Count = 83 +Nonce = 040a257dede70e +Adata = 00 +CT = d5e6e82cb5f8034a89e58adf8298476253f18981bcb3b0364be7f19463dd330a4b9f3cbb30b88fa5 +Result = Fail + +Count = 84 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = 02f69107d62ff77145c7d57684c70ba671d55f1c63bb2ad8c2df063f7fdbae27f0736a37fd065fb4 +Result = Fail + +Count = 85 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 64ec2f321111da9c5389e8255bfe69876d4f548f94cacd529b45d54cc24cff1b1d8aa1df32fbd81a +Result = Fail + +Count = 86 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 37d63c2bbf44d2eb155ecc1a844841d5c33f1a6d443419330217a4f1f4fb302257b0de7c9da2e750 +Result = Pass +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 87 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 33e0dce4410e51bed5323ea49490207084ac91732bae429236a305d520a1a24930a70a311aa3695d +Result = Pass +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 88 +Nonce = 098e053fa08043 +Adata = 00 +CT = 1d732c334319bd775e7cf93dbdc4204bbdb58192be08280481e3d64ed546b6b70ee088a693f55fbb +Result = Pass +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 89 +Nonce = 4bf48328725514 +Adata = 00 +CT = c92fc2f0d24593f67d9c09d326158a8138237c4096093f0d737719dd84ccfb397a4f61b70c85262a +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 197afb02ffbd8f699dacae87094d5243 + +Count = 90 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 4a550134f94455979ec4bf89ad2bd80d25a77ae94e456134a3e138b9 +Result = Pass +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 91 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 118ec53dd1bfbe52d5b9fe5dfebecf2ee674ec983eada654091a5ae9 +Result = Fail + +Count = 92 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = 6b0fea26e4dfe902b5e876c7ba92afbad8aa52d3c1d00ae578b6bcc4 +Result = Fail + +Count = 93 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = 640c740e2b8af851712a05948ecee055b25b145ccb82ca58ac542b09 +Result = Fail + +Count = 94 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 05f20b2ae70fcb0ea79aa1845c15b899a799ca60f51e6c296413020a +Result = Pass +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 95 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 9fa576a8a5c72468afa372338cbbc33fef81ad5a873eb38a142d5636 +Result = Fail + +Count = 96 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = 8d26582c74b2b4d960ee9e417c6395daafaebb3aff45d477f3757b6a +Result = Fail + +Count = 97 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = cb62a13e38e17cc6635e409c922956ece38f593189a51b99a7001a16 +Result = Fail + +Count = 98 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = f3e29b792423c7fbe743a3b2f890a2bff29519f3636a6232050e9225 +Result = Fail + +Count = 99 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = 136e60d6714d906d1f4c02b7bdbb5f3ccdd2165306912dec850ec9f0 +Result = Fail + +Count = 100 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 49b6d0b6eeff74af0de70072d9ccdc68a0ee36a5ddbf098b4eb95533 +Result = Fail + +Count = 101 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = a2a59041c3f78f6e10c3045118e8a475945e24c85b02abc40f8fb949 +Result = Pass +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 102 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = 19b4ad222795326cb031cfdb07b652dbf64ca5db5ff5d6d569d8ab41 +Result = Pass +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 103 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = 76b66b908657f4df8a329c34ccdde50ae7fc71c4a718b712f00fe764 +Result = Pass +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 104 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 20df4662ce6c8c4ce49b14fa791e41ff8598ec93d8a825e879f9eb72 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 90929a4b0ac65b350ad1591611fe4829 + +Count = 105 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 4bfe4e35784f0a65b545477e5e2f4bae0e1e6fa717eaf2cb6a9a970b9beb2ac1bd4fd62168f8378a +Result = Pass +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 106 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 0c56a503aa2c12e87450d45a7b714db980fd348f327c0065a65666144994bad0c8195bcb4ade1337 +Result = Fail + +Count = 107 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = 5f69d6c21f771eb98dc724f891f530b1c045f49a054de103a85f868739404b64a7cbdd61b577c388 +Result = Fail + +Count = 108 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = d335ba572520c336f711edf27ea738ba5e6b0d772ea443b8b2b164f3c255b699cbf75330d96c3c13 +Result = Fail + +Count = 109 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 9fa846ef8d198c538f84f856bab8f7f9c3bed90b53acb6a32658e077687315eaf11458bdf6e3c36a +Result = Pass +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 110 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = b7095030acdc5fbb8fea2c24717c1c236231f9737bcc78f463db3756abba1feef626a956794d7e56 +Result = Fail + +Count = 111 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = d6911d5831163c8ebad0916af1833051b885aae822f9f6657d6fee1de626bc7c93f2caa27a3ecaa0 +Result = Fail + +Count = 112 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 6b10a098c96c2bbf9aeb5c9adcf91e4812838dff319f8be989e2d235192f33ba0f357492112d98f4 +Result = Fail + +Count = 113 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = aecd11cbac04e1f79b0fd24052c8cedf393dce9df350d24f800b81e834ea5dd2bdc2c688d9505359 +Result = Fail + +Count = 114 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = d3a7a25f71b1988482dc852ed713d55abdcc4bb1129ddcae430889cd5c97343cc0dedfbd62e6b6eb +Result = Fail + +Count = 115 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 368e1574a433d78d0276ce4a1cacfba834a216693536c00b15acded53c41010554e1c1fe937a7605 +Result = Fail + +Count = 116 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 99e40b3c67aca95dd4462c20cbd6b2741e7033fc4f41a975c9390fbdb9ec416267096ccbf2c148e5 +Result = Pass +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 117 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = de079418c25ba67e5fda009998e3fce61bfdc3b7787cf06655c18ae38b7ee7f00f96cfca4fe9a2ef +Result = Pass +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 118 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = fbab64d8dd8b6e33c7cc6124cd65f004d7247277fe98d5d3b35357a35ff9e58e18d6d80df9fc335d +Result = Pass +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 119 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 372b9af0655df2d0c830b4949a2d2faa8db251ee922a3bff9aba89639f4033be9ba9f3c101acc1bd +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 90929a4b0ac65b350ad1591611fe4829 + +Count = 120 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 782e4318 +Result = Pass +Payload = 00 + +Count = 121 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = a04f270a +Result = Fail + +Count = 122 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 97dfd257 +Result = Fail + +Count = 123 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 6c202a1c +Result = Fail + +Count = 124 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 1be535a0 +Result = Pass +Payload = 00 + +Count = 125 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 4fb6617d +Result = Fail + +Count = 126 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = c056bd3e +Result = Fail + +Count = 127 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 87048576 +Result = Fail + +Count = 128 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = ea8c0407 +Result = Fail + +Count = 129 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 41c12dc5 +Result = Fail + +Count = 130 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = de84cf5c +Result = Fail + +Count = 131 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = e617e006 +Result = Pass +Payload = 00 + +Count = 132 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = b7909395 +Result = Pass +Payload = 00 + +Count = 133 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 8a05d2ea +Result = Pass +Payload = 00 + +Count = 134 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 8643ba47 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b + +Count = 135 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 41b476013f45e4a781f253a6f3b1e530 +Result = Pass +Payload = 00 + +Count = 136 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = f9f018fcd125822616083fffebc4c8e6 +Result = Fail + +Count = 137 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 534cc67c44c877c9c908071ee1082f4c +Result = Fail + +Count = 138 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 201c0ef2ddaa51b645911b5c37d76e95 +Result = Fail + +Count = 139 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = ec774d9000763bba3a5ac307418827b2 +Result = Pass +Payload = 00 + +Count = 140 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 75798c3fe5202f0e33c9183c837aeaf5 +Result = Fail + +Count = 141 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 32601de5960c11c925444b5c47d42289 +Result = Fail + +Count = 142 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 4c1cd6a774c8e6f4e261db1f73b0aa20 +Result = Fail + +Count = 143 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = 8bd9c00ff23310216bbd24981c1e2cf7 +Result = Fail + +Count = 144 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 174efd089409f9932b8e631965e762a6 +Result = Fail + +Count = 145 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = 8de80f620bd41eee6a58925dc8404bfa +Result = Fail + +Count = 146 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 0b9d79e8e33ec45532af5515a99f05df +Result = Pass +Payload = 00 + +Count = 147 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 1583e1e5a86001bbcec62292ccfd4d48 +Result = Pass +Payload = 00 + +Count = 148 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = b72caac6362e68e445f69f605f21e0a2 +Result = Pass +Payload = 00 + +Count = 149 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 352769a19ac75b8a116be031b33d6449 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b + +Count = 150 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 9f69f24f +Result = Pass +Payload = 00 + +Count = 151 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = e17afaa4 +Result = Fail + +Count = 152 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 07155b7e +Result = Fail + +Count = 153 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = d538cf2f +Result = Fail + +Count = 154 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = c283466f +Result = Pass +Payload = 00 + +Count = 155 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = aa8d8098 +Result = Fail + +Count = 156 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = a44b69b0 +Result = Fail + +Count = 157 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = f395733f +Result = Fail + +Count = 158 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 1e9e9237 +Result = Fail + +Count = 159 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = e9d2a722 +Result = Fail + +Count = 160 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = a90fc438 +Result = Fail + +Count = 161 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = 48f3a1ec +Result = Pass +Payload = 00 + +Count = 162 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 24763def +Result = Pass +Payload = 00 + +Count = 163 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = 63394bee +Result = Pass +Payload = 00 + +Count = 164 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = d79b1686 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = f9fdca4ac64fe7f014de0f43039c7571 + +Count = 165 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 1859ac36a40a6b28b34266253627797a +Result = Pass +Payload = 00 + +Count = 166 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = edf8b46eb69ac0044116019dec183072 +Result = Fail + +Count = 167 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 66622ac26c7227a0329739612012737c +Result = Fail + +Count = 168 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = e4c9e86493ee78b1cbf6e55e94731b63 +Result = Fail + +Count = 169 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = 8b5bfe6b5b5552007300bae71172612f +Result = Pass +Payload = 00 + +Count = 170 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 1848be3cb7665ac68874c617a75d8bd2 +Result = Fail + +Count = 171 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = 65a23b7b5ee78af9c7d0113447f78ab9 +Result = Fail + +Count = 172 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = 90a420b6d2252392e161dcf4fb953d7e +Result = Fail + +Count = 173 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 004cbe11292887e246de7704a4a1a05f +Result = Fail + +Count = 174 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = ad7af41e39ea0c0cd072263e826f3cf0 +Result = Fail + +Count = 175 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = 16b1a4fadbadc906a949592d6ef319a3 +Result = Fail + +Count = 176 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = e9cfb1069380434f221db4229a083a76 +Result = Pass +Payload = 00 + +Count = 177 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 380cb57fd531bb1dcf22350518bbf8af +Result = Pass +Payload = 00 + +Count = 178 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = fbf2becc35b5024078bfcfc1f831b669 +Result = Pass +Payload = 00 + +Count = 179 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 080203eb842b3f98a730abbbf98f493e +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = f9fdca4ac64fe7f014de0f43039c7571 + +Count = 180 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 6be31860ca271ef448de8f8d8b39346daf4b81d7e92d65b338f125fa +Result = Pass +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 181 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 4cc57a9927a6bc401441870d3193bf89ebd163f5c01501c728a66b69 +Result = Fail + +Count = 182 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 1f16c6d370fff40c011a243356076b67e905d4672ae2f38fee2de18c +Result = Fail + +Count = 183 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 46edb001d58a01dce1bcf064cfc9a04accc82c42b33ba16524537a81 +Result = Fail + +Count = 184 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = 9b61335f96fc5b31274cc1fb275f29c1105d68c67b70654f9405edb1 +Result = Pass +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 185 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 97b5eb2d55847f5d5d9f8c762dace481d8efb19ccfd72265548effe3 +Result = Fail + +Count = 186 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = f5cc8198dce8e890587b62572b07413a915bfb55628c901c03459b29 +Result = Fail + +Count = 187 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 50c0b1f6c5e4c86a0c938ecbc762eeaf99b9fe04c2820a43963b04f3 +Result = Fail + +Count = 188 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 1fdbe91189da01c5098cf1538addd85b1cfef0abd0797c141330f633 +Result = Fail + +Count = 189 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = 462e7cdf9a6a553bca37d4d93bed4986b715d0349238613e10c1f6d7 +Result = Fail + +Count = 190 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 7d142f26aa6c9d55850c5c9f58ab36a66670d47c515bf93cd37e5543 +Result = Fail + +Count = 191 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = f7122cbcec93d53fc7e3fc629ea15d28363cad1c83a23bb3cc5e0c4a +Result = Pass +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 192 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = e1cad7f946b20c373323218c8a89e56edf3030662e50d459fc12a512 +Result = Pass +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 193 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = d4741814466a23e26107d773f103a4c83db9d772dbd5fdc1c2eaf895 +Result = Pass +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 194 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = ed35ff66bc7f6d8ec7acf896f994d79f5792cf6d22d6691ff92fa2f7 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = a7aa635ea51b0bb20a092bd5573e728c + +Count = 195 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = b351ab96b2e45515254558d5212673ee6c776d42dbca3b512cf3a20b7fd7c49e6e79bef475c2906f +Result = Pass +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 196 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = df1a5285caa41b4bb47f6e5ceceba4e82721828d68427a3081d18ca149d6766bfaccec88f194eb5b +Result = Fail + +Count = 197 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 04a29fc109dfc626e8297e0f586d0bfaf31260017d95f62d5eb4f0875dda5ccd9b94026ba49fb34e +Result = Fail + +Count = 198 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 77e4cd5d319353ecb6b89e2de14bcfee4fbf738b61df14f3920843994def41aed3103995d3392eed +Result = Fail + +Count = 199 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = e676f5dfde8ad810d9e729d142670eef77f2878369a28797d57603d5c45606c68be5535c671d5432 +Result = Pass +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 200 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 60c51e5c3fe4197454d64fa14017639bcfd1423b9d74e506a0bfd54fb786208e1e49c6d0e645d9fb +Result = Fail + +Count = 201 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 64d1160365062eca1027cc7036862b027bdda3a9abdf794daf8a9b7a5c50b0be4596290a4d405e79 +Result = Fail + +Count = 202 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 968ca115583c645710d2b47fb196cf55f6ef33f2b01400e22ce9c776932ecf7fddd849be58096b88 +Result = Fail + +Count = 203 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 4985821b16ff6d4d3416573e2fba4d53186d912f0b023a99915d0020da92f483a5a7914cba14b1e7 +Result = Fail + +Count = 204 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = c7345b031ef85bde766226a7603adaa7dcb07a7b2a8be1b571420e036ea48dddd671be622d372c5b +Result = Fail + +Count = 205 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 11460b9acccc13001be236814da6b73f2c8e0467574f151bb619a331f8d67d70c3f3a59b3fab53a5 +Result = Fail + +Count = 206 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 1bcff940a2d9d48e93bbfd13aed5947237485983e6ae04b8b944bb46306a9b1e783f3e54c92d5f5e +Result = Pass +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 207 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = 3b6c1570c85f297079be14cd66d335251c7b52e131a636f148608963f3037763843b70c35d7011f8 +Result = Pass +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 208 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = b540cd8cbe733e0ca2ba2112ea785596d2c1d707f41608514ba2d0944c68cc36d4125b3ef9071d69 +Result = Pass +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 209 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 3c9c1481f1428acf202b510dca67e5e6b2abc5dd71a954da51387922af7182b7d46a33c703e6e7a8 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = a7aa635ea51b0bb20a092bd5573e728c + +Count = 210 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 934f893824e880f743d196b22d1f340a52608155087bd28ac25e5329 +Result = Pass +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 211 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = f43ba9d834ad85dfab3f1c0c27c3441fe4e411a38a261a6559b3b3ee +Result = Fail + +Count = 212 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = c686eac859a7bae3cce97d0b6527a0a7c8c2b24ece35f4370bf6688e +Result = Fail + +Count = 213 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 2b28355ecf7246ddb08d65c464dcaa90af85f434ff95267280ed869c +Result = Fail + +Count = 214 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = ecde42091baa1f5c17b79746e21c3de5c78984570748021ccd399507 +Result = Pass +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 215 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = 5c338435ed4f148342604c9aed63e907c100453d719fda2a3da37b66 +Result = Fail + +Count = 216 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 30eac1042015eb82729673edd9939bf9995b2575da4d6c4c7e75dded +Result = Fail + +Count = 217 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = ebd3ce55b40e4bbd8172033948c6c78049161ee8f949eb50722b9c87 +Result = Fail + +Count = 218 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 20f79b36ca83baac97600fd8a6dad22c2cd0f9b7e770576048c042e5 +Result = Fail + +Count = 219 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = 77b76f249f936fb19bd47fe28ad4dbb7725dec365a1cb23a885ba975 +Result = Fail + +Count = 220 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = cf6763a23c2eab730845d1eb79bbba9f54ee899fe3d70570aa799e79 +Result = Fail + +Count = 221 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 1f8086a43c1b2dea557952db88e0dbbdb96aafdb345eddae6c0b0104 +Result = Pass +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 222 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = c0c5f92285b114e0a0777e1bc22b810e7cc4f68c28cd5ce047a28dd8 +Result = Pass +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 223 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 56327f4db9c18f72bbefc3f316d31f9795dd77f493385ab7b7543552 +Result = Pass +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 224 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 37d5b17995fac8c94302ec9ba20a36d97678e85199b677f8ee39867e +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0e + +Count = 225 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 50038b5fdd364ee747b70d00bd36840ece4ea19998123375c0a458bfcafa3b2609afe0f825cbf503 +Result = Pass +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 226 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = 78ed8ff6b5a1255d0fbd0a719a9c27b059ff5f83d0c4962c390042ba8bb5f6798dab01c5afad7306 +Result = Fail + +Count = 227 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 4b91d8e616d3f60452fd3a576bd7c265b7f549523ed4a5d7a3463394cf3c25bef8af8f244d0c0b00 +Result = Fail + +Count = 228 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = ab8cf8891ab62924c0c6f49dd253cfa0c3d6260d0ee4d9ba88caf8ae59d9d1131626da0dddf8722d +Result = Fail + +Count = 229 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = c6b7680f321132a8bd00e8e92f785d0b828b100af6392a04d1292373a76970eda77a8194f6276262 +Result = Pass +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 230 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = aea98867d3d707c43a963c1d7fdcfc953cbd707803b2b5f0a97af19d0b7bf7c7ce398cb0b44d73af +Result = Fail + +Count = 231 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = c55e17ba7886eb58126d50bde8c5c211cc1aafd71a3d9e5b343065b4bdd973ee072dbf5160d310f3 +Result = Fail + +Count = 232 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = 791a62d5fb39ff9735ad94507e1afe2647714d5cc56b6ff4233ec600bca1d31f704807494fb0f18d +Result = Fail + +Count = 233 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = f98a081998e29500f15ebd8978a95423aed4e8e78e0279d17ec183db0e2a33ebb147d0e2363fbb01 +Result = Fail + +Count = 234 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = 7779814dc295a23b4100ca94bec0ad4ce2f6be6fb75a0c217e67ea2577ade5836c26a89760e0959b +Result = Fail + +Count = 235 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 55640eed12c7595a36ab423da8d8241905b6ff1e906db9624978a7865df8369635269411b3aaeb32 +Result = Fail + +Count = 236 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 7fcdce0ba567b9a708d54fdb16125de71dce952f4741684f4f9d302e4f1d2a2aedf2768d7b29163f +Result = Pass +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 237 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = d42111ba22987eac1ead5cc6cb8548bcda190d118dcd5461a50036af67fadab163e9daa8bd8e9030 +Result = Pass +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 238 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 1bf0ba0ebb20d8edba59f29a9371750c9c714078f73c335d2f1322ac69b848b001476323aed84c47 +Result = Pass +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 239 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 9d993b945476ace0b9ca932963ac8835e1bd02e8065da2d816786c4d8cf14c03b031ff723311b3c4 +Result = Fail diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.txt b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.txt new file mode 100644 index 0000000000..1606dcb21e --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT128.txt @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:25 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 4ae701103c63deca5b5a3939d7d05992 + +Count = 0 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 02209f55 +Result = Pass (0) +Payload = 00 + +Count = 1 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 9a04c241 +Result = Fail (2 - CT changed) + +Count = 2 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = f5f915df +Result = Fail (1 - Adata changed) + +Count = 3 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 7a3c3499 +Result = Fail (1 - Adata changed) + +Count = 4 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = f09c2986 +Result = Pass (0) +Payload = 00 + +Count = 5 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 4ae97e71 +Result = Fail (2 - CT changed) + +Count = 6 +Nonce = 06d102a9328863 +Adata = 00 +CT = ecb38c8b +Result = Fail (1 - Adata changed) + +Count = 7 +Nonce = c288b810fb5334 +Adata = 00 +CT = 9c4dc530 +Result = Fail (2 - CT changed) + +Count = 8 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = 67299ef6 +Result = Fail (2 - CT changed) + +Count = 9 +Nonce = 4a5810b121c91b +Adata = 00 +CT = b0538d02 +Result = Fail (1 - Adata changed) + +Count = 10 +Nonce = 44077341139bf9 +Adata = 00 +CT = 88200ea8 +Result = Fail (1 - Adata changed) + +Count = 11 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 19867aa5 +Result = Pass (0) +Payload = 00 + +Count = 12 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 3b392a52 +Result = Pass (0) +Payload = 00 + +Count = 13 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 1c5e47e0 +Result = Pass (0) +Payload = 00 + +Count = 14 +Nonce = 9dc18698731b27 +Adata = 00 +CT = 97a56b8b +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3 + +Count = 15 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 75d582db43ce9b13ab4b6f7f14341330 +Result = Pass (0) +Payload = 00 + +Count = 16 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 3a65e03af37b81d05acc7ec1bc39deb0 +Result = Fail (2 - CT changed) + +Count = 17 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = efc5721e0b9e4c3c90deab0e1d5c11bd +Result = Fail (1 - Adata changed) + +Count = 18 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 91b4b779823f4f0e3979ced93b99736c +Result = Fail (1 - Adata changed) + +Count = 19 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = e2e87ca82523ccfeb416b42af9d9aadc +Result = Pass (0) +Payload = 00 + +Count = 20 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 7b85fd105cc960df86ad86846d178274 +Result = Fail (2 - CT changed) + +Count = 21 +Nonce = 06d102a9328863 +Adata = 00 +CT = ffa140be27b25f307a6efd9697d66c9b +Result = Fail (1 - Adata changed) + +Count = 22 +Nonce = c288b810fb5334 +Adata = 00 +CT = ed356542e0a804a724bfaa422e98a970 +Result = Fail (2 - CT changed) + +Count = 23 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = e31dd8dc920fe7900e1b1817fe845c7d +Result = Fail (2 - CT changed) + +Count = 24 +Nonce = 4a5810b121c91b +Adata = 00 +CT = ae5a0777f03bbf541f305d00acff0396 +Result = Fail (1 - Adata changed) + +Count = 25 +Nonce = 44077341139bf9 +Adata = 00 +CT = 957dca58616c1cbe99f94fd8f7c257d9 +Result = Fail (1 - Adata changed) + +Count = 26 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 0e150af422f6da238bb476810b2d5bc2 +Result = Pass (0) +Payload = 00 + +Count = 27 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 8e1150756ff3a733a1274470f072b74c +Result = Pass (0) +Payload = 00 + +Count = 28 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = a1f70df3fa9cfeb95f869b3fe08466e0 +Result = Pass (0) +Payload = 00 + +Count = 29 +Nonce = 9dc18698731b27 +Adata = 00 +CT = fdf3f6c177aa1d71fe3474a5a2eb6bb1 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3 + +Count = 30 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 90156f3f +Result = Pass (0) +Payload = 00 + +Count = 31 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 88909016 +Result = Fail (2 - CT changed) + +Count = 32 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = de547d03 +Result = Fail (1 - Adata changed) + +Count = 33 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = ea4bad52 +Result = Fail (1 - Adata changed) + +Count = 34 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 1bc82b3d +Result = Pass (0) +Payload = 00 + +Count = 35 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 92e72250 +Result = Fail (2 - CT changed) + +Count = 36 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = e81f0647 +Result = Fail (1 - Adata changed) + +Count = 37 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 7cb906ec +Result = Fail (2 - CT changed) + +Count = 38 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = d60f815b +Result = Fail (2 - CT changed) + +Count = 39 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = d3d4f3b0 +Result = Fail (1 - Adata changed) + +Count = 40 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = a9df97ad +Result = Fail (1 - Adata changed) + +Count = 41 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 36a37a59 +Result = Pass (0) +Payload = 00 + +Count = 42 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = dba02a36 +Result = Pass (0) +Payload = 00 + +Count = 43 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 25dcb3c5 +Result = Pass (0) +Payload = 00 + +Count = 44 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = 1d2832d0 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 19ebfde2d5468ba0a3031bde629b11fd + +Count = 45 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = fb04dc5a44c6bb000f2440f5154364b4 +Result = Pass (0) +Payload = 00 + +Count = 46 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 5447075bf42a59b91f08064738b015ab +Result = Fail (2 - CT changed) + +Count = 47 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = fdc992847f0815fac67aa935b35208ed +Result = Fail (1 - Adata changed) + +Count = 48 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = 2cabd690a45e59854b7587b26dd77f8e +Result = Fail (1 - Adata changed) + +Count = 49 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 3dacc71169f6da77ec91ff1d2f649ed1 +Result = Pass (0) +Payload = 00 + +Count = 50 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 97a2eb170ef03fa12124f1315e3b694f +Result = Fail (2 - CT changed) + +Count = 51 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 94d85a83169d8dc76f58baf4d63ecfee +Result = Fail (1 - Adata changed) + +Count = 52 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = d3903c6289ca3684b8ce1174c23153a4 +Result = Fail (2 - CT changed) + +Count = 53 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = 5cbac5c418374a68bd7085454c4b0c13 +Result = Fail (2 - CT changed) + +Count = 54 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = 26317f6b8b0130097441ed04b8009aef +Result = Fail (1 - Adata changed) + +Count = 55 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = b82ab6f3bbf59b6caafc54f05570f74e +Result = Fail (1 - Adata changed) + +Count = 56 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 1ae34207e74c8c78890ae17e320e84bd +Result = Pass (0) +Payload = 00 + +Count = 57 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 5c5fa254c0be503b02caffade6b85259 +Result = Pass (0) +Payload = 00 + +Count = 58 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 9340266730ea36207bb734819d3553e9 +Result = Pass (0) +Payload = 00 + +Count = 59 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = ec17cccf33bd9a0d4ce7aa20690c1333 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 19ebfde2d5468ba0a3031bde629b11fd + +Count = 60 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = a90e8ea44085ced791b2fdb7fd44b5cf0bd7d27718029bb703e1fa6b +Result = Pass (0) +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 61 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 50aafe0578c115c4a8e126ff7b3ccb64dce8ccaa8ceda69f23e5d81c +Result = Fail (2 - CT changed) + +Count = 62 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = 512ed208bf10d57406537e94d20a5b6e2e9ab0683dfdc685869a97f0 +Result = Fail (1 - Adata changed) + +Count = 63 +Nonce = 9cbce402511b89 +Adata = 00 +CT = af72db9cd9d6f46607d6f9542ca69988dd15255c5c91171c838e7f95 +Result = Fail (1 - Adata changed) + +Count = 64 +Nonce = 123a0beace4e39 +Adata = 00 +CT = 47d71409a03c330be9451b3f92c9d21c584391ad1010e9d609b89801 +Result = Pass (0) +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 65 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = e562c7af0384ea16431ca20934a293a058d722cbfc3186c8eaf5f825 +Result = Fail (2 - CT changed) + +Count = 66 +Nonce = 5a7743e59e82da +Adata = 00 +CT = 004d9d89c401aa79919c2805fcd5de69316e191df56426c05ec1aa6a +Result = Fail (1 - Adata changed) + +Count = 67 +Nonce = f477f754d7ee76 +Adata = 00 +CT = d623673d7f6d57c208bde112ca858561f3af5cc2bf5de926f3586c6f +Result = Fail (2 - CT changed) + +Count = 68 +Nonce = 040a257dede70e +Adata = 00 +CT = fd4733d158b5630f4f6c03ab26b11bff0cbe0d5d3df99a735fa40618 +Result = Fail (2 - CT changed) + +Count = 69 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = d352cb996c3075ff367a8dcacbbae46a12fbef08aa96ec835bf4f930 +Result = Fail (1 - Adata changed) + +Count = 70 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 31730fac20e21eca0aef591faa9fa90b3c058e32af1ce48a66f0496e +Result = Fail (1 - Adata changed) + +Count = 71 +Nonce = f67b98efd39b55 +Adata = 00 +CT = dd175905a7ea3aef9fce068e6cb78e9cc60519755a178c77b753181c +Result = Pass (0) +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 72 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 8ad6b76f54392ee0f2834f09142545bcde9bf03d04d64aa10876f2da +Result = Pass (0) +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 73 +Nonce = 098e053fa08043 +Adata = 00 +CT = 808eb3e04c39abde64674f0f7716dde11699cff8dd367c4cd4f7fc07 +Result = Pass (0) +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 74 +Nonce = 4bf48328725514 +Adata = 00 +CT = e074d13aad43f7b2364d47db0a02326641ca3b2ad61a1c49973a2712 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 197afb02ffbd8f699dacae87094d5243 + +Count = 75 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 24ab9eeb0e5508cae80074f1070ee188a637171860881f1f2d9a3fbc210595b7b8b1b41523111a8e +Result = Pass (0) +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 76 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 7ebfda6fa5da1dbffd82dc29b875798fbcef8ba0084fbd2463af747cc88a001fa94e060290f209c4 +Result = Fail (2 - CT changed) + +Count = 77 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = cbf133643851f91ddc7a1e19a0c21990459f2b7728da58f5cf3b8e6c8aeb5eeb0a5efb3700be45a2 +Result = Fail (1 - Adata changed) + +Count = 78 +Nonce = 9cbce402511b89 +Adata = 00 +CT = 0de7567a945c0af4a2291a651de411e8d0438508f2d4da80f7bd61a0158accbca28913e39fe80906 +Result = Fail (1 - Adata changed) + +Count = 79 +Nonce = 123a0beace4e39 +Adata = 00 +CT = d43035cdb5a1868aa430e8b41a1dc57a639087238e38bd628feeda2e8f249dd93a8358def7639875 +Result = Pass (0) +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 80 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = 389547260b354a6cbc909de057d367677049e80613877f6fbf19f89da977e56f308373c616299ad4 +Result = Fail (2 - CT changed) + +Count = 81 +Nonce = 5a7743e59e82da +Adata = 00 +CT = a95aa33483ed3711470025394616bf98fe624fbca8aa6fbc21366b9da457ede2a673351475b53d41 +Result = Fail (1 - Adata changed) + +Count = 82 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 3d53b6ab8925f429ae14a0065cd203d4f9deddd402a79ac6d889a7cae55efd71b369cd6d43ef363b +Result = Fail (2 - CT changed) + +Count = 83 +Nonce = 040a257dede70e +Adata = 00 +CT = d5e6e82cb5f8034a89e58adf8298476253f18981bcb3b0364be7f19463dd330a4b9f3cbb30b88fa5 +Result = Fail (2 - CT changed) + +Count = 84 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = 02f69107d62ff77145c7d57684c70ba671d55f1c63bb2ad8c2df063f7fdbae27f0736a37fd065fb4 +Result = Fail (1 - Adata changed) + +Count = 85 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 64ec2f321111da9c5389e8255bfe69876d4f548f94cacd529b45d54cc24cff1b1d8aa1df32fbd81a +Result = Fail (1 - Adata changed) + +Count = 86 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 37d63c2bbf44d2eb155ecc1a844841d5c33f1a6d443419330217a4f1f4fb302257b0de7c9da2e750 +Result = Pass (0) +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 87 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 33e0dce4410e51bed5323ea49490207084ac91732bae429236a305d520a1a24930a70a311aa3695d +Result = Pass (0) +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 88 +Nonce = 098e053fa08043 +Adata = 00 +CT = 1d732c334319bd775e7cf93dbdc4204bbdb58192be08280481e3d64ed546b6b70ee088a693f55fbb +Result = Pass (0) +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 89 +Nonce = 4bf48328725514 +Adata = 00 +CT = c92fc2f0d24593f67d9c09d326158a8138237c4096093f0d737719dd84ccfb397a4f61b70c85262a +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 197afb02ffbd8f699dacae87094d5243 + +Count = 90 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 4a550134f94455979ec4bf89ad2bd80d25a77ae94e456134a3e138b9 +Result = Pass (0) +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 91 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 118ec53dd1bfbe52d5b9fe5dfebecf2ee674ec983eada654091a5ae9 +Result = Fail (2 - CT changed) + +Count = 92 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = 6b0fea26e4dfe902b5e876c7ba92afbad8aa52d3c1d00ae578b6bcc4 +Result = Fail (1 - Adata changed) + +Count = 93 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = 640c740e2b8af851712a05948ecee055b25b145ccb82ca58ac542b09 +Result = Fail (1 - Adata changed) + +Count = 94 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 05f20b2ae70fcb0ea79aa1845c15b899a799ca60f51e6c296413020a +Result = Pass (0) +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 95 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 9fa576a8a5c72468afa372338cbbc33fef81ad5a873eb38a142d5636 +Result = Fail (2 - CT changed) + +Count = 96 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = 8d26582c74b2b4d960ee9e417c6395daafaebb3aff45d477f3757b6a +Result = Fail (1 - Adata changed) + +Count = 97 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = cb62a13e38e17cc6635e409c922956ece38f593189a51b99a7001a16 +Result = Fail (2 - CT changed) + +Count = 98 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = f3e29b792423c7fbe743a3b2f890a2bff29519f3636a6232050e9225 +Result = Fail (2 - CT changed) + +Count = 99 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = 136e60d6714d906d1f4c02b7bdbb5f3ccdd2165306912dec850ec9f0 +Result = Fail (1 - Adata changed) + +Count = 100 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 49b6d0b6eeff74af0de70072d9ccdc68a0ee36a5ddbf098b4eb95533 +Result = Fail (1 - Adata changed) + +Count = 101 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = a2a59041c3f78f6e10c3045118e8a475945e24c85b02abc40f8fb949 +Result = Pass (0) +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 102 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = 19b4ad222795326cb031cfdb07b652dbf64ca5db5ff5d6d569d8ab41 +Result = Pass (0) +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 103 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = 76b66b908657f4df8a329c34ccdde50ae7fc71c4a718b712f00fe764 +Result = Pass (0) +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 104 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 20df4662ce6c8c4ce49b14fa791e41ff8598ec93d8a825e879f9eb72 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 90929a4b0ac65b350ad1591611fe4829 + +Count = 105 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 4bfe4e35784f0a65b545477e5e2f4bae0e1e6fa717eaf2cb6a9a970b9beb2ac1bd4fd62168f8378a +Result = Pass (0) +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 106 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 0c56a503aa2c12e87450d45a7b714db980fd348f327c0065a65666144994bad0c8195bcb4ade1337 +Result = Fail (2 - CT changed) + +Count = 107 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = 5f69d6c21f771eb98dc724f891f530b1c045f49a054de103a85f868739404b64a7cbdd61b577c388 +Result = Fail (1 - Adata changed) + +Count = 108 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = d335ba572520c336f711edf27ea738ba5e6b0d772ea443b8b2b164f3c255b699cbf75330d96c3c13 +Result = Fail (1 - Adata changed) + +Count = 109 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 9fa846ef8d198c538f84f856bab8f7f9c3bed90b53acb6a32658e077687315eaf11458bdf6e3c36a +Result = Pass (0) +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 110 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = b7095030acdc5fbb8fea2c24717c1c236231f9737bcc78f463db3756abba1feef626a956794d7e56 +Result = Fail (2 - CT changed) + +Count = 111 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = d6911d5831163c8ebad0916af1833051b885aae822f9f6657d6fee1de626bc7c93f2caa27a3ecaa0 +Result = Fail (1 - Adata changed) + +Count = 112 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 6b10a098c96c2bbf9aeb5c9adcf91e4812838dff319f8be989e2d235192f33ba0f357492112d98f4 +Result = Fail (2 - CT changed) + +Count = 113 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = aecd11cbac04e1f79b0fd24052c8cedf393dce9df350d24f800b81e834ea5dd2bdc2c688d9505359 +Result = Fail (2 - CT changed) + +Count = 114 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = d3a7a25f71b1988482dc852ed713d55abdcc4bb1129ddcae430889cd5c97343cc0dedfbd62e6b6eb +Result = Fail (1 - Adata changed) + +Count = 115 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 368e1574a433d78d0276ce4a1cacfba834a216693536c00b15acded53c41010554e1c1fe937a7605 +Result = Fail (1 - Adata changed) + +Count = 116 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 99e40b3c67aca95dd4462c20cbd6b2741e7033fc4f41a975c9390fbdb9ec416267096ccbf2c148e5 +Result = Pass (0) +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 117 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = de079418c25ba67e5fda009998e3fce61bfdc3b7787cf06655c18ae38b7ee7f00f96cfca4fe9a2ef +Result = Pass (0) +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 118 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = fbab64d8dd8b6e33c7cc6124cd65f004d7247277fe98d5d3b35357a35ff9e58e18d6d80df9fc335d +Result = Pass (0) +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 119 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 372b9af0655df2d0c830b4949a2d2faa8db251ee922a3bff9aba89639f4033be9ba9f3c101acc1bd +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 90929a4b0ac65b350ad1591611fe4829 + +Count = 120 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 782e4318 +Result = Pass (0) +Payload = 00 + +Count = 121 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = a04f270a +Result = Fail (2 - CT changed) + +Count = 122 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 97dfd257 +Result = Fail (1 - Adata changed) + +Count = 123 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 6c202a1c +Result = Fail (1 - Adata changed) + +Count = 124 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 1be535a0 +Result = Pass (0) +Payload = 00 + +Count = 125 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 4fb6617d +Result = Fail (2 - CT changed) + +Count = 126 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = c056bd3e +Result = Fail (1 - Adata changed) + +Count = 127 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 87048576 +Result = Fail (2 - CT changed) + +Count = 128 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = ea8c0407 +Result = Fail (2 - CT changed) + +Count = 129 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 41c12dc5 +Result = Fail (1 - Adata changed) + +Count = 130 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = de84cf5c +Result = Fail (1 - Adata changed) + +Count = 131 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = e617e006 +Result = Pass (0) +Payload = 00 + +Count = 132 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = b7909395 +Result = Pass (0) +Payload = 00 + +Count = 133 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 8a05d2ea +Result = Pass (0) +Payload = 00 + +Count = 134 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 8643ba47 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b + +Count = 135 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 41b476013f45e4a781f253a6f3b1e530 +Result = Pass (0) +Payload = 00 + +Count = 136 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = f9f018fcd125822616083fffebc4c8e6 +Result = Fail (2 - CT changed) + +Count = 137 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 534cc67c44c877c9c908071ee1082f4c +Result = Fail (1 - Adata changed) + +Count = 138 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 201c0ef2ddaa51b645911b5c37d76e95 +Result = Fail (1 - Adata changed) + +Count = 139 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = ec774d9000763bba3a5ac307418827b2 +Result = Pass (0) +Payload = 00 + +Count = 140 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 75798c3fe5202f0e33c9183c837aeaf5 +Result = Fail (2 - CT changed) + +Count = 141 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 32601de5960c11c925444b5c47d42289 +Result = Fail (1 - Adata changed) + +Count = 142 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 4c1cd6a774c8e6f4e261db1f73b0aa20 +Result = Fail (2 - CT changed) + +Count = 143 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = 8bd9c00ff23310216bbd24981c1e2cf7 +Result = Fail (2 - CT changed) + +Count = 144 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 174efd089409f9932b8e631965e762a6 +Result = Fail (1 - Adata changed) + +Count = 145 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = 8de80f620bd41eee6a58925dc8404bfa +Result = Fail (1 - Adata changed) + +Count = 146 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 0b9d79e8e33ec45532af5515a99f05df +Result = Pass (0) +Payload = 00 + +Count = 147 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 1583e1e5a86001bbcec62292ccfd4d48 +Result = Pass (0) +Payload = 00 + +Count = 148 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = b72caac6362e68e445f69f605f21e0a2 +Result = Pass (0) +Payload = 00 + +Count = 149 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 352769a19ac75b8a116be031b33d6449 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b + +Count = 150 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 9f69f24f +Result = Pass (0) +Payload = 00 + +Count = 151 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = e17afaa4 +Result = Fail (2 - CT changed) + +Count = 152 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 07155b7e +Result = Fail (1 - Adata changed) + +Count = 153 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = d538cf2f +Result = Fail (1 - Adata changed) + +Count = 154 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = c283466f +Result = Pass (0) +Payload = 00 + +Count = 155 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = aa8d8098 +Result = Fail (2 - CT changed) + +Count = 156 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = a44b69b0 +Result = Fail (1 - Adata changed) + +Count = 157 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = f395733f +Result = Fail (2 - CT changed) + +Count = 158 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 1e9e9237 +Result = Fail (2 - CT changed) + +Count = 159 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = e9d2a722 +Result = Fail (1 - Adata changed) + +Count = 160 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = a90fc438 +Result = Fail (1 - Adata changed) + +Count = 161 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = 48f3a1ec +Result = Pass (0) +Payload = 00 + +Count = 162 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 24763def +Result = Pass (0) +Payload = 00 + +Count = 163 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = 63394bee +Result = Pass (0) +Payload = 00 + +Count = 164 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = d79b1686 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = f9fdca4ac64fe7f014de0f43039c7571 + +Count = 165 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 1859ac36a40a6b28b34266253627797a +Result = Pass (0) +Payload = 00 + +Count = 166 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = edf8b46eb69ac0044116019dec183072 +Result = Fail (2 - CT changed) + +Count = 167 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 66622ac26c7227a0329739612012737c +Result = Fail (1 - Adata changed) + +Count = 168 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = e4c9e86493ee78b1cbf6e55e94731b63 +Result = Fail (1 - Adata changed) + +Count = 169 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = 8b5bfe6b5b5552007300bae71172612f +Result = Pass (0) +Payload = 00 + +Count = 170 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 1848be3cb7665ac68874c617a75d8bd2 +Result = Fail (2 - CT changed) + +Count = 171 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = 65a23b7b5ee78af9c7d0113447f78ab9 +Result = Fail (1 - Adata changed) + +Count = 172 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = 90a420b6d2252392e161dcf4fb953d7e +Result = Fail (2 - CT changed) + +Count = 173 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 004cbe11292887e246de7704a4a1a05f +Result = Fail (2 - CT changed) + +Count = 174 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = ad7af41e39ea0c0cd072263e826f3cf0 +Result = Fail (1 - Adata changed) + +Count = 175 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = 16b1a4fadbadc906a949592d6ef319a3 +Result = Fail (1 - Adata changed) + +Count = 176 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = e9cfb1069380434f221db4229a083a76 +Result = Pass (0) +Payload = 00 + +Count = 177 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 380cb57fd531bb1dcf22350518bbf8af +Result = Pass (0) +Payload = 00 + +Count = 178 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = fbf2becc35b5024078bfcfc1f831b669 +Result = Pass (0) +Payload = 00 + +Count = 179 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 080203eb842b3f98a730abbbf98f493e +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = f9fdca4ac64fe7f014de0f43039c7571 + +Count = 180 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 6be31860ca271ef448de8f8d8b39346daf4b81d7e92d65b338f125fa +Result = Pass (0) +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 181 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 4cc57a9927a6bc401441870d3193bf89ebd163f5c01501c728a66b69 +Result = Fail (2 - CT changed) + +Count = 182 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 1f16c6d370fff40c011a243356076b67e905d4672ae2f38fee2de18c +Result = Fail (1 - Adata changed) + +Count = 183 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 46edb001d58a01dce1bcf064cfc9a04accc82c42b33ba16524537a81 +Result = Fail (1 - Adata changed) + +Count = 184 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = 9b61335f96fc5b31274cc1fb275f29c1105d68c67b70654f9405edb1 +Result = Pass (0) +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 185 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 97b5eb2d55847f5d5d9f8c762dace481d8efb19ccfd72265548effe3 +Result = Fail (2 - CT changed) + +Count = 186 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = f5cc8198dce8e890587b62572b07413a915bfb55628c901c03459b29 +Result = Fail (1 - Adata changed) + +Count = 187 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 50c0b1f6c5e4c86a0c938ecbc762eeaf99b9fe04c2820a43963b04f3 +Result = Fail (2 - CT changed) + +Count = 188 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 1fdbe91189da01c5098cf1538addd85b1cfef0abd0797c141330f633 +Result = Fail (2 - CT changed) + +Count = 189 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = 462e7cdf9a6a553bca37d4d93bed4986b715d0349238613e10c1f6d7 +Result = Fail (1 - Adata changed) + +Count = 190 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 7d142f26aa6c9d55850c5c9f58ab36a66670d47c515bf93cd37e5543 +Result = Fail (1 - Adata changed) + +Count = 191 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = f7122cbcec93d53fc7e3fc629ea15d28363cad1c83a23bb3cc5e0c4a +Result = Pass (0) +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 192 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = e1cad7f946b20c373323218c8a89e56edf3030662e50d459fc12a512 +Result = Pass (0) +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 193 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = d4741814466a23e26107d773f103a4c83db9d772dbd5fdc1c2eaf895 +Result = Pass (0) +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 194 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = ed35ff66bc7f6d8ec7acf896f994d79f5792cf6d22d6691ff92fa2f7 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = a7aa635ea51b0bb20a092bd5573e728c + +Count = 195 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = b351ab96b2e45515254558d5212673ee6c776d42dbca3b512cf3a20b7fd7c49e6e79bef475c2906f +Result = Pass (0) +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 196 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = df1a5285caa41b4bb47f6e5ceceba4e82721828d68427a3081d18ca149d6766bfaccec88f194eb5b +Result = Fail (2 - CT changed) + +Count = 197 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 04a29fc109dfc626e8297e0f586d0bfaf31260017d95f62d5eb4f0875dda5ccd9b94026ba49fb34e +Result = Fail (1 - Adata changed) + +Count = 198 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 77e4cd5d319353ecb6b89e2de14bcfee4fbf738b61df14f3920843994def41aed3103995d3392eed +Result = Fail (1 - Adata changed) + +Count = 199 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = e676f5dfde8ad810d9e729d142670eef77f2878369a28797d57603d5c45606c68be5535c671d5432 +Result = Pass (0) +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 200 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 60c51e5c3fe4197454d64fa14017639bcfd1423b9d74e506a0bfd54fb786208e1e49c6d0e645d9fb +Result = Fail (2 - CT changed) + +Count = 201 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 64d1160365062eca1027cc7036862b027bdda3a9abdf794daf8a9b7a5c50b0be4596290a4d405e79 +Result = Fail (1 - Adata changed) + +Count = 202 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 968ca115583c645710d2b47fb196cf55f6ef33f2b01400e22ce9c776932ecf7fddd849be58096b88 +Result = Fail (2 - CT changed) + +Count = 203 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 4985821b16ff6d4d3416573e2fba4d53186d912f0b023a99915d0020da92f483a5a7914cba14b1e7 +Result = Fail (2 - CT changed) + +Count = 204 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = c7345b031ef85bde766226a7603adaa7dcb07a7b2a8be1b571420e036ea48dddd671be622d372c5b +Result = Fail (1 - Adata changed) + +Count = 205 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 11460b9acccc13001be236814da6b73f2c8e0467574f151bb619a331f8d67d70c3f3a59b3fab53a5 +Result = Fail (1 - Adata changed) + +Count = 206 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 1bcff940a2d9d48e93bbfd13aed5947237485983e6ae04b8b944bb46306a9b1e783f3e54c92d5f5e +Result = Pass (0) +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 207 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = 3b6c1570c85f297079be14cd66d335251c7b52e131a636f148608963f3037763843b70c35d7011f8 +Result = Pass (0) +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 208 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = b540cd8cbe733e0ca2ba2112ea785596d2c1d707f41608514ba2d0944c68cc36d4125b3ef9071d69 +Result = Pass (0) +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 209 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 3c9c1481f1428acf202b510dca67e5e6b2abc5dd71a954da51387922af7182b7d46a33c703e6e7a8 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = a7aa635ea51b0bb20a092bd5573e728c + +Count = 210 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 934f893824e880f743d196b22d1f340a52608155087bd28ac25e5329 +Result = Pass (0) +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 211 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = f43ba9d834ad85dfab3f1c0c27c3441fe4e411a38a261a6559b3b3ee +Result = Fail (2 - CT changed) + +Count = 212 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = c686eac859a7bae3cce97d0b6527a0a7c8c2b24ece35f4370bf6688e +Result = Fail (1 - Adata changed) + +Count = 213 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 2b28355ecf7246ddb08d65c464dcaa90af85f434ff95267280ed869c +Result = Fail (1 - Adata changed) + +Count = 214 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = ecde42091baa1f5c17b79746e21c3de5c78984570748021ccd399507 +Result = Pass (0) +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 215 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = 5c338435ed4f148342604c9aed63e907c100453d719fda2a3da37b66 +Result = Fail (2 - CT changed) + +Count = 216 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 30eac1042015eb82729673edd9939bf9995b2575da4d6c4c7e75dded +Result = Fail (1 - Adata changed) + +Count = 217 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = ebd3ce55b40e4bbd8172033948c6c78049161ee8f949eb50722b9c87 +Result = Fail (2 - CT changed) + +Count = 218 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 20f79b36ca83baac97600fd8a6dad22c2cd0f9b7e770576048c042e5 +Result = Fail (2 - CT changed) + +Count = 219 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = 77b76f249f936fb19bd47fe28ad4dbb7725dec365a1cb23a885ba975 +Result = Fail (1 - Adata changed) + +Count = 220 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = cf6763a23c2eab730845d1eb79bbba9f54ee899fe3d70570aa799e79 +Result = Fail (1 - Adata changed) + +Count = 221 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 1f8086a43c1b2dea557952db88e0dbbdb96aafdb345eddae6c0b0104 +Result = Pass (0) +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 222 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = c0c5f92285b114e0a0777e1bc22b810e7cc4f68c28cd5ce047a28dd8 +Result = Pass (0) +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 223 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 56327f4db9c18f72bbefc3f316d31f9795dd77f493385ab7b7543552 +Result = Pass (0) +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 224 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 37d5b17995fac8c94302ec9ba20a36d97678e85199b677f8ee39867e +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0e + +Count = 225 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 50038b5fdd364ee747b70d00bd36840ece4ea19998123375c0a458bfcafa3b2609afe0f825cbf503 +Result = Pass (0) +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 226 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = 78ed8ff6b5a1255d0fbd0a719a9c27b059ff5f83d0c4962c390042ba8bb5f6798dab01c5afad7306 +Result = Fail (2 - CT changed) + +Count = 227 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 4b91d8e616d3f60452fd3a576bd7c265b7f549523ed4a5d7a3463394cf3c25bef8af8f244d0c0b00 +Result = Fail (1 - Adata changed) + +Count = 228 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = ab8cf8891ab62924c0c6f49dd253cfa0c3d6260d0ee4d9ba88caf8ae59d9d1131626da0dddf8722d +Result = Fail (1 - Adata changed) + +Count = 229 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = c6b7680f321132a8bd00e8e92f785d0b828b100af6392a04d1292373a76970eda77a8194f6276262 +Result = Pass (0) +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 230 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = aea98867d3d707c43a963c1d7fdcfc953cbd707803b2b5f0a97af19d0b7bf7c7ce398cb0b44d73af +Result = Fail (2 - CT changed) + +Count = 231 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = c55e17ba7886eb58126d50bde8c5c211cc1aafd71a3d9e5b343065b4bdd973ee072dbf5160d310f3 +Result = Fail (1 - Adata changed) + +Count = 232 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = 791a62d5fb39ff9735ad94507e1afe2647714d5cc56b6ff4233ec600bca1d31f704807494fb0f18d +Result = Fail (2 - CT changed) + +Count = 233 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = f98a081998e29500f15ebd8978a95423aed4e8e78e0279d17ec183db0e2a33ebb147d0e2363fbb01 +Result = Fail (2 - CT changed) + +Count = 234 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = 7779814dc295a23b4100ca94bec0ad4ce2f6be6fb75a0c217e67ea2577ade5836c26a89760e0959b +Result = Fail (1 - Adata changed) + +Count = 235 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 55640eed12c7595a36ab423da8d8241905b6ff1e906db9624978a7865df8369635269411b3aaeb32 +Result = Fail (1 - Adata changed) + +Count = 236 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 7fcdce0ba567b9a708d54fdb16125de71dce952f4741684f4f9d302e4f1d2a2aedf2768d7b29163f +Result = Pass (0) +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 237 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = d42111ba22987eac1ead5cc6cb8548bcda190d118dcd5461a50036af67fadab163e9daa8bd8e9030 +Result = Pass (0) +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 238 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 1bf0ba0ebb20d8edba59f29a9371750c9c714078f73c335d2f1322ac69b848b001476323aed84c47 +Result = Pass (0) +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 239 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 9d993b945476ace0b9ca932963ac8835e1bd02e8065da2d816786c4d8cf14c03b031ff723311b3c4 +Result = Fail (2 - CT changed) diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.rsp new file mode 100644 index 0000000000..e0978a99ac --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.rsp @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c + +Count = 0 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 9d4b7f3b +Result = Pass +Payload = 00 + +Count = 1 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 80745de9 +Result = Fail + +Count = 2 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = 2f6fa823 +Result = Fail + +Count = 3 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 3cc132c6 +Result = Fail + +Count = 4 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = c79d5557 +Result = Pass +Payload = 00 + +Count = 5 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 41e0eea0 +Result = Fail + +Count = 6 +Nonce = 06d102a9328863 +Adata = 00 +CT = 1f129266 +Result = Fail + +Count = 7 +Nonce = c288b810fb5334 +Adata = 00 +CT = 41b0e4e2 +Result = Fail + +Count = 8 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = 5082e06a +Result = Fail + +Count = 9 +Nonce = 4a5810b121c91b +Adata = 00 +CT = 70587cce +Result = Fail + +Count = 10 +Nonce = 44077341139bf9 +Adata = 00 +CT = 6aaa0acd +Result = Fail + +Count = 11 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 22976e42 +Result = Pass +Payload = 00 + +Count = 12 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = f440ea1d +Result = Pass +Payload = 00 + +Count = 13 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 88903fb9 +Result = Pass +Payload = 00 + +Count = 14 +Nonce = 9dc18698731b27 +Adata = 00 +CT = 3ff345c3 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65 + +Count = 15 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 17223038fa99d53681ca1beabe78d1b4 +Result = Pass +Payload = 00 + +Count = 16 +Nonce = 3796cf51b87266 +Adata = 00 +CT = d0e1eeef4d2a264536bb1c2c1bde7c35 +Result = Fail + +Count = 17 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = 81d587f8673fd514c23172af7fb7523d +Result = Fail + +Count = 18 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 500142447e535207899ab1499994daea +Result = Fail + +Count = 19 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = fdfdbb38bf161785114f9ee2018e892f +Result = Pass +Payload = 00 + +Count = 20 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 38fe9622eaa2a50152cf57e393dd3063 +Result = Fail + +Count = 21 +Nonce = 06d102a9328863 +Adata = 00 +CT = 73af4b87c167572e1400a0ee28209aff +Result = Fail + +Count = 22 +Nonce = c288b810fb5334 +Adata = 00 +CT = ace2248b9f23efa813449c82217e4a4a +Result = Fail + +Count = 23 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = a9bb0e469829d9cf09ad765c5b0b58bf +Result = Fail + +Count = 24 +Nonce = 4a5810b121c91b +Adata = 00 +CT = a5977f0826926ec0d32541b2bd4e2b1e +Result = Fail + +Count = 25 +Nonce = 44077341139bf9 +Adata = 00 +CT = 6938fb5afec1a84e4abb062e1a943c20 +Result = Fail + +Count = 26 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 7e3bbe0eb13988a93972f2fbcd35659e +Result = Pass +Payload = 00 + +Count = 27 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 48d7a15cf4f5808eb45d1ad817470554 +Result = Pass +Payload = 00 + +Count = 28 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 97185ce68af1e6ab718c8c4b83ec04cd +Result = Pass +Payload = 00 + +Count = 29 +Nonce = 9dc18698731b27 +Adata = 00 +CT = a81bc8f5a18293ffe19505a3687ce3f3 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65 + +Count = 30 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = fe69ed84 +Result = Pass +Payload = 00 + +Count = 31 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = db7ffc82 +Result = Fail + +Count = 32 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = 7a677329 +Result = Fail + +Count = 33 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = d903d8f7 +Result = Fail + +Count = 34 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 215e0bf2 +Result = Pass +Payload = 00 + +Count = 35 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 0d38100f +Result = Fail + +Count = 36 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 9f8ab5f7 +Result = Fail + +Count = 37 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 7d811d50 +Result = Fail + +Count = 38 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = c2e18439 +Result = Fail + +Count = 39 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = d8b5817b +Result = Fail + +Count = 40 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = 28cd70ff +Result = Fail + +Count = 41 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 790b2624 +Result = Pass +Payload = 00 + +Count = 42 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 9e46632d +Result = Pass +Payload = 00 + +Count = 43 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 39b82901 +Result = Pass +Payload = 00 + +Count = 44 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = 4c0cf71f +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa + +Count = 45 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 0c66a8e547ed4f8c2c9a9a1eb5d455b9 +Result = Pass +Payload = 00 + +Count = 46 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 38757b3a61a4dc97ca3ab88bf1240695 +Result = Fail + +Count = 47 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = 11875da4445d92391d0fab5f3625497b +Result = Fail + +Count = 48 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = 64477bcd4316e5c5789e1a678fdef943 +Result = Fail + +Count = 49 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 87da5dbc04e39fc468f43675d4e7df33 +Result = Pass +Payload = 00 + +Count = 50 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = bf0d53ee529d8cafc5ad7a8f2d85e7a2 +Result = Fail + +Count = 51 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 676370637ad78c705d43fce066dc909f +Result = Fail + +Count = 52 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 289936db0f9f148a3c9e2d28f7d7de51 +Result = Fail + +Count = 53 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = 58a283641627669d5514f2af559b6c14 +Result = Fail + +Count = 54 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = a6b058540ed905d6e3499a13ea1f3d83 +Result = Fail + +Count = 55 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = 7a19b3377384f09915d0e1ae93a9f16c +Result = Fail + +Count = 56 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = a0d047a1f9940d325e474da54aa13897 +Result = Pass +Payload = 00 + +Count = 57 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 8a4768a2093694b6bcb7083c0bb6331c +Result = Pass +Payload = 00 + +Count = 58 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = a7cafd6f68dc1f15a3603da654ce27bc +Result = Pass +Payload = 00 + +Count = 59 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = c49845f2ea3c9981ad7e9b942f615b8d +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa + +Count = 60 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 411986d04d6463100bff03f7d0bde7ea2c3488784378138cddc93a54 +Result = Pass +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 61 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 32b649ab56162e55d4148a1292d6a225a988eb1308298273b6889036 +Result = Fail + +Count = 62 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = a963c3568ab413b174cd95cc1e3ca61ee181292bebdb28179b4de35f +Result = Fail + +Count = 63 +Nonce = 9cbce402511b89 +Adata = 00 +CT = 0396e6c8db43e5fac205f4c576fd577368adcb688cf3d7e76df9ffc5 +Result = Fail + +Count = 64 +Nonce = 123a0beace4e39 +Adata = 00 +CT = b41bfba94edcafc41b4c144269b9126a6d47b19e83b15772b28c8e38 +Result = Pass +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 65 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = 01e3bb938e16d0284d1d0fee049d80fb97356ae4d84127cf7336a30a +Result = Fail + +Count = 66 +Nonce = 5a7743e59e82da +Adata = 00 +CT = abd7551c5e84e9bef5fbfad3e24d13f02864410eae9177ad0c40cc72 +Result = Fail + +Count = 67 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 3b5ae49e0974f41826152432b46f1a85ab4995afefbbccddfc9fd290 +Result = Fail + +Count = 68 +Nonce = 040a257dede70e +Adata = 00 +CT = 21fb4324de4ba1e2762b3041ce26e43a3d191458a046d489e485910b +Result = Fail + +Count = 69 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = 99ca8f542fd06481e23719214c9892442f393d72899deea08695053f +Result = Fail + +Count = 70 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 5fcc05342cdc27f66b324ae7387205bfb4ab6302bfe0af09050d2054 +Result = Fail + +Count = 71 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 0a7fe63046daf8a979935b897088c64acc1b47a5a9b86fdd6def28ab +Result = Pass +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 72 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = daf7d7dfa512ceb1d7d3435634d9a70b3ef6c6dc38f409e068941fce +Result = Pass +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 73 +Nonce = 098e053fa08043 +Adata = 00 +CT = cdb417dff6502208775f21e35cdb8e3e1199308d1a94229051a1ec4a +Result = Pass +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 74 +Nonce = 4bf48328725514 +Adata = 00 +CT = e75441093c8ccba6eac5913dc246ce96de4784a01051498298eaddaf +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 197afb02ffbd8f699dacae87094d524324576b99844f75e1 + +Count = 75 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = cba4b4aeb85f0492fd8d905c4a6d8233139833373ef188a8c5a5ebecf7ac8607fe412189e83d9d20 +Result = Pass +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 76 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = ca62713728b5c9d652504b0ae8fd4fee5d297ee6a8d19cb6e699f15f14d34dcaf9ba8ed4b877c97d +Result = Fail + +Count = 77 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = 93012c0a5f6f1025b8c4a5d897d3eea0b1c77be8000c9e59f3b8899459788c58794f177cfd838f35 +Result = Fail + +Count = 78 +Nonce = 9cbce402511b89 +Adata = 00 +CT = b8eb95f72f643c2c51ad74775cc203d215c86626e903eb013ad22e8fa4d2f9725ce4f212a8844855 +Result = Fail + +Count = 79 +Nonce = 123a0beace4e39 +Adata = 00 +CT = 71f17cf21c44267c676657db9e55bee33273787474e77b17b5eab45d7d096577643815e6d467312d +Result = Pass +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 80 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = d6737f642260c4ee3b19cb78cc2ef1767213416b82c71e918b1a5ecca7354af824fea617b9b69031 +Result = Fail + +Count = 81 +Nonce = 5a7743e59e82da +Adata = 00 +CT = cbe60d633399daa6ee66418be6d16e292ea47a93c291fce2c54c98f8007ed55a21759f5452559538 +Result = Fail + +Count = 82 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 2a78a7beb8df4bf5d35ff0b2853bc51ce127163d2f56e00ea555aa972e1c2e3f439f85663ae25889 +Result = Fail + +Count = 83 +Nonce = 040a257dede70e +Adata = 00 +CT = ee78ddbea9c3aede9f88af0e82464d9d1afe81de16aa18c49aeb326578fa615e86969348d9bbfb7f +Result = Fail + +Count = 84 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = cdf7cb74d978e7ea738e288ed79edfccf10b553c09d1856e2efbff1da769af3b72099cbda3cbf091 +Result = Fail + +Count = 85 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 90b990a1ea254592f2c226c969b332fc7bfe5f808729c2d83291a566e6641a965ffdabe097050dc5 +Result = Fail + +Count = 86 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 44a6aa954c3508b3c9264c20c272e80c0e95d50ddec2849084b47504dced5b70c302cc93502cc37e +Result = Pass +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 87 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 9d4ff7a44cdb9b14f586efc3d6be02d069b425c06bec4eed37109739a3676f03adfd740dbaa4940d +Result = Pass +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 88 +Nonce = 098e053fa08043 +Adata = 00 +CT = 23da95e102c7921a51b19b5733ea5776ab6c287f6057c00ec4bfacbb2f246b570efd93d98e99be49 +Result = Pass +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 89 +Nonce = 4bf48328725514 +Adata = 00 +CT = 53d00d5839d0a1e695916151f9450b7311982917edcbd7c66496912db41761a1d2aecfda04fb2cfa +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 197afb02ffbd8f699dacae87094d524324576b99844f75e1 + +Count = 90 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 042653c674ef2a90f7fb11d30848e530ae59478f1051633a34fad277 +Result = Pass +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 91 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 1902d9769a7ba3d3268e1257395c8c2e5f98eef295dcbfa5a35df775 +Result = Fail + +Count = 92 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = ebacb8e78c0ad9d3ed99f1821b0b0085beac351f88a79ef71faaf310 +Result = Fail + +Count = 93 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = efc1d5b6f0a48e4ce3e821d743d34206b28c69485c410fa94d5e6103 +Result = Fail + +Count = 94 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 3c1836e5d0f0473dab7bfd7a95ba69575f7f841970ac6c6769ac966a +Result = Pass +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 95 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 2c583e54d75a02948c7f6dcd12cba32a65e8d605fba7ec10c47e9a8e +Result = Fail + +Count = 96 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = a8632dee22f34315b05c40135c6dd471c63b09438da834dc1f3f537f +Result = Fail + +Count = 97 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 0f03ea1b2561951d79062e19a85d98293c8c2846936c724c26421940 +Result = Fail + +Count = 98 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = f9764405e54d827ac433fd624506b92e123463a5b01f21ffa3a22ac7 +Result = Fail + +Count = 99 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = a326e0cf3f97adff3249944880ddfb8d616cd18a086e046289429246 +Result = Fail + +Count = 100 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = f188bc1a72e81b34d75b402e4f8ef3d638d2f56a409eab064c9649b7 +Result = Fail + +Count = 101 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 341df3a273e85cf387ab823bdf9c34a1ae2c86940cb4bfcde2e93f29 +Result = Pass +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 102 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = a0e7997fd67ea66b6274d719b84da92433fdf7d512b160da35c7081d +Result = Pass +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 103 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = dd8fd11e1c0746e7273fdd2e7dfa1ee4fc8ad835ca3141c0f83a9ad7 +Result = Pass +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 104 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 39b0d3603f1289b5885ac244953275d28491952e7e57d93c7ff1eb5d +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 90929a4b0ac65b350ad1591611fe48297e03956f6083e451 + +Count = 105 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = a5b7d8cca2069908d1ed88e6a9fe2c9bede3131dad54671ea7ade30a07d185692ab0ebdf4c78cf7a +Result = Pass +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 106 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 9a98617fb97a0dfe466be692272dcdaec1c5443a3b51312ef042c86363cc05afb98c66e16be8a445 +Result = Fail + +Count = 107 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = d3068ae815c3605d7670058abb9384f4c15b75150eb7910041a8f6ac697430627826bd76b19da027 +Result = Fail + +Count = 108 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = 388a289bb85533b667b141a78d0c79acdeb9fbf72886d5ab980581017fefef92c2b50ae20b93c81c +Result = Fail + +Count = 109 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 71f68480a8801d4966c84807c5ff6139d83ba0a5b902bee3327f5f91763c0a0bec43264c27cd237f +Result = Pass +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 110 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 8627bf1e3edafc69f1328c393dd8e7bd1c182d021e6d3a3652c4b7fd911ca77950ff2d035e47b7ec +Result = Fail + +Count = 111 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = b10ea86a384432a45f50b3c2e482595b46c81c61ca39bc0f4ffcb29bde8b9a81945d671b0f619045 +Result = Fail + +Count = 112 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 3ace8b7e03a0c1fa9e97f46975ab0a4924446e791540e225578cc14aa558e18d5f777ab6e16dcfee +Result = Fail + +Count = 113 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = 8190abe4c21e320e10825e269190bb10a354691958e2436275433c4ae28757c8544c86f1f74ea6a5 +Result = Fail + +Count = 114 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = 1d7e308c34cdca7b7b222f4ebc92afd8055bff542c0b76d3d7752ebe9c5dbf00ee8ad60ac34dd7d0 +Result = Fail + +Count = 115 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 9c2609f7af5b634a16e58f2e9cc7a9ef7812a12d209847000a4432b35d3b884e4169c28d287499ff +Result = Fail + +Count = 116 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 5b0b5e6690d648e1b92c12cfddb431d6d3dfe689d01db8199256ace490c2f0afb93ba32be58fd1de +Result = Pass +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 117 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = 8722fca71fdf750ec5d62fc6d7ba079aef19210da764067aefd8535dd6b7fa701c9ca8c8b635c30b +Result = Pass +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 118 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = 91ac457f5e53492301e72d9d495277ed17edb30e8c7a48d21b5d2cd4d5b6d2ef48413245a6b27b67 +Result = Pass +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 119 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = d2fe5293b7d53ed46ddf02a5618039adbae22845ce72e434fdc83ea4863c3e84a5456f7f853a1ea6 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 90929a4b0ac65b350ad1591611fe48297e03956f6083e451 + +Count = 120 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 1d089a5f +Result = Pass +Payload = 00 + +Count = 121 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = 2f46022a +Result = Fail + +Count = 122 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 67dc4693 +Result = Fail + +Count = 123 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 7027a849 +Result = Fail + +Count = 124 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 5c6a4de2 +Result = Pass +Payload = 00 + +Count = 125 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 1d855f5d +Result = Fail + +Count = 126 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 1b318980 +Result = Fail + +Count = 127 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = cf871f91 +Result = Fail + +Count = 128 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = 4f0e04bc +Result = Fail + +Count = 129 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = fc9013df +Result = Fail + +Count = 130 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = 5134def3 +Result = Fail + +Count = 131 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 5814103a +Result = Pass +Payload = 00 + +Count = 132 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 74c75c4a +Result = Pass +Payload = 00 + +Count = 133 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 9884898b +Result = Pass +Payload = 00 + +Count = 134 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 0b1cbfb1 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2 + +Count = 135 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 5280a2137fee3deefcfe9b63a1199fb3 +Result = Pass +Payload = 00 + +Count = 136 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = d40a7318c5f2d82f838c0beeefe0d598 +Result = Fail + +Count = 137 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 7551978bc9592bf9e294b4984c5862bb +Result = Fail + +Count = 138 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 859cf444f89225b32a55a1645bd24979 +Result = Fail + +Count = 139 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 29e967a0245607c36cf3eaf00fdae566 +Result = Pass +Payload = 00 + +Count = 140 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 9daa0e1c4df5f2bf507b1a57a1135b86 +Result = Fail + +Count = 141 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 18caec79720a5d67d7457e9b7c7a153c +Result = Fail + +Count = 142 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 5f2c455546c56f514a0f69f05345c2c4 +Result = Fail + +Count = 143 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = b7e4846ff30b7c3673a962a2701c0387 +Result = Fail + +Count = 144 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 7b5fa0d42a616ab05ac2c58c904ce92f +Result = Fail + +Count = 145 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = c8c67f558b5844b149dd47824c8cb9d8 +Result = Fail + +Count = 146 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 70a09aaf22ac316124a169f6b0a83ffe +Result = Pass +Payload = 00 + +Count = 147 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 5bc85ed5521a91b9eb42b437950f0e06 +Result = Pass +Payload = 00 + +Count = 148 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 989ec0e7b192ea010dd61d3fb64e8de0 +Result = Pass +Payload = 00 + +Count = 149 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 15c2dbe7fa307654d8ca7c0f8d6d2f14 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2 + +Count = 150 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 5e0eaebd +Result = Pass +Payload = 00 + +Count = 151 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = 71b7fc33 +Result = Fail + +Count = 152 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 93227bd4 +Result = Fail + +Count = 153 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = ced654e2 +Result = Fail + +Count = 154 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = bf7a8e0c +Result = Pass +Payload = 00 + +Count = 155 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 840caa3e +Result = Fail + +Count = 156 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = 1e22fc41 +Result = Fail + +Count = 157 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = 968ccbbf +Result = Fail + +Count = 158 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 0a31cc96 +Result = Fail + +Count = 159 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = a456c3da +Result = Fail + +Count = 160 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = 29746eea +Result = Fail + +Count = 161 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = df7f63ca +Result = Pass +Payload = 00 + +Count = 162 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = bf0b1445 +Result = Pass +Payload = 00 + +Count = 163 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = ae8533f5 +Result = Pass +Payload = 00 + +Count = 164 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 9426cf89 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4 + +Count = 165 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = d07ccf9fdc3d33aa94cda3d230da707c +Result = Pass +Payload = 00 + +Count = 166 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = 65fe32b649dc328c9f531584897e85b3 +Result = Fail + +Count = 167 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = ec31fb6b41c2dae87cf395fc1fe3a080 +Result = Fail + +Count = 168 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = 33c2f2312dd5bfcadbb05f8d0a33fd4a +Result = Fail + +Count = 169 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = a9e81afd1030d195c679e2c837aeb736 +Result = Pass +Payload = 00 + +Count = 170 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 1db000f0e7d3a03718293fc118678427 +Result = Fail + +Count = 171 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = ea37900f049db8fc5cbf46edb5fcac2c +Result = Fail + +Count = 172 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = d1097ebd7ad0a41f61ba32a44dc15305 +Result = Fail + +Count = 173 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 0979729272d8b42f2e3dc0eb181a1217 +Result = Fail + +Count = 174 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = 4457200916a20116b096225606f1a9e2 +Result = Fail + +Count = 175 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = cc6b51f39a3dcfb54abbb89f4df21114 +Result = Fail + +Count = 176 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = aac09cef9697927331251f028d24c31f +Result = Pass +Payload = 00 + +Count = 177 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 56c00070eae0db329894a045d866bbaf +Result = Pass +Payload = 00 + +Count = 178 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = 090016bb96aeaabbf66fd34fc97591a4 +Result = Pass +Payload = 00 + +Count = 179 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 264407dfe796bf7f6eb1f26c1f8504ef +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4 + +Count = 180 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 9f6ca4af9b159148c889a6584d1183ea26e2614874b0504575dea8d1 +Result = Pass +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 181 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 84d8212e9cfc2121252baa3b065b1edcf50497b9594db1ebd7965825 +Result = Fail + +Count = 182 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 5f60a8f867a33b2077ecc69863b295c3c6aeae7d7cade7f8f7f796fe +Result = Fail + +Count = 183 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 1353b3fa1bb1d57ffb139017885c02e26c90231a24b5a615b8f1f2ae +Result = Fail + +Count = 184 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = c3116d9040e1ed4f7c9464d270fb302bd3f1561c25c5b95b8b4b53f6 +Result = Pass +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 185 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 0ca17e8f89bea67db48a8f132ef6c6df7a292914d401299af6bf3800 +Result = Fail + +Count = 186 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 0ce543569e8187f3cec70399ff922e4903cb1d12f990f05613244cf6 +Result = Fail + +Count = 187 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 3acdbc163a350f312791b152a41e57627b1cc8bf3e41c8aea5876de8 +Result = Fail + +Count = 188 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 604518e436edf7a0561d5e284f3915839a6d28cb06ef792a1970ed17 +Result = Fail + +Count = 189 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = fc79b520d67da891e63654d7927db6c8012c96985a0059d5f68d8da4 +Result = Fail + +Count = 190 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = d86bb51a98770098d0feb39170bd979199a8f741041df13790ee4c14 +Result = Fail + +Count = 191 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 51b6b928bdd1cc0bd0a0aed2cda302472d618ffaa60e179029c87855 +Result = Pass +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 192 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = d0abab9b8e9d6c11bb9c15bea8a486704bed32c57297055b4de8ed8d +Result = Pass +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 193 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = 92fd519a966c0fbdd7087ff5a1bd946cd663502db378383531d69947 +Result = Pass +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 194 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 7f239b1916830161f3b52b7ab13542a5a0a97a17f30ca5fa30768d4d +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d + +Count = 195 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 6aab64c4787599d8f213446beadb16e08dba60e97f56dbd14d1d980d6fe0fb44b421992662b97975 +Result = Pass +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 196 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 4980b2ee49b1aaf393175f5ab9bae95ec7904557dfa206603c51d36c826f01384100886198a7f6a3 +Result = Fail + +Count = 197 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 86a02bdd6ae733eee26f8eab898b336105978b5bbd6df781758a111aae4f735b7dd4d9802f2a8406 +Result = Fail + +Count = 198 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 59cfab8956813c48e09332a2bb8a30dbcdf5afb2529532ab8cef14ebc2951069739d5d657d82addb +Result = Fail + +Count = 199 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = 67d989ea935b9ce190e3a7f3b645305e1e308a7fe617f80f170a2b9c309de6c2326115a76efbdf98 +Result = Pass +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 200 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 2522a5e4d157193ef2c264cfe877db8ac75b3cc5aab08a814bcd14af0205af716f2b864f0c397f65 +Result = Fail + +Count = 201 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 4536422bbad220079ee09e700e103efdaac832d016a20813762d5d8adafe75a191310a2618930c48 +Result = Fail + +Count = 202 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = d6711a78adf54f4effe647d531c4618cf32e3037eb700580206f80080dfa3e66e6371c0cde6cd205 +Result = Fail + +Count = 203 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = e44034a397778e1c6babab27f5a50fa4aac0e83d6b3eb25db1b5b2b35c8a8125efccd1f4102f3e82 +Result = Fail + +Count = 204 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = b8e31c5910623e405f2ebf65821963e5b8814043612395feca36f53b01943f03cb8b69b5af53e505 +Result = Fail + +Count = 205 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 4000faf8558f2f4e01e45e90796cd236e5211d1704270f31c3bfc6851049d32105fd16bd45b29f29 +Result = Fail + +Count = 206 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 53bb608f6236798839af35888cb0fa4797b599271084cc13847b022733ca5a5e3c4d472332484b7f +Result = Pass +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 207 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = be54551d1d2f1b3eb60ffe3b165524ff90ca09fb252bf21c1c79edbf38c50e0f240a2d70f65aa79f +Result = Pass +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 208 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = f07c1072d8f8e077dfbb3ad86dd92d32b41f29e647dcd7e3a82cd3ebaf6c2d3e21749bdf570ad28d +Result = Pass +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 209 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 7f7cf7f4d0645934cb0a5e67b4227a909aa55dba09b2c39cef93a8759845326683a0d9c22151f486 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d + +Count = 210 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 16e543d0e20615ff0df15acd9927ddfe40668a54bb854cccc25e9fce +Result = Pass +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 211 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = df35b109caf690656ae278bbd8f8bba687a2ce11b105dae98ecedb3e +Result = Fail + +Count = 212 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 7075da2291e2cb527eb926ed08d8020c5f8f0f2d4a6a4745728da544 +Result = Fail + +Count = 213 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 18a77a66457b53286b1aea0845304cac8e66a02d5c642e4c02a9b9bc +Result = Fail + +Count = 214 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = 24e1d3820101412d8f4d57118cab8f7e489d5cac78802dd5ccf8ecf0 +Result = Pass +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 215 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = b5929bc9648e24a553c5cd953ecb9d67ee508d2d4ac7b46e661181d5 +Result = Fail + +Count = 216 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 54aa018dc7fdf8a54809e1393d18031bab4aa5ca35c201907d74517d +Result = Fail + +Count = 217 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = 69bcc300a459862b3cd284c15dd4af53dc7e95f3067bb8254a8edd83 +Result = Fail + +Count = 218 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 5c2d2df0d8aade3e5ae0f8d8b4b4d7c565817a31b2865dc270ad39a6 +Result = Fail + +Count = 219 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = df1b3f98b6b0060191e7eb817f5908ddc0bc6f83860349e8ae423997 +Result = Fail + +Count = 220 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 16e59dd38395c7be7f580371edabb1e9bf21270de270aa283309108e +Result = Fail + +Count = 221 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 0ef8981dd37c055a3c3e14786fc662b2a11065964911d35ebcc87096 +Result = Pass +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 222 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = fc1870cfc440f74f73f40e682cf4713d027c297b9426c3efe981e935 +Result = Pass +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 223 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 9fc2c462dff1ba9756772d73de5c4e822b5ea0bc88845a323b98de4f +Result = Pass +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 224 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 05fc586d5c780b8e06f618b5bb85f591665a54390eba4e14af3b74e1 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886 + +Count = 225 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = c5b0b2ef17498c5570eb335df4588032958ba3d69bf6f3178464a6f7fa2b76744e8e8d95691cecb8 +Result = Pass +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 226 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = d1f0518929f4ae2f0543de2a7dfe4bb0110bb3057e524a1c06bd6dc2e6bcc3436cffb969ae900388 +Result = Fail + +Count = 227 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 1aa7dfa3a9818142c4971cbf4f64d4cbdbd354c6958ef474bb56d90669c726d866fe2206b8828727 +Result = Fail + +Count = 228 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 90352a5ec92d4fa52a96ae28251a57933728b2a3670e2ecd9953fec4e091b3573214e1ecac1ac00c +Result = Fail + +Count = 229 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = eaa995946ed91d6a08ade14b260ac752cbd1081d5a7cad90783618374f6d03df28ee57a1a5aa38d8 +Result = Pass +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 230 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = 0e320c4ece6ef0305a431a07a5a34d463ec4a37fc513c4b947bb3f30d6e674d10a496806c1c8933e +Result = Fail + +Count = 231 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 10685888091597c50acc54b2fb65150b83a7115351d6f8bd7dd7ee3f75cfb47fa72433644f9cf62e +Result = Fail + +Count = 232 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = e456abf9ee83e0a68fbdb09c4a7afaba0efb0aa6d74a17c443314076072a0ebd253fe1ab4883ebea +Result = Fail + +Count = 233 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 5adadfd296edaf4bea92c8245983dc31b11335f682fb222c16a72444f0949868f0e71907acbb29f4 +Result = Fail + +Count = 234 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = c2bb4d5a830646b3f8bf84044851c3b676c4ec02e43dcbf1ab2025208191d73041c038cf2562bb8c +Result = Fail + +Count = 235 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 9589b8abcb47e54e6e8fad3e64fec7ed4f70ac435bb3e548b7e6d183efa1f51b7ff31eaa52ed59ba +Result = Fail + +Count = 236 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = af63f27e2a9e70f106477493dc141d16a1d059dd7a8a7810d990b642039f24755790332b3cc47c49 +Result = Pass +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 237 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = 1d2ae88c878684a0b404986252b3a7583e1a5a51163ddc606d3968fdceaae5138c411a29d0d333ee +Result = Pass +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 238 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 30c154c616946eccc2e241d336ad33720953e449a0e6b0f0dbf8e9464909bdf337e48093c082a10b +Result = Pass +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 239 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 0c95b692b07b39039b40c80cf52ff71608ae87c973ac9ccb88bba8f204bb98b17cb3c8644e472b1e +Result = Fail diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.txt b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.txt new file mode 100644 index 0000000000..27671e1a0a --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT192.txt @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c + +Count = 0 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 9d4b7f3b +Result = Pass (0) +Payload = 00 + +Count = 1 +Nonce = 3796cf51b87266 +Adata = 00 +CT = 80745de9 +Result = Fail (2 - CT changed) + +Count = 2 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = 2f6fa823 +Result = Fail (1 - Adata changed) + +Count = 3 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 3cc132c6 +Result = Fail (1 - Adata changed) + +Count = 4 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = c79d5557 +Result = Pass (0) +Payload = 00 + +Count = 5 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 41e0eea0 +Result = Fail (2 - CT changed) + +Count = 6 +Nonce = 06d102a9328863 +Adata = 00 +CT = 1f129266 +Result = Fail (1 - Adata changed) + +Count = 7 +Nonce = c288b810fb5334 +Adata = 00 +CT = 41b0e4e2 +Result = Fail (2 - CT changed) + +Count = 8 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = 5082e06a +Result = Fail (2 - CT changed) + +Count = 9 +Nonce = 4a5810b121c91b +Adata = 00 +CT = 70587cce +Result = Fail (1 - Adata changed) + +Count = 10 +Nonce = 44077341139bf9 +Adata = 00 +CT = 6aaa0acd +Result = Fail (1 - Adata changed) + +Count = 11 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 22976e42 +Result = Pass (0) +Payload = 00 + +Count = 12 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = f440ea1d +Result = Pass (0) +Payload = 00 + +Count = 13 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 88903fb9 +Result = Pass (0) +Payload = 00 + +Count = 14 +Nonce = 9dc18698731b27 +Adata = 00 +CT = 3ff345c3 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65 + +Count = 15 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 17223038fa99d53681ca1beabe78d1b4 +Result = Pass (0) +Payload = 00 + +Count = 16 +Nonce = 3796cf51b87266 +Adata = 00 +CT = d0e1eeef4d2a264536bb1c2c1bde7c35 +Result = Fail (2 - CT changed) + +Count = 17 +Nonce = 89ca5a64050f9f +Adata = 00 +CT = 81d587f8673fd514c23172af7fb7523d +Result = Fail (1 - Adata changed) + +Count = 18 +Nonce = ec9d8edff25645 +Adata = 00 +CT = 500142447e535207899ab1499994daea +Result = Fail (1 - Adata changed) + +Count = 19 +Nonce = 05e16f0f42a6f4 +Adata = 00 +CT = fdfdbb38bf161785114f9ee2018e892f +Result = Pass (0) +Payload = 00 + +Count = 20 +Nonce = 2e504b694f8df5 +Adata = 00 +CT = 38fe9622eaa2a50152cf57e393dd3063 +Result = Fail (2 - CT changed) + +Count = 21 +Nonce = 06d102a9328863 +Adata = 00 +CT = 73af4b87c167572e1400a0ee28209aff +Result = Fail (1 - Adata changed) + +Count = 22 +Nonce = c288b810fb5334 +Adata = 00 +CT = ace2248b9f23efa813449c82217e4a4a +Result = Fail (2 - CT changed) + +Count = 23 +Nonce = 08a166d9eb6610 +Adata = 00 +CT = a9bb0e469829d9cf09ad765c5b0b58bf +Result = Fail (2 - CT changed) + +Count = 24 +Nonce = 4a5810b121c91b +Adata = 00 +CT = a5977f0826926ec0d32541b2bd4e2b1e +Result = Fail (1 - Adata changed) + +Count = 25 +Nonce = 44077341139bf9 +Adata = 00 +CT = 6938fb5afec1a84e4abb062e1a943c20 +Result = Fail (1 - Adata changed) + +Count = 26 +Nonce = a9df4f37847e1f +Adata = 00 +CT = 7e3bbe0eb13988a93972f2fbcd35659e +Result = Pass (0) +Payload = 00 + +Count = 27 +Nonce = 11df57fcd131e9 +Adata = 00 +CT = 48d7a15cf4f5808eb45d1ad817470554 +Result = Pass (0) +Payload = 00 + +Count = 28 +Nonce = 890fff56d10dc0 +Adata = 00 +CT = 97185ce68af1e6ab718c8c4b83ec04cd +Result = Pass (0) +Payload = 00 + +Count = 29 +Nonce = 9dc18698731b27 +Adata = 00 +CT = a81bc8f5a18293ffe19505a3687ce3f3 +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65 + +Count = 30 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = fe69ed84 +Result = Pass (0) +Payload = 00 + +Count = 31 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = db7ffc82 +Result = Fail (2 - CT changed) + +Count = 32 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = 7a677329 +Result = Fail (1 - Adata changed) + +Count = 33 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = d903d8f7 +Result = Fail (1 - Adata changed) + +Count = 34 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 215e0bf2 +Result = Pass (0) +Payload = 00 + +Count = 35 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = 0d38100f +Result = Fail (2 - CT changed) + +Count = 36 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 9f8ab5f7 +Result = Fail (1 - Adata changed) + +Count = 37 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 7d811d50 +Result = Fail (2 - CT changed) + +Count = 38 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = c2e18439 +Result = Fail (2 - CT changed) + +Count = 39 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = d8b5817b +Result = Fail (1 - Adata changed) + +Count = 40 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = 28cd70ff +Result = Fail (1 - Adata changed) + +Count = 41 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = 790b2624 +Result = Pass (0) +Payload = 00 + +Count = 42 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 9e46632d +Result = Pass (0) +Payload = 00 + +Count = 43 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = 39b82901 +Result = Pass (0) +Payload = 00 + +Count = 44 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = 4c0cf71f +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa + +Count = 45 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 0c66a8e547ed4f8c2c9a9a1eb5d455b9 +Result = Pass (0) +Payload = 00 + +Count = 46 +Nonce = a16a2e741f1cd9717285b6d882 +Adata = 00 +CT = 38757b3a61a4dc97ca3ab88bf1240695 +Result = Fail (2 - CT changed) + +Count = 47 +Nonce = 368f3b8180fd4b851b7b272cb1 +Adata = 00 +CT = 11875da4445d92391d0fab5f3625497b +Result = Fail (1 - Adata changed) + +Count = 48 +Nonce = 7bb2bc00c0cafce65b5299ae64 +Adata = 00 +CT = 64477bcd4316e5c5789e1a678fdef943 +Result = Fail (1 - Adata changed) + +Count = 49 +Nonce = 935c1ef3d4032ff090f91141f3 +Adata = 00 +CT = 87da5dbc04e39fc468f43675d4e7df33 +Result = Pass (0) +Payload = 00 + +Count = 50 +Nonce = 2640b14f10b116411d1b5c1ad1 +Adata = 00 +CT = bf0d53ee529d8cafc5ad7a8f2d85e7a2 +Result = Fail (2 - CT changed) + +Count = 51 +Nonce = b229c173a13b2d83af91ec45b0 +Adata = 00 +CT = 676370637ad78c705d43fce066dc909f +Result = Fail (1 - Adata changed) + +Count = 52 +Nonce = 37ca0dc2d6efd9efde69f14f03 +Adata = 00 +CT = 289936db0f9f148a3c9e2d28f7d7de51 +Result = Fail (2 - CT changed) + +Count = 53 +Nonce = 6b6238aed86d677ba2b3e2622c +Adata = 00 +CT = 58a283641627669d5514f2af559b6c14 +Result = Fail (2 - CT changed) + +Count = 54 +Nonce = d6cb2ac67bb13b8f6d31fad64a +Adata = 00 +CT = a6b058540ed905d6e3499a13ea1f3d83 +Result = Fail (1 - Adata changed) + +Count = 55 +Nonce = 32a7cd361ef00e65f5778fdfd4 +Adata = 00 +CT = 7a19b3377384f09915d0e1ae93a9f16c +Result = Fail (1 - Adata changed) + +Count = 56 +Nonce = d0a1508fdefcf5be30a459b813 +Adata = 00 +CT = a0d047a1f9940d325e474da54aa13897 +Result = Pass (0) +Payload = 00 + +Count = 57 +Nonce = 5381a61b449dc6a42aa4c79b95 +Adata = 00 +CT = 8a4768a2093694b6bcb7083c0bb6331c +Result = Pass (0) +Payload = 00 + +Count = 58 +Nonce = c55430f2da0687ea40313884ab +Adata = 00 +CT = a7cafd6f68dc1f15a3603da654ce27bc +Result = Pass (0) +Payload = 00 + +Count = 59 +Nonce = ec76d1850acc0979a1f11906fb +Adata = 00 +CT = c49845f2ea3c9981ad7e9b942f615b8d +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa + +Count = 60 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = 411986d04d6463100bff03f7d0bde7ea2c3488784378138cddc93a54 +Result = Pass (0) +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 61 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = 32b649ab56162e55d4148a1292d6a225a988eb1308298273b6889036 +Result = Fail (2 - CT changed) + +Count = 62 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = a963c3568ab413b174cd95cc1e3ca61ee181292bebdb28179b4de35f +Result = Fail (1 - Adata changed) + +Count = 63 +Nonce = 9cbce402511b89 +Adata = 00 +CT = 0396e6c8db43e5fac205f4c576fd577368adcb688cf3d7e76df9ffc5 +Result = Fail (1 - Adata changed) + +Count = 64 +Nonce = 123a0beace4e39 +Adata = 00 +CT = b41bfba94edcafc41b4c144269b9126a6d47b19e83b15772b28c8e38 +Result = Pass (0) +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 65 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = 01e3bb938e16d0284d1d0fee049d80fb97356ae4d84127cf7336a30a +Result = Fail (2 - CT changed) + +Count = 66 +Nonce = 5a7743e59e82da +Adata = 00 +CT = abd7551c5e84e9bef5fbfad3e24d13f02864410eae9177ad0c40cc72 +Result = Fail (1 - Adata changed) + +Count = 67 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 3b5ae49e0974f41826152432b46f1a85ab4995afefbbccddfc9fd290 +Result = Fail (2 - CT changed) + +Count = 68 +Nonce = 040a257dede70e +Adata = 00 +CT = 21fb4324de4ba1e2762b3041ce26e43a3d191458a046d489e485910b +Result = Fail (2 - CT changed) + +Count = 69 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = 99ca8f542fd06481e23719214c9892442f393d72899deea08695053f +Result = Fail (1 - Adata changed) + +Count = 70 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 5fcc05342cdc27f66b324ae7387205bfb4ab6302bfe0af09050d2054 +Result = Fail (1 - Adata changed) + +Count = 71 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 0a7fe63046daf8a979935b897088c64acc1b47a5a9b86fdd6def28ab +Result = Pass (0) +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 72 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = daf7d7dfa512ceb1d7d3435634d9a70b3ef6c6dc38f409e068941fce +Result = Pass (0) +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 73 +Nonce = 098e053fa08043 +Adata = 00 +CT = cdb417dff6502208775f21e35cdb8e3e1199308d1a94229051a1ec4a +Result = Pass (0) +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 74 +Nonce = 4bf48328725514 +Adata = 00 +CT = e75441093c8ccba6eac5913dc246ce96de4784a01051498298eaddaf +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 197afb02ffbd8f699dacae87094d524324576b99844f75e1 + +Count = 75 +Nonce = 5a8aa485c316e9 +Adata = 00 +CT = cba4b4aeb85f0492fd8d905c4a6d8233139833373ef188a8c5a5ebecf7ac8607fe412189e83d9d20 +Result = Pass (0) +Payload = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22 + +Count = 76 +Nonce = 31f8fa25827d48 +Adata = 00 +CT = ca62713728b5c9d652504b0ae8fd4fee5d297ee6a8d19cb6e699f15f14d34dcaf9ba8ed4b877c97d +Result = Fail (2 - CT changed) + +Count = 77 +Nonce = 5340ed7752c9ff +Adata = 00 +CT = 93012c0a5f6f1025b8c4a5d897d3eea0b1c77be8000c9e59f3b8899459788c58794f177cfd838f35 +Result = Fail (1 - Adata changed) + +Count = 78 +Nonce = 9cbce402511b89 +Adata = 00 +CT = b8eb95f72f643c2c51ad74775cc203d215c86626e903eb013ad22e8fa4d2f9725ce4f212a8844855 +Result = Fail (1 - Adata changed) + +Count = 79 +Nonce = 123a0beace4e39 +Adata = 00 +CT = 71f17cf21c44267c676657db9e55bee33273787474e77b17b5eab45d7d096577643815e6d467312d +Result = Pass (0) +Payload = 9d033e3b66efed1467868f382417c80594877a28bc97f406 + +Count = 80 +Nonce = 8ea1594a58fe4a +Adata = 00 +CT = d6737f642260c4ee3b19cb78cc2ef1767213416b82c71e918b1a5ecca7354af824fea617b9b69031 +Result = Fail (2 - CT changed) + +Count = 81 +Nonce = 5a7743e59e82da +Adata = 00 +CT = cbe60d633399daa6ee66418be6d16e292ea47a93c291fce2c54c98f8007ed55a21759f5452559538 +Result = Fail (1 - Adata changed) + +Count = 82 +Nonce = f477f754d7ee76 +Adata = 00 +CT = 2a78a7beb8df4bf5d35ff0b2853bc51ce127163d2f56e00ea555aa972e1c2e3f439f85663ae25889 +Result = Fail (2 - CT changed) + +Count = 83 +Nonce = 040a257dede70e +Adata = 00 +CT = ee78ddbea9c3aede9f88af0e82464d9d1afe81de16aa18c49aeb326578fa615e86969348d9bbfb7f +Result = Fail (2 - CT changed) + +Count = 84 +Nonce = dd51b8e91683d1 +Adata = 00 +CT = cdf7cb74d978e7ea738e288ed79edfccf10b553c09d1856e2efbff1da769af3b72099cbda3cbf091 +Result = Fail (1 - Adata changed) + +Count = 85 +Nonce = ab3cb86cca6fb2 +Adata = 00 +CT = 90b990a1ea254592f2c226c969b332fc7bfe5f808729c2d83291a566e6641a965ffdabe097050dc5 +Result = Fail (1 - Adata changed) + +Count = 86 +Nonce = f67b98efd39b55 +Adata = 00 +CT = 44a6aa954c3508b3c9264c20c272e80c0e95d50ddec2849084b47504dced5b70c302cc93502cc37e +Result = Pass (0) +Payload = f2e944e1ae47ad5873bf391f1b0cc07f6151eb4c50bb45b2 + +Count = 87 +Nonce = e60e2c002d1c99 +Adata = 00 +CT = 9d4ff7a44cdb9b14f586efc3d6be02d069b425c06bec4eed37109739a3676f03adfd740dbaa4940d +Result = Pass (0) +Payload = 70f48dc1d76e5028da07e29852801375a9edb2214a5ea4c0 + +Count = 88 +Nonce = 098e053fa08043 +Adata = 00 +CT = 23da95e102c7921a51b19b5733ea5776ab6c287f6057c00ec4bfacbb2f246b570efd93d98e99be49 +Result = Pass (0) +Payload = bd81680e3dc0b35431c92598dcaa26ef09ca0da5e77193de + +Count = 89 +Nonce = 4bf48328725514 +Adata = 00 +CT = 53d00d5839d0a1e695916151f9450b7311982917edcbd7c66496912db41761a1d2aecfda04fb2cfa +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 197afb02ffbd8f699dacae87094d524324576b99844f75e1 + +Count = 90 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = 042653c674ef2a90f7fb11d30848e530ae59478f1051633a34fad277 +Result = Pass (0) +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 91 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 1902d9769a7ba3d3268e1257395c8c2e5f98eef295dcbfa5a35df775 +Result = Fail (2 - CT changed) + +Count = 92 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = ebacb8e78c0ad9d3ed99f1821b0b0085beac351f88a79ef71faaf310 +Result = Fail (1 - Adata changed) + +Count = 93 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = efc1d5b6f0a48e4ce3e821d743d34206b28c69485c410fa94d5e6103 +Result = Fail (1 - Adata changed) + +Count = 94 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 3c1836e5d0f0473dab7bfd7a95ba69575f7f841970ac6c6769ac966a +Result = Pass (0) +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 95 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 2c583e54d75a02948c7f6dcd12cba32a65e8d605fba7ec10c47e9a8e +Result = Fail (2 - CT changed) + +Count = 96 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = a8632dee22f34315b05c40135c6dd471c63b09438da834dc1f3f537f +Result = Fail (1 - Adata changed) + +Count = 97 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 0f03ea1b2561951d79062e19a85d98293c8c2846936c724c26421940 +Result = Fail (2 - CT changed) + +Count = 98 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = f9764405e54d827ac433fd624506b92e123463a5b01f21ffa3a22ac7 +Result = Fail (2 - CT changed) + +Count = 99 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = a326e0cf3f97adff3249944880ddfb8d616cd18a086e046289429246 +Result = Fail (1 - Adata changed) + +Count = 100 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = f188bc1a72e81b34d75b402e4f8ef3d638d2f56a409eab064c9649b7 +Result = Fail (1 - Adata changed) + +Count = 101 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 341df3a273e85cf387ab823bdf9c34a1ae2c86940cb4bfcde2e93f29 +Result = Pass (0) +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 102 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = a0e7997fd67ea66b6274d719b84da92433fdf7d512b160da35c7081d +Result = Pass (0) +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 103 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = dd8fd11e1c0746e7273fdd2e7dfa1ee4fc8ad835ca3141c0f83a9ad7 +Result = Pass (0) +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 104 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = 39b0d3603f1289b5885ac244953275d28491952e7e57d93c7ff1eb5d +Result = Fail (2 - CT changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 90929a4b0ac65b350ad1591611fe48297e03956f6083e451 + +Count = 105 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = 00 +CT = a5b7d8cca2069908d1ed88e6a9fe2c9bede3131dad54671ea7ade30a07d185692ab0ebdf4c78cf7a +Result = Pass (0) +Payload = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697 + +Count = 106 +Nonce = 49004912fdd7269279b1f06a89 +Adata = 00 +CT = 9a98617fb97a0dfe466be692272dcdaec1c5443a3b51312ef042c86363cc05afb98c66e16be8a445 +Result = Fail (2 - CT changed) + +Count = 107 +Nonce = efeb82c8c68d6600b24dd6d8ee +Adata = 00 +CT = d3068ae815c3605d7670058abb9384f4c15b75150eb7910041a8f6ac697430627826bd76b19da027 +Result = Fail (1 - Adata changed) + +Count = 108 +Nonce = 7b93d368dc551640b00ba3cbb5 +Adata = 00 +CT = 388a289bb85533b667b141a78d0c79acdeb9fbf72886d5ab980581017fefef92c2b50ae20b93c81c +Result = Fail (1 - Adata changed) + +Count = 109 +Nonce = 24b7a65391f88bea38fcd54a9a +Adata = 00 +CT = 71f68480a8801d4966c84807c5ff6139d83ba0a5b902bee3327f5f91763c0a0bec43264c27cd237f +Result = Pass (0) +Payload = 43419715cef9a48dc7280bc035082a6581afd1d82bee9d1a + +Count = 110 +Nonce = 6aa3f731522fce7e366ba59945 +Adata = 00 +CT = 8627bf1e3edafc69f1328c393dd8e7bd1c182d021e6d3a3652c4b7fd911ca77950ff2d035e47b7ec +Result = Fail (2 - CT changed) + +Count = 111 +Nonce = a11cf5bed0041ee3cb1fef4b43 +Adata = 00 +CT = b10ea86a384432a45f50b3c2e482595b46c81c61ca39bc0f4ffcb29bde8b9a81945d671b0f619045 +Result = Fail (1 - Adata changed) + +Count = 112 +Nonce = 273cc5013785baeb5abc79c8bd +Adata = 00 +CT = 3ace8b7e03a0c1fa9e97f46975ab0a4924446e791540e225578cc14aa558e18d5f777ab6e16dcfee +Result = Fail (2 - CT changed) + +Count = 113 +Nonce = d2d4482ea8e98c1cf309671895 +Adata = 00 +CT = 8190abe4c21e320e10825e269190bb10a354691958e2436275433c4ae28757c8544c86f1f74ea6a5 +Result = Fail (2 - CT changed) + +Count = 114 +Nonce = a8849b44adb48d271979656930 +Adata = 00 +CT = 1d7e308c34cdca7b7b222f4ebc92afd8055bff542c0b76d3d7752ebe9c5dbf00ee8ad60ac34dd7d0 +Result = Fail (1 - Adata changed) + +Count = 115 +Nonce = a632ba0d00511122abcd6227ff +Adata = 00 +CT = 9c2609f7af5b634a16e58f2e9cc7a9ef7812a12d209847000a4432b35d3b884e4169c28d287499ff +Result = Fail (1 - Adata changed) + +Count = 116 +Nonce = c47af80cd26d047630c1fdf0d1 +Adata = 00 +CT = 5b0b5e6690d648e1b92c12cfddb431d6d3dfe689d01db8199256ace490c2f0afb93ba32be58fd1de +Result = Pass (0) +Payload = d8306c9c4ea6c69c6e2ad0fc0e49b1e0126b01078d6419ff + +Count = 117 +Nonce = 70e132023acae1f88c7a237b68 +Adata = 00 +CT = 8722fca71fdf750ec5d62fc6d7ba079aef19210da764067aefd8535dd6b7fa701c9ca8c8b635c30b +Result = Pass (0) +Payload = d0b2bef5ed1a87d9c73d4a459cb05c11799c4f51ad640b1e + +Count = 118 +Nonce = 8010d3a2a14f72f5585defc940 +Adata = 00 +CT = 91ac457f5e53492301e72d9d495277ed17edb30e8c7a48d21b5d2cd4d5b6d2ef48413245a6b27b67 +Result = Pass (0) +Payload = 4faba05569bf7ac656780c16995e9122e565fe9984be8a68 + +Count = 119 +Nonce = a98c2f0e0a7b68942853905191 +Adata = 00 +CT = d2fe5293b7d53ed46ddf02a5618039adbae22845ce72e434fdc83ea4863c3e84a5456f7f853a1ea6 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 90929a4b0ac65b350ad1591611fe48297e03956f6083e451 + +Count = 120 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 1d089a5f +Result = Pass (0) +Payload = 00 + +Count = 121 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = 2f46022a +Result = Fail (2 - CT changed) + +Count = 122 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 67dc4693 +Result = Fail (1 - Adata changed) + +Count = 123 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 7027a849 +Result = Fail (1 - Adata changed) + +Count = 124 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 5c6a4de2 +Result = Pass (0) +Payload = 00 + +Count = 125 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 1d855f5d +Result = Fail (2 - CT changed) + +Count = 126 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 1b318980 +Result = Fail (1 - Adata changed) + +Count = 127 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = cf871f91 +Result = Fail (2 - CT changed) + +Count = 128 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = 4f0e04bc +Result = Fail (2 - CT changed) + +Count = 129 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = fc9013df +Result = Fail (1 - Adata changed) + +Count = 130 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = 5134def3 +Result = Fail (1 - Adata changed) + +Count = 131 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 5814103a +Result = Pass (0) +Payload = 00 + +Count = 132 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 74c75c4a +Result = Pass (0) +Payload = 00 + +Count = 133 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 9884898b +Result = Pass (0) +Payload = 00 + +Count = 134 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 0b1cbfb1 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2 + +Count = 135 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 5280a2137fee3deefcfe9b63a1199fb3 +Result = Pass (0) +Payload = 00 + +Count = 136 +Nonce = a265480ca88d5f +Adata = a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe +CT = d40a7318c5f2d82f838c0beeefe0d598 +Result = Fail (2 - CT changed) + +Count = 137 +Nonce = 87ec7423f1ebfc +Adata = 2bed1ec06c1ca149d9ffbaf048c474ea2de000eb7950f18d6c25acf6ab3f19b5 +CT = 7551978bc9592bf9e294b4984c5862bb +Result = Fail (1 - Adata changed) + +Count = 138 +Nonce = b8b04f90616082 +Adata = 4898731e143fcc677c7cf1a8f2b3c4039fb5e57028e33b05e097d1763cbfe4d8 +CT = 859cf444f89225b32a55a1645bd24979 +Result = Fail (1 - Adata changed) + +Count = 139 +Nonce = 8c687b4318813a +Adata = fcad52a88544325bb31eb5de4a41dbff6a96f69d0993b969a01792ee23953acf +CT = 29e967a0245607c36cf3eaf00fdae566 +Result = Pass (0) +Payload = 00 + +Count = 140 +Nonce = 29b810eed8fc92 +Adata = 40d1d320eb63a25d7a2b3141563a552114275ddda56beb62cc0c0273d5795faa +CT = 9daa0e1c4df5f2bf507b1a57a1135b86 +Result = Fail (2 - CT changed) + +Count = 141 +Nonce = 62452462c53934 +Adata = 1eb8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +CT = 18caec79720a5d67d7457e9b7c7a153c +Result = Fail (1 - Adata changed) + +Count = 142 +Nonce = 4cceba0e7aee97 +Adata = f33e184c967165eb62542999afaca4e3e319840e439b5bb509544fb4b6901445 +CT = 5f2c455546c56f514a0f69f05345c2c4 +Result = Fail (2 - CT changed) + +Count = 143 +Nonce = b5151b0601c683 +Adata = 73d27303ec91f28c79b278882034d11eb6a5266746f37edbb77f8409a8738b8c +CT = b7e4846ff30b7c3673a962a2701c0387 +Result = Fail (2 - CT changed) + +Count = 144 +Nonce = 4e5d6d7ac9e71e +Adata = a01b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +CT = 7b5fa0d42a616ab05ac2c58c904ce92f +Result = Fail (1 - Adata changed) + +Count = 145 +Nonce = dc88e989951a3f +Adata = fdcacfaff46585406cc45a2da364e67e132a91c98900a8f9d7bfb14ec951fca5 +CT = c8c67f558b5844b149dd47824c8cb9d8 +Result = Fail (1 - Adata changed) + +Count = 146 +Nonce = a1aeda4b4cb8dd +Adata = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c6f6d03036edea963 +CT = 70a09aaf22ac316124a169f6b0a83ffe +Result = Pass (0) +Payload = 00 + +Count = 147 +Nonce = f248e5225e3d9a +Adata = fdc64ef76a3bfd0a15d0bc8e8bacaf64346796a3e35afcf2ac1ab136f63f7b6e +CT = 5bc85ed5521a91b9eb42b437950f0e06 +Result = Pass (0) +Payload = 00 + +Count = 148 +Nonce = e68228f5c65b73 +Adata = 614efdf89ce2a9fcbd38bdc0b4cece54dfd7532880e0b4ce6eb3a4010b7cb1e7 +CT = 989ec0e7b192ea010dd61d3fb64e8de0 +Result = Pass (0) +Payload = 00 + +Count = 149 +Nonce = ea167cfd1101d9 +Adata = 28130f938c45a1a92b02dbeadbd8df816b6d934e87cca2dfdbfdc49c7cd84041 +CT = 15c2dbe7fa307654d8ca7c0f8d6d2f14 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = 6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2 + +Count = 150 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 5e0eaebd +Result = Pass (0) +Payload = 00 + +Count = 151 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = 71b7fc33 +Result = Fail (2 - CT changed) + +Count = 152 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = 93227bd4 +Result = Fail (1 - Adata changed) + +Count = 153 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = ced654e2 +Result = Fail (1 - Adata changed) + +Count = 154 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = bf7a8e0c +Result = Pass (0) +Payload = 00 + +Count = 155 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 840caa3e +Result = Fail (2 - CT changed) + +Count = 156 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = 1e22fc41 +Result = Fail (1 - Adata changed) + +Count = 157 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = 968ccbbf +Result = Fail (2 - CT changed) + +Count = 158 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 0a31cc96 +Result = Fail (2 - CT changed) + +Count = 159 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = a456c3da +Result = Fail (1 - Adata changed) + +Count = 160 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = 29746eea +Result = Fail (1 - Adata changed) + +Count = 161 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = df7f63ca +Result = Pass (0) +Payload = 00 + +Count = 162 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = bf0b1445 +Result = Pass (0) +Payload = 00 + +Count = 163 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = ae8533f5 +Result = Pass (0) +Payload = 00 + +Count = 164 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 9426cf89 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4 + +Count = 165 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = d07ccf9fdc3d33aa94cda3d230da707c +Result = Pass (0) +Payload = 00 + +Count = 166 +Nonce = 8739b4bea1a099fe547499cbc6 +Adata = f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7 +CT = 65fe32b649dc328c9f531584897e85b3 +Result = Fail (2 - CT changed) + +Count = 167 +Nonce = 0f98fdbde2b04387f27b3401dd +Adata = 02010329660fa716556193eb4870ee84bd934296a5c52d92bba859cc13caaddc +CT = ec31fb6b41c2dae87cf395fc1fe3a080 +Result = Fail (1 - Adata changed) + +Count = 168 +Nonce = 4eed58f381e500902ba5c56864 +Adata = 96056d9ebd7c553c22cc2d9d816b61123750d96c1b08c4b661079424bf3c4946 +CT = 33c2f2312dd5bfcadbb05f8d0a33fd4a +Result = Fail (1 - Adata changed) + +Count = 169 +Nonce = 1e7e51f0fa9a33ed618c26f5e3 +Adata = da9b8ffb0f3c2aee2e386cc9f035ec1eb3e629bd1544c11dc21be4fd8ac9074a +CT = a9e81afd1030d195c679e2c837aeb736 +Result = Pass (0) +Payload = 00 + +Count = 170 +Nonce = f012f94f5988c79aa179d7fdfc +Adata = 612b2ef2683109d99452f95099417641d0c2be3f8ab4cbb2a44e83355ba9303c +CT = 1db000f0e7d3a03718293fc118678427 +Result = Fail (2 - CT changed) + +Count = 171 +Nonce = 715acf92cfb69ad56036c49e70 +Adata = 960667b85be07304634124b9324be12a1c11451f1fa9db82c683265b4cf8e5ff +CT = ea37900f049db8fc5cbf46edb5fcac2c +Result = Fail (1 - Adata changed) + +Count = 172 +Nonce = 141be3601e38185a9fa1596d2e +Adata = 606452c62290b43559a588bb03356f846cecb0ccaf0bdaf67a18abd811d4315a +CT = d1097ebd7ad0a41f61ba32a44dc15305 +Result = Fail (2 - CT changed) + +Count = 173 +Nonce = fcdda3c5f0e80843b03d8788da +Adata = 03f22247a55461a293d253c77483859fdac1b87c2480e208a3df767cfbfde512 +CT = 0979729272d8b42f2e3dc0eb181a1217 +Result = Fail (2 - CT changed) + +Count = 174 +Nonce = ca660ed3b917c0aca140dcd3fb +Adata = 254a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b42574572f51 +CT = 4457200916a20116b096225606f1a9e2 +Result = Fail (1 - Adata changed) + +Count = 175 +Nonce = 642ae3466661ce1f51783deece +Adata = 4432a1cec5976cc13b8fb78341d426c2248f091b597123d263ffafc7f82da5a5 +CT = cc6b51f39a3dcfb54abbb89f4df21114 +Result = Fail (1 - Adata changed) + +Count = 176 +Nonce = 7864c717ec93db38b10679be47 +Adata = 679aad1ad1e57029e3362b325572fc71cac53184b0f1546867e665a4a59466c4 +CT = aac09cef9697927331251f028d24c31f +Result = Pass (0) +Payload = 00 + +Count = 177 +Nonce = c3bf9dfe9d6c26f543188fb457 +Adata = e301f69ad3a7e08a3d02462f0aa584449eb0449b0e3c50aa8dfaa4472816c8b0 +CT = 56c00070eae0db329894a045d866bbaf +Result = Pass (0) +Payload = 00 + +Count = 178 +Nonce = 1527657d2fd98f7deca55cc649 +Adata = f4c723433b7cafe3cda9bb4940a21a89a8382d13018b622ccd1ffb9ffd3211af +CT = 090016bb96aeaabbf66fd34fc97591a4 +Result = Pass (0) +Payload = 00 + +Count = 179 +Nonce = b8432d3d5525a0dadbbaa6b6b8 +Adata = 86ee6e37b4a2d9a0b52ec95643b4e8297e237721e15ce8bf7593a98644f83eba +CT = 264407dfe796bf7f6eb1f26c1f8504ef +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4 + +Count = 180 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 9f6ca4af9b159148c889a6584d1183ea26e2614874b0504575dea8d1 +Result = Pass (0) +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 181 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 84d8212e9cfc2121252baa3b065b1edcf50497b9594db1ebd7965825 +Result = Fail (2 - CT changed) + +Count = 182 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 5f60a8f867a33b2077ecc69863b295c3c6aeae7d7cade7f8f7f796fe +Result = Fail (1 - Adata changed) + +Count = 183 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 1353b3fa1bb1d57ffb139017885c02e26c90231a24b5a615b8f1f2ae +Result = Fail (1 - Adata changed) + +Count = 184 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = c3116d9040e1ed4f7c9464d270fb302bd3f1561c25c5b95b8b4b53f6 +Result = Pass (0) +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 185 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 0ca17e8f89bea67db48a8f132ef6c6df7a292914d401299af6bf3800 +Result = Fail (2 - CT changed) + +Count = 186 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 0ce543569e8187f3cec70399ff922e4903cb1d12f990f05613244cf6 +Result = Fail (1 - Adata changed) + +Count = 187 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = 3acdbc163a350f312791b152a41e57627b1cc8bf3e41c8aea5876de8 +Result = Fail (2 - CT changed) + +Count = 188 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = 604518e436edf7a0561d5e284f3915839a6d28cb06ef792a1970ed17 +Result = Fail (2 - CT changed) + +Count = 189 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = fc79b520d67da891e63654d7927db6c8012c96985a0059d5f68d8da4 +Result = Fail (1 - Adata changed) + +Count = 190 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = d86bb51a98770098d0feb39170bd979199a8f741041df13790ee4c14 +Result = Fail (1 - Adata changed) + +Count = 191 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 51b6b928bdd1cc0bd0a0aed2cda302472d618ffaa60e179029c87855 +Result = Pass (0) +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 192 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = d0abab9b8e9d6c11bb9c15bea8a486704bed32c57297055b4de8ed8d +Result = Pass (0) +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 193 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = 92fd519a966c0fbdd7087ff5a1bd946cd663502db378383531d69947 +Result = Pass (0) +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 194 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 7f239b1916830161f3b52b7ab13542a5a0a97a17f30ca5fa30768d4d +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d + +Count = 195 +Nonce = 5a8aa485c316e9 +Adata = 3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c +CT = 6aab64c4787599d8f213446beadb16e08dba60e97f56dbd14d1d980d6fe0fb44b421992662b97975 +Result = Pass (0) +Payload = a265480ca88d5f536db0dc6abc40faf0d05be7a966977768 + +Count = 196 +Nonce = fdd2d6f503c915 +Adata = 5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e +CT = 4980b2ee49b1aaf393175f5ab9bae95ec7904557dfa206603c51d36c826f01384100886198a7f6a3 +Result = Fail (2 - CT changed) + +Count = 197 +Nonce = 27d73d58100054 +Adata = f6468542923be79b4b06dfe70920d57d1da73a9c16f9c9a12d810d7de0d12467 +CT = 86a02bdd6ae733eee26f8eab898b336105978b5bbd6df781758a111aae4f735b7dd4d9802f2a8406 +Result = Fail (1 - Adata changed) + +Count = 198 +Nonce = dd16e0ce1250e3 +Adata = bc65cfd65e9863c8b7457d58afa6bdb48a84170d8aa97ba5b397b52ad17a9242 +CT = 59cfab8956813c48e09332a2bb8a30dbcdf5afb2529532ab8cef14ebc2951069739d5d657d82addb +Result = Fail (1 - Adata changed) + +Count = 199 +Nonce = ccee19d037cf4a +Adata = c026696e6425e6c33f45b4145febf1137e7ac26383c9f5aa4cd4e5e8abb19e07 +CT = 67d989ea935b9ce190e3a7f3b645305e1e308a7fe617f80f170a2b9c309de6c2326115a76efbdf98 +Result = Pass (0) +Payload = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005 + +Count = 200 +Nonce = 6c8ba94f09cbe6 +Adata = 774ad1a88f8bb063951486d4aec5bf82d5fc535bd0b952f86200c123c37fa496 +CT = 2522a5e4d157193ef2c264cfe877db8ac75b3cc5aab08a814bcd14af0205af716f2b864f0c397f65 +Result = Fail (2 - CT changed) + +Count = 201 +Nonce = 1f670302fcdcc8 +Adata = 1a9ff9698cfc96b581d7115c822e4363d7355ec5daed2eae5bf89ee944ac7d9c +CT = 4536422bbad220079ee09e700e103efdaac832d016a20813762d5d8adafe75a191310a2618930c48 +Result = Fail (1 - Adata changed) + +Count = 202 +Nonce = 5d05f658c729a2 +Adata = dd9564c1431ed490b17ef69f6115805e54ef156ef4e10e58f7d57a7e86626352 +CT = d6711a78adf54f4effe647d531c4618cf32e3037eb700580206f80080dfa3e66e6371c0cde6cd205 +Result = Fail (2 - CT changed) + +Count = 203 +Nonce = 22a77db9fcbc95 +Adata = 86bf1739c10f63df734ee3e60ac40ff5636c49f68ca4c16ece289609eb413e7a +CT = e44034a397778e1c6babab27f5a50fa4aac0e83d6b3eb25db1b5b2b35c8a8125efccd1f4102f3e82 +Result = Fail (2 - CT changed) + +Count = 204 +Nonce = 491e32b0bbfa4c +Adata = 75bef075c79d6cfd7fc73aefd67b2d215be0648937477ba606b1fe1be591239e +CT = b8e31c5910623e405f2ebf65821963e5b8814043612395feca36f53b01943f03cb8b69b5af53e505 +Result = Fail (1 - Adata changed) + +Count = 205 +Nonce = bc4b7d3a380be0 +Adata = 353dbb41e2d525a9f4fcd858d0f0aa1b1e86ac0f936d5c09c6b61c343f94e3fc +CT = 4000faf8558f2f4e01e45e90796cd236e5211d1704270f31c3bfc6851049d32105fd16bd45b29f29 +Result = Fail (1 - Adata changed) + +Count = 206 +Nonce = a840e98df72ae9 +Adata = 22c6607732ef1bdc7fcf6197e037cdadd7ee17c008552dd9f04b8564d34fb17c +CT = 53bb608f6236798839af35888cb0fa4797b599271084cc13847b022733ca5a5e3c4d472332484b7f +Result = Pass (0) +Payload = a2f53385618b41301f4e3ea4c597f411103dac2b37abf5da + +Count = 207 +Nonce = 39d93c3cf31a6f +Adata = 937dfac5cded938438f4e97aabd9beb50dba40f824198260a89729479cfe6869 +CT = be54551d1d2f1b3eb60ffe3b165524ff90ca09fb252bf21c1c79edbf38c50e0f240a2d70f65aa79f +Result = Pass (0) +Payload = c1bdef96dc868446be48491b160504546f2a40dd581f9582 + +Count = 208 +Nonce = 0bbc177019321e +Adata = f6e02678820f5ccbede6cbded02d6dd58d486166d7b18ee975a688af421fb795 +CT = f07c1072d8f8e077dfbb3ad86dd92d32b41f29e647dcd7e3a82cd3ebaf6c2d3e21749bdf570ad28d +Result = Pass (0) +Payload = 72a70954d22ad722fc32756afce67b344b2f3c55fe1d9eed + +Count = 209 +Nonce = ad048eb2ad7526 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +CT = 7f7cf7f4d0645934cb0a5e67b4227a909aa55dba09b2c39cef93a8759845326683a0d9c22151f486 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d + +Count = 210 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = 16e543d0e20615ff0df15acd9927ddfe40668a54bb854cccc25e9fce +Result = Pass (0) +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 211 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = df35b109caf690656ae278bbd8f8bba687a2ce11b105dae98ecedb3e +Result = Fail (2 - CT changed) + +Count = 212 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 7075da2291e2cb527eb926ed08d8020c5f8f0f2d4a6a4745728da544 +Result = Fail (1 - Adata changed) + +Count = 213 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 18a77a66457b53286b1aea0845304cac8e66a02d5c642e4c02a9b9bc +Result = Fail (1 - Adata changed) + +Count = 214 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = 24e1d3820101412d8f4d57118cab8f7e489d5cac78802dd5ccf8ecf0 +Result = Pass (0) +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 215 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = b5929bc9648e24a553c5cd953ecb9d67ee508d2d4ac7b46e661181d5 +Result = Fail (2 - CT changed) + +Count = 216 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 54aa018dc7fdf8a54809e1393d18031bab4aa5ca35c201907d74517d +Result = Fail (1 - Adata changed) + +Count = 217 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = 69bcc300a459862b3cd284c15dd4af53dc7e95f3067bb8254a8edd83 +Result = Fail (2 - CT changed) + +Count = 218 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 5c2d2df0d8aade3e5ae0f8d8b4b4d7c565817a31b2865dc270ad39a6 +Result = Fail (2 - CT changed) + +Count = 219 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = df1b3f98b6b0060191e7eb817f5908ddc0bc6f83860349e8ae423997 +Result = Fail (1 - Adata changed) + +Count = 220 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 16e59dd38395c7be7f580371edabb1e9bf21270de270aa283309108e +Result = Fail (1 - Adata changed) + +Count = 221 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = 0ef8981dd37c055a3c3e14786fc662b2a11065964911d35ebcc87096 +Result = Pass (0) +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 222 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = fc1870cfc440f74f73f40e682cf4713d027c297b9426c3efe981e935 +Result = Pass (0) +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 223 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 9fc2c462dff1ba9756772d73de5c4e822b5ea0bc88845a323b98de4f +Result = Pass (0) +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 224 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 05fc586d5c780b8e06f618b5bb85f591665a54390eba4e14af3b74e1 +Result = Fail (2 - CT changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886 + +Count = 225 +Nonce = 5a8aa485c316e9403aff859fbb +Adata = a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982 +CT = c5b0b2ef17498c5570eb335df4588032958ba3d69bf6f3178464a6f7fa2b76744e8e8d95691cecb8 +Result = Pass (0) +Payload = 8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5 + +Count = 226 +Nonce = 0812757ad0cc4d17c4cfe7a642 +Adata = ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10 +CT = d1f0518929f4ae2f0543de2a7dfe4bb0110bb3057e524a1c06bd6dc2e6bcc3436cffb969ae900388 +Result = Fail (2 - CT changed) + +Count = 227 +Nonce = eff510acc1b85f35029cf7dc00 +Adata = 0923b927b8295c5dfaf67da55e5014293bc8c708fda50af06c1e8aef31cccc86 +CT = 1aa7dfa3a9818142c4971cbf4f64d4cbdbd354c6958ef474bb56d90669c726d866fe2206b8828727 +Result = Fail (1 - Adata changed) + +Count = 228 +Nonce = 3d13d09057190366c63c8750e9 +Adata = 77e27aa9a7bf30e130c862a3296a1cd7a10195ed1d940f2c97bfff47c6f06e32 +CT = 90352a5ec92d4fa52a96ae28251a57933728b2a3670e2ecd9953fec4e091b3573214e1ecac1ac00c +Result = Fail (1 - Adata changed) + +Count = 229 +Nonce = e3c03ef7e1d31961ee0b97bd99 +Adata = 8a3676dd640821b58fb0f0329855fd5882c376ea166b958b7aaad223054e5784 +CT = eaa995946ed91d6a08ade14b260ac752cbd1081d5a7cad90783618374f6d03df28ee57a1a5aa38d8 +Result = Pass (0) +Payload = 92973ce707733a73118c8ce6b5e3fc77a17f448310c0197f + +Count = 230 +Nonce = 5d165ddd4e599387af5967cae6 +Adata = e374f875ce829b62c98fbd67bcf128b5647f25fff9a643300eb95559b889baed +CT = 0e320c4ece6ef0305a431a07a5a34d463ec4a37fc513c4b947bb3f30d6e674d10a496806c1c8933e +Result = Fail (2 - CT changed) + +Count = 231 +Nonce = fcec171162a27a96066181fab2 +Adata = cf431cc3671ec468ea86f6cc09842fcf3a84b3ef0fa1c7b20b232145b4469d62 +CT = 10685888091597c50acc54b2fb65150b83a7115351d6f8bd7dd7ee3f75cfb47fa72433644f9cf62e +Result = Fail (1 - Adata changed) + +Count = 232 +Nonce = 2fa8120398d1a946f391367cf6 +Adata = 92558a239c8e13230754f23aec67b153db29fdfc7daf641778185dd2931d89da +CT = e456abf9ee83e0a68fbdb09c4a7afaba0efb0aa6d74a17c443314076072a0ebd253fe1ab4883ebea +Result = Fail (2 - CT changed) + +Count = 233 +Nonce = 88e0ae338bbca9d4299b294354 +Adata = 5db5c388dbadc9f175a5cd5a1472a458d25acd7fb9c951c0cd45edf64da473bb +CT = 5adadfd296edaf4bea92c8245983dc31b11335f682fb222c16a72444f0949868f0e71907acbb29f4 +Result = Fail (2 - CT changed) + +Count = 234 +Nonce = 4862e36296d6afc9399a95bbb4 +Adata = 36d82ebd0e0f5fe3b12946d041ae5aee16e6d17025406dd776f499bbd8e8b4c8 +CT = c2bb4d5a830646b3f8bf84044851c3b676c4ec02e43dcbf1ab2025208191d73041c038cf2562bb8c +Result = Fail (1 - Adata changed) + +Count = 235 +Nonce = 2f360a4715074e942244ab7f9b +Adata = f0087b0086a081c1071481f033a8be8e940c36763084329bb8461b9102238f4f +CT = 9589b8abcb47e54e6e8fad3e64fec7ed4f70ac435bb3e548b7e6d183efa1f51b7ff31eaa52ed59ba +Result = Fail (1 - Adata changed) + +Count = 236 +Nonce = 93e08854560edb096e5d654086 +Adata = bdc60dff08bfd5d44320b75c61e456fd4333c9c3d0294d4a48d936dfd5922ce2 +CT = af63f27e2a9e70f106477493dc141d16a1d059dd7a8a7810d990b642039f24755790332b3cc47c49 +Result = Pass (0) +Payload = 569e4aec88dd51ca519c0a00c922ee33d3559b98a32d7906 + +Count = 237 +Nonce = e3f37b68ff508cfe295441d9e3 +Adata = b2b6c5782e4f128467c589d2a6cf55ef12877adb771bbb6245c5bba9dcfd6208 +CT = 1d2ae88c878684a0b404986252b3a7583e1a5a51163ddc606d3968fdceaae5138c411a29d0d333ee +Result = Pass (0) +Payload = 02b5511204bd55f7c37973e26f6df5883c0a530f07c7f8c2 + +Count = 238 +Nonce = ea98ec44f5a86715014783172e +Adata = e4692b9f06b666c7451b146c8aeb07a6e30c629d28065c3dde5940325b14b810 +CT = 30c154c616946eccc2e241d336ad33720953e449a0e6b0f0dbf8e9464909bdf337e48093c082a10b +Result = Pass (0) +Payload = 4da40b80579c1d9a5309f7efecb7c059a2f914511ca5fc10 + +Count = 239 +Nonce = 5a16a8902bd70fa06cfe184c57 +Adata = 399d6b0652836457ec4f701f0dc0e5aed73d16585d61cb1bb5b7ee824fc287c8 +CT = 0c95b692b07b39039b40c80cf52ff71608ae87c973ac9ccb88bba8f204bb98b17cb3c8644e472b1e +Result = Fail (2 - CT changed) diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.rsp new file mode 100644 index 0000000000..b8045d8291 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.rsp @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:26 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6 + +Count = 0 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 469c90bb +Result = Pass +Payload = 00 + +Count = 1 +Nonce = d3d5424e20fbec +Adata = 00 +CT = 46a908ed +Result = Fail + +Count = 2 +Nonce = e776620a3bd961 +Adata = 00 +CT = fdd35c4d +Result = Fail + +Count = 3 +Nonce = 6c7a3be9f9ad55 +Adata = 00 +CT = 869ce60e +Result = Fail + +Count = 4 +Nonce = dbb3923156cfd6 +Adata = 00 +CT = 1302d515 +Result = Pass +Payload = 00 + +Count = 5 +Nonce = b390f67eaef8f5 +Adata = 00 +CT = 156416ee +Result = Fail + +Count = 6 +Nonce = a259c114eaac89 +Adata = 00 +CT = 4fe06e92 +Result = Pass +Payload = 00 + +Count = 7 +Nonce = 7fc8804fef18ef +Adata = 00 +CT = 611091aa +Result = Fail + +Count = 8 +Nonce = fbaf4cbc49fa0f +Adata = 00 +CT = 696e9371 +Result = Fail + +Count = 9 +Nonce = 2ed0c8761dbf04 +Adata = 00 +CT = a0e0a2cb +Result = Fail + +Count = 10 +Nonce = 346bb04ea0db86 +Adata = 00 +CT = 43cc0375 +Result = Fail + +Count = 11 +Nonce = e1be89af98ffd7 +Adata = 00 +CT = e5417f6b +Result = Pass +Payload = 00 + +Count = 12 +Nonce = a6a0d57aaaf012 +Adata = 00 +CT = fff8a068 +Result = Fail + +Count = 13 +Nonce = 1aa758eb2f9a28 +Adata = 00 +CT = f8fa8e71 +Result = Pass +Payload = 00 + +Count = 14 +Nonce = 2911167fc98fc3 +Adata = 00 +CT = 0bfa2d9d +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8 + +Count = 15 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 8207eb14d33855a52acceed17dbcbf6e +Result = Pass +Payload = 00 + +Count = 16 +Nonce = d3d5424e20fbec +Adata = 00 +CT = 60f8e127cb4d30db6df0622158cd931d +Result = Fail + +Count = 17 +Nonce = e776620a3bd961 +Adata = 00 +CT = 4239f29871651e9a26b8b06ffc5b3748 +Result = Fail + +Count = 18 +Nonce = 6c7a3be9f9ad55 +Adata = 00 +CT = 5d35364c621fe8959dfe70ab44700fbe +Result = Fail + +Count = 19 +Nonce = dbb3923156cfd6 +Adata = 00 +CT = e4dc5e03aacea691262ee69cee8ffbbe +Result = Pass +Payload = 00 + +Count = 20 +Nonce = b390f67eaef8f5 +Adata = 00 +CT = c8eb7643b4ed3c796c3873e8c6624e0d +Result = Fail + +Count = 21 +Nonce = a259c114eaac89 +Adata = 00 +CT = f79c53fd5e69835b7e70496ea999718b +Result = Pass +Payload = 00 + +Count = 22 +Nonce = 7fc8804fef18ef +Adata = 00 +CT = 687e00723a419fa81c0923b8b8e245ae +Result = Fail + +Count = 23 +Nonce = fbaf4cbc49fa0f +Adata = 00 +CT = 499ab350309ad6091ec4aaf6bf0cbd00 +Result = Fail + +Count = 24 +Nonce = 2ed0c8761dbf04 +Adata = 00 +CT = c27b9f14787dc5375f59d0c561a23446 +Result = Fail + +Count = 25 +Nonce = 346bb04ea0db86 +Adata = 00 +CT = 655c737722c78ac96582a883d407b2bb +Result = Fail + +Count = 26 +Nonce = e1be89af98ffd7 +Adata = 00 +CT = 10d3f6fe08280d45e67e58fe41a7f036 +Result = Pass +Payload = 00 + +Count = 27 +Nonce = a6a0d57aaaf012 +Adata = 00 +CT = b4e425e43edb92c606f7cb2de8a06932 +Result = Fail + +Count = 28 +Nonce = 1aa758eb2f9a28 +Adata = 00 +CT = 2590df2453cb94c304ba0a2bff3f3c71 +Result = Pass +Payload = 00 + +Count = 29 +Nonce = 2911167fc98fc3 +Adata = 00 +CT = 1f344e30dfa95b2319e274caa5780e60 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8 + +Count = 30 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 8a19a133 +Result = Pass +Payload = 00 + +Count = 31 +Nonce = 3c0e2815d37d844f7ac240ba9d +Adata = 00 +CT = 2e317f1b +Result = Fail + +Count = 32 +Nonce = 75549e7e5657e5fe19872fcee0 +Adata = 00 +CT = 979bdcfe +Result = Fail + +Count = 33 +Nonce = d071ff72735820d73485870e83 +Adata = 00 +CT = 8ef89acf +Result = Fail + +Count = 34 +Nonce = 79ac204a26b9fee1132370c20f +Adata = 00 +CT = 154024b2 +Result = Pass +Payload = 00 + +Count = 35 +Nonce = a64bbc3d6d377dab513f7d9ce8 +Adata = 00 +CT = 8dbcc439 +Result = Fail + +Count = 36 +Nonce = 0545fd9ecbc73ccdbbbd4244fd +Adata = 00 +CT = 5c349fb2 +Result = Pass +Payload = 00 + +Count = 37 +Nonce = 182fb47a12becf0bfe65df1287 +Adata = 00 +CT = 79df3e02 +Result = Fail + +Count = 38 +Nonce = f342059a6f9dc14226b40debc4 +Adata = 00 +CT = fbc2c500 +Result = Fail + +Count = 39 +Nonce = 6cbfe6bb4c9b171b93d28e9f8f +Adata = 00 +CT = 2fac1bca +Result = Fail + +Count = 40 +Nonce = 82877df921c6ade43064ad963e +Adata = 00 +CT = 99948f6e +Result = Fail + +Count = 41 +Nonce = 0a37f2e7c66490e97285f1b09e +Adata = 00 +CT = c59bf14c +Result = Pass +Payload = 00 + +Count = 42 +Nonce = d7b9c346ce2f8bad9623122e10 +Adata = 00 +CT = b764c393 +Result = Fail + +Count = 43 +Nonce = c1ad812bf2bbb2cdaee4636ee7 +Adata = 00 +CT = 5b96f41d +Result = Pass +Payload = 00 + +Count = 44 +Nonce = b6ce7d00731184b24428df046b +Adata = 00 +CT = f7e12df1 +Result = Fail + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569 + +Count = 45 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 97e1a8dd4259ccd2e431e057b0397fcf +Result = Pass +Payload = 00 + +Count = 46 +Nonce = 3c0e2815d37d844f7ac240ba9d +Adata = 00 +CT = 5a9596c511ea6a8671adefc4f2157d8b +Result = Fail + +Count = 47 +Nonce = 75549e7e5657e5fe19872fcee0 +Adata = 00 +CT = 66f5c53efbc74fa02dedc303fd95133a +Result = Fail + +Count = 48 +Nonce = d071ff72735820d73485870e83 +Adata = 00 +CT = 2dfd3c852f68eace45acf433a6aa9c05 +Result = Fail + +Count = 49 +Nonce = 79ac204a26b9fee1132370c20f +Adata = 00 +CT = 5c8c9a5b97be8c7bc01ca8d693b809f9 +Result = Pass +Payload = 00 + +Count = 50 +Nonce = a64bbc3d6d377dab513f7d9ce8 +Adata = 00 +CT = ec093121bdcd589285f2262be8db5c4e +Result = Fail + +Count = 51 +Nonce = 0545fd9ecbc73ccdbbbd4244fd +Adata = 00 +CT = 84201662b213c7a1ff0c1b3c25e4ec45 +Result = Pass +Payload = 00 + +Count = 52 +Nonce = 182fb47a12becf0bfe65df1287 +Adata = 00 +CT = bbe746d6d31e8e9745faed4095ab8d5d +Result = Fail + +Count = 53 +Nonce = f342059a6f9dc14226b40debc4 +Adata = 00 +CT = 646c1258dc4aa6fc380818e70e5f4328 +Result = Fail + +Count = 54 +Nonce = 6cbfe6bb4c9b171b93d28e9f8f +Adata = 00 +CT = 15fa37ca7f2883a4642c1ed41b8f6293 +Result = Fail + +Count = 55 +Nonce = 82877df921c6ade43064ad963e +Adata = 00 +CT = c6acf5e5ded4efb2c314370ebb9e9cde +Result = Fail + +Count = 56 +Nonce = 0a37f2e7c66490e97285f1b09e +Adata = 00 +CT = 586e728193ce6db9a926b03b2d77dd6e +Result = Pass +Payload = 00 + +Count = 57 +Nonce = d7b9c346ce2f8bad9623122e10 +Adata = 00 +CT = 642a187e71feff5989e28184aded0199 +Result = Fail + +Count = 58 +Nonce = c1ad812bf2bbb2cdaee4636ee7 +Adata = 00 +CT = 64864d21b6ee3fca13f07fc0486e232d +Result = Pass +Payload = 00 + +Count = 59 +Nonce = b6ce7d00731184b24428df046b +Adata = 00 +CT = 58c63ce68f132d30d177c5834344cc5d +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569 + +Count = 60 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b722aa8d59 +Result = Pass +Payload = d3d5424e20fbec43ae495353ed830271515ab104f8860c98 + +Count = 61 +Nonce = bfcda8b5a2d0d2 +Adata = 00 +CT = c5b7f802bffc498c1626e3774f1d9f94045dfd8e1a10a20277d00a75 +Result = Fail + +Count = 62 +Nonce = 6bae7f35c56b27 +Adata = 00 +CT = bf432e246b7fa4aff8b3ada738432b51f6872ed92284db9d28588021 +Result = Fail + +Count = 63 +Nonce = c5e4214b1bf209 +Adata = 00 +CT = 0d5760ad0e156e401120a1ebd1b139248784c88e10e3425437921120 +Result = Fail + +Count = 64 +Nonce = 9d773a31fe2ec7 +Adata = 00 +CT = 5acfbe5e488976d8b9b77e69a736e8c919053f9415551209dce2d25e +Result = Pass +Payload = 839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0 + +Count = 65 +Nonce = f42cb0cce9efb6 +Adata = 00 +CT = be8be6046ac58411a00c131dd4a72d565f98d87a2c89124b1ef530d0 +Result = Fail + +Count = 66 +Nonce = 24b7a65391f88b +Adata = 00 +CT = f00628e10e8e0115b4a4532a1212a23aade4090832c1972d750125f3 +Result = Pass +Payload = 3bed52236182c19418867d468dbf47c8aac46c02445f99bb + +Count = 67 +Nonce = d2a7eb45780df3 +Adata = 00 +CT = 9078151f674d5f7b56e2451b0316156f776459f17d277e0108aaaf93 +Result = Fail + +Count = 68 +Nonce = 046cbfd26093d8 +Adata = 00 +CT = 921cbecce3b06f3d655a5a0a4d212320d4f147575079fd23bd95e677 +Result = Fail + +Count = 69 +Nonce = 51b13b0b04d077 +Adata = 00 +CT = 8cab1ff22d474e9863c153e84680e2a66981f036051360477e2ebb1d +Result = Fail + +Count = 70 +Nonce = ce2e9967bf9eb7 +Adata = 00 +CT = 15f476b5aefe072548a54f59506d9c3b9ce29025340214be662f8684 +Result = Fail + +Count = 71 +Nonce = b672c91376f533 +Adata = 00 +CT = 758aa03dc72c362c43b5f85bfaa3db4a74860887a8c29e47d5642830 +Result = Pass +Payload = 4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec + +Count = 72 +Nonce = 62f6f1872462d8 +Adata = 00 +CT = ec645769b22161567e6a7e23aa06575bc767a34aa54d3cba01472fe1 +Result = Fail + +Count = 73 +Nonce = a6d01fb88ca547 +Adata = 00 +CT = 615cbeabbe163ba8bc9c073df9ad40833fcf3f424644ccc37aa999d7 +Result = Pass +Payload = a36155de477364236591e453008114075b4872120ef17264 + +Count = 74 +Nonce = 46ad6ebbd8644a +Adata = 00 +CT = 0ed6cc6451de57ca672d56dee45d4548a810d5c49dfe442dd27b7cf2 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453 + +Count = 75 +Nonce = a544218dadd3c1 +Adata = 00 +CT = bc51c3925a960e7732533e4ef3a4f69ee6826de952bcb0fd374f3bb6db8377ebfc79674858c4f305 +Result = Pass +Payload = d3d5424e20fbec43ae495353ed830271515ab104f8860c98 + +Count = 76 +Nonce = bfcda8b5a2d0d2 +Adata = 00 +CT = afa1fa8e8a70e26b02161150556d604101fdf423f332c3363275f2a4907d51b734fe7238cebbd48f +Result = Fail + +Count = 77 +Nonce = 6bae7f35c56b27 +Adata = 00 +CT = 72bc8ef21a847047091b673ccf231d35ecf6f4049741703be672f1f22cbe4a5305f19aaa6967237b +Result = Fail + +Count = 78 +Nonce = c5e4214b1bf209 +Adata = 00 +CT = b719f6555fc4e5424273f5903d5672af460413110278707f400b152113c3976be63dcd9e7a84ddac +Result = Fail + +Count = 79 +Nonce = 9d773a31fe2ec7 +Adata = 00 +CT = 4539bb13382b034ddb16a3329148f9243a4eee998fe444aff2870ce198af11f4fb698a67af6c89ad +Result = Pass +Payload = 839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0 + +Count = 80 +Nonce = f42cb0cce9efb6 +Adata = 00 +CT = 47cbb909cb12fa0a4b0f1aefd54c52d1edd1533290f76b8ccc98b3f5758972bf08ea9e88dc6e54ed +Result = Fail + +Count = 81 +Nonce = 24b7a65391f88b +Adata = 00 +CT = 6d0f928352a17d63aca1899cbd305e1f831f1638d27c1e24432704eff9b6830476db3d30d4c103e4 +Result = Pass +Payload = 3bed52236182c19418867d468dbf47c8aac46c02445f99bb + +Count = 82 +Nonce = d2a7eb45780df3 +Adata = 00 +CT = e0e686d917f78b3b0058fed7b084976244789073a6305ff571256981db86f1e768170a104ebfb81d +Result = Fail + +Count = 83 +Nonce = 046cbfd26093d8 +Adata = 00 +CT = 960c573f5d6934a4cac49d06998f827b3d665cf02c998fe55efbbae6a346863a93d52e0321cef8b2 +Result = Fail + +Count = 84 +Nonce = 51b13b0b04d077 +Adata = 00 +CT = 7cf8f4806848e34aa7d3bd7e2cb9f5d9ff21395ff6d34826ac2fdc3cc683f6120e405f446a10e0f3 +Result = Fail + +Count = 85 +Nonce = ce2e9967bf9eb7 +Adata = 00 +CT = e4f6445ca36e7ee3323f11f6a5ca8ded0c85871e092aa687d254f7765b6155054a5efde28dd38750 +Result = Fail + +Count = 86 +Nonce = b672c91376f533 +Adata = 00 +CT = f23ac1426cb1130c9a0913b347d8efafb6ed125913aa678a9dc42d22a5436bc12eff5505edb25e19 +Result = Pass +Payload = 4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec + +Count = 87 +Nonce = 62f6f1872462d8 +Adata = 00 +CT = ac9f131389181b1023f1ee47633aa433fc5d93a87d9ece962db05feb368ab772d977fd97b35262fa +Result = Fail + +Count = 88 +Nonce = a6d01fb88ca547 +Adata = 00 +CT = 773b8eea2e9830297ac11d3c1f6ea4008c96040e83d76d55789d2043179fdd8fdcbd52313b7b15cb +Result = Pass +Payload = a36155de477364236591e453008114075b4872120ef17264 + +Count = 89 +Nonce = 46ad6ebbd8644a +Adata = 00 +CT = d3fae92043c419fe8ac0d7491ca8041ad089559d895103cf079a2bac0ab4bc249bbdb330181cdd16 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453 + +Count = 90 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 63e00d30e4b08fd2a1cc8d70fab327b2368e77a93be4f4123d14fb3f +Result = Pass +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e + +Count = 91 +Nonce = 894dcaa61008eb8fb052c60d41 +Adata = 00 +CT = bb5425b3869b76856ec58e39886fb6f6f2ac13fe44cb132d8d0c0099 +Result = Fail + +Count = 92 +Nonce = 8feba0d720aa4a5e35abc99e82 +Adata = 00 +CT = 2ca3be419d5be5ed682f8954d2c20efd9e6d360814735daeefd4365c +Result = Fail + +Count = 93 +Nonce = ed04c9ca8702aec8d0a58e09a0 +Adata = 00 +CT = 3d34bda62db39d6118d6fd5cd38f1a3820ca69ce584b94a2a4ccbef1 +Result = Fail + +Count = 94 +Nonce = 1501a243bf60b2cb40d5aa20ca +Adata = 00 +CT = 377b2f1e7bd9e3d1077038e084f61950761361095f7eeebbf1a72afc +Result = Pass +Payload = f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994 + +Count = 95 +Nonce = c6edaf35f0cb433500a8c3a613 +Adata = 00 +CT = 9cef6c889ff51666df9dd1dd2215c15f4b2078a29373c106be4f5f9a +Result = Fail + +Count = 96 +Nonce = d65e0e53f765f9d5e6795c0c5e +Adata = 00 +CT = 6cab3060bf3b33b163b933c2ed0ba51406810b54d0edcf5c9d0ef4f7 +Result = Pass +Payload = 20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb + +Count = 97 +Nonce = 2b0163418a341588db0f5786d8 +Adata = 00 +CT = f9543a659e9a8b7d75dd859df923817452735f5051726422c08a9e85 +Result = Fail + +Count = 98 +Nonce = f16bba081bddda83546eabc9a5 +Adata = 00 +CT = 0d20bf6a9d02da72091d94cdb38743bfea2473d3ab62dcad75dd819a +Result = Fail + +Count = 99 +Nonce = ace99268a32b9c1b5ccd8b0d84 +Adata = 00 +CT = 8bca01e6ebd7ebcdfe52b88e314670ffeb35882fc05394b386e205f9 +Result = Fail + +Count = 100 +Nonce = 24570517bbb0df1b3fbd32f57a +Adata = 00 +CT = 7061c84e2e1d9d58013543ff82666055a1f055c1296c42c8f73a8bf0 +Result = Fail + +Count = 101 +Nonce = a6b2371acf8321864c08ddb4d8 +Adata = 00 +CT = c5aa500d1f7c09a590e9d15d6860c4433684e04dd6bc5c8f94f223f0 +Result = Pass +Payload = 1a43ca628026219c5a430c54021a5a3152ae517167399635 + +Count = 102 +Nonce = f8e2d4e043f5fe7a72b6117811 +Adata = 00 +CT = e3efa7971e27ba1245ee9491ebdbb28ad9b24b325da5760417af8b14 +Result = Fail + +Count = 103 +Nonce = c2b60f14c894ec6178fe79919f +Adata = 00 +CT = 852cca903d7fdf899807bd14642057534c8a0ccacb8c7b8fb4d35d44 +Result = Pass +Payload = 3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36 + +Count = 104 +Nonce = 4de4c909ac0cc5fc608baf45ac +Adata = 00 +CT = e04fd4f5b60833021ed57c98de300bb68d0d892b2bf68e080bc044b1 +Result = Fail + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4 + +Count = 105 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = f0050ad16392021a3f40207bed3521fb1e9f808f49830c423a578d179902f912f9ea1afbce1120b3 +Result = Pass +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e + +Count = 106 +Nonce = 894dcaa61008eb8fb052c60d41 +Adata = 00 +CT = c408190d0fbf5034f83b24a8ed9657331a7ce141de4fae769084607b83bd06e6442eac8dacf583cc +Result = Fail + +Count = 107 +Nonce = 8feba0d720aa4a5e35abc99e82 +Adata = 00 +CT = 52b3d31d02d1b92b38cbae8c510204dde6bf9588e994296c9002a46cfb734290924a15e9c3d99924 +Result = Fail + +Count = 108 +Nonce = ed04c9ca8702aec8d0a58e09a0 +Adata = 00 +CT = f80190470212ce1e64bf4c64ca0133d90469abf87a8233c2b238e316c3f9adccce95e8c8b9c7e8d2 +Result = Fail + +Count = 109 +Nonce = 1501a243bf60b2cb40d5aa20ca +Adata = 00 +CT = 254b847d4175bbb44a82b4e805514fa444c224710933f3ec8aaa3f0133234c0cd91609982adc034b +Result = Pass +Payload = f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994 + +Count = 110 +Nonce = c6edaf35f0cb433500a8c3a613 +Adata = 00 +CT = 7a5c7bc02aa69efc5a159d653f3993399f69e20752c3b00633255731cd88345860da913bc696fdc1 +Result = Fail + +Count = 111 +Nonce = d65e0e53f765f9d5e6795c0c5e +Adata = 00 +CT = c3618c991b15de641d291419ff6957e8b9ae5046dd8c6f08fafb76adf12f36740347e3edae62bca4 +Result = Pass +Payload = 20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb + +Count = 112 +Nonce = 2b0163418a341588db0f5786d8 +Adata = 00 +CT = 240927bfd671a92aef0311395ad55ae42233ecee53873da4066f55f23d4e55bcbbbf2312ea2d8071 +Result = Fail + +Count = 113 +Nonce = f16bba081bddda83546eabc9a5 +Adata = 00 +CT = 4731a7e690c77cd47582ce54a1cec23d94c856b93a9fc767004753689cc84810b8414f1464c0c5b9 +Result = Fail + +Count = 114 +Nonce = ace99268a32b9c1b5ccd8b0d84 +Adata = 00 +CT = f0ea12eaff20c3a50674aa1546aaae3bd5c9249108535b21504da83478ede24026ec91fb12769e4b +Result = Fail + +Count = 115 +Nonce = 24570517bbb0df1b3fbd32f57a +Adata = 00 +CT = 5b164d9752ad6c497a7ab2d0bf8be68fea084ea5839b07b7c9fcf9b9fd5e99767a7b1679b57ea961 +Result = Fail + +Count = 116 +Nonce = a6b2371acf8321864c08ddb4d8 +Adata = 00 +CT = bd37326da18e5ac79a1a9512f724bb539530868576b79c67acb5a51d10a58d6584fbe73f1063c31b +Result = Pass +Payload = 1a43ca628026219c5a430c54021a5a3152ae517167399635 + +Count = 117 +Nonce = f8e2d4e043f5fe7a72b6117811 +Adata = 00 +CT = 0455b4dd1069281e10531c0dc180ced9a5ef5d3fe0007470ce54cd7623a80a176f29a01b3abb642e +Result = Fail + +Count = 118 +Nonce = c2b60f14c894ec6178fe79919f +Adata = 00 +CT = ecd337640022635ce1ed273756d02b7feeb2515614c1fadc95c66d3f411b478853886afd177d88c3 +Result = Pass +Payload = 3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36 + +Count = 119 +Nonce = 4de4c909ac0cc5fc608baf45ac +Adata = 00 +CT = e25d7c9fb388596b13a13b885d5b24e31579a3494ad256da830b2b6317716b3975e2b101aebdd920 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4 + +Count = 120 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 92d00fbe +Result = Pass +Payload = 00 + +Count = 121 +Nonce = 78c46e3249ca28 +Adata = 232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc +CT = 9143e5c4 +Result = Fail + +Count = 122 +Nonce = c18d9e7971e2ae +Adata = 0d40324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +CT = 54337466 +Result = Fail + +Count = 123 +Nonce = 162d061351d82d +Adata = 106d1fb32d948b0d8884f178ad2332a599445fae0f6f71f9ebe53a60b2df9b8e +CT = bf0bf84c +Result = Fail + +Count = 124 +Nonce = 3fcb328bc96404 +Adata = 10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba +CT = 11250056 +Result = Pass +Payload = 00 + +Count = 125 +Nonce = b3fd1eb1422277 +Adata = fa5398cf4cddbe4b45e9f5d7491cd9eefc5e494255961ba3f4b40d22b5f5fe76 +CT = 13de5339 +Result = Fail + +Count = 126 +Nonce = c42ac63de6f12a +Adata = 7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a +CT = 4eed80fd +Result = Pass +Payload = 00 + +Count = 127 +Nonce = d4a7a672237e17 +Adata = d1cdad7fe886d07625a4334be6de4df0645d2a8b4008a8d35f04e6bcf87bfa56 +CT = 4bc2e450 +Result = Fail + +Count = 128 +Nonce = b23255372455c6 +Adata = d2e2c3607c40e0a807b86c6ebbc502ab42bdb7f85ab26299cd963bbba3a3a8fa +CT = b30e6bbd +Result = Fail + +Count = 129 +Nonce = 92272d40475fbb +Adata = 2f3af695ee33a9ebe6a48ed1b00e337261857110bb104191a54fd13bd960d8bc +CT = f7c11fe2 +Result = Fail + +Count = 130 +Nonce = c4a756f6024a9d +Adata = 2317b324b6420ada9ea7bf52b71c5faf2485528da5f56b42c517be6355cdb28b +CT = 76673751 +Result = Fail + +Count = 131 +Nonce = 3a1701b185d33a +Adata = e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2 +CT = 9a5382c3 +Result = Pass +Payload = 00 + +Count = 132 +Nonce = e4db2e80dc3f63 +Adata = 7616bdf5737d01f936072b6576fa76556dfa072f7e2d7de16b9dc96ac8de409c +CT = 9e632f56 +Result = Fail + +Count = 133 +Nonce = 4f490ce07e0150 +Adata = 3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33 +CT = e1842c46 +Result = Pass +Payload = 00 + +Count = 134 +Nonce = b4aaf9ad1bde60 +Adata = 8c96c891456ddec29fe04299506723db2079a6667f96db5d198bf085acf2a4ef +CT = 9f644671 +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088 + +Count = 135 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 93af11a08379eb37a16aa2837f09d69d +Result = Pass +Payload = 00 + +Count = 136 +Nonce = 78c46e3249ca28 +Adata = 232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc +CT = d19b0c14ec686a7961ca7c386d125a65 +Result = Fail + +Count = 137 +Nonce = c18d9e7971e2ae +Adata = 0d40324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +CT = 02ea916d60e2ceec6d9dc9b1185569b3 +Result = Fail + +Count = 138 +Nonce = 162d061351d82d +Adata = 106d1fb32d948b0d8884f178ad2332a599445fae0f6f71f9ebe53a60b2df9b8e +CT = fabd2d0c422b47d363ea9936ff4a311b +Result = Fail + +Count = 139 +Nonce = 3fcb328bc96404 +Adata = 10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba +CT = b3884b69d117146cfa5529901753ddc0 +Result = Pass +Payload = 00 + +Count = 140 +Nonce = b3fd1eb1422277 +Adata = fa5398cf4cddbe4b45e9f5d7491cd9eefc5e494255961ba3f4b40d22b5f5fe76 +CT = 7162026b6306e74fe32ece8433801bc2 +Result = Fail + +Count = 141 +Nonce = c42ac63de6f12a +Adata = 7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a +CT = b53d93cbfd3d5cf3720cef5080bc7224 +Result = Pass +Payload = 00 + +Count = 142 +Nonce = d4a7a672237e17 +Adata = d1cdad7fe886d07625a4334be6de4df0645d2a8b4008a8d35f04e6bcf87bfa56 +CT = c8bbecf69ecf8d10f0863bb4b7cbed51 +Result = Fail + +Count = 143 +Nonce = b23255372455c6 +Adata = d2e2c3607c40e0a807b86c6ebbc502ab42bdb7f85ab26299cd963bbba3a3a8fa +CT = 6037145cc23a175760ae4b573907c80c +Result = Fail + +Count = 144 +Nonce = 92272d40475fbb +Adata = 2f3af695ee33a9ebe6a48ed1b00e337261857110bb104191a54fd13bd960d8bc +CT = df7ea77425d631f652ffe096a8157f71 +Result = Fail + +Count = 145 +Nonce = c4a756f6024a9d +Adata = 2317b324b6420ada9ea7bf52b71c5faf2485528da5f56b42c517be6355cdb28b +CT = 7182b25ef5b113c13fa8f6769e74f1e2 +Result = Fail + +Count = 146 +Nonce = 3a1701b185d33a +Adata = e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2 +CT = 0a5d1bc02c5fe096a8b9d94d1267c49a +Result = Pass +Payload = 00 + +Count = 147 +Nonce = e4db2e80dc3f63 +Adata = 7616bdf5737d01f936072b6576fa76556dfa072f7e2d7de16b9dc96ac8de409c +CT = 9eb6d9757ec7c56cc8c79461e0017486 +Result = Fail + +Count = 148 +Nonce = 4f490ce07e0150 +Adata = 3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33 +CT = 1eda43bf07f2bf003107f3a0ba3a4c18 +Result = Pass +Payload = 00 + +Count = 149 +Nonce = b4aaf9ad1bde60 +Adata = 8c96c891456ddec29fe04299506723db2079a6667f96db5d198bf085acf2a4ef +CT = 5287cc160c5dd3a0f9c1986aac2a621c +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088 + +Count = 150 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 866d4227 +Result = Pass +Payload = 00 + +Count = 151 +Nonce = e8de970f6ee8e80ede933581b5 +Adata = 89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a +CT = 94cb1127 +Result = Fail + +Count = 152 +Nonce = 6de75d3c05e83755083399a5f7 +Adata = 504b08cf34cbe17acf631ef219ae01437ebb6a980ab2f00121bb3073701b6511 +CT = 82c2b67a +Result = Fail + +Count = 153 +Nonce = 58d43b9f1581c590daab1a5c56 +Adata = 749f149ef306c70a5d006d9777adbbf7c0de453898c2978ef7c281535ea9b24c +CT = 8c8283f9 +Result = Fail + +Count = 154 +Nonce = dfdcbdff329f7af70731d8e276 +Adata = 2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3 +CT = c4ac0952 +Result = Pass +Payload = 00 + +Count = 155 +Nonce = 199ec321d1d24d5408076912d6 +Adata = a77526f3614cd974498a76d8b3cb7bacc623fdc9c85503289c462df888b199ed +CT = c59aa931 +Result = Fail + +Count = 156 +Nonce = 60f2490ba0c658848859fcbea8 +Adata = 3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0 +CT = 27c3953d +Result = Pass +Payload = 00 + +Count = 157 +Nonce = 6f29ca274190400720bba27651 +Adata = c0850aaf141bd3f1b24f4d882590f58682b41f874748f29f8925b4914f444842 +CT = cb1ac8eb +Result = Fail + +Count = 158 +Nonce = f1dfb6fdb31cb423226f181c09 +Adata = ac6b08900fc1c9463e7dfdb60eee444c4989d7b200e675f3220ba1e14eed0ab4 +CT = 4dcc55cc +Result = Fail + +Count = 159 +Nonce = 0d45226c98eaa9bb445a3aa4f9 +Adata = b9cb3e1a5bcccb0b0599414c9822275b66fa0f913d51bdb0a2228cbb5aad0e0a +CT = 727d8f5e +Result = Fail + +Count = 160 +Nonce = 39cdbb24bd273a3fe96f42ca9d +Adata = ddfe6c22f4cdc3128050072005f5bd4ecdef1d836e891683f1ba921d33fafba7 +CT = 5aa56a54 +Result = Fail + +Count = 161 +Nonce = db113f38f0504615c5c9347c3d +Adata = 3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b +CT = c38fbdff +Result = Pass +Payload = 00 + +Count = 162 +Nonce = d16a20ef5f6587f1ee3cb7850b +Adata = b1133e1cd369617a9f937e9a1eb86a0979ee30b5b7b0b6ff838d9e11301d6b72 +CT = 6be30c42 +Result = Fail + +Count = 163 +Nonce = d35f531f714694b5e49303a980 +Adata = 55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5 +CT = d34e90bb +Result = Pass +Payload = 00 + +Count = 164 +Nonce = 220624db34a022b758473994a2 +Adata = 5b3b2ae87b0d6759f38a858423227f8687f35478a8f565409b741eadcac4d8c4 +CT = 4a5d14bc +Result = Fail + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a + +Count = 165 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 867b0d87cf6e0f718200a97b4f6d5ad5 +Result = Pass +Payload = 00 + +Count = 166 +Nonce = e8de970f6ee8e80ede933581b5 +Adata = 89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a +CT = 677a040d46ee3f2b7838273bdad14f16 +Result = Fail + +Count = 167 +Nonce = 6de75d3c05e83755083399a5f7 +Adata = 504b08cf34cbe17acf631ef219ae01437ebb6a980ab2f00121bb3073701b6511 +CT = f650d46ade2cbabbc68ead6df1ea0c37 +Result = Fail + +Count = 168 +Nonce = 58d43b9f1581c590daab1a5c56 +Adata = 749f149ef306c70a5d006d9777adbbf7c0de453898c2978ef7c281535ea9b24c +CT = 11b8fe8c139ee38f77fd8fa552cbff67 +Result = Fail + +Count = 169 +Nonce = dfdcbdff329f7af70731d8e276 +Adata = 2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3 +CT = ad879c64425e6c1ec4841bbb0f99aa8b +Result = Pass +Payload = 00 + +Count = 170 +Nonce = 199ec321d1d24d5408076912d6 +Adata = a77526f3614cd974498a76d8b3cb7bacc623fdc9c85503289c462df888b199ed +CT = 3c64f8731930ae000162c10654531066 +Result = Fail + +Count = 171 +Nonce = 60f2490ba0c658848859fcbea8 +Adata = 3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0 +CT = e2751f153fc76c0dec5e0cf2d30c1a28 +Result = Pass +Payload = 00 + +Count = 172 +Nonce = 6f29ca274190400720bba27651 +Adata = c0850aaf141bd3f1b24f4d882590f58682b41f874748f29f8925b4914f444842 +CT = 76127bf891141e73854752ed10c02bd0 +Result = Fail + +Count = 173 +Nonce = f1dfb6fdb31cb423226f181c09 +Adata = ac6b08900fc1c9463e7dfdb60eee444c4989d7b200e675f3220ba1e14eed0ab4 +CT = 4bd833f9da0496e5f6a08a05d02df385 +Result = Fail + +Count = 174 +Nonce = 0d45226c98eaa9bb445a3aa4f9 +Adata = b9cb3e1a5bcccb0b0599414c9822275b66fa0f913d51bdb0a2228cbb5aad0e0a +CT = 05f166328a67a8c58b10a7348f3df612 +Result = Fail + +Count = 175 +Nonce = 39cdbb24bd273a3fe96f42ca9d +Adata = ddfe6c22f4cdc3128050072005f5bd4ecdef1d836e891683f1ba921d33fafba7 +CT = 42499bcd949a5163855a9794f11f917e +Result = Fail + +Count = 176 +Nonce = db113f38f0504615c5c9347c3d +Adata = 3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b +CT = fc85464a81fe372c12c9e4f0f3bf9c37 +Result = Pass +Payload = 00 + +Count = 177 +Nonce = d16a20ef5f6587f1ee3cb7850b +Adata = b1133e1cd369617a9f937e9a1eb86a0979ee30b5b7b0b6ff838d9e11301d6b72 +CT = 8c7501f423647dee77668858c5e350bb +Result = Fail + +Count = 178 +Nonce = d35f531f714694b5e49303a980 +Adata = 55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5 +CT = b1c09b093788da19e33c5a6e82ed9627 +Result = Pass +Payload = 00 + +Count = 179 +Nonce = 220624db34a022b758473994a2 +Adata = 5b3b2ae87b0d6759f38a858423227f8687f35478a8f565409b741eadcac4d8c4 +CT = d2231ee1455b0bc337c4f8173fb8647c +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a + +Count = 180 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = c2fe12658139f5d0dd22cadf2e901695b579302a72fc56083ebc7720 +Result = Pass +Payload = 78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3 + +Count = 181 +Nonce = 6ba004fd176791 +Adata = 5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b +CT = 94748ba81229e53c38583a8564b23ebbafc6f6efdf4c2a81c44db2c9 +Result = Fail + +Count = 182 +Nonce = 45c5c284836414 +Adata = 8f01a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a264c9dcf7d93 +CT = 1d670ccf3e9ba59186c48da2e5bd0ab21973eee2ea2985bf83a09067 +Result = Fail + +Count = 183 +Nonce = c69f7679c80546 +Adata = 5d6c04a5b422b46065a79a889e30ac8d1b53b65d230d4c88190903a24e1fe1ea +CT = 2c8c80ff10fac1bf6c9c83533c1514ee032c0983730b0657392ae25d +Result = Fail + +Count = 184 +Nonce = 57b940550a383b +Adata = 33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f +CT = e1b4ec4279bb62902c12521e6b874171695c5da46c647cc03b91ff03 +Result = Pass +Payload = 6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0 + +Count = 185 +Nonce = 11edd12ea5873d +Adata = e32e5384038379e2b7382ba337b6f7a72a1569e110ee89c4dd6aa6f7e69f5250 +CT = b5dda89fe879d6a665b99285b6d937fd5877ebef4de049fb64b837fb +Result = Fail + +Count = 186 +Nonce = f32222e9eec4bd +Adata = 684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68 +CT = 224db21beb8cd0069007660e783c3f85706b014128368aab2a4e56a7 +Result = Pass +Payload = 2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf + +Count = 187 +Nonce = e0a0a7f262cb51 +Adata = 1d93b2856ad2bf3700440f9a281bd8947ba209e9ffd18e69921ed0678c957c6c +CT = ba1ce3a799e1173178b6788723005566f9269d5828c85d28e960a769 +Result = Fail + +Count = 188 +Nonce = 40316e7b38bdad +Adata = 6e49acd9c26944740c778e74b1dbaa8d640c7e18e949a1661f8a77543db69e1f +CT = 79d59e4bb251988c019c4eaaee2a2513f9cb0521334018fded14a5a5 +Result = Fail + +Count = 189 +Nonce = 33008ef5baf263 +Adata = a726f31d9a22bfc0e7e4c3111b0d304e106ab04ed318f8bfe6ec9cb3a811285b +CT = af4350795f24087aa05070d6d5f55ebb12d7ad3141066866d7d6c61d +Result = Fail + +Count = 190 +Nonce = b48a16fb9a065d +Adata = be05e9c934c1dcba45223d47c6646a2d13c3b93265e354ae4970484b5101d809 +CT = 22d2da531be1f0d1da4bc21f984d29bf56bed2e92da6bf42d0605b84 +Result = Fail + +Count = 191 +Nonce = 14c9bd561c47c1 +Adata = 141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd +CT = 61b46c9024eed3989064a52df90349c18e14e4b552779d3f8f9d6814 +Result = Pass +Payload = c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8 + +Count = 192 +Nonce = 5fb871eac2e52a +Adata = ff23906e9067da8999842318f2a867759ca2d171395c2ff31fa5a4e2ab349c45 +CT = 539799c2b22a33dd648fc4497d12f9455beaf932f1eaaff4d930f5ce +Result = Fail + +Count = 193 +Nonce = 1ccec9923aa6e8 +Adata = 88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795 +CT = 52f8205534447d722be2b9377f7395938cc88af081a11ccb0d83fa19 +Result = Pass +Payload = 518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f + +Count = 194 +Nonce = 68a5351e4422c8 +Adata = 303c767468f48ac9f6e331bbad535b06aa00ab593327320799e17eff63afd3fe +CT = d11c892ae155098f5e4b5fe60c7afd74fb2dbcc4db956556f243e273 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe + +Count = 195 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 3341168eb8c48468c414347fb08f71d2086f7c2d1bd581ce1ac68bd42f5ec7fa7e068cc0ecd79c2a +Result = Pass +Payload = 78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3 + +Count = 196 +Nonce = 6ba004fd176791 +Adata = 5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b +CT = d543acda712b898cbb27b8f598b2e4438ce587a836e2785147c3338a2400809e739b63ba8227d2f9 +Result = Fail + +Count = 197 +Nonce = 45c5c284836414 +Adata = 8f01a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a264c9dcf7d93 +CT = 39a8af5c976b995ea8049e55b68bc65503592ab00915638646288ce9dd1c7088c752e35947fdca98 +Result = Fail + +Count = 198 +Nonce = c69f7679c80546 +Adata = 5d6c04a5b422b46065a79a889e30ac8d1b53b65d230d4c88190903a24e1fe1ea +CT = 950fbf6445f6ffb68178f52f5079d0c6081a48ae1f267a0b7fd89caef9388fbb82361b8d53d9edc6 +Result = Fail + +Count = 199 +Nonce = 57b940550a383b +Adata = 33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f +CT = fbfed2c94f50ca10466da9903ef85833ad48ca00556e66d14d8b30df941f3536ffb42083ef0e1c30 +Result = Pass +Payload = 6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0 + +Count = 200 +Nonce = 11edd12ea5873d +Adata = e32e5384038379e2b7382ba337b6f7a72a1569e110ee89c4dd6aa6f7e69f5250 +CT = 2ebfeb7a843618b37025352df3538526517ed320adfb486c04cf3426e8f975125a7eed00e5f33b6c +Result = Fail + +Count = 201 +Nonce = f32222e9eec4bd +Adata = 684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68 +CT = dae13e6967c8b1ee0dd2d5ba1dd1de69f22c95da39528f9ef78e9e5e9faa058112af57f4ac78db2c +Result = Pass +Payload = 2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf + +Count = 202 +Nonce = e0a0a7f262cb51 +Adata = 1d93b2856ad2bf3700440f9a281bd8947ba209e9ffd18e69921ed0678c957c6c +CT = e683040a0bcf04c1748e7746400d6ef0f7cd8e77a29517790c63959ce534a0f87fb42a9b000dec84 +Result = Fail + +Count = 203 +Nonce = 40316e7b38bdad +Adata = 6e49acd9c26944740c778e74b1dbaa8d640c7e18e949a1661f8a77543db69e1f +CT = 829e50e8c09e727a58287e6eb7d38edeb8ab39db279c06397d1a2111dc21aec79ef73193b306d31f +Result = Fail + +Count = 204 +Nonce = 33008ef5baf263 +Adata = a726f31d9a22bfc0e7e4c3111b0d304e106ab04ed318f8bfe6ec9cb3a811285b +CT = 873c91e76dca0062ae66325aefb84ece3e98928f8dbc5fee7c516d2d1a8318893923f398ca249401 +Result = Fail + +Count = 205 +Nonce = b48a16fb9a065d +Adata = be05e9c934c1dcba45223d47c6646a2d13c3b93265e354ae4970484b5101d809 +CT = 343f6c86f2b852ac388a096faec4472107a924aba56d0cb88055e777bb57eb49497cd2e233ee06fd +Result = Fail + +Count = 206 +Nonce = 14c9bd561c47c1 +Adata = 141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd +CT = a654238fb8b05e293dba07f9d68d75a7f0fbf40fe20edaeba1586bf922412e73ce338e372615c3bc +Result = Pass +Payload = c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8 + +Count = 207 +Nonce = 5fb871eac2e52a +Adata = ff23906e9067da8999842318f2a867759ca2d171395c2ff31fa5a4e2ab349c45 +CT = 4846816923ed9f0254bdd0be01028f75061d3594ad3a45bd03538d108df6ecd6f39acfe076ba5fb8 +Result = Fail + +Count = 208 +Nonce = 1ccec9923aa6e8 +Adata = 88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795 +CT = 765067ef768908d91ee4c3923943e0c7be70e2e06db99a4b3e3f51ee37fdcc5d81dd85d9e9d4f44e +Result = Pass +Payload = 518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f + +Count = 209 +Nonce = 68a5351e4422c8 +Adata = 303c767468f48ac9f6e331bbad535b06aa00ab593327320799e17eff63afd3fe +CT = e58ea6c1522e5a3e93a85edd05ae80d6cf5c4dd6d604a8f8d8a906488f79ad5d2234d72458dcfcd4 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe + +Count = 210 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = c0ea400b599561e7905b99262b4565d5c3dc49fad84d7c69ef891339 +Result = Pass +Payload = e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3 + +Count = 211 +Nonce = 8fa501c5dd9ac9b868144c9fa5 +Adata = 5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800 +CT = 60871e03ea0eb968536c99f926ea24ef43d41272ad9fb7f63d488623 +Result = Fail + +Count = 212 +Nonce = 9bc0d1502a47e46350fe8667ca +Adata = 07203674260208d5bd4d39506836f7e76ffc58e938799f21aff7bb4dea4410d2 +CT = 81d7859dcbe51dcc94fe2591cd3b0540003d49a8c4dccbf4527e5ed0 +Result = Fail + +Count = 213 +Nonce = 611cb4c66e88f6acf96fea1919 +Adata = 327ee3657e49d4d988362fabae303ccea6638e5cb45993d9d56269bc3d3af32b +CT = bef380ad725b65fb5fceeabf09c665bc35089f434ec831494d20d5fa +Result = Fail + +Count = 214 +Nonce = 0dd613c0fe28e913c0edbb8404 +Adata = 2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141 +CT = fabe11c9629e598228f5209f3dbcc641fe4b1a22cadb0821d2898c3b +Result = Pass +Payload = 9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998 + +Count = 215 +Nonce = 68806dfe720d0a9a84697de5f2 +Adata = c6b0e4dfd723d7637510f887b7852f60ecdf72e0d33396560fed6534d5b7f015 +CT = b7eb87f84951640de731d4093f1a4ed5f831138a27465d3941e92090 +Result = Fail + +Count = 216 +Nonce = 3e0fe3427eeda80f02dda4fed5 +Adata = ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33 +CT = d88f8fcd772125212ce09c2a6e5b5693dd35073f992004f0d18fc889 +Result = Pass +Payload = 38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc + +Count = 217 +Nonce = 7c0c76d9f9316ff6c98758b464 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +CT = d2d7d52b11304fc1d15b8c20e296ba7c63d99f4ce86cc8ae0f39ecea +Result = Fail + +Count = 218 +Nonce = 07c728135bdfede0e0c8036b17 +Adata = 25a152850b4b80b19d8f0b504b2a8a241824b3a1fca8d85c8713b2c0c84b5e02 +CT = ae1d9f82efb464d5dc2018cffa309634c09b34d1122c4bd994b1d516 +Result = Fail + +Count = 219 +Nonce = 710c96d7a6f09de83f0507f28a +Adata = 2d64acfdbfc582cd9a933790eb1b739fb02e53f511255e49f421bb7acc98a130 +CT = 477c985d92ad1b69d22315235a29e3d3a5991487cbdc8d11d394d047 +Result = Fail + +Count = 220 +Nonce = 977bbcdeb6a7d9dcf8664bc2d8 +Adata = 135786125258a49475338ac1961d2718433b9e84cf64f63ca52913e8dd12e505 +CT = d1c085c75d808dc6db493b8a0b4d884e0700d2844a1b4b46bd3d22eb +Result = Fail + +Count = 221 +Nonce = 60122cbd219e5cf17415e8bc09 +Adata = 895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216 +CT = 76bdd9a7b34bf14ae121a87fdfa144f71b848744af6a2f0b1c0d067c +Result = Pass +Payload = 794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9 + +Count = 222 +Nonce = 83a07f2e685959cb50a1bd2bce +Adata = 02afe300ec0cf0acb59108b2f70e069300294e34f40bb032cb59907599664408 +CT = 413e2e8df9d65b4e5d3b63a738258aaee643f364be9a01b974192744 +Result = Fail + +Count = 223 +Nonce = 3542fbe0f59a6d5f3abf619b7d +Adata = dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8 +CT = 617d8036e2039d516709062379e0550cbd71ebb90fea967c79018ad5 +Result = Pass +Payload = c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed + +Count = 224 +Nonce = 48f2d4c0b17072e0a9c300d90b +Adata = c56175e2cfe0d37454d989afcc36686fb34c015439601567506a4d0003182be7 +CT = 40e609c739e409750a6c41d9c6ea64ce36f70711b4ca3e365c916f91 +Result = Fail + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e + +Count = 225 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 8d34cdca37ce77be68f65baf3382e31efa693e63f914a781367f30f2eaad8c063ca50795acd90203 +Result = Pass +Payload = e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3 + +Count = 226 +Nonce = 8fa501c5dd9ac9b868144c9fa5 +Adata = 5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800 +CT = 516c0095cc3d85fd55e48da17c592e0c7014b9daafb82bdc4b41096dfdbe9cc1ab610f8f3e038d16 +Result = Fail + +Count = 227 +Nonce = 9bc0d1502a47e46350fe8667ca +Adata = 07203674260208d5bd4d39506836f7e76ffc58e938799f21aff7bb4dea4410d2 +CT = 0293eae9f8d8bd7ad45357f733fc7b5d990d894783e18501d81ec96df41b8fa8262ed2db880b5e85 +Result = Fail + +Count = 228 +Nonce = 611cb4c66e88f6acf96fea1919 +Adata = 327ee3657e49d4d988362fabae303ccea6638e5cb45993d9d56269bc3d3af32b +CT = 256bad8295e67d8d450f5ecc8276920ec23b1156c57be7c96ee80f60f72db2cbf25b2f8c6af8749c +Result = Fail + +Count = 229 +Nonce = 0dd613c0fe28e913c0edbb8404 +Adata = 2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141 +CT = 6df09613ea986c2d91a57a45a0942cbf20e0dfca12fbda8c945ee6db24aea5f5098952f1203339ce +Result = Pass +Payload = 9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998 + +Count = 230 +Nonce = 68806dfe720d0a9a84697de5f2 +Adata = c6b0e4dfd723d7637510f887b7852f60ecdf72e0d33396560fed6534d5b7f015 +CT = c5b64577d3c34e50f7da5072db5bda1d1d2c6db1a4f1183e2cc4c90ac3f798957cb09a05868a8ad5 +Result = Fail + +Count = 231 +Nonce = 3e0fe3427eeda80f02dda4fed5 +Adata = ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33 +CT = 2bfe51f1f43b982d47f76ea8206ddbf585d6f30cec0d4ef16b1556631d3b52bf24154afec1448ef6 +Result = Pass +Payload = 38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc + +Count = 232 +Nonce = 7c0c76d9f9316ff6c98758b464 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +CT = 1622ae109073f44a4596722d9943fea774dfc2a1f939fc0914f42ec81e3af71c9a5de7e0ac16ca69 +Result = Fail + +Count = 233 +Nonce = 07c728135bdfede0e0c8036b17 +Adata = 25a152850b4b80b19d8f0b504b2a8a241824b3a1fca8d85c8713b2c0c84b5e02 +CT = 4c0b361a766d366d983c41e793d75635e17f6eab2eadcf9743d67d90850c4c76a43df1f95170b29b +Result = Fail + +Count = 234 +Nonce = 710c96d7a6f09de83f0507f28a +Adata = 2d64acfdbfc582cd9a933790eb1b739fb02e53f511255e49f421bb7acc98a130 +CT = 5b02347f30213df7f1506d7dca41b838c92aea0f190c5dba7bd5d5c8c098299394333b34fae9a110 +Result = Fail + +Count = 235 +Nonce = 977bbcdeb6a7d9dcf8664bc2d8 +Adata = 135786125258a49475338ac1961d2718433b9e84cf64f63ca52913e8dd12e505 +CT = c77283ca15484d82469ce7249d1fb8e5f4c3bc8245fb4d97e26149d4a9711be81b4f69aa9fabd7f6 +Result = Fail + +Count = 236 +Nonce = 60122cbd219e5cf17415e8bc09 +Adata = 895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216 +CT = bf0d219bb50fcc1d51f654bb0fd8b44efa25aef39e2f11afe47d00f2eebb544e6ba7559ac2f34edb +Result = Pass +Payload = 794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9 + +Count = 237 +Nonce = 83a07f2e685959cb50a1bd2bce +Adata = 02afe300ec0cf0acb59108b2f70e069300294e34f40bb032cb59907599664408 +CT = 1609f8de59da4f50ce034977d132d4f9881a9b85ffa5bb886fa3fddc87690a359fe55f8fa12ba749 +Result = Fail + +Count = 238 +Nonce = 3542fbe0f59a6d5f3abf619b7d +Adata = dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8 +CT = 39c2e8f6edfe663b90963b98eb79e2d4f7f28a5053ae8881567a6b4426f1667136bed4a5e32a2bc1 +Result = Pass +Payload = c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed + +Count = 239 +Nonce = 48f2d4c0b17072e0a9c300d90b +Adata = c56175e2cfe0d37454d989afcc36686fb34c015439601567506a4d0003182be7 +CT = 27c575be0b99af9b106f53f471c31cac4d54ea0bcb602a33fb67bb6092cd579f722ae9b680da083d +Result = Fail diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.txt b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.txt new file mode 100644 index 0000000000..6d9a3eadcb --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/DVPT256.txt @@ -0,0 +1,1589 @@ +# CAVS 11.0 +# "CCM-DVPT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:26 2011 + + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 4] + +Key = eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6 + +Count = 0 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 469c90bb +Result = Pass (0) +Payload = 00 + +Count = 1 +Nonce = d3d5424e20fbec +Adata = 00 +CT = 46a908ed +Result = Fail (2 - CT changed) + +Count = 2 +Nonce = e776620a3bd961 +Adata = 00 +CT = fdd35c4d +Result = Fail (1 - Adata changed) + +Count = 3 +Nonce = 6c7a3be9f9ad55 +Adata = 00 +CT = 869ce60e +Result = Fail (1 - Adata changed) + +Count = 4 +Nonce = dbb3923156cfd6 +Adata = 00 +CT = 1302d515 +Result = Pass (0) +Payload = 00 + +Count = 5 +Nonce = b390f67eaef8f5 +Adata = 00 +CT = 156416ee +Result = Fail (2 - CT changed) + +Count = 6 +Nonce = a259c114eaac89 +Adata = 00 +CT = 4fe06e92 +Result = Pass (0) +Payload = 00 + +Count = 7 +Nonce = 7fc8804fef18ef +Adata = 00 +CT = 611091aa +Result = Fail (2 - CT changed) + +Count = 8 +Nonce = fbaf4cbc49fa0f +Adata = 00 +CT = 696e9371 +Result = Fail (2 - CT changed) + +Count = 9 +Nonce = 2ed0c8761dbf04 +Adata = 00 +CT = a0e0a2cb +Result = Fail (2 - CT changed) + +Count = 10 +Nonce = 346bb04ea0db86 +Adata = 00 +CT = 43cc0375 +Result = Fail (1 - Adata changed) + +Count = 11 +Nonce = e1be89af98ffd7 +Adata = 00 +CT = e5417f6b +Result = Pass (0) +Payload = 00 + +Count = 12 +Nonce = a6a0d57aaaf012 +Adata = 00 +CT = fff8a068 +Result = Fail (1 - Adata changed) + +Count = 13 +Nonce = 1aa758eb2f9a28 +Adata = 00 +CT = f8fa8e71 +Result = Pass (0) +Payload = 00 + +Count = 14 +Nonce = 2911167fc98fc3 +Adata = 00 +CT = 0bfa2d9d +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 0, Nlen = 7, Tlen = 16] + +Key = e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8 + +Count = 15 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 8207eb14d33855a52acceed17dbcbf6e +Result = Pass (0) +Payload = 00 + +Count = 16 +Nonce = d3d5424e20fbec +Adata = 00 +CT = 60f8e127cb4d30db6df0622158cd931d +Result = Fail (2 - CT changed) + +Count = 17 +Nonce = e776620a3bd961 +Adata = 00 +CT = 4239f29871651e9a26b8b06ffc5b3748 +Result = Fail (1 - Adata changed) + +Count = 18 +Nonce = 6c7a3be9f9ad55 +Adata = 00 +CT = 5d35364c621fe8959dfe70ab44700fbe +Result = Fail (1 - Adata changed) + +Count = 19 +Nonce = dbb3923156cfd6 +Adata = 00 +CT = e4dc5e03aacea691262ee69cee8ffbbe +Result = Pass (0) +Payload = 00 + +Count = 20 +Nonce = b390f67eaef8f5 +Adata = 00 +CT = c8eb7643b4ed3c796c3873e8c6624e0d +Result = Fail (2 - CT changed) + +Count = 21 +Nonce = a259c114eaac89 +Adata = 00 +CT = f79c53fd5e69835b7e70496ea999718b +Result = Pass (0) +Payload = 00 + +Count = 22 +Nonce = 7fc8804fef18ef +Adata = 00 +CT = 687e00723a419fa81c0923b8b8e245ae +Result = Fail (2 - CT changed) + +Count = 23 +Nonce = fbaf4cbc49fa0f +Adata = 00 +CT = 499ab350309ad6091ec4aaf6bf0cbd00 +Result = Fail (2 - CT changed) + +Count = 24 +Nonce = 2ed0c8761dbf04 +Adata = 00 +CT = c27b9f14787dc5375f59d0c561a23446 +Result = Fail (2 - CT changed) + +Count = 25 +Nonce = 346bb04ea0db86 +Adata = 00 +CT = 655c737722c78ac96582a883d407b2bb +Result = Fail (1 - Adata changed) + +Count = 26 +Nonce = e1be89af98ffd7 +Adata = 00 +CT = 10d3f6fe08280d45e67e58fe41a7f036 +Result = Pass (0) +Payload = 00 + +Count = 27 +Nonce = a6a0d57aaaf012 +Adata = 00 +CT = b4e425e43edb92c606f7cb2de8a06932 +Result = Fail (1 - Adata changed) + +Count = 28 +Nonce = 1aa758eb2f9a28 +Adata = 00 +CT = 2590df2453cb94c304ba0a2bff3f3c71 +Result = Pass (0) +Payload = 00 + +Count = 29 +Nonce = 2911167fc98fc3 +Adata = 00 +CT = 1f344e30dfa95b2319e274caa5780e60 +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 4] + +Key = e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8 + +Count = 30 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 8a19a133 +Result = Pass (0) +Payload = 00 + +Count = 31 +Nonce = 3c0e2815d37d844f7ac240ba9d +Adata = 00 +CT = 2e317f1b +Result = Fail (2 - CT changed) + +Count = 32 +Nonce = 75549e7e5657e5fe19872fcee0 +Adata = 00 +CT = 979bdcfe +Result = Fail (1 - Adata changed) + +Count = 33 +Nonce = d071ff72735820d73485870e83 +Adata = 00 +CT = 8ef89acf +Result = Fail (1 - Adata changed) + +Count = 34 +Nonce = 79ac204a26b9fee1132370c20f +Adata = 00 +CT = 154024b2 +Result = Pass (0) +Payload = 00 + +Count = 35 +Nonce = a64bbc3d6d377dab513f7d9ce8 +Adata = 00 +CT = 8dbcc439 +Result = Fail (2 - CT changed) + +Count = 36 +Nonce = 0545fd9ecbc73ccdbbbd4244fd +Adata = 00 +CT = 5c349fb2 +Result = Pass (0) +Payload = 00 + +Count = 37 +Nonce = 182fb47a12becf0bfe65df1287 +Adata = 00 +CT = 79df3e02 +Result = Fail (2 - CT changed) + +Count = 38 +Nonce = f342059a6f9dc14226b40debc4 +Adata = 00 +CT = fbc2c500 +Result = Fail (2 - CT changed) + +Count = 39 +Nonce = 6cbfe6bb4c9b171b93d28e9f8f +Adata = 00 +CT = 2fac1bca +Result = Fail (2 - CT changed) + +Count = 40 +Nonce = 82877df921c6ade43064ad963e +Adata = 00 +CT = 99948f6e +Result = Fail (1 - Adata changed) + +Count = 41 +Nonce = 0a37f2e7c66490e97285f1b09e +Adata = 00 +CT = c59bf14c +Result = Pass (0) +Payload = 00 + +Count = 42 +Nonce = d7b9c346ce2f8bad9623122e10 +Adata = 00 +CT = b764c393 +Result = Fail (1 - Adata changed) + +Count = 43 +Nonce = c1ad812bf2bbb2cdaee4636ee7 +Adata = 00 +CT = 5b96f41d +Result = Pass (0) +Payload = 00 + +Count = 44 +Nonce = b6ce7d00731184b24428df046b +Adata = 00 +CT = f7e12df1 +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 0, Nlen = 13, Tlen = 16] + +Key = af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569 + +Count = 45 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 97e1a8dd4259ccd2e431e057b0397fcf +Result = Pass (0) +Payload = 00 + +Count = 46 +Nonce = 3c0e2815d37d844f7ac240ba9d +Adata = 00 +CT = 5a9596c511ea6a8671adefc4f2157d8b +Result = Fail (2 - CT changed) + +Count = 47 +Nonce = 75549e7e5657e5fe19872fcee0 +Adata = 00 +CT = 66f5c53efbc74fa02dedc303fd95133a +Result = Fail (1 - Adata changed) + +Count = 48 +Nonce = d071ff72735820d73485870e83 +Adata = 00 +CT = 2dfd3c852f68eace45acf433a6aa9c05 +Result = Fail (1 - Adata changed) + +Count = 49 +Nonce = 79ac204a26b9fee1132370c20f +Adata = 00 +CT = 5c8c9a5b97be8c7bc01ca8d693b809f9 +Result = Pass (0) +Payload = 00 + +Count = 50 +Nonce = a64bbc3d6d377dab513f7d9ce8 +Adata = 00 +CT = ec093121bdcd589285f2262be8db5c4e +Result = Fail (2 - CT changed) + +Count = 51 +Nonce = 0545fd9ecbc73ccdbbbd4244fd +Adata = 00 +CT = 84201662b213c7a1ff0c1b3c25e4ec45 +Result = Pass (0) +Payload = 00 + +Count = 52 +Nonce = 182fb47a12becf0bfe65df1287 +Adata = 00 +CT = bbe746d6d31e8e9745faed4095ab8d5d +Result = Fail (2 - CT changed) + +Count = 53 +Nonce = f342059a6f9dc14226b40debc4 +Adata = 00 +CT = 646c1258dc4aa6fc380818e70e5f4328 +Result = Fail (2 - CT changed) + +Count = 54 +Nonce = 6cbfe6bb4c9b171b93d28e9f8f +Adata = 00 +CT = 15fa37ca7f2883a4642c1ed41b8f6293 +Result = Fail (2 - CT changed) + +Count = 55 +Nonce = 82877df921c6ade43064ad963e +Adata = 00 +CT = c6acf5e5ded4efb2c314370ebb9e9cde +Result = Fail (1 - Adata changed) + +Count = 56 +Nonce = 0a37f2e7c66490e97285f1b09e +Adata = 00 +CT = 586e728193ce6db9a926b03b2d77dd6e +Result = Pass (0) +Payload = 00 + +Count = 57 +Nonce = d7b9c346ce2f8bad9623122e10 +Adata = 00 +CT = 642a187e71feff5989e28184aded0199 +Result = Fail (1 - Adata changed) + +Count = 58 +Nonce = c1ad812bf2bbb2cdaee4636ee7 +Adata = 00 +CT = 64864d21b6ee3fca13f07fc0486e232d +Result = Pass (0) +Payload = 00 + +Count = 59 +Nonce = b6ce7d00731184b24428df046b +Adata = 00 +CT = 58c63ce68f132d30d177c5834344cc5d +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 4] + +Key = af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569 + +Count = 60 +Nonce = a544218dadd3c1 +Adata = 00 +CT = 64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b722aa8d59 +Result = Pass (0) +Payload = d3d5424e20fbec43ae495353ed830271515ab104f8860c98 + +Count = 61 +Nonce = bfcda8b5a2d0d2 +Adata = 00 +CT = c5b7f802bffc498c1626e3774f1d9f94045dfd8e1a10a20277d00a75 +Result = Fail (2 - CT changed) + +Count = 62 +Nonce = 6bae7f35c56b27 +Adata = 00 +CT = bf432e246b7fa4aff8b3ada738432b51f6872ed92284db9d28588021 +Result = Fail (1 - Adata changed) + +Count = 63 +Nonce = c5e4214b1bf209 +Adata = 00 +CT = 0d5760ad0e156e401120a1ebd1b139248784c88e10e3425437921120 +Result = Fail (1 - Adata changed) + +Count = 64 +Nonce = 9d773a31fe2ec7 +Adata = 00 +CT = 5acfbe5e488976d8b9b77e69a736e8c919053f9415551209dce2d25e +Result = Pass (0) +Payload = 839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0 + +Count = 65 +Nonce = f42cb0cce9efb6 +Adata = 00 +CT = be8be6046ac58411a00c131dd4a72d565f98d87a2c89124b1ef530d0 +Result = Fail (2 - CT changed) + +Count = 66 +Nonce = 24b7a65391f88b +Adata = 00 +CT = f00628e10e8e0115b4a4532a1212a23aade4090832c1972d750125f3 +Result = Pass (0) +Payload = 3bed52236182c19418867d468dbf47c8aac46c02445f99bb + +Count = 67 +Nonce = d2a7eb45780df3 +Adata = 00 +CT = 9078151f674d5f7b56e2451b0316156f776459f17d277e0108aaaf93 +Result = Fail (2 - CT changed) + +Count = 68 +Nonce = 046cbfd26093d8 +Adata = 00 +CT = 921cbecce3b06f3d655a5a0a4d212320d4f147575079fd23bd95e677 +Result = Fail (2 - CT changed) + +Count = 69 +Nonce = 51b13b0b04d077 +Adata = 00 +CT = 8cab1ff22d474e9863c153e84680e2a66981f036051360477e2ebb1d +Result = Fail (2 - CT changed) + +Count = 70 +Nonce = ce2e9967bf9eb7 +Adata = 00 +CT = 15f476b5aefe072548a54f59506d9c3b9ce29025340214be662f8684 +Result = Fail (1 - Adata changed) + +Count = 71 +Nonce = b672c91376f533 +Adata = 00 +CT = 758aa03dc72c362c43b5f85bfaa3db4a74860887a8c29e47d5642830 +Result = Pass (0) +Payload = 4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec + +Count = 72 +Nonce = 62f6f1872462d8 +Adata = 00 +CT = ec645769b22161567e6a7e23aa06575bc767a34aa54d3cba01472fe1 +Result = Fail (1 - Adata changed) + +Count = 73 +Nonce = a6d01fb88ca547 +Adata = 00 +CT = 615cbeabbe163ba8bc9c073df9ad40833fcf3f424644ccc37aa999d7 +Result = Pass (0) +Payload = a36155de477364236591e453008114075b4872120ef17264 + +Count = 74 +Nonce = 46ad6ebbd8644a +Adata = 00 +CT = 0ed6cc6451de57ca672d56dee45d4548a810d5c49dfe442dd27b7cf2 +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 24, Nlen = 7, Tlen = 16] + +Key = f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453 + +Count = 75 +Nonce = a544218dadd3c1 +Adata = 00 +CT = bc51c3925a960e7732533e4ef3a4f69ee6826de952bcb0fd374f3bb6db8377ebfc79674858c4f305 +Result = Pass (0) +Payload = d3d5424e20fbec43ae495353ed830271515ab104f8860c98 + +Count = 76 +Nonce = bfcda8b5a2d0d2 +Adata = 00 +CT = afa1fa8e8a70e26b02161150556d604101fdf423f332c3363275f2a4907d51b734fe7238cebbd48f +Result = Fail (2 - CT changed) + +Count = 77 +Nonce = 6bae7f35c56b27 +Adata = 00 +CT = 72bc8ef21a847047091b673ccf231d35ecf6f4049741703be672f1f22cbe4a5305f19aaa6967237b +Result = Fail (1 - Adata changed) + +Count = 78 +Nonce = c5e4214b1bf209 +Adata = 00 +CT = b719f6555fc4e5424273f5903d5672af460413110278707f400b152113c3976be63dcd9e7a84ddac +Result = Fail (1 - Adata changed) + +Count = 79 +Nonce = 9d773a31fe2ec7 +Adata = 00 +CT = 4539bb13382b034ddb16a3329148f9243a4eee998fe444aff2870ce198af11f4fb698a67af6c89ad +Result = Pass (0) +Payload = 839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0 + +Count = 80 +Nonce = f42cb0cce9efb6 +Adata = 00 +CT = 47cbb909cb12fa0a4b0f1aefd54c52d1edd1533290f76b8ccc98b3f5758972bf08ea9e88dc6e54ed +Result = Fail (2 - CT changed) + +Count = 81 +Nonce = 24b7a65391f88b +Adata = 00 +CT = 6d0f928352a17d63aca1899cbd305e1f831f1638d27c1e24432704eff9b6830476db3d30d4c103e4 +Result = Pass (0) +Payload = 3bed52236182c19418867d468dbf47c8aac46c02445f99bb + +Count = 82 +Nonce = d2a7eb45780df3 +Adata = 00 +CT = e0e686d917f78b3b0058fed7b084976244789073a6305ff571256981db86f1e768170a104ebfb81d +Result = Fail (2 - CT changed) + +Count = 83 +Nonce = 046cbfd26093d8 +Adata = 00 +CT = 960c573f5d6934a4cac49d06998f827b3d665cf02c998fe55efbbae6a346863a93d52e0321cef8b2 +Result = Fail (2 - CT changed) + +Count = 84 +Nonce = 51b13b0b04d077 +Adata = 00 +CT = 7cf8f4806848e34aa7d3bd7e2cb9f5d9ff21395ff6d34826ac2fdc3cc683f6120e405f446a10e0f3 +Result = Fail (2 - CT changed) + +Count = 85 +Nonce = ce2e9967bf9eb7 +Adata = 00 +CT = e4f6445ca36e7ee3323f11f6a5ca8ded0c85871e092aa687d254f7765b6155054a5efde28dd38750 +Result = Fail (1 - Adata changed) + +Count = 86 +Nonce = b672c91376f533 +Adata = 00 +CT = f23ac1426cb1130c9a0913b347d8efafb6ed125913aa678a9dc42d22a5436bc12eff5505edb25e19 +Result = Pass (0) +Payload = 4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec + +Count = 87 +Nonce = 62f6f1872462d8 +Adata = 00 +CT = ac9f131389181b1023f1ee47633aa433fc5d93a87d9ece962db05feb368ab772d977fd97b35262fa +Result = Fail (1 - Adata changed) + +Count = 88 +Nonce = a6d01fb88ca547 +Adata = 00 +CT = 773b8eea2e9830297ac11d3c1f6ea4008c96040e83d76d55789d2043179fdd8fdcbd52313b7b15cb +Result = Pass (0) +Payload = a36155de477364236591e453008114075b4872120ef17264 + +Count = 89 +Nonce = 46ad6ebbd8644a +Adata = 00 +CT = d3fae92043c419fe8ac0d7491ca8041ad089559d895103cf079a2bac0ab4bc249bbdb330181cdd16 +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 4] + +Key = f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453 + +Count = 90 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = 63e00d30e4b08fd2a1cc8d70fab327b2368e77a93be4f4123d14fb3f +Result = Pass (0) +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e + +Count = 91 +Nonce = 894dcaa61008eb8fb052c60d41 +Adata = 00 +CT = bb5425b3869b76856ec58e39886fb6f6f2ac13fe44cb132d8d0c0099 +Result = Fail (2 - CT changed) + +Count = 92 +Nonce = 8feba0d720aa4a5e35abc99e82 +Adata = 00 +CT = 2ca3be419d5be5ed682f8954d2c20efd9e6d360814735daeefd4365c +Result = Fail (1 - Adata changed) + +Count = 93 +Nonce = ed04c9ca8702aec8d0a58e09a0 +Adata = 00 +CT = 3d34bda62db39d6118d6fd5cd38f1a3820ca69ce584b94a2a4ccbef1 +Result = Fail (1 - Adata changed) + +Count = 94 +Nonce = 1501a243bf60b2cb40d5aa20ca +Adata = 00 +CT = 377b2f1e7bd9e3d1077038e084f61950761361095f7eeebbf1a72afc +Result = Pass (0) +Payload = f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994 + +Count = 95 +Nonce = c6edaf35f0cb433500a8c3a613 +Adata = 00 +CT = 9cef6c889ff51666df9dd1dd2215c15f4b2078a29373c106be4f5f9a +Result = Fail (2 - CT changed) + +Count = 96 +Nonce = d65e0e53f765f9d5e6795c0c5e +Adata = 00 +CT = 6cab3060bf3b33b163b933c2ed0ba51406810b54d0edcf5c9d0ef4f7 +Result = Pass (0) +Payload = 20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb + +Count = 97 +Nonce = 2b0163418a341588db0f5786d8 +Adata = 00 +CT = f9543a659e9a8b7d75dd859df923817452735f5051726422c08a9e85 +Result = Fail (2 - CT changed) + +Count = 98 +Nonce = f16bba081bddda83546eabc9a5 +Adata = 00 +CT = 0d20bf6a9d02da72091d94cdb38743bfea2473d3ab62dcad75dd819a +Result = Fail (2 - CT changed) + +Count = 99 +Nonce = ace99268a32b9c1b5ccd8b0d84 +Adata = 00 +CT = 8bca01e6ebd7ebcdfe52b88e314670ffeb35882fc05394b386e205f9 +Result = Fail (2 - CT changed) + +Count = 100 +Nonce = 24570517bbb0df1b3fbd32f57a +Adata = 00 +CT = 7061c84e2e1d9d58013543ff82666055a1f055c1296c42c8f73a8bf0 +Result = Fail (1 - Adata changed) + +Count = 101 +Nonce = a6b2371acf8321864c08ddb4d8 +Adata = 00 +CT = c5aa500d1f7c09a590e9d15d6860c4433684e04dd6bc5c8f94f223f0 +Result = Pass (0) +Payload = 1a43ca628026219c5a430c54021a5a3152ae517167399635 + +Count = 102 +Nonce = f8e2d4e043f5fe7a72b6117811 +Adata = 00 +CT = e3efa7971e27ba1245ee9491ebdbb28ad9b24b325da5760417af8b14 +Result = Fail (1 - Adata changed) + +Count = 103 +Nonce = c2b60f14c894ec6178fe79919f +Adata = 00 +CT = 852cca903d7fdf899807bd14642057534c8a0ccacb8c7b8fb4d35d44 +Result = Pass (0) +Payload = 3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36 + +Count = 104 +Nonce = 4de4c909ac0cc5fc608baf45ac +Adata = 00 +CT = e04fd4f5b60833021ed57c98de300bb68d0d892b2bf68e080bc044b1 +Result = Fail (1 - Adata changed) + +[Alen = 0, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4 + +Count = 105 +Nonce = a544218dadd3c10583db49cf39 +Adata = 00 +CT = f0050ad16392021a3f40207bed3521fb1e9f808f49830c423a578d179902f912f9ea1afbce1120b3 +Result = Pass (0) +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e + +Count = 106 +Nonce = 894dcaa61008eb8fb052c60d41 +Adata = 00 +CT = c408190d0fbf5034f83b24a8ed9657331a7ce141de4fae769084607b83bd06e6442eac8dacf583cc +Result = Fail (2 - CT changed) + +Count = 107 +Nonce = 8feba0d720aa4a5e35abc99e82 +Adata = 00 +CT = 52b3d31d02d1b92b38cbae8c510204dde6bf9588e994296c9002a46cfb734290924a15e9c3d99924 +Result = Fail (1 - Adata changed) + +Count = 108 +Nonce = ed04c9ca8702aec8d0a58e09a0 +Adata = 00 +CT = f80190470212ce1e64bf4c64ca0133d90469abf87a8233c2b238e316c3f9adccce95e8c8b9c7e8d2 +Result = Fail (1 - Adata changed) + +Count = 109 +Nonce = 1501a243bf60b2cb40d5aa20ca +Adata = 00 +CT = 254b847d4175bbb44a82b4e805514fa444c224710933f3ec8aaa3f0133234c0cd91609982adc034b +Result = Pass (0) +Payload = f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994 + +Count = 110 +Nonce = c6edaf35f0cb433500a8c3a613 +Adata = 00 +CT = 7a5c7bc02aa69efc5a159d653f3993399f69e20752c3b00633255731cd88345860da913bc696fdc1 +Result = Fail (2 - CT changed) + +Count = 111 +Nonce = d65e0e53f765f9d5e6795c0c5e +Adata = 00 +CT = c3618c991b15de641d291419ff6957e8b9ae5046dd8c6f08fafb76adf12f36740347e3edae62bca4 +Result = Pass (0) +Payload = 20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb + +Count = 112 +Nonce = 2b0163418a341588db0f5786d8 +Adata = 00 +CT = 240927bfd671a92aef0311395ad55ae42233ecee53873da4066f55f23d4e55bcbbbf2312ea2d8071 +Result = Fail (2 - CT changed) + +Count = 113 +Nonce = f16bba081bddda83546eabc9a5 +Adata = 00 +CT = 4731a7e690c77cd47582ce54a1cec23d94c856b93a9fc767004753689cc84810b8414f1464c0c5b9 +Result = Fail (2 - CT changed) + +Count = 114 +Nonce = ace99268a32b9c1b5ccd8b0d84 +Adata = 00 +CT = f0ea12eaff20c3a50674aa1546aaae3bd5c9249108535b21504da83478ede24026ec91fb12769e4b +Result = Fail (2 - CT changed) + +Count = 115 +Nonce = 24570517bbb0df1b3fbd32f57a +Adata = 00 +CT = 5b164d9752ad6c497a7ab2d0bf8be68fea084ea5839b07b7c9fcf9b9fd5e99767a7b1679b57ea961 +Result = Fail (1 - Adata changed) + +Count = 116 +Nonce = a6b2371acf8321864c08ddb4d8 +Adata = 00 +CT = bd37326da18e5ac79a1a9512f724bb539530868576b79c67acb5a51d10a58d6584fbe73f1063c31b +Result = Pass (0) +Payload = 1a43ca628026219c5a430c54021a5a3152ae517167399635 + +Count = 117 +Nonce = f8e2d4e043f5fe7a72b6117811 +Adata = 00 +CT = 0455b4dd1069281e10531c0dc180ced9a5ef5d3fe0007470ce54cd7623a80a176f29a01b3abb642e +Result = Fail (1 - Adata changed) + +Count = 118 +Nonce = c2b60f14c894ec6178fe79919f +Adata = 00 +CT = ecd337640022635ce1ed273756d02b7feeb2515614c1fadc95c66d3f411b478853886afd177d88c3 +Result = Pass (0) +Payload = 3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36 + +Count = 119 +Nonce = 4de4c909ac0cc5fc608baf45ac +Adata = 00 +CT = e25d7c9fb388596b13a13b885d5b24e31579a3494ad256da830b2b6317716b3975e2b101aebdd920 +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 4] + +Key = 1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4 + +Count = 120 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 92d00fbe +Result = Pass (0) +Payload = 00 + +Count = 121 +Nonce = 78c46e3249ca28 +Adata = 232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc +CT = 9143e5c4 +Result = Fail (2 - CT changed) + +Count = 122 +Nonce = c18d9e7971e2ae +Adata = 0d40324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +CT = 54337466 +Result = Fail (1 - Adata changed) + +Count = 123 +Nonce = 162d061351d82d +Adata = 106d1fb32d948b0d8884f178ad2332a599445fae0f6f71f9ebe53a60b2df9b8e +CT = bf0bf84c +Result = Fail (1 - Adata changed) + +Count = 124 +Nonce = 3fcb328bc96404 +Adata = 10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba +CT = 11250056 +Result = Pass (0) +Payload = 00 + +Count = 125 +Nonce = b3fd1eb1422277 +Adata = fa5398cf4cddbe4b45e9f5d7491cd9eefc5e494255961ba3f4b40d22b5f5fe76 +CT = 13de5339 +Result = Fail (2 - CT changed) + +Count = 126 +Nonce = c42ac63de6f12a +Adata = 7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a +CT = 4eed80fd +Result = Pass (0) +Payload = 00 + +Count = 127 +Nonce = d4a7a672237e17 +Adata = d1cdad7fe886d07625a4334be6de4df0645d2a8b4008a8d35f04e6bcf87bfa56 +CT = 4bc2e450 +Result = Fail (2 - CT changed) + +Count = 128 +Nonce = b23255372455c6 +Adata = d2e2c3607c40e0a807b86c6ebbc502ab42bdb7f85ab26299cd963bbba3a3a8fa +CT = b30e6bbd +Result = Fail (2 - CT changed) + +Count = 129 +Nonce = 92272d40475fbb +Adata = 2f3af695ee33a9ebe6a48ed1b00e337261857110bb104191a54fd13bd960d8bc +CT = f7c11fe2 +Result = Fail (2 - CT changed) + +Count = 130 +Nonce = c4a756f6024a9d +Adata = 2317b324b6420ada9ea7bf52b71c5faf2485528da5f56b42c517be6355cdb28b +CT = 76673751 +Result = Fail (1 - Adata changed) + +Count = 131 +Nonce = 3a1701b185d33a +Adata = e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2 +CT = 9a5382c3 +Result = Pass (0) +Payload = 00 + +Count = 132 +Nonce = e4db2e80dc3f63 +Adata = 7616bdf5737d01f936072b6576fa76556dfa072f7e2d7de16b9dc96ac8de409c +CT = 9e632f56 +Result = Fail (1 - Adata changed) + +Count = 133 +Nonce = 4f490ce07e0150 +Adata = 3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33 +CT = e1842c46 +Result = Pass (0) +Payload = 00 + +Count = 134 +Nonce = b4aaf9ad1bde60 +Adata = 8c96c891456ddec29fe04299506723db2079a6667f96db5d198bf085acf2a4ef +CT = 9f644671 +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 0, Nlen = 7, Tlen = 16] + +Key = a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088 + +Count = 135 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 93af11a08379eb37a16aa2837f09d69d +Result = Pass (0) +Payload = 00 + +Count = 136 +Nonce = 78c46e3249ca28 +Adata = 232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc +CT = d19b0c14ec686a7961ca7c386d125a65 +Result = Fail (2 - CT changed) + +Count = 137 +Nonce = c18d9e7971e2ae +Adata = 0d40324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +CT = 02ea916d60e2ceec6d9dc9b1185569b3 +Result = Fail (1 - Adata changed) + +Count = 138 +Nonce = 162d061351d82d +Adata = 106d1fb32d948b0d8884f178ad2332a599445fae0f6f71f9ebe53a60b2df9b8e +CT = fabd2d0c422b47d363ea9936ff4a311b +Result = Fail (1 - Adata changed) + +Count = 139 +Nonce = 3fcb328bc96404 +Adata = 10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba +CT = b3884b69d117146cfa5529901753ddc0 +Result = Pass (0) +Payload = 00 + +Count = 140 +Nonce = b3fd1eb1422277 +Adata = fa5398cf4cddbe4b45e9f5d7491cd9eefc5e494255961ba3f4b40d22b5f5fe76 +CT = 7162026b6306e74fe32ece8433801bc2 +Result = Fail (2 - CT changed) + +Count = 141 +Nonce = c42ac63de6f12a +Adata = 7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a +CT = b53d93cbfd3d5cf3720cef5080bc7224 +Result = Pass (0) +Payload = 00 + +Count = 142 +Nonce = d4a7a672237e17 +Adata = d1cdad7fe886d07625a4334be6de4df0645d2a8b4008a8d35f04e6bcf87bfa56 +CT = c8bbecf69ecf8d10f0863bb4b7cbed51 +Result = Fail (2 - CT changed) + +Count = 143 +Nonce = b23255372455c6 +Adata = d2e2c3607c40e0a807b86c6ebbc502ab42bdb7f85ab26299cd963bbba3a3a8fa +CT = 6037145cc23a175760ae4b573907c80c +Result = Fail (2 - CT changed) + +Count = 144 +Nonce = 92272d40475fbb +Adata = 2f3af695ee33a9ebe6a48ed1b00e337261857110bb104191a54fd13bd960d8bc +CT = df7ea77425d631f652ffe096a8157f71 +Result = Fail (2 - CT changed) + +Count = 145 +Nonce = c4a756f6024a9d +Adata = 2317b324b6420ada9ea7bf52b71c5faf2485528da5f56b42c517be6355cdb28b +CT = 7182b25ef5b113c13fa8f6769e74f1e2 +Result = Fail (1 - Adata changed) + +Count = 146 +Nonce = 3a1701b185d33a +Adata = e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2 +CT = 0a5d1bc02c5fe096a8b9d94d1267c49a +Result = Pass (0) +Payload = 00 + +Count = 147 +Nonce = e4db2e80dc3f63 +Adata = 7616bdf5737d01f936072b6576fa76556dfa072f7e2d7de16b9dc96ac8de409c +CT = 9eb6d9757ec7c56cc8c79461e0017486 +Result = Fail (1 - Adata changed) + +Count = 148 +Nonce = 4f490ce07e0150 +Adata = 3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33 +CT = 1eda43bf07f2bf003107f3a0ba3a4c18 +Result = Pass (0) +Payload = 00 + +Count = 149 +Nonce = b4aaf9ad1bde60 +Adata = 8c96c891456ddec29fe04299506723db2079a6667f96db5d198bf085acf2a4ef +CT = 5287cc160c5dd3a0f9c1986aac2a621c +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 4] + +Key = a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088 + +Count = 150 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 866d4227 +Result = Pass (0) +Payload = 00 + +Count = 151 +Nonce = e8de970f6ee8e80ede933581b5 +Adata = 89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a +CT = 94cb1127 +Result = Fail (2 - CT changed) + +Count = 152 +Nonce = 6de75d3c05e83755083399a5f7 +Adata = 504b08cf34cbe17acf631ef219ae01437ebb6a980ab2f00121bb3073701b6511 +CT = 82c2b67a +Result = Fail (1 - Adata changed) + +Count = 153 +Nonce = 58d43b9f1581c590daab1a5c56 +Adata = 749f149ef306c70a5d006d9777adbbf7c0de453898c2978ef7c281535ea9b24c +CT = 8c8283f9 +Result = Fail (1 - Adata changed) + +Count = 154 +Nonce = dfdcbdff329f7af70731d8e276 +Adata = 2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3 +CT = c4ac0952 +Result = Pass (0) +Payload = 00 + +Count = 155 +Nonce = 199ec321d1d24d5408076912d6 +Adata = a77526f3614cd974498a76d8b3cb7bacc623fdc9c85503289c462df888b199ed +CT = c59aa931 +Result = Fail (2 - CT changed) + +Count = 156 +Nonce = 60f2490ba0c658848859fcbea8 +Adata = 3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0 +CT = 27c3953d +Result = Pass (0) +Payload = 00 + +Count = 157 +Nonce = 6f29ca274190400720bba27651 +Adata = c0850aaf141bd3f1b24f4d882590f58682b41f874748f29f8925b4914f444842 +CT = cb1ac8eb +Result = Fail (2 - CT changed) + +Count = 158 +Nonce = f1dfb6fdb31cb423226f181c09 +Adata = ac6b08900fc1c9463e7dfdb60eee444c4989d7b200e675f3220ba1e14eed0ab4 +CT = 4dcc55cc +Result = Fail (2 - CT changed) + +Count = 159 +Nonce = 0d45226c98eaa9bb445a3aa4f9 +Adata = b9cb3e1a5bcccb0b0599414c9822275b66fa0f913d51bdb0a2228cbb5aad0e0a +CT = 727d8f5e +Result = Fail (2 - CT changed) + +Count = 160 +Nonce = 39cdbb24bd273a3fe96f42ca9d +Adata = ddfe6c22f4cdc3128050072005f5bd4ecdef1d836e891683f1ba921d33fafba7 +CT = 5aa56a54 +Result = Fail (1 - Adata changed) + +Count = 161 +Nonce = db113f38f0504615c5c9347c3d +Adata = 3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b +CT = c38fbdff +Result = Pass (0) +Payload = 00 + +Count = 162 +Nonce = d16a20ef5f6587f1ee3cb7850b +Adata = b1133e1cd369617a9f937e9a1eb86a0979ee30b5b7b0b6ff838d9e11301d6b72 +CT = 6be30c42 +Result = Fail (1 - Adata changed) + +Count = 163 +Nonce = d35f531f714694b5e49303a980 +Adata = 55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5 +CT = d34e90bb +Result = Pass (0) +Payload = 00 + +Count = 164 +Nonce = 220624db34a022b758473994a2 +Adata = 5b3b2ae87b0d6759f38a858423227f8687f35478a8f565409b741eadcac4d8c4 +CT = 4a5d14bc +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 0, Nlen = 13, Tlen = 16] + +Key = 8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a + +Count = 165 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 867b0d87cf6e0f718200a97b4f6d5ad5 +Result = Pass (0) +Payload = 00 + +Count = 166 +Nonce = e8de970f6ee8e80ede933581b5 +Adata = 89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a +CT = 677a040d46ee3f2b7838273bdad14f16 +Result = Fail (2 - CT changed) + +Count = 167 +Nonce = 6de75d3c05e83755083399a5f7 +Adata = 504b08cf34cbe17acf631ef219ae01437ebb6a980ab2f00121bb3073701b6511 +CT = f650d46ade2cbabbc68ead6df1ea0c37 +Result = Fail (1 - Adata changed) + +Count = 168 +Nonce = 58d43b9f1581c590daab1a5c56 +Adata = 749f149ef306c70a5d006d9777adbbf7c0de453898c2978ef7c281535ea9b24c +CT = 11b8fe8c139ee38f77fd8fa552cbff67 +Result = Fail (1 - Adata changed) + +Count = 169 +Nonce = dfdcbdff329f7af70731d8e276 +Adata = 2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3 +CT = ad879c64425e6c1ec4841bbb0f99aa8b +Result = Pass (0) +Payload = 00 + +Count = 170 +Nonce = 199ec321d1d24d5408076912d6 +Adata = a77526f3614cd974498a76d8b3cb7bacc623fdc9c85503289c462df888b199ed +CT = 3c64f8731930ae000162c10654531066 +Result = Fail (2 - CT changed) + +Count = 171 +Nonce = 60f2490ba0c658848859fcbea8 +Adata = 3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0 +CT = e2751f153fc76c0dec5e0cf2d30c1a28 +Result = Pass (0) +Payload = 00 + +Count = 172 +Nonce = 6f29ca274190400720bba27651 +Adata = c0850aaf141bd3f1b24f4d882590f58682b41f874748f29f8925b4914f444842 +CT = 76127bf891141e73854752ed10c02bd0 +Result = Fail (2 - CT changed) + +Count = 173 +Nonce = f1dfb6fdb31cb423226f181c09 +Adata = ac6b08900fc1c9463e7dfdb60eee444c4989d7b200e675f3220ba1e14eed0ab4 +CT = 4bd833f9da0496e5f6a08a05d02df385 +Result = Fail (2 - CT changed) + +Count = 174 +Nonce = 0d45226c98eaa9bb445a3aa4f9 +Adata = b9cb3e1a5bcccb0b0599414c9822275b66fa0f913d51bdb0a2228cbb5aad0e0a +CT = 05f166328a67a8c58b10a7348f3df612 +Result = Fail (2 - CT changed) + +Count = 175 +Nonce = 39cdbb24bd273a3fe96f42ca9d +Adata = ddfe6c22f4cdc3128050072005f5bd4ecdef1d836e891683f1ba921d33fafba7 +CT = 42499bcd949a5163855a9794f11f917e +Result = Fail (1 - Adata changed) + +Count = 176 +Nonce = db113f38f0504615c5c9347c3d +Adata = 3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b +CT = fc85464a81fe372c12c9e4f0f3bf9c37 +Result = Pass (0) +Payload = 00 + +Count = 177 +Nonce = d16a20ef5f6587f1ee3cb7850b +Adata = b1133e1cd369617a9f937e9a1eb86a0979ee30b5b7b0b6ff838d9e11301d6b72 +CT = 8c7501f423647dee77668858c5e350bb +Result = Fail (1 - Adata changed) + +Count = 178 +Nonce = d35f531f714694b5e49303a980 +Adata = 55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5 +CT = b1c09b093788da19e33c5a6e82ed9627 +Result = Pass (0) +Payload = 00 + +Count = 179 +Nonce = 220624db34a022b758473994a2 +Adata = 5b3b2ae87b0d6759f38a858423227f8687f35478a8f565409b741eadcac4d8c4 +CT = d2231ee1455b0bc337c4f8173fb8647c +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 4] + +Key = 8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a + +Count = 180 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = c2fe12658139f5d0dd22cadf2e901695b579302a72fc56083ebc7720 +Result = Pass (0) +Payload = 78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3 + +Count = 181 +Nonce = 6ba004fd176791 +Adata = 5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b +CT = 94748ba81229e53c38583a8564b23ebbafc6f6efdf4c2a81c44db2c9 +Result = Fail (2 - CT changed) + +Count = 182 +Nonce = 45c5c284836414 +Adata = 8f01a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a264c9dcf7d93 +CT = 1d670ccf3e9ba59186c48da2e5bd0ab21973eee2ea2985bf83a09067 +Result = Fail (1 - Adata changed) + +Count = 183 +Nonce = c69f7679c80546 +Adata = 5d6c04a5b422b46065a79a889e30ac8d1b53b65d230d4c88190903a24e1fe1ea +CT = 2c8c80ff10fac1bf6c9c83533c1514ee032c0983730b0657392ae25d +Result = Fail (1 - Adata changed) + +Count = 184 +Nonce = 57b940550a383b +Adata = 33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f +CT = e1b4ec4279bb62902c12521e6b874171695c5da46c647cc03b91ff03 +Result = Pass (0) +Payload = 6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0 + +Count = 185 +Nonce = 11edd12ea5873d +Adata = e32e5384038379e2b7382ba337b6f7a72a1569e110ee89c4dd6aa6f7e69f5250 +CT = b5dda89fe879d6a665b99285b6d937fd5877ebef4de049fb64b837fb +Result = Fail (2 - CT changed) + +Count = 186 +Nonce = f32222e9eec4bd +Adata = 684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68 +CT = 224db21beb8cd0069007660e783c3f85706b014128368aab2a4e56a7 +Result = Pass (0) +Payload = 2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf + +Count = 187 +Nonce = e0a0a7f262cb51 +Adata = 1d93b2856ad2bf3700440f9a281bd8947ba209e9ffd18e69921ed0678c957c6c +CT = ba1ce3a799e1173178b6788723005566f9269d5828c85d28e960a769 +Result = Fail (2 - CT changed) + +Count = 188 +Nonce = 40316e7b38bdad +Adata = 6e49acd9c26944740c778e74b1dbaa8d640c7e18e949a1661f8a77543db69e1f +CT = 79d59e4bb251988c019c4eaaee2a2513f9cb0521334018fded14a5a5 +Result = Fail (2 - CT changed) + +Count = 189 +Nonce = 33008ef5baf263 +Adata = a726f31d9a22bfc0e7e4c3111b0d304e106ab04ed318f8bfe6ec9cb3a811285b +CT = af4350795f24087aa05070d6d5f55ebb12d7ad3141066866d7d6c61d +Result = Fail (2 - CT changed) + +Count = 190 +Nonce = b48a16fb9a065d +Adata = be05e9c934c1dcba45223d47c6646a2d13c3b93265e354ae4970484b5101d809 +CT = 22d2da531be1f0d1da4bc21f984d29bf56bed2e92da6bf42d0605b84 +Result = Fail (1 - Adata changed) + +Count = 191 +Nonce = 14c9bd561c47c1 +Adata = 141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd +CT = 61b46c9024eed3989064a52df90349c18e14e4b552779d3f8f9d6814 +Result = Pass (0) +Payload = c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8 + +Count = 192 +Nonce = 5fb871eac2e52a +Adata = ff23906e9067da8999842318f2a867759ca2d171395c2ff31fa5a4e2ab349c45 +CT = 539799c2b22a33dd648fc4497d12f9455beaf932f1eaaff4d930f5ce +Result = Fail (1 - Adata changed) + +Count = 193 +Nonce = 1ccec9923aa6e8 +Adata = 88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795 +CT = 52f8205534447d722be2b9377f7395938cc88af081a11ccb0d83fa19 +Result = Pass (0) +Payload = 518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f + +Count = 194 +Nonce = 68a5351e4422c8 +Adata = 303c767468f48ac9f6e331bbad535b06aa00ab593327320799e17eff63afd3fe +CT = d11c892ae155098f5e4b5fe60c7afd74fb2dbcc4db956556f243e273 +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 24, Nlen = 7, Tlen = 16] + +Key = 705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe + +Count = 195 +Nonce = a544218dadd3c1 +Adata = d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab +CT = 3341168eb8c48468c414347fb08f71d2086f7c2d1bd581ce1ac68bd42f5ec7fa7e068cc0ecd79c2a +Result = Pass (0) +Payload = 78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3 + +Count = 196 +Nonce = 6ba004fd176791 +Adata = 5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b +CT = d543acda712b898cbb27b8f598b2e4438ce587a836e2785147c3338a2400809e739b63ba8227d2f9 +Result = Fail (2 - CT changed) + +Count = 197 +Nonce = 45c5c284836414 +Adata = 8f01a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a264c9dcf7d93 +CT = 39a8af5c976b995ea8049e55b68bc65503592ab00915638646288ce9dd1c7088c752e35947fdca98 +Result = Fail (1 - Adata changed) + +Count = 198 +Nonce = c69f7679c80546 +Adata = 5d6c04a5b422b46065a79a889e30ac8d1b53b65d230d4c88190903a24e1fe1ea +CT = 950fbf6445f6ffb68178f52f5079d0c6081a48ae1f267a0b7fd89caef9388fbb82361b8d53d9edc6 +Result = Fail (1 - Adata changed) + +Count = 199 +Nonce = 57b940550a383b +Adata = 33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f +CT = fbfed2c94f50ca10466da9903ef85833ad48ca00556e66d14d8b30df941f3536ffb42083ef0e1c30 +Result = Pass (0) +Payload = 6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0 + +Count = 200 +Nonce = 11edd12ea5873d +Adata = e32e5384038379e2b7382ba337b6f7a72a1569e110ee89c4dd6aa6f7e69f5250 +CT = 2ebfeb7a843618b37025352df3538526517ed320adfb486c04cf3426e8f975125a7eed00e5f33b6c +Result = Fail (2 - CT changed) + +Count = 201 +Nonce = f32222e9eec4bd +Adata = 684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68 +CT = dae13e6967c8b1ee0dd2d5ba1dd1de69f22c95da39528f9ef78e9e5e9faa058112af57f4ac78db2c +Result = Pass (0) +Payload = 2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf + +Count = 202 +Nonce = e0a0a7f262cb51 +Adata = 1d93b2856ad2bf3700440f9a281bd8947ba209e9ffd18e69921ed0678c957c6c +CT = e683040a0bcf04c1748e7746400d6ef0f7cd8e77a29517790c63959ce534a0f87fb42a9b000dec84 +Result = Fail (2 - CT changed) + +Count = 203 +Nonce = 40316e7b38bdad +Adata = 6e49acd9c26944740c778e74b1dbaa8d640c7e18e949a1661f8a77543db69e1f +CT = 829e50e8c09e727a58287e6eb7d38edeb8ab39db279c06397d1a2111dc21aec79ef73193b306d31f +Result = Fail (2 - CT changed) + +Count = 204 +Nonce = 33008ef5baf263 +Adata = a726f31d9a22bfc0e7e4c3111b0d304e106ab04ed318f8bfe6ec9cb3a811285b +CT = 873c91e76dca0062ae66325aefb84ece3e98928f8dbc5fee7c516d2d1a8318893923f398ca249401 +Result = Fail (2 - CT changed) + +Count = 205 +Nonce = b48a16fb9a065d +Adata = be05e9c934c1dcba45223d47c6646a2d13c3b93265e354ae4970484b5101d809 +CT = 343f6c86f2b852ac388a096faec4472107a924aba56d0cb88055e777bb57eb49497cd2e233ee06fd +Result = Fail (1 - Adata changed) + +Count = 206 +Nonce = 14c9bd561c47c1 +Adata = 141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd +CT = a654238fb8b05e293dba07f9d68d75a7f0fbf40fe20edaeba1586bf922412e73ce338e372615c3bc +Result = Pass (0) +Payload = c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8 + +Count = 207 +Nonce = 5fb871eac2e52a +Adata = ff23906e9067da8999842318f2a867759ca2d171395c2ff31fa5a4e2ab349c45 +CT = 4846816923ed9f0254bdd0be01028f75061d3594ad3a45bd03538d108df6ecd6f39acfe076ba5fb8 +Result = Fail (1 - Adata changed) + +Count = 208 +Nonce = 1ccec9923aa6e8 +Adata = 88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795 +CT = 765067ef768908d91ee4c3923943e0c7be70e2e06db99a4b3e3f51ee37fdcc5d81dd85d9e9d4f44e +Result = Pass (0) +Payload = 518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f + +Count = 209 +Nonce = 68a5351e4422c8 +Adata = 303c767468f48ac9f6e331bbad535b06aa00ab593327320799e17eff63afd3fe +CT = e58ea6c1522e5a3e93a85edd05ae80d6cf5c4dd6d604a8f8d8a906488f79ad5d2234d72458dcfcd4 +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 4] + +Key = 705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe + +Count = 210 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = c0ea400b599561e7905b99262b4565d5c3dc49fad84d7c69ef891339 +Result = Pass (0) +Payload = e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3 + +Count = 211 +Nonce = 8fa501c5dd9ac9b868144c9fa5 +Adata = 5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800 +CT = 60871e03ea0eb968536c99f926ea24ef43d41272ad9fb7f63d488623 +Result = Fail (2 - CT changed) + +Count = 212 +Nonce = 9bc0d1502a47e46350fe8667ca +Adata = 07203674260208d5bd4d39506836f7e76ffc58e938799f21aff7bb4dea4410d2 +CT = 81d7859dcbe51dcc94fe2591cd3b0540003d49a8c4dccbf4527e5ed0 +Result = Fail (1 - Adata changed) + +Count = 213 +Nonce = 611cb4c66e88f6acf96fea1919 +Adata = 327ee3657e49d4d988362fabae303ccea6638e5cb45993d9d56269bc3d3af32b +CT = bef380ad725b65fb5fceeabf09c665bc35089f434ec831494d20d5fa +Result = Fail (1 - Adata changed) + +Count = 214 +Nonce = 0dd613c0fe28e913c0edbb8404 +Adata = 2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141 +CT = fabe11c9629e598228f5209f3dbcc641fe4b1a22cadb0821d2898c3b +Result = Pass (0) +Payload = 9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998 + +Count = 215 +Nonce = 68806dfe720d0a9a84697de5f2 +Adata = c6b0e4dfd723d7637510f887b7852f60ecdf72e0d33396560fed6534d5b7f015 +CT = b7eb87f84951640de731d4093f1a4ed5f831138a27465d3941e92090 +Result = Fail (2 - CT changed) + +Count = 216 +Nonce = 3e0fe3427eeda80f02dda4fed5 +Adata = ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33 +CT = d88f8fcd772125212ce09c2a6e5b5693dd35073f992004f0d18fc889 +Result = Pass (0) +Payload = 38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc + +Count = 217 +Nonce = 7c0c76d9f9316ff6c98758b464 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +CT = d2d7d52b11304fc1d15b8c20e296ba7c63d99f4ce86cc8ae0f39ecea +Result = Fail (2 - CT changed) + +Count = 218 +Nonce = 07c728135bdfede0e0c8036b17 +Adata = 25a152850b4b80b19d8f0b504b2a8a241824b3a1fca8d85c8713b2c0c84b5e02 +CT = ae1d9f82efb464d5dc2018cffa309634c09b34d1122c4bd994b1d516 +Result = Fail (2 - CT changed) + +Count = 219 +Nonce = 710c96d7a6f09de83f0507f28a +Adata = 2d64acfdbfc582cd9a933790eb1b739fb02e53f511255e49f421bb7acc98a130 +CT = 477c985d92ad1b69d22315235a29e3d3a5991487cbdc8d11d394d047 +Result = Fail (2 - CT changed) + +Count = 220 +Nonce = 977bbcdeb6a7d9dcf8664bc2d8 +Adata = 135786125258a49475338ac1961d2718433b9e84cf64f63ca52913e8dd12e505 +CT = d1c085c75d808dc6db493b8a0b4d884e0700d2844a1b4b46bd3d22eb +Result = Fail (1 - Adata changed) + +Count = 221 +Nonce = 60122cbd219e5cf17415e8bc09 +Adata = 895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216 +CT = 76bdd9a7b34bf14ae121a87fdfa144f71b848744af6a2f0b1c0d067c +Result = Pass (0) +Payload = 794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9 + +Count = 222 +Nonce = 83a07f2e685959cb50a1bd2bce +Adata = 02afe300ec0cf0acb59108b2f70e069300294e34f40bb032cb59907599664408 +CT = 413e2e8df9d65b4e5d3b63a738258aaee643f364be9a01b974192744 +Result = Fail (1 - Adata changed) + +Count = 223 +Nonce = 3542fbe0f59a6d5f3abf619b7d +Adata = dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8 +CT = 617d8036e2039d516709062379e0550cbd71ebb90fea967c79018ad5 +Result = Pass (0) +Payload = c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed + +Count = 224 +Nonce = 48f2d4c0b17072e0a9c300d90b +Adata = c56175e2cfe0d37454d989afcc36686fb34c015439601567506a4d0003182be7 +CT = 40e609c739e409750a6c41d9c6ea64ce36f70711b4ca3e365c916f91 +Result = Fail (1 - Adata changed) + +[Alen = 32, Plen = 24, Nlen = 13, Tlen = 16] + +Key = 314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e + +Count = 225 +Nonce = a544218dadd3c10583db49cf39 +Adata = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907 +CT = 8d34cdca37ce77be68f65baf3382e31efa693e63f914a781367f30f2eaad8c063ca50795acd90203 +Result = Pass (0) +Payload = e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3 + +Count = 226 +Nonce = 8fa501c5dd9ac9b868144c9fa5 +Adata = 5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800 +CT = 516c0095cc3d85fd55e48da17c592e0c7014b9daafb82bdc4b41096dfdbe9cc1ab610f8f3e038d16 +Result = Fail (2 - CT changed) + +Count = 227 +Nonce = 9bc0d1502a47e46350fe8667ca +Adata = 07203674260208d5bd4d39506836f7e76ffc58e938799f21aff7bb4dea4410d2 +CT = 0293eae9f8d8bd7ad45357f733fc7b5d990d894783e18501d81ec96df41b8fa8262ed2db880b5e85 +Result = Fail (1 - Adata changed) + +Count = 228 +Nonce = 611cb4c66e88f6acf96fea1919 +Adata = 327ee3657e49d4d988362fabae303ccea6638e5cb45993d9d56269bc3d3af32b +CT = 256bad8295e67d8d450f5ecc8276920ec23b1156c57be7c96ee80f60f72db2cbf25b2f8c6af8749c +Result = Fail (1 - Adata changed) + +Count = 229 +Nonce = 0dd613c0fe28e913c0edbb8404 +Adata = 2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141 +CT = 6df09613ea986c2d91a57a45a0942cbf20e0dfca12fbda8c945ee6db24aea5f5098952f1203339ce +Result = Pass (0) +Payload = 9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998 + +Count = 230 +Nonce = 68806dfe720d0a9a84697de5f2 +Adata = c6b0e4dfd723d7637510f887b7852f60ecdf72e0d33396560fed6534d5b7f015 +CT = c5b64577d3c34e50f7da5072db5bda1d1d2c6db1a4f1183e2cc4c90ac3f798957cb09a05868a8ad5 +Result = Fail (2 - CT changed) + +Count = 231 +Nonce = 3e0fe3427eeda80f02dda4fed5 +Adata = ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33 +CT = 2bfe51f1f43b982d47f76ea8206ddbf585d6f30cec0d4ef16b1556631d3b52bf24154afec1448ef6 +Result = Pass (0) +Payload = 38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc + +Count = 232 +Nonce = 7c0c76d9f9316ff6c98758b464 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +CT = 1622ae109073f44a4596722d9943fea774dfc2a1f939fc0914f42ec81e3af71c9a5de7e0ac16ca69 +Result = Fail (2 - CT changed) + +Count = 233 +Nonce = 07c728135bdfede0e0c8036b17 +Adata = 25a152850b4b80b19d8f0b504b2a8a241824b3a1fca8d85c8713b2c0c84b5e02 +CT = 4c0b361a766d366d983c41e793d75635e17f6eab2eadcf9743d67d90850c4c76a43df1f95170b29b +Result = Fail (2 - CT changed) + +Count = 234 +Nonce = 710c96d7a6f09de83f0507f28a +Adata = 2d64acfdbfc582cd9a933790eb1b739fb02e53f511255e49f421bb7acc98a130 +CT = 5b02347f30213df7f1506d7dca41b838c92aea0f190c5dba7bd5d5c8c098299394333b34fae9a110 +Result = Fail (2 - CT changed) + +Count = 235 +Nonce = 977bbcdeb6a7d9dcf8664bc2d8 +Adata = 135786125258a49475338ac1961d2718433b9e84cf64f63ca52913e8dd12e505 +CT = c77283ca15484d82469ce7249d1fb8e5f4c3bc8245fb4d97e26149d4a9711be81b4f69aa9fabd7f6 +Result = Fail (1 - Adata changed) + +Count = 236 +Nonce = 60122cbd219e5cf17415e8bc09 +Adata = 895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216 +CT = bf0d219bb50fcc1d51f654bb0fd8b44efa25aef39e2f11afe47d00f2eebb544e6ba7559ac2f34edb +Result = Pass (0) +Payload = 794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9 + +Count = 237 +Nonce = 83a07f2e685959cb50a1bd2bce +Adata = 02afe300ec0cf0acb59108b2f70e069300294e34f40bb032cb59907599664408 +CT = 1609f8de59da4f50ce034977d132d4f9881a9b85ffa5bb886fa3fddc87690a359fe55f8fa12ba749 +Result = Fail (1 - Adata changed) + +Count = 238 +Nonce = 3542fbe0f59a6d5f3abf619b7d +Adata = dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8 +CT = 39c2e8f6edfe663b90963b98eb79e2d4f7f28a5053ae8881567a6b4426f1667136bed4a5e32a2bc1 +Result = Pass (0) +Payload = c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed + +Count = 239 +Nonce = 48f2d4c0b17072e0a9c300d90b +Adata = c56175e2cfe0d37454d989afcc36686fb34c015439601567506a4d0003182be7 +CT = 27c575be0b99af9b106f53f471c31cac4d54ea0bcb602a33fb67bb6092cd579f722ae9b680da083d +Result = Fail (1 - Adata changed) diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/Readme.txt b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/Readme.txt new file mode 100644 index 0000000000..88bdc95fd0 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/Readme.txt @@ -0,0 +1,9 @@ +There are two sets of CCM example files: + +1. The response (.rsp) files contain properly formatted CAVS response files. + +2. The three DVPT{128/192/256}.txt files contain the same values as the + DVPT{128/192/256}.rsp files but have additional information. For the cases + that fail, the reason for failure is in parentheses following the result: + e.g., Result = Fail (2 - CT changed) + This additional information is not in properly formatted response files. diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT128.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT128.rsp new file mode 100644 index 0000000000..a4fe9130a0 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT128.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:24 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = d24a3d3dde8c84830280cb87abad0bb3 +Nonce = f1100035bb24a8d26004e0e24b + +Count = 0 +Adata = 00 +Payload = 7c86135ed9c2a515aaae0e9a208133897269220f30870006 +CT = 1faeb0ee2ca2cd52f0aa3966578344f24e69b742c4ab37ab1123301219c70599b7c373ad4b3ad67b + +Count = 1 +Adata = 00 +Payload = 48df73208cdc63d716752df7794807b1b2a80794a2433455 +CT = 2bf7d09079bc0b904c711a0b0e4a70ca8ea892d9566f03f8b77a140819f39ef045103e785e1df8c2 + +Count = 2 +Adata = 00 +Payload = b99de8168e8c13ea4aef66bdb93133dff5d57e9837ff6ccb +CT = dab54ba67bec7bad10eb5141ce3344a4c9d5ebd5c3d35b664b01098842a618390619b86e00850b2e + +Count = 3 +Adata = 00 +Payload = 09fc21ac4a1f43de29621cacf3ad84e055c6b220721af7ce +CT = 6ad4821cbf7f2b9973662b5084aff39b69c6276d8636c0638bd518724ab84fb814fe7b5570769f7f + +Count = 4 +Adata = 00 +Payload = cb43320d7488dfd6eed9efd88f440ea3f6f77a0df09d0727 +CT = a86b91bd81e8b791b4ddd824f84679d8caf7ef4004b1308a7229cbcecef221570cee8345b38cd6ec + +Count = 5 +Adata = 00 +Payload = a350ed58c04473e113b9088b1fb9dad92807f6b63b0d690c +CT = c0784ee835241ba649bd3f7768bbada2140763fbcf215ea1fee47fec27d7764e5e2819c850088bac + +Count = 6 +Adata = 00 +Payload = 0709e691faf41383fab5d1848a8eee77101d1c99e526a264 +CT = 642145210f947bc4a0b1e678fd8c990c2c1d89d4110a95c954d610bc1ab4bc9a8a28c7306f7c539e + +Count = 7 +Adata = 00 +Payload = e7b913c2f0630562eb1c16b3b1ed84090c011a15c09e5471 +CT = 8491b07205036d25b118214fc6eff37230018f5834b263dc2e31657ecc51f5ec8590482fc053230d + +Count = 8 +Adata = 00 +Payload = 6b909697074900d41ce8c7d559b229af11fb3cec334784d4 +CT = 08b83527f229689346ecf0292eb05ed42dfba9a1c76bb379d500827f2081b00397102f90fc9ccd88 + +Count = 9 +Adata = 00 +Payload = 495ff03335bcb39a317b9ea3f8bb6306fa771f3c55adebce +CT = 2a775383c0dcdbdd6b7fa95f8fb9147dc6778a71a181dc63e2e7997803029476598c0e8d4fc63857 + +[Alen = 1] + +Key = 08b0da255d2083808a1b4d367090bacc +Nonce = 777828b13679a9e2ca89568233 + +Count = 10 +Adata = dd +Payload = 1b156d7e2bf7c9a25ad91cff7b0b02161cb78ff9162286b0 +CT = e8b80af4960d5417c15726406e345c5c46831192b03432eed16b6282283e16602331bcca9d51ce76 + +Count = 11 +Adata = c5 +Payload = 032fee9dbffccc751e6a1ee6d07bb218b3a7ec6bf5740ead +CT = f0828917020651c085e42459c544ec52e99372005362baf308ebeed45f67ef8733737c9c6f82daad + +Count = 12 +Adata = 68 +Payload = 9c4cd65b92070bc382fd18146611defb4204acddfdf6b276 +CT = 6fe1b1d12ffd9676197322ab732e80b1183032b65be00628f9b477e3a23bfdfdb619c7bc531fbcce + +Count = 13 +Adata = be +Payload = 2ff93ef2fc5fe2c297ace05f3f7585aed75ef90ade3acf89 +CT = dc54597841a57f770c22dae02a4adbe48d6a6761782c7bd7aa82130f5a86c0cd0433585e5c208cf7 + +Count = 14 +Adata = 7a +Payload = 62766e9acd41285eeed9b4007340dbb611699624274ad117 +CT = 91db091070bbb5eb75578ebf667f85fc4b5d084f815c65499d60012a2f25463e036ceecea57b3c97 + +Count = 15 +Adata = 13 +Payload = ea689c268a04912d0527b16d9d9406df38302fb11cb64a99 +CT = 19c5fbac37fe0c989ea98bd288ab58956204b1dabaa0fec7e337897c90eb260729a729aed1c8a244 + +Count = 16 +Adata = e5 +Payload = f31e35953beb211efcce487ba8c0cd1a8446343d5851b9fd +CT = 00b3521f8611bcab674072c4bdff9350de72aa56fe470da373dc2911c75b37cd995481d42b04524a + +Count = 17 +Adata = e3 +Payload = c4ac3c645387584c2a95b1f16b8317730592924dd831a388 +CT = 37015beeee7dc5f9b11b8b4e7ebc49395fa60c267e2717d684f76ecf3dc5f3307ce982f185321248 + +Count = 18 +Adata = d5 +Payload = 81af394c2ea3a85e1ea954596e3772f01635d007794c0b19 +CT = 72025ec6935935eb85276ee67b082cba4c014e6cdf5abf472c38d0fe4e4eba054c1420c39a3dcc61 + +Count = 19 +Adata = ed +Payload = e013a2edd5b86bab8df5c9940d0a0c864478c1ad42668304 +CT = 13bec5676842f61e167bf32b183552cc1e4c5fc6e470375a7cfa6c9945f5aee3c799eee37b0605db + +[Alen = 2] + +Key = 1538cc03b60880bf3e7d388e29f27739 +Nonce = 9e734de325026b5d7128193973 + +Count = 20 +Adata = c93c +Payload = e7b819a853ffe79baaa72097ff0d04f02640ae62bcfd3da5 +CT = 1d8f42f9730424fa27240bd6277f4882604f440324b11b003ca01d874439b4e1f79a26d8c6dc433a + +Count = 21 +Adata = 4cf9 +Payload = dc6cf325ed6d968efba9f57e48a58f4578cc3540fe121ba2 +CT = 265ba874cd9655ef762ade3f90d7c3373ec3df21665e3d07b40653cd23afc7cc7a31fa13ba8f4e49 + +Count = 22 +Adata = b469 +Payload = 22ab6a0daf953165dda864cceeeb782e275c0b072aedd284 +CT = d89c315c8f6ef204502b4f8d3699345c6153e166b2a1f421c8c10aaf90b1116be216f912c82ca96a + +Count = 23 +Adata = cf6b +Payload = a35f62a431fee63468dc02fdf7bef78d3a5937de56151939 +CT = 596839f511052555e55f29bc2fccbbff7c56ddbfce593f9c2f568ef41324189fb3644edcd76dc19c + +Count = 24 +Adata = af7c +Payload = 548840cb0400824af809fb68447500b77e977128200d3b81 +CT = aebf1b9a24fb412b758ad0299c074cc538989b49b8411d242548c244a875d3681d715db3da19962f + +Count = 25 +Adata = 61dc +Payload = 440b6095c77495e73fff54c785b7ceb5eb358731c213ffcd +CT = be3c3bc4e78f5686b27c7f865dc582c7ad3a6d505a5fd968b599bc8927ad8d43067807f4b858f854 + +Count = 26 +Adata = b97e +Payload = 50c59ca54eb64575b82b13c6dac96488af369e9f5f86cdf2 +CT = aaf2c7f46e4d861435a8388702bb28fae93974fec7caeb577454774ee78f76e555cf743df340381e + +Count = 27 +Adata = 57ab +Payload = 21b8eb1f0bda26ca36167ce7bc2e796818bf11fc8c192885 +CT = db8fb04e2b21e5abbb9557a6645c351a5eb0fb9d14550e20e0a22a5ee031978271c7dd2a0d4e7018 + +Count = 28 +Adata = 5f9c +Payload = b4d84fb1e81e18c89391a7a59fc05fedaf160e0d0d027a7c +CT = 4eef14e0c8e5dba91e128ce447b2139fe919e46c954e5cd99a242ebae5c6da57ee38e5c227c46b32 + +Count = 29 +Adata = e0c4 +Payload = 54dc5a0e1b67577cda4e7dbd48b769c120c1d13dd567cfad +CT = aeeb015f3b9c941d57cd56fc90c525b366ce3b5c4d2be908a5f8a92f4201c4658289307167cee810 + +[Alen = 3] + +Key = f149e41d848f59276cfddd743bafa9a9 +Nonce = 14b756d66fc51134e203d1c6f9 + +Count = 30 +Adata = f5827e +Payload = 9759e6f21f5a588010f57e6d6eae178d8b20ab59cda66f42 +CT = f634bf00f1f9f1f93f41049d7f3797b05e805f0b14850f4e78e2a23411147a6187da6818506232ee + +Count = 31 +Adata = e9699b +Payload = 1555bc87d6c688fd221a2c75cd1e4dd1c1693207ac421d24 +CT = 7438e575386521840dae5685dc87cdec14c9c65575617d28f10835db9897b7528e3204fe3a81424f + +Count = 32 +Adata = 972896 +Payload = b72b2a080d92f3f3bb7d96222982de82a28c9eebaddba247 +CT = d64673fae3315a8a94c9ecd2381b5ebf772c6ab974f8c24b3efa05ba4a73ec2234461d459f54acd2 + +Count = 33 +Adata = 3053f3 +Payload = b5417ed6933ffe2b57ea601d77e97eb12fa1fb8fdc06c86f +CT = d42c27247d9c5752785e1aed6670fe8cfa010fdd0525a863b557537c6525e827750917a1ed49602f + +Count = 34 +Adata = 24db75 +Payload = 4e7f42666035a00e62783283c54b027603917685d27326bc +CT = 2f121b948e9609774dcc4873d4d2824bd63182d70b5046b0dfd06b037e9094f120eb3d8649d48918 + +Count = 35 +Adata = ff27a4 +Payload = 7bf180699c294421ad9565cacc27227a4b3a7cf9637290c6 +CT = 1a9cd99b728aed5882211f3addbea2479e9a88abba51f0cabfa8cfabbd79b3e3210482e6f3822fee + +Count = 36 +Adata = 77ec24 +Payload = 3d47071c13f994cb42fb2887e5c6e53a542be7ddad9779e0 +CT = 5c2a5eeefd5a3db26d4f5277f45f6507818b138f74b419ec3b9575e347051e98d0c8646ad46318e6 + +Count = 37 +Adata = 6d7748 +Payload = 317d5da0a2ec12c3b96c83dd61cc955242a9c1c640e2b92f +CT = 501004524c4fbbba96d8f92d7055156f9709359499c1d92378e7af65eb0388ae7a52f58f6ba32109 + +Count = 38 +Adata = 029674 +Payload = c9bb21306ee1b4a6c4fa5443af2e181716993cbb374e177c +CT = a8d678c280421ddfeb4e2eb3beb7982ac339c8e9ee6d77708019fa97ff70d4d21c0bd83caa434b3a + +Count = 39 +Adata = 60dfe8 +Payload = 44eb7edd6bee501ad97873aa7ecbf7ed8b613760d7c95e15 +CT = 2586272f854df963f6cc095a6f5277d05ec1c3320eea3e191814ed48a21d97ea02e86d7e6e8834cb + +[Alen = 4] + +Key = 9a57a22c7f26feff8ca6cceff214e4c2 +Nonce = 88f30fd2b04fb8ddbce8fc26e6 + +Count = 40 +Adata = a95bdff6 +Payload = 035c516776c706a7dd5f181fa6aa891b04dd423042ea0667 +CT = b92f7ec2ebecebdbd2977b3874e61bf496a382153b2529fc9b6443a35f329b2068916fb6ab8227eb + +Count = 41 +Adata = d2672cbb +Payload = 3ba306bcec94615c347f990b62841a16df7b321f113f1714 +CT = 81d0291971bf8c203bb7fa2cb0c888f94d05f23a68f0388f19e2aa492ce9ddfb6de0ab7a447f5351 + +Count = 42 +Adata = 737f4d00 +Payload = 68313a29ace3efe521c3ca1e5bac8e98d6b4434c80a7dc74 +CT = d242158c31c802992e0ba93989e01c7744ca8369f968f3ef2bf683b1209f104e82ba39f7c62cd666 + +Count = 43 +Adata = 3610b1ae +Payload = 963bfe556138317bebe3936b18a2c1dd100dc73be6fde556 +CT = 2c48d1f0fc13dc07e42bf04ccaee53328273071e9f32cacd4fc7d5cac043f182edbe5c2658f73092 + +Count = 44 +Adata = f1aa7f72 +Payload = 52d5c53ee4f23cb050a95db54112b44033c34ac31de96be8 +CT = e8a6ea9b79d9d1cc5f613e92935e26afa1bd8ae664264473b8234f3fbaca3dc2c497418219151b05 + +Count = 45 +Adata = 6b1013aa +Payload = a302aebc0f8fd61badc8371991beacf5933de46effacb8ce +CT = 1971811992a43b67a200543e43f23e1a0143244b866397558fa5f9539e0500f139016e4a4337d86b + +Count = 46 +Adata = 33028129 +Payload = f7d653c23254875625b20e1ef60ae92847046d84bb4ce857 +CT = 4da57c67af7f6a2a2a7a6d3924467bc7d57aada1c283c7ccfa2379fde155e64b5b84e336056445c3 + +Count = 47 +Adata = 2cab4a09 +Payload = 872a3f7230e626abff519e5aeecc93897249405daeaffc98 +CT = 3d5910d7adcdcbd7f099fd7d3c800166e0378078d760d30358208335cb81e4fb10923fca4ddb9ff9 + +Count = 48 +Adata = 73142ba7 +Payload = 766f94e7d9b1ce74bbaf2c99d215350f060122767fc1953f +CT = cc1cbb42449a2308b4674fbe0059a7e0947fe253060ebaa42d6ecfb49ac8983415503efef1e21950 + +Count = 49 +Adata = bc9f967e +Payload = 5f089ed9267363bc23c6c7b8f73208a36f61fa8ea8084ff7 +CT = e57bb17cbb588ec02c0ea49f257e9a4cfd1f3aabd1c7606c1978a62d15430fc20b87940292b49641 + +[Alen = 5] + +Key = 54caf96ef6d448734700aadab50faf7a +Nonce = a3803e752ae849c910d8da36af + +Count = 50 +Adata = 5f476348dd +Payload = c69f7c5a50f3e72123371bbfd6bdf532b99ef78500508dfe +CT = 20c43ad83610880249f1632dd418ec9a5ed333b50e996d1a4e5a32fbe7961b832b722bc07a18595b + +Count = 51 +Adata = 07db8aada5 +Payload = 9cf8b638f2b295b85cf782fabab11153dc091b4afcd761a9 +CT = 7aa3f0ba9451fa9b3631fa68b81408fb3b44df7af21e814d401a2222443696021b5faa520129b563 + +Count = 52 +Adata = 31ef6561ff +Payload = 62b8263dc015ef873cd16272e4da89799b910f2b04204420 +CT = 84e360bfa6f680a456171ae0e67f90d17cdccb1b0ae9a4c4f842681d2e90da5718234ed893197662 + +Count = 53 +Adata = e97dfcbafb +Payload = 810bed3a2bc0f9d75389155b7a39d9d014c08646814f9718 +CT = 6750abb84d2396f4394f6dc9789cc078f38d42768f8677fc33a08eb30ee154f71279682ab02eff27 + +Count = 54 +Adata = 4981c51fcc +Payload = 063d23fc3ec344c1ba3486802e01e55617455d5cfbfb5279 +CT = e066657e58202be2d0f2fe122ca4fcfef008996cf532b29d8d3071c79f0cf86fe4148cb5e8ace0ce + +Count = 55 +Adata = c8437dba76 +Payload = 41db5b245ea0fab985b93e7fc0a00cd3cca5bdbb642b7ebf +CT = a7801da63843959aef7f46edc205157b2be8798b6ae29e5b842700619dc1599603f3f3f6cfdf5e0b + +Count = 56 +Adata = 6f65a24344 +Payload = b0e36734b2ba871d59df0b029c7f32af68e003a689ac4911 +CT = 56b821b6d459e83e331973909eda2b078fadc7968765a9f539a0cd8d8bbf211b907f34411f868c79 + +Count = 57 +Adata = cd62d6d203 +Payload = 747e53e627eabde0cd77d78d1bd720bea518f8a2f76e57a2 +CT = 922515644109d2c3a7b1af1f1972391642553c92f9a7b746c4a90e5fc11266bab77eea1d24fbdbb9 + +Count = 58 +Adata = 9663b3c8e6 +Payload = c70c92ec4c518802662fa4c41a6a33a22599f79f8f7264b3 +CT = 2157d46e2ab2e7210ce9dc5618cf2a0ac2d433af81bb8457b3c1246f7dd6462ce757db82db45f36e + +Count = 59 +Adata = 35c4720d3c +Payload = a26835605b66fc08abdbb5dc77e39783d60b8e8f2314e95f +CT = 443373e23d85932bc11dcd4e75468e2b31464abf2ddd09bbd472c06a5f4c04f97d06ec401d3e7fd9 + +[Alen = 6] + +Key = cc0c084d7de011e2f031616a302e7a31 +Nonce = f0b4522847f6f8336fe534a4e7 + +Count = 60 +Adata = da853a27aee2 +Payload = 15b369889699b6de1fa3ee73e5fe19814e46f129074c965b +CT = f39755d160a64611368a8eccf6fcbc45ef7f1f56240eb19a2e3ca4ec3c776ab58843f617d605fd72 + +Count = 61 +Adata = d4ed4584678e +Payload = a18c0460b56a5bcd5bf6842cec6ed44d90b2bfa968a6a7e7 +CT = 47a838394355ab0272dfe493ff6c7189318b51d64be48026327804c44c8f17a4446a3d5ba85f9c7f + +Count = 62 +Adata = 590a27721a36 +Payload = 41cee0ecaf9c65cef740440af37954ef49a585779d2abbca +CT = a7eadcb559a39501de6924b5e07bf12be89c6b08be689c0bbcd00e9cb726d75e4283820ee81d933a + +Count = 63 +Adata = 58830fb0b1f3 +Payload = dce983e4e3734a9bd8848dba0d744d07bbeba602f4006025 +CT = 3acdbfbd154cba54f1aded051e76e8c31ad2487dd74247e4d5d71a1f0f1b6518c35f0632a30931fd + +Count = 64 +Adata = eedd0d767a25 +Payload = 4653b3e879ab18b65c5c3706a5139698262cb830a22d943b +CT = a0778fb18f94e879757557b9b611335c8715564f816fb3fa3ad112899e9ba442660eb5dfe33b2f96 + +Count = 65 +Adata = 618bcf2e3e79 +Payload = 8586383281925363ac15fb19c26d64c639c75920c792dc2c +CT = 63a2046b77ada3ac853c9ba6d16fc10298feb75fe4d0fbed54fba446028919342b2fe86ee67efcc7 + +Count = 66 +Adata = 549c9b84c7f7 +Payload = 95c25ae4445cd8c4d267df82687484667e309992fcf1e737 +CT = 73e666bdb263280bfb4ebf3d7b7621a2df0977eddfb3c0f69fc23013142f62881ccfa3037067e1ef + +Count = 67 +Adata = 92d7fa6a8135 +Payload = e58034bbb0e6f5e724e32ee56896dadae25c2a3efb8c6f2f +CT = 03a408e246d905280dca4e5a7b947f1e4365c441d8ce48ee8263568d56fae8bf35b2f2cdecbffe0a + +Count = 68 +Adata = f43e126c0f83 +Payload = d98f0dddfe9cb3cae1336970d5efb55316a65e2c51e316f4 +CT = 3fab318408a34305c81a09cfc6ed1097b79fb05372a13135de2c2fbfdddc7dd6672714af174c5121 + +Count = 69 +Adata = f02074812dde +Payload = 548747b1669c6383b793054d93957f9e99d605761c6c23b5 +CT = b2a37be890a3934c9eba65f28097da5a38efeb093f2e04743704560ff23ce0000fba8812c45940ad + +[Alen = 7] + +Key = d7572ed0e37261efa02f8c83e695efdc +Nonce = f4f96d7b4384a3930b3d830f82 + +Count = 70 +Adata = 922340ec94861f +Payload = 1edef80c57d17f969f8bde10ab38a1a8811a124de72c526e +CT = de14558cc686e1836f1f121ea1b941a9ebd4f0fb916dc870fd541b988a801cb5751c7faaf5b0c164 + +Count = 71 +Adata = 4eb379f21b1531 +Payload = ddd5282a207c1dcb03c1c3bbc9eb12a7bd28534118db2735 +CT = 1d1f85aab12b83def3550fb5c36af2a6d7e6b1f76e9abd2bc068bd1b1c309dfbd52d9a24be07c630 + +Count = 72 +Adata = 7fa89e9d6e3fec +Payload = c5b7c462eb166f48bb59c8102ee7b3dc67a28e5de7570c51 +CT = 057d69e27a41f15d4bcd041e246653dd0d6c6ceb9116964f2d114d6ab082738d05d60acca8e8ccfb + +Count = 73 +Adata = fda8665f87c618 +Payload = af793815e147e3180f5146aa6a582e343dc479f26b4226b2 +CT = 6fb3959570107d0dffc58aa460d9ce35570a9b441d03bcac1cc84bd77fe00e1a13433f2c10e3b799 + +Count = 74 +Adata = 46bde207491ebd +Payload = 47c76a0bbd5b1616b278089d41a050c509c7a1c280574bf7 +CT = 870dc78b2c0c880342ecc4934b21b0c463094374f616d1e9990c81f1bae32c953bf02ddbde047632 + +Count = 75 +Adata = a799f5f895fd7a +Payload = d554806ffc3900a0952a3c094c745808950697a6e5d62c1d +CT = 159e2def6d6e9eb565bef00746f5b809ffc875109397b6031af19f1f080dd1dd2da799059755e49f + +Count = 76 +Adata = 20225831a9ee06 +Payload = ba45e1859efae362a44a0116a14e488ba369da6c76c3913b +CT = 7a8f4c050fad7d7754decd18abcfa88ac9a738da00820b2523d3b9a0060834ac4860dae0eac570ef + +Count = 77 +Adata = 785360916464eb +Payload = 57bc338946ff78cf76adf5021e2e44e34e687fb68ad703f3 +CT = 97769e09d7a8e6da8639390c14afa4e224a69d00fc9699edff96e7cf841a66c50bbb6fb2bac7ef51 + +Count = 78 +Adata = 57b946369226db +Payload = 9ac5be9929c4fe5a9992749a38dc69874866db3d4747da97 +CT = 5a0f1319b893604f6906b894325d898622a8398b3106408986e1c33a45f9d52755c374650635bef6 + +Count = 79 +Adata = 73e4da8973c1e3 +Payload = 5a05410aa3a71f5f1a253b8576eba269c06a4c30591144cc +CT = 9acfec8a32f0814aeab1f78b7c6a4268aaa4ae862f50ded2d78592c2d89c15edc5bb7486aa93f896 + +[Alen = 8] + +Key = 98a42d7a0c5917deaf3b4de3f0cbe0a1 +Nonce = 03d33ab0c2df7bfce88b5ee4c4 + +Count = 80 +Adata = 2d5438b728b950d9 +Payload = 9aa9c8358117564371366beeec923051ef433252197aaad5 +CT = 9ff942baa60f440c17a78e9581216b9a947a67f04d54911feecfff971fdfaa856310b014aa59c978 + +Count = 81 +Adata = 6e430b497a16e7f5 +Payload = 5758a500978c71a9b90f6e5beae9d96ef05a41486b10ea2e +CT = 52082f8fb09463e6df9e8b20875a82a58b6314ea3f3ed1e46a4d7b4b4df6c831ee32116ee4dad98c + +Count = 82 +Adata = e12f98507d6514c3 +Payload = 49efe18c76a8355127d914a3a830c1c6ff2a163d728526e1 +CT = 4cbf6b0351b0271e4148f1d8c5839a0d8413439f26ab1d2b3243fc75cd1624e152f451678edcac87 + +Count = 83 +Adata = eecf8d641ee0bee9 +Payload = 49ae2309fbe6ce4e9421516b8f79ae64b1316cb849eaf638 +CT = 4cfea986dcfedc01f2b0b410e2caf5afca08391a1dc4cdf2dd6d8ca57da1880e1baff43736b3da34 + +Count = 84 +Adata = 9066367c784de0a4 +Payload = b1bda5fa4242aa6aad0f5a5b1d31d86b8d4a97588b3e315d +CT = b4ed2f75655ab825cb9ebf20708283a0f673c2fadf100a97f05439a661001513a96b896de46b7081 + +Count = 85 +Adata = edf848b2510f7803 +Payload = eaa8608f6763d968576a7e89056b9828a1686c8441b06377 +CT = eff8ea00407bcb2731fb9bf268d8c3e3da513926159e58bdcf20709b2dc2ff9946094190b5ea09d1 + +Count = 86 +Adata = 0f49cae81c8628d2 +Payload = f32029cf51609f0df9832ad1b283ea94a5356f70112c1328 +CT = f670a34076788d429f12cfaadf30b15fde0c3ad2450228e2a5bb6b4f87b9b198665203e4fdf9e7f7 + +Count = 87 +Adata = b0c47e9cce46a276 +Payload = 7a550ef9254a8da6e4fee290a76ea838ffb61d3533d4d31f +CT = 7f05847602529fe9826f07ebcaddf3f3848f489767fae8d529f416f89f1a34bbbf2ce40d943c6d8b + +Count = 88 +Adata = a6fe7c9ce2d49f85 +Payload = e67c486dd7ba9a9061844b9354f55890321ae626efaa28cc +CT = e32cc2e2f0a288df0715aee83946035b4923b384bb8413067eb95550b91b955d5c2d72d5c189b704 + +Count = 89 +Adata = eb1d11cc4876f58f +Payload = 35f2c810091e930a52e4a3f28c9c8184967f1554c2675eb5 +CT = 30a2429f2e06814534754689e12fda4fed4640f69649657f0e8e8a5a7e0ea6860bab4a4320f03ae5 + +[Alen = 9] + +Key = 2a68e3fe746f593c1b97cb637079c3e5 +Nonce = cd62d0f27b7f4864dc7c343acd + +Count = 90 +Adata = abe4f1d3812bfe3ccf +Payload = 13b4a874888db0e5d8fd814b5e7e04f7fdfbc1601ccc02bc +CT = 032835a3dbf688d09cf2a32a92b101959d33ff47500f92f4fd49840440f866d1a22b0854996111d8 + +Count = 91 +Adata = 2e21f466814d3d6340 +Payload = 08b5c773364cded74d7b308984313c17ff90eed496a27a2b +CT = 18295aa46537e6e2097412e848fe39759f58d0f3da61ea63de2f5c335df537fbbc6ae59cd562732f + +Count = 92 +Adata = dba22aabcea0e694fc +Payload = bbac1790abb7aafe272ec472c897e6363e335b3c4126c762 +CT = ab308a47f8cc92cb6321e6130458e3545efb651b0de5572acc5ed6e4a907ff4742ab6c835a427f92 + +Count = 93 +Adata = 97e9d16bd757395ec1 +Payload = 7249612dc09809bbca9dd311e720f7da2cb54ce33e3eb9c3 +CT = 62d5fcfa93e3318e8e92f1702beff2b84c7d72c472fd298b1714b5a3df454f3bc35869da75adc882 + +Count = 94 +Adata = 866cf710470cac74d3 +Payload = 060ae0ab9857324a3b2ac79f3b6e6f90f5de884ce9c7b930 +CT = 16967d7ccb2c0a7f7f25e5fef7a16af29516b66ba5042978aa33dffe2596832f98a9c8413bd898b9 + +Count = 95 +Adata = 2dd7a7f832b29ccce2 +Payload = f77a9fd5363836deefd34e1bea0882484a7ab746b4495d59 +CT = e7e6020265430eebabdc6c7a26c7872a2ab28961f88acd11dd5049f7c53d6a7fe5d7f959689ee960 + +Count = 96 +Adata = 502349a60e897356b5 +Payload = 96118dbfe53434d8aed88769a535eb0c8b5849dca1c81c34 +CT = 868d1068b64f0cedead7a50869faee6eeb9077fbed0b8c7ced9c3a0d0de8788471c5f6c2f9638b7c + +Count = 97 +Adata = debed45c9acf129268 +Payload = df5a47d3eb5c0b6cabb6711a45400602d205b82ecae9e849 +CT = cfc6da04b8273359efb9537b898f0360b2cd8609862a7801d49b4b9bead1b7de2021cff280d6f93b + +Count = 98 +Adata = 2726702dd62a6e5344 +Payload = 5a7649cb001fbb6f653cbca17756c5c1a078c2e240d92085 +CT = 4aead41c5364835a21339ec0bb99c0a3c0b0fcc50c1ab0cd69df31aba209d87ee22bd6a1dcadb168 + +Count = 99 +Adata = e8006cfb0536696ac7 +Payload = 95186d41f927cdbef42157f21d966e88061b6558b5ec932f +CT = 8584f096aa5cf58bb02e7593d1596bea66d35b7ff92f03677cc5b60c881fe834a789d28447d8fb54 + +[Alen = 10] + +Key = 46b067cf9b1a28cf187002e90b14e130 +Nonce = bad8c03292bf01cfd8d34f860c + +Count = 100 +Adata = 8d65880eddb9fd96d276 +Payload = cc0915194218d4536e467433cd6d79ff1d9eb9ff160ab684 +CT = bd56edc015692c6ab9bec493a9893863598414a3d11a6a0f27ecdcb257d0d30491e5bf1aa8f90958 + +Count = 101 +Adata = 8a65cde13149d9d54a5b +Payload = 28257133b1d8b0b2be4faecd6e819ac783707a5c5f50c302 +CT = 597a89eae6a9488b69b71e6d0a65db5bc76ad70098401f89b10f9fc201e4128696dcd899dd2e24ea + +Count = 102 +Adata = e999ec3e1bfb25b5877c +Payload = 96ab0cfc204bafc4f5851d6c682d631d0c5ad03ac925a943 +CT = e7f4f425773a57fd227dadcc0cc9228148407d660e3575c8c522e5ba5adbc6a639cbd06f103ebc9e + +Count = 103 +Adata = a8554441e073d6065dce +Payload = 50925853a84a33ff392154e4e737efc18dcfc98f4d5235a9 +CT = 21cda08aff3bcbc6eed9e44483d3ae5dc9d564d38a42e922e1a4e0f7ebc3cff3915d27971cce7e91 + +Count = 104 +Adata = 838f0be8d04d28d77549 +Payload = d0700658d5f4010ff21091f3d119c99645e339198029c3a9 +CT = a12ffe818285f93625e82153b5fd880a01f9944547391f22c215c88d80bffc881aff10ba40f11976 + +Count = 105 +Adata = 20f014d928d5b25fbaf4 +Payload = 4bdf28748a0c281dd49c7294ae8e55fe7a52d45ff6384db3 +CT = 3a80d0addd7dd0240364c234ca6a14623e487903312891382cc9391bc06aa6ca9d486a4e2a218c54 + +Count = 106 +Adata = 56c026b8a71974ff7ecd +Payload = f75db057f0276fff85014f54ecdec8f90b96a2a982db14cb +CT = 8602488ea75697c652f9fff4883a89654f8c0ff545cbc840778b05c6c582a0bb7d1d9dcf6a46b9f6 + +Count = 107 +Adata = 75c3b9e52648a4f9aca9 +Payload = c15c554169dbb9b08494afaa44819a10dc9ddad54199ab54 +CT = b003ad983eaa4189536c1f0a2065db8c98877789868977dff47d9ebbd3cff14623b10cecc94b53d6 + +Count = 108 +Adata = 1c76c3014a14b7fa1ca8 +Payload = 19eef6f798fc68086aad1cda6d7976cdcfe6b8af74598032 +CT = 68b10e2ecf8d9031bd55ac7a099d37518bfc15f3b3495cb9d2b74b84dc170c00dce85b56e346a976 + +Count = 109 +Adata = a4eb60d4eb7ead1bd0e6 +Payload = e06e5dba5ac35cfd07949e5cc12ad70507d4a86a952ecca3 +CT = 9131a5630db2a4c4d06c2efca5ce969943ce0536523e1028d92e19fd8b5c1fcbff36adaa5e47ae84 + +[Alen = 11] + +Key = e94dac9c90984790a7c0c867536615ff +Nonce = c19f06f91e645d4199365f18c0 + +Count = 110 +Adata = 537038b5357e358a930bd6 +Payload = 4d64461c55eb16bf7b9120f22be349598f2f394da8460dc6 +CT = e9fc5004c2359724e1e4411ae6f834ef6bea046d549753c88790c1648f461a31c84e62ea8592a074 + +Count = 111 +Adata = 7e3d7b3eada988668f3784 +Payload = eab7d5dbd91d4cbbac8d79fadd70b5dcb3baadac5cb713a3 +CT = 4e2fc3c34ec3cd2036f81812106bc86a577f908ca0664dadacb1d1c9231d2c22ecfeed622792dfd0 + +Count = 112 +Adata = 78b107b29c4878ff18f749 +Payload = 3c6ae2e2578875a1f5611582528e058aece2ddc33a4dde3d +CT = 98f2f4fac056f43a6f14746a9f95783c0827e0e3c69c8033fffe60299768f048e7098033cde046b0 + +Count = 113 +Adata = d293908bb516c5f3a411b9 +Payload = d7a46e726ed43f1580eb52141a93390982cc809dc833e3f0 +CT = 733c786af90abe8e1a9e33fcd78844bf6609bdbd34e2bdfe4ee6ebc0d90a0de05b428495c93e1801 + +Count = 114 +Adata = 33ef208faad4d2948c9e67 +Payload = b1fe5d9d34157193fc0608cd8ecb872e17720f5f6814a466 +CT = 15664b85a3cbf0086673692543d0fa98f3b7327f94c5fa687e7e64cc0fcd6a92c79ceb6ce2abd8ee + +Count = 115 +Adata = b7f7ed9ccac3c2b4fbfee0 +Payload = de6bb539fb7a9c87414f62a7cf25a4cfca176509e991af41 +CT = 7af3a3216ca41d1cdb3a034f023ed9792ed258291540f14fb02b53bc779e0976b634b0d1b88fc0a9 + +Count = 116 +Adata = a6e287383927f76e4927af +Payload = 8719d20c20c8959068b8adcd65e6f6bc7b3693828f0735a0 +CT = 2381c414b716140bf2cdcc25a8fd8b0a9ff3aea273d66bae3c37fa936243b393f07fcccb0fc13e41 + +Count = 117 +Adata = 70828be6dd93954f4e7b6b +Payload = 30b39426831f61c8ba5f2ef5b71f0c4b2f916e3b5a578110 +CT = 942b823e14c1e053202a4f1d7a0471fdcb54531ba686df1e0d7534a489e6d242966ebea4455f8f79 + +Count = 118 +Adata = 506015fc2831df293f4da0 +Payload = 818d5d810f678629f078723f5c6c3657271077533bfb7c29 +CT = 25154b9998b907b26a0d13d791774be1c3d54a73c72a2227ccbf64f04e95b180d09e843847d22104 + +Count = 119 +Adata = e9394b0245b379e68e3dea +Payload = f0613205a7a0822849df9e8a3cf6caf281f3adfa966c5507 +CT = 54f9241d307e03b3d3aaff62f1edb744653690da6abd0b0927b546ef8cd717073832584fb25a0645 + +[Alen = 12] + +Key = f6bb5d59b0fa9de0828b115303bf94aa +Nonce = 05358f33e1fc6a53ab5a5c98ce + +Count = 120 +Adata = 040b25771239cc2a39446e3c +Payload = 011fc50329bfd63a85ebd4f7693363602f1a4147371270b7 +CT = 4432d7eb42980734d34f19c50cf8abf71ac1b19ed75a727854e5d050a405f755047d09cb0f49546a + +Count = 121 +Adata = 50a1d37fa2f3462bd304631b +Payload = c90e40540d372ab1eb00ea5d5b8de5bf7c94ce4e376d6949 +CT = 8c2352bc6610fbbfbda4276f3e462d28494f3e97d7256b862abee8547ee3f24cfa677468ecc1d121 + +Count = 122 +Adata = ac3bb872a41df35e415d2b0c +Payload = 9e7be78c0ab9e6a4c6c257e77c63681bea35d951f168b0c5 +CT = db56f564619e37aa90669ad519a8a08cdfee29881120b20a61cef865ce4080e7c7abfc43f62c03a3 + +Count = 123 +Adata = e3106ae6456153dd922640a1 +Payload = 00df0c5a5d3eceb2bd293066529799544f846672a9a1d31b +CT = 45f21eb236191fbceb8dfd54375c51c37a5f96ab49e9d1d4e1d19c321a1e0852adba939b447220ab + +Count = 124 +Adata = 297b4498bf5427e6341aa927 +Payload = 14967a0476dbaea03b07fa8d40d344eabaf479be2443243a +CT = 51bb68ec1dfc7fae6da337bf25188c7d8f2f8967c40b26f579ea5fb65018abdcde1a39f6859ecb56 + +Count = 125 +Adata = 5de60dc0e3b5bda0b33a9520 +Payload = 2da3716d76d10b6766a1f9cbf9f420316fd5f396e7b9a2ba +CT = 688e63851df6da69300534f99c3fe8a65a0e034f07f1a075c2629ff871ee15745fd8c1ddbdae4c29 + +Count = 126 +Adata = 1c9b8541943ad50b4243c179 +Payload = 8c1b3ba18d1f5cff74a457aadd6b3e7d093d06ad2622e6a0 +CT = c9362949e6388df122009a98b8a0f6ea3ce6f674c66ae46f04e198ad16ad1106d3ba6172f4a13a8f + +Count = 127 +Adata = 51e926d2542ac8faef61465a +Payload = 88936e97db070c0ec2aa58d1c6f5b34df3d32ddf7db34a8b +CT = cdbe7c7fb020dd00940e95e3a33e7bdac608dd069dfb484475981131e3934ec6d41e00d502729799 + +Count = 128 +Adata = ebefbac97b363e6f32526aac +Payload = c20742e4b410c5b661da373a905fb0ed55b20e0e879eff5c +CT = 872a500cdf3714b8377efa08f594787a6069fed767d6fd93e2c005b5bebe07ff578b1b4bc51971cd + +Count = 129 +Adata = 1ef059ac7d648e9e32d9b1f2 +Payload = 65c55ca21a89a8325365bf2be861d700559de2eabb41b37f +CT = 20e84e4a71ae793c05c172198daa1f97604612335b09b1b021a25f15b5b4229a872a9199972c85b3 + +[Alen = 13] + +Key = d1da2e961e78063af8de41865b226873 +Nonce = 03739f5474857006340cce554d + +Count = 130 +Adata = e3afd091d2b588465872a6300f +Payload = 8e5fa1a6662a8378cda15697e926841594f2f394fa5a34ab +CT = ca0d95e3ff186ad6b88d45fc4079e6b7b4a615e7e8dd5f4742d522cc9dc19c47a4fa0b1528069cf8 + +Count = 131 +Adata = ce3186bb737753b59ee76b748c +Payload = 311ebc5ff2f625944562ea699b2690df3e6e64a17c62bd3a +CT = 754c881a6bc4cc3a304ef9023279f27d1e3a82d26ee5d6d659b26510b8f25610799e011d7c850ecd + +Count = 132 +Adata = bfd636989dfbcb0edc9f014cc8 +Payload = c96cee5ba7b799f16254a17b1870cdb85fe0ef3f42110c13 +CT = 8d3eda1e3e85705f1778b210b12faf1a7fb4094c509667ff52942aa0d39649f3d9ed535bebc2b603 + +Count = 133 +Adata = 4812b092aa59d57451bfd812c3 +Payload = 13b1b4404dc5735655139414fcbd02c5327ae9fb148bd324 +CT = 57e38005d4f79af8203f877f55e26067122e0f88060cb8c8c1e61efb9c1d84ddac2d24f43531f569 + +Count = 134 +Adata = f6ef9ac4f4c9ce1e4309c64fa8 +Payload = 6c5b59319e2710f5d63407f85b424d1860425ef8ce0cfe53 +CT = 28096d740715f95ba3181493f21d2fba4016b88bdc8b95bf13350de0ef34df12fb945b0ae0a0d9bd + +Count = 135 +Adata = 9bf12168bb3d79ebd25262f2b4 +Payload = 968e1d78008da78611e82985c4028e86770858cfe61c3723 +CT = d2dc293d99bf4e2864c43aee6d5dec24575cbebcf49b5ccfa0734563638598d8c4bf1fcd94009925 + +Count = 136 +Adata = 7d870d7e52d3053c65eefad477 +Payload = 6a1306d911434cc7400d2f9a95e36aedceddca2b3d583f51 +CT = 2e41329c8871a56935213cf13cbc084fee892c582fdf54bda1f5fc53b08aca82bccfba6fbcb27e69 + +Count = 137 +Adata = e95099f04371e445e5eaa1d80e +Payload = b9197eb50c8168d16b8a12bd261d553ffcc521d979b26fee +CT = fd4b4af095b3817f1ea601d68f42379ddc91c7aa6b3504027d1a922953facbd630d7fea6b63594ec + +Count = 138 +Adata = 3e80eb03db6545204ef4241ad6 +Payload = 95f59e36eac8eb3b51709d635b07fa2da0976ea20e25807f +CT = d1a7aa7373fa0295245c8e08f258988f80c388d11ca2eb9383fa000d10078256b71249d9d1f1846c + +Count = 139 +Adata = 9748798c0f3cc766795c8ce0e4 +Payload = a48db9add9ecdeb49e51d3ab7bb2075202ed2aa50c0195b1 +CT = e0df8de840de371aeb7dc0c0d2ed65f022b9ccd61e86fe5d2773c2f55b752477c489facee812c614 + +[Alen = 14] + +Key = 1eee667267ef10b03624cf9c341e3f75 +Nonce = 0630a3eae27e505c61c56e6560 + +Count = 140 +Adata = d24651ef0561282d3e20e834960c +Payload = 798e31cce0a83702a95171fb1162a17b9ce00ec3592ce262 +CT = f3c3e52f1a1ff528a8d3783ee4e75f114e3e6416334815d2d9236d5c5c9319092078411b72c51ba8 + +Count = 141 +Adata = c527d309ab29ee91c5fc53117e71 +Payload = d79cd4c8891ec4ce2c51136712d23b32266b2b73768aeb1e +CT = 5dd1002b73a906e42dd31aa2e757c558f4b541a61cee1caed8ad2a48cb734e3f93e602c15c7c775e + +Count = 142 +Adata = a93dfc3944514ddfc5acdd89fab7 +Payload = d7fa81c949f1f2af29dbd56529b307e3b348e996d0936455 +CT = 5db7552ab34630852859dca0dc36f98961968343baf793e5f34b297f3f106a9cdae255f7634fbd0f + +Count = 143 +Adata = e502abe21c7b22120693a08ef3e6 +Payload = 6330caaeddf0473d564d175b9408c6f12e6d3cd4ee2c423f +CT = e97d1e4d2747851757cf1e9e618d389bfcb356018448b58f4f5d9c3dbfe3e2fe03a002e55039ebe6 + +Count = 144 +Adata = a49b34dfad43333fb2ffd701a2d6 +Payload = 45671482c390e65f75de15ca91b93596e9bf3d6fc9178bcb +CT = cf2ac06139272475745c1c0f643ccbfc3b6157baa3737c7b6f7bb0749c99d75740f2d193fef36c60 + +Count = 145 +Adata = 9e4d8aa3dbdc4d4b4b8d72734f52 +Payload = c8f34bea8bdc403a48d8ed9268429141cd03c29558050ef4 +CT = 42be9f09716b8210495ae4579dc76f2b1fdda8403261f944ceec82fc674da9efa6926e8641729ed8 + +Count = 146 +Adata = 052327ad59cc791259817fd0ed96 +Payload = d8d1c57b16c23894b66023c29f8648ce4a6074647e1f5f69 +CT = 529c1198ec75fabeb7e22a076a03b6a498be1eb1147ba8d92ff19e93f60c8f3a511300fddc38ee59 + +Count = 147 +Adata = 14bc3c44c001ccb261a2a0526523 +Payload = 71c14a7031033db15bfe23b75fed9daf8886dd11392a0b78 +CT = fb8c9e93cbb4ff9b5a7c2a72aa6863c55a58b7c4534efcc87fa00fb244eda0d77cf6c05c8fd590af + +Count = 148 +Adata = 3477384c396a9e9efb3e169722cb +Payload = afa795f836763a1210bb36fef167864f73ba3b6abc593537 +CT = 25ea411bccc1f83811393f3b04e27825a16451bfd63dc287bae19612657c87d3bb73cfb8cee7c8a8 + +Count = 149 +Adata = 0c3b9a6924ad506038cb2d6590c9 +Payload = ca4a186f116a179579e3d327aec3f5be358bc7094f853bc3 +CT = 4007cc8cebddd5bf7861dae25b460bd4e755addc25e1cc733d9713d2e916c23ac3039de34c295fc4 + +[Alen = 15] + +Key = dbbd26f5d9e970e4e384b2273961be5a +Nonce = 0b1eabe504ef4822542e397fec + +Count = 150 +Adata = 477937301c83ba02d50760b603e0ea +Payload = 553714e17a208a2eceb847a4a2d95088388b1ac8d8ca43e0 +CT = 1c80213268bad5402c4dc9b5d836ab7499810d0d8a974716df9a0e986ab2890736423bb3772cec3e + +Count = 151 +Adata = c91eb5a07ff19c044023e5cf339203 +Payload = c94d0b9e728413c58202cb3f6b82dba7aa9e3ca0a72c40c7 +CT = 80fa3e4d601e4cab60f7452e116d205b0b942b65f571443139f907a92cb01215e3cda84ae13af48b + +Count = 152 +Adata = 38c71a8e9b279c605c7f0418a0afc1 +Payload = b4e8c4fd5ad98a1be8b5a11677c57ca1c1694e3528092aa9 +CT = fd5ff12e4843d5750a402f070d2a875d606359f07a542e5f3dbd8dbf7485106cdf9ea0e7088a5650 + +Count = 153 +Adata = f2c76ef617fa2bfc8a4d6bcbb15fe8 +Payload = 578ce26cdb5ba2e8798e23588e5cd04ef782820b80e49a42 +CT = 1e3bd7bfc9c1fd869b7bad49f4b32bb2568895ced2b99eb4853fde6f4dca88ff11bbce20ed9e5012 + +Count = 154 +Adata = 36004342dd74e7966692a848b2c11e +Payload = 78733c635d4d4e8b0729732f1e174dfcec4e020a7ac3870d +CT = 31c409b04fd711e5e5dcfd3e64f8b6004d4415cf289e83fbd94e979108fcecbd32f6bdf72f0ccb4d + +Count = 155 +Adata = db92bc3fe5d4141aeb39baea6f114c +Payload = c7aafe7760945e45703c1e19f1032dfd56ddc216c3b03826 +CT = 8e1dcba4720e012b92c990088becd601f7d7d5d391ed3cd0229c8f9d4e39fc16cbdb44236ef125c7 + +Count = 156 +Adata = 34ec2d5b6f0d950509b47a0637d74c +Payload = 2345e36a63be0b78df95e60907c78da0e48e61e70685a1f3 +CT = 6af2d6b9712454163d6068187d28765c4584762254d8a5051c9ab7cb0a779c3fa78c9ee12603802b + +Count = 157 +Adata = 6ab658d177c2dd87c9b8787cd70182 +Payload = b0725f735543eb0c0ec88ae69b140f5787d28ef4a2e36d57 +CT = f9c56aa047d9b462ec3d04f7e1fbf4ab26d89931f0be69a1648c6307ec5ea304045a7cdc93f36b9d + +Count = 158 +Adata = 483f135c61250fa610b4d14b99ecf0 +Payload = 315a947bf5291278d446d332ee5ca0def7655d5c957a8fb4 +CT = 78eda1a8e7b34d1636b35d2394b35b22566f4a99c7278b42364ff3b1ad915347b1c7f062b10d3da4 + +Count = 159 +Adata = bb022aed60819ef84ae83ce27db9d0 +Payload = f78d00755bcb45e6822121fe7cb03c8e627c9f548ccd7e7c +CT = be3a35a649511a8860d4afef065fc772c3768891de907a8a7569808dab58d42181543b2e2d05992c + +[Alen = 16] + +Key = 10a7720f2e18f739c26924925af6b670 +Nonce = 8c4e7813ab9bce9dafee01c628 + +Count = 160 +Adata = a209941fab710fda38d11c68b13d930f +Payload = e59782a9aea45f467b90e51a0fdf166baba05663def2d8b6 +CT = e357b1ccdaca6f3506dc45279c2e4c59f5307a5fd6a99cd72341ea8c0785569973f90ee9ee645acc + +Count = 161 +Adata = 2e2f6f9755a492ee54df77b2ecab9808 +Payload = 042a072f6ebf11f79fcb4f5a64f7946dc837d9d2355785ea +CT = 02ea344a1ad12184e287ef67f706ce5f96a7f5ee3d0cc18b703eb81224cdb1fd2e1cfb2fbfe1e402 + +Count = 162 +Adata = 99e98c9983c85d1f49ae43ebad67a652 +Payload = 5db6bda27910e7b8b61ac476c6532570b71b3932bd6a698c +CT = 5b768ec70d7ed7cbcb56644b55a27f42e98b150eb5312ded64c4aea7f17f18f068897557c93ffaaa + +Count = 163 +Adata = 37a837d73fa15793f6f823fb99c2ea74 +Payload = 8cac261a461c3ddd2642b8e4e5c3389e491fcb2ff8356412 +CT = 8a6c157f32720dae5b0e18d9763262ac178fe713f06e20736f3b2e70e6e2dc7acc74a823a7f49722 + +Count = 164 +Adata = 11119a4e779cfb64c736d425e4ff554d +Payload = 3429f9b088b501d7944c462694d0799568282e7ce07d3e61 +CT = 32e9cad5fcdb31a4e900e61b072123a736b80240e8267a000dc3b57096f0df1d4eb5328c416921bc + +Count = 165 +Adata = 962d7d4305f23d1692747b504960c0a4 +Payload = a46ae4c71d4c9eb72fabfa76b8074aa02e07653eca10eef5 +CT = a2aad7a26922aec452e75a4b2bf6109270974902c24baa94f62ed804e9f2ac0f7001d0f35ea9f3c1 + +Count = 166 +Adata = bbb1fdfefcf3657ba6cd93ff341a04e1 +Payload = 92f5e3083f57c77ac9553a2024a66489698bd2261f05d415 +CT = 9435d06d4b39f709b4199a1db7573ebb371bfe1a175e9074907dcd7ac1e0bb248d46c3036c39fb02 + +Count = 167 +Adata = 74be126f7c596642dafa8fe3da904e69 +Payload = 41ecc3aae5cfebfad7921a47a0684601ffe73816380f8716 +CT = 472cf0cf91a1db89aadeba7a33991c33a177142a3054c37787cbb80fd21127feca7e76fd6947d5b7 + +Count = 168 +Adata = d72cc521c90a468522af8966c24799f3 +Payload = 8850bdda4bd0271e333db344a47b837183eb48269c3dc0b6 +CT = 8e908ebf3fbe176d4e711379378ad943dd7b641a946684d7cdb5d1243b6e73b8e380d8ca041647db + +Count = 169 +Adata = 28f427fba8d0bb0380bbe5072ccfa519 +Payload = fdd3ca2f193f93f5a349b50357d26748b767cde6ab5cbfe7 +CT = fb13f94a6d51a386de05153ec4233d7ae9f7e1daa307fb864a0ae8604b103f882f17db893ed5c576 + +[Alen = 17] + +Key = 6bffab1f4f4c1ff66b4a669b515b2f8d +Nonce = ddb34d5e0140fb96d690e1a2b7 + +Count = 170 +Adata = 5cbba9ea778e01af00afb2a934f28c7211 +Payload = d91b12e8655dd92b1332fc1d71c391c96a17111562d90ba3 +CT = d302e5b2d5d90433186b804cd7717e2db2f22cdc34fb2942ab30780a2c4f12af8f35350d65284c59 + +Count = 171 +Adata = 1583138aa307401dddc40804ac0f414d33 +Payload = eeafb08d4a4819f5682a01d44371e34cc5729079e74e73a6 +CT = e4b647d7faccc4ed63737d85e5c30ca81d97adb0b16c514746577901b7f6feb88b8e2b8562f9cb5f + +Count = 172 +Adata = 23931c258c84086500c6a3b6eda457e6b5 +Payload = b8737d5bbfc976c2d8d9786148dea664dd83cee98df537b5 +CT = b26a8a010f4dabdad3800430ee6c49800566f320dbd715548735a59390ba7a892741694f3a89b0bf + +Count = 173 +Adata = e12f98507d6514c3b551d240595346bc9e +Payload = eb021b63c61c0b194bd44870608d7ef0b932b6104412d7a9 +CT = e11bec397698d601408d3421c63f911461d78bd91230f548f4f81ed18cc1820375a7bec2318cde1e + +Count = 174 +Adata = e14b87d49d231c0199eec627fd7f1b5332 +Payload = 93b42584c4956078359d77e80aef52281b9228a1f66aa36b +CT = 99add2de7411bd603ec40bb9ac5dbdccc3771568a048818a187b430caa60d98dc3e2aeefe6249b44 + +Count = 175 +Adata = ca095aec96a8b093e62b10f0950ce35ce7 +Payload = 6a788d8238c7b313b8eba27b210a71c36819d719115b9b76 +CT = 60617ad888436e0bb3b2de2a87b89e27b0fcead04779b9970a77372b727408e1bf5a70790b9eba3a + +Count = 176 +Adata = d1cac02b34ad33c0e77a5bda2c3baf5e5d +Payload = 3bc1ee54d0094603dfc68eee118e547d031fb36e464e776d +CT = 31d8190e608d9b1bd49ff2bfb73cbb99dbfa8ea7106c558cdc1f5cb4d4fa2204e82eedcb3784443d + +Count = 177 +Adata = 065c06b49a49898e20bb679e35edbb1f76 +Payload = 8a12adb8b746216baa8a418725e608e4377f13816a036a10 +CT = 800b5ae207c2fc73a1d33dd68354e700ef9a2e483c2148f12413f9496592a75a1d6e42ee3a258607 + +Count = 178 +Adata = 98a42d7a0c5917deaf3b4de3f0cbe0a191 +Payload = 30a226c07401d0ae24c73d682e3a6e7e377ec1613bafba17 +CT = 3abbd19ac4850db62f9e41398888819aef9bfca86d8d98f6b571a3150887df1ac5f813676b2eb24f + +Count = 179 +Adata = e245a7528931841b52a5f59d861d98d7b7 +Payload = 3d17bcdf30445ebd8a9b6aa2fe11d443c1161bb1ee69ced0 +CT = 370e4b8580c083a581c216f358a33ba719f32678b84bec3131aa5e4657c92e31c69ab18d447d3578 + +[Alen = 18] + +Key = ae6136df9ab43631ef143515dacedbe7 +Nonce = c5c445792208a50c8e93d64aa3 + +Count = 180 +Adata = e04006b68c83a5dd4ceac3cde238e48895ae +Payload = 6a493c5ef3769ccc4101dbb2eb36e1e5bbc577a057ce0731 +CT = c7584c0203c2535c5702c6ae93b7cbfb066f4a055c627a180d6d676d11fce907b5c93fa1ed7bff2b + +Count = 181 +Adata = 5da64e368f45153ea5b7ddca966b6c5b699a +Payload = 15e0c672c6764f3699d9d3e7120f8ce5daab166f08fdd074 +CT = b8f1b62e36c280a68fdacefb6a8ea6fb67012bca0351ad5d2cd45f211b1a1364c91ad07959bf0ee5 + +Count = 182 +Adata = 1b315d024bb5d1e03d7510e61f37d8adb10a +Payload = de907d58cd8f5a72acaa1d329b937dfbbfed65a4e45eb029 +CT = 73810d043d3b95e2baa9002ee31257e502475801eff2cd0018f021a98b2edfb0b7500363099c2a1a + +Count = 183 +Adata = 8691ba4f9232ca86f919fe72ddb39c91d707 +Payload = c7fa314d27be79f9d3e2d1e188c1785b0c970f91b8ed4290 +CT = 6aeb4111d70ab669c5e1ccfdf0405245b13d3234b3413fb92ac9aeb018c48f3902276ac759710b6d + +Count = 184 +Adata = ff0baf1cbb5884a9290ea7b5ee49915efb4b +Payload = 33b05b20f3c849fac091a5028cbfa0bc9a1c32514136fee3 +CT = 9ea12b7c037c866ad692b81ef43e8aa227b60ff44a9a83ca7dac49f606dadb9f7034e0a1860d519b + +Count = 185 +Adata = 2d118cda20700bc2748ea1753fbca6f74933 +Payload = f43832e420e2eccd5d80502bea2ba1804e17d4433318fc86 +CT = 592942b8d056235d4b834d3792aa8b9ef3bde9e638b481af623ccbab19c1442806e21c5a820945da + +Count = 186 +Adata = 0c7a5fd2010c999a8a0efa81f89ff5bfefe0 +Payload = ceb203c842a962183f22e602644fc66e4290b3d5be445fb4 +CT = 63a37394b21dad882921fb1e1cceec70ff3a8e70b5e8229ddbcd18947ac1800856c9c92eb0388c70 + +Count = 187 +Adata = 73fdddb9e0a64f5671fd70c4ea8443507789 +Payload = d6015b6bd5f5eabb2a649129f8f727c06a3ad59499f21caf +CT = 7b102b372541252b3c678c3580760dded790e831925e618639c29ea73b0c5aa130d8b14f7b9926a9 + +Count = 188 +Adata = 82c4484e3a6e18b6bbfd78b69b00c40b30c5 +Payload = c288b810fb533441bd549d02c0b28d5b834293683eaacda2 +CT = 6f99c84c0be7fbd1ab57801eb833a7453ee8aecd3506b08bf0a0f148ae138c2ea02538c8fd7ac76c + +Count = 189 +Adata = 267d8385b14721eded743cffd69e4d595f7e +Payload = 667cc47d13c34923be2441300066a6c150b24d66c947ca7b +CT = cb6db421e37786b3a8275c2c78e78cdfed1870c3c2ebb75285eb537e7583f04e040a0ddc41106213 + +[Alen = 19] + +Key = f1908328edf2996ebfc9655472ca5ad0 +Nonce = 4c693364546930b6c5250e2699 + +Count = 190 +Adata = 4a3634e5028df97fbe00eb016e8ea4f1918faa +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06eb +CT = 90c850790b0b380f5aeb2488fdf43c9d5ef1759861e86f6e52570e769629dcc2e568737ba53a1195 + +Count = 191 +Adata = 041b93e3fc059fa44aa755e88df277b9b6e499 +Payload = e61ca7310172eec16745a73e34516f65844eecd0dbc5566a +CT = 980af6f885e3e6f2e2ba4a2bb3e020d1a87976ba1bf63feff1d82ec19a2e3ec43bbdb34e10999d90 + +Count = 192 +Adata = d1be393376cb5d23cf8139da0fd92f3d520ae9 +Payload = ea887edee68ad5fa6bae928aa480dda898037f820700ec52 +CT = 949e2f17621bddc9ee517f9f2331921cb434e5e8c73385d7f2abb0ce4de9eeb5e8af9cdf3391d3cc + +Count = 193 +Adata = f3e551b34d2db1286a9f41085e4dda95ec3f75 +Payload = 71fe1ba5d299495d2a56039c64032ec6263d437f55e3f5be +CT = 0fe84a6c5608416eafa9ee89e3b261720a0ad91595d09c3b239c73b01ba49a8498b5ff4833851069 + +Count = 194 +Adata = a69ddc66e63a3415f21009d53adcf26bc1a9a5 +Payload = bd04d854216740a6ceb9827cbddd83761d19feb2a21d78ef +CT = c312899da5f648954b466f693a6cccc2312e64d8622e116a2248dacd3903c26a2dc5ae649566ad67 + +Count = 195 +Adata = 5735d6f5882d8f27155eb4cc285a65138ad64a +Payload = 33b44873a7a1e5b0fdbb7e7347623e4fa1ccd937feb26fda +CT = 4da219ba2330ed8378449366c0d371fb8dfb435d3e81065fd4156cf7d97b2e744351b6960a807cf8 + +Count = 196 +Adata = 5d94ed976ab2063512690ae704c3b115519742 +Payload = d3909d577a4e89642227cc6fc146b61bc18392175e342898 +CT = ad86cc9efedf8157a7d8217a46f7f9afedb4087d9e07411d5a50086b6711ac72533c3c5717f6892c + +Count = 197 +Adata = db20b384620ab8691aed2fed14a745188d94c0 +Payload = ba0716355fffb8ef947d2a15eb58375a1ff1084c56699029 +CT = c41147fcdb6eb0dc1182c7006ce978ee33c69226965af9ac54fb74ecb9a5163b01b9dbf97ff2f999 + +Count = 198 +Adata = 94897cdd04e0c8480b2ef7b5201dda37558ba9 +Payload = 5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9cc +CT = 215d1e5e323b409e36cc81509d1d78cbf27d452d494cb049d2a81702f665ff5c54f586defd268c94 + +Count = 199 +Adata = 95c44e1e5ad256b3ce1cc1d87137a1e09f1fd4 +Payload = 598e91d39c414496fd5e69f2cf80826b4e7d59ba28e0a0d8 +CT = 2798c01a18d04ca578a184e74831cddf624ac3d0e8d3c95dfa641889723e163825ab65727e8a5343 + +[Alen = 20] + +Key = 61cb8eb792e95d099a1455fb789d8d16 +Nonce = 1f37b3e59137f2a60dc09d16ac + +Count = 200 +Adata = 09db3efac9473f713da630ae92c2c8604c61c51e +Payload = 6ad541695a37c32d73ff6d5f870abd5b0f362a8968c4fce0 +CT = e65fcc975865c1499b088b58ba163283085d8ca68dc3b235d89756e5d78753ef22c012ae34b39a20 + +Count = 201 +Adata = b6d07035aed9c141c713cc3bce60f7ba8ac2545f +Payload = 9cce4c82fe9d38ef64ac8abdf0619f201a25ce6903675627 +CT = 1044c17cfccf3a8b8c5b6cbacd7d10f81d4e6846e66018f2fc78ebae9c143a7283b0641e1f83f5a0 + +Count = 202 +Adata = 80a5ab693378af29cd5a33555cb3579f9ae540aa +Payload = 7295a7aed3e987baef19ad68c33ba5a5dcbff27875ff5236 +CT = fe1f2a50d1bb85de07ee4b6ffe272a7ddbd4545790f81ce35a7e44348d2b3085348f787128a4e96a + +Count = 203 +Adata = 220817144a15a0a654fc1beaabce60270aa72df8 +Payload = eb21fe20fc4f92452b261eac0d7b70016f7469afdff7a3f5 +CT = 67ab73defe1d9021c3d1f8ab3067ffd9681fcf803af0ed2024dfc096cd8a09d2d81f6146fb54082a + +Count = 204 +Adata = 5a2423c2ff2d642c80ac1ca27dd779321f3e9c01 +Payload = 23bf80f51dfd83f63986910e69d54a315c2bfb43f432b7de +CT = af350d0b1faf8192d171770954c9c5e95b405d6c1135f90b5da82204f4dd8f535cb2fec2f133d882 + +Count = 205 +Adata = f2c76ef617fa2bfc8a4d6bcbb15fe88436fdc216 +Payload = fc3a50cc8a68778327923ea697f5388da4c814381e29c5e4 +CT = 70b0dd32883a75e7cf65d8a1aae9b755a3a3b217fb2e8b31108630135498ba409f4b6c8caee8a85b + +Count = 206 +Adata = b40c8c1d2cee490653105ca2443356cdb63e4fd0 +Payload = 465e41c69928d08c33e063ea119595a04d0de6bffd17bba5 +CT = cad4cc389b7ad2e8db1785ed2c891a784a6640901810f570f89c515837d129ba41f9c24b0229ddcf + +Count = 207 +Adata = 6ebfa1e8f80b3cdb1bedf2e3c7e74f30f55c38e1 +Payload = 3f98ee3922f8f1086e3135ae66c5465426b13c8794954880 +CT = b31263c720aaf36c86c6d3a95bd9c98c21da9aa871920655a352fa6b9c4e40733ddcd3fcdaf9ae63 + +Count = 208 +Adata = 6d0159861031c1a5f01aab35927fe2ab28154d19 +Payload = 5b43067a5ab3a9f9e633fdc084c44ffa7f11edd12ea5873d +CT = d7c98b8458e1ab9d0ec41bc7b9d8c022787a4bfecba2c9e82c1aa13f062c0f1f5008e27ff2191942 + +Count = 209 +Adata = 15e5ade017b30ab41878a2747e93aa91c61c2908 +Payload = e40b7e9e46e339e64891526e730b3bf6562fa37acefce307 +CT = 6881f36044b13b82a066b4694e17b42e514405552bfbadd2e149dd02bc7face0c4dfe4e501c2ac2a + +[Alen = 21] + +Key = be1ed49e2cb0caf6b6a0940c58453b93 +Nonce = b78ad129457681fa7346435b97 + +Count = 210 +Adata = 161d92c7df1ebb0924719e066e08b95eb4914a5eda +Payload = a9eec383f63892521e4616fcbadc5485942ffaf4669c43a7 +CT = 949be340720c4fdc4adc05cb777dd81a2549628d33fba07e62d2b338a7b34ebd9d85c244c952d681 + +Count = 211 +Adata = 6b1d94bc0c6e45fc905c509ea667853e4b2c5a8848 +Payload = 7b44a093162bfc8b4d65f1031d890a6b08a3705b142c0c26 +CT = 46318050921f210519ffe234d02886f4b9c5e822414befff8a4defafeb3d61dad8c007b68d8fb9b3 + +Count = 212 +Adata = 868dd3e241f60f097a7a2fe571307ee5eb961218ca +Payload = 28c4d6de3e2ce51b849b135d9cfd3084f0e3155447cad9d5 +CT = 15b1f61dba183895d001006a515cbc1b41858d2d12ad3a0c57cbab553b511d68a4f41db211d0a2fc + +Count = 213 +Adata = 3776f37fbf8803bdfd246ffaff2e59658a6c3f0ebb +Payload = 16d345606a315ad2406abbcb43cd8cabe948107ba6d17a72 +CT = 2ba665a3ee05875c14f0a8fc8e6c0034582e8802f3b699ab0290fd7dbf0afa3e597274e3c9fe170b + +Count = 214 +Adata = d0f2769eba9b8e618f00eed6b34c261c59322a253b +Payload = fcbbcdd9599a86e7c8ccb9347065789a9728ca1220fa51ca +CT = c1ceed1addae5b699c56aa03bdc4f405264e526b759db2139c7dec3960e6aba3174d793b4e08f449 + +Count = 215 +Adata = 2be180892faed0bb75887668d187807666d3c66c68 +Payload = 8d145b1f792cc31a2e5b86216609bb018e7aea3012ff70a5 +CT = b0617bdcfd181e947ac19516aba8379e3f1c72494798937c7057b9e2d844e86ee5c3ecfb3270804e + +Count = 216 +Adata = 52859849a5b7c1d432c3bfb35271cd8141db2ec774 +Payload = 741db990b43ef34993c33d1c4953b67b128b9299dfe86d74 +CT = 49689953300a2ec7c7592e2b84f23ae4a3ed0ae08a8f8ead1150fa899152eef7a30ae0f20986818e + +Count = 217 +Adata = aa192759625f4e42d1d1fa73dc0f62199142155615 +Payload = 51dca5c0f8e5d49596f32d3eb87437bcae866640310ce1e3 +CT = 6ca985037cd1091bc2693e0975d5bb231fe0fe39646b023aba7ff9203608089558698ec29472dda7 + +Count = 218 +Adata = 6de564226884188ec7bea3894535a875cff2a42fdb +Payload = dfaa7aa8b28626210d5c24e2ddfe516189be05aabe26f3b2 +CT = e2df5a6b36b2fbaf59c637d5105fddfe38d89dd3eb41106b85bd0a5074ef852575baf5f12c22663e + +Count = 219 +Adata = f245f2ee23755df863dee55d7ef0c3c09a0b6f0b0c +Payload = eedf00aab5edefdd6549d37ed44358e11c588c24f141dc57 +CT = d3aa206931d9325331d3c04919e2d47ead3e145da4263f8e9eb617436bae012331daf020fce24e47 + +[Alen = 22] + +Key = 34ab6fd7f54a2e0276fcb7cf1e203aba +Nonce = 6091afb62c1a8eed4da5624dd7 + +Count = 220 +Adata = 1ab5cc3d7b01dc74e6cf838bb565fea3187d33d552a2 +Payload = 8d164f598ea141082b1069776fccd87baf6a2563cbdbc9d1 +CT = 0d30ab07153b5153637969e6bd3539448c541e42b3d432fd7ef14622a9b621d1721b944c60f7fd67 + +Count = 221 +Adata = 1f1ac4674b272bc7a4ee9f4eae33e969b16fa90a69ba +Payload = 14e99a2ef0de650adbd785c692342cdb765e6d20d5fca09a +CT = 94cf7e706b44755193be855740cdcde455605601adf35bb6dfa4ec2c92671c64ee07946527be67f0 + +Count = 222 +Adata = 43ee77f12ea42e82a02275a68aa95cbd1bb440442bcf +Payload = 383242c709fe5f2ce782bf8c83b645d171f2bd238abc655d +CT = b814a69992644f77afebbf1d514fa4ee52cc8602f2b39e71173572fbf3d9495760aae4347397b110 + +Count = 223 +Adata = ae2ff288199be25bf640811541394ad7e1dd0dc0d24d +Payload = 9c16a5b638c35c97c5c981c1b8dbcba11aec30e72e45a936 +CT = 1c3041e8a3594ccc8da081506a222a9e39d20bc6564a521a4d2327956e030b9df753e063b5b71201 + +Count = 224 +Adata = 4ccfb4281852b5ca7e787723d689384a68ff9437db31 +Payload = ec9d8edff25645520801b6e8d14a2fc3b193db70d5e5e878 +CT = 6cbb6a8169cc55094068b67903b3cefc92ade051adea1354e4dac0c9130f5641afd035dd884b6271 + +Count = 225 +Adata = d3a2fffc798fd9cc2f409471faf18caa2ff3dcf4e652 +Payload = 0db33eda4188a9165147e24e40f79fee1985eb68d5162728 +CT = 8d95da84da12b94d192ee2df920e7ed13abbd049ad19dc0448807dd50a9cf41651083c49c7493ceb + +Count = 226 +Adata = 7b5121aa4d1e314f209ffe3e92cd26ee4f74d91e27f2 +Payload = e0d3ea4308376423c4322503f56e427a64e2e6d8b4f5e668 +CT = 60f50e1d93ad74788c5b25922797a34547dcddf9ccfa1d448ea0da53046733f522ded40a09c6d7a6 + +Count = 227 +Adata = 6e12c112720ef346bbbe7d1c19483721b1c52c438dad +Payload = 491f2bca585d6b5fdf38d18890e4d1bc923fe26930b3d2f1 +CT = c939cf94c3c77b049751d119421d3083b101d94848bc29dd345cb5a968f39654b994686699d532c2 + +Count = 228 +Adata = 20433402a2d869c95ac4a070c7a3da838c928a385f89 +Payload = f45908d691ddaf89c0bc129ffada94c3ceda5f47d63ef76a +CT = 747fec880a47bfd288d5120e282375fcede46466ae310c46cce85eb55339b886b7121b306fccc0b2 + +Count = 229 +Adata = 42f944c21cc221beaacb288115ac628346b8a1d94bd5 +Payload = e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b +CT = 63261824c00c9038caaa5a64603b09dd40bc4e3a210ef667a37ca5ce12aa6f0659467642deb8bfcd + +[Alen = 23] + +Key = ea96f90fbae12a857f5c97e0cba57943 +Nonce = 21cc46d9ced1539b0ad946e600 + +Count = 230 +Adata = 105258d2f25f62675aee975cfdb668aff833f05b61eb2a +Payload = 49db80f22bc267a70e5636dfbc8a21c83d9691fe4b9c3051 +CT = d2fcc8b7809b5fc07e44083e437d8180157f1782a9ce9f65c7fa9ee2e7cdc1b755258f2212a8a8f4 + +Count = 231 +Adata = 0f5938540651fa4ca03867e67518eb2b73f60dd8750fa0 +Payload = 26618e21099a79d6c517335389551323065ad89c8848ea12 +CT = bd46c664a2c341b1b5050db276a2b36b2eb35ee06a1a4526bfdb9bfcd3b969fb2e41221eb92b0147 + +Count = 232 +Adata = d6b228960fcbcf07c7bede616139db62b3808718a5b511 +Payload = 4de1d6d57144896ddea1c30f49afecd27bdf4840ed9928b5 +CT = d6c69e90da1db10aaeb3fdeeb6584c9a5336ce3c0fcb8781f8beea22cba93203c912209c78c03aa1 + +Count = 233 +Adata = 75f8f071e229355e286882917ce5dd4f1db591fee51b6c +Payload = 785359b1dc754a1e1b6d8731bd2d917ce3e91507401310e8 +CT = e37411f4772c72796b7fb9d042da3134cb00937ba241bfdc69a2e3ea4a40f7c491912c1a0778ebde + +Count = 234 +Adata = 4afb62aa8648ac7474dd16fcc376f8909c69e1ce36e6d1 +Payload = ab627aac1496d011ed2edcb2fc6b2afbcc394654f56124f6 +CT = 304532e9bfcfe8769d3ce253039c8ab3e4d0c02817338bc2a75c7ba2a769c27903e99b72639b0841 + +Count = 235 +Adata = 736fdf94db820a2efe89e7fc9dcfe7c23d5754ac2bcc7c +Payload = 40722cffb37f1455c2618408e777ed0f4b1bd039952730cc +CT = db5564ba18262c32b273bae918804d4763f2564577759ff8f84f4ca4a69fde75d7207e50494819b6 + +Count = 236 +Adata = 8a9a0367137c28db4c4e78d9cd9a68cde0d1b4583532ae +Payload = dcaabf7a061502618541c09ea59dbbbd52b2692fd0064747 +CT = 478df73fad4c3a06f553fe7f5a6a1bf57a5bef533254e873a0c34a24d3ee0946034c71fba4dbb333 + +Count = 237 +Adata = 34dbbff560ef04ea731b8979aef2ae50972f4db3efe14a +Payload = dd641a893b16e0e173ea2eda20638bb01849ac11e64e8ddb +CT = 464352cc904fd88603f8103bdf942bf830a02a6d041c22ef0f5e24a435a39a716c39f43dabdc4281 + +Count = 238 +Adata = f3d1fcd912252431db9d8ccfc3e203d5b34d537468b4c6 +Payload = 9aa3e8ad92777dfeb121a646ce2e918d1e12b30754bc0947 +CT = 0184a0e8392e4599c13398a731d931c536fb357bb6eea673f623d59f66764d859a772bb50ec91fc3 + +Count = 239 +Adata = 513b4cdc551c203ed5f1e659813584862023911590b672 +Payload = c8f44ae4b02fffdbce0df773c24075f877945fc7a86be460 +CT = 53d302a11b76c7bcbe1fc9923db7d5b05f7dd9bb4a394b543b6549eb16fba96318afb3df51f4675f + +[Alen = 24] + +Key = 35b403a15212097085d6e2b77ec3d4f2 +Nonce = daa423bf9256c3fcc347a293aa + +Count = 240 +Adata = d3c0ed74e5f25e4c1e479e1a51182bb018698ec267269149 +Payload = 7dd7396db6613eb80909a3b8c0029b624912aabedda0659b +CT = 5b00cf8a66baa7fe22502ed6f4861af71fa64b550d643f95eee82c19ecba34280604b58d92dacd3f + +Count = 241 +Adata = 62f4fe53e99a9b0c51e9561d910d7e2ffe19a5176c9dec06 +Payload = 897f0dfd90213f64a9277a0eda4f134f303fa89f56ca54fb +CT = afa8fb1a40faa622827ef760eecb92da668b4974860e0ef5ab4999e9689d52b8afeb87923efa3b48 + +Count = 242 +Adata = 191c4dfa653c20292657f7694c6b6a4a410c49a879abd217 +Payload = 2b7cf9e6e2d6abcd7775f8a6eb6294e822041c4c45f09c3c +CT = 0dab0f01320d328b5c2c75c8dfe6157d74b0fda79534c632cdc71e556c34fd4e1b5ebc50d38da8b3 + +Count = 243 +Adata = ba34741f8edb51470eb20f891869aabeab562d92571ac943 +Payload = dccb9a4625512496b372a2b8b768f75741d8c2e30e57d638 +CT = fa1c6ca1f58abdd0982b2fd683ec76c2176c2308de938c3646223d381090661c2ee2370d29a572a9 + +Count = 244 +Adata = 8b922aca6125722ec490b134a45864397f4e2c281d6e2089 +Payload = e0e452c990665465160b02cad6367ca89723613488d8efbf +CT = c633a42e40bdcd233d528fa4e2b2fd3dc19780df581cb5b1f78af50466646b7c7e652f787afe5357 + +Count = 245 +Adata = afb9fd78e3f8eaf4e8c91da62b2da534508e54f7dfa214fc +Payload = b536fdb8839f87080ae65ec35da347e792622ffe18a61d46 +CT = 93e10b5f53441e4e21bfd3ad6927c672c4d6ce15c8624748cc9d9a1270f78648a6b66cb8c0f2471b + +Count = 246 +Adata = ecf942ccee7396cb3ee177eadd4d96a4af1d90afdce97376 +Payload = c81233826e5125e1f31fe275184ccba8f1a743e58e146e4d +CT = eec5c565be8abca7d8466f1b2cc84a3da713a20e5ed03443b17d3d6f1fc4f530841b749d9f3a0a7a + +Count = 247 +Adata = 16fea92ffcaad563792aa924bffe7ef690edc90ea4e29cc0 +Payload = 24ab253b5b06552665c3c810254c0ed15e68a783180d7eee +CT = 027cd3dc8bddcc604e9a457e11c88f4408dc4668c8c924e05852ed48cf88d9ab2326aa46b6541b60 + +Count = 248 +Adata = 76f110eecd369d79e21fb208058359d3a2f37581d1f7f691 +Payload = 7f596bc7a815d103ed9f6dc428b60e72aeadcb9382ccde4a +CT = 598e9d2078ce4845c6c6e0aa1c328fe7f8192a7852088444c62dff6bcade5ac2edb8ec9797ce433e + +Count = 249 +Adata = 8834c776a3237f060ae0ab9857324a3b2ac79f3b6e6f90f5 +Payload = 11cbfb3d348c7abef99f562607e289de34a2bb379a5dfe50 +CT = 371c0ddae457e3f8d2c6db483366084b62165adc4a99a45eb936ac4764575f85352c24ab23209d42 + +[Alen = 25] + +Key = 7a459aadb48f1a528edae71fcf698b84 +Nonce = fa4616b715ea898772b0e89dd4 + +Count = 250 +Adata = 0c0b4a45df5c3919c1e1669c5af5d398d9545e44307d95c481 +Payload = 0b3d947de8632dc8ff752f619ba7c84716fac7a23e101641 +CT = 7db9f3f7dc26fc2adf58d4525d26d5601e977de5a7c33911a1138cff7b624f9908b5b4d7e90a824a + +Count = 251 +Adata = aa27a28a36b5a2cee57ffeca0233feb4bdd4eacb2cae28e98f +Payload = e6dedce2c278c44e5678d13e7d5b5d3501d61bb0bb6b5558 +CT = 905abb68f63d15ac76552a0dbbda401209bba1f722b87a08e23f92b598f7a248a894e6b8f5691bee + +Count = 252 +Adata = 66220aa9b40a1772caba7749a544bff938e804dbc6e556498f +Payload = a276b0922fbd5094bf89b9329d07341e039d6204397b81c0 +CT = d4f2d7181bf881769fa442015b8629390bf0d843a0a8ae90e94043c0d80fd651469232fe9d47a81f + +Count = 253 +Adata = 3d765d20e03a4cebfda50316c4b7d8b6c55078d5b3e9cbc567 +Payload = b99afbc2dbb377350cc58d4bfe8e954cef25d7b27b82fad4 +CT = cf1e9c48eff6a6d72ce87678380f886be7486df5e251d58425088b522fc0731097e729448236b317 + +Count = 254 +Adata = e91b6265879153e1692b00a112b4205111c8eb1a7b7f2c6898 +Payload = 56114cc783b80ca2dd2881387b6d92a59a237dfc8e976d8b +CT = 20952b4db7fddd40fd057a0bbdec8f82924ec7bb174442db2208cf07574cc4f3f83ed6301b904404 + +Count = 255 +Adata = 340b16f352817babb4fb70e9e6e18784b3e67bdd449872158c +Payload = eb21fe20fc4f92452b261eac0d7b70016f7469afdff7a3f5 +CT = 9da599aac80a43a70b0be59fcbfa6d266719d3e846248ca514b0a900068e55cd24c92bbb78c521ad + +Count = 256 +Adata = 5a2423c2ff2d642c80ac1ca27dd779321f3e9c01445be684dc +Payload = b15083a73607c9d7e197a8cc884ad3be98ac343f6493df67 +CT = c7d4e42d02421835c1ba53ff4ecbce9990c18e78fd40f0373f8ba66d74321c80c057f010078d2f28 + +Count = 257 +Adata = 5fe8bb27a59a5f4e370adbba96484c2365fc0d8c6e58d7d3e6 +Payload = 07542d18e8f2d3e199fca0f90cabb78b169525fdce81666a +CT = 71d04a92dcb70203b9d15bcaca2aaaac1ef89fba5752493a0a189319e4f06d53c1405d37b06cc8eb + +Count = 258 +Adata = 23e5422e8d7560a9e65642b5e723a47536c16791f3a0cf918d +Payload = cd574ed56bdfd1408f7831e0b24b4345ee979ac906a7aa22 +CT = bbd3295f5f9a00a2af55cad374ca5e62e6fa208e9f748572dd72f48ae03670249d74f8460b63b1ae + +Count = 259 +Adata = fcc9422ba5023a9997baa9c4ee6cb196ffe96e08eb9c2b8a75 +Payload = 8c9abe94beed4c9bd46adb1d04fbfe7016dd50d324525abb +CT = fa1ed91e8aa89d79f447202ec27ae3571eb0ea94bd8175eb1717c00c93d36a77141b723d573c8c65 + +[Alen = 26] + +Key = ca748225057f735f712ecc64791367f0 +Nonce = 1341a6998eb1f50d4b710a13ac + +Count = 260 +Adata = 5fb96b045f494808c02014f06074bd45b8a8ad12b4cb448ec162 +Payload = e92cd0cb97afe4fb00c4f12e9b9abe1d08db98f49a27f461 +CT = 82b666694232e86e82295beae66ae67d56aceb5d6b1484ceb4a6843ec16078038c10afedc41f5362 + +Count = 261 +Adata = 87db0d9d69bc0cf69cabeb92570e482bbc8ff3e1ba72f12f3225 +Payload = a6dbad96ad23ff61479df39b99f0673a09f2a7eaebbd34b9 +CT = cd411b3478bef3f4c570595fe4003f5a5785d4431a8e4416a7c6566d0b8ff97f946d7c7773a845f2 + +Count = 262 +Adata = a061a09024f1e03b223695d4703ee202e90e07156b95859a22e3 +Payload = b1dd81cc3b2b0efe540a3194d6fe304cd2de53db7929ebe1 +CT = da47376eeeb6026bd6e79b50ab0e682c8ca92072881a9b4ee1d66a4728b67b42602e23c8500b0115 + +Count = 263 +Adata = 0dd513c5d8d62b723ab8b0a3aaa477e843d9149dc8a2f878e585 +Payload = fb30c2e98f3d7e4ed7431da285711d3d287884db13a474e7 +CT = 90aa744b5aa072db55aeb766f881455d760ff772e297044803c51e8c59ed13b3e5d9b489d4ea2ccf + +Count = 264 +Adata = 3ff59c40bd796048e586eccc23a82e4d09fc5e779f38eb4afbed +Payload = 886f9f91a6566ceb99c39462ab675a3ae3be98f68787626f +CT = e3f5293373cb607e1b2e3ea6d697025abdc9eb5f76b412c0f1ec270b43fc5a9811b56ccf033789c6 + +Count = 265 +Adata = 0df7ef91f7124da867e992bcbc6fb38232ff6d5205f38768da72 +Payload = ed370d1c2d6dc03e4fae4deb9343a7d4339562cffd427587 +CT = 86adbbbef8f0ccabcd43e72feeb3ffb46de211660c710528bb4ed25940d58cba64271fe1d2e8013d + +Count = 266 +Adata = 6777de159c34d005b94f67c33ae4a35ebab09d9cb9c56b4c9c81 +Payload = 2f77c2eb07db14bd713c5af10c0760ea3a6ca5ff8d046d36 +CT = 44ed7449d2461828f3d1f03571f7388a641bd6567c371d99392636a5e373c1354ea9b969abb4932a + +Count = 267 +Adata = 75559898f4ba03c55afc25ea91aa61a93c2f8270a5fa51b6f6dc +Payload = 360fb89429dc9b48358097d930c8561b2bd18dc0a470d1d6 +CT = 5d950e36fc4197ddb76d3d1d4d380e7b75a6fe695543a17959a7e8bc0570f19159f91fc14ac6532a + +Count = 268 +Adata = 5e03fc430473c5de96d68907fa506f9da353ae48a965445e1f24 +Payload = f2d8d67b9f291c3edc264893922622b2693f3e7231137eba +CT = 994260d94ab410ab5ecbe257efd67ad237484ddbc0200e1507e559568c27a30b5676f98cc66f57d6 + +Count = 269 +Adata = 7eee4869e77f6db12c91d1f647cad2340d33a3defaeb362d311d +Payload = 7fd6fb81c36e44b150af10e04683b1ec9b5dda87c71ff939 +CT = 144c4d2316f34824d242ba243b73e98cc52aa92e362c89964910615920f6f3c3421a9c2bec1bec7e + +[Alen = 27] + +Key = fdf2b2c7fcb3789b4e90abe607dca2af +Nonce = a69ddc66e63a3415f21009d53a + +Count = 270 +Adata = c76846da496ed87b9c0f65c6266c9a822224acde9775efb186a4a5 +Payload = d7aa4efa5d75195a400018bd38f7d8cd53fdffe88df1837f +CT = 150d9a8b78d9c04239d66207a1f95021bbb1b7c70d7c354825d05e5a2e76a90f6fe489fd74cab2a3 + +Count = 271 +Adata = 4efbd225553b541c3f53cabe8a1ac03845b0e846c8616b3ea2cc7d +Payload = 5f94a2e48d348a1d56c55a659306e319c3d2ad78b9fe43a7 +CT = 9d337695a89853052f1320df0a086bf52b9ee5573973f590be6af49ce97d5e0e77c7fd5d9cc6d932 + +Count = 272 +Adata = 7631cf7822a545daefa16a5ec43c877d475a82d5aa2d51cec7fbb4 +Payload = a44b010fc1c659eac9241a58b11a73d7ce33156ddfc54c3c +CT = 66ecd57ee46a80f2b0f260e22814fb3b267f5d425f48fa0b924b268cab915f999aea3e1cc3a88ccd + +Count = 273 +Adata = e4da34663edc44370bfd8aa8315945471a893a1cc069628a071ee0 +Payload = 28d157f5741f1be057d5219711414c0638b47d165a905a6a +CT = ea76838451b3c2f82e035b2d884fc4ead0f83539da1dec5dc368f5af8e311e67209e02dfa2613377 + +Count = 274 +Adata = 077509eae1dc367540f87832c5780f6c5b29e180bc6c1fee38e826 +Payload = ba7432a8e34bfaa91b35c8dfd822d86850be39e63150257f +CT = 78d3e6d9c6e723b162e3b265412c5084b8f271c9b1dd9348ad175fcad35d29396380b79a28784cff + +Count = 275 +Adata = a513d750ca1e8bf6cb7b8cea5204e064c15c2dc40d742b31cf5459 +Payload = 3f5830b0ce8849a660af7d58a60c19a9824a3033bb5fed43 +CT = fdffe4c1eb2490be197907e23f0291456a06781c3bd25b7493b4b3e33d325359c9c651290ce73bed + +Count = 276 +Adata = e439db829c1291df49fc42c2fa1a92118c2665f11e13f28dc6f11a +Payload = e69b2a243340df5dc70b2cb05be12e5992ee36f7d9f4ca84 +CT = 243cfe5516ec0645bedd560ac2efa6b57aa27ed859797cb371f88ca5857c6d801e726a01c621a0c3 + +Count = 277 +Adata = a12c690568114fd7a677f49d74e84fc1a6b7f7d2a08693266c0a91 +Payload = 9de35b840a69a84701ffae1b1d2bf13c34b42a57d14c524d +CT = 5f448ff52fc5715f7829d4a1842579d0dcf8627851c1e47a0592d360fc6a46aa18c4ce5d74fa4532 + +Count = 278 +Adata = 1813bf176a1127f4d508d7663ae750f9c4bcb84a6e26811ac60d46 +Payload = 9e2fa20bf76768a5a1467d90a048bb503a2c33bbbaa71653 +CT = 5c88767ad2cbb1bdd890072a394633bcd2607b943a2aa0648b772cef893495cf0a94e8ebf06e920b + +Count = 279 +Adata = cc6e9cc2699d3ba0e624e715599480d6b7dbc6eeea0d12a9236444 +Payload = 6681b1cbeceea57a828324831407280b00f4917ed52a10df +CT = a42665bac9427c62fb555e398d09a0e7e8b8d95155a7a6e8b1851d571a1ef8aed565b784dcaaac4e + +[Alen = 28] + +Key = 7d870d7e52d3053c65eefad47764cfeb +Nonce = 37d888f4aa452d7bf217f5a529 + +Count = 280 +Adata = 9610949f6d23d5b1f3989b2f4e524fab4f297a5bec8ddad4f16cb616 +Payload = 109317556c21c969eda65a94176d7a11462c9ae18a865b6d +CT = 4e6b967b1571c6d7b9e118b112b7ac949a4a175650316a242dd579cb0d201d22c86bbc7fbe47bd0d + +Count = 281 +Adata = 96118dbfe53434d8aed88769a535eb0c8b5849dca1c81c34626ac9b9 +Payload = 3e6c914a196e175079315b1c92b2b8a844deb472e249e3d3 +CT = 60941064603e18ee2d76193997686e2d98b839c538fed29af0dd7aef4a609f3587652173446ebd82 + +Count = 282 +Adata = 21fc96f73975298207f818909088295d6d6861677130ca258c2174f6 +Payload = e0014147d5771b4380dc0192d45f36f7d60776d1ba47374d +CT = bef9c069ac2714fdd49b43b7d185e0720a61fb6660f0060463e4405d45caf4836467edbf35089d87 + +Count = 283 +Adata = 72a5151abcb55933ff7c9314f3235eba2a400121454144c2670e8359 +Payload = 0f1c6dffeda98f7a159f9cc61820bfb29910d8eaa41b751a +CT = 51e4ecd194f980c441d8dee31dfa69374576555d7eac44537441c813e90fac775eddb7290df059d9 + +Count = 284 +Adata = dbbf192914b1ad73666e9f5e9c22c08ca398f7524af62b1046a863bd +Payload = c1ddd14e380cc91324cf2a381df1da1ccffd90ae436a373a +CT = 9f255060415cc6ad7088681d182b0c99139b1d1999dd067334d9316f1f1c3142c1c9b26e5c220a32 + +Count = 285 +Adata = 28e4b88fbf04e9897057ff5bfde7eb04fa480256817a50fa281030b4 +Payload = d4dae9c4cae92afb80f9a5c99383ff16e23a2ec942eed4d2 +CT = 8a2268eab3b92545d4bee7ec965929933e5ca37e9859e59bc0b188e33bfab29b237d6c6920ce3418 + +Count = 286 +Adata = d9ebc1cbfab9034317132a72e0f11c341331146a59e7a2f26bf4f3d7 +Payload = 8a188d40a6e6fbb06a9f06304349a7a808b092cc2fc10b9e +CT = d4e00c6edfb6f40e3ed844154693712dd4d61f7bf5763ad7fdde04d21b876468bd9184101b5f32d0 + +Count = 287 +Adata = 34ad69f192ae4dcab771aeeacf01bbd32609bcbbea8ff9df31ded719 +Payload = 590c1aac30ab166b1caff748452fc146765c372e226ffc26 +CT = 07f49b8249fb19d548e8b56d40f517c3aa3aba99f8d8cd6f068c65e9d0e5f1b81c86393900e64c19 + +Count = 288 +Adata = f5e50ce1f99ed5e9f2baa54b96ae7039234b1131e734ec190695d28d +Payload = 16d0522b2e691e42bd80ce95e00c8a7a1fc738169e904bdb +CT = 4828d305573911fce9c78cb0e5d65cffc3a1b5a144277a9206ab3b72c56c8df4a12dba89a2f21276 + +Count = 289 +Adata = 9b1e7e52ea1a12444d884866e11dcf367b70b816460936fdaebba36d +Payload = 0bddf342121b82f906368b0d7b04df1c682ecd4c2b2b43df +CT = 5525726c6b4b8d475271c9287ede0999b44840fbf19c72960170ca7b16d23537eeb3034105334699 + +[Alen = 29] + +Key = 8fcac40527c0e7ca8eaff265ca12c053 +Nonce = ae9f012fd9af60a400e20b1690 + +Count = 290 +Adata = 9ce65598cd1f86afc9aaaf172809570cc306333c25523f863c6d0e0154 +Payload = 78d1e96af8cebdcc7e7e2a4ddcfa34f6cf9a24fb85672ad7 +CT = 9adb9a95a9379ad795d8d3ffd4e37a045160d6d727f974a6cb3b5151f327e65447e52c7525562c91 + +Count = 291 +Adata = e7c78ef4c4b959ee00cb1a09d71221a43892ef8ad705edd27ed85d03a3 +Payload = bc59f18c8473941abc681a92741ab5ee13679829f542b8f4 +CT = 5e538273d58ab30157cee3207c03fb1c8d9d6a0557dce68534e5b08e27d8f5eeef0f064ff620652a + +Count = 292 +Adata = f1bce6f2a4bdd3a07ebf5f8d47f931d27e7e63389d70e1059f701216be +Payload = 5575d950312c14c89ac609dfb0b2fd1af732bb6aae5e8651 +CT = b77faaaf60d533d37160f06db8abb3e869c849460cc0d82044c0a96baae318f4714f0206812516b5 + +Count = 293 +Adata = 3da3bb091016e54477dae88af1c84c1a51b59c1bb49a05deb6f32064e6 +Payload = df5947d8c6094ccc25816639ec42214b28731bfd7b8312dc +CT = 3d53342797f06bd7ce279f8be45b6fb9b689e9d1d91d4cad4e7bdce2dc6aae24178aab6984f31028 + +Count = 294 +Adata = c4cd183071c37a8157c6930a7d4d530cf4b7eb021682327810bd48209e +Payload = 2fbb6dc235761875411ef59ae06110df8f15f66b721b0fd6 +CT = cdb11e3d648f3f6eaab80c28e8785e2d11ef0447d08551a7f18ece8260bd56ecdee768022d0dd8d1 + +Count = 295 +Adata = 0e0fece7b6b659b642668e8ba3dca330523e70279155f485f3f6f8041e +Payload = cd149d17dba7ec50000b8c5390d114697fafb61025301f4e +CT = 2f1eeee88a5ecb4bebad75e198c85a9be155443c87ae413f6f0fb3b7440b84ddc3cc53819c2e93be + +Count = 296 +Adata = a35c6f70f637a9a5e6f215c694fdf65b6fd85f794ed3eaa1bc19abe592 +Payload = 030390adb572f2bd2a6a4454fd68236cd1d465574328aa00 +CT = e109e352e48bd5a6c1ccbde6f5716d9e4f2e977be1b6f47129ca778c51f9320f121dd803ece8d5da + +Count = 297 +Adata = c2992096828325820e2d7acaa17ac789b6830ec3128dd7f904398afbec +Payload = f2d9cf953c8d3a051d9b3eae4307a3cb4fffaa2435b49586 +CT = 10d3bc6a6d741d1ef63dc71c4b1eed39d1055808972acbf79c223a5ad65120bfca4a5992e5ebc6fc + +Count = 298 +Adata = c023763a285ea934bc5bc7ddfc2aefe2b3f9eafe7b87c61383dcc07990 +Payload = 4b92e8d2ffaa4af8f3e0ac037a900bd18e195f490a3d71e1 +CT = a9989b2dae536de3184655b17289452310e3ad65a8a32f905c3bc4f618ffb3a159f4e2d0622cea6e + +Count = 299 +Adata = 0a39ec0163c7aeb1b4fbe7cb4fa5b0592fade70f430e23730a23ed4160 +Payload = 7c0e6a0d35f8ac854c7245ebc73693731bbbc3e6fab64446 +CT = 9e0419f264018b9ea7d4bc59cf2fdd81854131ca58281a376f099dce6e18435fba4d26c1e93bda0c + +[Alen = 30] + +Key = ddf9f150cc3f1c15e8e773663c5b061c +Nonce = 98c5036b7d54da9a1177105600 + +Count = 300 +Adata = 20c5ab290e6d97f53c74121951f39ba865b3acc465fa3f0fb8a591622277 +Payload = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d +CT = d00d29396ffa9e691290d746527777bf96a851f306d4da0b1816df1e0e82bb7bc8105930ad6a2232 + +Count = 301 +Adata = 0e205a4dc5d5ead0d9ff7f182dc140fc49511c01b0fdbc7e6d6cb5fdf027 +Payload = 88b2572fbe7cf2b46df04db476ffedb41778ae2eb3c3aae4 +CT = 2167fa0c69b415af3383c4e8ae35d41e00b8232e3dbc3cd2df823c8ccd466807f2bd1c4032f0cfeb + +Count = 302 +Adata = 48043560d60381e83c11d4bc9d997d3ee2add6b0524b779c62dfaa73ce0a +Payload = d44bf28b010e076b45db1b053af03db718b60748da51db1f +CT = 7d9e5fa8d6c6e0701ba89259e23a041d0f768a48542e4d2931f5be8c9965345c760c72cc1b7908d1 + +Count = 303 +Adata = f0729a8a2fd073699ab87b521cbe0420b43529556a505f5f87874d1a053c +Payload = eab8cffb512eabe267cd64353552513defe97c2d10f35503 +CT = 436d62d886e64cf939beed69ed986897f829f12d9e8cc335381d94a828a95872ebdfda8a4c6a196b + +Count = 304 +Adata = fc2cd69bb61223f713e33a5071d09bf2783640c307c22d836dd94952dd37 +Payload = 001056926546c261fbbdf92b94498e038c2bcfd0b6345497 +CT = a9c5fbb1b28e257aa5ce70774c83b7a99beb42d0384bc2a163931808533f4f70d7a78242ced110eb + +Count = 305 +Adata = 8f653c5c003c807d16d17f833eebb97c9c2f0e5aae3780a52ce53a6c33f7 +Payload = 29ffaef9415fd300127ffd26ef324083a9d90e0f60e2ab4f +CT = 802a03da9697341b4c0c747a37f87929be19830fee9d3d79f34553198f8e40fde6473f9cf04f1de6 + +Count = 306 +Adata = 8d05e7d3077151c6d9378cb08e049e4d7c28a908f7f7c079c46ff92cd01b +Payload = 9874dc5ca1b541f7b21c7b3860fa6b0c3ab1b712ab0fca98 +CT = 31a1717f767da6ecec6ff264b83052a62d713a1225705cae0fac20e8d45d2b0771d140b5e4a47c87 + +Count = 307 +Adata = d4feb3ea76ac2945651f557406f3f38a2d7e9232ed55ff4eaf1201dd8255 +Payload = 1e01c7128c821fb9c971a27fc7c6f9bb902fa735de583b8a +CT = b7d46a315b4af8a297022b231f0cc01187ef2a355027adbcd3cacfe4281e52d79e60eeb38319bc3a + +Count = 308 +Adata = 7cbb4ae995a3367a256cafd11cd6c6cab5bf3252fa97f27a8a1434ca9a27 +Payload = 51cd306fac7d20e3c7043eae3a6dfec046c5c24a666a0723 +CT = f8189d4c7bb5c7f89977b7f2e2a7c76a51054f4ae81591158f0d7646a799b14288bb2f354b5d8847 + +Count = 309 +Adata = bd40b06a4beded2be3d176266b10772c7fa2949f0a9b20d613af90c2daf5 +Payload = fc5b26befc633a3e8ace011aa7a42bd0258a9f3dc14fc1c8 +CT = 558e8b9d2babdd25d4bd88467f6e127a324a123d4f3057fefd7f95e1d331e700aa9ef83f09b689fd + +[Alen = 31] + +Key = b1dc81d116d94f5eced526b37c004b95 +Nonce = 97c8f69fb91b17299461fd8d63 + +Count = 310 +Adata = f8b08aa83bed09ca342249b2cf9e2b45a89dcfb8711a120395e455921af481 +Payload = 54390715b6e7c7bd51a234db059a51ba030cf22ee00b7277 +CT = cb629994c3418a662a8cde1b5f4d99aa7df66e24c53dc6df11297930fd44c63675b7cca70671ef4d + +Count = 311 +Adata = 0351c969dd38eeaa4b9b0000e346eeb1a2cd462033c59d9e6e3331822045cd +Payload = 65b5e856a8cf35dffd42c5ba105cba4c434aa1c2a0390352 +CT = faee76d7dd697804866c2f7a4a8b725c3db03dc8850fb7fa7e77f5566ca2fd9293835bceb461dbaa + +Count = 312 +Adata = 5db8b6bc16740680f78fba917733a6899cdba5e4c10a8058963d1265681eaa +Payload = 9a7685e3daac43ccf22cad0df900ba8acddc5d420846118d +CT = 052d1b62af0a0e17890247cda3d7729ab326c1482d70a525ec2cf9f5d35521c1c000685e49d2ed42 + +Count = 313 +Adata = e7d6024611210da0cfb90a9955195aa0a0539280a3a7c792a1540930daae2d +Payload = c18d9e7971e2ae5fc128777086338fbe194443324e2d2cd1 +CT = 5ed600f80444e384ba069db0dce447ae67bedf386b1b987966f33dfb44ae413283b238616c6b99fb + +Count = 314 +Adata = 77a878c9c76f3e6a4ddd330d1d8828949d08e0fedffe0d8e2e557b29e7c78c +Payload = fcf8982f7342f1b953658453cd5ea413700eff00f1ee7d6f +CT = 63a306ae06e4bc62284b6e9397896c030ef4630ad4d8c9c731df6fc6b4cf0b6332936ed7cfe9455e + +Count = 315 +Adata = aa540554ee80dbffa475f702d862d6b60e0a4090792420a26d02926517723e +Payload = 0d5690d2a7083ad6daf22b308314b8f5363aca77ca72835e +CT = 920d0e53d2ae770da1dcc1f0d9c370e548c0567def4437f67c8162a815f2809601ad02595e2e0ff4 + +Count = 316 +Adata = fae86f95dd06fb7fbae63a646615555aec8153dc328bdf79da5d4cc9677ed6 +Payload = f6e313cc35e8f8812b10a44f8ad00b6893f8084d942effe0 +CT = 69b88d4d404eb55a503e4e8fd007c378ed029447b1184b487fcaa11bdeab86f60f9cd0a2b45cee1a + +Count = 317 +Adata = fd525302d2fb246a47cf4e3a27808bda89d8488cf450f1a1c7df6eedd810ee +Payload = 91e961ea2eb750577c5137c609602dbfcc4c07955ba429ec +CT = 0eb2ff6b5b111d8c077fdd0653b7e5afb2b69b9f7e929d440a86a810881bd969744ad80f579400f1 + +Count = 318 +Adata = 767b1bdf9793a512d3a84e99ef77b43011a3bcb8de4cd375dfe47a79293e01 +Payload = 98438c4411bead6f30c89ead762a12bf39391d3652b78b7a +CT = 071812c56418e0b44be6746d2cfddaaf47c3813c77813fd2250ca00d3231819ecdf501ad39c864f3 + +Count = 319 +Adata = aac7014f606df6feec415a75e29015891007f07518c955875fbf5619262ff2 +Payload = 540cb00c0eface3d1b2d632d80a642f53c78ff672a1ff6ff +CT = cb572e8d7b5c83e6600389edda718ae54282636d0f2942571224d1d0294d46981d7dc39114a693d2 + +[Alen = 32] + +Key = 5a33980e71e7d67fd6cf171454dc96e5 +Nonce = 33ae68ebb8010c6b3da6b9cb29 + +Count = 320 +Adata = eca622a37570df619e10ebb18bebadb2f2b49c4d2b2ff715873bb672e30fc0ff +Payload = a34dfa24847c365291ce1b54bcf8d9a75d861e5133cc3a74 +CT = 7a60fa7ee8859e283cce378fb6b95522ab8b70efcdb0265f7c4b4fa597666b86dd1353e400f28864 + +Count = 321 +Adata = 55a62968c222a8501d1ae56a9a815667f8a9554607b7c56e6753f8fa92a4d054 +Payload = 764dbefb42644d18d23e5e4568685d14dbacfa418d36c4ef +CT = af60bea12e9de5627f3e729e6229d1912da194ff734ad8c4423862a715dda2f63a4197f894515803 + +Count = 322 +Adata = f8436e35b7a1c810ac6aabe8e2d48a3678d19e1e96337dada514ee5fc075fce4 +Payload = cecef24b62676a5623bedae8087b9b05d7e22b41a14dd2d5 +CT = 17e3f2110e9ec22c8ebef633023a178021ef45ff5f31cefec200f190bd700f6108f9959f6d12f0f0 + +Count = 323 +Adata = 548e2152f3a15b8fb81dc01062d99f7b4fc8f074e5cbdc1030c97f8ccc02ec3f +Payload = 53c164a4990c6e0637267ff2556c1542712fc584f6ff7458 +CT = 8aec64fef5f5c67c9a2653295f2d99c78722ab3a088368733a66ebc4e0777a6fc140a51e04a10f86 + +Count = 324 +Adata = d100f1d08ef1e3eda4aef22cd970c2b785c4ff9b523c401b4064324aecf7f2d9 +Payload = 15681d2121ac56a63b9d0a38b9c4eccf84fdb746d32c14b4 +CT = cc451d7b4d55fedc969d26e3b385604a72f0d9f82d50089fb810cdc08db0a9966dffeb43ba26446e + +Count = 325 +Adata = eece934a807c9f21487cd810f15fd55d7bb4421882333ff2c43b0353de7fc5a6 +Payload = 412a8ef924ca156de860f147575e5731825f0a3759688928 +CT = 98078ea34833bd174560dd9c5d1fdbb474526489a7149503cfc5b397578f8d02a0b936ffac29b99a + +Count = 326 +Adata = 86311ff444d9be90459b6ee3652e1705ed0b5cdac3d27293ddea3378fb686ee5 +Payload = 54ba8a020d0876fa369dc32e8627f565ba3dda862ea0bcfe +CT = 8d978a5861f1de809b9deff58c6679e04c30b438d0dca0d52c3fcd6d618c260d51724126f257534a + +Count = 327 +Adata = ab6efbc44a8906d5c067eaed71af467e130aaf170827a58beb03c55069674125 +Payload = 7a15506fd1dae444d77b2a3ae7b57a8d5b4f10e25a9f78e2 +CT = a3385035bd234c3e7a7b06e1edf4f608ad427e5ca4e364c9bf8b2821920640b992b00cd1c9618025 + +Count = 328 +Adata = ddb640923d083725587aced81ae1d7409983d1f1e3ccc8dcf94376dc1bbcae8b +Payload = b18a61a89cd698f32e059b7a2a9f62a46be2c248790a9915 +CT = 68a761f2f02f30898305b7a120deee219defacf68776853e4cd52d41a968284af8907ccbb4588cc0 + +Count = 329 +Adata = d95ec4a6f594be1ba39fa1aa933dc0a5dafff5ce44509577ebb3a3e8084c4401 +Payload = 16ee3bc9ec8b4448e292b8973618e02a99da1c348539d5c7 +CT = cfc33b938072ec324f92944c3c596caf6fd7728a7b45c9ec47449a5cb4943ff2846c589b7c98ef49 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT192.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT192.rsp new file mode 100644 index 0000000000..1a7a5875fe --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT192.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886 +Nonce = 15b369889699b6de1fa3ee73e5 + +Count = 0 +Adata = 00 +Payload = 39f08a2af1d8da6212550639b91fb2573e39a8eb5d801de8 +CT = 6342b8700edec97a960eb16e7cb1eb4412fb4e263ddd2206b090155d34a76c8324e5550c3ef426ed + +Count = 1 +Adata = 00 +Payload = 296fbda0017351491c2187273fbde2c3a427170e430a703c +CT = 73dd8ffafe754251987a3070fa13bbd088e5f1c323574fd2167ee33e75d05023a7d63c770cfef2ea + +Count = 2 +Adata = 00 +Payload = eb61c284fe009921039ef6a9ce50e702823e44b35357923f +CT = b1d3f0de01068a3987c541fe0bfebe11aefca27e330aadd170647420f79c0d91cbbd69b806fe96a5 + +Count = 3 +Adata = 00 +Payload = ffeccc6460d23fdcc387c697e75dbb959b78013a8282eaa4 +CT = a55efe3e9fd42cc447dc71c022f3e286b7bae7f7e2dfd54a8a3ef2324754539ac774872282534386 + +Count = 4 +Adata = 00 +Payload = 90958d7f458d98c48cbb464c74bf495a49846dd468c514e9 +CT = ca27bf25ba8b8bdc08e0f11bb111104965468b1908982b07e292cd0e32535a848e327bc53cdae94c + +Count = 5 +Adata = 00 +Payload = a4fad5205d38206e25097075687ca86032b95b3fe7e82a07 +CT = fe48e77aa23e3376a152c722add2f1731e7bbdf287b515e9bb21701af36936be5f62d02b84df87c3 + +Count = 6 +Adata = 00 +Payload = b37114c65372b052cbeecf83d05a5da44f7b5bbff7d986b5 +CT = e9c3269cac74a34a4fb578d415f404b763b9bd729784b95b7da7f975367be24341e4af51b8bb156a + +Count = 7 +Adata = 00 +Payload = 9c0f0426f171ff18b2a4392f61fb4ee4a44c476fe03dc930 +CT = c6bd367c0e77ec0036ff8e78a45517f7888ea1a28060f6de360c6d50a96f316eda0b216cbb6380ef + +Count = 8 +Adata = 00 +Payload = 7b6e0a480a40585545b0e940e8d97c9ec987bd3c0e9c16a8 +CT = 21dc3812f5464b4dc1eb5e172d77258de5455bf16ec1294634cd1bd98e8137b578a174e39efe09b8 + +Count = 9 +Adata = 00 +Payload = 34dac6dbc28be62332a6935efc122e37b26ee100eb4033f8 +CT = 6e68f4813d8df53bb6fd240939bc77249eac07cd8b1d0c16909a895a3b08b63d7a2a1e75d25e7861 + +[Alen = 1] + +Key = 9748798c0f3cc766795c8ce0e4c979c1930dfe7faefea84a +Nonce = cdf4ba655acfe8e2134fa0542f + +Count = 10 +Adata = 67 +Payload = 100fa71462277d76ca81f2cfdb3d39d3894b0ca28074a0f0 +CT = 36e2415b4f888a6072f260d7e786d803be16f8b9cbee112d7ff74e3b05b7d7c13284573bd3e7e481 + +Count = 11 +Adata = 17 +Payload = 0217eb6778691f8dfe2d0e5241f05fcbcf97b9171f4de3f0 +CT = 24fa0d2855c6e89b465e9c4a7d4bbe1bf8ca4d0c54d7522d3ee7ce845f85dfc770d96dee9ca54ccd + +Count = 12 +Adata = dc +Payload = a78b7bc6c1a7250c5fc236f2a8343725a9a7bd3ca81b53e4 +CT = 81669d89ec08d21ae7b1a4ea948fd6f59efa4927e381e239dc14ddd8ae0aa5d810040a8d1d4da1e9 + +Count = 13 +Adata = 0c +Payload = 390c808d998582793bb10ee60568eb8d975c51d68b4e4da9 +CT = 1fe166c2b42a756f83c29cfe39d30a5da001a5cdc0d4fc746b40dec7e647720f1f5e8474bf570c2f + +Count = 14 +Adata = 3e +Payload = bcd9747fb54184b61b2e9e049caa75e22006e250f3722c0e +CT = 9a34923098ee73a0a35d0c1ca0119432175b164bb8e89dd3c10c4aac45d90119cce490cc8681a49f + +Count = 15 +Adata = 7e +Payload = d0342e3cd2c1142b642da7297ee3b9978cec405e6810f12f +CT = f6d9c873ff6ee33ddc5e353142585847bbb1b445238a40f2f9a95091d2cab7d3d9fa3e10d3e67ac9 + +Count = 16 +Adata = e3 +Payload = 7fab91d1aa072947d22f0dc322355a022fe7f0747f4a184b +CT = 5946779e87a8de516a5c9fdb1e8ebbd218ba046f34d0a996180f7818c373e89f7ff3003f53260060 + +Count = 17 +Adata = 3e +Payload = e487143dc4d98dcc6a2dfe6ee0f85d565d1f46bb0fafe62a +CT = c26af272e9767adad25e6c76dc43bc866a42b2a0443557f71905f581585e59e3c8c038b5bf966559 + +Count = 18 +Adata = 3b +Payload = 976b489244ed6789a34251500057d1d4a3229367a42b9066 +CT = b186aedd6942909f1b31c3483cec3004947f677cefb121bbea56569c34f8d9eea23e85fec18cfc51 + +Count = 19 +Adata = a5 +Payload = 71efa75961dfd60ad533082a8cfe111214eb02573adc4591 +CT = 570241164c70211c6d409a32b045f0c223b6f64c7146f44c212da23548f2ca4e9a8a07962be6422c + +[Alen = 2] + +Key = 393dcac5a28d77297946d7ab471ae03bd303ba3499e2ce26 +Nonce = fe7329f343f6e726a90b11ae37 + +Count = 20 +Adata = 1c8b +Payload = 262f4ac988812500cb437f52f0c182148e85a0bec67a2736 +CT = e6d43f822ad168aa9c2e29c07f4592d7bbeb0203f418f3020ecdbc200be353112faf20e2be711908 + +Count = 21 +Adata = 9db5 +Payload = d5982c462ad40458660cd7b120ce07fce9afe812caedcebd +CT = 1563590d888449f231618123af4a173fdcc14aaff88f1a89015e5cd97b7dd3d981321ae0b2d99e1a + +Count = 22 +Adata = 69cf +Payload = 1a95f06b821879df3fd3ac52fc99a7c1d3e9775263b7d036 +CT = da6e85202048347568befac0731db702e687d5ef51d50402bf3e75863c7acd2699caba3cc301f4b2 + +Count = 23 +Adata = 6c6e +Payload = 373c157e59b934a1afb57d4c5dd9ca7fb736b206a6210bef +CT = f7c76035fbe9790bf8d82bded25ddabc825810bb9443dfdb5d6a8f7a9f52a8038aa9dc1bdc9ed876 + +Count = 24 +Adata = dafa +Payload = 26e10a2ed8cc883a6552aee162c5542ff8bb8e758a1975f8 +CT = e61a7f657a9cc590323ff873ed4144eccdd52cc8b87ba1cc8a15603f10cbfdb041f8b2b12cc8f037 + +Count = 25 +Adata = c8b1 +Payload = dd235b05c15479dfe0326ba206ac784eca50038bbeb35d32 +CT = 1dd82e4e63043475b75f3d308928688dff3ea1368cd189061278bf62ba6a4819513d49fdcdb45480 + +Count = 26 +Adata = af48 +Payload = a0818342a5cae4a90ef281d3d1289d83f273f418a545fcbf +CT = 607af609079aa903599fd7415eac8d40c71d56a59727288b8b4d00309b50f9ea72f8105c94475b52 + +Count = 27 +Adata = b1cd +Payload = 33c0d06b6583bb4d15b4a07364c4be70ac6e72795c3dae0f +CT = f33ba520c7d3f6e742d9f6e1eb40aeb39900d0c46e5f7a3b220ba58e97936612c4183ba86705b2f9 + +Count = 28 +Adata = 649a +Payload = 3ba11282d61fe36e38cab7b559c2fd9cbe8bf7eb5863bde9 +CT = fb5a67c9744faec46fa7e127d646ed5f8be555566a0169dd87d602dc85bb260fb3df1221e2fbd10c + +Count = 29 +Adata = 593c +Payload = a97faefcae36732fcfe47736c2334ea7d411bf7638b0c019 +CT = 6984dbb70c663e85988921a44db75e64e17f1dcb0ad2142deb3835b7eecad6dac9785ad1d370ede4 + +[Alen = 3] + +Key = a74abc4347e4be0acb0a73bb8f7d25c35bae13b77f80233a +Nonce = 6a850e94940da8781159ba97ef + +Count = 30 +Adata = a4490e +Payload = 6372824bf416cd072a7ad0ae5f9f596c6127520c1b688ab4 +CT = b14a07bdc119d87611342c4c6935c5786ff1f9ae2eb49e6191c88a3cb4fbafcb8a4a157d587d7e39 + +Count = 31 +Adata = 5cad2e +Payload = 295f4f3417a77fcf0bbda17b0fd629ad57a6086573c87eb1 +CT = fb67cac222a86abe30f35d99397cb5b95970a3c746146a64235c34d1390bba5b008c3fb29c2df958 + +Count = 32 +Adata = ebdf4c +Payload = 86f354a505de941d34cd98e3af3706d56a938ab9a2797182 +CT = 54cbd15330d1816c0f836401999d9ac16445211b97a565575a733bba0a6992d0664dc77d2b5d194c + +Count = 33 +Adata = 7c0d70 +Payload = 88c3bfb546abe2f6bfc92a7c56c627e24ab92a8a87a6b43c +CT = 5afb3a4373a4f7878487d69e606cbbf6446f8128b27aa0e90902a31b15eed99c2dc4ed1bf11cad96 + +Count = 34 +Adata = 8fa501 +Payload = 75d4216bad77943bfe82be216157843b0da0fd16eeee8471 +CT = a7eca49d9878814ac5cc42c357fd182f037656b4db3290a42f25595ae00103d4eb20288158132e7d + +Count = 35 +Adata = b7aca7 +Payload = bf1401e8dcf6f681ed6dd74c7e23b7e54b384608b0e5ec52 +CT = 6d2c841ee9f9e3f0d6232bae48892bf145eeedaa8539f88760e67693b509ea4795b7da32c5c5d17f + +Count = 36 +Adata = 1f283f +Payload = 7e623e7ef7d0a678b5d22a8402d89220f4f1bf759e3084dd +CT = ac5abb88c2dfb3098e9cd66634720e34fa2714d7abec900880ef8ea380a1a0a38b2c20288e637a9f + +Count = 37 +Adata = e93f31 +Payload = 14f80e7a6298d85d31fb80376a394a8f88b0ae47f00450c7 +CT = c6c08b8c5797cd2c0ab57cd55c93d69b866605e5c5d84412d553aafe8536385d34c412c14d3a1563 + +Count = 38 +Adata = 27e9a5 +Payload = 3330df12249639961f562a74b34f60b0a8bc7c783f6572fd +CT = e1085ae411992ce72418d69685e5fca4a66ad7da0ab96628f594d366c8fc826ce58309e9053c27f7 + +Count = 39 +Adata = 72d566 +Payload = 1a1860ac8c11c5d262f8141738cae8ff91ca05906dc98bb4 +CT = c820e55ab91ed0a359b6e8f50e6074eb9f1cae3258159f61cdd6ac6c42cd3d11e0344a9c1001e253 + +[Alen = 4] + +Key = df052e95aea3769a433ce4e4e800b8418649bbe8c6297eb0 +Nonce = ba356d392c3f700f4f2706a4ca + +Count = 40 +Adata = 8ffc0e3d +Payload = e8c1a89228d8212f75c136bab7923a89f9fea18e781cb836 +CT = 66b5d782323925e1bd0a8413a9a5a881356453d5df2cbeb199b2e1e803550dcdde55fd66ecb45edd + +Count = 41 +Adata = 2b4f9cfc +Payload = a12c6324e022affd61b7e0d8cccbeb23e2e6c65355c1d586 +CT = 2f581c34fac3ab33a97c5271d2fc792b2e7c3408f2f1d3019e8fbc507244ba234a0581dc69962a66 + +Count = 42 +Adata = b4de3039 +Payload = 7cccb26f1dd227bc77458b99fd9e00f8e801adaece7bfcd1 +CT = f2b8cd7f07332372bf8e3930e3a992f0249b5ff5694bfa5628a2857099af20a4ae08e687bdb02c75 + +Count = 43 +Adata = bc59f18c +Payload = 692b53c1355475c71ceff0b0952a8b3541b2938270247d44 +CT = e75f2cd12fb57109d42442198b1d193d8d2861d9d7147bc3e33a6416e387d9e571a1954471ec9cc7 + +Count = 44 +Adata = 4fd9fd39 +Payload = 7e3e755e25bbe78d4a7770f9356ab9f4ff1bbfdba46383f5 +CT = f04a0a4e3f5ae34382bcc2502b5d2bfc33814d8003538572180f9735f994c8335e593f30b331a920 + +Count = 45 +Adata = 296cd04c +Payload = 997b712cd9295dc43cc19b40679f218c27af3e8c638d2e5d +CT = 170f0e3cc3c8590af40a29e979a8b384eb35ccd7c4bd28da91990fa537d2657d01f66872ba9af22f + +Count = 46 +Adata = 88037d3e +Payload = 577981ccb6c893dfe6405075fcb41507de7f9bfda860791f +CT = d90dfedcac2997112e8be2dce283870f12e569a60f507f984915cb93e84028c7aedce1a2dadbb6bb + +Count = 47 +Adata = fc4bb852 +Payload = 37ba9f57ec230675ce060ba3d388095adf15907aa0b0673d +CT = b9cee047f6c202bb06cdb90acdbf9b52138f6221078061ba25baa6385af8d7b807a2d2ab19aa4999 + +Count = 48 +Adata = f40ec14f +Payload = 401e0cdc132a9e4a9b5ceeed3c181f67e5203ea69508deff +CT = ce6a73cc09cb9a8453975c44222f8d6f29baccfd3238d8786adcdb44870e1105b7318d8bad0af957 + +Count = 49 +Adata = 90e2c63b +Payload = 0234dae5bd7ae66c67ff0c1a3f1a191a0d7bceb451bc2b7d +CT = 8c40a5f5a79be2a2af34beb3212d8b12c1e13ceff68c2dfa8b079fb71d45bd985bffd343c3362653 + +[Alen = 5] + +Key = 16d345606a315ad2406abbcb43cd8cabe948107ba6d17a72 +Nonce = d4ef3e9e04f1b7f20ffc5a022e + +Count = 50 +Adata = a468f08d07 +Payload = d3bef460223c81e4579c9d1d463ac5e0881685de1420a411 +CT = abb85db49a9b1c8724ecbc734cc8373bd20083cfa4007b1cfe4d3a3bb25f89f692884be230c6035c + +Count = 51 +Adata = 4497649a54 +Payload = 81ad3f386bedcbf656ff535c63580d1f87e3c72326461ee1 +CT = f9ab96ecd34a5695258f723269aaffc4ddf5c1329666c1ecd05ae56511a230627e02d066c52a919e + +Count = 52 +Adata = c30ddd994e +Payload = 84b88264afec06b370dfcebf5e1d3e2c1f005faf248b3215 +CT = fcbe2bb0174b9bd003afefd154efccf7451659be94abed188ef92fc17dca026f1ac1eaf78a05017c + +Count = 53 +Adata = 9573270f7e +Payload = 9e4c8aa9b58a8eabc5586892f5541000b43f17d9a051a040 +CT = e64a237d0d2d13c8b62849fcffa6e2dbee2911c810717f4d38eddff1e60e2d9ae74a936364b8df21 + +Count = 54 +Adata = 40336790fc +Payload = 260f67122dfbe03365bc9e35e9d4ac4b2eb150eddb30857d +CT = 5e09cec6955c7d5016ccbf5be3265e9074a756fc6b105a70aa3d464ad89cae59b474d019a5a7605c + +Count = 55 +Adata = 0b310c8529 +Payload = 1d55e7352bd895c4ef77389a7225c664f72b38c8de778d57 +CT = 65534ee1937f08a79c0719f478d734bfad3d3ed96e57525abeab0c520e64939c6950c0fa406eafb1 + +Count = 56 +Adata = 5756b2c681 +Payload = fbd315e1f5bd0f0e60ee6684c88f3543452c62ea0701d11d +CT = 83d5bc354d1a926d139e47eac27dc7981f3a64fbb7210e10d22d339c382343bf39c239fd64c2a64f + +Count = 57 +Adata = 3b919e3665 +Payload = d68d6556c5a5b1f5a123389b3ce966d5837cb8fcf5accfff +CT = ae8bcc827d022c96d25319f5361b940ed96abeed458c10f2fcd6b562a1b6aa10be92a81f99ed540c + +Count = 58 +Adata = 58749b643f +Payload = 062cb6962fa5b3a6239b95f3a51b478a1f32b081dc538a80 +CT = 7e2a1f4297022ec550ebb49dafe9b5514524b6906c73558d4b853022237d94d253b375bf2150e699 + +Count = 59 +Adata = a5d50c008b +Payload = 08c62ff9bd7bcf189f530d5065f8764532d2692f69858483 +CT = 70c0862d05dc527bec232c3e6f0a849e68c46f3ed9a55b8ee7aee0d403b2cf6f8b993eebd6b93615 + +[Alen = 6] + +Key = 1c476cfd7dd300d961fd3f24a6fe0e80742b00851676ca63 +Nonce = e300fc7a5b96806382c35af5b2 + +Count = 60 +Adata = 28130f938c45 +Payload = 6f3938932b5c1280311e892280d8a822a828a0be7fdb1bcd +CT = df48662fe134e75a85abc2cece2c3b6236c88a70fa792e9beadc9601adf9fbdf4e3e94b395b0a332 + +Count = 61 +Adata = f600024a7bf9 +Payload = 0af7345e71f4e8886503395ade0b0296a5856e086638b06a +CT = ba866ae2bb9c1d52d1b672b690ff91d63b6544c6e39a853c0692a40a6aba8d7c5addae21de90fea9 + +Count = 62 +Adata = 4eef510d1f48 +Payload = 37f57772f056f45a5ce9f46d27be1858980c8935b9c839b7 +CT = 878429ce3a3e0180e85cbf81694a8b1806eca3fb3c6a0ce122f64becb581070411957e632e19bb8f + +Count = 63 +Adata = 4c9c76b6fad5 +Payload = 8bb10c82bcabb7fb2b169252ab443b01df217cf908b8c241 +CT = 3bc0523e76c342219fa3d9bee5b0a84141c156378d1af71708c59f83aa97d069b6d83d9387051f43 + +Count = 64 +Adata = 5572ecfc7e53 +Payload = d1ccb4654a22b1afe32f3d3035fdccd87e9cbed83c679007 +CT = 61bdead9804a4475579a76dc7b095f98e07c9416b9c5a551f04686ee1d7b985d903f1de6cf78f8f4 + +Count = 65 +Adata = bffdf9d20d74 +Payload = f990a8f6ba14065d48665db36eb470c49f38e2b6376a9bde +CT = 49e1f64a707cf387fcd3165f2040e38401d8c878b2c8ae88f8118f1b9f39b51965ae9ef1bdb40111 + +Count = 66 +Adata = 3f27e678c580 +Payload = f8c7d89639ab742a8bcfffe776e868d671e1fbdd55807a8a +CT = 48b6862af3c381f03f7ab40b381cfb96ef01d113d0224fdca3236d02f33f49759f281315e449bfef + +Count = 67 +Adata = 1294cb9db5f5 +Payload = 8601cfd7d935e8a8487b9c39d55ca27096255f2eb9e009e3 +CT = 3670916b135d1d72fcced7d59ba8313008c575e03c423cb5e74770a07c242c3854ceb242dadc1976 + +Count = 68 +Adata = cec271332b75 +Payload = 77c85b8022f58337b364142a2474fe5cfddb31cfca48af46 +CT = c7b9053ce89d76ed07d15fc66a806d1c633b1b014fea9a10d6c65f19175cfa49898655ccdddb864a + +Count = 69 +Adata = da06bd140502 +Payload = b0f2db802475fa70af02057373844f637a3244cda4b4f93d +CT = 0083853cee1d0faa1bb74e9f3d70dc23e4d26e032116cc6b458822e49e69031431b3eea872a72eb7 + +[Alen = 7] + +Key = 79d1e38a70df1cf239be168833dcd0570bc8f37b3aa26c37 +Nonce = 8229d6d7e9e21fdc789bff5dcf + +Count = 70 +Adata = 076887d2abe900 +Payload = 83c24f3a77b83b4ef45277ba90225f3ba1722312f52b1a07 +CT = 19d880f1d959a68f162de243d4a45747ace704613359b27218d1531a066de60a95d2924a6910e990 + +Count = 71 +Adata = 7535bcc6fbd1a0 +Payload = 24f85ef683cc521387f484bc0b2ad9172f61884c09a9718c +CT = bee2913d2d2dcfd2658b11454facd16b22f4af3fcfdbd9f96dbf58406020e6df7b312b6825127f9a + +Count = 72 +Adata = f4f96d7b4384a3 +Payload = 212bedfa06b5e1a2c3a2f31f6f791dd9df8ef26077821c0a +CT = bb312231a8547c6321dd66e62bff15a5d21bd513b1f0b47f64dd755177efc87f8b1daf1fd88e51a6 + +Count = 73 +Adata = 3b7e3d9c1a7fa2 +Payload = 8b9036914bb0f440c8dbcfde9b9547be5e5ef1f56492c75e +CT = 118af95ae55169812aa45a27df134fc253cbd686a2e06f2b0be31cab31f1a20805d5c07dc516d707 + +Count = 74 +Adata = a8c35fae8912d6 +Payload = 50f3f3a91bf6fd9573d5ef54b9bb5805205b2f9865d81fd7 +CT = cae93c62b517605491aa7aadfd3d50792dce08eba3aab7a2399df9a45ad153c0dfb3fec3b9d6f7c5 + +Count = 75 +Adata = db636541f2429d +Payload = 6fbda8d435555e735443f1e6bc09e96065092efd89edd64a +CT = f5a7671f9bb4c3b2b63c641ff88fe11c689c098e4f9f7e3fe20b7da94eac8c7ef8478671165e0d82 + +Count = 76 +Adata = a8de55170c6dc0 +Payload = 640ef4c246a2c6e16ddc49072a5aeef70319149ffba071ef +CT = fe143b09e8435b208fa3dcfe6edce68b0e8c33ec3dd2d99a4979c35bdbf9538666b6fa57f0f915d8 + +Count = 77 +Adata = f8d64ce2aa66e6 +Payload = a14e3910766f31594a28ad2c3678c31d0c3aee88484ca6d6 +CT = 3b54f6dbd88eac98a85738d572fecb6101afc9fb8e3e0ea3752824a691da2e99374ae6c031d74ffb + +Count = 78 +Adata = b3c340afdc53a8 +Payload = 1b8e0a09e6364020b4cac704dc19bfa79455295604cf9c9a +CT = 8194c5c248d7dde156b552fd989fb7db99c00e25c2bd34ef04159a68706faa2e8c3376b4dbeb423a + +Count = 79 +Adata = 73824034001519 +Payload = 52c84a0735eea6c5c230644075ebfc5db0c3128056e7a8f4 +CT = c8d285cc9b0f3b04204ff1b9316df421bd5635f390950081e5adc7564721ead2af75cb98e61148b4 + +[Alen = 8] + +Key = 72e6cebdaf88205c4e74428664bc0d7eb4687a272217b7ca +Nonce = 3820db475c7cb04a0f74d8e449 + +Count = 80 +Adata = f427c47e10c45bb3 +Payload = 54bc7e3c227df4e83252a5848fea12dfdb2d14b9e67c1629 +CT = 91e7baff2b42af63e26c87ce6991af22422c1f82906858b1721961de5c768f4d19bd3034f44f08d2 + +Count = 81 +Adata = ca25504f3f5559aa +Payload = ff4493fea916f49fbb3cae2838bc84e293531092cc0904ab +CT = 3a1f573da029af146b028c62dec7391f0a521ba9ba1d4a3342968c638ecb8a2b358e8eaefd931efb + +Count = 82 +Adata = 8215753d9efc5132 +Payload = af16ab8558269a93d8e8c9e38f12a8768947d8b69be0e259 +CT = 6a4d6f465119c11808d6eba96969158b1046d38dedf4acc1f8ac11752fe51e354f3f8a68815539aa + +Count = 83 +Adata = 9e7cdbc6202e6492 +Payload = 744a167ae31a8ca20df82290766429de9ef0b7dfe199a78d +CT = b111d2b9ea25d729ddc600da901f942307f1bce4978de915489de8e241dcab16bdcbf1a1ff4d8d10 + +Count = 84 +Adata = b8d511d0ab86a07f +Payload = eeb39de1fe21b5aba654da45fe1481decb22365fa4cbe49d +CT = 2be85922f71eee20766af80f186f3c2352233d64d2dfaa053fab212a1b6dc7b953e2bc211be194ae + +Count = 85 +Adata = c74a5d4265f9f3d5 +Payload = e95c20e80153bae3fde3c3d82b6b33b35fc1959fa31a5d11 +CT = 2c07e42b086ce1682ddde192cd108e4ec6c09ea4d50e138973918ab70fe048d6c5b63a01725eddfb + +Count = 86 +Adata = fd849d3ada03181a +Payload = 6d00606c72cea3deaea5b51ae09e61924355e167058ef42c +CT = a85ba4af7bf1f8557e9b975006e5dc6fda54ea5c739abab487089bc20867f474c1127aa1320f0000 + +Count = 87 +Adata = 56825a68681f498c +Payload = c47705d897a6c7e7aed710b96e2d8532c23b82090e21b114 +CT = 012cc11b9e999c6c7ee932f3885638cf5b3a89327835ff8c34a23b0b6ac4d297dd7832a5e2102272 + +Count = 88 +Adata = 72e4da839913a26e +Payload = c822a1ee581cf85b0482c821473385bd3f28528e5e5760d9 +CT = 0d79652d5123a3d0d4bcea6ba1483840a62959b528432e41dd665766c7af21ff890bd40178f1c660 + +Count = 89 +Adata = 138457571ee8dafd +Payload = 3ffb82a83308da66e95ac63ae92931b09ffe0e42afbb4979 +CT = faa0466b3a3781ed3964e4700f528c4d06ff0579d9af07e16a6a58bb772c79481dc26861ffbd68c6 + +[Alen = 9] + +Key = 39c03a0c8634047b1635348f284d3dc1e752ab40548eb337 +Nonce = 9e2ea8eb7f56087ee506925648 + +Count = 90 +Adata = 28d157f09a71da80dd +Payload = 0662e63c88e963d3e0cf2c4653515ae4474a2c78ab0394c0 +CT = 01dcd4dd3b8c1369518136ce45e8bb9df565b0ad231a887b02ada34addf0aa2f4744ed2e07995491 + +Count = 91 +Adata = c17d311362c41d442b +Payload = d6df8b60c697093987b3d89a3667b36504b6ddddf12b0900 +CT = d161b98175f2798336fdc21220de521cb6994108793215bb38a27466b8741bffce44ef04b23af321 + +Count = 92 +Adata = 006669ef1a11b65b1d +Payload = 49ad29ef5e82b08752ac5a50dd982e4bcb700005454ade6c +CT = 4e131b0eede7c03de3e240d8cb21cf32795f9cd0cd53c2d77d11372fb0dab1c99b159e5fe9f91118 + +Count = 93 +Adata = 8eafce9ba466fd53eb +Payload = 385f9fb139dbf88561b7a500b0c7b835fe57e2698c6d9f76 +CT = 3fe1ad508abe883fd0f9bf88a67e594c4c787ebc047483cd09e4898a4046f6ec9f40e412915007e4 + +Count = 94 +Adata = 796e55fbe7bed46d02 +Payload = 4ebb149b01cbacba32d11168ca61928ea149dcf2ee2c1001 +CT = 4905267ab2aedc00839f0be0dcd873f71366402766350cba5d40a9902481bfac7ff33d08fb4b3d31 + +Count = 95 +Adata = 8f958d796be0566512 +Payload = 0d974e5621caa1d86eaaee689ccbca57843373fcf20db407 +CT = 0a297cb792afd162dfe4f4e08a722b2e361cef297a14a8bcd972d09a17172161eb68a30b593b1bd6 + +Count = 96 +Adata = cc879ff2d583a7288c +Payload = f8e0dac6a691dfb231411b5c5f70a0daff83cc637b0c7bb3 +CT = ff5ee82715f4af08800f01d449c941a34dac50b6f3156708119cc26a80c152c253fbc36cb886e0fc + +Count = 97 +Adata = 4765d696d19dec58bc +Payload = 096a36396ccfa260f28fb0919157a5076b53506c51a2a4ef +CT = 0ed404d8dfaad2da43c1aa1987ee447ed97cccb9d9bbb8549de06cc5c3bc4ad75076c774576843fb + +Count = 98 +Adata = a004f283afc3309c31 +Payload = 5b943269be41e2758a4ea6a3cc621b711a8ba6002783aa72 +CT = 5c2a00880d2492cf3b00bc2bdadbfa08a8a43ad5af9ab6c9135493b44f79a5774df6b2943b0bec67 + +Count = 99 +Adata = cdd5d8aefe49a315ad +Payload = 5f27867109e74862ce0dbc9ba73c420b93067bdede17ae51 +CT = 5899b490ba8238d87f43a613b185a3722129e70b560eb2ea7a5da4a29a9012d78b6de6f1b3e8c9ed + +[Alen = 10] + +Key = e2a92ffbb0b5eb68cb82687f12449fae5167d375131b0b10 +Nonce = 441ad5e1382e083a95224f395d + +Count = 100 +Adata = 2352648299b0413cb2ce +Payload = 048c9ba4597c3bb595bfd5048e5e9a1296f30e5c0118b177 +CT = 25247a258e4ac0a988d8def60cc174a9d4578cd5346fb5150c96e8ab8774baa421f39c64a386c418 + +Count = 101 +Adata = ce003c836a6f5f066053 +Payload = 02ea8e7e488c863584f828df13dfeb68433294d11d9ca9d7 +CT = 23426fff9fba7d29999f232d914005d30196165828ebadb5d453036cdc6bad0c5e770a6249a52e74 + +Count = 102 +Adata = d11be73a104ccc6346d5 +Payload = 6d5573c9279897d7d1602d8a95c04bb5ca3fad2dbe89a024 +CT = 4cfd9248f0ae6ccbcc072678175fa50e889b2fa48bfea4464627ad75bbfe17f3f5ddfd3dbc1045f3 + +Count = 103 +Adata = 6a7b80b6738ff0a23ad5 +Payload = 97a813e75d95d25c2edb1c705c4ffe4d7c08c756761fbc0b +CT = b600f2668aa3294033bc1782ded010f63eac45df4368b869af8943f74706cc3394a170fd49f7011a + +Count = 104 +Adata = a391acdb3a06dae4a671 +Payload = a78981ac244307451e4d3fd7f654b70cc4e6518aa47a3c18 +CT = 8621602df375fc59032a342574cb59b78642d303910d387af22597f63074ca3533bb5e107860481f + +Count = 105 +Adata = 0b9f28f2d3215785f569 +Payload = 5d649d79ff0e304e164a383c74f13d7ffab145d00cb0ec2c +CT = 7ccc7cf82838cb520b2d33cef66ed3c4b815c75939c7e84e905b5609f593c6ea9281f66cd2e646dd + +Count = 106 +Adata = 7928b1091cbfb2eef0fe +Payload = 83a273687dced7b94d569f81d75508595cde668f06406183 +CT = a20a92e9aaf82ca55031947355cae6e21e7ae406333765e1428195355618ea0cf87260ad20b6d7b9 + +Count = 107 +Adata = 3b74afb81f54a93c79d5 +Payload = b4dc3c059cf7b47dd0bb7f165a63fc80b5c6b5f3ca7eeb73 +CT = 9574dd844bc14f61cddc74e4d8fc123bf762377aff09ef1155019659f41a5f0430695b4ada9d8b8d + +Count = 108 +Adata = a46ae4c71d4c9eb72fab +Payload = 7e919581c5105d98717d0613e1ca869c6516506ea482d5c2 +CT = 5f3974001226a6846c1a0de16355682727b2d2e791f5d1a01514b252f33dc870c42260e48c4fa9fd + +Count = 109 +Adata = a1ace61711f0a09ac17d +Payload = 3a4558b55214f21cbd2ae2eda5a2321cfc2f102e059b744a +CT = 1bedb93485220900a04de91f273ddca7be8b92a730ec7028c263c667d7ed58907452c092905d0b31 + +[Alen = 11] + +Key = ef1ad3eb0bde7d4728389da2255d1f8a66ecb72e6f2f1ac4 +Nonce = 8e7d8a44244daa7df2b340993e + +Count = 110 +Adata = 521583c25eb4a3b2e46120 +Payload = 9f580cc6c62a05ce125c6bec109a48ca527ee26a64b14b68 +CT = ff0ff95bcb0bccd5e4aadd77ac6770f5013654eb3c6386fded2c87135861b43a99f258b6938f66e3 + +Count = 111 +Adata = 31adb39e947f8883fa4b69 +Payload = f16bba081bddda83546eabc9a55c81a439720dd8562ce964 +CT = 913c4f9516fc1398a2981d5219a1b99b6a3abb590efe24f132b87476d66a1bd405f484ef9ac8ab7e + +Count = 112 +Adata = f05f39eb0a3d6460076aa8 +Payload = 6baf784f63cf45a1836fa8f3609fff7870ce8cbd1e91268c +CT = 0bf88dd26eee8cba75991e68dc62c74723863a3c4643eb19a120b455b366cb104fd8b6dc2c80471e + +Count = 113 +Adata = 74c7a633ff73ff507009c5 +Payload = d8176a6de1c15a14c8b8b58725c179dc84c9308268d718d5 +CT = b8409ff0ece0930f3e4e031c993c41e3d78186033005d5400c8ca09f4bf06b1c27e75abf15112e49 + +Count = 114 +Adata = ab322a88cf44b9ca774415 +Payload = 3706e4d8ff748574f382e5f9b0a3b6258f1f360fd87001b0 +CT = 57511145f2554c6f057453620c5e8e1adc57808e80a2cc25b3159274a7de3550baf759f7fae53dbc + +Count = 115 +Adata = d6fe6e17221d4e06ed3ab9 +Payload = e02217394772deffe218c405e40f2a3a56ca01d55d6d3330 +CT = 8075e2a44a5317e414ee729e58f212050582b75405bffea516fba8d193e133e6f78daa39681cb262 + +Count = 116 +Adata = 2739d2cdfcbe7d5cd7d28c +Payload = bb713f74a884bd1a994adba87561d637853c6181290ef5e8 +CT = db26cae9a5a574016fbc6d33c99cee08d674d70071dc387d65f92db3b3d1c2de04c69c5d06b0e001 + +Count = 117 +Adata = 5841571299cd064a6262b7 +Payload = 9641dedd50d80ac0abf7591436065fa2e23e4687abbb86e4 +CT = f6162b405df9c3db5d01ef8f8afb679db176f006f3694b716e4d20ab5ffad6f71155f6839dfdbb25 + +Count = 118 +Adata = dc5d7fd97bb3243ba585fa +Payload = aefda8501193edacb8abb94fff875529a537a462c4b9b69c +CT = ceaa5dcd1cb224b74e5d0fd4437a6d16f67f12e39c6b7b090ebc3af2de52b8bee3d130fa973f716b + +Count = 119 +Adata = 8789e0b3e0dc13d9725b37 +Payload = 65e53f549b62aca03f21ab2a494b93805e02cfecf4f12aa4 +CT = 05b2cac9964365bbc9d71db1f5b6abbf0d4a796dac23e731b5cd5a004a0ef28e30383bdaed8f93c7 + +[Alen = 12] + +Key = 44cba20b7204ed85327c9c71c6fea00b47ce7bdde9dea490 +Nonce = f3329154d8908f4e4a5b079992 + +Count = 120 +Adata = f1e0af185180d2eb63e50e37 +Payload = 6333bde218b784ccd8370492f7c8c722f8ef143af66d71d7 +CT = b9401a4927b34dc15e9193db00212f85f0c319781ec90e3b4484d93cb422cb564acc63d3d18e169c + +Count = 121 +Adata = ea74231e49e667ca1c21d46d +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e +CT = e67d8fbeec794d42fc64d7f36a87d2ac22aafa440021ea72c4c151d9927e6a9f19d47ff7d79ca6f6 + +Count = 122 +Adata = 7f5871a8300471dc325f8289 +Payload = c642c9722d84d708682350dc70bdaa9a1181a415a9e72b93 +CT = 1c316ed912801e05ee85c7958754423d19ada9574143547f959eee29be1415ab03444de0fa42707d + +Count = 123 +Adata = ee7e6075ba52846de5d62549 +Payload = 2286a1eddd80737a724ca941217e9f0232870b6c2f20d29c +CT = f8f50646e284ba77f4ea3e08d69777a53aab062ec784ad70ce97c1c8aea70de04580d7b37f8c014d + +Count = 124 +Adata = a30f2fd445820cdf80014554 +Payload = 92577d5db20391110309d490f52acecdfc18382f368bbe42 +CT = 4824daf68d07581c85af43d902c3266af434356dde2fc1ae23b536f993381e525a14599dd5c02e80 + +Count = 125 +Adata = 0cfec933831644b468724e80 +Payload = 6803dc3f7c06568ca78ee5aa2e9b1b354a4f1e067ff6a25b +CT = b2707b9443029f81212872e3d972f392426313449752ddb7d6ea722fdd82ede2c7b8832dde3cbe80 + +Count = 126 +Adata = 6bd14e3bf91dc7fd6be07647 +Payload = 5580672e52aacb9d714a34c31c33fc221e13e8f90849adba +CT = 8ff3c0856dae0290f7eca38aebda1485163fe5bbe0edd2565c2994b2b469ad977564d83db1ebfe38 + +Count = 127 +Adata = 6c6ad35e97d023217018162f +Payload = 1bd1bcc6766d251144376d91ff93ef83033d0e0ee546266f +CT = c1a21b6d4969ec1cc291fad8087a07240b11034c0de25983ac31ebf9e255eecf3c69ddf198760556 + +Count = 128 +Adata = 52c35db85cc34b6efed180ee +Payload = 28f71a2fe498f89203a5d23e8f8fa64b124aea6459fe721d +CT = f284bd84db9c319f8503457778664eec1a66e726b15a0df13424079e3de87fa59c3d10fd62380a90 + +Count = 129 +Adata = a96e4776270683ee7d0c9b6e +Payload = 5be078ead1926074afca81f9a97dc93dcb954c955e4343e4 +CT = 8193df41ee96a979296c16b05e94219ac3b941d7b6e73c082258e1f3fc3eb7e976c86c8a21bd6569 + +[Alen = 13] + +Key = b5f43f3ae38a6165f0f990abe9ee50cd9ad7e847a0a51731 +Nonce = 13501aebda19a9bf1b5ffaa42a + +Count = 130 +Adata = ead4c45ff9db54f9902a6de181 +Payload = 3726c1aaf85ee8099a7ebd3268700e07d4b3f292c65bba34 +CT = fd80e88f07dad09eed5569a4f9bb65c42ef426dda40450119503d811701642143013f28ce384d912 + +Count = 131 +Adata = e63b89e95df8338ecdcc885c3b +Payload = 37f86aa62b1e31e9ded3e1a38a7e1a8a638d619ac109694f +CT = fd5e4383d49a097ea9f835351bb5714999cab5d5a356836ac6d3f9c7b9f25e09ce164a11370b8b05 + +Count = 132 +Adata = a2161536e263459e0b0a29a225 +Payload = 1749f5977197359a5d318d5fea38aba95b3603f1d7011e66 +CT = ddefdcb28e130d0d2a1a59c97bf3c06aa171d7beb55ef443e02b848b006c28803303fd97bdc35476 + +Count = 133 +Adata = 8ac95a6ae0bce0fb07f85368ab +Payload = 0842bfb8b38283257c2ea58b29c8350775f1dbf15f73c905 +CT = c2e4969d4c06bbb20b05711db8035ec48fb60fbe3d2c2320431de2bc45b2b726bfda92939a11f68b + +Count = 134 +Adata = 44cc9b2510680c4d73f1938c77 +Payload = 68d09fce5e89e4ef6d453b8ee326090cedb97b75b886c7b3 +CT = a276b6eba10ddc781a6eef1872ed62cf17feaf3adad92d96786add8c2619f0782ca12312a1d64266 + +Count = 135 +Adata = d8a662ab8449bd037da0346a24 +Payload = 45245de4ac6a6196a0b15b77c622a21bb50627379ddb4256 +CT = 8f8274c153ee5901d79a8fe157e9c9d84f41f378ff84a873b6bd4a09f9b4aa2864d39ff1a03e0ff7 + +Count = 136 +Adata = 8ed39da1d9179e77156eb909f3 +Payload = e928e37dbe8389a53c650edc86f83cd3589a53dc8e45adfd +CT = 238eca584107b1324b4eda4a17335710a2dd8793ec1a47d819b6935778ffbc0953974de0a9d87a31 + +Count = 137 +Adata = 423515f7bd592d6a7a2408661a +Payload = 4c3bdc6186297896097b3297ba90bcde78dc8a9efe3bd8b1 +CT = 869df54479ad40017e50e6012b5bd71d829b5ed19c64329400a3da0d3ce34a272b51582a998f461e + +Count = 138 +Adata = 5a6bc2cd6890a473d478a582b4 +Payload = 1c5ebaeb7b926a39b8aaf65a4c484b113d6f2caafadc33ea +CT = d6f893ce841652aecf8122ccdd8320d2c728f8e59883d9cf4ef28c338f497a40f550f2945734ad1a + +Count = 139 +Adata = 7bdc26b5b4df58af539d91eb2e +Payload = be5c9fee6babf569c66e6a0d0f3c4dc314f40c0aeca493f7 +CT = 74fab6cb942fcdfeb145be9b9ef72600eeb3d8458efb79d2e07f1998e57ba9b611568632dc5cb9fe + +[Alen = 14] + +Key = 13f179aa2a23bc90a85660306394940e9bb226ce3885ec01 +Nonce = aaa52c63ca1f74a203d08c2078 + +Count = 140 +Adata = 5cc924222692979a8e28ab1e0018 +Payload = d3b36c6289ad6ae7c5d885fe83d62a76270689ce05fa3b48 +CT = bc4fcef401c2e1d1c335734ff23ea52c3474d2e6f31648a7f58649400ac9e825b038d67f0c2a6f1c + +Count = 141 +Adata = 21fb9cdd9b110bbbc6832275dfa7 +Payload = a7742dd9c3e8bbad08157fbd01ebfb94e1639117c4b4eb5d +CT = c8888f4f4b87309b0ef8890c700374cef211ca3f325898b23fa5ad4142e0b4650fa5cc8f7ef70d62 + +Count = 142 +Adata = 9919ddb6ee6c330646cd15953d39 +Payload = 297b4498bf5427e6341aa9275c1f62e3b0c9b150a195ae72 +CT = 4687e60e373bacd032f75f962df7edb9a3bbea785779dd9dfec551d11b8647432cc4320173939600 + +Count = 143 +Adata = f94cfd1f8c7902a57784c10b9a5a +Payload = 2218868033e17220655f0196dab6193c58293ca105d467d9 +CT = 4de42416bb8ef91663b2f727ab5e96664b5b6789f3381436a79a075ec2cacee1482b8328b697a3b2 + +Count = 144 +Adata = 63f3fe58c348dc6bcbb44c3c370f +Payload = 4a9bc26fb10000a57b9e73a8a3d30f66ef9de8782201ffa8 +CT = 256760f9396f8b937d738519d23b803cfcefb350d4ed8c4739cbe17b4edd64a3dcd2b8ae3352c04a + +Count = 145 +Adata = dec0ce763833305aa9c9efdc2c65 +Payload = 1b61b3ff3e4847a17f55f7565826b0e2ccc1368f4de32022 +CT = 749d1169b627cc9779b801e729ce3fb8dfb36da7bb0f53cdf54665c476d0741164685b0d81caca31 + +Count = 146 +Adata = 592ef6784ee839a049e0d96257fa +Payload = 32e5998b37987a38800f5bfe3132979ca1447314570aaef7 +CT = 5d193b1dbff7f10e86e2ad4f40da18c6b236283ca1e6dd18500d93b11fecc8b4560320878ba53550 + +Count = 147 +Adata = 4a47a82b999a2a739959f153a091 +Payload = 84acfb6cf10b301558e5acbf41bbbe0b145dc66dc600f4df +CT = eb5059fa7964bb235e085a0e30533151072f9d4530ec87303c2a41443578adaf31483bbb6b9f10b0 + +Count = 148 +Adata = 4ceba98cc0ff5de1a7d580cf23d2 +Payload = d7c73d77a286df38aad116843620911c92e11486be5fcb0c +CT = b83b9fe12ae9540eac3ce03547c81e4681934fae48b3b8e32232a856c07999e99a4701988b486ef2 + +Count = 149 +Adata = 15e3b3c5794fececd703ac58ccb2 +Payload = 140882c5d3534bb0861e7ba9423e67439a02ee6f0b0b00f3 +CT = 7bf420535b3cc08680f38d1833d6e8198970b547fde7731cb3a6d50a92f3183c0c5090edc3c7f822 + +[Alen = 15] + +Key = c1dfc48273d406a3a7b9176f80b2dc4e9a7f68134bab66d2 +Nonce = 1ac53ba965cdaeeef7326a37e4 + +Count = 150 +Adata = 39ba54a410a58a5d11615a2163cc3b +Payload = 67d9728a88f1fac3af43ed6d634ba902896bd226858697d9 +CT = 360f0fc714994e3b59448b50cdd61d511b4f09e0e5fb5ac826a51fe5b9b598a17eb3da10f936813b + +Count = 151 +Adata = 38b0cca09d69320105d24ee3f96684 +Payload = a8365ba9fcfff060b28895f7a2d786c5991a8f7758962caa +CT = f9e026e460974498448ff3ca0c4a32960b3e54b138ebe1bbba673a94f4280e84724f4a2510165e9a + +Count = 152 +Adata = 76718dfb9c68acdd82592d96def39a +Payload = 497be597dd695cb159d8a64f44049c3b549ac927837b1b90 +CT = 18ad98da4101e849afdfc072ea992868c6be12e1e306d68118865ab37be6f015316e0d177b6c2e91 + +Count = 153 +Adata = dd719ba1710916a546233c1494a7a7 +Payload = ca452c21383ebc3fb584f0d59a227374854983f243a3f460 +CT = 9b93516ca45608c7438396e834bfc727176d583423de39713d903f67ad0d72fb8ffea2035216b769 + +Count = 154 +Adata = d893fa2bd7c70e21a5934dc2e99037 +Payload = 3dd118ed65453d3d7844d8de78d7a43587ac5e9305b11464 +CT = 6c0765a0f92d89c58e43bee3d64a10661588855565ccd9750b885e3e054f519d0355db1bd589bb35 + +Count = 155 +Adata = 97c60265a3a6993b97ac1b375a79b8 +Payload = a7375ba32251af0138bd9fd8fcd56a7c43ab2ca9a7fc0117 +CT = f6e126eebe391bf9cebaf9e55248de2fd18ff76fc781cc064a950e4bed4137e38787839e39924821 + +Count = 156 +Adata = acfdf302ed116ac4755069d1704423 +Payload = d39d188f28521e4fb0a0c5e48e6d6efe4383c95b2535ea8d +CT = 824b65c2b43aaab746a7a3d920f0daadd1a7129d4548279cca94dd97fd2a5d50eb7dd6234b40c525 + +Count = 157 +Adata = d449f97164aae9a3046624e98810bc +Payload = 758102470e221e30d87d2807b5f8b793a7a56c83eecf32a4 +CT = 24577f0a924aaac82e7a4e3a1b6503c03581b7458eb2ffb596f11450d5d2ba55ffb4a6cf7eab847a + +Count = 158 +Adata = 3e6c914a196e175079315b1c92b2b8 +Payload = 1db875c4b4f9dd4926dfb5604d6c4d21aba7d905aed9d1b0 +CT = 4c6e0889289169b1d0d8d35de3f1f972398302c3cea41ca164894e9218ecacd143fb62df69a13d33 + +Count = 159 +Adata = e2b7b00d0cfbdfcc24f1819ae1869f +Payload = d7a75bc621addccbbe162b86d536d69c887c278384af54e7 +CT = 8671268bbdc5683348114dbb7bab62cf1a58fc45e4d299f685a7c19bc9c2f8e36ed95015ebb679ae + +[Alen = 16] + +Key = d8a662ab8449bd037da0346a24565683a3bbbbd1800e3c1c +Nonce = 166fb8d0e110124c09013e0568 + +Count = 160 +Adata = 1c1c082eeb5b8548283d50cc2ace1c35 +Payload = 61fdd10938557080191d13dd6c3002dd445d9af988029199 +CT = 23c05927502a4ee6e61e4e10552d49b020643eab476eeacc867601fe79a122a7817819655183283e + +Count = 161 +Adata = cae884fa25adedd883ef4e7c855def19 +Payload = 8c7ae2c3c503e9072d6e04e44c2ea78fd24994503567a136 +CT = ce476aedad7cd761d26d59297533ece2b6703002fa0bda63160bb976ab072aec8fcea8eab3dc5aff + +Count = 162 +Adata = a350ed58c04473e113b9088b1fb9dad9 +Payload = 863f9a26182f131c594972398b52b3a01a9d314fd9390bf4 +CT = c402120870502d7aa64a2ff4b24ff8cd7ea4951d165570a1291b2c13a3f5e49ce35b9047ee1e8627 + +Count = 163 +Adata = cb7090f7a465782f680fd44cbc558107 +Payload = bd94c9ad6253c25dc417f87b6e52e03621ccf4b3bff5b402 +CT = ffa941830a2cfc3b3b14a5b6574fab5b45f550e17099cf57fdd9fd1d469a9042b80e6458d25292b4 + +Count = 164 +Adata = 914cf55a3fc739b5f87ac7518cc4171b +Payload = c313bd213dc29c00691e25ce028884192e21a820003aece4 +CT = 812e350f55bda266961d78033b95cf744a180c72cf5697b1a8b8e82175ff30c69ea71d2cfb814ada + +Count = 165 +Adata = adc8b69d84ef7ae62f9ca9f371d3488e +Payload = 85e4e053b976e06a64dfa8523130cdd802d3e7c3d6d797c2 +CT = c7d9687dd109de0c9bdcf59f082d86b566ea439119bbec9776fa36db27b2f84d1b8ab55e2fc89ab8 + +Count = 166 +Adata = 29ed477994dd231d3a71157eb56d219d +Payload = c77aae5fd09dc9bceee7428e0734d4b0556528396a58f909 +CT = 85472671b8e2f7da11e41f433e299fdd315c8c6ba534825c0e32058ea939036805a735198934a072 + +Count = 167 +Adata = 494c8f931029a4919e2dcbc16512a8bf +Payload = 1f47273103f265f963e498878361c06c01a5ffcfb630a161 +CT = 5d7aaf1f6b8d5b9f9ce7c54aba7c8b01659c5b9d795cda3437098c81475f8a1d8f3b0e63d499d387 + +Count = 168 +Adata = 53200bc5d1f1fb0eeff02d2bc42f7d54 +Payload = a38231af405dc7b70c8dbc8cb84e6be8a0dc2e95fddc2ce8 +CT = e1bfb9812822f9d1f38ee14181532085c4e58ac732b057bd9d7317973878957e8fc1fa57a025a3e9 + +Count = 169 +Adata = 61e0e28bf344a9a1b04b15156e06498e +Payload = a0d3a94ba6bb3bedf38220d1cba7e91273ad19f9a1c436c0 +CT = e2ee2165cec4058b0c817d1cf2baa27f1794bdab6ea84d95b0aa1befae96e71b9d221673844b1cb7 + +[Alen = 17] + +Key = 116f4855121d6aa53e8b8b43a2e23d468c8568c744f49de5 +Nonce = 924322a3ef0c64412f460a91b2 + +Count = 170 +Adata = 03c2d22a3bb08bbb96b2811ce4b1110a83 +Payload = 1bd3b5db392402790be16e8d0a715453928f17f3384c13a7 +CT = ad736402626df0f9393fe4491eb812725ad39d6facf20b5b2f9340b0d48a17ae1cc71d7515e61ee9 + +Count = 171 +Adata = f390387610741d560325b5d2010d8cd4a0 +Payload = c93aaa04279e451b6880ed7b7fdb3ca9e80ab76180434937 +CT = 7f9a7bdd7cd7b79b5a5e67bf6b127a8820563dfd14fd51cb717bae4c040561bcfcf80fd842ae8dd8 + +Count = 172 +Adata = 891d7988a56415a7b433f463b1e80eaa62 +Payload = 2611612ccb5ffefaa73195509bb52c641472bca0dfd09d49 +CT = 90b1b0f590160c7a95ef1f948f7c6a45dc2e363c4b6e85b5bc9fb15d874feccb6b5f581fa470734f + +Count = 173 +Adata = 831c0fed5e600dd82d7d55669262a9a17d +Payload = 08136e946e306cde0544ddc2f3f4a529c89c7b77a5e635c1 +CT = beb3bf4d35799e5e379a5706e73de30800c0f1eb31582d3da72589ee50d23f925f7998ab3ccac37f + +Count = 174 +Adata = 32ca9d412d4ef0e89928496e96c9de7f2e +Payload = 695aaac402942de7d899cc3f741c7fb2b2d8247a7676cf29 +CT = dffa7b1d59dddf67ea4746fb60d539937a84aee6e2c8d7d555c0b608f331dca47c65f5c879f2d532 + +Count = 175 +Adata = 0746b2e6149c7f55854e9ca3e6861bf0e9 +Payload = 8f958d796be0566512f0512dcebd2e12f3160b05b72ae955 +CT = 39355ca030a9a4e5202edbe9da7468333b4a81992394f1a9b039bd916e923e2fc1f7c60eb59916fd + +Count = 176 +Adata = 0e4cbd1c574d656112bf6e70a8f23347f0 +Payload = 367ecd1b71dfb96a84e2369f28705dfaebf0c73ed35d5364 +CT = 80de1cc22a964beab63cbc5b3cb91bdb23ac4da247e34b98ac07f2c0847069fe5be26e623033f532 + +Count = 177 +Adata = 1a05ff12412bf728497536534c234901ce +Payload = a9ccee975feb10f635d548a8502f7c8b6adbd2be74117257 +CT = 1f6c3f4e04a2e276070bc26c44e63aaaa2875822e0af6aabf4e66a2b210e5a03bb10ff2926ed8a48 + +Count = 178 +Adata = 3bd063a51c71fab5aeb47e7f8f958d796b +Payload = 7df6220599d6235eb450989b6f0cd6c96db62b0d13afc4f4 +CT = cb56f3dcc29fd1de868e125f7bc590e8a5eaa1918711dc08ec90169d0c5c11fff8f255fedb13a99a + +Count = 179 +Adata = f0d334e0a27c3d00d56b15c2ee426e6347 +Payload = 6f65a24344c32debaf9f8c3fa426fe0b139e8ad1c8b1fbbb +CT = d9c5739a1f8adf6b9d4106fbb0efb82adbc2004d5c0fe347170141cf3f207c4f0fc1b0238477cfad + +[Alen = 18] + +Key = e67f3ba11282d61fe36e38cab7b559c2fd9cbe8bf7eb5863 +Nonce = a727ed373886dd872859b92ccd + +Count = 180 +Adata = 68d199e8fced02b7aeba31aa94068a25d27a +Payload = d7a954dae563b93385c02c82e0143b6c17ce3067d8b54120 +CT = c6cfaa1f54d041089bd81f89197e57a53b2880cefc3f9d877e30b2bcc3f1ea9ec2b8f28bf0af4ecf + +Count = 181 +Adata = fc4bbe329a86089ebe2a2f3320dad55a9bda +Payload = a206a1eb70a9d24bb5e72f314e7d91de074f59055653bdd2 +CT = b3605f2ec11a2a70abff1c3ab717fd172ba9e9ac72d961753a6e6844102d6bb86986c030765d3393 + +Count = 182 +Adata = d8741e540330692d83cc806a8ac1c4742be6 +Payload = 56ef76dbec6b8b46f5b7b4e311c0baaa6fcf54c69c0b9c3b +CT = 4789881e5dd8737debaf87e8e8aad6634329e46fb881409c3f92a80b1d82f8c1dc32bfe64adca12a + +Count = 183 +Adata = c8b1992dfba55b4ab86b480546c861655e1a +Payload = 2729636112f2abe2c76ea5e52a3f80b0f882f0f3b6f7c806 +CT = 364f9da4a34153d9d97696eed355ec79d464405a927d14a12fb48ad162b0c0678674d79d26a6b5ef + +Count = 184 +Adata = 347e12eec56e95aafcc7d25bf10fc756b4e4 +Payload = dd433eb7422c7c4dccee57a1679633ced3b5f08df763d457 +CT = cc25c072f39f8476d2f664aa9efc5f07ff534024d3e908f081c7cd81c974d985bf24b7fe9542141a + +Count = 185 +Adata = 45b35a04d6e2645e9a5aef206ed4e36199c9 +Payload = 70523bc397417e09d791a4976960e02636ca7144a5681cf7 +CT = 6134c50626f28632c989979c900a8cef1a2cc1ed81e2c050a7f6a5c04e59896074e1594706ab27e9 + +Count = 186 +Adata = 378b48531fe34f55125b2f14f59715dd6ef0 +Payload = 514cb462dd4b117f26cac22062fcbeb353650c71649a7b3d +CT = 402a4aa76cf8e94438d2f12b9b96d27a7f83bcd84010a79aa9d16c3ab79276cff345444511940a9d + +Count = 187 +Adata = 73ed686d6fecdc031cd97653137f269d6537 +Payload = 7f0c2b261db3f3de0ce3a733f4b8c446c374567d96d00379 +CT = 6e6ad5e3ac000be512fb94380dd2a88fef92e6d4b25adfdef92bf8aa6facbe6f9607ea02b54a1bf0 + +Count = 188 +Adata = 5b0441107e5560be94f030a41cedbdb116d9 +Payload = ebb3e2ad7803508ba46e81e220b1cff33ea8381504110e9f +CT = fad51c68c9b0a8b0ba76b2e9d9dba33a124e88bc209bd238e4936ee93b5c7a302913292df33c1700 + +Count = 189 +Adata = feedcc5f8524fe7d49bcd178415b9f4c450a +Payload = 3216dce3b8b1ce0e79e40fffcac728ab191aaaf319d971d3 +CT = 237022260902363567fc3cf433ad446235fc1a5a3d53ad7493426b6193afe765a76b3dec00266e69 + +[Alen = 19] + +Key = e0a29a2c7840cf9b41de49780b9ee92d646a4bfc5b9da74a +Nonce = fc9fd876b1edded09f70b18824 + +Count = 190 +Adata = 36e15baafa0002efbb4bb26503b7e3b79f6c68 +Payload = 344dc8b6bd66a1fbbe330a95af5dd2a8783dc264d6a9267d +CT = 43b3b96aa5a54378f3bb573ffda3e154aa7f425fc3008175b60a77b9d38740356b544b1c0f259086 + +Count = 191 +Adata = 712b788f0276e2b5a58be80f9114a12ab2a268 +Payload = 6d0546d4e95d1cfcb37a8f88a62064f5d95791311511535b +CT = 1afb3708f19efe7ffef2d222f4de57090b15110a00b8f4535f750bb4cd42db3038e2c1622b72cea8 + +Count = 192 +Adata = 07f77f114d7264a122a7e9db4fc8d091334a03 +Payload = 05024ce13b9057dd2c509db7dbcbd5585e4e64a1e2e380ff +CT = 72fc3d3d2353b55e61d8c01d8935e6a48c0ce49af74a27f761e77b59ef7eeeae35bb53bb9543b64a + +Count = 193 +Adata = 899b036138cee77cd28382ba27984d858a6351 +Payload = 77b8e735b13b10e45e411ab94c6fe1a9eb89f0a7af40ff1a +CT = 004696e9a9f8f26713c947131e91d25539cb709cbae9581244a60fdb473098a11b2176d37b2c4643 + +Count = 194 +Adata = 4b000440a8484a5201cd54aec058919769772e +Payload = 6b21800ae599a15254bb33f0bb080788fb6e9fa054bfd8b2 +CT = 1cdff1d6fd5a43d119336e5ae9f63474292c1f9b41167fba58d4afc30a7f672ea34e05ec1843d848 + +Count = 195 +Adata = 73a222e681ed1ca47d92a6dd90625d895fbf29 +Payload = bfa9d9af6e1f32b6626a1cd89b1c32513b5b50a18ddab028 +CT = c857a87376dcd0352fe24172c9e201ade919d09a987317204ef270e0f3b5e3ca0b8440af65c76e85 + +Count = 196 +Adata = 7109a3a36b286059bc1a1abb2767c92f884e3f +Payload = c68b1bc0050e19780ab53efbea175634f70a7245d966966e +CT = b1756a1c1dcdfbfb473d6351b8e965c82548f27ecccf3166ffb66991b38a0345fbbff5f2362f87de + +Count = 197 +Adata = cd15973753b94b77bb4b778de8b3b0cabbde85 +Payload = 4256f1c9b64390fe2120df9fd38e497c2903c2ca5679ab75 +CT = 35a88015ae80727d6ca8823581707a80fb4142f143d00c7dd033a087c44c2e44adbeb333aa9ded10 + +Count = 198 +Adata = 6e5e0793855f7145e13a5872f563e5ec61cfd2 +Payload = bb0036b34b0c20094d335a8c74f6b3dea42eeccf4145192e +CT = ccfe476f53cfc28a00bb072626088022766c6cf454ecbe26ff9c8713422fe38d5bbf2dedccbffe10 + +Count = 199 +Adata = f844684f5404e7d8eedfa20394b40b4f5d910a +Payload = 86afa9cdd743916563ebfd3adbdd56e015ea3a4ebc61cfe2 +CT = f151d811cf8073e62e63a0908923651cc7a8ba75a9c868eae75de56eabcf8e02c1a27705adef2732 + +[Alen = 20] + +Key = 26d0a3a8509d97f81379d21981fe1a02c579121ab7356ca0 +Nonce = 8015c0f07a7acd4b1cbdd21b54 + +Count = 200 +Adata = 093ed26ada5628cfb8cfc1391526b3bcc4af97d9 +Payload = 37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711 +CT = a3a60b422eb070b499cf6da0a404b13a05cedda549c6b93e6ca0e07e04674f21a46df2659a5905fb + +Count = 201 +Adata = 7df13c9d2247aa40af7bbe2da98bd366d8b47b43 +Payload = 93925579b6367ff592ecbd59495fdeccb50f31ea4fa390bc +CT = 079f7430e3ef9b6373c1c0cb11d884507d02a31d83cd9e93836597806f5da1d176c745d95c4fa46a + +Count = 202 +Adata = 7f369bbc99b6f08049eeb43566269a174829d4dd +Payload = 8363aef9c7c34e1f8149de46c97d5ac79d38c6ed31ab1d12 +CT = 176e8fb0921aaa896064a3d491fa005b5535541afdc5133df826dda99111691993027628c70ff6ae + +Count = 203 +Adata = 04aa8442179f62babad0c006e36af0c21105f27a +Payload = 17281acb525b13653000ab45d86e70106c10a93c99b18f76 +CT = 83253b820782f7f3d12dd6d780e92a8ca41d3bcb55df8159d074b018143a7ea1b5369b7f80eae20d + +Count = 204 +Adata = 997e646014f19a53beab8877ca6022bef23016f1 +Payload = 5d48a71557608736eded309027a80349a18e9ce5dee2bc6a +CT = c945865c02b963a00cc04d027f2f59d569830e12128cb2455db17d3f75214c3cf39858617cfee57a + +Count = 205 +Adata = 60ffcb23d6b88e485b920af81d1083f6291d06ac +Payload = 6c9d11cfb64d96bfab61c04a25d9e19294fb7330fb4847c8 +CT = f8903086e39472294a4cbdd87d5ebb0e5cf6e1c7372649e79550998376e61e11a5a69e9f8fe1c329 + +Count = 206 +Adata = d574632658bf456dfbb11c2653602ed0f4dae777 +Payload = 7d41688c86d5e3bc53966810f2299fdd732e3471fb0a88f9 +CT = e94c49c5d30c072ab2bb1582aaaec541bb23a686376486d6a1b0d05a7ebc657c3235479893bf7e5d + +Count = 207 +Adata = d896ed60128f4bb0277d3af94c5138cf91697aa9 +Payload = 8c7ae2c3c503e9072d6e04e44c2ea78fd24994503567a136 +CT = 1877c38a90da0d91cc43797614a9fd131a4406a7f909af1980c98c8959c158ce209aebcbd554f250 + +Count = 208 +Adata = a350ed58c04473e113b9088b1fb9dad92807f6b6 +Payload = 49bc9d3bcf3c22daa8cf55c1b59d4bffddc2412d60518e98 +CT = ddb1bc729ae5c64c49e22853ed1a116315cfd3daac3f80b7573175f9105cd16ee384465ebb232200 + +Count = 209 +Adata = 1db5887001204194e8b5dcee92c8af8fa5f7321f +Payload = 25f3788e0d3dd8f5821faa4e45a9d6b3995fd881f927135c +CT = b1fe59c758e43c636332d7dc1d2e8c2f51524a7635491d732b67e993384f2e7229d1838efd040d99 + +[Alen = 21] + +Key = aac60835c309d837aacc635931af95702a4784c214283ebb +Nonce = 0e20602d4dc38baa1ebf94ded5 + +Count = 210 +Adata = 796e55fbe7bed46d025599c258964a99574c523f6a +Payload = e8610756528f75607b83926597ef515f4b32a8386437e6d4 +CT = e0a3d5f43e688ce104f4ae1a4fcd85500aa6b8fdbcd1b8d3003c0c3b7369e79339433e1754c0937f + +Count = 211 +Adata = 5170836711fcb1a350b087907d8a17c7637aa1595b +Payload = c61b0c1845fa9b2e0013b3fa9a8cb4f4fbbc6846f63ed180 +CT = ced9deba291d62af7f648f8542ae60fbba2878832ed88f87120a7f18d021833b167bf330c4858239 + +Count = 212 +Adata = 2a68e3fe746f593c1b97cb637079c3e5ee352c107a +Payload = 10c654c78a9e3c0628f004b061e28c39a3c23e7250f53615 +CT = 18048665e679c587578738cfb9c05836e2562eb788136812ca9698d9a88e892c364e57dd35c2f17a + +Count = 213 +Adata = bf38ca0e89b8f5ccd29387f7f193ab5a967caa715b +Payload = fa3a959fdff853c39f76da626094a1ea6dbc78bd2f091a79 +CT = f2f8473db31faa42e001e61db8b675e52c286878f7ef447ef3839d6f7e20a2e343f4c4da9eb9be13 + +Count = 214 +Adata = bee00f2f75a4415ce993d2d14a6d8e01d1d59a48f6 +Payload = 76d12e3c4c5d990bf563c60aa4999e52998d887f97477f6d +CT = 7e13fc9e20ba608a8a14fa757cbb4a5dd81998ba4fa1216a6630bfb7a2a2441e020efdf36274b72f + +Count = 215 +Adata = d5b614e4e8f72a5d8b1ec2b375da5dac64c2cc30b1 +Payload = 693fae7af84aa397f0b2baaed9b3c7953f75e7424c49b634 +CT = 61fd7cd894ad5a168fc586d10191139a7ee1f78794afe833866bcee343ec5aae61f9effa19b99d3b + +Count = 216 +Adata = 33f11aa36d8ab0fc53486839a576b31ee915dbd769 +Payload = 56ce9a09f38127b14dbbdcaa59f363c92a3b9843ad20e2b7 +CT = 5e0c48ab9f66de3032cce0d581d1b7c66baf888675c6bcb00331b60eb252f744a06b4a95aa9f4e7c + +Count = 217 +Adata = f40bce1a6817b29b9e8b56f214fcca7dfde17e7ee6 +Payload = 5cd8986e974d09ede34ba68fd81d6109a64092e7fbbaf87d +CT = 541a4accfbaaf06c9c3c9af0003fb506e7d48222235ca67a4153778a644cb2469cef3ad125e257bc + +Count = 218 +Adata = 53c457d8d4d4ab95ba116c28b82c16743cb09de9fe +Payload = 9c3c610f204d98702dd91ea28e0cc14830b26bb5e2ee0349 +CT = 94feb3ad4caa61f152ae22dd562e154771267b703a085d4e7013e1c34dbc5efc7bcd4f8e52797644 + +Count = 219 +Adata = c7acf1b17609dc336df1006ffac6497777cdfd497c +Payload = 90c5dd9db0316dac89db18f70491bdf0a06a6a7f72b77d9a +CT = 98070f3fdcd6942df6ac2488dcb369ffe1fe7abaaa51239d66aed667c761b7dea44822e30cff671f + +[Alen = 22] + +Key = 671544bf2988056f7f9ccd526861391a27233793a23f811f +Nonce = 0a259148a1d081e0df381ecd0c + +Count = 220 +Adata = 61dafc237cb52f83ab773ba8a885462b6f77d4924611 +Payload = 576b069ae2713f53d2924c1fd68f786cb2eec68892f9e1be +CT = ce06b3d09b02921f290544032a081a7766612940048867281bb089af0245792c16e6320cf5ffa19e + +Count = 221 +Adata = 87e49b8164e7052becfa0c966991637b38df833fc5f7 +Payload = d7eb0d7dd737805cd3b8dbf451aeea2fa1f6a96eb58cb428 +CT = 4e86b837ae442d10282fd3e8ad298834757946a623fd32be3cec29bd5df92363d6bb75456f5cd32b + +Count = 222 +Adata = d302a518d7c625756d3e4c8cc2b1d973a19107c945fc +Payload = 77d8c9e6321314524afd05b7ad599c29f4eedda9e9f0763f +CT = eeb57cac4b60b91eb16a0dab51defe32206132617f81f0a901ca82cddb78a2fe3904d1d8bf6fe5b2 + +Count = 223 +Adata = 6566bb616a94bb03df5c26b722bcd38d516285c5f6c1 +Payload = abbf28b3ae164051648293d0b94e11f5af8468450005c7c0 +CT = 32d29df9d765ed1d9f159bcc45c973ee7b0b878d96744156d095ad121f0f76f07b715cad996def52 + +Count = 224 +Adata = 141be3601e38185a9fa1596d2ee406415c9673af32f5 +Payload = b67d50110f844b36a00d352123012a1123c7c3cba959dc48 +CT = 2f10e55b76f7e67a5b9a3d3ddf86480af7482c033f285ade8529ec8f477462dc2409482c3479756d + +Count = 225 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732b +Payload = 2a63f7b09b43fee65738e8115bd8419b3ef3e8f86eca707f +CT = b30e42fae23053aaacafe00da75f2380ea7c0730f8bbf6e9b14fe8dbb3c361ea61d7b44e689a1c48 + +Count = 226 +Adata = 87faef55c54250c30232ccaf5efa1ff41b6243b2a5bc +Payload = 59dad755af92c29522da4348ab9b3037fe87004f5fa1394a +CT = c0b7621fd6e16fd9d94d4b54571c522c2a08ef87c9d0bfdc54f0659fae291f943f2f3b33688602cb + +Count = 227 +Adata = 5d895fb949344e603ce5de029842b20d2bb614ecbbb8 +Payload = 64d8bd3c646f76dc6ce89defd40777fe17316729e22ba90f +CT = fdb508761d1cdb90977f95f3288015e5c3be88e1745a2f993af4e3a7a20390a8da264299712a34e3 + +Count = 228 +Adata = 74cc8da150b0bacdefa8943900b4ea047611d96be70a +Payload = 0c3c9a634a000f00be003846eac7482e303a5bef3a70fe75 +CT = 95512f293373a24c4597305a16402a35e4b5b427ac0178e3a7f79d2b5a9bde5bd453bc8a03e971d8 + +Count = 229 +Adata = 65f6adbaaa803dbad5ba9cb6d231314d55147cc61399 +Payload = 712c788928c8a1562bc1f3f0eb1286e15c3405f6a6fa0443 +CT = e841cdc351bb0c1ad056fbec1795e4fa88bbea3e308b82d5ffccebfb8c833833db40e98a1950fb70 + +[Alen = 23] + +Key = 90e2c63b6e5394b1aeec03f95a9d13a01a7d4e9d58610786 +Nonce = dada5465eb9b7229807a39e557 + +Count = 230 +Adata = f5629ca0eea589f6cf963d875a7d2efb656983f2dd2231 +Payload = 44dd098b1f869d670a8a841900c4bef023a1946a0c278354 +CT = 6b38ca85450e05e7b9362ed7e6e291a130ff233b5a561cdef7ec84dd992fdf98514f845dac8f656e + +Count = 231 +Adata = d43d7753530a7280b76221906dca85d396b6cf05125018 +Payload = cea19562328bd1fea889f575db6a28a14b7d06fb9f9c98bb +CT = e144566c6803497e1b355fbb3d4c07f05823b1aac9ed07313613ed15d527d9dc58ab6893e723db58 + +Count = 232 +Adata = 75650ce366757618af20205b69af7e5d4e82c398c00101 +Payload = f0641f595b791edd860977fcf699688587a354e053e9c7fe +CT = df81dc5701f1865d35b5dd3210bf47d494fde3b105985874ef8728d1bf3a2d93db3266bafadb7c26 + +Count = 233 +Adata = c00f1b8066677c63e898fddfb8a1b482b536963da0628d +Payload = c7486a084f8475e6f5138e8d6e9f42a1de90f05aa88a362d +CT = e8ada906150ced6646af244388b96df0cdce470bfefba9a7a5bce94d7564d297fe87730f1a36acf4 + +Count = 234 +Adata = 5a89ab6b26b2ca78f98a8f8409fe8008b97ba9ef185d41 +Payload = 091ef698e16dc43a11d3ea005d5a5cdb7f1bdb5665a6c81e +CT = 26fb3596bbe55cbaa26f40cebb7c738a6c456c0733d75794cd971b07fc14c512b8df6dd964b129d0 + +Count = 235 +Adata = 5d24d80f22afe713c4076c200c1bab36917907fde7b6d3 +Payload = 62f204394b367c4410746001e02dfd171858396568fdd43b +CT = 4d17c73711bee4c4a3c8cacf060bd2460b068e343e8c4bb1a192b781dc94448d4a0f6a439a716339 + +Count = 236 +Adata = 4a47a82b999a2a739959f153a091a65c4d7387646da66b +Payload = ac1cd5ba4997af91dbd74aee7730f9ee92cf8a360ca96a8a +CT = 83f916b4131f3711686be0209116d6bf81913d675ad8f500cade9533b272e0a3edeba68362b057b4 + +Count = 237 +Adata = d9fc295082e8f48569eb073ac1b9566246728fc62ccaab +Payload = d0a249a97b5f1486721a50d4c4ab3f5d674a0e29925d5bf2 +CT = ff478aa721d78c06c1a6fa1a228d100c7414b978c42cc4785d68df8ff28345be4d83541a72071059 + +Count = 238 +Adata = 720a9dc3e33ac080775a06f67f4a6591c37d0e101944a0 +Payload = 77fb98f24172f5d5edadbf466ee910855a71d46090b789ee +CT = 581e5bfc1bfa6d555e11158888cf3fd4492f6331c6c61664caa7ec8892be6a18458c663665495035 + +Count = 239 +Adata = 13cdaaa4f5721c6d7e709cc048063cfb8b9d92e6425903 +Payload = 77fb98f24172f5d5edadbf466ee910855a71d46090b789ee +CT = 581e5bfc1bfa6d555e11158888cf3fd4492f6331c6c61664862fda880e45e891a3a50da7e14344c8 + +[Alen = 24] + +Key = 13cdaaa4f5721c6d7e709cc048063cfb8b9d92e6425903e6 +Nonce = f97b532259babac5322e9d9a79 + +Count = 240 +Adata = ad6622279832502839a82348486d42e9b38626e8f06317c4 +Payload = d7c837971b973f5f651102bf8d032e7dcd10e306739a0d6c +CT = 4709600418f2839841e6d126359f6982bdb53acc7ff209635623d15b24184481eadc63bb8c878fc4 + +Count = 241 +Adata = ad4833aa53218949cfd724814a43889a74a2114bbef4cf37 +Payload = 7d672bccd0fb01ce79320ed61779146aa432038daa13cb41 +CT = eda67c5fd39ebd095dc5dd4fafe55395d497da47a67bcf4e614c3e546273f0aeef207bd3f4d32fca + +Count = 242 +Adata = 54a723826086c7175e8fdc854b62d780de6ac1f90b57dd3a +Payload = 0e1b73df74982f535a5fb08bc13d22515ee10969efe033bb +CT = 9eda244c77fd93947ea8631279a165ae2e44d0a3e38837b413c6395ce9aee2e22ac0606beb140185 + +Count = 243 +Adata = bec02d7df4cc3deefdd7e7d3ea82d381c870ad46bc06d64f +Payload = 9a55aff269b180118ff0ea99e851c7474d19d23e641f16a9 +CT = 0a94f8616ad43cd6ab07390050cd80b83dbc0bf4687712a661e4f02150bedd86dfa49f52b214239d + +Count = 244 +Adata = 1b8090d712e0ec95a01bc3aeb6f5230c67c355e0ed68043a +Payload = ff19294e8faed8353dbcab0b146e2ef928dd2680833424bd +CT = 6fd87edd8ccb64f2194b7892acf269065878ff4a8f5c20b2f0e82b9f04bfc0cc0ba432b5135450c2 + +Count = 245 +Adata = 5ed0b9f25d07b26717cdcb2507bef9d681ecd9389831ac15 +Payload = db1eba6ac4a79aa1d97838d263c7c4ffa7d354770e762805 +CT = 4bdfedf9c7c22666fd8feb4bdb5b8300d7768dbd021e2c0a2e64c82b60880c5c7506321a1060a481 + +Count = 246 +Adata = 55f16fefaf2168aebc61b5e01d9e1f7bfe215eaaef118974 +Payload = 012d45168505ca9fde5aed123875639a207d473b993dc7b8 +CT = 91ec128586607658faad3e8b80e9246550d89ef19555c3b77152f64dc993b36ad9d5d12bb52b1ad5 + +Count = 247 +Adata = 9893bf14fd3a86c418a35c5667e642d5998507e396596c50 +Payload = b205f26d6c8a8d6085ab28d595703cae046f96d82093082b +CT = 22c4a5fe6fef31a7a15cfb4c2dec7b5174ca4f122cfb0c243e5c69256b6326ebb7ee6e677d396765 + +Count = 248 +Adata = 244b840085bda9576c8424bb05a925a6b09cad2d0528ab8d +Payload = 549ba26a299391538b56ce4bd71dbbfd96995836f8915ca5 +CT = c45af5f92af62d94afa11dd26f81fc02e63c81fcf4f958aa2083dac565c7a63908f0022e2867bb68 + +Count = 249 +Adata = 9e8d492c304cf6ad59102bca0e0b23620338c15fc9ecd1e9 +Payload = 9e9dbd78a1066800ae33253be6104015158a0187e4f38116 +CT = 0e5ceaeba263d4c78ac4f6a25e8c07ea652fd84de89b851968242fe32958ea32e670ae1b3543974f + +[Alen = 25] + +Key = 90851933d4d3257137984cdb9cba2ca737322dac4dbd64bc +Nonce = be02df3a840322df8d448c600c + +Count = 250 +Adata = 69a9dd9ac8be489c3a3f7f070bdaca10699171f66ab3da9351 +Payload = ba1785a149cb8b69a4e011c11a3ff06f6d7218f525ac81b5 +CT = 89ab2efefa8406336d9e2245199fbc9454f0ef650b9ed0f446c7246bd3130803bf8d703ef5bdf15c + +Count = 251 +Adata = 0c39a72f0f38d2713c164b0f870646fc65b9838a322ecfddd0 +Payload = 263dc4fb5cd8798ce0f183a816e51fafba167533dde1bf96 +CT = 15816fa4ef97f4d6298fb02c15455354839482a3f3d3eed7096a6a4422e582c5d02973952ac80e5f + +Count = 252 +Adata = 911d9f5c4c34c2f4b69be1e253d43fe729e2ab2622130394b1 +Payload = 7b5da2c283116713f3d80c7907114270964541e03ab80d50 +CT = 48e1099d305eea493aa63ffd04b10e8bafc7b670148a5c115965f6df4332fe7a2cdc4d1b80e28a34 + +Count = 253 +Adata = 8a961df9c23f6d5ecdafa94c61164a22f460a1bf7415258d39 +Payload = 541a2b3ee25022c92fdc6783a6cbde90680ad3dc41868e5f +CT = 67a68061511faf93e6a25407a56b926b5188244c6fb4df1e18bed174081b2170ffc6ab53b54c9ddb + +Count = 254 +Adata = cac7a248a4d4e96a9733627e247234995d6aa57e491498118a +Payload = ebb2e893da9f32c363f98bc76fd14eda59e7cc620070f6d3 +CT = d80e43cc69d0bf99aa87b8436c71022160653bf22e42a792bac3d3a2b9ef6d4c8715f9a5c6fe8245 + +Count = 255 +Adata = 41eacf70d05a6d0cdbdd38f197a52987def8fde37f332eebd9 +Payload = 199cca0d0e1c70ec405d6816cbddc69f8ada624f2c168891 +CT = 2a206152bd53fdb689235b92c87d8a64b35895df0224d9d07f9610c82fe9a7c78e8f1980e886b446 + +Count = 256 +Adata = 78b6ed20ed85337c969618bd41917cd85c37e7c35c3a12e25f +Payload = ca481f557306f9ce386edd0cfde375a550cb5b574be524f7 +CT = f9f4b40ac0497494f110ee88fe43395e6949acc765d775b6aab366637ec41d0bf557f578be424a8b + +Count = 257 +Adata = 87faef55c54250c30232ccaf5efa1ff41b6243b2a5bc93e7cf +Payload = 6f1b4ff66d3aec7b0c0d9e202acc52722e15bca0983291e0 +CT = 5ca7e4a9de756121c573ada4296c1e8917974b30b600c0a1e57a5b3ae26469d229425f887ad5a2a1 + +Count = 258 +Adata = 7f19ac3e53a629a2df1cb56d68fde0c80a46be40a996830e2a +Payload = 7533c88ce55c2243b64b6c5bd01aed4dd6ac8bb9fd333e06 +CT = 468f63d35613af197f355fdfd3baa1b6ef2e7c29d3016f476ce4fe492062f74bff4c3c0e9ea849a4 + +Count = 259 +Adata = 0516a69bfd8785ad001367b51e5410b75c11b761be08b9eea5 +Payload = 19ea09a9bfd10db2a74e398859d8f4831fa5749767773acf +CT = 2a56a2f60c9e80e86e300a0c5a78b8782627830749456b8ead47ffc17b871f530f62b9f9aec98509 + +[Alen = 26] + +Key = 5c5d02c93faa74a848e5046fc52f236049e28cd8096dcac6 +Nonce = 54cbf2889437673b8875a0f567 + +Count = 260 +Adata = 09fc21ac4a1f43de29621cacf3ad84e055c6b220721af7ce33bb +Payload = b4da43ebfe9396b68f4689fba8837c68d0064841c6ddd4a7 +CT = d40725397229021a18f3481e3a85f70445557bb2a85e4ae8101a34c777e918e16186fda05a386572 + +Count = 261 +Adata = 10f0c45d06a138a964fb11b2d450620a2977bcd2952afe371cad +Payload = 7b628930d44e22907277db057395601b82b65479fbd59613 +CT = 1bbfefe258f4b63ce5c21ae0e193eb7717e5678a9556085cc1e79234882846d916dabae40b1bd055 + +Count = 262 +Adata = 64dbb170a037b36beed28a2637c87830e2b23f8eea6cd9a7331c +Payload = 9db30b669fc5d25f05e0dc708d597da6ddce2dacc85ae99c +CT = fd6e6db4137f46f392551d951f5ff6ca489d1e5fa6d977d3e35499e3c09dc384eb41344ee8be3769 + +Count = 263 +Adata = c47de6608546a02c6eebd6628c9123f6936c0154d3df52a367e5 +Payload = 62036cbed3666d85624d3dc9c1f437454b9ab5c03ce0de92 +CT = 02de0a6c5fdcf929f5f8fc2c53f2bc29dec98633526340ddd605189608ce40b237dde7bed6fde487 + +Count = 264 +Adata = bab7e36098d59d3a31d7784d549aebfc6938bbd0612c85c0edb7 +Payload = 5c9bc739f6b6fe4214f3c6aad307d1f208892d79de010e37 +CT = 3c46a1eb7a0c6aee8346074f41015a9e9dda1e8ab0829078c31f69c847440be20bd08cfef330002f + +Count = 265 +Adata = 8a9716135fa38c250e249f6712f7cb3ad9210d7278b53d599df9 +Payload = 0df109298083d3896214b84ff6edb11e9cfdbd88f5702839 +CT = 6d2c6ffb0c394725f5a179aa64eb3a7209ae8e7b9bf3b676ca83622b127fa50fc9637998c0ddd44d + +Count = 266 +Adata = 2d52447d1244d2ebc28650e7b05654bad35b3a68eedc7f851530 +Payload = 518f651f6d82f670b63767ad8476ed8fc24df12a45110611 +CT = 315203cde13862dc2182a648167066e3571ec2d92b92985e81e738b9e4b0dc7b7a39eb7d03adc64a + +Count = 267 +Adata = 3cba0fd2bb16ae1d997cbe659a2dd101885c97f2322b0172b5d6 +Payload = e91a694bea2d351928b6098660d49f382c087f6777de159c +CT = 89c70f996697a1b5bf03c863f2d21454b95b4c94195d8bd3d298c05b1d2e597f44f8621ecd11ed16 + +Count = 268 +Adata = c7f93152016bba584dadc6002ec493a46305726068886d2340da +Payload = 2d14792ed349a878b2b879e7fa5f438a50e36947ce827e73 +CT = 4dc91ffc5ff33cd4250db8026859c8e6c5b05ab4a001e03c5fd5221fceecbf0dc7211a1aec06793a + +Count = 269 +Adata = 799cac048eaccded37ca6a70dd89595e1ee04606212da5572679 +Payload = 315b8d95938d304015bbc94ea03c21f6dc25c90f991ba680 +CT = 5186eb471f37a4ec820e08ab323aaa9a4976fafcf79838cf5c25f00b862b49fcfe8447949f39787c + +[Alen = 27] + +Key = 0234dae5bd7ae66c67ff0c1a3f1a191a0d7bceb451bc2b7d +Nonce = 16d345606a315ad2406abbcb43 + +Count = 270 +Adata = c37fdf7449fd7e943595d75e977089c623be0a3926e63fdbbfdf4a +Payload = 0f960a89a7e806f8709047cb7a2e7c4211ad724692c88a05 +CT = 3907880d25f910eab12dd14e704d1b33ea7c453634d54da2a461f44dac1112ae3f9c65671a931d3e + +Count = 271 +Adata = 85f647d940a6d1acb6b7851912f807063515631eaabaa019dcfb99 +Payload = ab40a4baa39b0e568bf2193fecbc36b84c76bb50523b2912 +CT = 9dd1263e218a18444a4f8fbae6df51c9b7a78c20f426eeb5ed15db6e142ee07b59eb5b0ad3a59194 + +Count = 272 +Adata = 79ae14843b2e7ccf0fd85218184f7844fbb35e934476841b056b3a +Payload = b74c06d9077c568762796d5be14f3563e7205a6e9bc65bcb +CT = 81dd845d856d4095a3c4fbdeeb2c52121cf16d1e3ddb9c6c203f11f66b74366caeca8dbded2bf17a + +Count = 273 +Adata = 542d86fd7ff591f97e6926a090553538bc3b8a6bcd45f2e29c7d9f +Payload = f2179beb5635a6d8a8340acea0ffcf4428e5de1306a8c12b +CT = c486196fd424b0ca69899c4baa9ca835d334e963a0b5068ced925fb9a4cf6b6bf17f72ab044653d1 + +Count = 274 +Adata = 4392c3043287dd096b43b4a37ea7f5dc1d298b0623ccbf4fd650a4 +Payload = d1a9e4593bc3d02c407e84a1736e587c1819c72195a07d57 +CT = e73866ddb9d2c63e81c31224790d3f0de3c8f05133bdbaf0d1f677deca1bfda83c1b9223aaaedbfc + +Count = 275 +Adata = 966954582e78e99ba68d6ffaf794b55a82325834ec4f373b2bd227 +Payload = 15b94910853a8f23dfb8b31c0262b8461f777075cc0937e9 +CT = 2328cb94072b99311e0525990801df37e4a647056a14f04e12937871932a7ca3e1e27a90a7f73694 + +Count = 276 +Adata = b7aca715dcc402565cb711b001f21e8e95ec54c4afab2e2dcc8a2f +Payload = fd1681cc306518bf77766f55226afac3eb21e31ed897075c +CT = cb870348b2740eadb6cbf9d028099db210f0d46e7e8ac0fba0464ff4ddeccbd523a5ed3b32337f7c + +Count = 277 +Adata = 290a36f7daeeeafca4431446b396dbec0bea0a1f6f081418811656 +Payload = 0804fa48fc76f98bb021e3501bef8875b64a3b508adf8594 +CT = 3e9578cc7e67ef99719c75d5118cef044d9b0c202cc242332f68ed5e44a71c5ba8bade07b7bf5495 + +Count = 278 +Adata = f0739a855422310a21ed863376bce9d75dc7c687b9b535cb7a05cc +Payload = 4f5c6d80a3955f12f4d2594e02a045c42fabb11d90817fff +CT = 79cdef0421844900356fcfcb08c322b5d47a866d369cb8583b5dc1fbe32743e257b7c1c9d624adc8 + +Count = 279 +Adata = ffac0edb0b62977bb5040e4128a48deaf711f5e6a84d8f677341f3 +Payload = 5c29c458212d010a0d9c5a547aba1138eb4ce94742fef01e +CT = 6ab846dca33c1718cc21ccd170d97649109dde37e4e337b9e53b654de1976294897cae0476ac6248 + +[Alen = 28] + +Key = 6351a67fd6daabd2fd49ee944dd41dd37301f958dd17fcc3 +Nonce = b8d517b033754058128d13d11a + +Count = 280 +Adata = 511c6924fa96db716f6b053b7a48aebdc1504145a56cd02d6be2590d +Payload = 0c0663dd69ccbffbbd0c8c2e9473d0354451ae7a20fa3695 +CT = 19f2745df5007619c79c84d174e4521b942776478a0601d982c560fede4741e2fd3b54b3a48f3e38 + +Count = 281 +Adata = d9ccd93317441e9d6ccc358f31e7e2ccef8c921b23d742993eff9d53 +Payload = 34a882834172924d39d2df5d637d9d273a99a9222971701c +CT = 215c9503ddbe5baf4342d7a283ea1f09eaef711f838d4750ee82d927a2aa678e792acdeb615409f8 + +Count = 282 +Adata = c268d65f7a7b30d3d198b2045fc8d1db7adda56604fa567d8855d1a5 +Payload = 5b7450b73d68de079e92bba56c7860f11126b8fdedd3334d +CT = 4e804737a1a417e5e402b35a8cefe2dfc15060c0472f04017a48226389d24ed3ec3da2da1a9bdf7c + +Count = 283 +Adata = 4c2b6815156f0643b4573825e28b9f2a668a4976e3342884f48bc310 +Payload = 140c6933248f052e05bd4a36aec185ee86730108cc2989b6 +CT = 01f87eb3b843cccc7f2d42c94e5607c05605d93566d5befa16fe6bd83993ccbdd50e1ca061f4845f + +Count = 284 +Adata = f11c873354b3c0cff2c8f8010e9e364582b9c05c62efdefbdcc2e1c0 +Payload = 2a083de317380d94dd991349a7b8761c7c98013b1b0227e0 +CT = 3ffc2a638bf4c476a7091bb6472ff432aceed906b1fe10ac577c5893cb3896400012e48f5b190b73 + +Count = 285 +Adata = d0a056754098d7f7ef2f639d61ea3d2b9cc936c48a1b2c5a9e96d169 +Payload = 02769283d5a06c363c2cc66c09b1ac954134e3ec7df773f2 +CT = 17828503496ca5d446bcce93e9262ebb91423bd1d70b44be80c80101fdfe6dc4cfce080bf921582e + +Count = 286 +Adata = 56de0e55653b9a04a3ded71c31f8807c3c8dd96bc82892e4acccef30 +Payload = 4890404bc5b24822b4cf7a2fe28abc52fbefb919ae0629ec +CT = 5d6457cb597e81c0ce5f72d0021d3e7c2b99612404fa1ea0122dfc20e3088dcd33b6706a0c1fdfa8 + +Count = 287 +Adata = 794a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b425 +Payload = 161f8501f59338f72026815c77cad6d8d581859192cd5644 +CT = 03eb9281695ff1155ab689a3975d54f605f75dac3831610828f0a78ce798448529afe26eec875aa6 + +Count = 288 +Adata = b1eafc03ea2fa3e9e3842a09a225e83055de8a1f412badd6fc9ead12 +Payload = b3f38aedbf08dd7ead9d402c5aaa1ec9279c7e4bfd4a2967 +CT = a6079d6d23c4149cd70d48d3ba3d9ce7f7eaa67657b61e2ba48856a266c0d404474316f418f8f4e4 + +Count = 289 +Adata = 8fec99f1be0e69267620c0b934bf984d60c1437f74c6ac19610fe188 +Payload = 5c09e2a6a055fe9c21e06e5519cf56b8e2e7fb44094e79f9 +CT = 49fdf5263c99377e5b7066aaf958d49632912379a3b24eb56412292d8015285efaa6f1154580eb57 + +[Alen = 29] + +Key = 9a5a9560baed3b8e0e90b92655d4e5f33889e5d7253d9f6c +Nonce = c0049382cdd8646756d4e6bff5 + +Count = 290 +Adata = c95a86d52088a8b0107cc5b437a8938b2c9e74e46e2e03bb9bceecdbe3 +Payload = 5bbe9c1fb2563e3e82999fe097b28da4dc6ff2e020f3b4f3 +CT = 6d5401db42b5c48b79203b6ad82806d7460ac4c82ad0809b811020480e834f6fe55900a162a4e61a + +Count = 291 +Adata = 1dd56442fa09a42890b1b4274b950770ea8beea2e048193dfa755a5943 +Payload = 8a85a9b32a323c6af156a3fa2f1448b6387cc3660aa8a0f4 +CT = bc6f3477dad1c6df0aef0770608ec3c5a219f54e008b949cba9827513c7f1de970d316b6f81c109d + +Count = 292 +Adata = c834096e059ea73ddc90b0c982f9a3a31bfc6b1b81a03f9d41c9c741e7 +Payload = 1e02c13104937fe084b18eba1ea8951dcc5e75b692937dea +CT = 28e85cf5f47085557f082a3051321e6e563b439e98b04982c9d79dd3255a8323f8229ac1c6d76ae4 + +Count = 293 +Adata = 9249022bdead3d86ef5bd03acf053132d08663ba1f2426e19c126b22e9 +Payload = 3225570fb15ae13a13c71e364ae9a9fef03d1c9a7fa5dfa0 +CT = 04cfcacb41b91b8fe87ebabc0573228d6a582ab27586ebc8425dc81f93257ae8399fc2d48b4a7685 + +Count = 294 +Adata = 3c3a92c4ece49fb9f84243d7c1bc91f595fce118305a758c83985c34b4 +Payload = fa0a458174537ddba25708b8d0c22d5517d57b122517b0c9 +CT = cce0d84584b0876e59eeac329f58a6268db04d3a2f3484a1b595003c58e69600c2a3b9ec45c0e15a + +Count = 295 +Adata = b49b845ccf76acf508f9db8543c73375d530d91f3b0e4ed70decfd2c2d +Payload = b7fbdaeaa3ee1d0bbf5ec47898b069ec4ba6a140a3e83996 +CT = 8111472e530de7be44e760f2d72ae29fd1c39768a9cb0dfe0da009261c43c6640303696655e2981f + +Count = 296 +Adata = 3aabdf589eeb1709bb3d60b08bc71eaa3ffeba4e2903a5dbd8339aae85 +Payload = 9aea86b9fbd9bd4504ee2e25054942b33d3cdbd84215db7e +CT = ac001b7d0b3a47f0ff578aaf4ad3c9c0a759edf04836ef16dfdcdbd4ad711c493d3176f032a02af0 + +Count = 297 +Adata = 6a79879cd62bd1dbf9609897d2ebf2dc4dda43cc15fcb241aaa0deb4b3 +Payload = 3a861638ccd6591e51e2a525be59447e4a28bab32e36a5f3 +CT = 0c6c8bfc3c35a3abaa5b01aff1c3cf0dd04d8c9b2415919bfd59b45c05873c670f5f8bb47732d59f + +Count = 298 +Adata = c5b6ca474eb251817ae4d2f47c0632c381e222aae3b6f585a0dcae120a +Payload = c7da4e9ba6e5758be726e6e227d7bddb0332228f7e3ecb6b +CT = f130d35f56068f3e1c9f4268684d36a8995714a7741dff031572a24bc00b40a6b4b172b3648142e7 + +Count = 299 +Adata = 64a96d191f1d5f95f5fed6259e33e7206adc07b0279e16cb453a9c6438 +Payload = 2b9347d3e195152dce22afdb92acd179eb484872285704c3 +CT = 1d79da171176ef98359b0b51dd365a0a712d7e5a227430ab828bc33396179ac39ce0027a1d62e0fe + +[Alen = 30] + +Key = 3e61094c80df0053e86d43fccf4e1d3ee2cdb862d3237b0a +Nonce = 63f00b2488809fdc49ca5f05d5 + +Count = 300 +Adata = a08763ca936abdeece06467bef8c3c47c3a473636a039d4db540c867d3e3 +Payload = 1fada8f4c7daea0d1c370184c169485b80a278708ed41451 +CT = 680dd22f16a1290bde42c9792dfa997aed24d5bd2265b6e095aa6b99d3f894d3790c2aa2dae1ba2c + +Count = 301 +Adata = 19508a6c83b992c660a1a28597e07c729ea2ed39401aadbf9d7586b5720d +Payload = e9f1f2cf0b8d563e2d20f39f9f464a808b136dba364a6446 +CT = 9e518814daf69538ef553b6273d59ba1e695c0779afbc6f72d9d77109f4597e9c4c8cf7023dc5f3b + +Count = 302 +Adata = e5929c3b5d68a4c9fcf1168ea35bf8c0bf3043cb1ed54ff301578b3b7266 +Payload = 07a74c3b874849ecbf013713b80a84337c90b690cea0b837 +CT = 700736e056338aea7d74ffee5499551211161b5d62111a86b2544ecc3c7d5accd22ac075e7b44d5a + +Count = 303 +Adata = caa5cc5d0d87680eafc29429bac55c9e33167d485789c7c124b5c57a1ba8 +Payload = 4255f2cf90f0d15e9bead4be799165c57f7225980713d609 +CT = 35f58814418b1258599f1c439502b4e412f48855aba274b8f1a8a1db25de0fab7cabb11a18497584 + +Count = 304 +Adata = f61cf7ae23a66777bd3fabc3d542feed2b00c6d4f46a772fda11b5214551 +Payload = 70b1e2e4cf260b108f5a52d0d8234838ffd6ffe7b4acd78d +CT = 0711983f1e5dc8164d2f9a2d34b099199250522a181d753c5a9718ed0257a50e38de86154054fc3a + +Count = 305 +Adata = 85f647d940a6d1acb6b7851912f807063515631eaabaa019dcfb993e86f4 +Payload = af4be10b3a59ea99dadc75fbe5651f6f7630852bb556aa39 +CT = d8eb9bd0eb22299f18a9bd0609f6ce4e1bb628e619e70888550d1acca34c28ba8a3b890bb0542b23 + +Count = 306 +Adata = 296cd04c4d9ab493def7aeb6841a45309e777028868efe45166235c56b2d +Payload = 72d5663727592f1bfc9c65be83f4d3508126fecc4e34ae72 +CT = 05751cecf622ec1d3ee9ad436f670271eca05301e2850cc3a268dc1596a7855639c63fa76ad8479b + +Count = 307 +Adata = f380ca0a26a94adcf2c1ce26d226d3bf520268c72412e58a71acd9a66d00 +Payload = 3e2ccce03c10ce1527ef8e002adb265edba5779fbd4fcaf6 +CT = 498cb63bed6b0d13e59a46fdc648f77fb623da5211fe6847e3416c75fc28924a21cc123e62a7894c + +Count = 308 +Adata = 8825532a31680cb3b5bdb027802d2d8718755e135367e0c8c88e21288311 +Payload = a18dfe7f2d7bbaf316366f67445170afcbe18e2a1de1e947 +CT = d62d84a4fc0079f5d443a79aa8c2a18ea66723e7b1504bf6ff1a47f23d08485951aab18b393584ef + +Count = 309 +Adata = f768375589b687fb17c56673af4263626da69eb991007d94d4f5a163fd05 +Payload = 17ca72a440c944fefd6c08ecc3a8ecb54d96b9cad9d2aa4c +CT = 606a087f91b287f83f19c0112f3b3d9420101407756308fd7d024456bcb69a4f77008773a3f48805 + +[Alen = 31] + +Key = b5664dd6ed435df006052f6ded74bb7ce9482ca9229886f7 +Nonce = 7a1649896f3e030c18f0205599 + +Count = 310 +Adata = c5f1a26351e53e6509c8bbbed03c42c23ad81c65fccec7ffa1cb494c7f1fc4 +Payload = 0b6de49b530703affc94010c2b793ddc6de0c44d48037ff2 +CT = 56b02fea595cc24e798691ae905be3d466ca68ca744005dba260b5ea3b047020b73b5bafa17e5084 + +Count = 311 +Adata = 89899be18b4c389afa769b11ecd22e9fad8f38fd614ea5f8eb7a066c0ed8d8 +Payload = 2f1821aa57e5278ffd33c17d46615b77363149dbc9847041 +CT = 72c5eadb5dbee66e782151dffd43857f3d1be55cf5c70a685e4bd97b9dc83134867c00c2acea0aaf + +Count = 312 +Adata = d43b841f174335f1347834590b0984a2cb35f7a00a0ee993157d2d4f848748 +Payload = c7da4e95cb38342c6d5bf0c381d5a192adc3bfc1cda3a1d7 +CT = 9a0785e4c163f5cde84960613af77f9aa6e91346f1e0dbfe55202ba34bb9918fe915776de65947c0 + +Count = 313 +Adata = c1093518efd80245e3c42371f220b21f2034e6738fe02ef43e828190f01aef +Payload = 414a70aba5a219dbd41cdc46b84812b28cc4f7399218004d +CT = 1c97bbdaaff9d83a510e4ce4036accba87ee5bbeae5b7a642fdf807b5a6880f2d4c36d558b40eb90 + +Count = 314 +Adata = 90f627d5b939625bc76fe1bd4643b39edc11d3dc7f4bfe16e61bc26c3d49d8 +Payload = 58b260d3f645a35bad7a3842440bc03608248bd46e725e60 +CT = 056faba2fc1e62ba2868a8e0ff291e3e030e2753523124495a9307ca4239380a45bb7f87e41c4cf7 + +Count = 315 +Adata = 2f360a4715074e942244ab7f9b6db127b0442df9af2efa2e78db1a94312905 +Payload = 5505caa97218957e90247fde60275bdafce4b16bcb36c263 +CT = 08d801d87843549f1536ef7cdb0585d2f7ce1decf775b84af3aeadff9dd60468aef2a8e2c56dda7d + +Count = 316 +Adata = 7db564811f14bc5c2098d5635655c3671fbd8288ea14944af925eaec653408 +Payload = b93e40f556a786e39126b8834a6ecacd2dc9f0f528bab135 +CT = e4e38b845cfc470214342821f14c14c526e35c7214f9cb1c8335f2e31a0468b830c5009cd02dbd5f + +Count = 317 +Adata = 36be91854d3d02a5d62503bb9047ef4354280510f7576c4272fd757240b621 +Payload = 543a070fdb3a855dd7d83fbc5f983671ad9e905f307148e4 +CT = 09e7cc7ed16144bc52caaf1ee4bae879a6b43cd80c3232cd5d772a599e91504e022b9dbfb124b71a + +Count = 318 +Adata = 6aa6ea668df60b0db85592d0a819c9df9e1099916272aafb8813ccc2f2dd96 +Payload = 86ef67572cb339c6706eb5909b96848aba5246a196972a1e +CT = db32ac2626e8f827f57c253220b45a82b178ea26aad450379846cd12430f7adc910d1f0c51d80636 + +Count = 319 +Adata = 3a64414c3588d7c26871d7d054ac6c8420d4917e3baad4a343685916265321 +Payload = cecef24b62676a5623bedae8087b9b05d7e22b41a14dd2d5 +CT = 9313393a683cabb7a6ac4a4ab359450ddcc887c69d0ea8fcd9ee65ac3a8fae1b00a4f1dfe2577293 + +[Alen = 32] + +Key = 50925853a84a33ff392154e4e737efc18dcfc98f4d5235a9 +Nonce = 809343e986f6ff47f54d4cac22 + +Count = 320 +Adata = d70aef3532bdc5293a3ebb11589ac1f801c9f93ea0d656e1d04068facf9f768b +Payload = 718f061e8b972a3adcf465d66c5b28e8661f080127f6722f +CT = bad3b0e6772e9c4c9c631c095e259d99692292932efb72b8966e91a19617bb748f3495aa433585bb + +Count = 321 +Adata = 1ee0eb409398bc252175cb460ef9a2da4c9beab2ef6d8206e4fcce74df785246 +Payload = 72e6cebdaf88205c4e74428664bc0d7eb4687a272217b7ca +CT = b9ba78455331962a0ee33b5956c2b80fbb55e0b52b1ab75dc8f70aa565a12ca3545e68110968040f + +Count = 322 +Adata = 3820db475c7cb04a0f74d8e449f026ec951fa59667738698b0ed5c8cb09a8c96 +Payload = d959dd38a458039e2400d21d27b9a2faee8fe23683330cb5 +CT = 12056bc058e1b5e86497abc215c7178be1b278a48a3e0c22daf38076c810e14a7843444a02f010e0 + +Count = 323 +Adata = f555216840a1f40b411d44128e567617e2694caf16216ea74c604a8d6ec01e72 +Payload = 337f12e8ebc0544b82fcdd3c4a0dab0e5e75c9f433a27d66 +CT = f823a4101779e23dc26ba4e378731e7f514853663aaf7df1594aebf9b8318877bdec2900a22df858 + +Count = 324 +Adata = 2311a6fe1feeda3a1f16310d635496c0dd662024f0b0f1de79325e030cb850e5 +Payload = 463c65fa7becae5605af80d1feca59075ee88c0abfc72cb4 +CT = 8d60d302875518204538f90eccb4ec7651d51698b6ca2c231d9872d1c10a6594b5c349b84f710d64 + +Count = 325 +Adata = b2c633e3181ae5fe7828707ed5b70e0460088a84465eadeecdbcfa0e9ff19bb1 +Payload = 23c1732959c4bf85bc707e45cc964b6227acd3a8fc73e675 +CT = e89dc5d1a57d09f3fce7079afee8fe132891493af57ee6e2a9db7c4bcaf6087e158c1a5d4eb1c2cc + +Count = 326 +Adata = 791f23252094b9b99fafe7fac1d8ff3ba09305c476041e75afb245ac438b4069 +Payload = 02f60f967e7fbcf957313619882407ea8a03fc943062296c +CT = c9aab96e82c60a8f17a64fc6ba5ab29b853e6606396f29fb5e1c87d9e1c1f3b7d30fdc2f0ccac783 + +Count = 327 +Adata = 22197f9ad14591e7a6d5f8b18c969a553de9a85309757fa5d319cc505c24f438 +Payload = 6c1aa088d1a6086d0e72636744a6840c80ab8223409c61b7 +CT = a74616702d1fbe1b4ee51ab876d8317d8f9618b1499161201514b449a741e07f9287f7e9090fa54b + +Count = 328 +Adata = 0bb18f7280a30767cd769cb5ffd3edd1c18914b92d1b2192e27ac88f57135616 +Payload = 57275bc3b4d63b9b01b0b0760235c9785d45761cace23f1e +CT = 9c7bed3b486f8ded4127c9a9304b7c095278ec8ea5ef3f892c889b610157e16e9f31558c669298a7 + +Count = 329 +Adata = 3e5f0f32e27be18ca6f84de11e6e9c25fc0c4cb0cf83633eea1f033aa1373f3c +Payload = eba27a27f0d4604a5296a41b3fe995c50c66bcba302d0447 +CT = 20feccdf0c6dd63c1201ddc40d9720b4035b2628392004d0fbe19321dc22c748a17aa5eda29d8cf3 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT256.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT256.rsp new file mode 100644 index 0000000000..af4f5c1df7 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VADT256.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886df3ba3e6da3a1389 +Nonce = 72a60f345a1978fb40f28a2fa4 + +Count = 0 +Adata = 00 +Payload = 30d56ff2a25b83fee791110fcaea48e41db7c7f098a81000 +CT = 55f068c0bbba8b598013dd1841fd740fda2902322148ab5e935753e601b79db4ae730b6ae3500731 + +Count = 1 +Adata = 00 +Payload = e44b4307234281209bd41f89dbe2cc3fbf68e14df2f7fce4 +CT = 816e44353aa38987fc56d39e50f5f0d478f6248f4b1747ba003abc6a4b020625adc8b6cd7bafbd42 + +Count = 2 +Adata = 00 +Payload = 8db7a73856bcb4007346bb3e00096f69e75e97c0bb960f3b +CT = e892a00a4f5dbca714c477298b1e538220c052020276b465e7cfa7a208a8b3e6b6377236045df17d + +Count = 3 +Adata = 00 +Payload = 48f3ceda4fd390a7eb38f7f5bcd14310af6b5a557e676d44 +CT = 2dd6c9e8563298008cba3be237c67ffb68f59f97c787d61a81b39a0c55822e32042b4f8981021090 + +Count = 4 +Adata = 00 +Payload = 7cdb2c9b167b3ae811289acf7dc1814bbe241f553447699f +CT = 19fe2ba90f9a324f76aa56d8f6d6bda079bada978da7d2c1091117e2ad77db510d902038743b5a98 + +Count = 5 +Adata = 00 +Payload = 41eacf70d05a6d0cdbdd38f197a52987def8fde37f332eeb +CT = 24cfc842c9bb65abbc5ff4e61cb2156c19663821c6d395b5ac7379b8e51592b98e4874f4592278a8 + +Count = 6 +Adata = 00 +Payload = bde9e3eb9f0c57302c9185b1cb912ef76d88f2f9c3b51e9a +CT = d8cce4d986ed5f974b1349a64086121caa16373b7a55a5c4d08c1c902c4c2f078452dd6943b85028 + +Count = 7 +Adata = 00 +Payload = 6f9ccc033c6bfbdfad4719ad033c927e2175727a9a021dc6 +CT = 0ab9cb31258af378cac5d5ba882bae95e6ebb7b823e2a69832fefb87445f1ca42811899acc0cdf68 + +Count = 8 +Adata = 00 +Payload = cc67bc3b7afd625b2610226d3b30e111e6aa47a3254f711a +CT = a942bb09631c6afc4192ee7ab027ddfa213482619cafca4481d605a1019c8e9778b8928b4636053e + +Count = 9 +Adata = 00 +Payload = a10c81725f49ab9075fbf4d96be030a2d881d8501b115d61 +CT = c429864046a8a337127938cee0f70c491f1f1d92a2f1e63f96a82e8411e5b04426dc608298c6408d + +[Alen = 1] + +Key = a4490ed6ab51dbfccd6f3702a857575dad44da3a27eaf31178abc97da60d1e4b +Nonce = 26ceaf6e3b28190a17c4f0c378 + +Count = 10 +Adata = 9e +Payload = 1b5cc6b1651dec4bbbf5130343852e971c7ff1774100d9be +CT = 789bce069a725a96c484e64a9e54dcb7a7c268c85df47815a462ff2dd8ba44a381e1f6edab12b5a9 + +Count = 11 +Adata = 4e +Payload = e7ab98901c0cb1d7d76e125d8ac8e86edf6f469fa937bc10 +CT = 846c9027e363070aa81fe71457191a4e64d2df20b5c31dbb6b0789c5866b7e3312ad992e228d6d20 + +Count = 12 +Adata = cc +Payload = 53bc7e3648d0b389b887b065e9e8f79685beb2eb36e2eb95 +CT = 307b7681b7bf0554c7f6452c343905b63e032b542a164a3e39b1b1a480fdd268c1c75b131cde798b + +Count = 13 +Adata = 45 +Payload = 6d7262476da95db63b322c5193ea05030923c3cbf0f8e8b1 +CT = 0eb56af092c6eb6b4443d9184e3bf723b29e5a74ec0c491a32060fea35c3e9528fd18994fae9fce8 + +Count = 14 +Adata = 2c +Payload = 8246bf7b81b287411777df7ecb53a1795e54b150ff3dd584 +CT = e181b7cc7edd319c68062a3716825359e5e928efe3c9742fb4e0a604ab30a764e8c98a9cafbca8d4 + +Count = 15 +Adata = a9 +Payload = 2596ca8772bc69b50bcbf33088c6efbab614b691ed836f92 +CT = 4651c2308dd3df6874ba067955171d9a0da92f2ef177ce397ca72f1acf6dfd078b6f4eb82fa01e9b + +Count = 16 +Adata = 85 +Payload = 703065d701f4fcadee20d64300b3082c0c76490eb2dc4ba7 +CT = 13f76d60fe9b4a709151230add62fa0cb7cbd0b1ae28ea0c2a85c9252ee62612dc29cffa7289b2ca + +Count = 17 +Adata = dc +Payload = a1aeda4b4cb8dd2943675181561bac48ba07e8de5b327837 +CT = c269d2fcb3d76bf43c16a4c88bca5e6801ba716147c6d99c9fbdac729413152c089d3939e30b8602 + +Count = 18 +Adata = ce +Payload = aa17341f4cead054d41c171dd34c459f7052da225c6c365d +CT = c9d03ca8b3856689ab6de2540e9db7bfcbef439d409897f6f86266c273f8184e901b50c04845b8ab + +Count = 19 +Adata = a6 +Payload = 448cdd9cbbf863eb666fda36b825f3798827da3c1349611f +CT = 274bd52b4497d536191e2f7f65f40159339a43830fbdc0b4ddd02d5c9ae2bbac47a7a076edb1d207 + +[Alen = 2] + +Key = df594db94ef8eca56a417afe946085eaed444c7cc648d07d58132e6cb5bc2bc3 +Nonce = c1ad812bf2bbb2cdaee4636ee7 + +Count = 20 +Adata = c0c3 +Payload = f4d7978fad36223623ccb5bb18a7373cba8a6e3b1c921259 +CT = bea778540a90033b2c0d087e3cc447711ea25f7eea96855506ec97f23bd6ea97834f92f7263c3195 + +Count = 21 +Adata = 34b9 +Payload = f6c043c70136585d012ae0df6f42b25584e374649d0116c5 +CT = bcb0ac1ca69079500eeb5d1a4b21c21820cb45216b0581c9f3230df0b52b5cb7ac907dcadcb662ca + +Count = 22 +Adata = d4ab +Payload = dec0c896b04490816409da1783478ef2510231d0a28c5b39 +CT = 94b0274d17e2b18c6bc867d2a724febff52a00955488cc35a99c3165ce83102891ef3885088ed6eb + +Count = 23 +Adata = 2a3a +Payload = cbfd94fc31785d30214271dab2264134805fee6e52aa0b5c +CT = 818d7b2796de7c3d2e83cc1f964531792477df2ba4ae9c50c9d8078607994ae5dff0de6526fb53d1 + +Count = 24 +Adata = 4eb1 +Payload = 134d2d9726400d09dd3521326f96fbef993ddc0c40887700 +CT = 593dc24c81e62c04d2f49cf74bf58ba23d15ed49b68ce00c7e84da7d2564533e7ad55390ec3a6ff9 + +Count = 25 +Adata = 0a79 +Payload = 1ccdcf789d42caba80d7893feaf26d3853fbcaf7d964df0b +CT = 56bd20a33ae4ebb78f1634face911d75f7d3fbb22f604807520849295a56191367a696999ffef8e9 + +Count = 26 +Adata = 865f +Payload = 4042dbe148db3e6dc542b25d57a5787af535d38e8c34c71b +CT = 0a32343aef7d1f60ca830f9873c60837511de2cb7a305017bc4aceed1a10309b6402b9e9420b33a3 + +Count = 27 +Adata = f4ae +Payload = 85b6894fec36294aa934cdc3523fd95c90ad56cbd18545dd +CT = cfc666944b900847a6f57006765ca9113485678e2781d2d176c180d2e299ccf0b8781ba6de8a72ce + +Count = 28 +Adata = 10bf +Payload = 0f27f4fc8538a676a763b3e5db845a1bfb20d5fab340dee3 +CT = 45571b27229e877ba8a20e20ffe72a565f08e4bf454449ef98d91c68d94873a5d6557611a5402a0a + +Count = 29 +Adata = b92e +Payload = 1b5ec0cb03810a12fc6a0a1ff565afb001405d2a45a1f18a +CT = 512e2f10a4272b1ff3abb7dad106dffda5686c6fb3a566865321cedf1122354636e130acbd69718b + +[Alen = 3] + +Key = d98193ab2a465e3fcd85651aaeca18b8e91489b73b7c7e93b518c4b5b81fc6ac +Nonce = 2247dc7e2674e9e0a63fe70613 + +Count = 30 +Adata = 4dc2f4 +Payload = edba7d6312144e90ec9eaace7576045a46e553dcb8ee5a98 +CT = 44b9ea727c847336fd739ad11f4b906b292edb810462f06ef59626ad5cdac2e4d4cb07b538a1fd8f + +Count = 31 +Adata = 2f3bf0 +Payload = 52a9626f5279c11e17e96f5dc5e1c1f58c1e913020d8499b +CT = fbaaf57e3ce9fcb806045f42afdc55c4e3d5196d9c54e36ded0d53402253453e494ad350994ca77a + +Count = 32 +Adata = 95d2cf +Payload = 87b6447d97a74d0b315031078aa06fffc7b9f246bfa5f147 +CT = 2eb5d36cf93770ad20bd0118e09dfbcea8727a1b03295bb196dbc3bff865a1d94b164df23d708e8e + +Count = 33 +Adata = 0caba9 +Payload = 1852848046706f2e274ba381a2bee1422df4f61d93219af7 +CT = b151139128e0528836a6939ec8837573423f7e402fad3001791b4469fe50d45f8efb81217cd68580 + +Count = 34 +Adata = f8d459 +Payload = 99aac82fa66a15e4f76b76cf4590150999d5cf8468df7f42 +CT = 30a95f3ec8fa2842e68646d02fad8138f61e47d9d453d5b4587106da25012f92f01cc2db8d11ac29 + +Count = 35 +Adata = e883dd +Payload = 4e2f0f91990b855a00d27fbb2e8db7184cd82909de361b52 +CT = e72c9880f79bb8fc113f4fa444b023292313a15462bab1a464148536847290e4fdda7966fe6d5e3b + +Count = 36 +Adata = e45da4 +Payload = e558be3fd246170b294d18ffa708842242681890baf8bed9 +CT = 4c5b292ebcd62aad38a028e0cd3510132da390cd0674142fcc4cb33472825363940e2b26424b7802 + +Count = 37 +Adata = 3b6fc8 +Payload = f8b284c2d851289275973fcd807fac5d8e5e3b6a75ba2ace +CT = 51b113d3b6c11534647a0fd2ea42386ce195b337c9368038a99dd8dbe89b3ecf663eda1b0f92be7f + +Count = 38 +Adata = 043d68 +Payload = 8edf1eb90f0ad33be8a7c6446899e06addc10b3badc4ea25 +CT = 27dc89a8619aee9df94af65b02a4745bb20a8366114840d3dc4894c8fa0a1e1aa760acf9360042f5 + +Count = 39 +Adata = e89257 +Payload = 8fe9a6bd82462c97f436d382d1ff971c95406b1a6c847d81 +CT = 26ea31acecd61131e5dbe39dbbc2032dfa8be347d008d777cdad1590fd8bf2d7ea919e60d0316566 + +[Alen = 4] + +Key = 45c8afd7373cb0f6b092af3a633d9fd97c4ca378e19d75f9b74d089429726c29 +Nonce = fdb1fa230ae0b172ff98fc7496 + +Count = 40 +Adata = 270981af +Payload = 0b92adbb251dc29a67f0bb97f8e7160862b6c4e843d07fd9 +CT = 274e2faea3271ea6fa0494c1951f115b5491a893056c3ee4c76fc350e585277e373e9119bf9595cb + +Count = 41 +Adata = 633f3efa +Payload = 1f88dfd4f5c52c22b1db47f9f4fb6e2f8bcd78d593061369 +CT = 33545dc173fff01e2c2f68af9903697cbdea14aed5ba52540fa7e55dc54e80488a05ee7f1fc96e9d + +Count = 42 +Adata = aad86fb5 +Payload = b2b4cb5e90ebf4bd265093b7f5efd4d62dc60e29737aa496 +CT = 9e68494b16d12881bba4bce19817d3851be1625235c6e5ab18151c17d9e3f97244000a3b2d3c2f95 + +Count = 43 +Adata = ed42941a +Payload = f312b47d05f8eb5a29943b41347cb1983c75cb7a458a3868 +CT = dfce366883c23766b46014175984b6cb0a52a7010336795562d521c4b5c7a6f2c5ac65f2fd15b066 + +Count = 44 +Adata = e5b085d8 +Payload = e9fb86938ea7f04cc230296859e7c96fcc352f968c9473e4 +CT = c5270486089d2c705fc4063e341fce3cfa1243edca2832d9e491a31218f688744098851672a09a64 + +Count = 45 +Adata = 3776f37f +Payload = 8af6b7540f997954812e38dbd99ccfaedd5c69963c353a4e +CT = a62a354189a3a5681cda178db464c8fdeb7b05ed7a897b730ece28347d7ebf8291d7eb66b7651b4e + +Count = 46 +Adata = 4eb08c9e +Payload = b90cfd9dd58e320d98510483b1d939bdb5f3b81666ecee59 +CT = 95d07f8853b4ee3105a52bd5dc213eee83d4d46d2050af64cbd25fb40480d15c039878b5d2f25afb + +Count = 47 +Adata = c7f93152 +Payload = 02caabc6ed0641681e7148c10cf3159fe35e44013252071e +CT = 2e1629d36b3c9d5483856797610b12ccd579287a74ee4623fbfd98c8567b78d4b9c3a49a4641908e + +Count = 48 +Adata = 57957630 +Payload = 2f29882fdf1418d04f0b9d44272995a56973c4369c687a99 +CT = 03f50a3a592ec4ecd2ffb2124ad192f65f54a84ddad43ba4655c1abcb3ed1a175f12721a407c5d00 + +Count = 49 +Adata = 19da955d +Payload = 4e427130be9e94639320529ec135715e65da1117b5ba3c76 +CT = 629ef32538a4485f0ed47dc8accd760d53fd7d6cf3067d4b90621a5e5683df421a0dc52341485d1b + +[Alen = 5] + +Key = a2e6bf39efd1ceddc92b4333ed92d65efeea6c031ca345adb93a7770a8039bcd +Nonce = 693cbb46bc8366086ec7cd7776 + +Count = 50 +Adata = 3ba11282d6 +Payload = d822f84b023f12ea9e3ce16b904278e4aaab5e11c2c23f3f +CT = 9f91fd2f6472e33b02b1eabb9d6655729d44c44dad6b3883fe0667bcc5806b225224b04ade8b21c1 + +Count = 51 +Adata = 3f3a4718ea +Payload = af87b347b59e37a424004a00907dcbcf6a554e6782a9be12 +CT = e834b623d3d3c675b88d41d09d59e6595dbad43bed00b9aea6750fffa5a487540ce65770cd836e99 + +Count = 52 +Adata = ff79ca8965 +Payload = 82b7cd168b6a82cb2d837f41ceda0c27adc5f5b28030454b +CT = c504c872ed27731ab10e7491c3fe21b19a2a6feeef9942f7e7cfafe32bd71ea9813607c5df446c9d + +Count = 53 +Adata = 0021be18ed +Payload = 1c1a0f144df76781e7c85ab178ed9b1ce8c6dc3f15c59149 +CT = 5ba90a702bba96507b45516175c9b68adf2946637a6c96f576716fe674c33ad3b9d3e54cc86bfccf + +Count = 54 +Adata = 9ae7996547 +Payload = d9bb71ad90152d5c1af358c8501fa89ebd4b17bf4ff43841 +CT = 9e0874c9f658dc8d867e53185d3b85088aa48de3205d3ffdab55dbee34f1bab555bbb196095fb5fd + +Count = 55 +Adata = fa292d1958 +Payload = fc7d028a1aa05c74b7ffe333ba6f676913b0f9f1ffa050b8 +CT = bbce07ee7cedada52b72e8e3b74b4aff245f63ad9009570476a4e9e759d5bb79c187a157099e3d12 + +Count = 56 +Adata = 88800df7b6 +Payload = c9ea772e61742a6706da3ab3e81df14b31506ae58b063ece +CT = 8e59724a0739dbb69a573163e539dcdd06bff0b9e4af39729f0f3699c9743ad6c9f09dc00ea10487 + +Count = 57 +Adata = 715041afd4 +Payload = 70d2b8d64121ceccf1961444e8d33b7b7f998aeb58d3d270 +CT = 3761bdb2276c3f1d6d1b1f94e5f716ed487610b7377ad5cc560d78cba6d9f50e9c2677a710f92155 + +Count = 58 +Adata = 14682301a9 +Payload = 1013946815001a2c08acca4196e0d6668ffbb3883cf111e7 +CT = 57a0910c734debfd9421c1919bc4fbf0b81429d45358165b95ffb6e29172a283d47e4478e2e1f7c4 + +Count = 59 +Adata = e44c3c21c1 +Payload = f40dc834067bd163e0004d0ec5dd4b96e2a1ea31ea431c98 +CT = b3becd50603620b27c8d46dec8f96600d54e706d85ea1b24ccf233caf0bad9f68f71d78ee58512ec + +[Alen = 6] + +Key = c5a850167a5bfdf56636ce9e56e2952855504e35cc4f5d24ee5e168853be82d8 +Nonce = c45b165477e8bfa9ca3a1cd3ca + +Count = 60 +Adata = 4759557e9bab +Payload = e758796d7db73bccb1697c42df691ac57974b40ca9186a43 +CT = 93ad58bd5f4f77ac4f92b0ae16c62489e4074c7f152e2ed8a88179e0d32f4928eff13b4ce2873338 + +Count = 61 +Adata = 2ea07d393a0a +Payload = ce60ddbe40b70bd55a9147036ad079dec1558ef4c2c625b3 +CT = ba95fc6e624f47b5a46a8befa37f47925c2676877ef06128b7d812c4d69f1f53ee9158382e56625b + +Count = 62 +Adata = aa6667faedc1 +Payload = 89eb3056770a6157f06921bc153834447c4b6d862d10d185 +CT = fd1e118655f22d370e92ed50dc970a08e13895f59126951e26fdbed62b228db008a1b14bd7942e12 + +Count = 63 +Adata = 9e2127d92311 +Payload = 132f3e19e12f462a7463226b716c41a05a59c76f0e1a2f72 +CT = 67da1fc9c3d70a4a8a98ee87b8c37fecc72a3f1cb22c6be9124e1eb78de01b8af83b684baf3e43ad + +Count = 64 +Adata = 2f191bc9cff6 +Payload = b8611cbb9a3667b9458ca57eb636eb1dc580e7dbb5701692 +CT = cc943d6bb8ce2bd9bb7769927f99d55158f31fa809465209cb0f79736d1a810d06a776094f9fb67f + +Count = 65 +Adata = ad739d5f4736 +Payload = 112f89ccbdadc2433008d3ede2290f9ce81e5c736abf42a8 +CT = 65daa81c9f558e23cef31f012b8631d0756da400d6890633bfba2348f629471c232c9ff7e5f6f85a + +Count = 66 +Adata = 01acc909b7d3 +Payload = d47f2ff745de39a9055ad002de6334971fde480bef268b33 +CT = a08a0e27672675c9fba11cee17cc0adb82adb0785310cfa8c0f694d03ffed043787343827ea2603f + +Count = 67 +Adata = ce003c836a6f +Payload = 13be365884b8a91a284ca24f70011e48794b51be275153b9 +CT = 674b1788a640e57ad6b76ea3b9ae2004e438a9cd9b671722279b553998a6fee0a86e177a448573a4 + +Count = 68 +Adata = 6a759a4efd00 +Payload = d5c87c649579da3f632ba95cb0a07c924095e4bdd4e0376e +CT = a13d5db4b781965f9dd065b0790f42dedde61cce68d673f54eeb434cca3ea719827417e94d6ed564 + +Count = 69 +Adata = 02b84a26c773 +Payload = b7bc1580c68fd5d06c1bf75c31dad7a3e26d636d7eee20b9 +CT = c3493450e47799b092e03bb0f875e9ef7f1e9b1ec2d86422a74b5e4e2edb91fbbe722bfaf1500db4 + +[Alen = 7] + +Key = ae8f93c3efe38e2af07e256961dd33028faa0716e5320a7ab319a10d2f4c5548 +Nonce = 6333bde218b784ccd8370492f7 + +Count = 70 +Adata = 0b1fabdf2a4107 +Payload = bc9ca92a9c9919e39095d3e53fb148694620ae61227e0069 +CT = 45811b0c8f754bf03950e520cd4afc81c2e3eb8a11f4fd386d5a6e4b1fbee15d35939c721004502e + +Count = 71 +Adata = 2fc7f5c0ce052f +Payload = f25a4ca20bbf4969bed6b93c1c77e3d7415f60fe3784216b +CT = 0b47fe8418531b7a17138ff9ee8c573fc59c2515040edc3a24a68f98716190fb55f743a8bf62a085 + +Count = 72 +Adata = 8a74412da3034b +Payload = 3237bf953989d17c65a0fafd2bb1e32c237f98f55389e8f8 +CT = cb2a0db32a65836fcc65cc38d94a57c4a7bcdd1e600315a923afef7b4955d7d1e8f1abef9933bf9f + +Count = 73 +Adata = 7139f3c1d6cc36 +Payload = 55d86dc0423cfc2616ef996a3316e776707f8d25c985884a +CT = acc5dfe651d0ae35bf2aafafc1ed539ef4bcc8cefa0f751b8e824c62632dff5cbc103d3060fbd174 + +Count = 74 +Adata = af7a380f079aa1 +Payload = ac48398adb10292314973946f261ec39397442ca09b98dd8 +CT = 55558bacc8fc7b30bd520f83009a58d1bdb707213a33708980202d518ca871c9544f4a8c55fd8d20 + +Count = 75 +Adata = e602abe8f72964 +Payload = 2fb78654e4395df8c37f260d74def234a3a4e3d2b1fe8614 +CT = d6aa3472f7d50feb6aba10c8862546dc2767a63982747b454b33ea6e4344033f74f513d1e41b82ae + +Count = 76 +Adata = 82741c5fd6e1df +Payload = d488bdda400932de56a9f105f0e74ee79c2ed869faaadc31 +CT = 2d950ffc53e560cdff6cc7c0021cfa0f18ed9d82c920216073ccf18c7ea7dce79d0be1204c593234 + +Count = 77 +Adata = 78f0cc22535402 +Payload = b22aba8d3e9f4b4bf006e26062de15daf94597731a600912 +CT = 4b3708ab2d73195859c3d4a59025a1327d86d29829eaf443b81b8af57b85093778690266e20e2fbb + +Count = 78 +Adata = 18e468139dd16f +Payload = bd864f7b8efd6ed2b068f425482d449bf53a203ea88e1ca1 +CT = 449bfd5d9d113cc119adc2e0bad6f07371f965d59b04e1f09b94a857e7a0423ef6c9cbebde1f9c40 + +Count = 79 +Adata = a6dab47c0fbfe1 +Payload = 47d9d18b6addc5f88986f0457b666faae59aba4fa3a02abb +CT = bec463ad793197eb2043c680899ddb426159ffa4902ad7ea64718820065a739fbd3ba560a416895c + +[Alen = 8] + +Key = 548c2d1eb7d91e003633d4d9ff199e4a8447180edd89ac7867d25a1db288b5ce +Nonce = 23b205bd6ff8ed0bab0c98999c + +Count = 80 +Adata = a6601111cd92c943 +Payload = 49fd5cbe4aff89dc3b8718f9ce545d612cbbebb289ecbf42 +CT = 3cfc6211e359ae322802fc9566f377b0dfe17d1dfe0878ebf2a9047e37cc0be1fab0006af8db8dc4 + +Count = 81 +Adata = 96f0b7cd7439721d +Payload = 94a95e945f660d1571b4d7d22709b000b45ff98b2129a4ae +CT = e1a8603bf6c02afb623133be8fae9ad147056f2456cd6307106a430b04938e97f2e4cda81108ad3e + +Count = 82 +Adata = 2ee135dc2ddd9501 +Payload = aeed3aea01755c912213c8c276a2b75dad24f888a611efa3 +CT = dbec0445a8d37b7f31962caede059d8c5e7e6e27d1f5280ab2ab219c6c4952d52505cd9f904b0e04 + +Count = 83 +Adata = 10c361934fd6ff77 +Payload = be1fcebea4c22a1d71e08047b028d7f4ccab0a6b8085d344 +CT = cb1ef0110d640df36265642b188ffd253ff19cc4f76114edfc1f7b2fe314faea28ab0dae349feb9c + +Count = 84 +Adata = 3f6c8a69917f7776 +Payload = 87680ac26fe1511e0f1f745aa4c2a5b9f6c0117dcf08feaa +CT = f269346dc64776f01c9a90360c658f68059a87d2b8ec390308e529d64e786a29661cccddc0366f3b + +Count = 85 +Adata = 0f7a1426ff3b5ee1 +Payload = 9e004b072a27b085e59ca201c157c7d3c906a2c3b455c56e +CT = eb0175a88381976bf619466d69f0ed023a5c346cc3b102c797c6510b85dfd097f3eac276aff00ba2 + +Count = 86 +Adata = faa5bed84dcf168e +Payload = a1bf47b15cd66e43daff420edf014a14b11994b97ada4030 +CT = d4be791ef57049adc97aa66277a660c5424302160d3e87998e522b6f13f99ecb553b6de845940907 + +Count = 87 +Adata = 2851dae3cb3fcb1c +Payload = 2d15734871adc63ff32d7002ab40c4a235a4d5fad223953f +CT = 58144de7d80be1d1e0a8946e03e7ee73c6fe4355a5c752967a9ca39566189ee96c86462bfea78af5 + +Count = 88 +Adata = 35a29c1bcbe2182f +Payload = 5a84c4fdd47510fb7aebc0f79d7b625ccd0a96575740b8e6 +CT = 2f85fa527dd33715696e249b35dc488d3e5000f820a47f4fa613b5fbbe73a2df6c630a00ff4b1b92 + +Count = 89 +Adata = 45820ae66c3e8e77 +Payload = 2052a94e1392dc1db0e89be19ea8f7379ee4cb607a914c89 +CT = 555397e1ba34fbf3a36d7f8d360fdde66dbe5dcf0d758b20d19feb067e9f6225376da21b4899d296 + +[Alen = 9] + +Key = aab793e377a12484dbdd74c9b3a85c74c286e1cc498663fbd7c718b5633bb91a +Nonce = 10022cddb323e88b3c08f95a0f + +Count = 90 +Adata = 82b8c736037ce2f2e8 +Payload = 7c0889854658d3408c5d8043aad2f4ae4a89449a36f8a3b8 +CT = 1044250f58857c69f72b5d3454d43949e5c02b3822970b280de1a3f7fc5d06cc30f06075f5504ed7 + +Count = 91 +Adata = 8f2777ec4930f7e349 +Payload = bd845561f099500a6ff3fd09964dc3820f7ab48ba4ed04d5 +CT = d1c8f9ebee44ff231485207e684b0e65a033db29b082ac45835840df6fa96f5c972ac09d94148cbc + +Count = 92 +Adata = 5cab3b846870709569 +Payload = a6e09404fe60badfc63dc228057485e6f563ba82acdabd7c +CT = caac388ee0bd15f6bd4b1f5ffb7248015a2ad520b8b515ec2f83ef84b299cfdb61d2b5039d536c3f + +Count = 93 +Adata = 0938f2e2ebb64f8af8 +Payload = 33404d7e0e620c1030b91020e33619c5f53d8b210fa86489 +CT = 5f0ce1f410bfa3394bcfcd571d30d4225a74e4831bc7cc19db04e655cbe22b9ea508d2a03757b97c + +Count = 94 +Adata = 82f78ca0e0da2b2d3a +Payload = 617868ae91f705c6b583b5fd7e1e4086a1bb9f087a50bf50 +CT = 0d34c4248f2aaaefcef5688a80188d610ef2f0aa6e3f17c04bd88dc6985f819004c2b634c5303ed8 + +Count = 95 +Adata = 401191aa3fd34abe87 +Payload = 949cdd7c2973d7519e7bca98b2c5947e6d8e91c90e632319 +CT = f8d071f637ae7878e50d17ef4cc35999c2c7fe6b1a0c8b894ff3572e4ebf78473760d8cb4b0366b4 + +Count = 96 +Adata = 4df4377596d8987671 +Payload = f6720a0bd8705c70e0f923338965e810b3ea939bad652327 +CT = 9a3ea681c6adf3599b8ffe44776325f71ca3fc39b90a8bb7de95ec3eee17753e60fb3c0661bdd098 + +Count = 97 +Adata = 6593194b9970545c5a +Payload = de9b0556661e726f3e6e34515ff7196420fe61b4f38419f2 +CT = b2d7a9dc78c3dd464518e926a1f1d4838fb70e16e7ebb162b8590ff04f967e51fbd1be84f01b4dcb + +Count = 98 +Adata = ab2d432058b540ac72 +Payload = 6cad7f3b9f196839bbc5a7f755c09aa8e17c83d9cb8b3954 +CT = 00e1d3b181c4c710c0b37a80abc6574f4e35ec7bdfe491c471d67b75b2da855a12ffb24ddd64a048 + +Count = 99 +Adata = 5dc631eeeacb5a0b0b +Payload = 70a55aec1144357377612fd0bbc2c817f33465a656219957 +CT = 1ce9f6660f999a5a0c17f2a745c405f05c7d0a04424e31c71fc798dd16c1fadef607a9297cbfbfef + +[Alen = 10] + +Key = 06ac39896073a44283611a66ccab067e2dd2faa8da82ff9a45bb29e54d2e6e77 +Nonce = 6c7942c9819cf69b817bfcdb0a + +Count = 100 +Adata = 215e2a6c24325340fdec +Payload = 3216dce3b8b1ce0e79e40fffcac728ab191aaaf319d971d3 +CT = c5b3b50ed8a7b7b96b02ba9464b6a2ff80e90548605699a63d70e6dffb31a376a1eb7f94526dca48 + +Count = 101 +Adata = e0a29a2c7840cf9b41de +Payload = 7e5e5710a693ebfa36335cf7965574740880acdddd13fb1a +CT = 89fb3efdc685924d24d5e99c3824fe2091730366a49c136fcbf516608fe20e06bbff931e84683545 + +Count = 102 +Adata = b8026fbada6339d84802 +Payload = 08c342a50aa23362622934dfab55d9b22c22c249ad08138c +CT = ff662b486ab44ad570cf81b4052453e6b5d16df2d487fbf9d70eb14f3fa0229906b9e0360be3d3f9 + +Count = 103 +Adata = 65f4b3a00c1c1ef39445 +Payload = e085aba85882c75d5e41559167731496cf17d3907894352a +CT = 1720c2453894beea4ca7e0fac9029ec256e47c2b011bdd5f4184771199a427861bf17cd8401e794e + +Count = 104 +Adata = 96118dbfe53434d8aed8 +Payload = 710f890be2b8da77c1eff429ede9cc931d50f059748cbcb6 +CT = 86aae0e682aea3c0d3094142439846c784a35fe20d0354c34e20b2db52fde68f88bfb886fdcb2c47 + +Count = 105 +Adata = cdf4b485d2e04709cf8f +Payload = cda96efee4e188ab3048bc1904ac2c36ab018f2ab7602682 +CT = 3a0c071384f7f11c22ae0972aadda66232f22091ceefcef782ee3df38ddea8e269eb47e39900345e + +Count = 106 +Adata = 50e57e57cf8e49e3a4e6 +Payload = 3dc596d52e520779a50bcba3049388b340dbf6d0f2eb94cf +CT = ca60ff384e447eceb7ed7ec8aae202e7d928596b8b647cba44aaac4ed86f687cfc031f22827725f1 + +Count = 107 +Adata = 48c670f11ff7f74e7003 +Payload = a33105c0dccf8e3b687212a870af9f710462756705fe09b3 +CT = 54946c2dbcd9f78c7a94a7c3dede15259d91dadc7c71e1c6d75255006ac037d6a4d048f1fc338012 + +Count = 108 +Adata = 465e3be6113a2fb2ee20 +Payload = 573ac2436158eb7dd9be981e3cfbe75d3a188ea9cf2b1ee2 +CT = a09fabae014e92cacb582d75928a6d09a3eb2112b6a4f6976c1da33a80bc8157cece1acf9400b2bb + +Count = 109 +Adata = ee4e10574faeae85e9b6 +Payload = ca35bdb54e73eac5a5200a296b3aba5f37c87349746102d4 +CT = 3d90d4582e659372b7c6bf42c54b300bae3bdcf20deeeaa165c1cb98da4a1a920ca1ed9a7b6ec514 + +[Alen = 11] + +Key = 50412c6444bcf9829506ab019e98234af1541061557412740bc120b456052763 +Nonce = 85684f94c3702c5d870310166d + +Count = 110 +Adata = f706a3e09df95d3e21d2e0 +Payload = 6cdbd63f6d591f59776f828533b28e2453a214d1d0dd8a39 +CT = 8c8b4ae854a5d5c265b25e3b54bded9444cc454b3e0e6a24d6c05eaf406a5ebd578e19edd5227380 + +Count = 111 +Adata = e46b25b9a41a858e87900a +Payload = 100132c315bfc9c4fb93023f5d3500d7208a68acb4d2c630 +CT = f051ae142c43035fe94ede813a3a636737e439365a01262d5088446e42591c0ede68e82334d97cfa + +Count = 112 +Adata = 28d34b29afe6586fd9bf0e +Payload = d5460c1db0d24dedc63c4c78ce6d1f0b2d46f3b01934525c +CT = 351690ca892e8776d4e190c6a9627cbb3a28a22af7e7b2413eaaef2823f5ac3f313f560bd774d10e + +Count = 113 +Adata = 2852d4fd68a3e9e47d44a7 +Payload = d2d73b62e3b1c9ab75f3544ff8616741e0adbae84b8cf9d0 +CT = 3287a7b5da4d0330672e88f19f6e04f1f7c3eb72a55f19cd62d30d99bb7dadec34e2891c156a1f5d + +Count = 114 +Adata = ec1c17b2ab13d7c8ac874f +Payload = 74796d78d6ad03634ed80800af530212baa7e5093651cedf +CT = 9429f1afef51c9f85c05d4bec85c61a2adc9b493d8822ec241c9a05ebf9ed27792bbced83b5dc582 + +Count = 115 +Adata = 4f1ab5ddb1c199e9a5daab +Payload = fb432488b5d08d576a90f085181ad883407a6ce9ea29950a +CT = 1b13b85f8c2c47cc784d2c3b7f15bb3357143d7304fa75171ffc24020e86b1314724104e6b57b3ce + +Count = 116 +Adata = 864e0e728aea856fae6c6d +Payload = 2b82d96ed1778412378abe4e09c633acf3359b9709ae3dcb +CT = cbd245b9e88b4e89255762f06ec9501ce45bca0de77dddd6539bbb0af8ecf77b4508533247b3501a + +Count = 117 +Adata = 21ee21a5ed0d75d0380a28 +Payload = 85143071241bb65261fe7afcc102416e59b9e46ee0c90073 +CT = 6544aca61de77cc97323a642a60d22de4ed7b5f40e1ae06ef8981ec6ce7c4687b178f2103fa8c8be + +Count = 118 +Adata = 2b63f7b676f13f45d103dd +Payload = 185577b48237acbdaa3590b8057fe374f875ce829b62c98f +CT = f805eb63bbcb6626b8e84c06627080c4ef1b9f1875b1299265d9d899c6b71c0ab3049ea1dbfaf6a9 + +Count = 119 +Adata = a33e86d813c2c4ff3bab20 +Payload = f051beb936e60fd4f3bca31964f1ad3e6fa16dd27b65a6db +CT = 1001226e0f1ac54fe1617fa703fece8e78cf3c4895b646c6b246474c4e79822f5fd55f2fb0067a40 + +[Alen = 12] + +Key = 8a56588fe5e125237b6cdc30f940b8d88b2863ec501a0cb00b1abade1b5ce0ed +Nonce = d80210b9f9776ea36dc0e0a787 + +Count = 120 +Adata = e4296d1c8cf4ffc4b2635135 +Payload = c825952293e434ea866db558aaf486ef09a92bf366988f71 +CT = b8b3b15fdf6a4a0b5abc313afc769e4e8413bd887552583ede3ed995d1b70561c8e28a7b1a7e3dc8 + +Count = 121 +Adata = d18bfcc1584eeb8695388ebe +Payload = a1e0248355bfd1d881fb1a4798cda2f6f6ad513c69c5f9b4 +CT = d17600fe1931af395d2a9e25ce4fba577b17c7477a0f2efb561575f6743c5759494be59afa0c3e11 + +Count = 122 +Adata = 14682301a99bf680805d1ffe +Payload = ded135fcbf62219bfba2cba40c2d2cbe4815ddaac1342231 +CT = ae471181f3ec5f7a27734fc65aaf341fc5af4bd1d2fef57e34f689367228cbaf3cd76fb407109cf6 + +Count = 123 +Adata = 8853aa2dfea9c4d370678bb6 +Payload = 12d3900c6c01968b8344762e0e883e5e219f42b052dc6215 +CT = 6245b471208fe86a5f95f24c580a26ffac25d4cb4116b55a2cacb7fc3856abcf759feb8dc0998ab1 + +Count = 124 +Adata = c5d3b9c593c3185fe4b6d1bc +Payload = 8c3c1193fe1a1ebad7e01a1eed1a32c08a0091b1c948e184 +CT = fcaa35eeb294605b0b319e7cbb982a6107ba07cada8236cb42a740cd3262424a2c3d77849ead6149 + +Count = 125 +Adata = dfb9e8149b51f89b1ec00a8e +Payload = 8219618b7728ac89237705ecf84012cc7c80293c4cf171d8 +CT = f28f45f63ba6d268ffa6818eaec20a6df13abf475f3ba69747d4dbe0f9415d40843070e1e93059eb + +Count = 126 +Adata = 08a4590d262e4dbcb7e23ffc +Payload = b344b7dc239617fa51b9ea10a349e940c3163779f5284c9c +CT = c3d293a16f18691b8d686e72f5cbf1e14eaca102e6e29bd31215b3dccba4ca5de64be7fab8a7a22c + +Count = 127 +Adata = 74aab7b5b96238710637c6e5 +Payload = 740d4b25ca7221d0826057701a6bfd66c50a82f010a57be8 +CT = 049b6f5886fc5f315eb1d3124ce9e5c748b0148b036faca734e09945ee44c95c7923d8b9249ade7b + +Count = 128 +Adata = 420aac47a3f212fffca40549 +Payload = 5d9000489186abdf4f0a2794f0222fcaa156fe6309c10f79 +CT = 2d062435dd08d53e93dba3f6a6a0376b2cec68181a0bd8360a568dd779526a0058d522af1dafde30 + +Count = 129 +Adata = 6e80dd7f1badf3a1c9ab25c7 +Payload = ac2c44263363810bec3a309aa618b303e05099dfdbeb5c16 +CT = dcba605b7fedffea30ebb4f8f09aaba26dea0fa4c8218b59279442c88d612ed1a39ae0005f88155d + +[Alen = 13] + +Key = a4cc7e1c90f8684e6a5f95e6898ab4e3c194cb46e196d8228062b9f3fa744930 +Nonce = cdc2712e51c7f333d6bad78eee + +Count = 130 +Adata = 569c56b27268d3db54e728aac0 +Payload = 10d4cff95ef490923c9e0906880729d4d05412e7675cce76 +CT = be3ce3e9dc72499839a98ae52abb17415e8547687e8a3c7b8aaaac20d4c9276f2851cbba2b04d185 + +Count = 131 +Adata = d75635b6450e43285fba966835 +Payload = c9db03e2efbab713b0b640421018d3971ffe2abd70fe8fa1 +CT = 67332ff26d3c6e19b581c3a1b2a4ed02912f7f3269287dacc121ff83891335dd1214ea6fc25f6a68 + +Count = 132 +Adata = 70750acea6a05f8b7b425d262b +Payload = add631ce5846ce71434aad4998f8e429aed430e7d38bdbb2 +CT = 033e1ddedac0177b467d2eaa3a44dabc20056568ca5d29bf549e71ec517cd65150f42b3cb53f936e + +Count = 133 +Adata = 2a567c7ec7edaa5a438ae3bb35 +Payload = a514d170422feb1d87bb7725a9e77cc6fc8afb45c2af6d90 +CT = 0bfcfd60c0a93217828cf4c60b5b4253725baecadb799f9d0e432ec394ddbb65205dc40a5a8e90a4 + +Count = 134 +Adata = 0f8795385b805246a0a2573afc +Payload = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d +CT = d730a80a3ab4a07849d4ddf9280170800fb9897c917dbe30926b0d977107a3918717f79b63f36b0a + +Count = 135 +Adata = 111d224c102b136159fbeb44a7 +Payload = 2edd498e54b23aab6f4fd7b3f22c4c787e3a4f1fb06c9ec7 +CT = 8035659ed634e3a16a785450509072edf0eb1a90a9ba6ccac2cd61599bb93db3dd3dabc12aa90932 + +Count = 136 +Adata = df0821c9ea6ab329c626d11b4b +Payload = 6e3e25db29da2c787bb37755ee770e2402fb8208da23389d +CT = c0d609cbab5cf5727e84f4b64ccb30b18c2ad787c3f5ca90bd027ecd00cc6dc5ffd5d746d92281e9 + +Count = 137 +Adata = aacaf4839c35338d6e2b47ac45 +Payload = d4ed4584678e982ace8664e77d0e55be356be558cead3755 +CT = 7a056994e5084120cbb1e704dfb26b2bbbbab0d7d77bc5583c01354a450eda2588be7578530e38c0 + +Count = 138 +Adata = dc6eed3f8bd1b5563c1eeb9afa +Payload = 4ebf00eadaf70711f630f5badf0214d8518a200afb0e5765 +CT = e0572cfa5871de1bf30776597dbe2a4ddf5b7585e2d8a5688d7a1d546e25ba026cd46556eb2c4b7e + +Count = 139 +Adata = fbfe7e910f242a78dd6e69a2ec +Payload = 2729636112f2abe2c76ea5e52a3f80b0f882f0f3b6f7c806 +CT = 89c14f71907472e8c25926068883be257653a57caf213a0b0e951aee790239e7067ef37f497b4bf4 + +[Alen = 14] + +Key = 347e12eec56e95aafcc7d25bf10fc756b4e42bc2e43da7f97df24331f27f1f5c +Nonce = b8d517b033754058128d13d11a + +Count = 140 +Adata = 511c6924fa96db716f6b053b7a48 +Payload = ca88dddfc876a12f45f19562bc9ca250f43267ab251a7f34 +CT = eeedcfa8f5b5b48c1d7e277526eecb7294213b9f5785167ae949b93003dfe63c95c1d49edfb4de3f + +Count = 141 +Adata = 10c26d5939618189a9503623f55f +Payload = de0c0d17c3950e7f8985b56d60623cbd010cd765da4df5ab +CT = fa691f60fe561bdcd10a077afa10559f611f8b51a8d29ce585c32a90d77fed97eb0ac164ed616e1c + +Count = 142 +Adata = bc09c59d20e55a9e184d70af2c7c +Payload = 2f35102d78a32fcde1cfb563ea8d310ecb83c146ab8de362 +CT = 0b50025a45603a6eb940077470ff582cab909d72d9128a2c180fdf5f63045f326057cf74fd4cee6b + +Count = 143 +Adata = b75887f13d6e8c4b35b27b965693 +Payload = a3fcce3420effdd6edb37271735a0d30c10c65233aee173f +CT = 8799dc431d2ce875b53cc066e9286412a11f391748717e7134959a180fc2cf2ba99af21cc1bc8e5c + +Count = 144 +Adata = 603401a9b8ecde4d5c86b6107363 +Payload = 4ac918727e41b8c536484e3781c403e260c278712853508d +CT = 6eac0a054382ad666ec7fc201bb66ac000d124455acc39c32ca2e5195dbd44f0a119538c95788510 + +Count = 145 +Adata = 7206b06f306124ca3a302e84c5a6 +Payload = 97d770cbb2c42a552e450cc4e35e5668b2ff89cec735cc91 +CT = b3b262bc8f073ff676cabed3792c3f4ad2ecd5fab5aaa5df74a4e1198878a76291594b9826d4b563 + +Count = 146 +Adata = b15efed90a5d1d62f545ac22af6e +Payload = 86bb2ae50e36c72936240a74502172625cbca210cf285077 +CT = a2de389233f5d28a6eabb863ca531b403caffe24bdb73939ff5f993dcfbd048274da7439c0f9ef5a + +Count = 147 +Adata = c9eb714ed9858a8dc11a26ee3f00 +Payload = 0dc79993047fd6e7260aac4d847fdb4d16483f28b13b5f17 +CT = 29a28be439bcc3447e851e5a1e0db26f765b631cc3a436590e87710559a375ece6ef2953b6aa2542 + +Count = 148 +Adata = 07ca22271e95cb48a872046822b7 +Payload = f950e96d65a55efb3be3a55daffb421afad1d5625e3440a1 +CT = dd35fb1a58664b58636c174a35892b389ac289562cab29ef998035c81716e2d1ed4b4d56ff18af5d + +Count = 149 +Adata = b65f6773516124317cfb4b1fcdf5 +Payload = e160e28e601a49d16db18f25410756b330b036c42e615fd6 +CT = c505f0f95dd95c72353e3d32db753f9150a36af05cfe36981ae73a9b6896d8fc1b8c0d772d632983 + +[Alen = 15] + +Key = 520902aa27c16dee112812b2e685aa203aeb8b8633bd1bfc99728a482d96c1fe +Nonce = ddf50502f414c1bf24888f1328 + +Count = 150 +Adata = 22b4f8f1aac02a9b2ef785d0ff6f93 +Payload = 533fee7d2c7740db55770e48cb1b541d990ea3f8f08ed1a6 +CT = fc867b319e0e4ab45ec518a1b5dcec4f29982173f3abfd4d8a8f8d14d2bdac84c3737cfbd75b7c0b + +Count = 151 +Adata = d0a43de391d492746ecf322acd6e5b +Payload = cced20b59a6b2c3c45ea6c87802440c9c47b1015e83d86c3 +CT = 6354b5f9281226534e587a6efee3f89b74ed929eeb18aa28fce59f5e6e3cee284b4cc747ff5ee13f + +Count = 152 +Adata = 3a789c06f87f05933c34a1cf9834a8 +Payload = 90939a4530181ad6900664f66bfc2ce0289432a0afe9babe +CT = 3f2a0f09826110b99bb4721f153b94b29802b02baccc9655ddaef56d8255125f7c316c6c59ce779f + +Count = 153 +Adata = 785260973f112c56d9f891160c4c11 +Payload = 86cd926b9565b76a88fde73c31e9ac908ffd1e6ca30b59ce +CT = 29740727271cbd05834ff1d54f2e14c23f6b9ce7a02e752555810cbcdf48f05d0a7808673c82d08d + +Count = 154 +Adata = bf6a144591c0ea7b10274fbd3345a1 +Payload = 6ecd1c1acc6290672f9cf639ed0cebcb21ed0c56f35a5ce3 +CT = c17489567e1b9a08242ee0d093cb5399917b8eddf07f700849e41e5d34a698ae1d96f16bc68da944 + +Count = 155 +Adata = 7d9488b500d89a27f367f34a448a87 +Payload = b01e3f4fb5ee7501e8c2f4ccefb542ae20d7fd61a2c41c8b +CT = 1fa7aa0307977f6ee370e2259172fafc90417feaa1e130601bc54e546d1a6fcf6187169feb1ea533 + +Count = 156 +Adata = 060fc718e994edc7bac9962ca7f28d +Payload = 22ab6a0daf953165dda864cceeeb782e275c0b072aedd284 +CT = 8d12ff411dec3b0ad61a7225902cc07c97ca898c29c8fe6ff2eb6c0ab42acf42985c721bfd576e71 + +Count = 157 +Adata = cb6f96dd06015967279ade310a7401 +Payload = f96ed20b23c784015ff58f5f040798ca75e3b98045deca8e +CT = 56d7474791be8e6e544799b67ac02098c5753b0b46fbe665ac502b8e65cc1329b6895afdd354f5db + +Count = 158 +Adata = 9aa6d501455019b4ef4c7fb789d22f +Payload = 648a84813ca97aef4ab7e143ee29acb946388660f18eb671 +CT = cb3311cd8ed070804105f7aa90ee14ebf6ae04ebf2ab9a9a87e5f8a8148f21adf721477c36bd99ca + +Count = 159 +Adata = ebd1d12bbd14176a0d4080aa1edb89 +Payload = 32d71e59634126ac6c6156a80a0dfa0175b29e9f40a31696 +CT = 9d6e8b15d1382cc367d3404174ca4253c5241c1443863a7dda9ea0427522dbeaa509a11755434760 + +[Alen = 16] + +Key = 57da1c2704219ed59abfdf04743a9a93c87a63d471818de0f1564b2db6421562 +Nonce = 4b60a47b7e90f622fa0bf803e1 + +Count = 160 +Adata = 0ae8c012ff39753510df3ee80707e4e2 +Payload = ddc3c1aa73fb6de92bb4db138e26f3c2e0543ab4f5924871 +CT = daa8256d4753fdf9cfef876295badaba89b45cc497f54d220ec2c6fb687753bca4580adc6aa2f296 + +Count = 161 +Adata = d5b22e7697ba70e00c7ef32709563f01 +Payload = 34270576724083e9989764d08a0d5c1b4738f34927a1e436 +CT = 334ce1b146e813f97ccc38a1919175632ed8953945c6e1658f30b9c8e380c98bb939a4e8a85af758 + +Count = 162 +Adata = 6b4edef415763aabcef01863e8197aec +Payload = 904fe88e7a8e76447a64b488ef84184d0f1ab1b67f0c5a7d +CT = 97240c494e26e6549e3fe8f9f418313566fad7c61d6b5f2e53e80d8ccc687fd303f4cdef44b6e8b9 + +Count = 163 +Adata = 4c099809061024c010a77e9621fc2bcf +Payload = 51fe7bac8f3255f17f64fb9322210fb7d8da8e762498b233 +CT = 56959f6bbb9ac5e19b3fa7e239bd26cfb13ae80646ffb7600c635dac5b70338dac3f33ce16a99145 + +Count = 164 +Adata = 9d329439588164d5a96675a85c07a039 +Payload = eab6dbc13bb92df36b1882df2b8f34c3cefa41f95717fbd7 +CT = eddd3f060f11bde38f43deae30131dbba71a27893570fe84f996e8163affb1494bb3c12eeadf16b6 + +Count = 165 +Adata = b768fc3daf29ff9e8bd575072d986e99 +Payload = c44c9c287d3eac7c30570d9c4adf2e4857c598f7c54cd126 +CT = c32778ef49963c6cd40c51ed514307303e25fe87a72bd47598b4206a9622d5631751a497dfb1f662 + +Count = 166 +Adata = 3efc7cc2d16bf82d2bcfbc559a09b2c9 +Payload = c11b9c9d7607f387359c0038d3e8ec4d527562ce63c3384c +CT = c670785a42af6397d1c75c49c874c5353b9504be01a43d1f7dd300167d267ad700dea37fb475ecdd + +Count = 167 +Adata = 0ff89eff92a530b66684cd75a39481e7 +Payload = cc17904b166f28df82f57889f391159a4a308e752d714ee5 +CT = cb7c748c22c7b8cf66ae24f8e80d3ce223d0e8054f164bb6303e9c9bd0d8e4aac42894ca03d6ab06 + +Count = 168 +Adata = fbd11bc75759f0461e796f6917aeb42b +Payload = 6f97e595ea2f40612ea84a2097b974d235055fe1dae59403 +CT = 68fc0152de87d071caf316518c255daa5ce53991b88291500953f46e0e9cf1369e9eb018a4df3c09 + +Count = 169 +Adata = b79940952f42537484aa2907c72dffa9 +Payload = a48cbf933b88c0ec5ddcdd8fcad186391c2cbef308607de5 +CT = a3e75b540f2050fcb98781fed14daf4175ccd8836a0778b68a1702dfa0cd9c290c5ff9c35cc83705 + +[Alen = 17] + +Key = 9267ebc99ccf648b146cba3c251187e24a9947d806ceb0ced6894211641a1e0d +Nonce = 9b7298950280e8762ecdc9bbe4 + +Count = 170 +Adata = 5824689453bc406bf891b85e4576e38fe8 +Payload = 967daf12f16f166b7b5038f83a1cf0b980f5abf4c7746f2a +CT = 7cfe2a7a54306eb8d8a63d3d1ae86794f9a2c22198b2cb4f10ca926f1a430c08c12e23db3d913e93 + +Count = 171 +Adata = cd15973753b94b77bb4b778de8b3b0cabb +Payload = c4a756f6024a9dceabf6e264fffff9c719217fb418141ac5 +CT = 2e24d39ea715e51d0800e7a1df0b6eea6076166147d2bea05d5b674fd15410cc235dba6d8c8d82a8 + +Count = 172 +Adata = ed8540f7ce451c522c1ff5d2d1030d7b3f +Payload = e0d5de7d1eace211c0e70859ff315ff485d1200c6dd13f93 +CT = 0a565b15bbf39ac263110d9cdfc5c8d9fc8649d932179bf688750b5f36c86e7eda9015e960a7471a + +Count = 173 +Adata = cbbecf92551a15f5cf00a5be4a50b0eb17 +Payload = 05a4a4ba28fe8876f9bcfa5ec60651fd3fd4732f22049bd5 +CT = ef2721d28da1f0a55a4aff9be6f2c6d046831afa7dc23fb0d5fa842209dbbc04c87965f78500fec1 + +Count = 174 +Adata = 873ba7f8b71517ec50297b21cf94cdb7a5 +Payload = 9cdebaeee8690b68751070691f49593668a6de12d3a948b3 +CT = 765d3f864d3673bbd6e675ac3fbdce1b11f1b7c78c6fecd67d147edbe114bfdb3f3b9b37d5719ef5 + +Count = 175 +Adata = ac087420feb1e1e8c2546c2a8b8a5af0d0 +Payload = 5672e61cf664d73918dc1ca84df1fce82db0e305a61d57b9 +CT = bcf16374533bafeabb2a196d6d056bc554e78ad0f9dbf3dc57b4c2bbc377937d15b3b89543e29d0e + +Count = 176 +Adata = a12c690568114fd7a677f49d74e84fc1a6 +Payload = 0f5452e6b51540cf219998590995cd7f8785fa40b4f217fc +CT = e5d7d78e104a381c826f9d9c29615a52fed29395eb34b3992e6ca774074b47b59adabeaf8835582d + +Count = 177 +Adata = 7a78ddfe5afb2dc90ee4a600c2fc014b0f +Payload = 9ad338cbfd1b52e6ae4178f05e00062274f8b0b25eae72f7 +CT = 7050bda358442a350db77d357ef4910f0dafd9670168d692bd320f48a7221537e3cbed5ac4154a56 + +Count = 178 +Adata = 6053e466ed1f647a3cd88c4d2052ec00cb +Payload = d17b8d556e83190c84d4a812957c64ffa7f336298f4e2c72 +CT = 3bf8083dcbdc61df2722add7b588f3d2dea45ffcd088881740574e201f9a26932a87c8d822505814 + +Count = 179 +Adata = f7673e3beb526834d6507058fe62e34987 +Payload = 2eaef86b0f602364f86510eabc58bc9ad1e6f0a6f6df0b83 +CT = c42d7d03aa3f5bb75b93152f9cac2bb7a8b19973a919afe6837dfa3fdef2f012b6609de2ac5dd9d6 + +[Alen = 18] + +Key = 7a855e1690ee638de01db43b37401dcd569c1ae03dc73dd0a917d0cadb5abc29 +Nonce = 8f160a873a1166c8b32bccbba7 + +Count = 180 +Adata = 72674aca7eba2fc0eeafbd143c2c4d8aa6c8 +Payload = 33ae68ebb8010c6b3da6b9cb29fe9f8bd09b59ec39f4ce4b +CT = b22afdf4f12c43ec23e01ac1215a3f5286059211207e957057e9a9203da74387a9468f8af5e27547 + +Count = 181 +Adata = f7da3f100b80e2ade812f1700aab6b72f746 +Payload = dbb29817b86cb80e0d008742cedfbf52b236f15ee8cad50e +CT = 5a360d08f141f78913462448c67b1f8be4a83aa3f1408e35a3985f12a49eac424a35c94645917e91 + +Count = 182 +Adata = 4b05eaadf98505d0806c233b2cdcaf4254e8 +Payload = 145aa8cfd544a2f46bae1aa83cbdb3d21c3d1350078a3af4 +CT = 95de3dd09c69ed7375e8b9a23419130b4aa3d8ad1e0061cf4ab089a8724b87a1167180963d44ec65 + +Count = 183 +Adata = 05a3aaa08b9a6aaeb84704431425d0e45a14 +Payload = 6b32e8906dc89194a69410b79cd041b62eb01afb28a3e10a +CT = eab67d8f24e5de13b8d2b3bd9474e16f782ed1063129ba310a7d1520141892e140448292185c41c7 + +Count = 184 +Adata = 74db01edc26a2d2044cb8eaad8b907b78863 +Payload = 545ed03588fd85a8bbfeee66d2082ae6f8e2f3c9dbd8725f +CT = d5da452ac1d0ca2fa5b84d6cdaac8a3fae7c3834c252296472d3eee219d94bd788f62df4add5ec40 + +Count = 185 +Adata = 5f2c6ddf5a2403e04dac8b2813c060b67e76 +Payload = 66dd5fd8611c551973a3d0c078ec2b4d39ad163d9168de3c +CT = e759cac728311a9e6de573ca70488b946f33ddc088e28507c600496f4f8b1b7da118ee36d8cd57f8 + +Count = 186 +Adata = a650a2a5e3c6f7c95614570aaefd0cdd9a42 +Payload = 6f364b3f778376cbf3f4b0b0c5350a8fa278f9d8c25faad6 +CT = eeb2de203eae394cedb213bacd91aa56f4e63225dbd5f1ed4710004d06ce7a7efbd19da4e3ce3cf7 + +Count = 187 +Adata = 477c2484cf5c56b813313927be8387b1024f +Payload = 3de4798d8ad84c460b92abc10b7f5e7c9fae46a1dd353687 +CT = bc60ec92c3f503c115d408cb03dbfea5c9308d5cc4bf6dbc304099641c4ec3dc2c54fdf4f48dbef2 + +Count = 188 +Adata = 564e1df74aa2d7ee33b66cfeda810774e16c +Payload = 7769b45fea11f530fb9a67f1b5b1964a34cfa32bbb03f4b1 +CT = f6ed2140a33cbab7e5dcc4fbbd153693625168d6a289af8a905c1b05e8945685f8688faea777eb43 + +Count = 189 +Adata = d5e66502529b0045883d935e05acd242baa8 +Payload = 0c0a502b42f81b51806c7080a8155280f493f2922cdc7df8 +CT = 8d8ec5340bd554d69e2ad38aa0b1f259a20d396f355626c3ea5a3b6a8bafde4006b993cfb3b13557 + +[Alen = 19] + +Key = 0ebdc6ddb4c502725dd6ee8da95d56a0d1044b4694d6ba8475a4434f23a8474f +Nonce = fb717a8c82114477253acc14f6 + +Count = 190 +Adata = 41e9d65632f74f449a6842d5e6c4a86ef83791 +Payload = c7360282c85484a5a33ab1c68dd70873ab4e74ffd4a62cd5 +CT = 2e961b3a2fa1609a4e6fd04bff6ac5e306ae2638706f997b42be2e2ba05c54b619850db5c9d684fe + +Count = 191 +Adata = 555304659bde926cb2553b8a4605251fcddd92 +Payload = 1332314d1cf783b9f64e0fa2d42d43d225da9fd5165b5f0a +CT = fa9228f5fb0267861b1b6e2fa6908e42883acd12b292eaa4bbdee2605bc69601b1e83d1e7a0b400d + +Count = 192 +Adata = 69ea953dbb910ec589372d797c7379d3f3b9e9 +Payload = f264da8606ea429e0e25da3f2efafe28beaff05b42097369 +CT = 1bc4c33ee11fa6a1e370bbb25c4733b8134fa29ce6c0c6c7304611baf530932da7954f714514d228 + +Count = 193 +Adata = d7186a67061319b44eedc0677ebf5d932d5bce +Payload = c9ee6482144dc61c43041324a2c18ede370011cb4882b0c5 +CT = 204e7d3af3b82223ae5172a9d07c434e9ae0430cec4b056b6d1d44e26404b7324767f0b3f7486f8b + +Count = 194 +Adata = 38f37d5e2da017f1953ff3701be0b38809ba80 +Payload = 40524a4d32a711e7d5a59809878c318f42b6e2375b77b8a7 +CT = a9f253f5d552f5d838f0f984f531fc1fef56b0f0ffbe0d095453724d2db19f606c85d00e49b0bb38 + +Count = 195 +Adata = b3b2d249cd3517555fa692bbe9116f069e7405 +Payload = 961c15bd7dc34cd5409c9e8869988676ec6845ecb0ee85fd +CT = 7fbc0c059a36a8eaadc9ff051b254be64188172b142730536db1e4112fcd650e8c0f0f6fbf2d07e1 + +Count = 196 +Adata = f5b5bcc38efaff01f69bd3a106dcfca3cc6414 +Payload = 879568ab9ebdea768a5459ced1d3181d822536c3d1ba38c3 +CT = 6e35711379480e4967013843a36ed58d2fc5640475738d6d1cedb29e68322e47ff9997f859257d98 + +Count = 197 +Adata = a2098e3e23826e01f31107a208202f710eff00 +Payload = 47cb57599686716c75d7ecef5541d20fb908e6d98c39925a +CT = ae6b4ee17173955398828d6227fc1f9f14e8b41e28f027f41c12bf2a3571ed672592b27e986e9058 + +Count = 198 +Adata = 20a3d53e77201599540344c4e746c3ae3a5f84 +Payload = 4a8667b5ee09d3d4a6dca9a95f4ad406f1da94b846dcc6b8 +CT = a3267e0d09fc37eb4b89c8242df719965c3ac67fe2157316f12b2be8f5966d96602111c28f87b104 + +Count = 199 +Adata = 92c592ead4b3f193cc36687593d4f0f412a5d5 +Payload = 1dc9e32ac4176f64bd78a6edd651ebeea3ba85dfcd8298a8 +CT = f469fa9223e28b5b502dc760a4ec267e0e5ad718694b2d06776df0a0cf048892e65bd8ad77cb2255 + +[Alen = 20] + +Key = 2ff64bbec197a63315c2f328dcb4837d0cdc21a5d6f89ff1d97cb51195330cd8 +Nonce = a235f8ee3de9896b71910ac02c + +Count = 200 +Adata = 2b411bea57b51d10a4d2fb17ef0f204aa53cf112 +Payload = 4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a +CT = 1bf122798bd8ee8e73391d589bd046a294d1615794e69cb9e6f3ba30143acbc3a1c1c6ec74333107 + +Count = 201 +Adata = 0248359f8071143c3cc1d61882a3547a0b3d2175 +Payload = 4a6a7151465c2abd7e7fa1fd13019ad098b6ebcd190e96f7 +CT = 1b8c01056a837081553cb646ef73115a3ddcd3a095074e6436cb510c13a039f4df8cc26a942f9911 + +Count = 202 +Adata = cca77bc4cf6c0abd3393dac3fbe90fbc8a1154f7 +Payload = a94f5ede43929d48d2c5a58c3262d9127d2ac3cb2fbd5768 +CT = f8a92e8a6f4dc774f986b237ce105298d840fba6a3b48ffb7fe0dedc2899dff81a251cff16bf5897 + +Count = 203 +Adata = 9c082a84646c070bb11b7d6b92b62f06ee5b5b71 +Payload = 7303bd41cf47289a3111366d08e8e21548baf293052029eb +CT = 22e5cd15e39872a61a5221d6f49a699fedd0cafe8929f17886c43ac23800de60a1fd2caef0f03261 + +Count = 204 +Adata = 1c3ede1982a807a410ae1e21947bf430f8db7027 +Payload = fa9743a67978c20316cb91801d7789e350079aae3aadbd43 +CT = ab7133f255a7983f3d88863be1050269f56da2c3b6a465d026f7907e235c09d3322c4092d2e88f88 + +Count = 205 +Adata = deb05a30a026ff66ce71e98afa62f0255aef84f5 +Payload = 99599b4042dcdb685350cdecfdf24992fd5b165670025d0c +CT = c8bfeb146e0381547813da570180c21858312e3bfc0b859f6bb44a28c145d49f49f2821d4044e4b6 + +Count = 206 +Adata = 93dd9b00a3353e5331338dcfcb7ca7e0bb873a4e +Payload = 451101250ec6f26652249d59dc974b7361d571a8101cdfd3 +CT = 14f771712219a85a79678ae220e5c0f9c4bf49c59c1507400f7d20aa3d792d6a3ebc5ee0df2fd89c + +Count = 207 +Adata = 0855263860043207543c8c34648d53ec51c4f47e +Payload = b2db87b7787531968d603098cb20ca7c438b4af72623fea9 +CT = e33df7e354aa6baaa6232723375241f6e6e1729aaa2a263a7ca4733f0208668b0a7879305e861d71 + +Count = 208 +Adata = ee2d3a66deb3ebca867a902bb9202226ed516ded +Payload = ca18ce38086223e63b4f0b616d110010f9e45eac42f2ba46 +CT = 9bfebe6c24bd79da100c1cda91638b9a5c8e66c1cefb62d5d76b482ff20429da8f60f0f863e1af50 + +Count = 209 +Adata = 8e531aaea849addab6a83497cbc504f489505952 +Payload = 5717ed5da5b8aa806a18bfe979502bab6632c9428d3a7725 +CT = 06f19d098967f0bc415ba8528522a021c358f12f0133afb6aab66e1ac2346ef97850a4985c64b737 + +[Alen = 21] + +Key = 24e9f08a9a007f9976919e10dc432002e2e078a339677f00105c72ed35633a3f +Nonce = 15977424eeec0ec7f647e6c798 + +Count = 210 +Adata = 2d838eb51a4bc69a001a18adf2084a680f02a3c5fc +Payload = d3416a81b4246eb0bf8119a72a886bbc0ac9449c69f71d2f +CT = e001a8fae390dc5d672cdd18f86a1f728158ec83a002050def9af5679edbcbb7db20ab6af30698db + +Count = 211 +Adata = d83ee7ce22fd1a2882d8d552346e4d7b3efdd67da4 +Payload = 22b6f10b482448626f6c7bebb14f1497896d071738133b4d +CT = 11f633701f90fa8fb7c1bf5463ad605902fcaf08f1e6236fd435a5a38f84387f63b13407f65ec86c + +Count = 212 +Adata = 2d5537b24d0b0f7a45703c1e131656ec9edc12cdf7 +Payload = d60edc830be8207ffd9e9f646d3b4343b10b3d56acb89d44 +CT = e54e1ef85c5c929225335bdbbfd9378d3a9a9549654d85662ede8a705f8c988f55459542bd631b1c + +Count = 213 +Adata = 1a750eb326923412d94ccb35f5acd0f87415268178 +Payload = 716d3132f449a9def383978102ae50ed3ccae0cb346ba1df +CT = 422df349a3fd1b332b2e533ed04c2423b75b48d4fd9eb9fd986de774a612230ce6c71449d26732ce + +Count = 214 +Adata = b10fc523bc4562d44edfe5956f93c15c4ab38bba3c +Payload = 063c2ae2a15f26f979bf90657d20643e3184f1a9f75a3aad +CT = 357ce899f6eb9414a11254daafc210f0ba1559b63eaf228fe710431005264fa7d3fc04bac50fc1ec + +Count = 215 +Adata = fe4f60ce9634e7dbc5e56204c4bf8aa9be577027ec +Payload = bdc513e56a5bb70c02abc041af04d6e45e735d10cc88357f +CT = 8e85d19e3def05e1da0604fe7de6a22ad5e2f50f057d2d5d5c13bea6ad0cad724e6cd02c89517ffc + +Count = 216 +Adata = 48f3ceda4fd390a7eb38f7f5bcd14310af6b5a557e +Payload = 7dc5d8cd90ce2faf76bbd0d52e5ae11b310fc2b0051c4377 +CT = 4e851ab6c77a9d42ae16146afcb895d5ba9e6aafcce95b55d2a5531655aae01e249f213e0e04af0d + +Count = 217 +Adata = 199ec321d1d24d5408076912d6bb2b6f192d6b347f +Payload = 66c2696edec26ba3d07bd3f485a0d6ce8a1b0a85b20083e7 +CT = 5582ab158976d94e08d6174b5742a200018aa29a7bf59bc52a127ef341345f9641b26e91265e1482 + +Count = 218 +Adata = 8b013f5782d5d1af8dbd451a4202866095dac975fc +Payload = f4da8ac3e8fe5ec6a5b6a2f27b68396e850b46a024d441f0 +CT = c79a48b8bf4aec2b7d1b664da98a4da00e9aeebfed2159d2a005ca13c4bf715c3b7b2782f799b23a + +Count = 219 +Adata = e320df32b71cc530e8493b12b9afbeabc255c5eb44 +Payload = 244891cb4af66cc8e99a3784a2e82475e51bd5c7fde67cf5 +CT = 170853b01d42de253137f33b700a50bb6e8a7dd8341364d704642aff9cb9288d49f0e567dd837e05 + +[Alen = 22] + +Key = 0ec1b22b8df05dc92135d2dfbefed8ea81458f5ea1b801e8a218faf6cbdf1a79 +Nonce = 97ebcb8575bb58260208d5c227 + +Count = 220 +Adata = a2f6337f86dd00d1a58448851e95d8c9bace4a5c8710 +Payload = 2f59d94d4ab8eeb84c2a6fefb7fb0a3ac059c1e1a65ae34a +CT = 7ca0b1dbe34b0391e524b868b0af08b3e096917664d6aa2cabc1f9d0132394149c9062b74b82f04b + +Count = 221 +Adata = abf26b05558252c8e38c52b1ace087bbd1eb3d561239 +Payload = c25381853f73a3dc4195fdcbc45dfa1a40eb8324749adb2e +CT = 91aae91396804ef5e89b2a4cc309f8936024d3b3b61692486d7df57c6a792f6f6b24cb5f87e92123 + +Count = 222 +Adata = a13ade56b47803897666e42ef2ef88be0e779ac86c28 +Payload = 8dc5226a2a13088c87f4bf94262e0c0413f06b35d2fda79b +CT = de3c4afc83e0e5a52efa6813217a0e8d333f3ba21071eefd4ac19b0b74cd9d5e100598b96c9f1f2e + +Count = 223 +Adata = 3c5b68b65edf62755b7e064bd26c843816bf6c1cd481 +Payload = ee4b23039cd512cfab8c7a2d0f2c78d66764520bc88759e1 +CT = bdb24b953526ffe60282adaa08787a5f47ab029c0a0b1087a77a27eabfc79f192c0ac491280af8d0 + +Count = 224 +Adata = 0213fe13c49083d7c00335e1864dc139c9e7123162d1 +Payload = 30b48d4021838090fbd5251069ff8c631452daee5ef899db +CT = 634de5d688706db952dbf2976eab8eea349d8a799c74d0bd39935f91c1e29fc1e4c5c5427ca9da79 + +Count = 225 +Adata = a32291746b151be8134e183798aa82bef210343feaf6 +Payload = 2286a1eddd80737a724ca941217e9f0232870b6c2f20d29c +CT = 717fc97b74739e53db427ec6262a9d8b12485bfbedac9bfaaeaec90ada2a1ffef64c3873af645a40 + +Count = 226 +Adata = a30f2fd445820cdf800145540602c877da0e4c311272 +Payload = fe703ca0901e4a706ce1393c7d8ce18a03eb2caadbfa7b8e +CT = ad89543639eda759c5efeebb7ad8e30323247c3d197632e87932952831d0ba25c77c18fe154d8ed8 + +Count = 227 +Adata = ed438e393e0e37629cb25044ae89de9fd0d42d60c1a3 +Payload = 7043c67726870bb5816da925925bc2722478311c8a606cca +CT = 23baaee18f74e69c28637ea2950fc0fb04b7618b48ec25ac234fd0241d00f3890a23ccd0bf16dcbf + +Count = 228 +Adata = 1013946815001a2c08acca4196e0d6668ffbb3883cf1 +Payload = 695e9712dbbf883e9bf8af9188bd01fc631968928258168d +CT = 3aa7ff84724c651732f678168fe9037543d6380540d45febaf43498b0c3f70c119f82d5812db940f + +Count = 229 +Adata = 44cc9b2510680c4d73f1938c77de21242c8ee790ed7f +Payload = 67ba90d22c6bb5f649bc0c505c5ed23a299882559a3bf520 +CT = 3443f844859858dfe0b2dbd75b0ad0b30957d2c258b7bc46db66dbb03a4c943ac089ed11eb214bbb + +[Alen = 23] + +Key = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Nonce = 451101250ec6f26652249d59dc + +Count = 230 +Adata = 7cc9c51b69f98a06391ab32742fb6365e15106c811fe8a +Payload = 065ef9eeafbe077c1c7049f43eb0d8999708e8609f214d5c +CT = 990065322a438e136860f7b019807e9feff52a642bf3d44a9163fa7a867f04cab6f52dc250070f31 + +Count = 231 +Adata = 7bb1bc069a783d45d51d8ecd0a53ab7a386fa1f5ef12a1 +Payload = 69b2b056f2265e707d3e31e68bff6a060544c8a737b2a9b9 +CT = f6ec2c8a77dbd71f092e8fa2accfcc007db90aa3836030affd33dd9155619fb040dcd6038c7b7367 + +Count = 232 +Adata = 0dd220919d0eeee3b7cec36c47e376b778583b38bf61c8 +Payload = b98d79aaa4c04171398c7f1189497acaa7546ef068bc7a3f +CT = 26d3e576213dc81e4d9cc155ae79dcccdfa9acf4dc6ee3294fcba5a886b1f33cf1cf44618d28f01f + +Count = 233 +Adata = 1c1915fab09348b9a5536495c70d1a040305708c112479 +Payload = eeaeb773ade5fb2d27b50bb892916333e0b123c6e3ae5bdb +CT = 71f02baf2818724253a5b5fcb5a1c535984ce1c2577cc2cdeafe2c670eac203d5e90b9d520e7a618 + +Count = 234 +Adata = 614b0ac4611b6c6d3b4ed089510dcd2215567bc3789f85 +Payload = f2198e1f91fde2672a1ef60403c0d175f366b6780ee9f1c2 +CT = 6d4712c314006b085e0e484024f077738b9b747cba3b68d4f0388746438e83b731b5588fef53f1f3 + +Count = 235 +Adata = 866fea4483d4e903566844e31c24283571832dfae32c74 +Payload = ba37617342b4eefd4bdce8fad30c4751b206d47814973b3a +CT = 2569fdafc74967923fcc56bef43ce157cafb167ca045a22cfca81f8b36d16698a600fd701f2c6424 + +Count = 236 +Adata = 9d7546f7e8b949c539d21a357f81d0151e278d0bf2c5a5 +Payload = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f6 +CT = f6f3563424142a9d8a8edc1d384bea5d612e770ac247b8e04c15a6d292c7ed2f31cf9512435ec7d2 + +Count = 237 +Adata = 42b692048c8b3cce1b5e83f4f33232a7d7d0bc20695e7e +Payload = e0753d4248643642c7a96404de8d76c9d80527b659ec6d31 +CT = 7f2ba19ecd99bf2db3b9da40f9bdd0cfa0f8e5b2ed3ef427a2ad73179d0314b5fe52dd7217518cb8 + +Count = 238 +Adata = f1dfb6fdb31cb423226f181c0988a52ee4015aef4536f4 +Payload = 79ba959c7221b293e2115f538d9394c64284c756563c04b0 +CT = e6e40940f7dc3bfc9601e117aaa332c03a790552e2ee9da69ccc5ba1caf933b80bfc6f281109688f + +Count = 239 +Adata = 8eafce9ba466fd53eb87f499d7c76bd486db0e90a3d281 +Payload = e1590206717a708cad9cca7d23a3b8ee5f7fb7786aa3be47 +CT = 7e079edaf487f9e3d98c743904931ee82782757cde71275173271ec36d92fff34609169f579c8f1d + +[Alen = 24] + +Key = ef4c1d2314e671f666cc6667660f1438a293208c7cc29b412d81277f0a635c91 +Nonce = 50b23b052922366c25dd40e348 + +Count = 240 +Adata = cd0522ebe1fed82465277d1c10ae9316a98b4469be63b180 +Payload = c99c3e79125b6fd95e737326a842424eb6c6ecea4c0475c4 +CT = 76df4be4ec8373864399acda11294b220b9f7c3a7d2b3660b25764e40ac6a171e7e6bab4fdee4288 + +Count = 241 +Adata = ce5bf070678cb07e963263b1562ff79311144addb6e4de4f +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06eb +CT = 519d742d71422c63c2fe1661c32e7a45cf9f7f2290f4454ffca49758d17f2073066b82667eae6ce3 + +Count = 242 +Adata = 07175be2475cc735c9a3c1140895277378debf8fb1c87c24 +Payload = 6d5579aaaf8737b01620424f3ddeaf538f10dfad094e5ec4 +CT = d2160c37515f2bef0bca9db384b5a63f32494f7d38611d607c1d64d7e9de47a6ad7878283da9d870 + +Count = 243 +Adata = c821a8d4bab9d993c20dd206955304a55968e6db5ab6480d +Payload = d0628b2027f06c246497977d05f211b2c2e302d5b82700b5 +CT = 6f21febdd928707b797d4881bc9918de7fba920589084311adc2bb471862d25cfe25e66fedb8e28c + +Count = 244 +Adata = 68439bc9d176feeeb4119d00ed5449dfefb72b5a582bfd97 +Payload = 6cc9749f48c61050e421afa3a10ad3dd3aa02cc3f8586915 +CT = d38a0102b61e0c0ff9cb705f1861dab187f9bc13c9772ab1319a493abc947945f1312395ea98d937 + +Count = 245 +Adata = adb262c924942e4e1964e9d97c6a8c159fbf9bfedc5ff296 +Payload = 92d50736466e64e6225962e76bd90da824f716a3301a1a90 +CT = 2d9672abb8b678b93fb3bd1bd2b204c499ae86730135593421d0602d29447ba6b24a67509eaee1e8 + +Count = 246 +Adata = fc7b08707d3c3dac7689ec18088ee6502ef08d3ffbff38ed +Payload = 87c7ac031fd63e4c83280dce6b68a92dfafb6ea19388fa9f +CT = 3884d99ee10e22139ec2d232d203a04147a2fe71a2a7b93be52a2eeacb1f023e849161b6306b6cfa + +Count = 247 +Adata = fd43dfb66041b117f2ac54c94f7b6e2677860864d9494175 +Payload = 6b53c46266b2f4284d8fe7f0549c98977344d67e178e9a8e +CT = d410b1ff986ae8775065380cedf791fbce1d46ae26a1d92a0d8c5b1e96b21460e0b5414639abeb0b + +Count = 248 +Adata = ef1ad3eb0bde7d4728389da2255d1f8a66ecb72e6f2f1ac4 +Payload = 8e7d8a44244daa7df2b340993e32dac50e05d7b2e103be98 +CT = 313effd9da95b622ef599f658759d3a9b35c4762d02cfd3c1c97260d20797d374c595cbc2ff080bc + +Count = 249 +Adata = 9895b24d12b004b215583eac70a95f4fba7442164f35c57b +Payload = cec07df916ffb7a453d0eb588b7462096f22874bd5abf814 +CT = 71830864e827abfb4e3a34a4321f6b65d27b179be484bbb06cd287afcbdbc5531f11246080b22677 + +[Alen = 25] + +Key = 8544808e8fbf8c3a5e1d4ca751d4b603af9fe119eabc6923205815e0e748b7e7 +Nonce = b44a58724596b4d8dea827c1a0 + +Count = 250 +Adata = f5b2c88f5232c37273b1e66aa31cfa7201e33c21d60054d025 +Payload = 617d54fc6a23601c79e3984f93bfc2d151fde420863206b3 +CT = 57b3414db48982c6567265e1e0173bf38fdfaffe4461fbebc1411af83237c0f9eb0bfe8ed914da66 + +Count = 251 +Adata = 8fabe14dcb3aa2fd28281147c326e98ad699ca7997f03a105d +Payload = 337290d0b4ce1e87afc3cf01d6c98f8c17a4603120dcfcd1 +CT = 05bc85616a64fc5d805232afa56176aec9862befe28f01897ed6e23720b60ffe54bbb9f7ff371008 + +Count = 252 +Adata = cf193eb3d755cb8e06c5be2334b5c8b7a22b6524d46d547ba3 +Payload = 01ef7ac6470aa02ccd8c1712827e52699d05751b78e4c5a6 +CT = 37216f7799a042f6e21deabcf1d6ab4b43273ec5bab738feb6aa6b284e7720acbd027a50317f816a + +Count = 253 +Adata = b4cadb5f9cb66415c3a3b71421b926f147566a174160a0bcc0 +Payload = 64fb9322210fb7d8da8e762498b233b0eb172c91231c50cb +CT = 52358693ffa55502f51f8b8aeb1aca923535674fe14fad937058e9c0164ca079668097fde19e5302 + +Count = 254 +Adata = 48400d76ff882d6d5129c8674acc71f445356c9db9c91f8256 +Payload = 291aa463c4babc76b4a6faf2e27e9401586b1ac83e4b06a4 +CT = 1fd4b1d21a105eac9b37075c91d66d2386495116fc18fbfcf988611d5ce0f65b217bb4787bf59bbc + +Count = 255 +Adata = 749d369d837002ad33feb8aa22c3f68705eb4872e1b8f85a7f +Payload = 141cdd7f964a78815be144a785c6a2a298c54230e73039e2 +CT = 22d2c8ce48e09a5b7470b909f66e5b8046e709ee2563c4bad6251a5fd375a48583a6d0f8eb75cbb4 + +Count = 256 +Adata = 80214108b16d030feff6e056c9a07a00a1d5e3ebb07abd3f4a +Payload = fa2441cb7f9d072b8a3f1a496b2be6728a38b94a4f44c9be +CT = ccea547aa137e5f1a5aee7e718831f50541af2948d1734e6af1dab0f105414293cb130bea285fd6a + +Count = 257 +Adata = 8b9fabe29718a8f297c9bf6f199c80bbc71f94eb3034a11ecb +Payload = c8ce88ab40b62229223d46cc44f21bb39cfef27aa9fdccad +CT = fe009d1a9e1cc0f30dacbb62375ae29142dcb9a46bae31f51cc3f7640a42460be877fb7059a3ed61 + +Count = 258 +Adata = 8812f28a0cd5fdaa226fdd44ed857241007377057be3bea577 +Payload = cf59f75ca4d6d216cf8862b44b5192c382c140f862def117 +CT = f997e2ed7a7c30cce0199f1a38f96be15ce30b26a08d0c4fbbe0ddd2e7f4aa2024b3fec9281b6cac + +Count = 259 +Adata = c8f05e96d703a4850bae1421ae9ff3aec7531baf9b899dfd75 +Payload = 4eed58f381e500902ba5c56864f6249d191e14d1b1fad3dd +CT = 78234d425f4fe24a043438c6175eddbfc73c5f0f73a92e85e5df1e5e96bb84f730fcb253d468278f + +[Alen = 26] + +Key = e19eaddd9f1574447e7e6525f7fd67e3b42807e44fbb60e75d8c3e98abc18361 +Nonce = a8c459ce0223358826fb1ec0f0 + +Count = 260 +Adata = ef88f4393d6c1e7b7be55a12144209ee051bb779e440432721ef +Payload = b3b0de10b7c0996662f1b064e04e528b7d85ca1166985d33 +CT = d63e6082c95c6c5ff2bc0771321a4f883ef61cff7b99e0ea8a20a1abe7c842ebc08c8c81a2743c81 + +Count = 261 +Adata = a4c891c9dd1fcc982c35bc74cfe71651bae424602519672b466d +Payload = 4f0b40913f07269550b7b06ab9027a4d9331f8ef98a45dca +CT = 2a85fe03419bd3acc0fa077f6b56674ed0422e0185a5e013845e2d6de83ab729dd200a21088a1ec3 + +Count = 262 +Adata = 4db5730cb9794f3b1facc9d6738115d02ba9f27ba02330fbb856 +Payload = 841e032773d58bc72a3237bc9b24c61b9efdd850fc2ea605 +CT = e190bdb50d497efeba7f80a94970db18dd8e0ebee12f1bdc10ed272c732247a696a608ef67510f9c + +Count = 263 +Adata = 471a900ee49f2cfa1d3eb37c951d810c349364d4cc3b5b64fc47 +Payload = b4db42e523e65557157b93dc0281601f7997e6731543a914 +CT = d155fc775d7aa06e853624c9d0d57d1c3ae4309d084214cd15f0df52e392c37ec15f7458469dae84 + +Count = 264 +Adata = 7b40b3443d00a0348a060db109e8882157612c43084ac5c3e9c5 +Payload = 73e0ed35c0e847188e607cde46586eb9e237fbdc5d59163c +CT = 166e53a7be74b2211e2dcbcb940c73baa1442d324058abe5421433dafea2b5484ba87b5050e1fb49 + +Count = 265 +Adata = d563f5c048a1b45265182b99ca7b9004fdc73a9cb07806dd44fc +Payload = 4f7669caaedee961dbba6bde9d09fee1a20eee55baaf98f5 +CT = 2af8d758d0421c584bf7dccb4f5de3e2e17d38bba7ae252cdf91749fe3cd52a9431d9a847a8c2a9a + +Count = 266 +Adata = d301a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a +Payload = 154454fb74e9565c56775a8e4654f75a38b954dd28c4e939 +CT = 70caea690a75a365c63aed9b9400ea597bca823335c554e07563d37846f5185bb44d71be1ea6a73c + +Count = 267 +Adata = f74b48d168f77fbd3429728c0b168ecbd854264eaef70b74fffb +Payload = 716b371857e68a17b20ea06651cdcfd4560a741830ca8a13 +CT = 14e5898a297a7f2e224317738399d2d71579a2f62dcb37ca55e93bc2d3f05d7016747690fb920e12 + +Count = 268 +Adata = 3a257ce3592a8f88162f0bb4ecd5db3bb79b54ab17b0bbc61506 +Payload = cfdb7363985aa01af6f8e8237dbfb7871eb39303b4135269 +CT = aa55cdf1e6c6552366b55f36afebaa845dc045eda912efb01c46822f839f09c41b7aa6dc06035c93 + +Count = 269 +Adata = 21916ebeca9e66b77cf55d1cac80a4c85d8b6b014f268ffa73ca +Payload = b4b67ac551d1966caa20d951351387f384c2e5d81a76a92c +CT = d138c4572f4d63553a6d6e44e7479af0c7b13336077714f54f8e77600c5bbc6d028fa25ba61a1719 + +[Alen = 27] + +Key = 9498f02e50487cfbda1ce6459e241233bd4c4cb10281dcb51915dbc7fb6545c0 +Nonce = e3bd4bc3a60cddd26c20aa8636 + +Count = 270 +Adata = 70cfcb828d483216b46c3cd22e2f9ee879e9e3059b566179b6e16c +Payload = 0d16cc69caa9f19b88b05e151b3d26accd018ca4a5786a80 +CT = f1c4bedb8d6f91676881daa37656a7e6402f472735b04a0f1f8332f4236437737438e7aa1b5100c7 + +Count = 271 +Adata = e7e5779282db80f424dc050b2c1e7754b2a5d3a8beae77beb74e34 +Payload = 148de640f3c11591a6f8c5c48632c5fb79d3b7e1cef9159c +CT = e85f94f2b407756d46c94172eb5944b1f4fd7c625e3135138be2f6f356c2eb401468be15104e7763 + +Count = 272 +Adata = d17e8189a94a559b07be9549f73d653172740e8e978f5b0a38ad43 +Payload = 00a23b25bca7c206edd051814d81083db1cd00048ce8ead5 +CT = fc704997fb61a2fa0de1d53720ea89773ce3cb871c20ca5a9646f2b6c2455603f1a6f20ea5a4611a + +Count = 273 +Adata = fda37ff136895de7ebeaf81e701e5751245201baed2e13d7e1b591 +Payload = a89409b0977f60a029dc4c1560ba6dbe7c65b068633acf74 +CT = 54467b02d0b9005cc9edc8a30dd1ecf4f14b7bebf3f2effb303fa5d8321241b1c9e18a5909d6e428 + +Count = 274 +Adata = 9c179fd0d6277a5e073e77dd6abb4cba00ad9c9932e6c002b951c7 +Payload = e16c69861efc206e85aab1255e69d6d33c52cf058dec9d0b +CT = 1dbe1b34593a4092659b359333025799b17c04861d24bd849e8cb01db1da077502814db1610662ce + +Count = 275 +Adata = cf5703228e615428d3d3805e428e754961d205c5aa0297ecdea71d +Payload = 62036cbed3666d85624d3dc9c1f437454b9ab5c03ce0de92 +CT = 9ed11e0c94a00d79827cb97fac9fb60fc6b47e43ac28fe1d40a02a49857d7b280330b8105efac854 + +Count = 276 +Adata = bab7e36098d59d3a31d7784d549aebfc6938bbd0612c85c0edb796 +Payload = 790ac86c5e9d8ce8cbec1dfb7e4fc4dca3d0b1039adfe585 +CT = 85d8bade195bec142bdd994d132445962efe7a800a17c50a5ecfa9dd03e2db70aa212ee7dcb573fd + +Count = 277 +Adata = 96f0b7cd7439721d4c9cc4f69585f8c90a95bed8fea22150efffba +Payload = 3cfacd61ea3398de20ca6bdb00e81af482320614bdfb8642 +CT = c028bfd3adf5f822c0fbef6d6d839bbe0f1ccd972d33a6cde17a7a0cd162945a3616892e101e3e93 + +Count = 278 +Adata = ee71e53d0b4eef82575c2bd38d7bd21b41fabe58c6f571954fe159 +Payload = d75c153e34ae1c6d1fcf5b1052190d8882041e1f9c5490e2 +CT = 2b8e678c73687c91fffedfa63f728cc20f2ad59c0c9cb06d15fadc2d79841d230cd55c04379f22b4 + +Count = 279 +Adata = 18a4aa894861c7720ddb43809c3d2ed2af2f1bfe8f9fd4f872c14c +Payload = 0e728056c7c64214be8f1f1727408d8cca8c42e2ac7bf67e +CT = f2a0f2e4800022e85ebe9ba14a2b0cc647a289613cb3d6f1b229b9bae4634eea6b723f432e19ae55 + +[Alen = 28] + +Key = 3ac7d5bc4698c021e49a685cd71057e09821633957d1d59c3c30cbc3f2d1dbf8 +Nonce = 54c8ff5459702aac058bb3be04 + +Count = 280 +Adata = ecbd7091732e49c0f4bda2e63235ea43bbf8c8730f955f9c049dd1ec +Payload = 89198d3acc39b950f0d411119c478c60b2422ffe7e26e00b +CT = 7717b8e4447afcea1eeebf3e39ffdab2f52828e7931ef27e475acd27900478f09fec1f479ab3a7c8 + +Count = 281 +Adata = 9a04820205234795ecd540b6a0b2fbd0b19f18106c42f374a2b98425 +Payload = c0f61950f98110db4226e269cf197c7e2794c5b87ad68cf9 +CT = 3ef82c8e71c25561ac1c4c466aa12aac60fec2a197ee9e8cf7b7ed6e8ede6ef5a73b484bf13b3424 + +Count = 282 +Adata = 0e4dbd167da0240298f4795102ef18ff9a8772c6fd73b3374cdfa30a +Payload = 7960dbc9136880e2eea7956c3271adfe2aba7dca53da917d +CT = 876eee179b2bc558009d3b4397c9fb2c6dd07ad3bee28308e47d08ea0788f7ca0ecd846689c8027a + +Count = 283 +Adata = 2de4291068a5d290b599a73c6a8ecff4f9fd6c9cc48f14c233e18581 +Payload = 0c5d7055bbfbd2bc213cfbbafa763b71b1fde6f4de96fa59 +CT = f253458b33b89706cf0655955fce6da3f697e1ed33aee82cd081f66b1c7b70718dc50367c3da6792 + +Count = 284 +Adata = dedeb714f555575fcedbd9de8171484090e6466dd4fba3c6b7c42eae +Payload = b5654edcc8f09e4f80d0258c9376d7c53fb68f78d333b18b +CT = 4b6b7b0240b3dbf56eea8ba336ce811778dc88613e0ba3fece672883438da186741e6c542b3f805d + +Count = 285 +Adata = 03d340904ace1cd52d4b72a96d96afd77aee68ac3936415005ed0d56 +Payload = d796f3409a7eeb896c3d4ebef46e9c6e553aab28b1cc4a90 +CT = 2998c69e123dae338207e09151d6cabc1250ac315cf458e5cf58d4a5552bc8ed1b1dda46703a256e + +Count = 286 +Adata = c67f9aa8cf1be3b4377c30c175d33ab2af390982c6a015d99209acdd +Payload = e4dd279a79a381c68de777df941a4779e50a1381c8aa9122 +CT = 1ad31244f1e0c47c63ddd9f031a211aba260149825928357f95cf2b57e06de4d01bbb6c0e39f37e1 + +Count = 287 +Adata = fef1b2ccd661b9fac85ba005addebdf8317ab104920549d3a490a21a +Payload = bbf0c267d952aeb6f810601b9cf1962a92dcaba7273e6902 +CT = 45fef7b95111eb0c162ace343949c0f8d5b6acbeca067b777589cd12984286af98908db88920323c + +Count = 288 +Adata = 693fae7af84aa397f0b2baaed9b3c7953f75e7424c49b6349c2fc20f +Payload = e8b13a263e0c4fb5645e500e88ab8074ab7d92e5a8dac6aa +CT = 16bf0ff8b64f0a0f8a64fe212d13d6a6ec1795fc45e2d4dfee8fc441da990dd92c0caeac9d956699 + +Count = 289 +Adata = 85e5df4ddec99f0bea14b3338b2eb190ab6584f5253c6c2ee3064637 +Payload = 067de2869333ed22c7b63ed7eeba1301bbac69b0d430adb5 +CT = f873d7581b70a898298c90f84b0245d3fcc66ea93908bfc0d502f5434bea8c3c13ad5422ff90e218 + +[Alen = 29] + +Key = 948882c3667caa81c9b900996e3d591e6fcb3d08333eeb29911e9c6338710c17 +Nonce = 43b0aca2f0a9030f90559fa6d3 + +Count = 290 +Adata = a516ca8405e5c8854e667921b5c5e1968bdd052915b55ac9984b7eefb3 +Payload = 8b9130b0c3c15366831bbb19f377e3209a8dbf7619cd09bd +CT = 4646b2acdeb11174171da23999cd54e297daa32bbc13d30512e57c576b315f48c11877178389aaa0 + +Count = 291 +Adata = db3121ea71294983b185207a9d8de3e484a66c0431bf07c962eb82977c +Payload = 7f369bbc99b6f08049eeb43566269a174829d4dddb05cb9b +CT = b2e119a084c6b292dde8ad150c9c2dd5457ec8807edb112366775e693f93af6575dccc7903538065 + +Count = 292 +Adata = 1651cf38fd9b2da65ebb4922b97dcb861128eeefa060d6c1c94b25eb4e +Payload = fd0900b5fa72e2fba43d611bad25de40a3507a5cc5d186c7 +CT = 30de82a9e702a0e9303b783bc79f6982ae076601600f5c7fb70d8de40c2068de96a274d3b5086b5a + +Count = 293 +Adata = af87b347b59e37a424004a00907dcbcf6a554e6782a9be12cb3047625e +Payload = 36318d80c02a1da41ef1652d9a752e155526b5f597fba226 +CT = fbe60f9cdd5a5fb68af77c0df0cf99d75871a9a83225789ee7da096d2fb28f20f64a000fe93e96e2 + +Count = 294 +Adata = 0680d5bacefa2ab14aa12b0e517a1432862d4215dc72dc4d5ac6b96c1c +Payload = 7a29aa2994d11215ab3ef3382b3db6ed581164a235c4b1d1 +CT = b7fe283589a150073f38ea184187012f554678ff901a6b69b88748a2de31261534cdb2237565bf8a + +Count = 295 +Adata = 9af701f0a9de52309267289bd170fb97c03c131c0a169d736137ff3d74 +Payload = 3542fbe0f59a6d5f3abf619b7d58b199f7caff0205093f8b +CT = f89579fce8ea2f4daeb978bb17e2065bfa9de35fa0d7e5330c003eb65ceedc98ae4e38ef341ee47d + +Count = 296 +Adata = dab7845fb7ead205569475753c7e26540c09d3a74312f2de25181511f8 +Payload = 83c15520d9541c86b3dd809ede42de22bbb2b75ff18a023b +CT = 4e16d73cc4245e9427db99beb4f869e0b6e5ab025454d8835c2fb596d8ff6a863604cd224fa3be42 + +Count = 297 +Adata = a844d6dbd05545ecc736994dc9fc2260c5ab63ed6ffdc40b915f8744a1 +Payload = 793a188fa3efa32f41d6e4c5b42353b95024117d546c79ca +CT = b4ed9a93be9fe13dd5d0fde5de99e47b5d730d20f1b2a3722ac782e2cd8ecb06172eef2cb9b0e331 + +Count = 298 +Adata = f9112503884615c0e8a1d8414724b0d19298988f393a27c436b2b6734c +Payload = 6b237444fb0e1f4150701546c4cb24021c5edad30d9b31dd +CT = a6f4f658e67e5d53c4760c66ae7193c01109c68ea845eb65f814492b42571033f4dffc0282ea2f51 + +Count = 299 +Adata = d633a5a3defdde6a68f959ef39a91c6ea6e13ef1a7859d2c2c94d3a5b4 +Payload = 6342312e8a72f71f2e5afe04cfcde4d60a41556111752103 +CT = ae95b3329702b50dba5ce724a57753140716493cb4abfbbb75999099df2de6e436bd99f0341423f4 + +[Alen = 30] + +Key = 3bf52cc5ee86b9a0190f390a5c0366a560b557000dbe5115fd9ee11630a62769 +Nonce = f9fbd02f28ecc929d369182752 + +Count = 300 +Adata = ebf0b3e3199a5c3773c761c725c7600add5f9d8321c9f8e5e5fd1c7a5d2f +Payload = 094b538110495e938b08cf748a6bcf3e0c80ff9c66570237 +CT = 4d8b53016fc8bc9677184c0fa15bbd3d671b9366d82ecb67f8562eadcdcbcdbad1299bea1523f5d2 + +Count = 301 +Adata = a865b88d512e485ab3f2844c29e6dde0cf1151efa9ad3b3021d06fffb74b +Payload = 23edddd8732cdbf03af08162f0e4a24c9222bdbb4549c663 +CT = 672ddd580cad39f5c6e00219dbd4d04ff9b9d141fb300f3359ff77cf0962455b3539dbf91f3077cc + +Count = 302 +Adata = 16918dbc785d94a8f1720c5ad234dde860219874c9fb076a5c290903f85b +Payload = 1798286c37c1504fc0d7402681f6f70711ef506dcc3e29d0 +CT = 535828ec4840b24a3cc7c35daac685047a743c977247e0806dbed76d94c90595b49d50c84c3efc76 + +Count = 303 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732bf8e592e3d3884918 +Payload = 0d02778f90a164a4f9ada9dc7fd24eeb941069621418ef32 +CT = 49c2770fef2086a105bd2aa754e23ce8ff8b0598aa61266248fbe60c146056e5cb01268403e4b9f5 + +Count = 304 +Adata = 2de5222a0609f058f60e9e581b6e4f0ddebed84fc8302c8e985d17b89241 +Payload = b0c3858231e284af6d231f043b95772f5e7b16a34ffcd2ec +CT = f40385024e6366aa91339c7f10a5052c35e07a59f1851bbcacff35df1ec942b43eef5aef980cb038 + +Count = 305 +Adata = 3fc7453df038a92829dc103d44b63ad097d7cd7f9ae7996547012090c7c4 +Payload = 319f396cc02834f8e69d65f77496d0eb31ce1a7b7e324820 +CT = 755f39ecbfa9d6fd1a8de68c5fa6a2e85a557681c04b817091a93f5fc28e5f4f351cfb888da763dc + +Count = 306 +Adata = 18f1e92bd3c4a597ed970911d03a78ff9a6790147c9bb0ca5f23b70cce7a +Payload = 25550c03f8fa02b3781330f96e0fdc58681b0c0bc5e83fe9 +CT = 61950c83877be0b68403b382453fae5b038060f17b91f6b92c6a90ef2e9a969ec0576fae1d126a85 + +Count = 307 +Adata = 09ecb2406054716418ff3600c3c5cacb0845a377a2d80542abc36ec81bb1 +Payload = 210ff7975e08388b9a46eb732230e3a3856a497549b5eb49 +CT = 65cff7172189da8e66566808090091a0eef1258ff7cc221959fd6aeb047200907911621e8756b45f + +Count = 308 +Adata = 62d515bb0525b565a6a3613ae20343c8da7424c8368e8cad6a862b7d37a5 +Payload = 5d867265965bb2aafebb0691de9e157a24066d06fe3cbd7c +CT = 194672e5e9da50af02ab85eaf5ae67794f9d01fc4045742cc4db6d5fd910c83fd77aefba3f7665d8 + +Count = 309 +Adata = 00617ca141e55b045a188e4934caf6db63d4577f634db92c22010e1cbf1e +Payload = 396b27afd16a1081f37bbc1f742b549f5f68df799b93083f +CT = 7dab272faeebf2840f6b3f645f1b269c34f3b38325eac16fdf5f21f32cbe5d272004f1c104cbcae9 + +[Alen = 31] + +Key = e45bb1730d0d539aab3805350ac986540de9f0f6c239ee70395c291397b70309 +Nonce = d5c7824af715bb7822b6b340fe + +Count = 310 +Adata = 860f4a09ad8b3d345c2aa18ffb803f0bc3b734a4d047a1437701a5e3d95288 +Payload = bc8b3bc48c7a88c9fafde258b6ccaa9d4f0d018703d63871 +CT = 95f083ad6bbaee6ab540fe023858f8baf25e333fd3e89c00e678a392d228b210dc5c991905dacf3f + +Count = 311 +Adata = 8a84b57915bdbe7bf5a1c1a426512b3c178d883251cc46c95a8bbc8ed9e56b +Payload = 9499ea48edab9bc21b91dd614f04934ca20db8630622f481 +CT = bde252210a6bfd61542cc13bc190c16b1f5e8adbd61c50f010fbdd3b305522dae6b652322d89d9ac + +Count = 312 +Adata = ed8540f7ce451c522c1ff5d2d1030d7b3fbd1219a21aaa84044c4f23c08f5d +Payload = 73843a4e9e7937fed24bb1fae15822213b1aa86c07f1b5d1 +CT = 5aff822779b9515d9df6ada06fcc700686499ad4d7cf11a08b6b08548e794eaf85ad9f5de80b1c00 + +Count = 313 +Adata = 61bb196b212feab645f05a8aa1986f6210a384c15bc749245d840b3565fb36 +Payload = a8e24266e5981b2ed14213a29f961cbbf7f02f63a33c987e +CT = 8199fa0f02587d8d9eff0ff811024e9c4aa31ddb73023c0fcc73643a7ee9291e15137d7046a92f3f + +Count = 314 +Adata = a49c2df94ba65107f375ce1c53b72406143f6bcd270945de5b7811682fe361 +Payload = 3e3c402caeca41687d12897102e04312edf7b8c7d8567a22 +CT = 1747f845490a27cb32af952b8c74113550a48a7f0868de53204438662ea82f423a69c6e4e3c0623a + +Count = 315 +Adata = 7c48480e9bc87ba299e03899698b2259eef150ee0f2efff40a5583b80ab484 +Payload = cfa9292b9052ac6bb863205d3c0dc2d9e20d2ba6a680d2ed +CT = e6d291427792cac8f7de3c07b29990fe5f5e191e76be769c6ea00b9cd881e3f4b1e838dfa31f6560 + +Count = 316 +Adata = 5cf9744090366d828b477dc890eab8ebebd44f6aeaa5b101291bf67d12867e +Payload = e0fe4e139ab0deb4fdf2145b719f35c50b869e6cb20608b5 +CT = c985f67a7d70b817b24f0801ff0b67e2b6d5acd46238acc4c59b3b87d722a58cd1de58f3963d12b3 + +Count = 317 +Adata = 761d74be5fae170a1bdfa16081b44c1e49972e15ce0818df1390bf7204f619 +Payload = 665fdcdf55a1231e9912562eaa5a5011d69f6948e29e3f8f +CT = 4f2464b6b26145bdd6af4a7424ce02366bcc5bf032a09bfe158759886124f1f0ce8147c94f4e7114 + +Count = 318 +Adata = 9815353b69d0b4effa52cefff13703fa71a6296f9cca0f02568661be4b64cb +Payload = 7b2d52a5186d912cf6b83ace7740ceda3f5f443530c5a49f +CT = 5256eaccffadf78fb9052694f9d49cfd820c768de0fb00ee6310a79c9932456dbc00515b264f3168 + +Count = 319 +Adata = 69dd1a050c8d79dafbbe3403af4dc1f070b9b2b980888aa796e6cff68d9060 +Payload = 3cea5ff50167c5641066852fd00061df35b1f66bedb894b7 +CT = 1591e79ce6a7a3c75fdb99755e9433f888e2c4d33d8630c6da7e97f9984a7db3b93aefb4316d9acb + +[Alen = 32] + +Key = 2e6e34070caf1b8820ed39edfa83459abe1c15a1827f1c39f7ac316c4c27910f +Nonce = c49ccef869bb86d21932cb443b + +Count = 320 +Adata = d37e35d7cdccd9824a1ae4c787819735e4af798a3beb49d4705336d6496853ad +Payload = 771a7baa9cf83aa253349f6475d5e74dba4525307b022ba7 +CT = eebac2475004970071dfa2cfb855c4e78b1add8dcbccfc0bd6b14027324b657a56263df148665393 + +Count = 321 +Adata = ab22bc22bf2628b0e0ab245c3db2fc5128d13a011c2cc9b9fea05a79a3410704 +Payload = dad95a4b4d3754613f0542caa62cfe4e375dfbdd369ec32e +CT = 4379e3a681cbf9c31dee7f616bacdde40602036086501482a8c810b6944815fd2e434193520b1d5b + +Count = 322 +Adata = c48c5aacf701137fc40fd0d3649641aaa5be427ceee702cf7ddf6408f458a581 +Payload = 3f28df9263e473be648fabad163aa4142b633388b16d8392 +CT = a688667faf18de1c46649606dbba87be1a3ccb3501a3543e8aa447b79284c588bef50b423de97908 + +Count = 323 +Adata = 477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2 +Payload = f83107b50a1f192ed45cc43fa80e6b519bfd859173ea9ee9 +CT = 6191be58c6e3b48cf6b7f994658e48fbaaa27d2cc3244945d4f4a413eb3ac2c474134995d4db9a16 + +Count = 324 +Adata = 143bc037f1d0bd4ec16825c58cb3796bf8989200d27bda9beabbbc49247f59f7 +Payload = dfeb324ba459ec4a5c54d2534e98002412e67db19cfc66bb +CT = 464b8ba668a541e87ebfeff88318238e23b9850c2c32b11756a3fb2e06734b28fbd57942a609d914 + +Count = 325 +Adata = ffc416f1dae4e43c1a01339a604c44d6a0f25ab9ca3978c6aacb6d270d510ee6 +Payload = 0765949e6f22c422ebd47dc1ed73f1b849d7a058a1656fc2 +CT = 9ec52d73a3de6980c93f406a20f3d212788858e511abb86edb94280d3c4a1cd8cb00705f60ae36f2 + +Count = 326 +Adata = 6090b596b4082ec6926576137f6561cf13916860ad1cfc43650d1b5142a12041 +Payload = 6db320cbe76bc5b8cee9ef89aca11765571c6c501993195a +CT = f41399262b97681aec02d222612134cf664394eda95dcef612caca26cc3bbb289da3be0616b3445f + +Count = 327 +Adata = 178ba75adb7c5bea6769270bb3b4f6ce208d4a786913d3ced7bb4090b5f65544 +Payload = 0875020959ed969cfb38636d1d5aabce9658b00171a7614e +CT = 91d5bbe495113b3ed9d35ec6d0da8864a70748bcc169b6e26cc8c665289d907628eb0e299c2d411e + +Count = 328 +Adata = 90f0474dca998916075b1b1428df14d90be05491bb8d5d88e32e65ec890ba9d3 +Payload = 4f89ca6ad371f86a6e073ec12fb1b928bb10d6639233b918 +CT = d62973871f8d55c84cec036ae2319a828a4f2ede22fd6eb4f7e481607a2a0529f9cda1d5903325b7 + +Count = 329 +Adata = 5ad8dd40ecdce52d5b30424ca0bccb666f34f66b0c9a4c1260051ac04ca06aab +Payload = fe2009d0a4a1711b83057b948cd0b174a3a042fd97579ab8 +CT = 6780b03d685ddcb9a1ee463f415092de92ffba4027994d140a1b9ba2bfe5bf778b859f0ff0c29a67 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT128.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT128.rsp new file mode 100644 index 0000000000..b796541cf5 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT128.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = c0425ed20cd28fda67a2bcc0ab342a49 + +Count = 0 +Nonce = 37667f334dce90 +Adata = 0b3e8d9785c74c8f41ea257d4d87495ffbbb335542b12e0d62bb177ec7a164d9 +Payload = 4f065a23eeca6b18d118e1de4d7e5ca1a7c0e556d786d407 +CT = 768fccdf4898bca099e33c3d40565497dec22dd6e33dcf4384d71be8565c21a455db45816da8158c + +Count = 1 +Nonce = f7a5098b2a4d92 +Adata = bc498326755503ff25d02805eb3517221b54eb4fd79af0fcdf9312b2a9ad95f7 +Payload = 3e2144e2a381b718962a77e167778bf579957a8fae29612c +CT = 98ce91033fabaa8fe853d347be6cbe5de102fdccf042e7be697b41c9a69acaf8386140ee6e36f406 + +Count = 2 +Nonce = 732d2dd64b4a25 +Adata = 495b03df82e317e4f351c5323d17c673f4c77856983179d7c7cb75c2b0573c72 +Payload = 4bb0d170bdcc70fd18f19605cf9c6181082c4367f1e6fbce +CT = 9bd9304259962448fa8487bc15d950303621213afd88f1e32d442ff663242fa269c4a742a220edc5 + +Count = 3 +Nonce = fefd3ac595428f +Adata = 91ffb6be8e129cef9189f7e0fec8e937afcfc6083b6a79a778a724bb3e8d0794 +Payload = 9e8c4f1292e8d7e5179b34ae5d2ba2491d7754acc54bb91d +CT = a5d012b3062cc93b831860d76539169c88854b85550c67fc564a2f1cb7d77e0223287740d5ff9003 + +Count = 4 +Nonce = e14d81ee3b873a +Adata = ecdc5249ceb48e8d5a4483043921c00c1acb1843fae00155a28f3a127150b1c4 +Payload = f99e23288e6b5ae85c14610994d90d5fcbcab62b4ed1333e +CT = cc4ee711d0202deb58664e00cf0cf70b737f48ddadcefd6cd217fb611daeb66fa2d8e1bd43cb2131 + +Count = 5 +Nonce = 2cbeaba94dbbd1 +Adata = d129674c6c91c1c89f4408139afe187026b8114893d0f172f16469b183fee97e +Payload = 1b42cb685bd462fbd40e0273a81c767aa81cb43f17d3c0c9 +CT = 1a1b1c7130aa63098dea17ffbb2216d1d276cb10145b0762a45116736e95d823e579d73dc31dc487 + +Count = 6 +Nonce = 8a961df9c23f6d +Adata = 07185502bf6d275c84e3ac4f5f77c3d4b30d8e106603be84410c11849a3c18ea +Payload = 434e182d04ecda519a6119fbaa4c45e8c9803a9a3eb51dae +CT = 3f603939c6226d8208b2b0e675b82557609ceaeeee4032c7837ed517dbd7e6fe34ea42b01c69d370 + +Count = 7 +Nonce = d3604d390faab3 +Adata = c95e7329d36145664da69d25f24b301d334e1bca2baa74b2d5c325ed7d04fae4 +Payload = ee104be898a225eb1da99163bbf768d8ae6d5850af6f8767 +CT = 3e6a7683d9d804f791f77d2b69996102ba82477ec4557747ef2e0b322f51abb366a1e8e37f4fe4ee + +Count = 8 +Nonce = db5004a1cdae8e +Adata = 1370fc9d5bf1ad2d071be5a28b235402a85270f536b5601c221519a3b329c71a +Payload = 59bee7d18fd4ba573f3e4f61076f5b9f6a3487e47d98c729 +CT = 6db54d6f5c3f3efa6da67aea1234d46e8b679a5c257c66d82e4ef944778281ed186b4a8099b47fff + +Count = 9 +Nonce = 783477f981ef05 +Adata = 04bbf2a826bdf3d55069b1936c4f8e8e08189f54066a035c950c7347604b1b65 +Payload = 6150f132b25727ebbaed9f16bd91ebce00c68e5b39bc0ef9 +CT = 36f78cef22cacaf9f3d4464821737f7fbacd79be517b4727bc5c098625c51ac7fdd15da2cc9ef4b6 + +[Nlen = 8] + +Key = 0b6256bd328a4cda2510d527c0f73ed4 + +Count = 10 +Nonce = 21fd9011d6d9484a +Adata = 66ff35c4f86ad7755b149e14e299034763023e7384f4af8c35277d2c7e1a7de2 +Payload = 78a292662b8e05abc2d44fbefd0840795e7493028015d9f2 +CT = 5a0be834c57b59d47a4590d8d19a1206d3c06e937a9b57f74034d9fdb43c3f48932aa72177b23bf6 + +Count = 11 +Nonce = 97f940d7c1230bd8 +Adata = 78337ddfe38be7897372b0f805603a9a9e55598452285764641c3bb7aeb54a3c +Payload = 772aeff60eb3adf5a9589ad54dda0401cc9765589609dbd3 +CT = ef5c408dc6d0b501925a47def54d8deb9880a07a3e6380bca20a3995cf25c5a7b9477d8916adff73 + +Count = 12 +Nonce = acfdf302ed116ac4 +Adata = fe9d9989bffae3c9e6161eb0aa9d54ee8f5051f0dcabb5a750c5478c11798ce1 +Payload = 99ffe16de323a9b65fe60305a2d062cae490ccca6d9fe9da +CT = 1bbc2c7877d845591660636cb6ccf4edcd4c156996a26a707d0e2fe322f203c08f44d7f9bd7258c3 + +Count = 13 +Nonce = c8d36e13b7459c47 +Adata = 3f3c3a4c26dba18f385274ac5ac3df73282686488d91bc8190b7f61071b07f62 +Payload = 316ee95430329f706348886b8ac7779e3056809e25da0a03 +CT = fd2db9611a26a3e90f4861467df60edcc595f442332b089905fdd72307c3355b19ea66d4a16ef17d + +Count = 14 +Nonce = 5822755a3e47c27d +Adata = 1d72d6b371e85ca359483761704f80b3360f4d6610e6d5e490b0d509f73c3233 +Payload = af4ae8f19cf6cbd199677fe033859f56906f1979b1b5926d +CT = d5ed6f8d5c42f4f3ea527094173b278724a2ba787e416ad759124db19ab1373a5376f46ec7095ef4 + +Count = 15 +Nonce = 6c1c94c2e71b865b +Adata = 298cac1e4684182786f386ef3de79c11e30b2dab7579b8ca18d0312200860403 +Payload = 6e4d992d7541e02a4aa167e56c7e47206abc25fea6c5125d +CT = 560cd43a502a6e8b1af478a3b640a68937d1a83057110d38eaa52d69ab9790edc384b9a5d8c91dbf + +Count = 16 +Nonce = ce7ec65cfeda31da +Adata = 13c1298cbf7fe6a9ab378f86d3c2207944cc2a232f9383513ceb3b202086d365 +Payload = 196c80d02b663bdd89fdaa31e329b5a8f7c596236ee8dd80 +CT = 00174dd83a7f8edc71afbe5da095160336be9184f693db3db1f45de395e021c6fb1b2991c91bd643 + +Count = 17 +Nonce = ddb739acda6c56ec +Adata = 7f89bbe513b9a7ebe9be3f6eb88782080593c83e8cbe47fbe15bdc3e5782090f +Payload = e95e142217c838d1f998a52e342e4f2d80b1cfd35cf6b73d +CT = 819d73dadaf095652cf39729b2e2cad7fc7783887a5acc15713d941b845d96a5bf65e9f80ae7f923 + +Count = 18 +Nonce = d9bb71ad90152d5c +Adata = 20bfcba120cdbeb07c5f4d70338ffce493822d78a03c9e80b5b934e16e39f70e +Payload = f1fe98b50ea2f9f088f6f93910757cf744d5aabf3081966d +CT = 36decda8ade6ab104a201c6d370412b907a559738eef59665e99761cb1ac77d772b9cce9345d9a75 + +Count = 19 +Nonce = 2c9ec9f1f1358c50 +Adata = 96f0b1edec4ad14407dcaf30ed68942b46c48d58b2dd63af60fccd5bdd48e560 +Payload = d74badb8ad7f2c2bcdf67e497151d35a4fc2a3c4c871868a +CT = 0e9066270da6e03cb4307c43adc71b4b596213a63fc8032085ce60506ac3bd97327904ad2e072a6a + +[Nlen = 9] + +Key = afdccc84f257cb768b7ad735edbd1990 + +Count = 20 +Nonce = b7776aa998f4d1189b +Adata = 9f9ac464de508b98e789243fdb32db458538f8a291ed93ddf8aeaacfbfc371aa +Payload = 56d0942490e546798f30d3c60ad4e3e110fc04f5b1c1fa83 +CT = 96f124c74fd737819008ddef440320f4a3733d0062c83c893e259aecf12ba08f2a2e966a3341d6d4 + +Count = 21 +Nonce = 278cf1f09b13f467fe +Adata = af9627922758a9f7792345716782e8837ca78e8f9db16e3fe12a7124a3d4e99d +Payload = aa9b9e80cef47b6db3816b1d665f233e696337e21bb8333a +CT = 5eba7e3b3ecab78121b0d56acb9dbfc6756c1255b42f145d11751638ed36c1fd3c7268b71633c1cf + +Count = 22 +Nonce = 4ae701103c63deca5b +Adata = 5872a1507c833c581ac2750b2b54add4b92be14e45d72db7679f8fa2b4d1eeeb +Payload = e832b053854fbd40c0d8b6d6b8fd5de2da0c173f5fe594ef +CT = 3b2b964c3a90d51c0ace186db79818b4d0f7b81236d36017d3635aa1d8167087600b01643b0a5ce5 + +Count = 23 +Nonce = cfb5b12928e1c36849 +Adata = febe755bb8e4475d8d12f5e96269abd0d4e40d73cb966e2c523343e9a6d2d71a +Payload = f46d6970dcc37d32d93ff062e68034c1906ee487fd28eefa +CT = 0d5332a42fc583f4f81744b899cdf2a64cad1e78d577112fee6f8c4b252e10b42fbaf8c7af1e9f3e + +Count = 24 +Nonce = 68d5863cafc69e6ceb +Adata = 048ba28abb191ded5449dfe9dc7d19f9b132a2a9fd779aab7da44d2887485954 +Payload = dd4438d7ba3edc73872e42dbbf78cf300fe4bf0eac9e16b6 +CT = 874d3ef7f916db2c2799b6892ef4bfbeb4729ecbf26ac4983a8639f21f8548fae45dc76de57bcee0 + +Count = 25 +Nonce = ea09fbe5da0fa4fe91 +Adata = 63ee18eb720b21ee4c157dafcb8c7bcc6817f54d5c1b8dd7058c37228a03f8ad +Payload = c1811d613bf0789beeef693611ef733cd173da703b66ab3c +CT = cbe5c799952b28fadf414607a6cf8194e9f41194abace4541d3853a52971b0ab46cc0a3eded435c1 + +Count = 26 +Nonce = 0021be18ed76b3a34c +Adata = bb5eded483f0ae1106fd08c5e2b91cf06d3a7a73518ad4c479fb05e631ba5399 +Payload = 2d5531d1c51c6ea100b028596bf9f24dd90be14eab58f07b +CT = 7af0449f7359b7f3e5f6c1e7bc264c7724037f4f16077fd0a2a8e3cfb827c7e6edabb34f7bbafd01 + +Count = 27 +Nonce = 449b51ee0760179e35 +Adata = e99bdf783070a3a48431704e90277ca65a9704c12eeae2e2d70b62f816115267 +Payload = c4896d58442877c986e4f862a9f3a3179f0e9b96316a90d8 +CT = af7531c073df01077fd5c8ea9a5530c2fe1688d529e5c2f24aa8feae6a500919a336dbba1d9fb7e9 + +Count = 28 +Nonce = 232114642e0c6b55b5 +Adata = da288d2014616f16a2abf5923dea49aded1748592adbcd97415c33ebfa57150d +Payload = 11fd3f94b5a5ce94f2740a27a0771aeeac77f3155d2bc12c +CT = f0c174a7927da0bb88e92917af8ae1df4ffc3527004e9e2d0b25cea7ed6e4fe9069a2ce49875230d + +Count = 29 +Nonce = 660cb6d654afcbdab4 +Adata = bd96c3c225099fc58cc1f97779304606b11efe9712fba13abf74fc1d7d44a900 +Payload = 793c0bc3deb6e0bec4c1d1fc17e455eb1aa5e9e25cada861 +CT = fa4b14a381ee41fec7b7279e58f0d06a3beec26d645f81336218635754d5563f2cd48bdbb267e5ca + +[Nlen = 10] + +Key = 6ccb68d3838d4ddf660b9cd904cad40f + +Count = 30 +Nonce = c4fb7519a19f13d9d1fc +Adata = 092e64fef08b5655a86cdb8de63ffaa7772e8730844e9016141af8bad2216246 +Payload = 5ea35c082e2b190e9d98e6b2daad8672f587b4f2968072fc +CT = cda5fe3d15d00150b99120c7f206b88a4c2c4a39ca9143425603ab284a73a38cc916f8b653c92ab4 + +Count = 31 +Nonce = 45927852550961f1ae9e +Adata = 53ae030474795ffda4d9ac0fc3c45afb592ddd761f7b5335c13a6747e21075a7 +Payload = 6c5f468077536b4c9a94ea4a6fe3cf621083a210daee45b6 +CT = 694847b6429cbc3902d9cb7049625aef1e97b569e1e3169035bb811491d142cf1b26350f8451bd14 + +Count = 32 +Nonce = d8c54463dfcf02d0e327 +Adata = ff95c0ed0da32d1b5f57570b815a50592ecdc9c1c4e727e0f6dfd93fc10ce88d +Payload = 7321a6de8d694ea05623206f5df438c5c2cdd6b1eccab4d8 +CT = 9cf8ef119aa5cf3d6305d50b2b520a0b10bcd240e27276749c68e8e641b0120f7dd66e8f0cfa4205 + +Count = 33 +Nonce = f690f3a996928275050b +Adata = 41c05fda535770699ed22cef253753b658437f833afe65c9c393581d835f0fea +Payload = 56520a4bfd7b73a471e0446f9524a407e81c2681b7329e35 +CT = 14aa15f9f64c4c64f6e88094e012ecb24193249f044c033dda44a62f97c0fead3f65b28928bfbcc3 + +Count = 34 +Nonce = 26eb9ef25be62148fa61 +Adata = 8f45608a07521de86ed5a84a851e629b579b51d7bf4cc7202a773e0f9e9d8748 +Payload = c68094c26c7f017b79f126dc26b3bbcb95f97535ca412da5 +CT = 7ba8a0c2fe2b230768d1c1874085ddff8926931961bc4558f0d5444466bcc631bef8e58fe5818af7 + +Count = 35 +Nonce = fad21bc27dabafe7a4ae +Adata = dc5d7fd97bb3243ba585fa0d71a07191667af418e30a6b76bedd05b32c673403 +Payload = c247fa8d8091cd3f299cdacba7fb7af93549e9e3160f9cf8 +CT = 3097d2ec0f8bf00b22504ab03a75e740d3e59c269c3ee3f00b5419293a67eb008aef0f9f675201df + +Count = 36 +Nonce = c911348848fe67406dea +Adata = 50d50a0b5ed4d6904ec3045263af0255a6494b7a7e2e95ea806c4bb788423dc1 +Payload = d846c170ae0111348362901503b26d58f5efc17b6d296aba +CT = 5d72562f7dfb47bf34b90ee4ea11ff9f726c915b07f4d843dec5a554f4bbecbf6943ffdab8d8a26a + +Count = 37 +Nonce = bb921b46a16d20ae4046 +Adata = 7d17f8f60ad1e61a168b5b0e7fbbc90cee79b612b6d6c0d7ff6ede042341e8a1 +Payload = 71bb6ae84262646c9be95e0f4289ffeab7555ec6746c6ae9 +CT = bac123320888b553666249756e6d63b3498760791cbe9e34e5b1162b7489a59a50c0f0f3618e6c2e + +Count = 38 +Nonce = 61a8b8cbfc9bdbadb2a3 +Adata = 51cf2a8949e13eaa087a34c9ec4d7fd92b862efd6a0b1fef8b016fa2c6933426 +Payload = 362f9a46aab59fb6213c83d791b2129b34367ac2de2048fb +CT = b8a57e8714d8789f4ef2af29e0efec21b1ef67fdabc7cdf0ed5505f1f0ff77723771338585c456b7 + +Count = 39 +Nonce = 6bc4cd23c32a913998a7 +Adata = 92fbc970b5e64198ce2a138de92767edff8d82f12f8832444b346d159657356b +Payload = fa442383da234cf8f0c5fb667218bc3bea0c091b3a8e6b77 +CT = cdfe3e83aba43a9804c5a1832e0e47a9a153359cc32db907714025f485c7f40256049f16f859b859 + +[Nlen = 11] + +Key = e6ab9e70a4fb51b01c2e262233e64c0d + +Count = 40 +Nonce = 74e689eb5af9441dd690a6 +Adata = 42f6518ee0fbe42f28e13b4bb2eb60517b37c9744394d9143393a879c3e107c7 +Payload = ba15916733550d7aa82b2f6b117cd3f54c83ddc16cd0288a +CT = dcc151443288f35d39ed8fae6f0ce1d1eb656f4f7fd65c0b16f322ce85d7c54e71ac560fd4da9651 + +Count = 41 +Nonce = eb118fb41284bfcb1bc338 +Adata = b5a6067fbac46578cfc8d3fe04108588c9de077eb009249374f205553bba9d02 +Payload = 863da00c7accf45418d47c1eda72338734dcc49cd599f328 +CT = d64de7a56146b971e21bf5784d67bab32dd837cfb81591da4a0177883346dc896eb39e8a32bc1393 + +Count = 42 +Nonce = caba2716d07e95de83855e +Adata = 0e0ff2c73ea5fa8f8726a3514cf906ce1610a1a6dc19b22682f9e4619f762d82 +Payload = 2af6d5636ab65db2058b2ba16df257369fc4e8aef8b9481c +CT = 3c9e006c7d8eff5f448b0cc9c27c964713241aa7fed3665d775ea25fb272981de8b8aa0a637498fb + +Count = 43 +Nonce = 314c136999e41d137bd7ba +Adata = 366c659bc45d0a88acd54ef7eeaa3e140e1cafb1b01474a065a9d460c5e83bfd +Payload = 217b19ea6a431a1f66bd9d02b718e8507a08ab8e6f603e3f +CT = 33d7b672b23e8b03a39ff3fd1e7b0f2be67163e3e3bae072f2aaa211dec623947a50b1252bc5aad3 + +Count = 44 +Nonce = 6fe51f5013f53d4e4fd907 +Adata = ff182f2e179d790e827cbfd0bd8b9297ecae57ffcef9e25ef114474a22e4ec5b +Payload = c6bf582b49dd4ab6cb33f3f88e8a4d14fe32b308ee3b4682 +CT = 26cd5dc5eac2acda283ca03354260ad57af79e20c5e92f5775ed171bb0fbaa6f431c5411cf9b536d + +Count = 45 +Nonce = 24bc8dc1e2354667b79ba4 +Adata = d0d48d01fc79685c6bee04d45e40d06cdf1f4607542b1ece556fc2d1bb2b03f1 +Payload = 90f52ebb1bd5439386faeaa194623285f750672a7baae64b +CT = a7f43f56c50705a1a101044b954414fdfbe32b518e934d38f391749ea3acd624c01e4583ab1506b7 + +Count = 46 +Nonce = 89ce46b3de3afaf2518d41 +Adata = 5767202c913584d653f37d926a0c5ac1c67db3efd1dc58fbff998778a6856254 +Payload = b2ab379a0dd15baf91415eee3a4e56e7eca54d4c1c3094f8 +CT = 9f530e455a54b86835eacd8801b34c884a3b2ac819ba38f894e43a6b1cf73cb2d6a1dd8331549520 + +Count = 47 +Nonce = d3208eb695e84c7a925037 +Adata = 91d8fa65a6885f162a795afe2898f391990a8b3a87c11f94734dcbddf5f58da8 +Payload = f15e39f0e4eaa5bf81359d8e30186522f1a1a415436668cf +CT = 7f1d9fcd9e5cce3a81e3495bfecec817fd7180d8bbfe0abab27fb6425fcc3537ce471425a5b17dcf + +Count = 48 +Nonce = 067de2869333ed22c7b63e +Adata = c31e441fd551b3fdfbe23ceec5ec1f838f31a5300f6055ad2a936a9d0c1c856e +Payload = 1536d9c9a09302d142c85638202f5bbf0c287f68115d51d8 +CT = b1a5c7a7fd23228dc7ea26885802daa0719f6a23681e1d65dfb879c21b46f3307ef22f1da579303f + +Count = 49 +Nonce = 15f61b4526d19bceae1093 +Adata = b97b122af73e928e617e98684f845be4cb80566345739b7a884c6a3eec5102bf +Payload = 37c81988c07a5b01e2b40ff9f9ada5f50ca764efb717ff9e +CT = 0d93a5c77482d573b7f1b8c5e283f2571efc9f54216a4c01900504a73c8817ff2b55618b2602bf38 + +[Nlen = 12] + +Key = 005e8f4d8e0cbf4e1ceeb5d87a275848 + +Count = 50 +Nonce = 0ec3ac452b547b9062aac8fa +Adata = 2f1821aa57e5278ffd33c17d46615b77363149dbc98470413f6543a6b749f2ca +Payload = b6f345204526439daf84998f380dcfb4b4167c959c04ff65 +CT = 9575e16f35da3c88a19c26a7b762044f4d7bbbafeff05d754829e2a7752fa3a14890972884b511d8 + +Count = 51 +Nonce = 472711261a9262bef077c0b7 +Adata = 17c87889a2652636bcf712d111c86b9d68d64d18d531928030a5ec97c59931a4 +Payload = 9d63df773b3799e361c5328d44bbb12f4154747ecf7cc667 +CT = 53323b82d7a754d82cebf0d4bc930ef06d11e162c5c027c4715a641834bbb75bb6572ca5a45c3183 + +Count = 52 +Nonce = 6a7b80b6738ff0a23ad58fb2 +Adata = 26c12e5cdfe225a5be56d7a8aaf9fd4eb327d2f29c2ebc7396022f884f33ce54 +Payload = ba1978d58492c7f827cafef87d00f1a137f3f05a2dedb14d +CT = aa1d9eacabdcdd0f54681653ac44042a3dd47e338d15604e86a0e926daf21d17b359253d0d5d5d00 + +Count = 53 +Nonce = d8e133e7ff8e0a0ec6c4096e +Adata = ef9e432c15d8c93a4b5c0666608e61c824cd466d7940d642acd3dc33057c0395 +Payload = 2836de99c0f641cd55e89f5af76638947b8227377ef88bfb +CT = 5edb056d85dafeaaf74bdf4caa47339d6a75bf1ee998565e9f9cdf6ab825f6e026f5be2ad895033e + +Count = 54 +Nonce = 2fa8120398d1a946f391367c +Adata = 377cd407ad28dc02bd3835a31d92f8295c9dbe597f56662ceda112c588dc73a5 +Payload = 7a37255b682766a0bfecf78e5162528885a339174c2a4932 +CT = 701f5f506fc7e9ea4a27a4db5cb890f7be3b4f6bcb20f97ed3021f6ad620648b8196ab1693710398 + +Count = 55 +Nonce = 8d638ef43f56dece910139e9 +Adata = 87ea7b095388de70ac0ed23e86f502400910028a8ab5e3bbb91d05821c0d2d61 +Payload = 7370d9b453936955b9c9d336f4b283237986232de007bf41 +CT = be2f03f6ce1731418a5f53b6f6e467b73992a0c8102d8ffc2d236162688096d80b8733d2afbcd244 + +Count = 56 +Nonce = f479ea8812b6b2f6ac78fe9d +Adata = 20c2b8f5d3a65a66ba8a25e2ee339a779a32d45f5db91077efae6cf308feef50 +Payload = 59ff9f7581a781808d36fed378080963f35c00ea5a6e3932 +CT = d127c956349c16e2186f55b72254c677f03c61f1c4ada9e661bb9415b32d6a58f5f7647ed41de685 + +Count = 57 +Nonce = 423515f7bd592d6a7a240866 +Adata = 19eef6f798fc68086aad1cda6d7976cdcfe6b8af74598032972c939db300d8c1 +Payload = 3c379f90b11c622a765756a15efc8fc3ca7b08b3281945f5 +CT = 15792e01fc17f5294c3405484291082c00a8f46dd9af8ca230ba95c4058501234a1b97543c998e9d + +Count = 58 +Nonce = c3f3da69e13c5733039744b1 +Adata = eedf00aab5edefdd6549d37ed44358e11c588c24f141dc5731303fe0bd56b11e +Payload = 9db6fe9adb8c0fee87cac9a7f01a7ed8a84f0512d09b1834 +CT = 9b6b829ca1dc4e90d4402188632ea3377cbec2ba60f0f072afca1b08b6dd589a17a32d49b6f7135b + +Count = 59 +Nonce = 0a57d59f21ead5b6d80cd2ce +Adata = de5f2d413c98c6ea2a5640a7b1c424aebe75cbc78b06710b5bff8bec6afb5a76 +Payload = 0b5f6389f7c20f4ba326e8f05d373ca27b7ebe59e6d729f0 +CT = 0b704e14bc7d2977d89e0b2e7ed7fe3c9e0f2ea80d2d6165f344f2f1b2218d9b4283fe640a6d315b + +[Nlen = 13] + +Key = ac87fef3b76e725d66d905625a387e82 + +Count = 60 +Nonce = 61bf06b9fa5a450d094f3ddcb5 +Adata = 0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd +Payload = 959403e0771c21a416bd03f3898390e90d0a0899f69f9552 +CT = cabf8aa613d5357aa3e70173d43f1f202b628a61d18e8b572eb66bb8213a515aa61e5f0945cd57f4 + +Count = 61 +Nonce = 2a27257bfaadf23a87df082c57 +Adata = 0001dc666c9daf3560daeaf514270db0b5075d295068e6caf231c1de0e1a9300 +Payload = 6cbbfa6d736fbcc4cf73ab4d7be537420e0e574ee1f2d1b5 +CT = 72d525e6bb312bf2c20b91f41108779789c25720797ebffa4cd9d735f51430275387c565cf1a69bc + +Count = 62 +Nonce = b94ac8ed14895c80a91fda8367 +Adata = e1eaf35fb266f243a3fa407cd41815ae6432ad79877bfa59d8f196cbf19bfbb2 +Payload = e6ec561496ce18d96b26d594a47ffad02d68ef25d2d2edb9 +CT = c63500445239bbdf71a8dfe3f8c01061d659cfeb038b825dc89fb5f507f5aeefaa9365f0b18dcb3c + +Count = 63 +Nonce = bbae10aa491ac9c668a3ba8d7a +Adata = 981fc31e64fbad244ba1ef0303ba1e4beef5bacca74f60ffdb9142a25a1ad5a3 +Payload = b9bec3e2adc83620772048d6cbfb6f78e4fad74d754ffbbb +CT = 9c629c375f014e162895cfc25a972c29839f97407e7c7cca83d0a61d453d596fbc5c2e315d9780bf + +Count = 64 +Nonce = e0b10e78e9fb41ee970143e9e3 +Adata = 399b71ecb41f4590abda79045cdf6495f27daaa559c1b34f513b5c4ac105ec10 +Payload = 4b81804d777a59b6a107cf3c99c9d1a35bd8e4ed36596789 +CT = 867799b30558697d6efb4afcfe458cfad8da21139a0b43128e8f8e13b7896b244d0c9aa52ed31a95 + +Count = 65 +Nonce = 17b61109f5e37754e4e92a28d7 +Adata = 0bc2fdd890c19882640f8d4188b88b9db99cc1934cc3e98a5df08589287968a6 +Payload = 347c1eb4aff917bc0012f005e74caadc93f4f18f2b614ece +CT = ee19f3120991b67b2389e6f36543d99590f2e6d785c9c8ecc40eb85585cc3b7520a940a4e993327d + +Count = 66 +Nonce = db3ca9e80ab761804349379961 +Adata = ce01369d08d37dcda2c899c9fc0d11ccf94a0051b2816a1d6c3ad07fc8dd02d7 +Payload = f0e1af1276d2918be91a191814660bfe735463d3983de1ed +CT = 0f1b1228729b181772d7cf55ad257fbcb19cd46f7b31a885401358c7b44aea27617b429583103a1a + +Count = 67 +Nonce = 1f57959cecbd377374477e33b3 +Adata = de1c7c83ac61e1f99ae99b198f4af5d24f8de60ea98fe637f3a801fab38b2a4b +Payload = 42a42b84df098ceb43519c4cb86c14c2fafca39346159e13 +CT = 12425453de653d0fe8103013fde1ebf4a8fe18f76f0c9d60e93525fe8048c3b2147a149f12eaecd3 + +Count = 68 +Nonce = c9db03e2efbab713b0b6404210 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732bf8e592e3d3884918696a +Payload = d633a5a3defdde6a68f959ef39a91c6ea6e13ef1a7859d2c +CT = 5cdc183c32b4c1878eb83e8473a17c55c88e2ad6b944ab1f64ddee42614aa737231207636c114575 + +Count = 69 +Nonce = 89ed296a3ac03fbfb71422b921 +Adata = 1ffbe1aff0a1e7fa3e68be31a74612a1519b59397e7007ef61fc015f316d55b5 +Payload = bff42516e30c92ed46710013c656600406a48a84c1fa32ce +CT = e08c1ab4ae7edb5184c30ffb3e74689ea855f50b0e890392f26b130720f75c422fdf66fb174383b5 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT192.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT192.rsp new file mode 100644 index 0000000000..06e9ff5655 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT192.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = ceb009aea4454451feadf0e6b36f45555dd04723baa448e8 + +Count = 0 +Nonce = 764043c49460b7 +Adata = 6e80dd7f1badf3a1c9ab25c75f10bde78c23fa0eb8f9aaa53adefbf4cbf78fe4 +Payload = c8d275f919e17d7fe69c2a1f58939dfe4d403791b5df1310 +CT = 8a0f3d8229e48e7487fd95a28ad392c80b3681d4fbc7bbfd2dd6ef1c45d4ccb723dc074414db506d + +Count = 1 +Nonce = 026a0b8b17be95 +Adata = 44caa8ecfaf38e5e773cb0366e1b04aa0b9fac5c34a362310f471960c4a1e1c9 +Payload = 0e52a384cedcdf7f179348de6e7336aa86f8855fbd903cfa +CT = 3417044bad5fddd9455579123dda4fd342c273a57ff6333dfedf191496d88cbe17c6271b65096e66 + +Count = 2 +Nonce = ea09fbe5da0fa4 +Adata = 1d9799f2bb0f7ab57fe3de27949ff64066131c81bfee172b308f9bb0b3171067 +Payload = 469ff9698cfc96b581d7115c822e4363d7355ec5daed2eae +CT = 1dae7cc16f1b469290902cfad47b959784b4d6f48a79e690d47e30b635d10d1663477d61d7ffb55d + +Count = 3 +Nonce = 8d27bcbf9ebfd3 +Adata = a7070b85b7add9193c9dcd2e6c03f6e7ecc52ffe9e099866baf7472f20c03aab +Payload = 225651d072dc9d93762dd79691ac2b6ddba00ec1252d69eb +CT = 5da819adefbf794612eb458519debcd524c283763eb3d7252eca8766bdf0db6bb2dcc793e1749c21 + +Count = 4 +Nonce = 13f560187b6077 +Adata = c4ab4244db75f8256e55c5b613a07b11c963c3cc24f66128aad4ba8b7ca99331 +Payload = a38231af405dc7b70c8dbc8cb84e6be8a0dc2e95fddc2ce8 +CT = 3aedcf8347aa23fd3325ce08b6b00462536baed69968a753feab6761c55431bb5668e1f5b7505e89 + +Count = 5 +Nonce = 61e0e28bf344a9 +Adata = 5f998952de70449ad46428f2ff8a01c5af43c0107a1bcc6930f19d4112598666 +Payload = db21b37e875d7709a02239ce6ea529cf37255d5b617c153d +CT = b8f5fed39c723d7643d6dcf2efd3bbd1ba0da1ec901305fd64b2302ace4f66216ca8b4d776197692 + +Count = 6 +Nonce = f6be4aad63d33a +Adata = 18339be863fb8a887d04ae9ff3b4a7db095075cd5d113a9ec87b41fe85ea405e +Payload = e53101e6eabcda32c13d7b1dd1d88e7c2ca3ddc2064f64c6 +CT = b758858ab60e1630a0883d4d330119a593729a3015c42525effb985b9c2dd9ec954bd25d9c464c67 + +Count = 7 +Nonce = 2c1c59aa0d8eff +Adata = d44af86b89fda8448a9b2fcae20ea156dd8738c8251699c02b785811c830bf72 +Payload = 1fd7188a43dee7b059420e8634d71d2c0658f6d0d308dc73 +CT = d046f845a67800a5a58f461e5a8641e8fc9b4c53b32e61d172adafffbacb297d67f6b5c02b982e04 + +Count = 8 +Nonce = 48e4598edd191e +Adata = 61588bdc980ea2310e87dec4c651e9a55c27e3858b6505cbf3bf85e51931badc +Payload = c25868f390af5e59c035cb5830e018c62c5b96bd35b764f1 +CT = 0ece161bd77b7f969b3b20c818769a98c178d84524544664500ff4cfe66ade1832babc019778acc3 + +Count = 9 +Nonce = 6d576ce3c5fcb5 +Adata = 92c598cb5ca2926c11f67c3b3cf25493d77606fa60d7290430e0e975091644a6 +Payload = bcd97479db934357a163a9e5f5a85999ca987f8243d8017b +CT = bee185e11b3d42bac846b9d92c70a078aebfa630ab763840391031b3a22b2adeb9791ee35765c8cc + +[Nlen = 8] + +Key = 1dd56442fa09a42890b1b4274b950770ea8beea2e048193d + +Count = 10 +Nonce = ad749d596d88a4b4 +Adata = c67219909828adef64422286008e1e306867a1c0b3da95444507a68b45c953e4 +Payload = bd92d6744cde446fc8621625658fc4bc00dcb97f06195ad7 +CT = 076cffd0ca978fe2bad411ced45a090abafb22a99896f6a75a1969276aa2b0cdb37ccaf2845dbf6e + +Count = 11 +Nonce = b1dc81d116d94f5e +Adata = aa4b71906b6642f10f66c2391ec157c7cde97eb322db10045af4c5248807f691 +Payload = 9aa6dbe1cd3eb98d330c937d31ef93bee8938b6c5cfd38de +CT = 720f6876ac91665f20147483f0655fdbe21963a01e36f1daa67e36d7cc8d54cfec0762514475127b + +Count = 12 +Nonce = e758738df5c89af3 +Adata = 5715fa238f432c926e62dd93708d0e3145428e0ed45e1efa8148d2c4ab6cba50 +Payload = ce80b99039a16e69018d1e3c239dd1bf06e94a78b0b1df37 +CT = acdf7ba3edca1563727ed85cabf085c2f0c8f27556c3c064ef50d85bc3ade6a773d956b2660ac367 + +Count = 13 +Nonce = d586c4c67d535476 +Adata = 1e8dc63c6c54a540b6b02067ba7c719221cf289fa3897299722c9a2bd6eed05b +Payload = 2f88305117f9a5d807d54b7e95ecfeb7327e52d9acac352f +CT = e42b86e619be1a38973c934babeb4688243a9012c85d643d81e024aaf0a62b353f9bed36681288d2 + +Count = 14 +Nonce = 77e83758f68d272b +Adata = 25c80edef3d5bd8b049fa731215b80ca2ee9ee6fb051326e8c6d0b9e11e3d7ef +Payload = 92e47b82b728d639777d5d5843de2a5c364956cb4b21cabd +CT = 1b9177f5b76403cb8c690b39c3dd22b55da35cebccb9b64e05fe32f796f0b4a75a459fce6c7d740c + +Count = 15 +Nonce = 311dc245549206cd +Adata = 87767f13bb4904d0df0d64eb22c9ddb65e81b5739baad86ad5e2c239ffde9f6c +Payload = 8691c0301a216a5f3ed9123886d100309bd85630d6b845f5 +CT = f39fe3620a03b37a4bf457909e0770447b498ad2a2f0f9d7b75f9e4239e43bbf93066897e60f6fbe + +Count = 16 +Nonce = 2a17b70f10e120c0 +Adata = 981fc31e64fbad244ba1ef0303ba1e4beef5bacca74f60ffdb9142a25a1ad5a3 +Payload = b9bec3e2adc83620772048d6cbfb6f78e4fad74d754ffbbb +CT = 92187955ee1ae702ef01a385537119b2bd4545402e8b2384a0c069a2439a2d8843302c6a9999e658 + +Count = 17 +Nonce = e0b10e78e9fb41ee +Adata = 9d072b8a3f1a496b2be6728a38b94a4f44c9be40c8793b69afd81d01696a6b4a +Payload = cea28e7cd0eff0c5eafeec908d4aa8ba303e72ada33db087 +CT = c605e48f2e66e8e0a92471e466981ae5e31db3e4ad80b09f5005b06d15f63f2f015cfe447828da09 + +Count = 18 +Nonce = 02d72dde23f9772c +Adata = 2dc44c39940e2d9c94d2dbe40bbf5cca5efb4d4b250a31aa24f208b87e9c2453 +Payload = 809343e986f6ff47f54d4cac22ed39babd12271d4c7edb58 +CT = 0bb59581f22f6b15de76c0066645495a5c19e44381c349263ed92ebb789c314a89c83542b15ed694 + +Count = 19 +Nonce = 28c4d6de3e2ce51b +Adata = 913a8eda924589d3206ce0a951fef93668c6c0c454824b217997bff6b3026d54 +Payload = a19f65ffdafd6ad5ee43570f7e168f94a8b4a7b7402ac80b +CT = f0c91a29f1222b906550ef5c7c0944c5c4236cb6c31122cfada8e796f2ce7f9449f42de504873868 + +[Nlen = 9] + +Key = 8cc622645065c72d0d2aca75802cf1bbbd81096721627c08 + +Count = 20 +Nonce = cd84acbe9abb6a990a +Adata = 447b6f36acdad2d1cfd6e9a92f4055ad90142e61f4a19927caea9dbe634d3208 +Payload = 597b3614ff9cd567afd1aad4e5f52cc3fa4ca32b9b213c55 +CT = 2d7fb83e6621eed9073e0386d032c6941bef37b2cf36a4c6c5e36222d17c6fb0631c3f560a3ce4a4 + +Count = 21 +Nonce = 1fc7a43ed124745d04 +Adata = c892b095173076a40e24522297be27fd3a765c8d417f24c71a9f03b3fe3d8e20 +Payload = 415cd8312dd20a1c26f4b90d98104cdfbe06739466fc0aa5 +CT = 7bebd6f55f15ae57ab73f92f7be6ff37ddd99740e988f01a7a2a13c22df4a156e6d6063235452c85 + +Count = 22 +Nonce = 19ff5e7c1f2c594abc +Adata = effcea4e4dbc57410426b39fcf51c9daecd9d310888590d77827973a29c4ebff +Payload = 97fd2c259a4e672e9555a9a5b98f4c0ec8c4c49c7ade26a4 +CT = a460674c2f358762e97dfc958d90973e1e419dbc6a832e987579b2c4a6bcf0356f48cf8959cfa54a + +Count = 23 +Nonce = 64d9bd368ac2357cf2 +Adata = 62c5a16f946b4312517f67c80afe2614c822e3a01b87dc81538c00bbf3fc0108 +Payload = b6ada12f7a28211e9d2c07cbb3d39fa77aadc077b34c46f9 +CT = 8fb5e0954388b9b58519482962487e9b0768f0cee08afe9a92be2b06a0ecd2d00877abded7d9634c + +Count = 24 +Nonce = b4aaf2cd93efc0ce93 +Adata = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d1ae70413e4e43d14 +Payload = dd42449da4c95e858b796085b6b5b3b5eef484dbf3c2bc8b +CT = 893f86e29972928c1f3c3e25c73947c8d677814bca7fff2cf8d301ceace678f9bf91fc361dff5812 + +Count = 25 +Nonce = 132f3e19e12f462a74 +Adata = 176cc5a280f6171d00e247edacc81f05c1b9faa87fc831163ac9d76aae59a6c3 +Payload = 8ea05a5033ab8b009664fa2800c24e217488ce6888cad147 +CT = 4771d210ea678dbfab96e320e9c44b68f47cb05b01826ccf42ca4f4ccf986eb6a6b85b99db2fcd93 + +Count = 26 +Nonce = de709ba64cb75704c0 +Adata = 0cf8e9ab95766b6fa85e88d86e4f349a17c0d90509939e343eede988e7462255 +Payload = 51dd9fda9549f25dd868245a6a54b8d59346d2f336adf9af +CT = fccc3e44afa6bd2fbcfc5c834db63dc9d152c04c0dc0b43d393162252ae91ca46fb8e8338cbeb75d + +Count = 27 +Nonce = b11b4c1b7a26387265 +Adata = 14ed867cc909c0619f366918a7d5ae25279fb137e1dee7fd98ddbe3bd19d841d +Payload = e35ea4a16e274fcab457fd4dc7886c3d81fc668c19e0f374 +CT = dcca8aa2eab8ac3f5db9cd9560ae0758d7df40d7d868d1f71f498ea6ec8251a6d149c7ca38b25fe4 + +Count = 28 +Nonce = 20d03227a7fcaef1ce +Adata = c5c15245e641687d0ca9e913406acd2de3f21fbaf2dc5e4e8963222da61d02a6 +Payload = 6775e5faffd0b13e78da70a789042245d5ef31eab5245380 +CT = 4bb8ed2207f36f40f62d3a2c90f8e3bd8f589059b69037118ce3ab864545ea81943ef0ea9489d223 + +Count = 29 +Nonce = 267f76b9ec0f5e7c6f +Adata = 2b421be47d07dcb12a0706f7490d05024fce8f433079e18ec78f4c8678f5f155 +Payload = 9330bb23428ab45f573923e977db74882282cbe1371da68e +CT = c6ae24f82ac5cf9c18a2d98e610027eb2566a1ccfcf99945655e14c7bc8be97ea47388cb7b18bcf0 + +[Nlen = 10] + +Key = ab72eef2aba30205c986e2052d6e2c67881d24ae5fceaa8f + +Count = 30 +Nonce = d7a46e726ed43f1580eb +Adata = baa86f14271b2be7dbb37ddc7c95ce4857e57aa94624d594d7bd6ceeaada8d5f +Payload = 2a794b84fc9e4a7e6d70a82b5141fd132177a86b4e8fc13a +CT = 2d7f76464417613bb61d3657481346b74fc9d6abc6a3babd39365dce86859cd82395d11bfc8cf188 + +Count = 31 +Nonce = d0afcbc1b2524a4a4553 +Adata = 7c267223047af946b06f6a45ffde4a5ec49c28b81ca22da4a36bf523e89e9da8 +Payload = bfc5ce1316ccdbcd8ac62484e7656c87947ff98cbba8e1e9 +CT = 4772c121367d0e8d3edade883342395f3ea065fe7dd7be8c8355b915ca2633fd557ca7ed41e00926 + +Count = 32 +Nonce = 6eecffd227e8d5349523 +Adata = df7736560b1a13aa8e536500ea6cdb9a6757309aadf25a6a9189055a309c3f8b +Payload = 19eef017100dc82f26ed0815c55c122e0b1587302894c391 +CT = e2864c6e12ac089daaa1e94af4b2ed04060d7ef65d2f72f0e7d017514d498f1f3c07d650afde8293 + +Count = 33 +Nonce = a67c0675753f725a8fd4 +Adata = 7dd546397a9a0129861fb6815d419a307f90d259d55f3503961754126cd1b776 +Payload = 80f1f1ea46c92d28f2d60eab39ce056a4aefe63fa688538e +CT = 882c687c03eaaad9d7f591649e736f0c1c78f95e40d40cd77499a8544bc2a8fe95f55fefc7316f8d + +Count = 34 +Nonce = eb83928f0d5f7aa3a74f +Adata = 060cd3e4aecdb03837dfa9f544318c0a16cdc37fa2a3135be7888ac67e7eb26b +Payload = 81e9174e9472777b6b184707108c01d6ea6b5d108ec3c6c8 +CT = 243cfa0a0a36a4c20333968910e6f52acc04c6f74e704180623f3a13fc13db958cbac49f7421d6af + +Count = 35 +Nonce = 5757abe01f7a1183fdcf +Adata = 744629263041f0eccfce4a1ebcc18c4c984010f9241d35966263a8b2f72ee26b +Payload = 991049f26b529af8b0bee0cc83989cf817d248254182f332 +CT = b20469b5f33f0996e8de869ad10ce09924a0bdd7b67a89a09c447a3132fbe5213133650000d50b06 + +Count = 36 +Nonce = d9adfc5b44ad7aa94b05 +Adata = aa6a5448c6ec87be75eca35725ad2e902dbccf840d25b2bdf7e62e4a8fa4a511 +Payload = 14682301a99bf680805d1ffe62e1506d48cee8c51ef1d255 +CT = 9b44efa185b0c10325bb4c3c0815e6a6e46eea366b9a416b5ae554cb440eadd875657fd5cecc214a + +Count = 37 +Nonce = dc3ca30782c9c0a7fe89 +Adata = e788c98ae85b11b3ae884eed6f3b8f5bcf5ab1b7b20ad3f44f760b2287cc5793 +Payload = f9cb86f24536931a1b095b426a07e4621c000cf09b472bf8 +CT = 463f9124d1cc387a0f8b971d1e2da448f0efffc3956ebb2af8312986315522081f0989838ef0429b + +Count = 38 +Nonce = 9523f53f92b6e4ba86e5 +Adata = c3b123ccc916d26a2e6a8b5e30041ad69a944217e9b402b7acc0170c31e8c2e4 +Payload = b9bdcac80f64175836ab51bb1a1bee5ffe3a6b9b71afe3ef +CT = c356b5a78cebd123808fb740754dc47a8ec7c9448bfacf39768e94f062e86129cc9210dfcd3e6128 + +Count = 39 +Nonce = 16bdf18c09d60f3a2a32 +Adata = eedd0796f23612749e9fd282c864f3118d0683409d3bef1fda352e1422273c7e +Payload = cc96133e473d197be1bafdfc1a21d58e57d0d89b2ba1c3ff +CT = f9d78e9e3a41b3bcbfe756385a3715776eb84bb7d8d15432978757883f07802b25e9a5b15c43b451 + +[Nlen = 11] + +Key = af84c6f302c59aeee6d5728ed5da2e3c64a5a781c52c4d1b + +Count = 40 +Nonce = df990c42a268950677c433 +Adata = a6ab5d78427f297a4b7e21f1091ff3a5b20caa3fe1cbcb09459d9df596a6c8e1 +Payload = 6db41aeb5f7c24df8929dbc30483b3c7934b3bd1cdce5bb9 +CT = 8c9328258bf71970d33e23a3ff81cc1c9cbe196a1294264bfd6a7255e4801963bb30a63de3fc5b82 + +Count = 41 +Nonce = b7ea72641bbe2dca6d85e7 +Adata = 4e0f2ddf183281ec131693bdcea3fc9743733c07a486a42d5737735b3f6e3fdf +Payload = 726844e41b1e4d883024b32fee0dcea38c889cb328885b7c +CT = 9a133e4582c2ebc445862a9c6f2f4e39223c84081e322c8f262de30da6ef505fe640c53d765f672c + +Count = 42 +Nonce = 446fee1e75e79c0dfc9ddc +Adata = 42b598eaee271e06d9e98dd94152b28ef10f506d65bd660b2fb8b1be9a2d7254 +Payload = 0cdcf348ecc9c3588001802c2106fb64be9c301adcc66e73 +CT = 0c2657b0482b6ca92e1b1c8fdf75eae3b0cd3af205e9bca396ecb1e46beb16000d585e1d9559ee22 + +Count = 43 +Nonce = 2e6e34070caf1b8820ed39 +Adata = 8bd1ef3a1831fcc8919d736fb23111ca3ef4cccaf20264fab8eb3b071e56667f +Payload = ca0860cc1e96506c2beb25b53d2947fbab634f0372afc8ba +CT = 19e4774030e43e6853ab5bf176ba9c4b59f29f285977e3c15198cbe3e34c884c3f56a732974aa1d6 + +Count = 44 +Nonce = 428542ecfb94a745980aa6 +Adata = 8efe01716b9018084e2ea7616f85b7333d945c0c970f8cdd400130b98db67cda +Payload = bc6b59120ba2845b0e41f65a55e2ef1c45a81485c926c14c +CT = cb48b0af6fad251d409d14ce0fbfae9cd9c40bf4a0c1e2b7e7cec415030997e1ac5db974b617b5a7 + +Count = 45 +Nonce = eff703e6d72ddd23ff52d9 +Adata = d7fc74035e66709d2590b7bb3276245dd43824c9896fbd801ec1d07018b39b6b +Payload = 1a5432e8085511ddac1be91be3e2945f85f0cdcc3a1c9f8d +CT = c0a00cbaec65b7ca525fb26e80ee0cd18c7ef47c39c704833e59bfecf263bfdb24686627fd95e120 + +Count = 46 +Nonce = 6a652ce21334a40a259dcf +Adata = 5d24d80f22afe713c4076c200c1bab36917907fde7b6d34e141066f543526db6 +Payload = eb8f1988cb405041bf48d138ad41da7ef364d4ac59a9e324 +CT = d4f23166c09a15466c7e0e2b30627ee5a84f22d7e6135b4a0652b67d559a84b4a915ca6a420fd300 + +Count = 47 +Nonce = 9382e12d447c0ca23cc9c3 +Adata = 239129eb760f8a770410c160e4e13a6b9497077c3e463b65397393fcd3cb5c70 +Payload = b40e80564263c7f450c53ef84df67247d72e8a04dbb284bc +CT = 6de2ba26caa80874814816154784912c55e3d6da83488e7250f5a52f82211542b4e2661cf870c80c + +Count = 48 +Nonce = 2c3a4148cbb02504a2483f +Adata = 33c3bdbf185b580353de79e51e675b03b31e195f19ba1f063d44def0441dc528 +Payload = 60a31736d99c3dcf25b349f6110e1c152b93506e85a01e67 +CT = 4d5e705d08f3ed1ca6f1caa74b46e4b1eee18a0783686f207de16aaa41d06bc071657dacf14da754 + +Count = 49 +Nonce = 691cdf6fe9ecc2154d0101 +Adata = dc096596644c4e09c44078b86e5e0887c45094042eb0d74a6a13aa2524463076 +Payload = 77e6441ee017a93dd876ff2c7980540c77ee15edb0f23933 +CT = 24cecc81c8ac7ca9906372dc5263f2220b4dd162f1e08283f07f23e65475a20fd96e45c6c695cd83 + +[Nlen = 12] + +Key = d49b255aed8be1c02eb6d8ae2bac6dcd7901f1f61df3bbf5 + +Count = 50 +Nonce = 1af29e721c98e81fb6286370 +Adata = 64f8a0eee5487a4958a489ed35f1327e2096542c1bdb2134fb942ca91804c274 +Payload = 062eafb0cd09d26e65108c0f56fcc7a305f31c34e0f3a24c +CT = 721344e2fd05d2ee50713531052d75e4071103ab0436f65f0af2a663da51bac626c9f4128ba5ec0b + +Count = 51 +Nonce = ca650ed993c4010c1b0bd1f2 +Adata = 4efbd225553b541c3f53cabe8a1ac03845b0e846c8616b3ea2cc7d50d344340c +Payload = fc375d984fa13af4a5a7516f3434365cd9473cd316e8964c +CT = 5b300c718d5a64f537f6cbb4d212d0f903b547ab4b21af56ef7662525021c5777c2d74ea239a4c44 + +Count = 52 +Nonce = 318adeb8d8df47878ca59117 +Adata = feccf08d8c3a9be9a2c0f93f888e486b0076e2e9e2fd068c04b2db735cbeb23a +Payload = 610a52216f47a544ec562117e0741e5f8b2e02bc9bc9122e +CT = 83f14f6ba09a6e6b50f0d94d7d79376561f891f9a6162d0f8925c37cc35c1c8530b0be4817814a8e + +Count = 53 +Nonce = b4cadb5f9cb66415c3a3b714 +Adata = c4384069e09a3d4de2c94e7e6055d8a00394e268398d6ea32914097aec37a1f4 +Payload = 22bade59214fa4b933cb5e3dc5f096e239af4c2f44f582b0 +CT = 2296e3f8a2245224d274f1b90ed1287cbeeb464c70a89ee475ecb546efb8872a3f8b0281b3901752 + +Count = 54 +Nonce = 72e6cebdaf88205c4e744286 +Adata = feaf010f462ad40a38eefb788b648e1cc292cd4bb08ebeff3c39182862296042 +Payload = 30655a6b5a5965db992e7248d24141055e988d726abb8e72 +CT = 69b27f2bbaa61c4f24e1c25e0779147fef79ec1582486b4651cffa571570618e2ada3376bd9f3e5f + +Count = 55 +Nonce = d8030fb31eca2c43f3f5eb88 +Adata = 66704365ddd0145febeb33f68b228a3f09e1e5a4b68149e6e06d886301841295 +Payload = 9d014a02507a6f266bd1ace21b55ab8b73983ff503bb9adb +CT = 233a883650538ab8c0da30b90527f880fcad5b16bd435e762beeeea7a638c717e63764b3a5118a0c + +Count = 56 +Nonce = 58038cc35ad3dcd75195e125 +Adata = 3da7a757e942409a3b39ccdc0669ce6401f7e133c07c4c42e366d70a8e9bdd49 +Payload = eccfd817fa5e3a0146967fae13fc2471ee3944cee37969f4 +CT = 415a36872a04f5b4b5372f63394ab9fb353e0eb9b430450133a87fa29e5fbfa9bc0430b0cac00b7e + +Count = 57 +Nonce = acd82ae31bfcabd90af5af45 +Adata = ce22126f01bde16249c47102b4da68ad3edebcd4a16c24a16ea7ccdd5d364d10 +Payload = 9d2126d34963d3ba12cd841bd321036cb82cfb78f2a6535f +CT = 88a5b889e6fd74fc15336e23374b430988416c7e6b6e7248b336cbbeb64fbebf2e7076a98ecf5bbe + +Count = 58 +Nonce = d24457d567fd0a65fdabf219 +Adata = 0091d39f3478d2c59bf874b96db9ce0f7e8b85a9b805e07dc96b219819d51663 +Payload = 6da3ac85505e93c4f391ea367a9e15fa9b388ef7ae2693c1 +CT = 7039a8a49cfa6402b4ba3b840e69200c13ac4a3eb1c709a30ea909047af4998c660afbaf346ed65b + +Count = 59 +Nonce = 50c59ca54eb64575b82b13c6 +Adata = 5e4e42cbf172853c351d597c7d6d38b1a9cbb7ac92c00863a80ac4a2d9f0e7fd +Payload = 25b2ba0a937b71f3ee68e7172cf2c4524b662efcd08ce2b3 +CT = e95fc44287ce39c5ad6b91c88582563fa68a9e304094deb8b193dd767f17783f0b51ac0fb7323301 + +[Nlen = 13] + +Key = 36ad1e3fb630d1b1fbccfd685f44edd8984427b78deae7a9 + +Count = 60 +Nonce = 3af625df8be9d7685a842f260e +Adata = 308443033ecd4a814475672b814b7c6d813d0ec2a0caeecbcaba18a2840cdb6c +Payload = 8b9db1c8f9b4892a5654c85467bcffa2e15e28392c938952 +CT = 6bc6890fee299c712fb8d9df9c141f24ee1572b8f15112c2f8c99ccf2d82788cf613a61d60dae458 + +Count = 61 +Nonce = 24eaeaa437649e61b706942b8d +Adata = fff75462f96157d9554bddb6aac156fefd88fd4a90a8536dfc28cc577f19c83a +Payload = 49ff4ff85f7407ca383cfa4fd7177adb4dab26e642c8186d +CT = 3647fae50c588d792442f43a20125e77ab5db3c469391d24d0a421bbbc002eb9ac9ad01f625f824b + +Count = 62 +Nonce = 7325932d6694aaf61a8204c172 +Adata = be20ceb8ca14e9bef7158b280a26bcac763da79cd0eba9b1833ea808c5e7a66a +Payload = 2861494eb40b9d964d339797c1b6aac63c6674187768957c +CT = 286dc74001e2a6000a23db164f4b2912de4afcf1df8c3aa5ee32a7ffd4e7bc303d3482fbac431828 + +Count = 63 +Nonce = 61c9949df5853e42599e5ee0c7 +Adata = 243d09ceb16755cb58d62065df84890b840ad9b7eec1132c6427cd7c3d843fcc +Payload = 943a49073db6ae94a88844ed895f8fd99ed25c3f42a2f78c +CT = d3c56bd265a2cb0811dd218f248800ceade4f02b5403b9635eb30cbec49cbb51c41cd5032b7fd759 + +Count = 64 +Nonce = 07b6c18dd3b0fd9e8ff026a436 +Adata = e85f141c3d1af7727fcdb00f8e2c34e42a436d04ac5b8ca9f321a178a2056806 +Payload = a18b0a4618063c0519818d113b8e5435aaf153f664058f1b +CT = 69f933a2a5e774e8d013cbf78c6ab0b73e6ca323d0c52691acb5cf2631987d3d963349b035324aac + +Count = 65 +Nonce = 0c075df70630dec2fe81834945 +Adata = f3f5c5ffbfe8247bc0c33c793652f749fe91b6dd141cf0db56e71cef8a2fd266 +Payload = ddc4bac4115e8cb06d29d22e400674dbc615a667f933603d +CT = 26bdd25c9f204fc7520d26c161464c28fb35e395b295b3db4e239d33283d18415b54c2aad4bde354 + +Count = 66 +Nonce = 0c2d20375057fcd4241d290f6a +Adata = 70ff1b9ff8ec08fdb18b0e7dbe01127ed0cfe0b0a449ca2ace4992b7b6248b71 +Payload = dacbdf1979e000d52b573e74800761b30acc26681f372acd +CT = 6a642c389433a3464fc64783ae6a14a9a45f0998b56a5b9162d7e0320dc930df3640a786d7ea9ae4 + +Count = 67 +Nonce = ea0801cb3dab853750a922dd25 +Adata = d83360d0896e022bf014bd33710ab212ddedda6d95a54996f33db304e5f12f01 +Payload = 46cc5653bbd8300dfb0df6d0af3fb7c7639a830bdc9f68c7 +CT = f1b0728920351d9edfdbe7df360b21f6cc5b628dcf43a3f10d06b4a545609a2128a95d4d73471559 + +Count = 68 +Nonce = 97e6de379c90fccf3fa8f27013 +Adata = 539f8eb802bfecaa4fb5b19debbf3d4847db9c4e0473a308ab3f3c859e68fecf +Payload = 8b013f52a828905013f250fb9c006a173f6c66a64b5ba317 +CT = 556a439bc979dac1cfea8c5b64aa78547f52a62896c19893f3512baf72cd79ba9301194be204bcc0 + +Count = 69 +Nonce = e832b6330d3e5e190598cb9c61 +Adata = 093be516277e8b197ba5e9c85a831529befff0f3971510ab611dfe0dfb50a2ad +Payload = 635d2d7894bb816f154210946a369df37ea492993ba23af9 +CT = d8e19c67e5aa7f14a16ecaaac414a2b15a15bb5f966932e6b0bfe9a5857fd36df94aeadda7f83a79 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT256.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT256.rsp new file mode 100644 index 0000000000..2817684910 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VNT256.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = 553521a765ab0c3fd203654e9916330e189bdf951feee9b44b10da208fee7acf + +Count = 0 +Nonce = aaa23f101647d8 +Adata = a355d4c611812e5f9258d7188b3df8851477094ffc2af2cf0c8670db903fbbe0 +Payload = 644eb34b9a126e437b5e015eea141ca1a88020f2d5d6cc2c +CT = 27ed90668174ebf8241a3c74b35e1246b6617e4123578f153bdb67062a13ef4e986f5bb3d0bb4307 + +Count = 1 +Nonce = 195c0b84baacc8 +Adata = c7d9557b2ed415652ce6faa8cff5217ac803530ec902890b31eaaf3eeb0aa98b +Payload = fe012718481b2c4e1d7f9a7685e3daac43ccf22cad0df900 +CT = 893af0f130f1317de9f217234274b0c04fcc202cea9a0df882c00b5b463654adbf82888099a7d258 + +Count = 2 +Nonce = 363e0e921c6f11 +Adata = 805678936d4e94746ab4818dc5f50c41e32cf32e7a8aafb300fb91af6406108c +Payload = 7e7e33e1a07d4e8fde2f33304f21cb564d146860ccfeb49f +CT = 645cdd11a1c232815ce1e07ca3ea83f372eba46cedafddd980adf2762a1617adfd4d8356bb48aa8a + +Count = 3 +Nonce = e323cc866af462 +Adata = 163c747f3ba4ffd68af87f2475f48f2714659a2ec43b9ed115e02fe0e3c8be99 +Payload = 2bfc76f3b108ba3118b07433c4d3d5f41564d22547c12822 +CT = 0db04c6b068e73e3c4d71059bdeee3d27622f99dfd07d868fb9c02753c57fec7e1a5fa8f3860501b + +Count = 4 +Nonce = 03ae777078b95d +Adata = f1dacf9062dff9a6a3d0498f9d058782f891475684196bf2d8e7e905393acff7 +Payload = 38c4275a5f605fd1d99517e13deebf0c9794ef586070fa9a +CT = df8f524872b5f06f3f219ba76524990b466409894930d7e0d104990e598eabd88cc8342ac16424b5 + +Count = 5 +Nonce = 1c6c351d4fe9be +Adata = 14285e97cc3cae452e1a52e2fa0bbe24df96abf2faf6b9779acc59764612eadd +Payload = 9e2220f3c17532e1ce0d6f562b049fcef35bcaf9a7e196be +CT = c274b28228a6b13b670c325080f88d188d40d78d385481eae004894b1861db5d2d8ae98ed8926c1e + +Count = 6 +Nonce = a121dc27479397 +Adata = 359421e9f78cc4a31f4f019977d7fd29780524e20288798c50002a682a6368b9 +Payload = d42b16b32e77637724144eaddb21ca8d7db4e7f73acbf707 +CT = 56e3e3e59e978161355e7d8573dc0657db400ca0b083dae8ed2ac2cb63e1b9d7dc598634198fe4fc + +Count = 7 +Nonce = b1f0e26b60bf1d +Adata = 2ab4239fffd13762fb5391f5a4760d12d96ea12666a793b4d651e9f4891c22c1 +Payload = 9a2851083ad4e7b915bb0526bb4054e4c0b4adf8626edc90 +CT = 5b2e0215523ff37f0df46e84f996fc9fc779986c766fa51595b8a23ee377d5c2850f4ed95a385253 + +Count = 8 +Nonce = 50412c6444bcf9 +Adata = 09cdcaa87ddf8bbe6db8411d14bb9064e4a121286cc8a6e97fce1844935f436b +Payload = b28a5bc814e7f71ae94586b58281ff05a71191c92e45db74 +CT = 05cbc32a6ca797684636dedd16ce65a1eed69bcab1b1bdbd514ef5cbf9991a919fb4974d55506ce1 + +Count = 9 +Nonce = 225557b0faca3d +Adata = 21611da060fa90cf7fd68b721caf303307a56e56453326495b628c7dc93cd175 +Payload = e831b739e8eb9f787f63c0bb071ddcc9f44cab8d5b447d23 +CT = a97e0879407eb3b7f93118ca73f17eb34e9f4baf43b07be2e8a3f7b848054cb235e1b58d6a12c5cb + +[Nlen = 8] + +Key = 472bf7946bce1d3c6f168f4475e5bb3a67d5df2fa01e64bce8bb6e43a6c8b177 + +Count = 10 +Nonce = 790134a8db83f2da +Adata = a7a86a4407b7ecebc89434baa65ef173e88bd2dad9899b717ca578867c2d916f +Payload = 59eb45bbbeb054b0b97334d53580ce03f699ac2a7e490143 +CT = db4961070f528ccd1a5a0681ee4d0ce3515fb890bccedc2dbc00b1d8b2bc393a8d09e87af7811f55 + +Count = 11 +Nonce = fb2441d1594a488a +Adata = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Payload = 451101250ec6f26652249d59dc974b7361d571a8101cdfd3 +CT = 1bca7b0d35a68c0ffc568ffc8221cca738b67b95e3ab26efee21c5738d1f7fddf3030d004a702704 + +Count = 12 +Nonce = 0855263860043207 +Adata = c7fc24863c33f7e8cf97b337918495d52d864ac570c99cbb09d151758d6b504e +Payload = 61fcd7ef9bf151b9d8a81dc1ba4f82c45e9c2e4784627acd +CT = 9b939b6b188e1d0fe016f366fb01eb79a99ef7b1b57c6f7ab223454c57c714d96681cd4d55615afd + +Count = 13 +Nonce = 415cd251a5e36943 +Adata = 1a393c7e85fb286709f4eb50f09640e1d65ec1135cb4443820136b3cec69772a +Payload = 66ae08d494dc9df9b7f8f53199fa37d0c88885458b168c57 +CT = 1731e260ae31b8068ad1099313b167d9e6cbe49f471da61a9af96d3ce4ea94213b60cb69d92050e6 + +Count = 14 +Nonce = d95bd65242bb2265 +Adata = d0e20e1358be5cc1c45c1cf02c82d0a6d0824cfcb65774cf95f047b9f2cc1d3f +Payload = 312c3791c64d79205a11eebfc14b2d7a6b00391793c9559b +CT = c3fbe558ff9ea83ed86b7d66503ee38eee94e4a41fd53f0f627a352d056712e0d44404c61712e2ab + +Count = 15 +Nonce = 3f0bf0141dd3ace0 +Adata = 9dd4ed18209dd6cdf19cc76fee443827e7331aaf020960c15d7bbed0f6a3b1f7 +Payload = 08354480047eee3beeb5ab165da17d23f2f1a4ad98720611 +CT = 2db9d2c54134d37ebefcecb9e2076034b975677fde58ef6032645a322fa9bc8aace600f942a84db4 + +Count = 16 +Nonce = 3fd8b3a3ff563a42 +Adata = e58327efebad3276a7cd1b1ccb56db0caddd02a303cd9fc7ea5c607a2ebefaae +Payload = d1abd89351384e1a3c3366f77c3175f6390801554d7cd783 +CT = be284dcb357ae99ada7cc891730320ebb32ca627eb8c80623957a2a5b6164218fc83e12c42d5c532 + +Count = 17 +Nonce = 14db1ffc1c87117f +Adata = 6c2b091433833a0ed915354dcb70d982095b614dc51a95a22cec417184d8e786 +Payload = 0594307491f157821e63f50c94034f9284f095d5b897153c +CT = a114c84a10071e359bba2b2ba4ea67f893e27e6ea880aa4b2cf16ce68a93f8839245baebb2278300 + +Count = 18 +Nonce = 40b0f74ff27a3fc8 +Adata = 3b9e1f4e9b57a6dfb5e0ca7ef601fc6af30a1f8650228e51e0dc61180d0bec6b +Payload = fc8b7dbceef6b0ffcbade789e09303044042cd671607e819 +CT = d00ef56074a8213740af8b8f974f778db560ac365d6ce916b8d191130e864bcfcd1dec94a1aaeaef + +Count = 19 +Nonce = 96cbe9cd19351359 +Adata = cf498fd042f9a07503e490cec4873d4df91162cfde60bd2cbb2b710c6681a9fd +Payload = 315e81c9ce556dcf97a5b68503fd2228a7a6a174a15cd618 +CT = 7383c2de08bce3f0b7e504dc03d062f44396bcedd2180fd954e6ec9f6ae1e0976ecf04dbee6463c2 + +[Nlen = 9] + +Key = 58ae7965a508e8dd2eda69b5d888a28a1cb3783bad55d59d5b0da87137b72e93 + +Count = 20 +Nonce = caa3d928d2bf2b7f2c +Adata = 304678b3ffd3200e33a8912bcb556b3cfec53ca17f70ecba00d359f9f51d3e3b +Payload = e61bad17640ecff926d0b0238271ee4c9f8e801dd7243e9e +CT = 7bb1137c14cb4d324a4a8f1115c619ebf74927f0bed60a8d5a9140ff50dc4da375c7d2de80de097f + +Count = 21 +Nonce = cf09ca67659a583bb1 +Adata = 5507c4c3107cb446d19975f91207dbf3e2a51d1dcfd7da2f082159dbc3f41547 +Payload = 1887bb0c02500093a30a44b99e137483704b06615d308c6b +CT = 834d3b2e5f0915c2348c706b4d2ff2717983ab4490edcc63971f02b7122d1e4f78de9c3376520f5a + +Count = 22 +Nonce = 97f940d7c1230bd8d2 +Adata = 56be2c9e09b555373d58f6fe2a0ca9b4ddba899addddf12b0fda860ad791773a +Payload = 5ac67c9bec9b95c54e187a4a6812f5d701c4ac8f847c005b +CT = 9f372ba1c87a115847cd708aaf5b8a143b6981ffc2c61cefd30ece13481609809b218de04c4e5ed0 + +Count = 23 +Nonce = 147c7ebb6c92245054 +Adata = f95d64a513a9f3e6c95c9ed27b22fafd7dd10da52636029523142149116aff53 +Payload = 08f199a8d7e3ea821dd3106e8947cd2e9d485342b25a6471 +CT = c438aa6d187643d030dfe4d6b5b578f84838f4dc5c396d700c0986ecd7dab44e5e97db37392a485a + +Count = 24 +Nonce = b9bad794d49cdac9b3 +Adata = de9ff2a43f49cdc502cd17a373989bafd13fa6ccff6660557ce05b6295186d47 +Payload = 40d1cd4063750184356a1d7cae1cf1824f552c5d59a62dc1 +CT = 9952b25f4f4f375440cd958456184fe61610381ba92ca48f38dd977042c4d97da84e4effa650799a + +Count = 25 +Nonce = bbe054fbef86db3ce7 +Adata = dcec76181e3b872a5a6e79f070354e38866c7f67fc428fbca29ae6d929b1dd7f +Payload = 5f29808ba74b672a0f82b3b7581dc32478c6e790e2b8c61c +CT = 4d176f48b09b772dde8adbdaef720aba128a8d38a902847ebf22c81a5d824b4916660be6f9b513e6 + +Count = 26 +Nonce = 6a35e1a4307f6efc6d +Adata = af28120505a84a75b0f6b18cc9d8c75c661bf143be29c11d8ede78b9bb98c98a +Payload = 5e2f601395ec406fcf96785f768162e849f867dca77667ab +CT = 4e305e26d34711c6aa775f490939cc6560d3cb6905f5b0f5588ace6fc303600abc8e5825cbaedc7c + +Count = 27 +Nonce = f6c237fb3cfe95ec84 +Adata = 038f8ed89444784417a9c23bf11e9b436174e6c10959e00faa1704ce2f7f2c7e +Payload = dfd9cacbf7d73d688447ebab13d2e13f3613652379b386f6 +CT = fb16c17a6b22a8658f446203ad46a48b34808083b271cabb015a1f78abc287bd2a63381ead07c558 + +Count = 28 +Nonce = 50d024a3e7455d7249 +Adata = 8513365786b7988b208984e11022c15573f978bbdc29e8a7a4745c8a81885a1d +Payload = 400317786b7df63373ffe541efcee6318cfc95bb673aad3e +CT = d33b3141fea3a9ebdeb80d1da32dae42680be78471fb3023721f714120162514555b60560afa4256 + +Count = 29 +Nonce = 02769283d5a06c363c +Adata = 292c0be3713c6c588cb4e29a1c43b3e6353e33556194e568e800e4e44e8281e0 +Payload = 12ba8eddff1c2a03ddd25bb924ff065a93fd712b2c4f61eb +CT = b15b1789c323a68568f86f35483bd7e204beff8f318ae14351f5e62b3b923a937e6c307af202fab3 + +[Nlen = 10] + +Key = aecc5e18088bf9fd7b17f089bdd5607b69903b04b726361f8a81e221b1c91891 + +Count = 30 +Nonce = c527d309ab29ee91c5fc +Adata = 8f9a73e7bc1c11e2919020ba3a404cbddf861e9e78477218e3be2cd4337b278d +Payload = d4291c99901345afe29f58912a414a7498f37b44362bdf3c +CT = 392784a9e0b14bcd37639ec5409d6ead3e75f855e5a92c33ffc040ef3977e0035ce6ea6d157c18d3 + +Count = 31 +Nonce = eebc31a5813b4fb93b63 +Adata = 9c87ad77953bf8a811e001ddb946eefafbfaa598150e85f0701853fa307d77d6 +Payload = ebcfd71120b0f9a2cccb898e6dfa082998cbe10032de3e61 +CT = e38eaad1e2df77e85e7129a8ce0f82cfc32b0aef79ab651bade65aa17e4dfb0aafe18cf71a72b180 + +Count = 32 +Nonce = 231b33dc406c9210f59a +Adata = 38be46d271bf868c198052391f8a2147c663700d9bb25a0caaa36974f18dacea +Payload = 9032f910347daf661092b5c1f15b5ffed1369b194d9e12f0 +CT = 868b85288828501cf1d06610fec25e8b8a4b437e2e4f5563b7f3b898a2356909784598f8a8916f5a + +Count = 33 +Nonce = f2a88c3ebc74e62f24c7 +Adata = 5f495c5da035cabeb77e8aef10e91a05bd5aa414d1a37fa1099af959b26e5403 +Payload = cfe8ee9b475e36058471e2984ae66f6ba1b3cb477b15155e +CT = 22c16333ac651cd9c183e78aba3e9312fb3b77dd6f9199502788860aae5534cf84979e30c3327d37 + +Count = 34 +Nonce = 9cbaf1c83ba60b1e90ea +Adata = 7ef136bd9a5809676abbaa68016d6fc713e34ac4b768a8246b1198c959f43085 +Payload = c3bcb0aaea93893f05eeb6439c8619dec17670a6439e2921 +CT = ebd9fb86563aa8f10062624441336f982c161ce5717d990a599ca6ec1c61a14c37b5902389e47aee + +Count = 35 +Nonce = e25322845d87d8a76753 +Adata = 2a89b9f0e56a1cf87dd38ed78028b6286ef8b7141dd2b3c65c5a8e1ed79bf4aa +Payload = ae622ff9381854f831892c318bae5c003e74b15199bc12c0 +CT = 144c920f0fe278f353d0b053563d907c7589e4f1479d7a93a0604deb3fd9cea2d89987833ff5c2f1 + +Count = 36 +Nonce = f4d7978fad36223623cc +Adata = 8671de7e994967f2521d263925e745af9273682d9c08ced07d4a98fc985f68a0 +Payload = ef9b4ff8da108cabc972192ffecd5f96594c6d0871ffa6aa +CT = ae4948b3bc1e50beb9f5d005871fc0d3dbde295de1c9ec3cbc866ab47bea7a4d0070e52b492fb8f6 + +Count = 37 +Nonce = 6597ffb9eaad0fd9d830 +Adata = d2967ddf69ef62a9e23c9118dfaa55df92b4116322f1c9275131e3875dc92faa +Payload = 5015c894b2437ff15c46bca9236830ff4bb057cd5764f027 +CT = 0b1dcb3cb0b4c32f398f3c43eccfe8f4242f33c99a2a2283efcb3dacac25bed0304f227fd5b77b8f + +Count = 38 +Nonce = 80e376b87272d99cde28 +Adata = c9cc8f967dff45c05b9345d03813b6e30dace99556f7df75b7120bb6e5f55827 +Payload = 615f657e24129a3e0f119988959608821219ce8354c4be26 +CT = d3e8b8f7ff8faa666ffe2509187fa7befc7412fd4e3bdb06cd2f7494b1fb0a0c6a2184e5c4787fea + +Count = 39 +Nonce = 344cce96455541d403f3 +Adata = 748cce18fb40126ce125dbe341fbbc59d2aacc170ed5ef0293b15713c9184a07 +Payload = 828b6a4cd49f499a6e8e8508f9ab35255d8e9fed33ba4d91 +CT = b67e582a74d7f022a16ada2de7ec18caafdefa6b104baf4ed93b6f8c8a1bf72be75976e4ebe6dd1f + +[Nlen = 11] + +Key = 97bc7482a87ba005475dfa3448f59d4b3f9c4c969d08b39b1b21ef965c0f5125 + +Count = 40 +Nonce = 0bcf78103ec52d6df28887 +Adata = 049c10f0cb37ae08eae2d0766563b7c5a8454f841c2061a4f71a0a2158ae6ce5 +Payload = b99bf4dc781795fc4d3a8467b06e1665d4e543657f23129f +CT = 0d3891fa0caac1f7ebe41b480920ffd34d4155064c24f3b17a483163dd8f228d1f20cd4f86cf38fd + +Count = 41 +Nonce = ab6374c6b2faefd92fa3d3 +Adata = f19c044023e5cf339203738ee70e76527519763664c06ae00e002a5ba94c32c6 +Payload = a2e5c51f516db01688b64c173bb25645182a005018022ee1 +CT = f70c598df3c64d3527ebb7fc8408b7de2cfaa1da7984ec361f1ad61758d828b70d4881b7d6ae8cd0 + +Count = 42 +Nonce = cfb89e7ddcba601e875110 +Adata = 052714010da516c896ac5842a839ae845324643cddb080e6206148432d0d0407 +Payload = 037f206cab78a6ca0745dc8fc137e22e14f3d7183917ef83 +CT = ccd675862502a2e2520a33250150b8b7b220e84db854888c316dd62075fc761e2bc80edc5c564bdf + +Count = 43 +Nonce = 967cb6f8530bf8a43adb42 +Adata = cf391a84d03e2e22aec1965cec821f99e7bf21a7c3580dffa531464b22d83225 +Payload = caa3d928d2bf2b7f2cd8a7f357055b6d6895a5e34f47972a +CT = 4f4f509debe6e52eae4af8b1740dde0a5338f78711a3b4ebfc8b5aca6d606222d6af7cfea0d1f4e1 + +Count = 44 +Nonce = f5b7b5dd2b5e1ec93710c9 +Adata = e7a6b228a67d37b9d29a38efc547e50b4a6d95d599b45ee189ece21101ac6b5b +Payload = 4a74ff35418723f2cecec1012484b52114067b2b2393e7f4 +CT = 25b140922a9d4f2ce153a4ff86596a49d7de6a6184e931e8b2ff27a98029b23484e00c2a5d291887 + +Count = 45 +Nonce = 713de00faff892977d99d0 +Adata = 14ea93488d4284d21d4c7ce14414adf45c1ed9d2d99db866d0e59accb6234dac +Payload = 3820db475c7cb04a0f74d8e449f026ec951fa59667738698 +CT = e4d92ab8d1ffb0976670d891cc8338da12f86d5d79b334103d2ae816edf857c810b6fdc7f2c71f1d + +Count = 46 +Nonce = ba87934808de09b2ae829b +Adata = 30e2ea2a505f19e8760a0a84961000c7a0b7fe3460a9d3f5a38f54149be2e9ee +Payload = 0e52a384cedcdf7f179348de6e7336aa86f8855fbd903cfa +CT = 6df893eed2be958e5f542f8cb4adb392b34786cb4ce821ec93fc57997b977948d55bdb026db5bc48 + +Count = 47 +Nonce = ea09fbe5da0fa4fe911e18 +Adata = 237dc8512b29bccdeb8ee39cf83b9b6dd203823d175c44d5f605b194e7ec136e +Payload = 41cee0ecaf9c65cef740440af37954ef49a585779d2abbca +CT = 2f204ebcf549ee2a800d870e6341b9a89a41ab4ae91b6902ff704a2bcfb8becd0226f76d68fbb08b + +Count = 48 +Nonce = 5b80d7affc4ab4a4b68bdd +Adata = 3a38dd7da30f5c312fb1e978d87b7a39792fd9ea3e9ab1565874e99df587327c +Payload = 5ff92f6d3ca791421363e10cc84b4e8e21e0ebe5d8c55d6c +CT = 05472db7875d59f8bed45606f355a516de93740aa2baeba18df9400df42baee6b9a0d75b45840104 + +Count = 49 +Nonce = 514bba483fe7f2b7e555cc +Adata = ac8beb419099cdb42a39e9b46fd900cc52eec4b43a96ed18b37b899b63fb931c +Payload = b0b11dfca9b3936d1b4a423c5acd3d012b399a487c19c994 +CT = fa20629d514c4ce7bf727629bca5aa1c0c7e7851fc1bfc5c847729a70d7b4cff5281aece37006015 + +[Nlen = 12] + +Key = d6ff67379a2ead2ca87aa4f29536258f9fb9fc2e91b0ed18e7b9f5df332dd1dc + +Count = 50 +Nonce = 2f1d0717a822e20c7cd28f0a +Adata = d50741d34c8564d92f396b97be782923ff3c855ea9757bde419f632c83997630 +Payload = 98626ffc6c44f13c964e7fcb7d16e988990d6d063d012d33 +CT = 50e22db70ac2bab6d6af7059c90d00fbf0fb52eee5eb650e08aca7dec636170f481dcb9fefb85c05 + +Count = 51 +Nonce = 819ecbe71f851743871163cc +Adata = 48e06c3b2940819e58eb24122a2988c997697347a6e34c21267d76049febdcf8 +Payload = 8d164f598ea141082b1069776fccd87baf6a2563cbdbc9d1 +CT = 70fd9d3c7d9e8af610edb3d329f371cf3052d820e79775a932d42f9954f9d35d989a09e4292949fc + +Count = 52 +Nonce = 22168c66967d545823ea0b7a +Adata = 7f596bc7a815d103ed9f6dc428b60e72aeadcb9382ccde4ac9f3b61e7e8047fd +Payload = b28a5bc814e7f71ae94586b58281ff05a71191c92e45db74 +CT = 30254fe7c249c0125c56c90bad3983c7f852df91fa4e828b7522efcd96cd4de4cf41e9b67c708f9f + +Count = 53 +Nonce = 225557b0faca3d6cbaedec5c +Adata = c7aafe7d3b419fa4ea06143897054846ac4b25e4744b62ba8a809cc19253a94b +Payload = 0e71863c2962244c7d1a28fc755f0c73e5cbd630a8dbdeb3 +CT = 2369b56f21336aba9ac3e9ba428e0d648842a7971182d5ffac57f6ae1080efab4ed93f8b4ce1d355 + +Count = 54 +Nonce = 78912be1a35e156a70fb72f7 +Adata = 12ba8eddff1c2a03ddd25bb924ff065a93fd712b2c4f61eb80d77fab2c4900e0 +Payload = 113efd182f683596862ccd5eba2e2d4ffa709d9b85c6f1d5 +CT = 835a22eb8d718c0ee1531a2d1bb95f58215c997c612908eeed3ccaeb7a814f69d3ec1fbf2ee9792d + +Count = 55 +Nonce = 91ad90b58d2044abacf957e1 +Adata = 4fc795b9126c23dd7fd514c2e5a8ca583e88a783b28cbb2a5df09f8b520ba0d1 +Payload = ed55f6b9eb8fe74474c037ede94ffd84ada846ede4ecff74 +CT = ecb595276fd5d412a7cc3f5cfe960f47a0d0e2df0b08a11ac257d67143722a976c9d7f44b09a767d + +Count = 56 +Nonce = 4bbe4ca29122c4892ca09b5b +Adata = 367ecd1b71dfb96a84e2369f28705dfaebf0c73ed35d5364449b2391230be846 +Payload = 8dd497bb777bbc3e56e3af25a43545007bb00f2b9e9f815c +CT = 563d61fc0a5b82804a580a7d752a8e61d3342fb39372b39b6843a685bde3175695796f6e64f35901 + +Count = 57 +Nonce = 218e7b8a8fd62927f90b70e5 +Adata = 01815f599d6ba0d1c09f6f673bb6cca4c2a7a74f4e985be4c0f37842c7bbc5a4 +Payload = 80f3e4245c3eab16ef8bf001429122e46bde21735f63adba +CT = aaceb16589b9de253c99d0d32409a631db71e8df8a7644bfd027e3466e8220144cb0552f9b2800e6 + +Count = 58 +Nonce = eecc9f106a0721334cc7f5ba +Adata = bf38d0ee11a796a517539bbc9ab00ff85a4ddbf0a612d46e2bc635180ad34c50 +Payload = 36cefa10af1a3446a2c8d4a1171144b9ddd8e33a7cd5a02d +CT = 9bf3b2df93cf5b587ecc96f45fc75e6eb066cb286cb06f284c9027fc41bb8c848025fcf9d092a873 + +Count = 59 +Nonce = e41af8ca408c4c12e37561a4 +Adata = e0b20892875f60b5d8763a04958487fa5b7cf8d67a456e430475b337245d671c +Payload = 32a4da08bdd51336ed5798c7177b853a534bc98f2e6f7d4e +CT = 95ffdc68f721cf2294d0d88002e3814167306fd906dbebdb7e6e0e5dc0a03826e51bd94269d7a41d + +[Nlen = 13] + +Key = 4a75ff2f66dae2935403cce27e829ad8be98185c73f8bc61d3ce950a83007e11 + +Count = 60 +Nonce = 46eb390b175e75da6193d7edb6 +Adata = 282f05f734f249c0535ee396282218b7c4913c39b59ad2a03ffaf5b0e9b0f780 +Payload = 205f2a664a8512e18321a91c13ec13b9e6b633228c57cc1e +CT = 58f1584f761983bef4d0060746b5d5ee610ecfda31101a7f5460e9b7856d60a5ad9803c0762f8176 + +Count = 61 +Nonce = 8a56588fe5e125237b6cdc30f9 +Adata = b3aee5fbf409bcfe9b46ae68d570edbbed32c12d13926ffb5ddc60ff0bdb7f85 +Payload = eca81bbd12d3fd28df85e2cc3dcc2ecbd87408002fd00fe1 +CT = 9aad62a5443550d11f9efdab2de0eba74d47ae4f7d16adf4276664f6567f2f978bd4be4d80cd07be + +Count = 62 +Nonce = d908b04840caca2280e5293ade +Adata = 314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e +Payload = ad1109ea5c79bb55d22e9713eb2df42767cb29a2eba3ad2c +CT = 61fdcebb158cd03151697ae7871c0a998802997e0672e5886e5a9df1b1d6284ef657cde6f74734bb + +Count = 63 +Nonce = 6df8c5c28d1728975a0b766cd7 +Adata = 080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5 +Payload = 1a95f06b821879df3fd3ac52fc99a7c1d3e9775263b7d036 +CT = 704f60f9cc3ef7bc00b4f7a271ca70a89f4d5605387b3e2f8cc80aa08572b90e9598d0a73712b720 + +Count = 64 +Nonce = 6c6ebacce80dde9fefb7e5bb47 +Adata = 93f0fca0c8c84d5cc48160b25e246226d489225c0f8275e52856da592c715aa6 +Payload = 46820aec46ebd0d61706129584058a1498514928a87fe620 +CT = 00f6cccf45f046da1e6266afe61eed61c60c28515b2e1ab386b2c952055899184f0d95ffe3959f89 + +Count = 65 +Nonce = b94bc20d8c9abca7645fc6bebf +Adata = e1c083c93663f5a066ef337a61aa3fddde7c301a42463137c375cc2dcdd76954 +Payload = f1fca581d3dbbc61060c0c02adb47bc57954d25a283f66d6 +CT = 90c65d23e0e1786cebb95f9b1306d001b2e503842cdedb75e37a53d77b9e38605febdd7b2b666f98 + +Count = 66 +Nonce = a4974791d417d7e9eea0f4ae8d +Adata = 33602f308f3a0f7e1c75fc1e4321d545ffa278234958dbadd37f59a0f85349c3 +Payload = 41712c058d2d56b43b2c79278e790858a289320746c15a60 +CT = aab5656a1ef060c9b1ef7e2f3cc0bda40ff067900401182563ceb824708a20724c99c83f1caacd70 + +Count = 67 +Nonce = 6003b771afe4e99e1ef1ed4a31 +Adata = f60d8362b2ebf523681bb051fd3ee13919ad86acd963c703c4178a5f01a84236 +Payload = b766022311c5e1d74a607fec7cb8ee805b8397a6c5f374c1 +CT = f73b2a6dbf8f798d4bfb489a6578c9c79152e42aa3b81b64a84e7af3116a18f7ce44ae93f420270b + +Count = 68 +Nonce = 27861168ac731a223dc35c03e8 +Adata = b7ba1c66282cb6092ba601407ff9578afdadf7ba7a4d08edef06dbbfd87171bf +Payload = 0822e3e6ba982091d532cd5271fbde25305d1f6e71880f81 +CT = 5ab3e5296cd1f08704c82f6b42939702515b7733853d723d4009312bdae46958d844eca502bcb005 + +Count = 69 +Nonce = ef284d1ddf35d1d23de6a2f84b +Adata = 0b90b3a087b9a4d3267bc57c470695ef7cf658353f2f680ee00ccc32c2ba0bdc +Payload = bf35ddbad5e059169468ae8537f00ec790cc038b9ed0a5d7 +CT = b702ad593b4169fd7011f0288e4e62620543095186b32c122389523b5ccc33c6b41b139108a99442 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT128.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT128.rsp new file mode 100644 index 0000000000..f79db90b4d --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT128.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:24 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = 2ebf60f0969013a54a3dedb19d20f6c8 +Nonce = 1de8c5e21f9db33123ff870add + +Count = 0 +Adata = e1de6c6119d7db471136285d10b47a450221b16978569190ef6a22b055295603 +Payload = 00 +CT = 0ead29ef205fbb86d11abe5ed704b880 + +Count = 1 +Adata = 98d477b7ef0e4ded679b0bc8d880f09823ad80e9732fde59c3a87da6a1fcf70b +Payload = 00 +CT = 5b85d144bb51d4927074d3536a2db83a + +Count = 2 +Adata = 28f32de10b6c9d3c3f46efec7aee24006208a54c4d1c2bba4b8cdce166cab7d9 +Payload = 00 +CT = 01045de4a09486eea5efa33ecc6cd299 + +Count = 3 +Adata = af397a8b8dd73ab702ce8e53aa9f0189995c6c9e920dcb75795149550b499deb +Payload = 00 +CT = dfd75400b59c3ad387bc86dfbbfb52ac + +Count = 4 +Adata = 3fa956bfaa27e249bf0a1276468d808259f3b8e2687851d780885d44cc2f04bd +Payload = 00 +CT = 2b11d2549b4e2f0a81c07ee90af4d081 + +Count = 5 +Adata = babbd1b44cae3af06e0150bf0e3d898f6fe862b71ea9f6b727accfc18848fc79 +Payload = 00 +CT = 10f76ab445f4ec158ccc1f7c6fee3ede + +Count = 6 +Adata = 7fba0bfda3b03c736c121cf9a257db55060b621be5168619ec4182f13ef6a408 +Payload = 00 +CT = 59e02d6a6aa3fb2692b04e65a0e735da + +Count = 7 +Adata = 057354a29808f4ed77671ed3dc36f8b03f5cd952caac5cb80dc3b319f3333e29 +Payload = 00 +CT = 367a2ade4087964dcb0ca2984d44657e + +Count = 8 +Adata = ec08b618602d091e9304715cb552b357c16fd1d7f7f023a28d84a98ba21ca0ab +Payload = 00 +CT = 47cb92cd40bc89328d4dd44fbd727032 + +Count = 9 +Adata = 45622834ea658b09b17f32777d18b34b387ef957bd344468f68e7178417a7c24 +Payload = 00 +CT = f5185afb8359b5ef995483c0bc4192c3 + +[Plen = 1] + +Key = 6ae7a8e907b8720f4b0d5507c1d0dc41 +Nonce = 7f18ad442e536a0159e7aa8c0f + +Count = 10 +Adata = 9c9b0f11e020c6512a63dfa1a5ec8df8bd8e2ad83cf87b80b38635621c5dc0d7 +Payload = 0e +CT = 4c201784bdab19e255787fecd02000c49d + +Count = 11 +Adata = 73616a428f1a567b2e9af86b1fc8aec6d597b1b55f2aa2219b3b662fa6bd3407 +Payload = 30 +CT = 72f14519f06b63fac3d5b2d9bbfa0cb758 + +Count = 12 +Adata = 6d62f4e15e8bcc9ba4993bc50a046737121016f0d15020b90068250551167b1c +Payload = 34 +CT = 7676b581a28ca0a0ba5178eba7fe028da6 + +Count = 13 +Adata = 8f0b8289a1834ecc2167b59ce3c9d3b58465c4cfaad50c728d04360cb7e5bc41 +Payload = ec +CT = aed99b805c0a4785ff2913cab3e50f6205 + +Count = 14 +Adata = 477b2a6932f838f0d1bc420c0ca306981d8e2dab945b6f259e15fe888667220a +Payload = ec +CT = aeb50e41cd7af84a8fdb6aee144e904616 + +Count = 15 +Adata = d6518d409b1f05708d0b44f18fb5721f20f3220f8d2f2718650aa9932e4579e0 +Payload = d1 +CT = 9312639c863974f077fe8236c943b464c4 + +Count = 16 +Adata = 865e7cde73b558e9bfd05356923f8a697970811fc484acad2d5b3528baf1f986 +Payload = 24 +CT = 66d7265cde50bc7a3989458437baf06db5 + +Count = 17 +Adata = f0c3c67a935eace53ed32435655dd0974fafe283622e8294a15d70977398eae2 +Payload = c5 +CT = 87063144b25d2268063815d1b42ebbac34 + +Count = 18 +Adata = 341e71b2ef26e9db03882e06d06cde2c0617326cd157d5984d22f6f3407a9c39 +Payload = 34 +CT = 767da45c10d0d6498716bcf3f13ca7e26c + +Count = 19 +Adata = 31fce6735ba9a3385df11c153179b8e4141a3c6b8ad6eceaa211f3f17bfd0474 +Payload = 7d +CT = 3fcb0a6f562974cfb3fb7c8d5cafd50f2b + +[Plen = 2] + +Key = 3d746ae6cac5cefd01f021c0bbf4bc3c +Nonce = 597b3614ff9cd567afd1aad4e5 + +Count = 20 +Adata = 90446190e1ff5e48e8a09d692b217de3ad0ab4a670e7f1b437f9c07a902cad60 +Payload = 4360 +CT = e38fdb77c1f8bbac2903a2ec7bc0f9c5654d + +Count = 21 +Adata = 6bc3d30925c67371573271f1a4273ad76e91e07dfab65f7bce0b241b5e4cd00e +Payload = 17c6 +CT = b72955210d62e1393e4fda647c2b2e59a47d + +Count = 22 +Adata = d1bb4cdfc3f2c16d92576068543692aa4b5a427d688387af0f1583e91a0e8b3c +Payload = 6575 +CT = c59ad54fd88a47b9f6e39cb4606af86d13e8 + +Count = 23 +Adata = ae6136df9ab43631ef143515dacedbe759b3459e951bfaf4712a21c86352f1c0 +Payload = b1dd +CT = 11326de841af64b55bb7ebe3fd30ba493c7d + +Count = 24 +Adata = ffead34ac26e21158212d07c367c3a7cb6b795887ee2d3d8ae25c60556ea88d3 +Payload = cd16 +CT = 6df93a206339de534271f6469edfa5ed07d3 + +Count = 25 +Adata = e768e7d867820d46c1cc62ee0e51d4dac6f5c4b5785b5ccfbf05236871bdce2a +Payload = 12f5 +CT = b21aa8f65144f2ec5809e2ccb38c8760f7bc + +Count = 26 +Adata = 402e802885e4119df17fe85f141c3d1af7727fcdb00f8e2c34e42a436d04ac5b +Payload = 39c0 +CT = 992f9af825957abe7d89e175b6e8c0b84b5f + +Count = 27 +Adata = 8a3a622b3d347c0c5210d484adf77fa33205ba02224ddceea71d89c9ad8429ae +Payload = 912f +CT = 31c025d6a12e91e84e355934547f6b5dceb8 + +Count = 28 +Adata = 636114e5e5f83cec94e1df21d6babb9f6a14a532fcbfc3bcf649fbd79ac1abbb +Payload = cb6d +CT = 6b826db959a21e9e4ebf25ca4f98501b560d + +Count = 29 +Adata = 04e84f9156998c2eca9e96079a6001f2947dc49a081b3d75e47d75f71ed4a606 +Payload = 5bd2 +CT = fb3d2006ff22ff231a6646ae561923818a21 + +[Plen = 3] + +Key = 3e4fa1c6f8b00f1296956735ee86e310 +Nonce = c6a170936568651020edfe15df + +Count = 30 +Adata = 00d57896da2435a4271afb9c98f61a650e63a4955357c47d073c5165dd4ea318 +Payload = 3a6734 +CT = 384be657bfc5f385b179be7333eb3f57df546b + +Count = 31 +Adata = 50f6e6dd57bd3a24f6bfdc8b1c7b5a36ebdd07fd6d194e6e82da47151d9c88fb +Payload = 4ffad3 +CT = 4dd601b8ca97bda492546d82dccdebef441f8b + +Count = 32 +Adata = 70e132023acae1f88c7a237b68f5bdce56bcfc92be9f403d95d3bcc93b4477a9 +Payload = 8a594b +CT = 887599fa0f3e397d9a580aa39c7028e1a508c9 + +Count = 33 +Adata = 08d2b011f36e05dc728c1a8bda3d92c779a3d2f27c4b041810bd6222c852b14d +Payload = 1f89df +CT = 1da50d593460d335e2f7a6d40b8fe305b0f690 + +Count = 34 +Adata = b207eb870aeeab27c6201ef04650bdc7ea30028a243420f7d198f1c9c9a43023 +Payload = 72e9c1 +CT = 70c513a2d49e1a113767ea4219107819d88b65 + +Count = 35 +Adata = 74294088721fc9e7aabd5f1c66b5369b1e2d2cdb3e73abaa28ecd1c37d4ecea2 +Payload = 016083 +CT = 034c51dab1c819778be8453db163c882063af8 + +Count = 36 +Adata = abbd347999a1c26368cdb17ab08bf57a8e942d1248296e952f5f42f2cabbf0e6 +Payload = 25f665 +CT = 27dab7537eb435df8d0e48c3f7e0bd1877c866 + +Count = 37 +Adata = 231b33dc406c9210f59a5df1cfd595c803474db34b9b1848f0bcbe7b28df33c2 +Payload = 158606 +CT = 17aad4da549fc63d55b5910bbbf64435b95220 + +Count = 38 +Adata = 69b851e63a78baef90637978e3dfe8c47be4b21e85bb89bf67051cf251004376 +Payload = b07452 +CT = b25880d5ee29fb2af47f8040fad585921057f5 + +Count = 39 +Adata = 9b1f786c887d310b8efd3e8192fe504f603024c94aaa4ec9123736a40bf1605d +Payload = 65187c +CT = 6734aebc3ee43e10205f83143e0d3794a6734c + +[Plen = 4] + +Key = 7ccbb8557f6e08f436d0957d4bbe7fdf +Nonce = bb8e2ef2ed9484f9021cda7073 + +Count = 40 +Adata = fba1d18a74a3bb38671ab2842ffaa434cd572a0b45320e4145930b3008d8d350 +Payload = 4cabeb02 +CT = 32501f4235c4dd96e83d5ab4c3c31c523453c317 + +Count = 41 +Adata = 78b3faecb2bdf6ed14ac2b86ded07aa791b60f5d54f9e24a965a8453f5131898 +Payload = 5ff73653 +CT = 210cc2137907d6a03e66403a7d9330d30d934a8d + +Count = 42 +Adata = db1239528eb464dd063e2a97ee83a87d6002ebb4fbafa77036f72c14f3fe959b +Payload = 062fa9ca +CT = 78d45d8a44f4bc78fbb969935076134437df82b4 + +Count = 43 +Adata = 0071f1edb3a0ce57af3c88bb0ccf138f752697a77e55695838fb39de04c78dfb +Payload = cad710b4 +CT = b42ce4f459692911fea2e0034d06c3b2e89af3d1 + +Count = 44 +Adata = 7381471a62b1fa6f5061c4c37e9721f07099d007ffaf8639aa2ae3f82da5a559 +Payload = 7ac716b4 +CT = 043ce2f468484e22381923bfcaed16e0cb85b0f8 + +Count = 45 +Adata = 19bea6d92d5892216e8e4a30dda802387800bb046a6717817fc46c7edafe17b0 +Payload = 362da02c +CT = 48d6546cd081de39c247df309c4b56c31c03690d + +Count = 46 +Adata = 8503c8eb9cebc6110f259e35e03a0740267768130ce6f61b1c7d1d25be942274 +Payload = de52b209 +CT = a0a94649c6c6bd7b3a9d7c4dfa2738847ea3cb33 + +Count = 47 +Adata = d2445db6efecaa3f426b06de8d496ceed54a1d0171384cc762e21b31e265c6d5 +Payload = 8fe8b383 +CT = f11347c32ca874d18d0b790856837555f4d4699a + +Count = 48 +Adata = 8cda7d1e135cf5fde1ec9473c4b42c1bbb445c27fd87b5f73df61ceb2d0b6f75 +Payload = d8d6b2c9 +CT = a62d4689932c2f8d78e322aaffc90846025190f1 + +Count = 49 +Adata = b506a6ba900c1147c806775324b36eb376aa01d4c3eef6f5a4c25393ecbf2025 +Payload = 6a029e53 +CT = 14f96a13c346a4084918081b4bbe53b50d896788 + +[Plen = 5] + +Key = 3725c7905bfaca415908c617b78f8dee +Nonce = c98ec4473e051a4d4ac56fd082 + +Count = 50 +Adata = 11bc87f1c2d2076ba47c5cb530dd6c2a224f7a0f7f554e23d7d29077c7787680 +Payload = f5499a7082 +CT = e378b776242066751af249d521c6eaebdff40b2642 + +Count = 51 +Adata = d54219ef4fb851bebd1c546011ae3922b8337e19c28d4d58428efd66f80edcf0 +Payload = 513c46fcce +CT = 470d6bfa68e7258df363e0e9af67a543c86db3c994 + +Count = 52 +Adata = a92e88edd297da8c7089e21822b3e6cffd6837c78b975c8413fd6cca1b99bcb0 +Payload = 9d62e557c3 +CT = 8b53c8516572b7573e5b27a1d0e15cdb7b06c8857f + +Count = 53 +Adata = 77d9c306aa257379053cf1f2043c388a301dac2a9e2bb89eb8bab6eb3f150fe3 +Payload = 7a05db235f +CT = 6c34f625f9de691a412ad54bbdb6ceac45ed45902b + +Count = 54 +Adata = 081568ae0b948aa647b9d4dda5d42641ad5de72aa9874d8d0717d872007720a8 +Payload = 30a22ca0fc +CT = 269301a65a8a1bb8ba3d6763dcb1bdd3400e3459f7 + +Count = 55 +Adata = 695ba4dea0f84baf190ec25a25fc00cb9898902d7a17e6f5ff2df323b974f7c4 +Payload = 35e25aa51f +CT = 23d377a3b9403897d496cabcd5bd9de3282199a8ed + +Count = 56 +Adata = 1f3ba0336a634efdd11f8168c0fe25039f9403bfa70b3898f4dbe577dbd52957 +Payload = 8bde704c74 +CT = 9def5d4ad270a81f7cb0ab7ab2b495f51d66abeee5 + +Count = 57 +Adata = 097b9ebff3ff93a143678d59721fdf359e95cbc82585ae47727a773317925d38 +Payload = 428542ecfb +CT = 54b46fea5dce68e9b01a4462a2221bd2f3cadf64c0 + +Count = 58 +Adata = 76d0341dd44c39e43a23dbcf4cb602f15d5fb9fee20c3d0d262d539c3fd1dfd5 +Payload = bd6866ded0 +CT = ab594bd876f2545964ef3978cad3387d61104bab84 + +Count = 59 +Adata = 7e7c40ad64b511005b4546f9ec61ca24829390fbc4bd8507225bc348ae0807d7 +Payload = 5822755a3e +CT = 4e13585c98002c41938a935d51905b2a708a2c5194 + +[Plen = 6] + +Key = 80bead98a05d1bb173cd4fca463b8fa3 +Nonce = 8a14a6d255aa4032ebff37a3d7 + +Count = 60 +Adata = bb4e706e73d21df66f64173859d47e247527cd9832e20dccff8548ed5f554108 +Payload = e479990bf082 +CT = 89c9246238878427f36b1f6c633e4542f32b50ca8edb + +Count = 61 +Adata = 9db2182c8a4f5471082bfa1a8496602cbcdef2790f7e8f71f791303bd48dcb05 +Payload = 017a7fd1aecb +CT = 6ccac2b866ced76fe54da69af5edf8309c7f013bb07e + +Count = 62 +Adata = bf483f59fb73681f27b68168c998c90ea8ceea997654c6fab2bd737dcdc884f9 +Payload = 512fc5e4973a +CT = 3c9f788d5f3f662f53d17f7cb6673415bb2324ca0666 + +Count = 63 +Adata = b91e641d8210e1ef705fec2beb9f58a391c7d1a38935cd1d13f2c00363388ff5 +Payload = 06212e989616 +CT = 6b9193f15e1340c86156b1065b64af1e4d6c89b32603 + +Count = 64 +Adata = 5cebf908e232d797fcce8453c4c3000868d4172622a4ee0d6a1bdd876a0b7c96 +Payload = c45629069ebc +CT = a9e6946f56b9c07ef5349903b928e39e99e2e32625de + +Count = 65 +Adata = ab92cbc97f3aa6f9ea4dae5d8c3d9e91231f43ffff548da7b668e61c183ac2cf +Payload = b949ced37725 +CT = d4f973babf205e40654ea16e83cc6faeaad668c416f3 + +Count = 66 +Adata = 2c3d2f9c7e89c2b9e07317c4db6e9f00f5faadfad531c5bea79d164ac24d4543 +Payload = 517ff7b383b7 +CT = 3ccf4ada4bb23102a502dbba0c280e1d5fc627fe3a9e + +Count = 67 +Adata = d798e77ab0f3697768f23014fd31b9e8762ae65b6aa8a4bbc17ecb8cbe78461f +Payload = b40d863ca4ff +CT = d9bd3b556cfa6745fd4c954396e696697731e1f9a262 + +Count = 68 +Adata = 45b44e3dec57e24d960fd1767797ffdbbab81e38bab37e6974df262c3d932327 +Payload = 56e00289a003 +CT = 3b50bfe06806bdf2b2dd47077c98234eae5d47c3b594 + +Count = 69 +Adata = 645d27970ccce096d082fccfc1183955bad2611af0dd7c58c9d54430f28bd992 +Payload = aa22bb1de579 +CT = c79206742d7cea66649ad7e204a344d3234125aa324b + +[Plen = 7] + +Key = dc8ec91184ba18eae31ac2d3b252673f +Nonce = 0da4c988f521f5648259f2bec2 + +Count = 70 +Adata = 6d5573c9279897d7d1602d8a95c04bb5ca3fad2dbe89a024b3651eb227e73bb5 +Payload = 2a5775986551c8 +CT = 4f259f2a718faea852a7c4358dfa9f5467357638acac90 + +Count = 71 +Adata = ff0ab5021ef466e2e898b0993d691145168be558682c74914c172f2b5e863754 +Payload = 8db3c1ca0580f9 +CT = e8c12b78115e9f8767c76e707d48a2144e090812e0192d + +Count = 72 +Adata = 2ee03cc28f79773af139c4ea55ec4daa48bb2885b8adcd5f066eceda5c4ec27b +Payload = 3c69e2e83236b6 +CT = 591b085a26e8d05486df740083c959fb62ef7e2e221602 + +Count = 73 +Adata = f041504d4c1b3d5be358bd6d350af42921205d29ab22b44ffe221358adef5bb4 +Payload = 777828ab5ccb68 +CT = 120ac21948150ebdc4d2b86b2528f75db4a7f5423f4395 + +Count = 74 +Adata = 81ea116832d69542ac8d3d22c16c82eecf2ccac39264dd933c4f9c13c8d0f1d4 +Payload = af556fef3584e3 +CT = ca27855d215a85a7b06d1b710baa15daef19069ecf46f0 + +Count = 75 +Adata = 8a0a120ed290a62456f002da1c250a0ddb1ebd57185a733d8fb562aad482679d +Payload = 98f26635351f14 +CT = fd808c8721c1723811129add52e1406d50cbff4aa82802 + +Count = 76 +Adata = 12b5a76faedf6f855e328c2cb87be8aea78c5e926b32d828e167b46205c86de5 +Payload = bd22c1ec05dc26 +CT = d8502b5e1102401563d3da8a6cabb7515f642e42fb4b2e + +Count = 77 +Adata = 8dc32f35ef4bcbfd040ad25dc36d0bd2486f93d0cabb7704cd1582dc99f65449 +Payload = 2a87c0d64806fe +CT = 4ff52a645cd89817609a21f703253e5e56beef4ac71759 + +Count = 78 +Adata = 83ced632359a11eb0c4c99baad84df5cac15bc5453b6593d9ffb4c5e8c84037f +Payload = f05f39eb0a3d64 +CT = 952dd3591ee302236c72f98da859b54be7c598d85c37eb + +Count = 79 +Adata = 771a818a24e7da7b98f4b4291ef34bec7e1656b0c6c6e9474a989a04ea7de385 +Payload = 59dad755af92c2 +CT = 3ca83de7bb4ca464c8cd38cbcc46e7f09bf3e1c6590c71 + +[Plen = 8] + +Key = 19f97ef5318b8005fc7133fa31dd1236 +Nonce = 01ce9814c6329dbee1d02b1321 + +Count = 80 +Adata = 85853f120981f33cf1d50fde6b8bc865fe988a9f12579acdb336f9f992b08b89 +Payload = 6d972a673fbe1ca1 +CT = 2f12a7e7acecae5d2563309efc19368cdee8266538ca89d3 + +Count = 81 +Adata = a4ec5aee89e2cce2115b6c1f42570bc5062887cad08192a682d0b4508fcd936a +Payload = 68b1b6367a15fe49 +CT = 2a343bb6e9474cb528096a5fec5e5359c369833eac3b7efb + +Count = 82 +Adata = f5499a7082bf1e6e2923211271f5f7f6d7c7b26db7963071705a58ddc4dca0dd +Payload = 707023615563a40e +CT = 32f5aee1c63116f2754a65863efb60c98dbb536e2b5a69d8 + +Count = 83 +Adata = 765f267befe6fcfaaa4b46eda32e7bfab87f12ceb07fa3b37be74965bb664a21 +Payload = b56454bc50df3e28 +CT = f7e1d93cc38d8cd40b6e9b7f3b3541ffee66a1f668f67d28 + +Count = 84 +Adata = 9ce65598cd1f86afc9aaaf172809570cc306333c25523f863c6d0e0154c55e40 +Payload = 962f765da3565bde +CT = d4aafbdd3004e9227018c9db8baf6be349d93d4eef7d7c9d + +Count = 85 +Adata = d0125e30c36232a8c07cee9abc53453b276849a7c04ade80ad586ed8cbcede51 +Payload = 4f18bcc8ee0bbb80 +CT = 0d9d31487d59097c501b28887f05fd66f050525943d101f8 + +Count = 86 +Adata = 90dfd9e7bb7bf8fb70c22a879ffa760d14cda7b79ce4968f69b8a7f2b7a59642 +Payload = ca293c9e1780b401 +CT = 88acb11e84d206fdda53dde2e1aef96b3658a7635ee54188 + +Count = 87 +Adata = 58f518710e6b282482a7f1950fa353b13bdda10c9aaea6d5f0d7ea0a965d31e8 +Payload = b9df9fb4a6b299b4 +CT = fb5a123435e02b48b62a5ec234f1efd1b52c8fad1cf09890 + +Count = 88 +Adata = df052e95aea3769a433ce4e4e800b8418649bbe8c6297eb07545e6802de7e807 +Payload = fb2441d1594a488a +CT = b9a1cc51ca18fa76bc051ede6f37cf67543a7252d7d9b203 + +Count = 89 +Adata = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Payload = 451101250ec6f266 +CT = 07948ca59d94409a5be4be6bc6b18104fac167b6e3fc15f7 + +[Plen = 9] + +Key = c17944bfaeeb808eed66ae7242ab545f +Nonce = 910b3db64df3728ca98219e01b + +Count = 90 +Adata = edf64f98b3ab593cbcf68ab37a8c9472e49cb849d4a744deae925a5a43faf262 +Payload = 7caae2640e734539d3 +CT = 0dae8b3ccf0b439f6ff8ee4a233dfb7753f6bfe321b3e26959 + +Count = 91 +Adata = 29ac8fd6a20a5df4ec79660c44d373da42de7d7c5fc35982b6c29b480723b484 +Payload = e574b3a37af3bf2251 +CT = 9470dafbbb8bb984ed63b1477d9506a51ae23abbac179d8b02 + +Count = 92 +Adata = 9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385 +Payload = 2e3cf0af8c96c7b227 +CT = 5f3899f74deec1149bdb0986198bce2e486581c041029a81d9 + +Count = 93 +Adata = cc8e789462879e348d20be4e1161d7b7fc6f8371d8f8cb2d25d13f0e07de47b0 +Payload = 16f22817c5b79f9fa6 +CT = 67f6414f04cf99391a0cbb2df2079a6eb964c3469f4f326122 + +Count = 94 +Adata = c63061f2800228269015693336f78bb535ae8b88869e4ccf4ead2f3b0ea4e48a +Payload = 64fe8076d4e8538e18 +CT = 15fae92e15905528a4a40ca7622acf7266b7c24cf0c3202e4c + +Count = 95 +Adata = 71c14a7031033db15bfe23b75fed9daf8886dd11392a0b787660e7b1a581af11 +Payload = 4814aaac48bdf43c92 +CT = 3910c3f489c5f29a2e7de20e98586cd5d684bf015a7abbe82c + +Count = 96 +Adata = 8f4947f8588ed866ed7477d7f1a28046430c6470806a50e3c9e80958c61f1b42 +Payload = 392a692b57a8a97f60 +CT = 482e007396d0afd9dc8d503f5d87818f7c0e173b857cef4288 + +Count = 97 +Adata = 9d44f6df58c2b43db67e3daa95b176c81daff32e996d670e86405e15eae72e93 +Payload = cba1e00e345b0cb7eb +CT = baa58956f5230a1157c85e2283d9e80700268a6459d1451d00 + +Count = 98 +Adata = b6ada12f7a28211e9d2c07cbb3d39fa77aadc077b34c46f93006c1ca2ff66f87 +Payload = 22f5b6752582919dc1 +CT = 53f1df2de4fa973b7d1056aea3d3e4f7a5219170aaa52465e1 + +Count = 99 +Adata = d6411fd5b25433f67ca75e4560ceb809d3721266beec358dde126b2f6a514137 +Payload = 6e1b55d6f5288c5451 +CT = 1f1f3c8e34508af2edfbfcf8200a8a3f8d995f50284a7280c8 + +[Plen = 10] + +Key = 0fb9df6f638847f5de371f003dd938f4 +Nonce = c9ddf61c052f3502ad6b229819 + +Count = 100 +Adata = 4f9938d5bc3dcbe47f6b256d5e99723d0891e50c6175aba41b011e4686113c49 +Payload = e10cc36bc1c5d3c646ab +CT = 7f797367de50be6dc04e4cf0d8c24189affd35060cb7ca3dd136 + +Count = 101 +Adata = e013a2edd5b86bab8df5c9940d0a0c864478c1ad42668304a643141855adac10 +Payload = 15841284c959febe63f9 +CT = 8bf1a288d6cc9315e51c4148ef85caab151488c1a6b3df540d21 + +Count = 102 +Adata = 147d77d509f642189594df17574a0ce62b52a838feb62310e11533995ba4c851 +Payload = a8b4e5829069c335d1d8 +CT = 36c1558e8ffcae9e573ddaaa1e7c22b3efa8362abb3d31ee8884 + +Count = 103 +Adata = 0bb09658e23fe8a08c01a6994ef36cb8dcc9a806297a09c67efe3558ca56bb5d +Payload = 1bb2da0f1ae7e044deb0 +CT = 85c76a0305728def5855317b141383ad38dd78569d5f846f2520 + +Count = 104 +Adata = 34eb2e6149bad764837f6f25ddd96865e5b05d5cbf233c4f6cc2aa654dfea3b7 +Payload = 63af538196add9b3fad2 +CT = fddae38d8938b4187c374e6432971aecf6bf7cf5244d21f7f173 + +Count = 105 +Adata = b69f26fda6d1cd92897e03758cae020c4e1beb019ce5ad987f872940780a9468 +Payload = 6ef2df5a1688ae795537 +CT = f0876f56091dc3d2d3d2e4d0ffc0f0add38a80c7ffe6b4701e54 + +Count = 106 +Adata = a7375ba32251af0138bd9fd8fcd56a7c43ab2ca9a7fc0117d25f6d4ef9c2fcbc +Payload = 3f46c83021069ac488a1 +CT = a133783c3e93f76f0e4447fdd0b2f29f39094ba5a7375e278349 + +Count = 107 +Adata = f9b91f7298b4e43843fc739a2f41c57c3f2cf36378fe4c34b574a43f9cedee7b +Payload = 86c10a6dfdd6a06ef638 +CT = 18b4ba61e243cdc570dd57500f913ee3f46801e1bba9d4db7ecf + +Count = 108 +Adata = 9d35876d9449a1642b5062dfbfc7a26a7ac080b7198f4aeff2c79e463565cfd2 +Payload = 196c80d02b663bdd89fd +CT = 871930dc34f356760f1856a6b87519b4807a2114ced587f72189 + +Count = 109 +Adata = f2d5e927eb507f889efc6f21d783851f638f978c74960cc347f89f2703476114 +Payload = bd27ae3ade0781a33d5f +CT = 23521e36c192ec08bbba2101012808adefe9b8166e04685bd537 + +[Plen = 11] + +Key = 006ff7d3153caf906ec7929f5aef9276 +Nonce = 57db1541a185bd9cdc34d62025 + +Count = 110 +Adata = 7d9681cac38e778fba11f4464f69ed9ebfea31b7ffcaf2925b3381c65d975974 +Payload = 31be1b241cae79c54c2446 +CT = 9dd8a4244fbdb30b624578a625c43233476bbb959acd9edebe2883 + +Count = 111 +Adata = 1b0012c468009bd2851653013782c7b71ef43c393afd4dc0aec4d6d0c3fa11c5 +Payload = 8802831e22092b30110cf7 +CT = 24643c1e711ae1fe3f6dc9d477ca066ec2befa854a1faef018ea8b + +Count = 112 +Adata = 48b216375c00ca7e9c4048834b37944d2543e24fa091fb3c7290e11c53a6b6a0 +Payload = 3b3f782d637319d7fd161d +CT = 9759c72d3060d319d37723eb6be9a78dfbd9e16181679b782969ad + +Count = 113 +Adata = f3e06a45fcf1f6abeb00727bf2c9bcea00ce621d38f7b7eba17c27e51f04c793 +Payload = e98f5e5a20d02c80372d6d +CT = 45e9e15a73c3e64e194c533d9574d95b821a5170e9b61d8e6b2ff3 + +Count = 114 +Adata = b36e27729f9a139d8ec4f61215b7bf1149cbb4d93a5c14bebd7cfb7c6fe585cb +Payload = ceeed4fde3406ec40f7ac6 +CT = 62886bfdb053a40a211bf8aa193d257907be1330abaa56bc4f431a + +Count = 115 +Adata = 8886ed7fa414d74aef704a9751b197cbab02c41c6aedcaf65cda019dc2d2d815 +Payload = b38f03449883773135c0cd +CT = 1fe9bc44cb90bdff1ba1f31d92029a6428748664b5c815f15ca1b7 + +Count = 116 +Adata = 816d81af167d2294497d9b06a39fdf75e37cbacf4d10c3a444068c891b361bba +Payload = 8efb141db7b77c521003cf +CT = 229dab1de4a4b69c3e62f1386e4ad7c72ce0081a85d4cfd34254c7 + +Count = 117 +Adata = f427c47e10c45bb3c7e75e9e604503b3560427691470358efdef48ddaf3794d2 +Payload = 6dc38e37d1379732df4dd5 +CT = c1a5313782245dfcf12ceb98eeb05bc376a1042735569d5b63f8fa + +Count = 118 +Adata = f3df712b5e8dd8e4aa8b7c5f41e93bd11b0df66a3456a01f3d0094ad91482cdb +Payload = e0e358aff203369dd5960c +CT = 4c85e7afa110fc53fbf732065b03ebeb68a9153cb4ed152ce0d64c + +Count = 119 +Adata = 264f2c7b095a296eb8ff6b5151ab3d9497ea8dc0002a9e5b09c2fd0ccd32b6ff +Payload = 57b940550a383b40f3c308 +CT = fbdfff55592bf18edda236fcd16c8360a408e2787f930ed275bf3f + +[Plen = 12] + +Key = 026331e98aba9e8c23a9e8a91d0b0c97 +Nonce = bccfe69bba168b81cbdf7d018a + +Count = 120 +Adata = 26e011143a686a7224ddb8c5b1e5d31713fa22c386785e2c34f498ae56d07ed5 +Payload = a82200ef3a08c390dec5cbf9 +CT = adf4fc6f9be113066c09248fcb56a9c1a1c3bb16fbb9fbaedacdb12b + +Count = 121 +Adata = 97a720ae4720546e31263a1a538ce1d35c198c23bd4362e0023a67536328ab9a +Payload = 7fc58d1bb450b396b9161f53 +CT = 7a13719b15b963000bdaf025002120b619a391fbd23402e5edd4949e + +Count = 122 +Adata = aff6c8cefda055c67262e9c68825d1ad2a7488e5b09640a111fabf6254d96cc0 +Payload = e9ea182d7f895f312b9738db +CT = ec3ce4adde608fa7995bd7ad48b6e9a8de0099a28cebbf5c2bad42ff + +Count = 123 +Adata = 35a3963b43f47855ef3df12af5de3626e0c5c8d9cd2a534c737cd695609b05a9 +Payload = cfbc8bcbb5e5bb744bb1f340 +CT = ca6a774b140c6be2f97d1c36df80fd62e751757bb0a32a987980afe6 + +Count = 124 +Adata = 46a2e6bd3fd5336abf02eace3cd1e1f6dde505ab976a9fa596edd6fbde7175de +Payload = a334f8f41897cbcaeb5cffdf +CT = a6e20474b97e1b5c599010a93b211350c70adf9bab5c01081bdc6a99 + +Count = 125 +Adata = d110651c00ac5540f9d1ed9eb175e06b97163fc36d43f048565e5d0c30a069b1 +Payload = 3f781267290e8e73c6355e75 +CT = 3aaeeee788e75ee574f9b103d7f65690d9a2fb6759d658c9bdfdfc37 + +Count = 126 +Adata = 978644dc4e36f1d98a2a63e19bbf8af11785d09fce58a95c00cc6bf6cecf6161 +Payload = 3dc39dbb91efe8b16396d488 +CT = 3815613b30063827d15a3bfe0d5df472f49e7f713cd1373293810906 + +Count = 127 +Adata = 5ae7528c5e965880b1533cbd78c1e81a8187379327a2fc3f76ff45829049e183 +Payload = 6caa8c0764512baa39dabac0 +CT = 697c7087c5b8fb3c8b1655b64bfca9ef00b0f2bbb03c1a3f7a0862e7 + +Count = 128 +Adata = afe754828be6e3731d3eee54b021b4fa182247bd958e9074fb0094a11030f5e8 +Payload = b19bc92e2305883580dd7742 +CT = b44d35ae82ec58a332119834a03be1d1d262b03c0ab425d533fe4ec1 + +Count = 129 +Adata = 0650859c635654ca4d815963c0a99f9d2f47456ad37f739c425e924d4360bd7e +Payload = dab87e79544df1cc98096b91 +CT = df6e82f9f5a4215a2ac584e7da61ca8461925996880e2874393232d6 + +[Plen = 13] + +Key = d32088d50df9aba14d9022c870a0cb85 +Nonce = e16c69861efc206e85aab1255e + +Count = 130 +Adata = 0eff7d7bcceb873c3203a8df74f4e91b04bd607ec11202f96cfeb99f5bcdb7aa +Payload = 4b10788c1a03bca656f04f1f98 +CT = 89f15b1cb665a8851da03b874ca6f73242f2f227350c0277e4e72cdaa6 + +Count = 131 +Adata = a533b3279db530eaed425842b0d3528f5c5e4c16acfa0f49de43d6491f0060a9 +Payload = de6ea86d3641d916c4394fdd31 +CT = 1c8f8bfd9a27cd358f693b45e594271cc06f81d510075728cfeb89222c + +Count = 132 +Adata = 8e6c1cde142e18635c1b4f0cb54d3cf817f22ad7c25bf6a022501682f6a7da1c +Payload = 6f3b32adc8c0314872947f3d31 +CT = adda113d64a6256b39c40ba5e5ab1aefed75400a41447b2bd8f0605542 + +Count = 133 +Adata = 248a4389da2d51b87907dc11c46253515503ba80de5d06c9b505cb89906614a6 +Payload = 0cc992a8c736b44fedb4ad498f +CT = ce28b1386b50a06ca6e4d9d15b46b3a6463876f1a43a287748f339e913 + +Count = 134 +Adata = 2e2c8244a2cbf53816b59e413207fb75f9c5ce1af06e67d182d3250ea3283bcb +Payload = 98104fd3f3413ad1f57ef4912c +CT = 5af16c435f272ef2be2e8009f8f625786bdc58af24b17c1ba34fa87baa + +Count = 135 +Adata = 4ada86d88d5f49dfcde13fc30ba9a1af58d5254b47fb1885a20fad915c87952e +Payload = 3b4fec79d52d8b2a533917b75f +CT = f9aecfe9794b9f091869632f8bd4a918290cf97208232c76908514b07a + +Count = 136 +Adata = 9e3b23232e5a9e69747f8bcb148cd6d282fd9b7ecd6d97e8bb5cdc261b2fc86f +Payload = f10c19c76ae7ed55e1651155df +CT = 33ed3a57c681f976aa3565cd0b01d6306bb91c315bb4a23fe23d496d09 + +Count = 137 +Adata = ccea2c815ea4efadc3007f511d633e98f9fa38b0e0fb572b282ed6a610adf7a9 +Payload = fa34af376868d9a49aa200f59a +CT = 38d58ca7c40ecd87d1f2746d4e620d9d3004587c5d510e2a857fc857ea + +Count = 138 +Adata = f7277fb296e2c0d2c9ceb7013ea8b59fe37e26b3b42a0b8cd01aaaa8d35283d4 +Payload = abe2fd996bb6804ed3286c057d +CT = 6903de09c7d0946d9878189da982d2438a5138977bde5f514e2335c28c + +Count = 139 +Adata = 14dd1810df3eeee78ed3836c77edf510d91ea28f119bf57111e580d70da94b74 +Payload = 395ea6979b77dabd2042aee4ff +CT = fbbf85073711ce9e6b12da7c2b78100a05448fa6e74bd3ed16c3bd364e + +[Plen = 14] + +Key = 7301c907b9d2aaac355c5416ff25c59b +Nonce = 7304b65b6dab466273862c88b9 + +Count = 140 +Adata = 2c5d114eff62c527cc2e03c33c595a80fe609bfc0fe13ce3380efe05d85cceac +Payload = 484300aa3a506afcd313b49ead8d +CT = 928ca58b0d373dc50c52afac787ce8eeb5d5b493661259a9d91ea31a5f7e + +Count = 141 +Adata = d9ebc1cbfab9034317132a72e0f11c341331146a59e7a2f26bf4f3d778da52c4 +Payload = 8b318f75ed79a7978adc17c4d2d4 +CT = 51fe2a54da1ef0ae559d0cf60725552193439abfedda67d765d030cef30b + +Count = 142 +Adata = 9aea86b9fbd9bd4504ee2e25054942b33d3cdbd84215db7ea337e548cb706780 +Payload = 0256b0d154c768c85070da6ea8c7 +CT = d89915f063a03ff18f31c15c7d3615013c2bc9338868fad0d2fac11df019 + +Count = 143 +Adata = 08afe10bbfbd65b948a6561bbeaf3ab46a8e3d0a861f1cfc46584156197f30a3 +Payload = 89ed296a3ac03fbfb71422b92117 +CT = 53228c4b0da768866855398bf4e66c3c4cb8c50891d6523245e4c619aa99 + +Count = 144 +Adata = 7d653792bb8683e07c7d2c800db6f7f08343c85af2377115df4fc86ff7d8fcaa +Payload = 414b6acb1db479028f5cc8800f2b +CT = 9b84cfea2ad32e3b501dd3b2dada792d2cb93e45811a4c897ae9d907c9cf + +Count = 145 +Adata = 4d73c1484f9429eb15742f29ab05cbab6552abf40e127b93427d649d195ed25a +Payload = 163f67b3766c3c650ce26c5bd8b5 +CT = ccf0c292410b6b5cd3a377690d441983a87812eaa7b66c5a0e54a01cb882 + +Count = 146 +Adata = 2fba7a881f019a8745691343d79ef3656e25bb37b93fb5ab7311889f92010a5f +Payload = 9c5b4aa703c27d16d82013853e16 +CT = 4694ef8634a52a2f076108b7ebe7b0afabd23b33765a63753cad66b0e6db + +Count = 147 +Adata = a640343fd4a866aec07b667d25176e11a32fb4d8bfc08fde2c46dc9b492fa010 +Payload = 99eb86b3202c7ce68a2339065f47 +CT = 43242392174b2bdf556222348ab639b8d0f97540373a7b9061aa3b2f7044 + +Count = 148 +Adata = 9efd58d3ef5f74f663b2b5ca5e96c5a2fe85ca5eac1495d7f1751c7d8b412b3e +Payload = 3f5c1d038161e65c9ed955c961af +CT = e593b822b606b16541984efbb45e312c803e29f7be7c5eb236401037a320 + +Count = 149 +Adata = a7d7ba684c0903323f7efc83dc32815195df325394162fb5a18f201047be7999 +Payload = be8dea2b4e602a787ecd28f2f7f0 +CT = 64424f0a79077d41a18c33c02201fd929c717d75388387dc25bfcf90b707 + +[Plen = 15] + +Key = 38be46d271bf868c198052391f8a2147 +Nonce = 6758f67db9bfea5f0e0972e08b + +Count = 150 +Adata = c6de3be97f11d0e2ab85c9353b783f25b37366a78a2012cecf5b7a87138b3c86 +Payload = 61bd1385be92097e866550a55278f0 +CT = 7c9fa8d99b38f825315ece6a2613f55e902f296dcce870263ae50cda4fadae + +Count = 151 +Adata = 7c8cf9c650511f33af82e807e60336ec086bd2d9400a5f35652b8c3fcf968ead +Payload = 7e5e51301fa44a21f2734731ee3710 +CT = 637cea6c3a0ebb7a4548d9fe9a5c15cae8a9e4b606f5fbeac2b829b42a150a + +Count = 152 +Adata = 5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975 +Payload = 9cea3b061e5c402d48497ea4948d75 +CT = 81c8805a3bf6b176ff72e06be0e670f5419c6085e5434f056162cf80f6729d + +Count = 153 +Adata = 238d3c9d9de32f2040b1dd0dd040b921e456c3653263f4020cffdc552b948a46 +Payload = 20660408d6890aed84aa65dfe23032 +CT = 3d44bf54f323fbb63391fb10965b377fedcc743389a9d48e6b871dc0dd63b2 + +Count = 154 +Adata = 3b5d61ca21953fdd22280747dd4ae908a511750127875da84dfe7d0063a318c9 +Payload = 9ab83c81f2d2c896c6596660c3974d +CT = 879a87ddd77839cd7162f8afb7fc488137e0a856d3d911af9f420b68d8110d + +Count = 155 +Adata = 78c1751e86144a78285a30dc04f51742bd47e3d36b607bab48d91cddabfff4b7 +Payload = c1ec469aa9c73b677af225a9f5f6f8 +CT = dccefdc68c6dca3ccdc9bb66819dfd5644448fa8445b6cd185bdf9b3718033 + +Count = 156 +Adata = add33e9a1d7e91e2c160c1123537e3f7e3535881cb4aac1a80ecbe367379212c +Payload = 9df1d6b6debffdd316aeb27143508e +CT = 80d36deafb150c88a1952cbe373b8bbd38e4dc44f768cef0c51344e3a7f7b8 + +Count = 157 +Adata = df7736560b1a13aa8e536500ea6cdb9a6757309aadf25a6a9189055a309c3f8b +Payload = 19eef017100dc82f26ed0815c55c12 +CT = 04cc4b4b35a7397491d696dab137172e7f2ec918099898b843a34c385f2a57 + +Count = 158 +Adata = b40c8d22069b8a65cddb51c1ea3571160cacb19fd371552436b19c7122b28d08 +Payload = 2af5db43f2a5fe8b494b40661510bb +CT = 37d7601fd70f0fd0fe70dea9617bbe94c2709685b0827cc42f3a25b579db28 + +Count = 159 +Adata = 9de5559ea8ccc70f4375a436ce0b72551a75960ad5ed6a1949ee8f6c47548558 +Payload = 5de41a8ca8ed8011304fa9e9f36498 +CT = 40c6a1d08d47714a87743726870f9d63bf4b40ce7e672587816fdcda16efbe + +[Plen = 16] + +Key = 70010ed90e6186ecad41f0d3c7c42ff8 +Nonce = a5f4f4986e98472965f5abcc4b + +Count = 160 +Adata = 3fec0e5cc24d67139437cbc8112414fc8daccd1a94b49a4c76e2d39303547317 +Payload = be322f58efa7f8c68a635e0b9cce77f2 +CT = 8e4425ae573974f0f0693a188b525812eef08e3fb15f4227e0d989a4d587a8cf + +Count = 161 +Adata = b6fecd1edeb55a9a4148b1aefb716a1e162779a5ab2a682e4adce4479c527bd2 +Payload = 0e6118d0409751d36cb642504678535e +CT = 3e171226f809dde516bc264351e47cbedf7f186e8d3d7c21c549c41ebcc7f505 + +Count = 162 +Adata = 5c3933c30bf9d4841eff4000aaa1cb4d39cdf8ef1240e2aabbf9da95bdee5270 +Payload = 5c8a5fb36f860d00c21ae9e3f24097c4 +CT = 6cfc5545d7188136b8108df0e5dcb824810a68be1814f53c09aca4066527fef8 + +Count = 163 +Adata = 7ca7ef30d3ac08aa51a9e5d3d84e8b6bb7fdde921e72b98ad6a93ebf2efc6b04 +Payload = ebd1cb4b35257790c9806be476bd25a3 +CT = dba7c1bd8dbbfba6b38a0ff761210a43cc30245a6e64625c4f6531d7497fb144 + +Count = 164 +Adata = 90f1416768fca7dd48d01230dabf95f2f1a0c044bf2d755448aaf72316c8448c +Payload = 842b7e5f22d921b2b8ab3131684b7eff +CT = b45d74a99a47ad84c2a155227fd7511f10d85725dacc274034669acf7f34fed7 + +Count = 165 +Adata = adc5c36849283d57acb2bcbc0e12465cb7c1830cb4e314b9ce6e25acbd8d460c +Payload = f0c2cc5a1b4c4cbe839338fa0d7a3435 +CT = c0b4c6aca3d2c088f9995ce91ae61bd5f731b465eb59c4989e42020d86102a59 + +Count = 166 +Adata = 80a7a483d1dbcdf00ed02a700e93d8b87fa6ac5c7368d1e81bd1b32cd1621cd7 +Payload = 2c1a5f906f2ae0373cc25e3519df2ba4 +CT = 1c6c5566d7b46c0146c83a260e43044484bcd2775448447ed801b3b0ff071c19 + +Count = 167 +Adata = 13c02992992d2708250184a579c43bc29a3a8cf1e02dade4496cbd8b1214f97d +Payload = 1da5190517546f1ad852f64263e1f679 +CT = 2dd313f3afcae32ca2589251747dd99901d1919f1451ad16f115cde863f15303 + +Count = 168 +Adata = f6f18dfe093e4c0c3fbfa8a5b1f4a703c08addc2ab959741611a594b93d08bf7 +Payload = 13ccb08a580efea53dfba6a59626bbe2 +CT = 23baba7ce090729347f1c2b681ba9402ccae4f6ec07bf73d6f086cf09e2e14ed + +Count = 169 +Adata = 63708e12dfa14f192ec5ee5856dc3cf2403817d9628c31899b4613f65e1e61c2 +Payload = e0b5fbc6c2269d445a60273bf844892b +CT = d0c3f1307ab81172206a4328efd8a6cb2bad8bf67d32a855c3940ac908397a5f + +[Plen = 17] + +Key = 79eae5baddc5887bdf3031fd1d65085b +Nonce = 9da59614535d1fad35f2ece00f + +Count = 170 +Adata = 46603500af9e4e7a2f9545411a58b21a6efd21f2b5f315d02d964c09270145b3 +Payload = 001343e6191f5f1738e7d19d4eec2b9592 +CT = 2162e27bfbf1d00f2404754a254665fd9270f0edb415993588b2535e2e0e4fd086 + +Count = 171 +Adata = 278afebc604bb7d87bed3574a2c5053de17eb8ca7e18ddc7892f2c54b38104a8 +Payload = ba47d5bfb36f6150a100e36caa116405c4 +CT = 9b3674225181ee48bde347bbc1bb2a6dc4778e3c4a11f3f9dc42554d45796379ef + +Count = 172 +Adata = 3239b2ce4efe4f6a6255dc53347400a6446ed3280c65422386fab471ef09eed6 +Payload = 96eccb7f9b0e16c6883de0a381e4767f5a +CT = b79d6ae279e099de94de4474ea4e38175aab5540cc01d867f641c9b196fa159291 + +Count = 173 +Adata = e2a5488d5f7930ea4ce399f2a6c0810265f7c0dc52fe824d19a0fa0d9ffd55e6 +Payload = d68f5990da1a2fe39ed81af145ab834fa4 +CT = f7fef80d38f4a0fb823bbe262e01cd27a46366fbe302e142dcf6aa16337d98550f + +Count = 174 +Adata = 0071f1edb3a0ce57af3c88bb0ccf138f752697a77e55695838fb39de04c78dfb +Payload = cdd4d8b3d8f6e4742793b456cefc9e686d +CT = eca5792e3a186b6c3b701081a556d0006df88c07797267bf5a49b3d0f601a225ce + +Count = 175 +Adata = f5d6989587e463969d97aadabea9538511f8d109cc2d3cecf09ba7cc346aaea0 +Payload = e7d7fc60ae852b68102e01b506f9dab986 +CT = c6a65dfd4c6ba4700ccda5626d5394d1865c9fbf69d81cef238ac513562d4a0dd5 + +Count = 176 +Adata = e0b5fbc6c2269d445a60273bf844892b26fed03b82869edacd6dd7a63fd69e8d +Payload = be9f51abfbe2da5a56db0f9a31b67c9f83 +CT = 9feef036190c55424a38ab4d5a1c32f783e2c748c8c9e3190de095de8eb0650203 + +Count = 177 +Adata = e6bd0010c98e60b9af7cf905c58e0653bc425e2ccc809bd4f9cd7b1f95c18786 +Payload = 81b9c73029cea1936ef8755c80ba8d4093 +CT = a0c866adcb202e8b721bd18beb10c3289305cf563c5b4ba4ebd5bf107f2ad3555b + +Count = 178 +Adata = b1688cbc058816974694cd26c0f28ba9418e9912867fc8c5f4e7bd9c891a8d2e +Payload = 618dc26853ee339689467ffbc2a77be69e +CT = 40fc63f5b100bc8e95a5db2ca90d358e9e60dbbd8f46343c8442b03a472da4e23f + +Count = 179 +Adata = 469e004fee9878ed40621b41d04ec34af175f213d64d16e2f77d0bb2b6efe2e3 +Payload = 4f18bcc8ee0bbb80de30a9e08629323116 +CT = 6e691d550ce53498c2d30d37ed837c591643352e46995e8c1aee43dbdb26b46c30 + +[Plen = 18] + +Key = c14eda0f958465246fe6ab541e5dfd75 +Nonce = 32b63ca7e269223f80a56baaaa + +Count = 180 +Adata = 733f8e7670de3446016916510dfe722ce671570121d91331a64feb3d03f210e6 +Payload = 617868ae91f705c6b583b5fd7e1e4086a1bb +CT = b2dc1e548b3d3f225a34082f4391980a0788b4cc36852fd64a423fb8e872252b248e + +Count = 181 +Adata = b6ec659856866959ef6fd4e71ba930f0e3e5fd49d7465fd65f6813ab4ca1a770 +Payload = b8b342c49c28bffc2a1c457db0b537ad46bb +CT = 6b17343e86e28518c5abf8af8d3aef21e08895a66eb5b902bb23a1a8584249409fda + +Count = 182 +Adata = 89eb3636fff80230352a3582be5698e3401c9e0579d48f2680c6e5e24d99f74b +Payload = 37d694ba94d0af8df662134f20d142903839 +CT = e472e2408e1a956919d5ae9d1d5e9a1c9e0a7fa792fb7246218f7d56d5fa4a5476bd + +Count = 183 +Adata = 03434f3709e19a1e37edfcaabc215116763b71ab1c5e053dbdb599f86959f25d +Payload = 90e4c0550cb7b279ef61f9140b7d94b8003d +CT = 4340b6af167d889d00d644c636f24c34a60ea83dc3f0012ae6da32a15fd1684835ef + +Count = 184 +Adata = 0e2ddb65fcc72094ac388d53a1055c7e902285c4c3c33c13bb6fbb4f1956414a +Payload = 69b851e63a78baef90637978e3dfe8c47be4 +CT = ba1c271c20b2800b7fd4c4aade503048ddd7f09d38d3dba01995e36bd685c8ea3371 + +Count = 185 +Adata = a42b2538ee2fb5f6a85d4d00524b01ad3331f61c404069243f35f28e2c2d0a82 +Payload = b7dbf8382115199dd2a2d87938c6ae6c4241 +CT = 647f8ec23bdf23793d1565ab054976e0e472c89becf8d2bb935cb17f44b950df3ef5 + +Count = 186 +Adata = 09bc5c426dc1faa4d71f50908bd6f297ec8e754d4d20def005585b4bc1fa31da +Payload = d53698d719c51bf9eae346269c6a1da07162 +CT = 0692ee2d030f211d0554fbf4a1e5c52cd75196e28badf0202097e80561451796194d + +Count = 187 +Adata = 2ac87e59c2c86532cf165af3e8ff4871d730f5e742cccca38bbcdffff4472c93 +Payload = cfdb7363985aa01af6f8e8237dbfb7871eb3 +CT = 1c7f059982909afe194f55f140306f0bb880710d4d7f66660891ac655d6eca4a3f3e + +Count = 188 +Adata = 05d2fbc3d0ec81f52f31cb0c4bf960c2076867f6d9f0174ed9176e20177b2693 +Payload = 56fdf10dc0c1dfd10965b83938e557459c61 +CT = 855987f7da0be535e6d205eb056a8fc93a52f90ab18925fea6964490f364a975a473 + +Count = 189 +Adata = c2c3902cfe8622254b3787cc13e79c5a3c388c2357c29f1c1ab5539a10bfae5c +Payload = e7c9812eda2ed7dcfc80fc5fe0d43e1e5982 +CT = 346df7d4c0e4ed381337418ddd5be692ffb168a00e5e7a39b371024927d3ac98fe43 + +[Plen = 19] + +Key = c5e7147f56ba4530b8799ababeb82772 +Nonce = bdd38e173fb20b981659c597d6 + +Count = 190 +Adata = 3a069a2bfda44abbb0a82a97e5e9047258c803da2c66190d77149e0f010b3af9 +Payload = 2f3bf0b566440912a1e47a0c07f1cfd39cb440 +CT = bd6265dcba9e14c59e515e395dc60bd053345fa6d7568c738e3a7fdf142d8f2d1562c0 + +Count = 191 +Adata = 7709132415c94960025cc39c950ead208703a9d5a71e224fd022dc0a1817d0f4 +Payload = 7c880d787726c4ddeb2304b5d161b4a257298e +CT = eed19811abfcd90ad49620808b5670a198a991f22337efa5cb7db7240e7518b67ffbb1 + +Count = 192 +Adata = aad77595f87a27f2c7995fc7149317f4cbebcece8336db2068380070784a4283 +Payload = 08c43bbfa706512aa39e2bfa5c365aca11e22e +CT = 9a9daed67bdc4cfd9c2b0fcf06019ec9de623140bac6094528f02eeda093312fcf716f + +Count = 193 +Adata = bdb1b82ba864893c2ee8f7426c7b9a8460b00a50f164fc8f2ff2ae9cddab8657 +Payload = a531c0ed8840b2fcf08d76eca71036153b6e11 +CT = 37685584549aaf2bcf3852d9fd27f216f4ee0e0c041d86dd483c1d6da366e91bd826dd + +Count = 194 +Adata = 38b3b9f45041ceb743fc2655b409213fa081427e41c833a2321a09fbd566c80c +Payload = 177946b4dc3b0b825a505f097a0a203eb21c00 +CT = 8520d3dd00e1165565e57b3c203de43d7d9c1ffde45ca2a83dec2f930bb652a6fcdc5f + +Count = 195 +Adata = ec9d8edff25645520801b6e8d14a2fc3b193db70d5e5e878742de83154a578da +Payload = a2634ef20a2a418b2c3be64f0b5f79d7ea9b7b +CT = 303adb9bd6f05c5c138ec27a5168bdd4251b648b89aa22cd7d0170a975565cd3a33dc1 + +Count = 196 +Adata = 8f6c1de4efdc5ac2d6e5452b5b4f58416d618da672f521332fd297ede8350134 +Payload = 40e52edaad5acf2d4eedfb3f9ac2908112e9b1 +CT = d2bcbbb37180d2fa7158df0ac0f55482dd69aed960b33c3df5cd38a82980dc0950ada4 + +Count = 197 +Adata = b0f1dc85fe223bcf29cdfa9319866bacd0a0a79c554e24d1f10889279e31c0af +Payload = bf97780f498c23adcf1c49f60873780a235969 +CT = 2dceed6695563e7af0a96dc35244bc09ecd97638fa273c4102b5ca050b23044ac2064f + +Count = 198 +Adata = 7d02a323aa769a8201549bf48a520d940bf6f69ed6106f1ce68856c22a594216 +Payload = 58bfe1eb2d38d91f80b3467db94fdcb84ff5f3 +CT = cae67482f1e2c4c8bf066248e37818bb8075ecc15438af1bafac3eac61e1c24ed00ab7 + +Count = 199 +Adata = d4b90ef8abad08c552c8c3b080b8c37df314d514049d45e27ec4527cb06cdf85 +Payload = a206a1eb70a9d24bb5e72f314e7d91de074f59 +CT = 305f3482ac73cf9c8a520b04144a55ddc8cf464422d9e2f4f84fde49e9701296294d5a + +[Plen = 20] + +Key = 78c46e3249ca28e1ef0531d80fd37c12 +Nonce = 5de41a86ce3f3fb1b685b3ca4d + +Count = 200 +Adata = e98a77f2a941b36232589486b05f4278275588665a06d98aec98915cc5607e06 +Payload = 4802422c9b3b4459ba26e7863ad87b0c172cfe4b +CT = daea2234ea433533bf0716abe1aa3844b6d3c51e9d5ca3d8ec5065630d2de0717cdeb7d5 + +Count = 201 +Adata = 5970a836de1f1e91d94d7eef79742cbbd46a759c413715eb0224fd6a27145333 +Payload = 796a69ad0e9379173ef6b66f44f5c84fa70a0e28 +CT = eb8209b57feb087d3bd747429f878b0706f5357d0ff0648ddb07f42f815b38bfc95688b1 + +Count = 202 +Adata = e3f08834c4894f6fa66a55a280c0e677a79e97c1ef9488b21384e74e57b1b51f +Payload = 98e1f8cf250183b13ad418024dc40c1a6a7ee8ac +CT = 0a0998d75479f2db3ff5e92f96b64f52cb81d3f93ddd9a6977ea8e7adf5c5234346e560f + +Count = 203 +Adata = 18349be2894d49290339b97f4db28c92b3e112ffac77100abbf9c093935b1a46 +Payload = 4a856d9b50a5b40d6566b38eae6a53ed0c192805 +CT = d86d0d8321ddc567604742a3751810a5ade61350bdee05328a7ea8cc6c2e42bf3faeeda0 + +Count = 204 +Adata = 7355e34ad13880de17a1d66b02672ea5c9f51774019f64ecbe36747ffcd9b671 +Payload = ad048eb2ad75266b43b59d9d1f073c44e4cbf25e +CT = 3feceeaadc0d570146946cb0c4757f0c4534c90bafb1435cf929db35ec5986aabaf4a7d1 + +Count = 205 +Adata = 4be21ba2eb26234ddcbb6aac6b4c3be7ef644af64edf51b7c29ffc3ddd80036b +Payload = 5b527ac6cc6d1b4c3c56f8315bc96dae91632df9 +CT = c9ba1adebd156a263977091c80bb2ee6309c16ac736be6563cf9f5bce97486b7cc6f1c18 + +Count = 206 +Adata = 266e0e3365e06d3b1e864c6e5897145df7bdde90eb744013a7b36632d4cf6580 +Payload = cee059cb0fe91a39faccc2914340baeab4b644ce +CT = 5c0839d37e916b53ffed33bc9832f9a215497f9b2e90335fcea56b969b4fce65442768dd + +Count = 207 +Adata = 55a723883a340877d85ad1a5f264f2c834d824c7bbf207cdd8500c9d11ef9225 +Payload = 85321fef6a2b7d31cbd079c4bf2bfbbc979df90b +CT = 17da7ff71b530c5bcef188e96459b8f43662c25eacd6afdb3578ebc75e8a408d32758931 + +Count = 208 +Adata = 773864475a1a60a778468a66cbe13dfe3458094e62abb593f50c8495e3a8b81e +Payload = e227b8d44320bd3ce9d3f7d688f3de887947b1e9 +CT = 70cfd8cc3258cc56ecf206fb53819dc0d8b88abca19fb73fc0488d9f29a09c1b47e3e066 + +Count = 209 +Adata = f64f3b00c9117aed3c486aa4c8d574b44d679be4069e1078bb7100af38cdb190 +Payload = 206e9eb2bc3f8534d844a38debf1306df808744a +CT = b286feaacd47f45edd6552a03083732559f74f1fce2c5ef8cdce76b358739e2a1b173fb3 + +[Plen = 21] + +Key = 8883002bf13b3a94b2467225970df938 +Nonce = 818a702d5c8ee973b34e9acda1 + +Count = 210 +Adata = 545aeac737c0ca2a3d5e1fd966840c3a0d71e0301abbe99c7af18d24cc7e9633 +Payload = d516bbff452e7706c91c7ace3e9baa76d65ff7050f +CT = b85242fdc06344f2bd9a97b408902ebcd22aece3d42f2da4dd4d817c9fa2d44bc02163a0a9 + +Count = 211 +Adata = f032db01da60ca078d35c3fb5d05d6750fce1c01911a0422e827e8976946e4dc +Payload = 590d1aa655fed50ca2e402299f2da6fe20eed56071 +CT = 3449e3a4d0b3e6f8d662ef53a9262234249bce86aa180f41bccbcd47c8b7890754c032269b + +Count = 212 +Adata = 71ecb4252518997b53491cf42a3e0fe1496a2af2329a16f9fcd9c4f249900341 +Payload = ecd86cdb7d78d310dca5b477cd9da2612f5a05ab39 +CT = 819c95d9f835e0e4a823590dfb9626ab2b2f1e4de21d6ba58cc2eb474401851bf9502c3413 + +Count = 213 +Adata = ec7abed9bda4a52fdf1bf278b6bdd6b0a27d4688deb9ff5ca9c8c865a4d2f730 +Payload = 0024b14c283df032cf80c22ad8d2c96289ee229092 +CT = 6d60484ead70c3c6bb062f50eed94da88d9b3976499b94d4b7a2044696c72322e850537b6d + +Count = 214 +Adata = c2c77d7ad7b27d7c0f976a1e28881ea4ec7ad03b63a4e67f47280a40b8f58086 +Payload = bc6965d8f62d066d118c14044c1fd2a224b9d95110 +CT = d12d9cda73603599650af97e7a14566820ccc2b7cb9d8da8e718570caf8bed7909fbff3ec6 + +Count = 215 +Adata = 28929286bd1391468ac75f5c03689f74780ddd7585fc16f9a9bf7b00357a72e5 +Payload = da4a630cabaff0728a1cc3e6a79721a7176b708f1d +CT = b70e9a0e2ee2c386fe9a2e9c919ca56d131e6b69c6e671012690c61fe3c9abd50a78eb4736 + +Count = 216 +Adata = ed360d22081b019dc979420a3a45c21c8903c59daedd9f1b4ef2bfdedff0ec1d +Payload = a95058f8e1f6bc0f143a9ca7e4425a2a63eb2f7e33 +CT = c414a1fa64bb8ffb60bc71ddd249dee0679e3498e8e657e2250427130acef7032454cde7b6 + +Count = 217 +Adata = 2b4022d0b951fe48635d04fb3e2fa032c07c855fdd73f45670953bb9ddc77cb4 +Payload = fcbbc7f9d1ace60e830ca56ec84814fbd2579993d4 +CT = 91ff3efb54e1d5faf78a4814fe439031d62282750faac6ff0a264b8199550d93c1f06063da + +Count = 218 +Adata = 48e553a87a7d3c1bd68af39f96aca67583da86e06701d5e4c4ed404dc66d70f3 +Payload = b95d298d391c6b893c6cad66f9780534516e71455e +CT = d419d08fbc51587d48ea401ccf7381fe551b6aa3857e68bf636e81c332f72063dc0d6fc2b6 + +Count = 219 +Adata = e8e2835e47144365a2f218d4c95d7522e824fb43b66d4727ee570f8303dd6dd3 +Payload = bc79d444dff9d9e722effab07b068cb7723ae8fae0 +CT = d13d2d465ab4ea13566917ca4d0d087d764ff31c3bdf3af9e9c4e04bad261dc17cf00a00dd + +[Plen = 22] + +Key = 5cea00ee44cfb9cfbb598d3812e380ef +Nonce = 948788a9c8188cb988430a7ebd + +Count = 220 +Adata = 50422c5e6a0fb8231b3bb6e2f89607019be6ad92a4dae8e0fe3f9e486476004b +Payload = 33bfd0713f30fcac8f7f95920ac6d9b803ddd5480dd8 +CT = b168747dea3ae0fbede4402af9a3dc3185d6d162f859d828101682de32923788c70262b84814 + +Count = 221 +Adata = bb0036b34b0c20094d335a8c74f6b3dea42eeccf4145192eada64ae00c726b2e +Payload = 5576d94b577ed26820fb13c00ab0e2d1a1c3589bfdc4 +CT = d7a17d478274ce3f4260c678f9d5e75827c85cb10845bafc4ae4d31907def6f648b081174e2a + +Count = 222 +Adata = 5140324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +Payload = 13303e14068205cbfa992d4ccb6a265804ea64a15d7f +CT = 91e79a18d388199c9802f8f4380f23d182e1608ba8fe314e378e9ed6e725a14c07632b02bdbd + +Count = 223 +Adata = 74da07d324060e590356988f27d9879fa3a3ade0fe71e2a0e49054211cfa1fe1 +Payload = 567e6d14b446add630d53ea86a537c0938537c4604a8 +CT = d4a9c918614cb181524eeb1099367980be58786cf1295bc2f2f9331536f7f70be09c41bda0ad + +Count = 224 +Adata = 0e403cff47adee3ec5bb6b178dabfc7d53b60a04eaad33a2fedd9db705358a4c +Payload = 9f3d165d44cf1c5770346d211d4ff34ca2ecd6b28549 +CT = 1deab25191c5000012afb899ee2af6c524e7d29870c86b59cc9c3c008bc5876ef86327859cbe + +Count = 225 +Adata = 211e6ce3d0c3abdef069e6e4fa35015797bd8a9d64bc9b75f20b028b12cca04a +Payload = d726e599db6a6d40629bc4bda5e3fa2e5aeda229cea4 +CT = 55f141950e607117000011055686ffa7dce6a6033b25135e6d59a5385a78658d60d254f99962 + +Count = 226 +Adata = 3c5c67b083322115e1b3112c2b6968efc050094e23e646dce982eac9d6e67d10 +Payload = 42646cfb8a99e48a35cee3f5f9b3e6175695973f6de0 +CT = c0b3c8f75f93f8dd5755364d0ad6e39ed09e93159861e234e83d9a0570dbf2b2fa59ce3cdbd9 + +Count = 227 +Adata = 37a931f1dd05755b376d1a164aa36b8de802e39f8108a0453c1114754665fe46 +Payload = e814c7b5c72d973a9bc7ccd463f107325ffa3321783b +CT = 6ac363b912278b6df95c196c909402bbd9f1370b8dba2084e352b1b157267228576dd056c1a3 + +Count = 228 +Adata = f1ddc2c49da7363526ba36c600c589b4c3121fbb8c5b9a8aa0de0e7453b30568 +Payload = 4f7a5618870945b89f194e31b1aa802c5350326dc691 +CT = cdadf214520359effd829b8942cf85a5d55b36473310bf88ad35ee338e489e55bb49732447cf + +Count = 229 +Adata = d14b3d3803df432488b5d66704abef6a500d397e855bc2c2574df746a515cf70 +Payload = f555216840a1f40b411d44128e567617e2694caf1621 +CT = 7782856495abe85c238691aa7d33739e64624885e3a07ab67f9397a81371ef6ebc775cb7007b + +[Plen = 23] + +Key = cb83f77751e72711401cbbf4f61aa0ed +Nonce = c0b461b2e15b8b116ef9281704 + +Count = 230 +Adata = 2bd112231f903fa0dff085db48a2e2a96ec0199249b005d5ab4c2eab753f9ad0 +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06 +CT = feb114b7bd3b43497b62454a675a632c3546d2802462c6af57647efda119c59862cd5dd3904efc + +Count = 231 +Adata = 864e0e728aea856fae6c6daa6357d1542cef7177f441ba21a563f6c4f6fdc1dd +Payload = 8a56588fe5e125237b6cdc30f940b8d88b2863ec501a0c +CT = 9a394d88d7405656df1a50e7e45fa8ddcca85e9ed5a3cc2af4027ca5824b41c7bb238d3e8eeebf + +Count = 232 +Adata = dac7f3cba0b5a47f67f85b226b66df695a8ae2501355e36aad105375bb95f732 +Payload = 66e34540d7accf377877aa2d3e6d2db0cfafc608a1eb3d +CT = 768c5047e50dbc42dc0126fa23723db5882ffb7a2452fdf7fbd7044ce1d7b266bdf545247a3c2b + +Count = 233 +Adata = 07f48cdc12aa27119fbdfda4ec07ce6068c92ba7ba9c930905aadd156b1dd56e +Payload = a9ebd04fba7155c39b5c29c5571b5354c9ae228f5e5b13 +CT = b984c54888d026b63f2aa5124a0443518e2e1ffddbe2d3afabc559b552cf7c7730c7dca25bc3ed + +Count = 234 +Adata = 2d24e79abd157af2c21b60932947fd9f9d6478f09ec56fffd341ea04a17b8e5f +Payload = f179353aef342f0f691caf1fcb811e3f6504e14d6d9381 +CT = e116203ddd955c7acd6a23c8d69e0e3a2284dc3fe82a41488ca99e0f85ac388f981ce25560b8f9 + +Count = 235 +Adata = fea280f710379e4665b5ed3d1620729a7bc164899dc83e6aee3612d538fa20db +Payload = 6c19a18eab544acc883c5886eaa89f54d61ae5f1f1368c +CT = 7c76b48999f539b92c4ad451f7b78f51919ad883748f4c9156faae3d8860bed216e8d497a75962 + +Count = 236 +Adata = 18f2e3457127c35f2e0cff2d821af8178028fcc7803bc795c49f4a435b37abeb +Payload = d0df1bdf1df6203241722fb9c9c1cf7405017497ae1545 +CT = c0b00ed82f575347e504a36ed4dedf71428149e52bac8588cd7791c544d1098b2de49d04b1e0c1 + +Count = 237 +Adata = 35221f0efcb109cb93c38a62c58b5ab8b236437e171e8507cf417a569af1767c +Payload = 479526b33c42c240b9a4549ca70cbfb691f16ae3be8888 +CT = 57fa33b40ee3b1351dd2d84bba13afb3d67157913b3148c523fd8a2524717f63dac75c22268fa6 + +Count = 238 +Adata = 95f2ab02af01aeacce86b02cf846f9fbd516963d06e350e8b7f6df2778765a01 +Payload = aa6761148b254a2ff202b620c2ec2c5e623bf61f05e483 +CT = ba087413b984395a56743af7dff33c5b25bbcb6d805d4392904f05dc2397596543df73de5aa708 + +Count = 239 +Adata = 3746a36154e42dd600049d506f5ce4d034864263b1a65cecd24c8e25fb9c82e1 +Payload = 2f298f106703b8a994cbb20acf47f9442e44f6b5e82c38 +CT = 3f469a1755a2cbdc30bd3eddd258e94169c4cbc76d95f8c3cbfecfa3f75fb111ef0011222b7948 + +[Plen = 24] + +Key = 43c1142877d9f450e12d7b6db47a85ba +Nonce = 76becd9d27ca8a026215f32712 + +Count = 240 +Adata = 6a59aacadd416e465264c15e1a1e9bfa084687492710f9bda832e2571e468224 +Payload = b506a6ba900c1147c806775324b36eb376aa01d4c3eef6f5 +CT = 14b14fe5b317411392861638ec383ae40ba95fefe34255dc2ec067887114bc370281de6f00836ce4 + +Count = 241 +Adata = e82fc3ffd276218a82aede65fe5abf4fd35c7059a26923f8dbb97a59c903a7f4 +Payload = eab8cef576816a82ed036f158e5036f5987b195e60582a6f +CT = 4b0f27aa559a3ad6b7830e7e46db62a2e578476540f489460d2d30268e9f1ce0e7c762993297d828 + +Count = 242 +Adata = 776aae7f62225556b6da522c0c9432ac70fe72ac6f3f361071ef3deb4a6715e8 +Payload = 566ef9ce1d397be2547c385639507a9e7d6f9eed9a3b1055 +CT = f7d910913e222bb60efc593df1db2ec9006cc0d6ba97b37c0939e56f0b7200d1b1409f3f8e8179cc + +Count = 243 +Adata = d9aef0955922f89747ba4a8ddcdb8c1c7579aefd3c2eb8ad0589c66576a8504c +Payload = 8c28b6d93b23f1ea031d5020aa92f6608c3d3df0ee24a895 +CT = 2d9f5f861838a1be599d314b6219a237f13e63cbce880bbc138e3b817023993608be06fe92efca8b + +Count = 244 +Adata = 13c222a65ce30570ecac85a185a2a0922a8c96d633339a1ca067ce57ae426e1d +Payload = f0c1cd60f5fa8d1efd5e2e1ab37c4f7e6aef76d15e8d6ac8 +CT = 5176243fd6e1dd4aa7de4f717bf71b2917ec28ea7e21c9e1f3ca13b4ab7fd0d4badf158972570c06 + +Count = 245 +Adata = ce40fb0cbfdf07676ed55b040ae6be5db8f0a0f28816ae8ea71da3cbd71661d8 +Payload = 570d5f79aa8db14b1ac99ee567cc105ae9e238e482b52628 +CT = f6bab6268996e11f4049ff8eaf47440d94e166dfa21985010a79fa4e8b27a31ff360a1b6c05ff844 + +Count = 246 +Adata = 446b01d09cbc41b6393ef81ca65ab7e099018187d5f9d22f5074dfc491e72077 +Payload = 7c267223047af946b06f6a45ffde4a5ec49c28b81ca22da4 +CT = dd919b7c2761a912eaef0b2e37551e09b99f76833c0e8e8d5d34ef0ca0b47d6a2ec7442cbb739504 + +Count = 247 +Adata = 01ec87920b42639d4ba22adb1fbe5138d2849db670a2960fd94a399c1532ed75 +Payload = cbf112e4fb85276c4e09649f3de225b2398e86ac3fe48bc7 +CT = 6a46fbbbd89e7738148905f4f56971e5448dd8971f4828ee8f607d154393e35fd1efc1ae8cb244e4 + +Count = 248 +Adata = 5032b818d202872f3fe2b08fc7940696df02cf393a6d6247f5c6f5f2125cb08b +Payload = 4324a89788e8ddae5d560cf937df701743cbbc3bf980558c +CT = e29341c8abf38dfa07d66d92ff5424403ec8e200d92cf6a5617d9cebea38591a00c9fba4ef9c8e71 + +Count = 249 +Adata = 27b661861717f00a3ae22ead78f4dc3f32b40e8fcb8ed58167a31a61f2becd77 +Payload = db72d98d63fc10acff7dceec0e2691a80ecee50a0e957ad1 +CT = 7ac530d240e740f8a5fdaf87c6adc5ff73cdbb312e39d9f897062a1ec759a515b938780f902fa7c2 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT192.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT192.rsp new file mode 100644 index 0000000000..abf1775dd1 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT192.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = 086e2967cde99e90faaea8a94e168bf0e066c503a849a9f3 +Nonce = 929542cd690f1babcf1696cb03 + +Count = 0 +Adata = 58f70bab24e0a6137e5cd3eb18656f2b5ccddc3f538a0000c65190e4a3668e71 +Payload = 00 +CT = 3bf9d93af6ffac9ac84cd3202d4e0cc8 + +Count = 1 +Adata = 760d065275e345900a7bbab451cc9309fb161e6cfec526538b98800e4102e14d +Payload = 00 +CT = b0078a769ab68db44e723993da382abc + +Count = 2 +Adata = ffedc67efd355ea404fcbcb3993d3bae81386ded86230270771deb747163bf44 +Payload = 00 +CT = 31fbff2d715a2eb9af54e8320a8e42e1 + +Count = 3 +Adata = 55153ff5e4d208d2e647794f382c788e0e36f293e63e7290ba9ff2657ae0f167 +Payload = 00 +CT = 945839d62c9d1b899f6dcd0ca9517e68 + +Count = 4 +Adata = f8813985f59bf284bd3882e899ca9b67fb496f3eb78d7ebe6ffbad084f639915 +Payload = 00 +CT = 903f90d23321a6882d6c4c1955b14847 + +Count = 5 +Adata = 7b95cd827ab93507f1819ae76627d6e2a31d29890c092e5c300f0e2f9e4ef4d2 +Payload = 00 +CT = 652ec5ab43088eb568186d0d9887b30f + +Count = 6 +Adata = bd144c9bb974729aaa1188ceefdf85e1d9fddc0b0c8afe8828ba204aa9293feb +Payload = 00 +CT = e6c1455d1117eec49338c96f51007309 + +Count = 7 +Adata = 92b911cdc3137a6f7f32651b788eb82975660aea52b2c03b4759755a6da4a0f8 +Payload = 00 +CT = 1cf3c32fb229dac209523eaa517bb59a + +Count = 8 +Adata = a8200dbbfe4086015cdbdec2fc8e4934d0d663527430c424627ed44065ade091 +Payload = 00 +CT = ee10bfeb1cf9b3cd5a0faebd4d8f3fe1 + +Count = 9 +Adata = 3b7f37b6b8e3c1390a99d59c47f7c102cf659d361a132ef8b4e70b9585bafebb +Payload = 00 +CT = c51ed994253adb9bb5b9a8c34a27f225 + +[Plen = 1] + +Key = 992d38768b11a236945bd4b327c3728fac24c091238b6553 +Nonce = b248a90b84b0122a5ad8e12760 + +Count = 10 +Adata = 27cabc40da0e1eda0ea5f8abbb7c179e30776250a7b30d711b0e106c5ee9d84a +Payload = 1c +CT = 1a96f58c3f38c44d1a345f3e2da6679f20 + +Count = 11 +Adata = dc2e28d5ae726c1beadb1e7e92ae7d14f5546320deb81a910bf170cbe0210eaa +Payload = e9 +CT = ef0579aee7c17482691f3f832d867ffea7 + +Count = 12 +Adata = c579f912ac1b45d5aa8cf20f78f0a1ace32abd3dc7fd0b3f3a7182a008795c7f +Payload = 97 +CT = 913452d8ece38ffa1d4107d6a053acd8c8 + +Count = 13 +Adata = 69ea953dbb910ec589372d797c7379d3f3b9e9fd48894c9b55e6e8eb360a6211 +Payload = f4 +CT = f20d760b9fe29530738157db0ba2d253f0 + +Count = 14 +Adata = 622835dea57b2c70cca8f7548d6210714070b55b36adde7a4c547269c07aba9c +Payload = 9f +CT = 996fc21f24dee7b52f51d69eea30819f4a + +Count = 15 +Adata = 67ebda0a3573a9a58751d4169e10c7e8663febb3a8cf769d81bc872113f0720f +Payload = 43 +CT = 4594c5b8db0064426a77dc536814c56147 + +Count = 16 +Adata = 255412e380e9a28cbcd345be172c40f72dec3e8a10adfd8a9ab147e9022524e1 +Payload = c1 +CT = c76d36c0b0d699a22da3116dfb8f453181 + +Count = 17 +Adata = c7c8e7151eb6844a954d091b460f83add0f0a634aa5ac213b774f2451aa497fb +Payload = 31 +CT = 370c3a1690acc3f0eb09c9cfd3396c7fa9 + +Count = 18 +Adata = 63f00b2488809fdc49ca5f05d54e98468906308115f7e702da05ddfd970b5537 +Payload = a7 +CT = a1ad45070fe4c61270c13cc52247fee411 + +Count = 19 +Adata = 8e2c5e55c0bf70014e9897b6f6940e4e738b1e84e8269b6382f0b1fe59b0e162 +Payload = 40 +CT = 46b2a2a8b283ff7eeff5c2670f77b8809d + +[Plen = 2] + +Key = 5012db40ff6ae23c1e1ce43768c5936c4400b0e79ae77f30 +Nonce = b67e500b35d60ad7264240027c + +Count = 20 +Adata = 40affd355416200191ba64edec8d7d27ead235a7b2e01a12662273deb36379b8 +Payload = 0c6c +CT = c996ef3d6ef9f981557506ecc8797bbaaaa7 + +Count = 21 +Adata = c5e12e17e02bcc12b3a4c14cf837250e2886db3ee1c717d28bd11e8a3b764ddf +Payload = 23df +CT = e6254405257a837c5343b59d5689d6de5269 + +Count = 22 +Adata = 213b5b6015d472bd593be5acf85ebba6d6a09f3a962be302ba83c6d70c61f241 +Payload = 0dc2 +CT = c838e93e67d37d2367bb1f27f71b54b29317 + +Count = 23 +Adata = fc1b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +Payload = dc88 +CT = 1972ca3744a4ab375af9060621a9dc4f4c32 + +Count = 24 +Adata = 5b2eb1a6fa585d61d1fb3da68f5b93829c8e2d5e4fe03782617553d7a130ecf1 +Payload = 8179 +CT = 4483172626e930d24052bc056d8609c4175f + +Count = 25 +Adata = e2b3c3bf33cf847660929e48cce51d9d9289945169651aaecb1e939756e93105 +Payload = 01fd +CT = c407852310207be8d3417de800b372700da2 + +Count = 26 +Adata = 6051f12cd8aae68b4023aaf7178fd086aa582b8d8821e36637abc97025f5e858 +Payload = ca18 +CT = 0fe228553bc037954dbf4ce5db99792c2c7a + +Count = 27 +Adata = 2d3555faf285caaddfe95c010c2a7f233e09c2fc0cd30d644035269280527ad7 +Payload = a855 +CT = 6daf904725668634d6345bd8f90a3831b452 + +Count = 28 +Adata = 4fca820dc545bf93bdffed33a04b67eb45384e696f092c2197e5d79cecd09913 +Payload = 5555 +CT = 90afdf6098cb3135c3045a54ffce88efaceb + +Count = 29 +Adata = 1789ae403e183d2225f431f001d475b53bccdec66572bb027340ae592839ba8b +Payload = 11dd +CT = d4278568e8c08ff5ee5ea0a608589c2fc029 + +[Plen = 3] + +Key = fa15cc7f0de294d7341b1fd79326c8be78e67822343c1992 +Nonce = e5257aed2bda0495aa44591db4 + +Count = 30 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +Payload = bcb898 +CT = 68f08298d9a2147776dca9c1a42382bce323b2 + +Count = 31 +Adata = 4863dd810ee70ef0f5da81f60c5ce550abb96454619032322e34657af25207de +Payload = d1da2e +CT = 059234a9a77755b324f3a557217752ade14ed7 + +Count = 32 +Adata = 173594fc26b167f044aeaf9bfe920cab99a27eb2b01827d61f7553cb2018b5fe +Payload = 394f31 +CT = ed072ba4441a79a90e228a28069fe109d5d876 + +Count = 33 +Adata = 71cdd16eca9255aeedc23bd623513918ea97da21485074415fe75bcc42f454c0 +Payload = 868bda +CT = 52c3c065f272f44c5210b5bcc571e819580910 + +Count = 34 +Adata = e84418d332d16d2298e69e7ff3c37bc7b6e030cc822e73b3f4a0029bc2ea4d80 +Payload = 52d6bf +CT = 869ea559c5f7f73a1b5f419c9f63ca401894a8 + +Count = 35 +Adata = 42d962109bea1d50be0f3d83b4c2a6033d53b3d7112591866b1ae52dc84cb5d0 +Payload = 6f8d58 +CT = bbc542220b828cf5365137fb3f1df67cc8d2a1 + +Count = 36 +Adata = 943b4327b5c70dba63c82f27e0412b3ada012bc0f7dd39ebb13db2f864daf80e +Payload = fda286 +CT = 29ea9c422b0f41075ac79a0afa2d1047cbbfb5 + +Count = 37 +Adata = 6076b94caabfa476ab7e6482e4fda9b29f2e2b2883efe44d668c7c74628505bb +Payload = 8651fb +CT = 5219e1ae68cd6d6815ecbfd01293d160d4d38a + +Count = 38 +Adata = 3e4bb5781f84b4bbd23583e3dae561c6ff4af8eff35e2a4f35b50d2f360d3469 +Payload = c3e179 +CT = 17a963fbaa81cfdbcaee476860cd5102f556e4 + +Count = 39 +Adata = 364008acbad330d0b8d574641a97b0682c49279cfdc80ff309b7514514d18a44 +Payload = 4a97d5 +CT = 9edfcf7ad1520564b68824a3a939371c21a336 + +[Plen = 4] + +Key = b5330a8447d74a7987fb718cfae246b5c7e057991064eeaf +Nonce = 2ef29d62b40d8643848797cde8 + +Count = 40 +Adata = 1225b036e6044df52314016760e92750de0936120395de750a2c54a7fa0cea82 +Payload = b46b343e +CT = c2c39d6f9344e2de064f269d065a2a6108605916 + +Count = 41 +Adata = aaa6257d6783936a4445833c2ac3bea8cb7334f22ade9c035d515bbc91d6a78a +Payload = cb216301 +CT = bd89ca50693d90b8297b90bc41c231d08b0204fb + +Count = 42 +Adata = 1c1915fab09348b9a5536495c70d1a040305708c1124797e564b63e008e7b8ab +Payload = 697a8696 +CT = 1fd22fc79d0146fe373437c529fb2eeb169e4bd7 + +Count = 43 +Adata = 864d0f786497c7ce283762ca0959ec9c825ed445a5dbe5b4b2e5772fe88ce7f5 +Payload = 6bee3db9 +CT = 1d4694e8e389c549bfc4ede936d7896e544b23ad + +Count = 44 +Adata = d5388b0b548c58886dcd335dff2b1ed23ce3eebbb708fb5bbd831c83e959d3fa +Payload = 85d95855 +CT = f371f10495177a9fe6d9329a585c8737c92a4d29 + +Count = 45 +Adata = 83cddd189736f224cad6a29efba45e43c75450a14f1541713b7fb926ffc768c6 +Payload = e8b23340 +CT = 9e1a9a113914431a10b1f94a2b99b9e442f3dca4 + +Count = 46 +Adata = 8fccbd1fc5240691cf24e8807bf3416c1b2d87fc86dbf3955fa2e52b9a3a8457 +Payload = 595c4d7c +CT = 2ff4e42d383d8dc98b22010dd93cd0cbb396d9e3 + +Count = 47 +Adata = 513d45f6f37f3f051667dc743215059e06e4fdc8945789b16d50556a2e839368 +Payload = 314e0c7d +CT = 47e6a52c40c513bfc92d1a7db5ed7cab2d8212b0 + +Count = 48 +Adata = 70828be102e554f0d4b07641fa3254bc8db06eefaf5b85a7c97e01c217fc8f3f +Payload = 35753e32 +CT = 43dd9763ea98f4ac6b3eabd483f1e6ab92f3b83c + +Count = 49 +Adata = 343d5a4ad39acf81adcf24e9807618932abcb3bc076734f179174c77c8cb89e9 +Payload = a531c0ed +CT = d39969bcf99fb67b1e2aba2d232db2445e6aec2a + +[Plen = 5] + +Key = 30419145ae966591b408c29e5fd14d9112542909be5363f7 +Nonce = 27e6b2a482bbc6f13702005708 + +Count = 50 +Adata = e04e81e860daf9696098c723085d8023c240ebe7a643131e35359ab04bd650fe +Payload = 8ceaeb89fd +CT = ec9d5ed36243ddf77b33d8cf2963ba76fd4e19f3c5 + +Count = 51 +Adata = 6217cd581d4b3b2f7bcf1b8dad9ad6430e2e3a0063cad52260e0a1cd6fc9e73a +Payload = 7e51d6f870 +CT = 1e2663a2ef6b73fe9e638e205b27f78ed1bb9b0ed0 + +Count = 52 +Adata = 8aa7847e496f5e9f1f87851442de844f27a21c1b48f82fe525f0dd5a88b8ec38 +Payload = e0023b674d +CT = 80758e3dd25936115e23158aff1916edec241fad56 + +Count = 53 +Adata = 3612abc865a4d8d7b86a84109388584df6526525adb1006ec6c8d00048d725bc +Payload = e2b5b6f36e +CT = 82c203a9f1f15aae4b70dbee244be1daa74475d7e2 + +Count = 54 +Adata = 849a99c6f1cae0ad4bcde4bd0811e87ca5ed7b913de1a8285a206e980b4b7043 +Payload = 9a17e4a22a +CT = fa6051f8b5bbff424487848385f8501ab5a77f327c + +Count = 55 +Adata = 9066367c784de0a4d1116bbe95ce55ded85edddb6273c2049ee24e0fb3429352 +Payload = d4e765fc78 +CT = b490d0a6e772d8d5da6f593a8d9956731b42645aa9 + +Count = 56 +Adata = e7aa9f767fa8920f96f91c41d9e86755faaedaeda596a444b65f99b7a9e23e85 +Payload = 1074349e10 +CT = 700381c48fe3eca12b835dcfd08166ac8831585626 + +Count = 57 +Adata = bc0db1ebf910b6f4dcad5401401d6bc2272e23130947dc236ca664d5b5ed6d66 +Payload = a46dd7fb58 +CT = c41a62a1c72bcce66018e9e552d2c8a229301361df + +Count = 58 +Adata = fcbeba2d0d73239d05f691a52b08152c9dd871f8dc76c2c18b8a638a74460d31 +Payload = 2e0ca09221 +CT = 4e7b15c8be3e41a50a28ea3be14baadf12964a37c4 + +Count = 59 +Adata = dcdefce64ae4339f46c0759a4a10b29d59daaaf1e5dbf75cf11b4e4f73c5025f +Payload = 2e108ce0fa +CT = 4e6739ba65bee2ab25bfafa76dc3e54832b2f76864 + +[Plen = 6] + +Key = 748ad503388a34041a7bdae6361d57894357c333bacf02ca +Nonce = 518b79d194579b19f2d8845b70 + +Count = 60 +Adata = 691dd98f61fd213b0840ec5a6f06ef9a1420be0d59bde5e43546347a2a865a94 +Payload = 24d6880aed7e +CT = 270120f9634ec15536e21d961c675070ec4cff9037bc + +Count = 61 +Adata = d1fd047cdb18463766841abb1fcd25257f1458b595bfcf24066ff9385232fa97 +Payload = 2298028d0213 +CT = 214faa7e8c239b303af0b098f902dc24e66fe56adc6e + +Count = 62 +Adata = 65a480d120a0459dab69e8f23094801e10092666cc56f9fb2549662982bda6d0 +Payload = f248e5225e3d +CT = f19f4dd1d00d1b657925a9740d6828bd85cd12205764 + +Count = 63 +Adata = b738a53fbc9689dd49f68f97f5a99665258cd52e74dc653b594cffec045508aa +Payload = 611dade00cec +CT = 62ca051382dc395a1c49129ef6cce0ad5f6ef378aa1c + +Count = 64 +Adata = 7006f54184f0ff0ab215ca408d46325b86c1cbae6da7838435b1826ff81f55dd +Payload = 5871a8300471 +CT = 5ba600c38a415e68468d1b2b516be3d688567d84ab80 + +Count = 65 +Adata = 9e6e6675d4c6b1e0f3894aac071f4c99a364708edea12f319cbc27b40fabc0f1 +Payload = 3ca8a7520e94 +CT = 3f7f0fa180a40ba1af163049d16817021665d183bc9e + +Count = 66 +Adata = 10ceef716f54b74d7c8a435d6aa38a10ff23939ca29e2de7b6c3e0a8269a23c9 +Payload = 9c2a0070fbba +CT = 9ffda883758a670f35869da9821b6ff1fab3e6062ad4 + +Count = 67 +Adata = 3ee0865f29be50160273b4a94ec078932b9cd10a858e31838d5b607867e1ce69 +Payload = 436179c74fd2 +CT = 40b6d134c1e208f395250fd79087c858b83755411114 + +Count = 68 +Adata = ec2b8bfe1ccd491b02aa4a9178fd6f099556963e39e2ca5fe6ecb6b5d2a46085 +Payload = ecfa41c614c5 +CT = ef2de9359af5afcbd9af2d584a0f638d066f2496d9be + +Count = 69 +Adata = 5b6f6369643d83b1db33d75257d7dea761e574e6e1f1ecead64e5e354a2f4235 +Payload = b48c10105dbc +CT = b75bb8e3d38c17861882b8930296fd51d969a1e9489e + +[Plen = 7] + +Key = b930cca30a3fd230c237c8f3cc6792d0c4084dff5c18d775 +Nonce = 7574802fd82fe96c05431acd40 + +Count = 70 +Adata = 1cf83928b6a9e525fe578c5c0f40c322be71b3092239bff954dd6883738d6d71 +Payload = 2a755e362373ef +CT = f06238b0450fd1f4b6cab1383adb420c4724aa7bdfefb7 + +Count = 71 +Adata = bb5450f66273f63b2f79dce177381ce846584ce4f7a0ad5a0171a56e149370bb +Payload = fab43224bf8989 +CT = 20a354a2d9f5b7a1f99175d3dff5a73f0053a95c36fd8d + +Count = 72 +Adata = 3e5e1037bd2922eb20c34200c470b76e537baf7e7f1d8dd2f7a184a593c66554 +Payload = e3aed6715aa429 +CT = 39b9b0f73cd81734b4ad0e41117940abf530093dac648e + +Count = 73 +Adata = 3cc88a096a1a440827f5b7da675389e50b5cce35fa2cc36674d6bfc5a3a966b2 +Payload = e78db0f83997cb +CT = 3d9ad67e5febf5663a8324014550430c7eaeffbd8568f7 + +Count = 74 +Adata = 2cca33a10b9da7ba99a6b552d1405f2df3fdfd15358d8fdab5e15296b38f9135 +Payload = 726557906845b1 +CT = a87231160e398f34ab635c4eb5b38b86e71da8af3840ae + +Count = 75 +Adata = 2fe5dd58b17914187e29029c53cfe5b015ca74cab750d8f95e05f818c3cdf947 +Payload = 043a759b578be4 +CT = de2d131d31f7dabd9961766e03eaa7e8888227c98d1f42 + +Count = 76 +Adata = 8b8e3d7c88fa16d70130cee290b7e2eecf0ce711118cd9265093b11467e63554 +Payload = f31f2fb4b3fd80 +CT = 29084932d581be637842d96d13c4aab97e296458745a9d + +Count = 77 +Adata = 6341370e126097f9721a13c977eb4875cf1286e15c3adfa4e7597e0e13d93b6a +Payload = 7e3c8224104669 +CT = a42be4a2763a57a51ac46611366c666cab6bfd3d1baaa5 + +Count = 78 +Adata = 227926b62f7cdd90e4d3b0cb5457e71fb087d329671f0fa891ec06eb8edeb58a +Payload = 26a0528ae6f9c1 +CT = fcb7340c8085ff8c7d7e5aec14845f844ad38544a2f11d + +Count = 79 +Adata = 05b50c40b02e79b74b94d726a7ce8b2b7216ef8af6e7a42d041d2a692a58ad83 +Payload = 61dcf53d1a184e +CT = bbcb93bb7c6470f1605ab8a2332012b759ccd2eedbed24 + +[Plen = 8] + +Key = 314c136999e41d137bd7ba17201a9fa406025868334e39b3 +Nonce = 65f7a0f4c0f5bba9d26f7e0ddb + +Count = 80 +Adata = 5c7ce4819b30b975ae6ce58dcc1bfa29a8b6dda8f4b76c7e23516487745e829c +Payload = 4d54d8b06b204445 +CT = 2baf90c490b11f9607482362ab3f157c42d0e9c6c5cffcf0 + +Count = 81 +Adata = 90257ed88679197b8219bc4c2434a71a4e3664d5859c4ffb9a075654898ffedf +Payload = b2a35df881cd63a2 +CT = d458158c7a5c38715389509b5b6f2df1faf7e8c39203970f + +Count = 82 +Adata = dff8ad83525d8235eacdccc91abeb80795e6b5f463fd28af35c46199f646ceb8 +Payload = e98f5e5a20d02c80 +CT = 8f74162edb41775395328747ca544e987df28883d0377b35 + +Count = 83 +Adata = cde159c5343cd9d98001cd719d3e9ea25e47e1ff13fc87055d4a53b741f59285 +Payload = 90c3e48313cd4fe4 +CT = f638acf7e85c1437a4ba841883a0d7aeda398c043161966f + +Count = 84 +Adata = fa88cf5a08be4fb0c1a7960f45726c303eb559861fa60d17aa8dfe8bb5795382 +Payload = 8ad6d5a28ec075e6 +CT = ec2d9dd675512e3509195efe66c5faf413e0f68df8cb647d + +Count = 85 +Adata = fe9e93a9370b43efa1560aeb017ff04fca7f207191e6f707c1c35b2e90c44eb2 +Payload = eb83928f0d5f7aa3 +CT = 8d78dafbf6ce2170b51af067ad69ad96009e50ead3d03f02 + +Count = 86 +Adata = 35792c854fdf1c8cf7f3f8ed2b8ec4f31fe17bf8d4ba49caec03f954bd8bb17a +Payload = 4cd74ed2fd083011 +CT = 2a2c06a606996bc26b1cb03ee76587f84364825f7c1fcbe9 + +Count = 87 +Adata = c084108f9c0a74cbf70f614dceae592546865006930db0401828a0eecff98671 +Payload = 52365f94579e0646 +CT = 34cd17e0ac0f5d958fa70c5e195f1f955d64892f532b7683 + +Count = 88 +Adata = e8045949de61c5c18a63e628330a4d1d12782379a8f9187755409d1825f453c5 +Payload = 8fb85c857a3e38e7 +CT = e94314f181af63342ddf297bdad58083645a052815d29a83 + +Count = 89 +Adata = 53cfdfd66d63c2924bd583487b90b1dd9ec199f90d660cb9c3a763a4776abfe1 +Payload = 43d2828e86f7856b +CT = 2529cafa7d66deb81ad3b2be41dbc39df4c0145dcbae3e76 + +[Plen = 9] + +Key = a19f6be062ec0aaf33046bd52734f3336c85d8368bef86ab +Nonce = 7f2d07f8169c5672b4df7f6cac + +Count = 90 +Adata = d68d5f763db6111c5d6324d694cb0236beab877daae8115ecb75d60530777b58 +Payload = 13511ae5ff6c6860a1 +CT = b3859b757802ebd048467fd8e139eb9ee8fcdca45ed87dc1c8 + +Count = 91 +Adata = f6e219b29884dab9ea9bad34d9ef8a50ae389c9a908de7154a1f2e894f27141f +Payload = 7e7e33e1a07d4e8fde +CT = deaab2712713cd3f3789d0ee8323ea2ee7a68aaaa9c49b98df + +Count = 92 +Adata = bcca002d69d9d1044c40ae741ea33ce6b8463f5a28d0514e044fdae2fe7d3c3b +Payload = cc88980c73e6c5f0cd +CT = 6c5c199cf48846402437c9fe3d9feb0485e6d7c04423b77a53 + +Count = 93 +Adata = 39cac8f0825ffdb0668455933ad1581263a23b9e5f1305340528f0320d4b1269 +Payload = 34cb528f50d073cfdc +CT = 941fd31fd7bef07f35b87e90a71ffe6c30bee1771078a701ab + +Count = 94 +Adata = 510a02a44d142c8e975d1d933f828fd7e47d28b88223f1698cf009dc3b079be6 +Payload = cbce3df86438a61065 +CT = 6b1abc68e35625a08c9e9c5be0657649448c38692e8d703d30 + +Count = 95 +Adata = 40e0418cd52f74d78a8e18ed86210e3661a86d8574aedcee540340d8996d9852 +Payload = 80a2b835f8b0729a4b +CT = 207639a57fdef12aa213e5f2bfd33101597cfae7cf334a8528 + +Count = 96 +Adata = 1f2938b3bde19e1af91299c08638061dc3c1ea3284c259d415e996477cb37b0e +Payload = dd04794e65ce34127a +CT = 7dd0f8dee2a0b7a293516a7310fbd4ceb90d8db9a86cb6311b + +Count = 97 +Adata = cbae5b46e35fa2a279dcaa4c724b923805d4707412a84252b64228c91cedd019 +Payload = 00c4101052f54462d5 +CT = a0109180d59bc7d23cef6165af65f3522dfbfed0293db39ecd + +Count = 98 +Adata = d0f27c7f42892f3ad4c0029c5b698abb1d035ba5869a665b1de8861db6c055e8 +Payload = d0865445d3b26b6f49 +CT = 7052d5d554dce8dfa00726434c1349e3e874a2d6bf598d05fc + +Count = 99 +Adata = ab0f5a829a9319a74d5d5179aa0a410a0fcf52f344a7a896aeb1f7a6c5d398ea +Payload = 7c7c8580b944ed3fd3 +CT = dca804103e2a6e8f3aab491e60fc97b3cb5248291e4866dcab + +[Plen = 10] + +Key = de1c8263345081d2dfa9afdf37675971135e178df554a4d8 +Nonce = a301bb82f91a582db01355c388 + +Count = 100 +Adata = 9ad52c041390d0d4aaf65a4667c3239c95e7eae6178acc23fb4e70a852d483c6 +Payload = f777aba1fa70f94e6de9 +CT = 9d8bff6d2dcde77104ac6aba025abc01416a7ca9f096ab2529cb + +Count = 101 +Adata = b49c7e7b47870c1cc339c7c09aaacfd6115fa8a0f04990367eea10cfacb9d23c +Payload = 349feebfbe58f93ea3c3 +CT = 5e63ba7369e5e701ca864acb200e85a0d4753a8ba226aca72f98 + +Count = 102 +Adata = e61ca7310172eec16745a73e34516f65844eecd0dbc5566ac5213626b9096ef1 +Payload = 678a40b4c2c7df0e4c9d +CT = 0d761478157ac13125d87869784e3321183d8c044657a020e9b9 + +Count = 103 +Adata = 690f5e5d8da6cdb0f492e80449e152ffe88fea9742564d8383c79cef739a7f74 +Payload = 2b81e0533313664bf615 +CT = 417db49fe4ae78749f5070634d00b1facf0e9e9979ca257a71e2 + +Count = 104 +Adata = 78e34b0a1d61ccd411cbfd306ea2ef3ce89c0b085deb4cfbaec2ab72ce16daa9 +Payload = 1ac63aa38a206d8e7d68 +CT = 703a6e6f5d9d73b1142d994630ed92e2973b22773f229b45bdad + +Count = 105 +Adata = 51bacfcf87ea11da34b76acba8c444792ec3db3c8ee6e600d69679975a682a54 +Payload = 027a7fd7897808ec7a56 +CT = 68862b1b5ec516d3131304571b015bb6b4651f1eb9f6fb3a7b74 + +Count = 106 +Adata = 5159357a133e4743f903d05bd641da369a3675337760fcd2424a99221ba70b78 +Payload = 1086953d352e94a51a6d +CT = 7a7ac1f1e2938a9a7328bb0e11ac4608081fd0702a137da0aea3 + +Count = 107 +Adata = f567820865340314d46a17f520ff315efb6b33bdeda590ca9c4fad604c2d8e8d +Payload = b8b148aafec4a035e9a7 +CT = d24d1c662979be0a80e252c9ec1317ce30dffeb4c9bf3fd0bbdd + +Count = 108 +Adata = 0cfec933831644b468724e808bb3d25fe8f15850ce513fc341da46089c845208 +Payload = 884242a87779d3921f8e +CT = e2be1664a0c4cdad76cb691e32be3cdd9721a13aabad26dba58c + +Count = 109 +Adata = 8edc2b85d44297ac66bdd90d05d8df38124033d6a583bb8dda18a2246ba096e8 +Payload = 25c32770a299020d8500 +CT = 4f3f73bc75241c32ec45333a381be77800654aac335bf9220ac9 + +[Plen = 11] + +Key = 248d36bd15f58e47fcf1c948272355821f8492e6e69f3661 +Nonce = 9e8d492c304cf6ad59102bca0e + +Count = 110 +Adata = 9ec08c7ed6b70823d819e9ab019e9929249f966fdb2069311a0ddc680ac468f5 +Payload = 33709d9c7906e2f82dd9e2 +CT = 9114d36b79b1918b2720f40cddce66df9b4802f737bea4bd8f5378 + +Count = 111 +Adata = ba13974d95f2eeb367b63850609c53dc66c2710f682f10bef0142d48f851b430 +Payload = 84172985e7d194ba28a87c +CT = 26736772e766e7c922516a12c94615be2bd81bd598f3022f5775a4 + +Count = 112 +Adata = 5f16180bfac9b7483774cb0e1d57a43e9bf3cf03bf6fe758293aadcbbef25b80 +Payload = 9a34d32070c71d7de8f512 +CT = 38509dd770706e0ee20c042758e936750e335702542bc598e211c4 + +Count = 113 +Adata = 4352057bdd1735a85dc0fc4dbeedc73279c27eb24a97641236f03f11cdafb8c0 +Payload = 2054a268b1f6fae4f15d91 +CT = 8230ec9fb1418997fba4870762bb2a7d04ba2ad251d595d0619dc4 + +Count = 114 +Adata = ddf118ae403b2509e75eb7a26d17e73e527acbacfbe49a56fa3210169030144b +Payload = f71afe9a60f08a0ef694aa +CT = 557eb06d6047f97dfc6dbc27d85594da3fd35bd8498d7e389ee7cd + +Count = 115 +Adata = 973904409e8154132439926f0dc45c0d81bbbd5793f7f81e20eb818bfa374d58 +Payload = cdf5b47ff73306aa55c496 +CT = 6f91fa88f78475d95f3d80055936db383a8ad10b152046d721d3f7 + +Count = 116 +Adata = 06bca7ef6f91355d19f90bf25590a44a24e5a782f92bc693c031e6de1e948008 +Payload = 9ebf93643854ea5c97a4f3 +CT = 3cdbdd9338e3992f9d5de5d57e228369e24fe955fd8924526af6e5 + +Count = 117 +Adata = 8321f65baf9dc856ac1c24f3fee5c74d697eb0b50470d59d8f4a14b506e86c53 +Payload = 685116faa5cc527ac8bfa1 +CT = ca35580da57b2109c246b76c23abfb3b4eb39deb8da2064390dfa8 + +Count = 118 +Adata = a4e7738038a5116592bb9d92d6d4ed191ab774310f6409e4e45fe907674c006f +Payload = 9e8c4f1292e8d7e5179b34 +CT = 3ce801e5925fa4961d6222b4272c0639e8e6a1d356fb4fea86762c + +Count = 119 +Adata = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005adfe9faab253b572 +Payload = 3ecc2ba566c723462eb0ea +CT = 9ca86552667050352449fc0633a0f9cdc9490231ec2dd69f6e35db + +[Plen = 12] + +Key = 77a67fb504b961028633321111aac2c30eb6d71a8cf72056 +Nonce = acadc0330194906f8c75ac287f + +Count = 120 +Adata = 8c18486d52571f70f2ba6a747aaa3d4b3ebc2e481ee1b70907dddb94bdfa0ca6 +Payload = 10554c062d269ff6dcd98493 +CT = 7f8b0cad79b545e5addf0b04ff4b0f2b2a5067283210aba8630d0306 + +Count = 121 +Adata = 4e0b4771c7f6c66f9577c430611fdeec5702296ee3691b6bb8c6a81217edabe4 +Payload = 1c9e7875cf02129ac52daeb0 +CT = 734038de9b91c889b42b21275b16dbdf0b9be3c8c82ac652992d630d + +Count = 122 +Adata = 4a687e1d0a95ed2efb95b4c6b040999fcd35136811cd665f934d10224b6064c2 +Payload = 34575694dde459d195b7357a +CT = 5b89163f897783c2e4b1baede629274d654ef5a4480e24f6bef3bc8c + +Count = 123 +Adata = b5330a8447d74a7987fb718cfae246b5c7e057991064eeaf823641a12bfce9f5 +Payload = ab20c8e8aab1aac1e4f64206 +CT = c4fe8843fe2270d295f0cd9142ab5407a08b648ce24e9955e28fe47e + +Count = 124 +Adata = 4f19bbc3135d7a216465b4c1df2616e8bfc3cc64af0bf52bdc42543f4d2448d4 +Payload = e556ca05bcd1991d2c9836a9 +CT = 8a888aaee842430e5d9eb93e151e94d311c7cd2c1b9048575076ceac + +Count = 125 +Adata = b6ffc7387b19786282bda7caad52eb37fbe7e557afcb80faaf57767e2a0f178a +Payload = e5b665600a2aa413e117c538 +CT = 8a6825cb5eb97e0090114aaf61b71330d72506050368186a5619f180 + +Count = 126 +Adata = 6a493c5ef3769ccc4101dbb2eb36e1e5bbc577a057ce0731203ba3f25b52497b +Payload = 870864a611aa0475d120bc40 +CT = e8d6240d4539de66a02633d7ea21e36f99e5aab6ffa85994d13d5bb0 + +Count = 127 +Adata = 8215753d9efc51325f182199e39f9082cc3fe524400f2a7434c68df7eb2b06d4 +Payload = 71afe8d00c6f2ea8c8b050d4 +CT = 1e71a87b58fcf4bbb9b6df437cc93a50dea11c5e0b19f14b9c8f16bd + +Count = 128 +Adata = eb8f198da6ee92a03913c6575343f6c749d2377a09430eb751b13c041e6edbea +Payload = 7021f18b8f398a5999fcdcd1 +CT = 1fffb120dbaa504ae8fa534699cbfd1beafa2d2942f6812b8dfc88e6 + +Count = 129 +Adata = de2ee30359e390db72f682c2ca0f14b72b60ff9bccd8c6fbd19a512b12add794 +Payload = affca856eb412f0b3276ae6e +CT = c022e8fdbfd2f518437021f9337405235dce6161441caa25cc6007c6 + +[Plen = 13] + +Key = 0d423519e4110c06063061323f8c7c95387776b6ee4e4b6e +Nonce = 39abe53826d9b8e300fe747533 + +Count = 130 +Adata = cdd9bf1b4f865e922c678ec4947ea0cb02e78bd5c1538f33aeb818ad3f47e519 +Payload = 4021ff104ff1dbd91e46db249f +CT = 7953d3cd66d093785d123f65ba37f16761dd6aedbfc789ad96edf1490d + +Count = 131 +Adata = 342de5fe61e05c2e58ac2978a871fbdf186a7294ec5f85c4631c21b584231211 +Payload = 95050ca1d494bdb561d4840f8a +CT = ac77207cfdb5f5142280604eaf8f8e855ae975a1fc64bcce3e7492e9d6 + +Count = 132 +Adata = 7871482948d8d09d0a7491d915543082cb5fc7d6c1e82ee2218279f54c15c154 +Payload = c45823203b20821a48502f9c67 +CT = fd2a0ffd1201cabb0b04cbdd42017a6515156691b3161b747576078da4 + +Count = 133 +Adata = 65781d018f27ca0c72a9fa9ab4648ed369646dd3ce45d7ad3a54f6b051f1b6e9 +Payload = e901661b7d47c9918244ee1077 +CT = d0734ac654668130c1100a515225cec7d2566a07cd78181ae94577befe + +Count = 134 +Adata = 05556b04dae5cde8525633d1862aa200c54af534e302d2cbd34ddc2b78532a60 +Payload = 5556f799d6a6cffb343f28c1a9 +CT = 6c24db44ff87875a776bcc808c133f51dac00f973fd42e0948fab70ea9 + +Count = 135 +Adata = 151304e3e4f3c2d4d3227e035d849e0d3841ba00cf6cab1cf2e3e4d6cc760623 +Payload = 56bf26be81c7b55ef898e23981 +CT = 6fcd0a63a8e6fdffbbcc0678a4fe78bdeaa8d408ffe8fe64811aa87742 + +Count = 136 +Adata = f870cc1fe67d6169279f905b0fe5fd9a0436c36498e4b7c6f584f00f7efe8784 +Payload = 36b304a72dbf4acfffa1d7d624 +CT = 0fc1287a049e026ebcf533970197228d155dda2bc814ff33ebeb9a7ffd + +Count = 137 +Adata = 5692c9d452ea1c067e62fdc554ddd2b18c8433d59067f971316797fd9853ae6a +Payload = fb529eb5ae79a0830474ffbc98 +CT = c220b2688758e82247201bfdbde7ba03e144e34a4ab34791a372a2b8ab + +Count = 138 +Adata = dcf7fe16b7ca9e27ec3291103398eaa2e77c7b770b67f8858c215af4c523822d +Payload = 6218c778955d9a56360f06c704 +CT = 5b6aeba5bc7cd2f7755be2862103c2eb5ef0657306d12b753a0694efcc + +Count = 139 +Adata = b0f1e2668611dca86e8d0f58c2a4cf4a9472d81ba013e271800b75841fe5ffde +Payload = bf6b143fb713a81c965c5a9d8d +CT = 861938e29e32e0bdd508bedca87cc6119151393461ecf65bfe06e0163b + +[Plen = 14] + +Key = a60cf7ceb62bf3118532bc61daa25ce946991047f951b536 +Nonce = 7499494faa44a7576f9ed5580d + +Count = 140 +Adata = baa482c64eefd09118549a8968f44cfea7a436913a428e30aa4ab44802a4ba35 +Payload = d64f9426febce6a84c954dd5ded5 +CT = f7580f17266d68237747bf57c7ed8242ac1a1979c5a9e7bc67d7698c7efa + +Count = 141 +Adata = 2ad8ecc5ac9437ace079419f17e6018625b10490120fbe2f12b41e64b73b653c +Payload = fcd9b67717bcadeceddea336c671 +CT = ddce2d46cf6d2367d60c51b4df4918abced491c063d8bfd0e7341febddc3 + +Count = 142 +Adata = 7585ee95e74d7a869bdc0b59ca9939dd57e7b09afab179079d467bfe0668416c +Payload = 18232d7c792fb80e6ca1c8f2c3cc +CT = 3934b64da1fe368557733a70daf4659ecbb3dbfbcdb0f913abedf8afab05 + +Count = 143 +Adata = 41be6ca6188f34da1ce83fb8c27652848dc2a71e32bd3631fb9b33ae69e5d879 +Payload = 764dbefb42644d18d23e5e456868 +CT = 575a25ca9ab5c393e9ecacc77150a220d5ec0b5397d6b4e323b5dc7d1b63 + +Count = 144 +Adata = 197cee3b15320d57996191dd13106fbd4546a5cc3d2bcf0c886af52ea3d9a855 +Payload = 8003586af34bdd0acae4f5547394 +CT = a114c35b2b9a5381f13607d66aac3a5f713f5d0793b732c6e114805cc9b3 + +Count = 145 +Adata = ee0b647a47656a6e9e09c2d64f734a2cc3fd45b7ee52fea51c24af59ee22a006 +Payload = da143266516a4145cde92c93f961 +CT = fb03a95789bbcfcef63bde11e059ed90e8650bc16f590789dcc625b9e63d + +Count = 146 +Adata = 9f5bfffa01f1425d95465723735b49fc1dffbad06cf37a00ca4b59efa21739c1 +Payload = 3842b033f3ca31a6f8e5a638b39e +CT = 19552b022b1bbf2dc33754baaaa6bda183dda1aef021d92210e27cdd7c5e + +Count = 147 +Adata = 64e92ba2748d07f602808f7c5ded15cb0e43140400d37107e59a01e7d45b4c9c +Payload = cedf60b17185fc71b957cb759260 +CT = efc8fb80a95472fa828539f78b585e4087fb314f893937e95383e66745c0 + +Count = 148 +Adata = 6ebcaeb4bd44ff4c990305ac64264dfe2ada5f7cd4b294eb9f492865cd28905c +Payload = 035f449bb28f43365f4a0556096a +CT = 2248dfaa6a5ecdbd6498f7d410520a71ce5813c578532b742d704fa92276 + +Count = 149 +Adata = db617207dccd1f6baea5f2242d5e577adb8d69af3bb1707a7a53a8b75452455c +Payload = 9a2a45424f4965a71270e77cc403 +CT = bb3dde739798eb2c29a215fedd3bb7fc45d15d6939668065d2282fc589c7 + +[Plen = 15] + +Key = 82d4bc9aac298b09112073277205e1bf42176d1e6339b76c +Nonce = 70325ef19e581b743095cd5eb1 + +Count = 150 +Adata = 6d14bb2635c5d0ae83687f1824279cf141173527e1b32d1baf8a27f7fe34a542 +Payload = 25a53fd3e476dc0860eeeea25fcb0c +CT = 4a1cfd0023557a184b929965b0a445cb3993ca35acf354cb2b4254ff672e7f + +Count = 151 +Adata = 9f8a56fecf32fa7d50f033b2524c3d798e254bc87245cce57e38edd6ee5d5f1a +Payload = 797dca47597947c057789433309b67 +CT = 16c408949e5ae1d07c04e3f4dff42ea25b5eb103bac224cad66ec0f100875c + +Count = 152 +Adata = 86f15b8b677b7655f358a2c7fd5785bc84d31e079ed859b6af88e198debd36fc +Payload = e61f9a663d3a2b50ea2f9475971270 +CT = 89a658b5fa198d40c153e3b2787d39b598cc6ec2295c586e7ae270a01846d1 + +Count = 153 +Adata = 4de6bd43c28143ea5d40919cb5330a7e674f5bd8aeb7b178343a2851281c8668 +Payload = df990c42a268950677c433555319b3 +CT = b020ce91654b33165cb84492bc76fa97ff732093f7d0a96b30d8cdfd1bd583 + +Count = 154 +Adata = a5c3a480dea1b2a1e3a0ce416148b04f60104217c9d24a5b267b4aa6aa07a4dd +Payload = a7e72fb4bec3768594a2f6f5b4379e +CT = c85eed6779e0d095bfde81325b58d7ad98e32a9156e125ff021ef6951b0c40 + +Count = 155 +Adata = 51b041f1666c59045d333fe63d43457107e1adad34fcbf965e0d191f3e414776 +Payload = d3d1550047cf90eceaea7000d8e280 +CT = bc6897d380ec36fcc19607c7378dc9390f10df08a84c21031626861b201fbd + +Count = 156 +Adata = 22f8a3c9d85b2d53ffd92078d3c94373f855ecd01a8ac521d1abd0f2c7cba9ff +Payload = 756412c4ee6416f2f4e0342011cde2 +CT = 1addd0172947b0e2df9c43e7fea2abdd5d840bb8c4348a9a548482e6b93043 + +Count = 157 +Adata = da08b14e1b770b81faaf1e59851df1cba8838cd63bef141340ee378e65fdcbd4 +Payload = 666e4a4b3f6cf598aa763cdada4109 +CT = 09d78898f84f5388810a4b1d352e403f0d49927cd6103e3705ba201e8f73c6 + +Count = 158 +Adata = 2db3ded385ef9c82fd39ea5782d9befe66e8a070066269b2aa7c4bbfac3711c3 +Payload = eb9013a74352b0677a88bd73052477 +CT = 8429d1748471167751f4cab4ea4b3e2d97f7c2b3b42bf570cce79bf30ccc50 + +Count = 159 +Adata = 194c9e1eaa8e376f9c41bf33823efa28ee60a9213438665b7002cf0fcad7e644 +Payload = e3126400e3c571a4d39b37bc938a22 +CT = 8caba6d324e6d7b4f8e7407b7ce56bd3c2a4fc45d014a0c54edab2930a5bdc + +[Plen = 16] + +Key = 6873f1c6c30975aff6f08470264321130a6e5984ade324e9 +Nonce = 7c4d2f7cec04361f187f0726d5 + +Count = 160 +Adata = 77743b5d83a00d2c8d5f7e10781531b496e09f3bc9295d7ae9799e64668ef8c5 +Payload = 5051a0b0b6766cd6ea29a672769d40fe +CT = 0ce5ac8d6b256fb7580bf6acc76426af40bce58fd4cd6548df90a0337c842004 + +Count = 161 +Adata = e883dd42e9ddf7bc64f460ba019c28597587d06e57c3b7242f84d5e7d124ab81 +Payload = b31dfa833b0cda20eaa84d2ecd18f49a +CT = efa9f6bee65fd941588a1df07ce192cb8707b1a4d9ce3def33703e19eaab6dda + +Count = 162 +Adata = 409401eb49cd96b1aad2525c5124c509766ff86f88b2011c67a1d501d3485e31 +Payload = 24bc8dc1e2354667b79ba4d7061448ff +CT = 780881fc3f66450605b9f409b7ed2eaefd9041ddce37d88e79fba28e385b2327 + +Count = 163 +Adata = 83bf5c063bf1febf71688a832d615e09d6f14badedeaeb6ffbfe343fc7274e78 +Payload = d41d95a1d2326e12cba636910ddfca53 +CT = 88a9999c0f616d737984664fbc26ac0291d971893543868bd8c69078fc2bdb24 + +Count = 164 +Adata = 8cdd70524e24318c64d681aa27752d4c86c5348c05c9e48f06ed41594785a6e6 +Payload = e8a4b80e081919f1912542d3136764f2 +CT = b410b433d54a1a902307120da29e02a3866b23e4c991f4007e56a1ee9265c6cf + +Count = 165 +Adata = 615985f63571c0f94ffcd4df77326abd41e84f388f061d97573a181da7ee5695 +Payload = 7fca7388058d6d1438b6eee0292131cb +CT = 237e7fb5d8de6e758a94be3e98d8579a2abbea637996b954027efa9464ced6b9 + +Count = 166 +Adata = 17aa90f2bff0419011b01dee62be31354431cbc89f22332704b096143d4743f4 +Payload = aa540554ee80dbffa475f702d862d6b6 +CT = f6e0096933d3d89e1657a7dc699bb0e757bc8d48d82ebefc76f17323c518ecc2 + +Count = 167 +Adata = 85288b2be612e42335c144fb058a7dcd567c382fbcee3962bd5be4cc7a7000a8 +Payload = 6d745581831edba437e70ea89cad217d +CT = 31c059bc5e4dd8c585c55e762d54472c65470c81e487a26cdc26830f2b51bd1c + +Count = 168 +Adata = 288f9f52824b54b608dd7226a0a89d43ae8c05107dbae761e1c756911a003b74 +Payload = 811a61869c7a6b2aa9ac0fcc523ef784 +CT = ddae6dbb4129684b1b8e5f12e3c791d5a3043722be9448c3ef144f2288066f75 + +Count = 169 +Adata = 51dbaba180d4746edbb3420461919b5b735797bf7dd19f84d80475f5efc2748d +Payload = 378a4e39817f308ed1e639f943b694c4 +CT = 6b3e42045c2c33ef63c46927f24ff29549aba95e04e11cf18ddf73773d395c1a + +[Plen = 17] + +Key = 3cf8da27d5be1af024158985f725fd7a6242cbe0041f2c17 +Nonce = 07f77f114d7264a122a7e9db4f + +Count = 170 +Adata = 30457e99616f0247f1339b101974ea231904d0ef7bd0d5ee9b57c6c16761a282 +Payload = f6dd2c64bf597e63263ccae1c54e0805fe +CT = ce3031c3a70600e9340b2ddfe56aa72cffdc5e53e68c51ee55b276eb3f85d2cf63 + +Count = 171 +Adata = 42370f115bbd4b31bb99fe82cca273b3c93072f96b2e09bdc6718d926d48db69 +Payload = f45fee3e086c28a7c590ec0cc05b972664 +CT = ccb2f3991033562dd7a70b32e07f380f65c6328a7476db2c10ec7bca3f6bd3df42 + +Count = 172 +Adata = e2d692c5678124998a7862b8e87276b0a19e293a609103c99583b36305bcb2b0 +Payload = 4ad69a8ab433ed8909825c71f6081f64a7 +CT = 723b872dac6c93031bb5bb4fd62cb04da68080f0d51d3b8841683eff361984f7e4 + +Count = 173 +Adata = b5b38791160959dd2836ec1ad25286c1ba410d7212347a95b5738a3d725bb651 +Payload = 3d47071c13f994cb42fb2887e5c6e53a54 +CT = 05aa1abb0ba6ea4150cccfb9c5e24a1355c1428ef5d40bc9e363817f219af2ed56 + +Count = 174 +Adata = 02691171795a77d1e3bdad513b6fab5b50d1def81bcc1df15012de3433a6aa78 +Payload = e8a4b80e081919f1912542d3136764f264 +CT = d049a5a91046677b8312a5ed3343cbdb65fdfb37dfd1236198035c8461b304152b + +Count = 175 +Adata = 7371d8ae79e628f53ffede174eb068db2318c05e2f6d94ad2233a59369b16db0 +Payload = 549aa84bb182312dd016e3107f3b1f9c5b +CT = 6c77b5eca9dd4fa7c221042e5f1fb0b55acefde0e84a3ce0cb702ceb73ca1dd9a5 + +Count = 176 +Adata = bb1e1f51082e470f7245458ec902098e1e41d0ed28efa31be71d21ce86527ff7 +Payload = 31a12ca6d69db2e6e252474d7d59ed6552 +CT = 094c3101cec2cc6cf065a0735d7d424c53f8441d46dc5456a587b765e1a820c11c + +Count = 177 +Adata = 7584f57b49e95bbf5a67153e18b9b8c4722644e8f611613c39cbe8c679aba5b4 +Payload = 5bb121e70452a954f420a56aca8cd5c059 +CT = 635c3c401c0dd7dee6174254eaa87ae958d0daddcfcc92349ef059149c54a25cd0 + +Count = 178 +Adata = 505687182c06e6f4effe7fe03c1f436199a9015380ff21d0b2aa9453cfa10b1d +Payload = 5b80d1cf745b14cb71cbc8dfe0bc7c7358 +CT = 636dcc686c046a4163fc2fe1c098d35a5948c1242b89490c6ee69dedc1e91286ee + +Count = 179 +Adata = 7ebb051741145a3bad87131553375c6debcbcecee9b79ee451bd1429cbb33fc1 +Payload = 79ac204a26b9fee1132370c20f8c5bcada +CT = 41413ded3ee6806b011497fc2fa8f4e3dba2ddd54e509bca0a45dcf2fd514e1496 + +[Plen = 18] + +Key = b46a3a24c66eb846ca6413c001153dc6998970c12e7acd5a +Nonce = b79c33c96a0a90030694163e2a + +Count = 180 +Adata = ea9405d6a46cac9783a7b48ac2e25cc9a3a519c4658b2a8770a37240d41587fb +Payload = 56d18d3e2e496440d0a5c9e1bcb464faf5bc +CT = 01baba2e0d5b49d600d03a7ed84ee878926c0ca478f40a6fbde01f584d938a1c91bf + +Count = 181 +Adata = 72340d595f3dbd23b46513f8f2b73b6249328c705e7968084bcb647fe734a967 +Payload = 7a76eac44486afdb112fc4aab939e4d1eedb +CT = 2d1dddd46794824dc15a3735ddc36853890be4646492b6f4cb169383c075756073b6 + +Count = 182 +Adata = d5c87c649579da3f632ba95cb0a07c924095e4bdd4e0376e06bb90e07460172e +Payload = 48348c5ec996f7a97ef0ba2cd6885572fe64 +CT = 1f5fbb4eea84da3fae8549b3b272d9f099b4f584289f560cbf76606942fe1a92dd63 + +Count = 183 +Adata = ffa6277395d31d5db13034d362228a87610e441c98ca3038e252a9db12bdbcef +Payload = d5c58f10e1a03d8a2501d1eaf5fcdfff3ae5 +CT = 82aeb800c2b2101cf57422759106537d5d355964f5f5532d7cddd7207f0e9a6aace9 + +Count = 184 +Adata = daf83d02a9bd992ea58c23e7ad18d41796314bae20e864e729f40ccc215454fc +Payload = da2a863ab1c58ddde320ecadeecac9c5d2d8 +CT = 8d41b12a92d7a04b33551f328a304547b50890ae047e35aecfc38ffdc07e7d8f5705 + +Count = 185 +Adata = 21ddad5f550044dc5cb123ade17eeef549c4e0173b216bcc602c1e736764cca8 +Payload = 4573969afa831c244817230406fe51183091 +CT = 1218a18ad99131b29862d09b6204dd9a5741b2bdf539ceaa35015712dd15265ca476 + +Count = 186 +Adata = 9228265ae5c3daf1485ff8011738da508bf2a73731396c5d9aa56fc554e0c00b +Payload = edf5557e15473b747a819398c9ac1459ffdb +CT = ba9e626e365516e2aaf46007ad5698db980b241412124ae20b84c13b0c3671d305c9 + +Count = 187 +Adata = c0a2ff0de21b3ba961e06015ccd71374856a65a4c57cf8cde0a1643aca8ed868 +Payload = e139263478900df806a0f3446bd6600c1aeb +CT = b65211245b82206ed6d500db0f2cec8e7d3bee9803747bf9fa63412bfc4e10aea89e + +Count = 188 +Adata = b54378f031a31cf3985f573829c9ffca14616742e0a7e03b0a2d7f05eff0219e +Payload = 660eaff0f113eaa2f5f7ad4b62bb849a3a25 +CT = 316598e0d201c73425825ed4064108185df55afdf430b57845dcf622d4f25cdeb2a3 + +Count = 189 +Adata = e67f35c18a9336469eae23040f98f52338ca8d0cab269ac32fe6bc7605d3ea56 +Payload = 0f89897271f5d0349d57399005ea60c0cadc +CT = 58e2be6252e7fda24d22ca0f6110ec42ad0c7ed4c04c4b4dd585891ecfddeab8cc87 + +[Plen = 19] + +Key = 7b71045ccef735bd0c5bea3cf3b7e16e58d9c62061a204e0 +Nonce = 2b9ecfd179242c295fe6c6fa55 + +Count = 190 +Adata = b89166f97deb9cc7fdeb63639eeafb145895b307749ec1a293b27115f3aa8232 +Payload = 890d05420d57e3b3d8dbef117fe60c3fa6a095 +CT = f842ff6662684de8785af275fa2d82d587de0687ebe35e883cbd53b82f2a4624c03894 + +Count = 191 +Adata = 4392c3043287dd096b43b4a37ea7f5dc1d298b0623ccbf4fd650a49569a5b27b +Payload = 6b425cdcdf8304e7fbb70b2973d55e6940025b +CT = 1a0da6f8b0bcaabc5b36164df61ed083617cc807d4824f0a98db2d87365a42ca3b80e1 + +Count = 192 +Adata = 9b4fc98fcdcf485205e7054bc9d1e02d0d8584420537e20d3821de2fd6824787 +Payload = c8bf145fcffbafd6cd1a4c5b6cedfe008aacb2 +CT = b9f0ee7ba0c4018d6d9b513fe92670eaabd221404e631735c544edeeb4c0105c55bf0b + +Count = 193 +Adata = 45622e1472542be2f63f463d253617eafd4f2ad609f9020884905dd5c22fba53 +Payload = 12b5a76faedf6f855e328c2cb87be8aea78c5e +CT = 63fa5d4bc1e0c1defeb391483db0664486f2cdc16a4cf37e8e96eed1217d21133e83d1 + +Count = 194 +Adata = 958689aea3c6cd19020eff9d635ef44ee0793424df38fdf13a238b969d429777 +Payload = f0927c3cb0a876d7877466507da8bfa0bd9a16 +CT = 81dd8618df97d88c27f57b34f863314a9ce4859facf81a636351f6e67d6ec12636ae0b + +Count = 195 +Adata = c22911efc36fa739048af0c951ef2449bb3605c52f65120c4d71fe5976026032 +Payload = d2c5d4e2362f19c99de66da7bd9c495c03d9a1 +CT = a38a2ec65910b7923d6770c33857c7b622a7327ce73a7e2db69d30441f89a03fd0e84e + +Count = 196 +Adata = 799da61e2c10ebb4783f618b8f69da7704a1b2b925cebc228af57d7ceebb9825 +Payload = 1c9d7f5b329ef4d384b8b7955a20f8a3fc15cd +CT = 6dd2857f5da15a882439aaf1dfeb7649dd6b5e8d787a9d06b8533ca96fb1db8aecc8e5 + +Count = 197 +Adata = 14a8e18afe0b9fe18ddfd754219a7e18ed36f419f8262d91678e10daffb31c81 +Payload = 3a64414c3588d7c26871d7d054ac6c8420d491 +CT = 4b2bbb685ab77999c8f0cab4d167e26e01aa028ff5f819d552c08054b5ac02063e102a + +Count = 198 +Adata = 7294a8b4ad97c81969e4a2876a3dc0ee322d554726997dc9ed98c5601985ee5b +Payload = 545dd71bea9967e07a89f84a2027aacd132187 +CT = 25122d3f85a6c9bbda08e52ea5ec2427325f141cde5af8fada67c47cbb5787a6b2d9c9 + +Count = 199 +Adata = 99294b22d73805805630fb416d20d4fca67419ab660ff45cd19a3729e81b9f69 +Payload = ec1b17b885c018272652453f47fa6e9ed972b9 +CT = 9d54ed9ceaffb67c86d3585bc231e074f80c2a7412640b179bd3e8a417dc38462c16e8 + +[Plen = 20] + +Key = dc7c67715f2709e150cceff020aaacf88a1e7568191acbcf +Nonce = da56ea046990c70fa216e5e6c4 + +Count = 200 +Adata = f799818d91be7bab555a2e39f1f45810a94d07179f94fe1151d95ab963c47611 +Payload = f383bd3e6270876b74abbb5d35e7d4f11d83412c +CT = 377b5df263c5c74f63603692cbb61ea37b6d686c743f71e15490ca41d245768988719ede + +Count = 201 +Adata = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8 +Payload = 615d724ae94a5daf8d27ad5132d507504898f61e +CT = a5a59286e8ff1d8b9aec209ecc84cd022e76df5ea9bc8cfaf2a1734a792076618c4b9690 + +Count = 202 +Adata = 4586f73a1f162b2cdb65f6e798a60b5f48938d40b4612d84c1f39244f14efdce +Payload = 6e923e1f404002aa5cf8f8aaf1b9772da425e21c +CT = aa6aded341f5428e4b3375650fe8bd7fc2cbcb5cc5122df904b052e4d5580fdeddf5297c + +Count = 203 +Adata = 9f7ae892e5662803408d4d062265846441a43c1fa202da59f640ae722a692671 +Payload = 68115771505daa18bb3ce90054bfb7d077e1f37c +CT = ace9b7bd51e8ea3cacf764cfaaee7d82110fda3ce0ba1bb1af18e15ade3316c21d6b41fb + +Count = 204 +Adata = 1f0769a7ae82bd985661e031c4a892c15d3ef37bdcfb45243d02f40fdb51d34b +Payload = 681fd2a324b3fea4cfebed567ae4546ba373c8f1 +CT = ace7326f2506be80d820609984b59e39c59de1b1dc71e342fbc44289ef7e53e28edf3839 + +Count = 205 +Adata = bf957ef5ab2805e58ea752da5793f7f23d98fce1b2b67738929e5de8a15f9801 +Payload = a7b9d2d069941e8b943706a02d2847ea713bb103 +CT = 6341321c68215eaf83fc8b6fd3798db817d59843ced1fb4a2a3e349aa590aabbfc3d13bc + +Count = 206 +Adata = 833264c1bebb597043b4158087cb651960915d9023189c9509c0d2aed84e7fe4 +Payload = 9b946e8198ce69d2173e970f4e0c103a47ee4160 +CT = 5f6c8e4d997b29f600f51ac0b05dda68210068205079f6c2739e2b789b6e3d3c60389374 + +Count = 207 +Adata = 94c8414cbbec52e2d73bb8f02ef687c91432495c0c744666317d02e6d46706d2 +Payload = 81ac4618f3db6bcf9bbf67220b7671be4bb4f8a2 +CT = 4554a6d4f26e2beb8c74eaedf527bbec2d5ad1e22a02f287db7217148317d897f65f6a0c + +Count = 208 +Adata = fced1131dab3dabdc1a16d3409fa09a90ffe02f0e2c814a63f77f771c08c3389 +Payload = 90851933d4d3257137984cdb9cba2ca737322dac +CT = 547df9ffd56665552053c11462ebe6f551dc04ec362df9f8b41b1dd4821f8f14e9e633d7 + +Count = 209 +Adata = 495dfcf91f4735ab35c6bc4deef8468bd988e4099cd291a32b4707f93e13d82b +Payload = c14ce6d57f0fe7367331c9fe159ae1fb8f1ccb2c +CT = 05b406197ebaa71264fa4431ebcb2ba9e9f2e26cf61ffb51e56497ca9f39c6665fcbdfa8 + +[Plen = 21] + +Key = f41e369a1599627e76983e9a4fc2e963dab4960b09ebe390 +Nonce = 68ef8285b90f28bcd3cb1bacea + +Count = 210 +Adata = dbe3e82e49624d968f5463ceb8af189fb3ad8b3b4122142b110d848a286dae71 +Payload = 81ad3f386bedcbf656ff535c63580d1f87e3c72326 +CT = 9f6028153e06d14d30b862a99a35413413c04a49dc6f68a03a11cf00d58f062a7b36465d13 + +Count = 211 +Adata = d9acfd611e5bbb08c5d05d56791b8aebabf8d69734ec89153c91a1f65b2e1adb +Payload = 35f6bb3f6a388f3a5a039b0a495b676d0b928aeb19 +CT = 2b3bac123fd395813c44aaffb0362b469fb10781e3ca1fb470b666523a19f83481f16481ed + +Count = 212 +Adata = 6003b771afe4e99e1ef1ed4a31b10540d95f4ac49885f0c8e5cdcb63d213127e +Payload = 6aa7e3802b5a29d4f9ca88eb59f94af783d1054466 +CT = 746af4ad7eb1336f9f8db91ea09406dc17f2882e9c53cb05bfcd64da2b45c2e9a89a380b49 + +Count = 213 +Adata = c371644275a6290821e7d308714bec2bf62d36c30f7fa77a0d60b28894f1c82a +Payload = 13332b67ba5ba18137c306bd860dc3eb0a9a0b871a +CT = 0dfe3c4aefb0bb3a518437487f608fc09eb986ede048f70fbc680cf7092b3dd90b943fc6e5 + +Count = 214 +Adata = 8eceb15300ec4220510ed5b7deb3429de6ae5f618e1c222c28990a9ab4b4bac8 +Payload = 05981dc26a1db2d8e2c3d85ea9a4d1dc3432d9edc4 +CT = 1b550aef3ff6a8638484e9ab50c99df7a01154873ee386f33c0b8da8d0c5934e617dd618e5 + +Count = 215 +Adata = 96d1cf3690c48c77a155ce13e67bbd62e6f03d88c893c1f7c30a6435d5ab36e0 +Payload = 60249343a8cd4d33c6edc583ea7e5c221ef3064787 +CT = 7ee9846efd265788a0aaf476131310098ad08b2d7d3d2db1360fb1121893f4d197731bce4f + +Count = 216 +Adata = 379bbc9f919dc2a8687f2a86cc9c3291804240a9b566c58519956848102e6155 +Payload = 79003a8d3d20d412f468f11712cec4d37cee847440 +CT = 67cd2da068cbcea9922fc0e2eba388f8e8cd091eba335ce1bfafc0948f2523e75f2aad86f9 + +Count = 217 +Adata = 9bff9c9a8f94cd77e7016748da31f86d1b9c68465cbf954511c93a4776981524 +Payload = 7d078a8b200514a00628756250d410f7a0f8a769e6 +CT = 63ca9da675ee0e1b606f4497a9b95cdc34db2a031c7dc265e281307f0f4c38cddc556ac725 + +Count = 218 +Adata = 25125a4668c31dc2e8a68b6c4c95ad7cf9322852e371b415a357d09acb01b587 +Payload = d9b0eaaff786165f882f41a98dbc0c355b3a1aaf40 +CT = c77dfd82a26d0ce4ee68705c74d1401ecf1997c5ba61c78a2f85a447c3e62b6197d65b9065 + +Count = 219 +Adata = ad34d8f0902a5b79fb145b8206bb4d3b77e0bd8ae2d0964815389eacb33b4007 +Payload = 17b517ef577f588da374340d2522cc9ea642c8d8ae +CT = 097800c202944236c53305f8dc4f80b5326145b2540312d067c08a9b4400e1df8bb7ed671a + +[Plen = 22] + +Key = 3289e59e3a7b29bf4a309afc253030bba4b9bdd64f0722f9 +Nonce = 30259ce106e9bd7a8bacbaf212 + +Count = 220 +Adata = 2870bd9a26c510e9a256920899bbc77a4eb9b53f927045a943d5ed6b13638cf3 +Payload = 53911a67b65738f87fc7c20d6db8044bde1af95838d1 +CT = 70cf37d4b6f7e707376b1574ce17c040b5143da47abb2fe9afafc2fccd98ccf63b0fdec30eac + +Count = 221 +Adata = 611032a95ee87f89ad6be7c0fed8bd245c5f81076087b3bda4cde5587b8d14b6 +Payload = 46917e38b8a542296d290d065b0aa7c8aaa38950c386 +CT = 65cf538bb8059dd62585da7ff8a563c3c1ad4dac81ec102dfd8c231d6a355f079c213ce6858e + +Count = 222 +Adata = 2e7ea26d1cceaca3b7862a7a8469e366b52ec27ca127e3317222ee651d8da4a0 +Payload = b527828c89f674dc6f024f8cdd80c694bb3ebd57b2d9 +CT = 9679af3f8956ab2327ae98f57e2f029fd03079abf0b36df11febe34dd568da12c374674b9ac4 + +Count = 223 +Adata = 0bf4413010daec585de34142224d1cad3072f9720f91ac664ad152820e838741 +Payload = 78230f73f9c0150f630eca4cd679818551d449db82e6 +CT = 5b7d22c0f960caf02ba21d3575d6458e3ada8d27c08cb2916540d9439b832aa44236a7e187ac + +Count = 224 +Adata = 2e7cae3306582eb5bad148247aa6c6ec943f8748e84b8a069ca9488b11844716 +Payload = 847bb12e0e56fa07a086eeda5907ae148148fa4107d2 +CT = a7259c9d0ef625f8e82a39a3faa86a1fea463ebd45b80d0768a18dead55700901408aa3f901a + +Count = 225 +Adata = 63036dc4ad13aee5dc1832e867f7538da108188fec7b08262af440d07579c451 +Payload = ec59e208c4bb429a371f1b3ffdf07fce5dea8a05f0ce +CT = cf07cfbbc41b9d657fb3cc465e5fbbc536e44ef9b2a45f2073605d2a441805b6ff89d8beb68c + +Count = 226 +Adata = f9ec5ce4b63156d57e451eb67ab6d7a59cc397f43f6d26dc07d1036f0fb4a8cf +Payload = fb12d94bd21b5748b23132a03065c78dae65a0bd2cfb +CT = d84cf4f8d2bb88b7fa9de5d993ca0386c56b64416e91dcabef6907811c6b7df4e74c7a63d83b + +Count = 227 +Adata = e13a204e16f42bbf4716e95f1cb7e125ffac66a87f591c8ef2c7b8485ff707fd +Payload = 239fa31d4a65de0318bfc5b60a06d706c129dcf255ac +CT = 00c18eae4ac501fc501312cfa9a9130daa27180e17c626aa8aa37e858cd990f5593d9ef35f2a + +Count = 228 +Adata = c4591c3ad984a1e189c526b719212f8248289eeb277827272b8205d78191eb2d +Payload = 57caadbb1a56cc5b8a5cf9584552e17e7af9542ba13e +CT = 749480081af613a4c2f02e21e6fd257511f790d7e354d81e424d6b4528901ae46fb35f8b3106 + +Count = 229 +Adata = cf4795bc7f43c30d3c3a8fd1b8a9d77d69bf59eb8b59d0f464315f40cb52335d +Payload = a68c74e05f0a44d4a0372c0e5915b83d8e6729efacbb +CT = 85d259535faa9b2be89bfb77faba7c36e569ed13eed1f25a4bfda35e1390f3f16f638dcd4047 + +[Plen = 23] + +Key = 40f1aff2e44d05f12126097a0f07ac0359ba1a609356a4e6 +Nonce = 0df3fc6396f851785fca9aa5ff + +Count = 230 +Adata = e9699b20b0574fce8b5cbc4ef792eb96e2c1cce36b1b1f06ea2a95fe300633cc +Payload = 8d98c580fb366f330dbfda20f91d99a0878b47efd14c6d +CT = 579cdf9da62a2df471e03450516adb4ce99ae0f70b1776a39c3b429a1f922fac0b59e29a122e43 + +Count = 231 +Adata = bd94c9ad6253c25dc417f87b6e52e03621ccf4b3bff5b402677aeb51e216335f +Payload = 7391ba60fabe2c632bbaca16af9a235b2c7dae61691c0b +CT = a995a07da7a26ea457e5246607ed61b7426c0979b3471067bf538e40f9366adf8758968f06ce8a + +Count = 232 +Adata = 4f263cda4a50b0e5379ec2fb546b326a07943527c1d175c029455a917753883b +Payload = 7e1e93a6ca35a2c0e4f08fdb2e7ee22b9f486f0ab919e2 +CT = a41a89bb9729e00798af61ab8609a0c7f159c8126342f964a1199251b54f419720a30de83161de + +Count = 233 +Adata = 4d43702be4f0530319555d7f1a3356160f6cae48051f12e22a153d7e405c1149 +Payload = f94ff053c7413f34f96eae41fd1ac101151069af5a9428 +CT = 234bea4e9a5d7df385314031556d83ed7b01ceb780cf33b417e4cceb8dcf45ef33cc0007755bbc + +Count = 234 +Adata = f4d7978fad36223623ccb5bb18a7373cba8a6e3b1c921259e319266042db8887 +Payload = ba0716355fffb8ef947d2a15eb58375a1ff1084c566990 +CT = 60030c2802e3fa28e822c465432f75b671e0af548c328bd35aed57f49dcfecf248cf9d246ac024 + +Count = 235 +Adata = 12e4fe727b1f27a619dd67bb976ddc2b18b2ef8b7184290d9553494a500d933e +Payload = 872940780a94680a791c937994ceafd2c8b7a22b5f4927 +CT = 5d2d5a6557882acd05437d093cb9ed3ea6a6053385123c97cda0e04d2ff65c2e06a8276bdf6f97 + +Count = 236 +Adata = 2c16724296ff85e079627be3053ea95adf35722c21886baba343bd6c79b5cb57 +Payload = d71864877f2578db092daba2d6a1f9f4698a9c356c7830 +CT = 0d1c7e9a22393a1c757245d27ed6bb18079b3b2db6232b3494dd2ee0a0fe5bfc9f69234c8142ed + +Count = 237 +Adata = cefc4f2fb796c2502329ca3d8f8af3200dd9edb8f164e15acec90536a15b6fdc +Payload = cda681aa3109ebf5f21ee3a849098ea3a551e844fae4b4 +CT = 17a29bb76c15a9328e410dd8e17ecc4fcb404f5c20bfaf9008ead8e923997508eebf5e776198dc + +Count = 238 +Adata = 94fc7eb8febb832097ba6eecd2697da91b5a8a1f2248f67a7659e0ac55a09a0d +Payload = d4f8d262870b5000a40b8fcce88f55c65c4d12e729975e +CT = 0efcc87fda1712c7d85461bc40f8172a325cb5fff3cc45f136cc6ea1b0fdb554e0803053875b89 + +Count = 239 +Adata = 459085184094e302b2e921cc04270b676e75bbcf0e4b53ed387df2bd0e75e0ac +Payload = 732f211061c0a32c6ad124c58418d560ef5eab2602314c +CT = a92b3b0d3cdce1eb168ecab52c6f978c814f0c3ed86a575da8ceccae093888daaf92c95817fc3d + +[Plen = 24] + +Key = 91f9d636a071c3aad1743137e0644a73de9e47bd76acd919 +Nonce = 1bf491ac320d660eb2dd45c6c3 + +Count = 240 +Adata = 3bdfd7f18d2b6d0804d779f0679aaa2d7d32978c2df8015ae4b758d337be81dd +Payload = 4eaf9384cad976f65f98042d561d760b5a787330dc658f6c +CT = 635530cab14e3d0a135bb6eebb5829412676e6dd4995f99cb7e17f235bd660e7e17b2c65320e9fd4 + +Count = 241 +Adata = 9de45b7e30bb67e88735b8fb7729d6f3de46c78921b228bad8f17cc9c709c387 +Payload = 59bee7d18fd4ba573f3e4f61076f5b9f6a3487e47d98c729 +CT = 7444449ff443f1ab73fdfda2ea2a04d5163a1209e868b1d99f40890c7d650afccda40fb2a4cd603b + +Count = 242 +Adata = 783477f981ef0551b5e7a714b640bbb38316c53756c96e30c898cdee3b72e6f4 +Payload = 4e7f3c86d846ff351db81dbe1d2e9ed73ec0450587ae681b +CT = 63859fc8a3d1b4c9517baf7df06bc19d42ced0e8125e1eeb50236cf1a12a9e3542a4051788f9775a + +Count = 243 +Adata = 2851d40243512a43f70f9c25e9b18c122a1433f05c61e65017e197e88b129e43 +Payload = 2db7cb2739c839383b64c2c93c7d5c906d984756c3dedaa9 +CT = 004d6869425f72c477a7700ad13803da1196d2bb562eac59b1bbad9861192df356c6678b2f561ea3 + +Count = 244 +Adata = 1cfa2d62cc1f6313fb0c6eb21803e09cdf61ee3ddb15192529560e5d8096cafb +Payload = 2f2b82497c78369890809460d80a16be4f3330e8a0089165 +CT = 02d1210707ef7d64dc4326a3354f49f4333da50535f8e7951da4211d4c28d2d91568117fc99fd911 + +Count = 245 +Adata = 5a14b556156191b2704936f64df0bf1dd2bd8d587418f4f85472338fcf86aa52 +Payload = 7cfefca725da1b6bb5d9545e3e50f5a624a8160bdb0e7d4e +CT = 51045fe95e4d5097f91ae69dd315aaec58a683e64efe0bbeda99be0e054bb881a25a74b547d3ed5e + +Count = 246 +Adata = 148de640f3c11591a6f8c5c48632c5fb79d3b7e1cef9159c680d71fd1f9801fa +Payload = 5205165c4e9612974dc92f60d1e328d68aa9466e27dbd499 +CT = 7fffb5123501596b010a9da33ca6779cf6a7d383b22ba2694c1fedb47fa30ff2ead6bf382431b2de + +Count = 247 +Adata = f852e38703097cc37c589b7860dbc333e091411462d5576dc9909a8cf6ac99d4 +Payload = f968f2833427abbc9fe1cab7e7a3f905a3b23a35802029ff +CT = d49251cd4fb0e040d32278740ae6a64fdfbcafd815d05f0f338762a4e4299615c67130a28b56a383 + +Count = 248 +Adata = 43df03a0e23c7ad0d13485150ca224c0b3f39d4e5f2d718db6308e003d3dc683 +Payload = 67da6ca42655188af0b8e389152b2a1b6e2c3ed88926afa5 +CT = 4a20cfea5dc25376bc7b514af86e75511222ab351cd6d9559dbdf61387294812f483aad76d48d899 + +Count = 249 +Adata = b297dce04ada2ddebc7e94eff7c51b87eee2f98c410c5c0919d0652653ab7458 +Payload = 9777cf90dd7c7e863506686fc3ba6d3d05328f78b350f92f +CT = ba8d6cdea6eb357a79c5daac2eff3277793c1a9526a08fdf078177541e19b11dfec995f40c99af70 diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT256.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT256.rsp new file mode 100644 index 0000000000..e9cd7eefe9 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VPT256.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476 +Nonce = 291e91b19de518cd7806de44f6 + +Count = 0 +Adata = b4f8326944a45d95f91887c2a6ac36b60eea5edef84c1c358146a666b6878335 +Payload = 00 +CT = ca482c674b599046cc7d7ee0d00eec1e + +Count = 1 +Adata = 36c17fd901169e5b144fdb2c4bea8cd65ad8acf7b4d3dd39acf2ad83da7b1971 +Payload = 00 +CT = 67747defe5da5fecc00b9bf3b249f434 + +Count = 2 +Adata = 9a37c654ab8e5a0c6bdfff9793457197d206ed207d768cbc8318cfb39f077b89 +Payload = 00 +CT = c57ef5d0faf49149c311707493a4cfd4 + +Count = 3 +Adata = 5ab80169184541393a6975f442ee583cd432d71a6d1568fa51159df7c5b8f959 +Payload = 00 +CT = bc2fb5571a7563bb90689a229d2f63a7 + +Count = 4 +Adata = c78a22a667aafab0c94047e03837d51b11490693d5c57ea27b901ff80b6a38f9 +Payload = 00 +CT = 428888c6420c56806f465b415a66e65a + +Count = 5 +Adata = e11e30cbf63623816379f578788b0c8e6b59ee3c9c50aa6e1dcd749172d48fed +Payload = 00 +CT = 9f1b7520025e1075731adc946b80121d + +Count = 6 +Adata = 05716168829276ff7ab23b7dd373db361e6d9e1f11d0028d374a0d3fe62be19f +Payload = 00 +CT = bd36b053b6a90f19e3b6622cba93105d + +Count = 7 +Adata = 3e915389639435629fcc01e1b7022d3574e2848e9151261ad801d03387425dd7 +Payload = 00 +CT = 458595a3413b965b189de46703760aa0 + +Count = 8 +Adata = 2f496be73a9a5d9db5927e622e166c6ec946150687b21c51c8ca7e680f9775ac +Payload = 00 +CT = 8b259b84a6ee5669e175affca8ba3b1a + +Count = 9 +Adata = 0a8725bd8c8eab9ed52ca47835837b9f00a6c8d834ab17105b01eb4eb30402e7 +Payload = 00 +CT = c5f35fdf2b63e77a18d154f0ddcfedbf + +[Plen = 1] + +Key = cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14 +Nonce = 6df8c5c28d1728975a0b766cd7 + +Count = 10 +Adata = 080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5 +Payload = 1a +CT = a5f24e87a11a95374d4c190945bf08ef2f + +Count = 11 +Adata = f6cfb81373f1cbb0574dda514747d0099635b48cb809c6f1fa30cbb671baa505 +Payload = 40 +CT = ffd43c5f39be92778fdce3c832d2d3a019 + +Count = 12 +Adata = 5a88b14bada16b513d4aa349b11ce4a77d4cda6f6322ff4939ad77d8ecb63748 +Payload = 41 +CT = fe753b7b661f1aad57c24c889b1c4fe513 + +Count = 13 +Adata = a92b95b997cf9efded9ff5e1bff2e49d32e65f6283552ded4b05485b011f853f +Payload = 06 +CT = b91c5ac66e89bf2769ef5f38a3f1738b24 + +Count = 14 +Adata = a206a1eb70a9d24bb5e72f314e7d91de074f59055653bdd24aab5f2bbe112436 +Payload = c8 +CT = 773fe64379cea1a8ae3627418dd3e489a2 + +Count = 15 +Adata = d3029f384fd7859c287e38c61a9475d5ddbfd64af93746b1dc86b8842a8c194c +Payload = e2 +CT = 5dabc529442ff93005551b7689bcb748f7 + +Count = 16 +Adata = 51ca3d3b70b5e354451a5177d7acfd8e7b44eae55e29d88b5e8eb8fc1e5c62fc +Payload = 1a +CT = a5ee68e416617ac974b3d1af7320cd51f6 + +Count = 17 +Adata = 8c6c6791f1ac957b18bf008e260a0af4a5b7bfdb1e0008d6eaaa227f45cf4f62 +Payload = dd +CT = 6243883d93d7066991e0fac453400b4fbf + +Count = 18 +Adata = b0a1af969a95025385b251afd1e89f353426ed6e5d71019cd73366aa31d5b464 +Payload = 4c +CT = f3b940d416f3435812f9d1b18f441b7721 + +Count = 19 +Adata = 7e72b2ca698a18cb0bf625f5daddb0d40643009db938340a9e4fe164a052fee1 +Payload = 88 +CT = 371d27e9a32feea28a6a7e7da2d27e1cc4 + +[Plen = 2] + +Key = 36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510 +Nonce = 021bd8b551947be4c18cf1a455 + +Count = 20 +Adata = b5c6e8313b9c68e6bb84bffd65fa4108d243f580eab99bb80563ed1050c8266b +Payload = be80 +CT = ecacc3152e43d9efea26e16c1d1793e2a8c4 + +Count = 21 +Adata = 38e5032c5949c2668191ef1af5bb17eddc28abdb4e5bb41eaffec2523b2525d6 +Payload = 82c9 +CT = d0e5d06bf4b50ccce0b2acfd16ce90a8854d + +Count = 22 +Adata = 0b50f5173249fb7118f80d25874d6745d88e4ce265fa0dd141ad67ae26c31122 +Payload = 8239 +CT = d0158d784f486c1dc4a2bafd5b02ca1e1c05 + +Count = 23 +Adata = 0296743a3125b103a2b2a78a109e825ea10834bd684215ab2e85cc4172e37348 +Payload = 16c1 +CT = 44eda3377002a48f9fe306d157358e6df37d + +Count = 24 +Adata = a94e64becb803e211785ba51db7f3db042fbf44a7a821509156a6828b0f207e9 +Payload = 2801 +CT = 7a2df6c09bf1dcb1c82bd98c6e2c13a8d7a5 + +Count = 25 +Adata = 105358cc17b12107e023a23d57b44c66a2c58d8db05100311575e1ea152fc350 +Payload = 65e7 +CT = 37cb2ea363c0d8864363056467570959ba03 + +Count = 26 +Adata = 669f9a63cf638a202dca1965c4116273249813ce0b39703887d89bdf5b3b12d6 +Payload = 819d +CT = d3b16519377e6d0252b5f80cdf3d0253eccf + +Count = 27 +Adata = e288590a3eba28ac6847a50b0294ab6bd0a548716ff5102c44a5b656b2d9ddd6 +Payload = 761e +CT = 24329a4dee6ca2cde473f08f76f779856c3c + +Count = 28 +Adata = 5b222aae3c7786c3b9021ba672f9136190ec931cf055f84c85706127f74c6d5b +Payload = 56de +CT = 04f29e65c0f01e644e74092253b470cd5511 + +Count = 29 +Adata = 2082f96c7e36b204ad076d8b2f796cccf5cbc80b8384b53a504e07706b07f596 +Payload = b275 +CT = e059809fa107f379957b52ac29fe0bc8a1e2 + +[Plen = 3] + +Key = ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944 +Nonce = 0bddf342121b82f906368b0d7b + +Count = 30 +Adata = 887486fff7922768186363ef17eb78e5cf2fab8f47a4eb327de8b16d63b02acb +Payload = db457c +CT = 54473c3f65d6be431e79700378049ac06f2599 + +Count = 31 +Adata = 0683c20e82d3c66787cb047f0b1eb1c58cdde9fb99ee4e4494bbf27eb62777d1 +Payload = 62a6c5 +CT = eda4853b186edc15c22ba24e470eb5a072da9f + +Count = 32 +Adata = 413074619b598f8bed34cab51ddf59941861ba0169ebe7570a5ed01d790c08e5 +Payload = cc67bc +CT = 4365fc52a1fb5a58bd51931230c1a7dfb1a8c1 + +Count = 33 +Adata = 2d65a5175c29a095dc082dab9cfcf4b895efbfa715c57614589d4db159543ce9 +Payload = 33800b +CT = bc824b7d3810f59176cb108c7e969da51d4d79 + +Count = 34 +Adata = 6a831b6059456be98e6fce608d8c71cb8efb04a96b45c2dfbdaeabf5420a1482 +Payload = b2c826 +CT = 3dca6646ffea832595c9c86e6517215541ddbd + +Count = 35 +Adata = 3a04a01160402bf36f33337c340883597207972728c5014213980cd7744e9e41 +Payload = d7e620 +CT = 58e460e89a6725f0fc35622d89d2f3e34be90a + +Count = 36 +Adata = 64d8bd3c646f76dc6ce89defd40777fe17316729e22ba90f6a2443ee03f6390b +Payload = 795af4 +CT = f658b4b1bd7ad5d81686aeb44caa6025d488bd + +Count = 37 +Adata = 7bef8d35616108922aab78936967204980b8a4945b31602f5ef2feec9b144841 +Payload = 66efcd +CT = e9ed8d0553c801f37c2b6f82861a3cd68a75e3 + +Count = 38 +Adata = 92f7dc22dcbbe6420aca303bd586e5a24f4c3ed923a6ebe01ec1b66eee216341 +Payload = 78b00d +CT = f7b24de3eeb8ea6c08b466baf246b3667feb3f + +Count = 39 +Adata = 71bf573cf63b0022d8143780fc2d9c7dbd0505ac31e9dce0ad68c2428b0878a0 +Payload = 9dd5e1 +CT = 12d7a11db811640c533794bfec6eeb977233ec + +[Plen = 4] + +Key = 62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0 +Nonce = 5bc2896d8b81999546f88232ab + +Count = 40 +Adata = fffb40b0d18cb23018aac109bf62d849adca42629d8a9ad1299b83fe274f9a63 +Payload = 87294078 +CT = 2bc22735ab21dfdcfe95bd83592fb6b4168d9a23 + +Count = 41 +Adata = 75c3b3059e59032067e9cd94d872e66f168e503bcf46bc78d82a4d4a15a29f6e +Payload = 0f28ee1c +CT = a3c38951b5de3331078aa13bd3742b59df4f661a + +Count = 42 +Adata = 8fb9569f18a256aff71601d8412d22863e5a6e6f639214d180b095fa3b18d60e +Payload = d41c9c87 +CT = 78f7fbcae52afe7326a12a9aaf22255a38d4bd0d + +Count = 43 +Adata = 8b62d9adf6819c46c870df8a1486f0a329672f7d137bb7d8659f419c361a466c +Payload = 046bc0d8 +CT = a880a7957543692a72f0d599de48b5e5f5a9413f + +Count = 44 +Adata = fd98f8f39dfa46ea5926e0ffacbabbe8c34205aade08aa0df82e1d4eaaf95515 +Payload = 39bd4db8 +CT = 95562af530fc357f5482b9004d466bf858586acb + +Count = 45 +Adata = 09bf4f77a9883733590a3cc7ee97f3c9b70f4db255620e88cd5080badc73684c +Payload = b43cdd3a +CT = 18d7ba77a9e8db046fdd548b52d40375c1e9a448 + +Count = 46 +Adata = 40326d765e0f6cf4b4deccb128bebf65a7b3c3e5bcf1d58f6158e1e9153b7e85 +Payload = e0052e9b +CT = 4cee49d64efbdd4ad8d3e863172d9372fca07c20 + +Count = 47 +Adata = aa5ae6dcdc21b5446489bdabf5c6747bdf3bbfdb3de2c03170efefe5ccb06d69 +Payload = 696825f6 +CT = c58342bb95bd661b32bc18025808f8b4035acad6 + +Count = 48 +Adata = d3d34f140a856e55b29471fde4c0e5f7306b76d03faab26db79c10f95ffb3122 +Payload = 7eb07739 +CT = d25b1074ac05b072264e31a4b2801a6d790512d7 + +Count = 49 +Adata = 648a84813ca97aef4ab7e143ee29acb946388660f18eb671194646e0b0136432 +Payload = 9cad70b1 +CT = 304617fcc00514d260e1d211de361c254369e93a + +[Plen = 5] + +Key = bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576 +Nonce = 4f18bcc8ee0bbb80de30a9e086 + +Count = 50 +Adata = 574931ae4b24bdf7e9217eca6ce2a07287999e529f6e106e3721c42dacf00f5d +Payload = 3e8c6d1b12 +CT = 45f3795fcf9c66e1a43103d9a18f5fba5fab83f994 + +Count = 51 +Adata = 99cd9d15630a55e166114f04093bd1bb6dbb94ecaad126fe5c408dee5f012d9f +Payload = 76fc98ec66 +CT = 0d838ca8bb6f3cd579294f706213ed0f0bf32f00c5 + +Count = 52 +Adata = 1516fdf7a7a99f3c9acc7fff686203dec794c3e52272985449ddf5a268a47bc3 +Payload = 6564c247cc +CT = 1e1bd603117d38e026f706c9273dbcb6dc982751d0 + +Count = 53 +Adata = 0c9c35be98591bf6737fc8d5624dcdba1a3523c6029013363b9153f0de77725b +Payload = c11b9c9d76 +CT = ba6488d9abc3e46166767c6ad2aeffb347168b1b55 + +Count = 54 +Adata = e74afe3ba960e6409dba78ecb9457e2a4ce2e09792b1d2e3858f4c79f7ddba62 +Payload = 45a4e0d7dd +CT = 3edbf4930033a7dca78bcbf4d75d651ee5fadff31b + +Count = 55 +Adata = 96cbe9cd193513599c81f5a520fabaff51ee8cbdb81063c8311b1a57a0b8c8fd +Payload = e5861b2327 +CT = 9ef90f67fa11585167c83105ee16828a574c84ac86 + +Count = 56 +Adata = 2e7ea84da4bc4d7cfb463e3f2c8647057afff3fbececa1d20024dac29e41e2cf +Payload = f5b5bcc38e +CT = 8ecaa88753ffaba456f78e431f4baa5665f14e1845 + +Count = 57 +Adata = be125386f5be9532e36786d2e4011f1149abd227b9841150d1c00f7d0efbca4a +Payload = b6cc89c75d +CT = cdb39d838034714731f9503993df357954ecb19cd3 + +Count = 58 +Adata = 3fa8628594b2645bc35530203dca640838037daeaf9cf8acaa0fb76abf27a733 +Payload = 3802f2aa9e +CT = 437de6ee436c1b008b7572752f04362b2bfdc296bb + +Count = 59 +Adata = 642ae3466661ce1f51783deece86c38e986b8c0adea9e410e976f8a2fe0fe10f +Payload = e082b8741c +CT = 9bfdac30c1a3f7c3c29dc312c1f51a675400500e32 + +[Plen = 6] + +Key = 5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c +Nonce = 7a76eac44486afdb112fc4aab9 + +Count = 60 +Adata = a66c980f6621e03ff93b55d5a148615c4ad36d6cbdd0b22b173b4b1479fb8ff7 +Payload = 1b62ad19dcac +CT = 4ad1fcf57c12b14e0e659a6305b4aeffae82f8a66c94 + +Count = 61 +Adata = c13f65bd491cb172a0f7bbc4a056c579484b62695e90383358d605307d5be0a5 +Payload = 3ef0faaa9b79 +CT = 6f43ab463bc779fa7932d365e2da9b05c00a7318384a + +Count = 62 +Adata = 59dcca8fc50740831f8f259eb55d4db11f763a83187d93758d78d166f4d73cd5 +Payload = 1a98ddbf35f1 +CT = 4b2b8c53954f813229912137b7a4945dc07cea24a974 + +Count = 63 +Adata = 578509ca4f57aadb78056794bf18b0714090970db786e2e838105e672165761c +Payload = f46a7b1c28ea +CT = a5d92af088546e045f19f737a24c8addf832ed3f7a42 + +Count = 64 +Adata = 696c0c6427273cf06be79f2206c43af9cbda0b884efaf04deba0c4bf0a25cb26 +Payload = e98f5e5a20d0 +CT = b83c0fb6806edaae8a7dcd3b0fbb59438f88743ec6e8 + +Count = 65 +Adata = 95a66b60249ed086eecaeb9bc449afcee9de212619e87516ca947351b25120df +Payload = 06319c0480e2 +CT = 5782cde8205cd9cb636ca6543c4e35964f47341f2814 + +Count = 66 +Adata = 2b411bea57b51d10a4d2fb17ef0f204aa53cf112e1130c21d411cdf16a84176d +Payload = f4c723433b7c +CT = a57472af9bc2ec82eadf4eb1f055da1a92a82052ab8b + +Count = 67 +Adata = ff3bff3a26fc5a91252d795f7e1b06f352314eb676bff50dc9fbe881c446941e +Payload = 02f809b01ce3 +CT = 534b585cbc5d01b10a7ae24a4ca2bfb07ea2a3b31a97 + +Count = 68 +Adata = f6be4aad63d33a96c0b5e9c4be62323c9e2308b29961fff980ba0dbda0549274 +Payload = 2b6004823a29 +CT = 7ad3556e9a97231323a4b88af5d7d0b07c0e73ddce1d + +Count = 69 +Adata = c3706a28d7420b41e072dcecc06b6b13116cca110bde8faea8e51f5107352d71 +Payload = 236c60cba4fa +CT = 72df31270444db30eb33d2ede33abbe22f37704fe68b + +[Plen = 7] + +Key = f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2 +Nonce = d0d6871b9adc8623ac63faf00f + +Count = 70 +Adata = e97175c23c5b47da8ce67811c6d60a7499b3b7e1347ad860519285b67201fe38 +Payload = d48daa2919348d +CT = eb32ab153a8e092fa325bafc176a07c31e6cc0a852d288 + +Count = 71 +Adata = ba45e1859efae362a44a0116a14e488ba369da6c76c3913b6df8e69e5e1111fa +Payload = f95b716bfe3475 +CT = c6e47057dd8ef1a24840f4f40a7963becde3a85968b29c + +Count = 72 +Adata = efcaa6f6cda3036b0b52ff9f36bc38ca74049c32c6b7cdfb8a46ca4144bacd64 +Payload = 4862e3677083f0 +CT = 77dde25b5339748f2a4a5c276727e0a210fc2efb5aeabe + +Count = 73 +Adata = 360bcb407603fe92f856bf677625b9882521e6dae8f35fdfc3dc737f9398f609 +Payload = 7f1ca0728f6d65 +CT = 40a3a14eacd7e1051734fc31232ab2ab63474020ab4dc9 + +Count = 74 +Adata = f12ee9d37946cfd88516cbe4a046f08c9bbba76a3973ff1e2cb14493405bd384 +Payload = 67478ef73290fa +CT = 58f88fcb112a7ec715244f307609ffa253e4e3659b0ece + +Count = 75 +Adata = 5833dde0c577b2be4eb4b3d01d7b0042fa8441ad7043ea462bbbbd56a59790ea +Payload = 36bb9e511276c5 +CT = 09049f6d31cc41f11047da612d2987fa2e50ada5ae7f9d + +Count = 76 +Adata = 1e103c63d8ead36b985f921044cd32b8f9f04a2ba9fa154a09e676ffaa093970 +Payload = d68d6556c5a5b1 +CT = e932646ae61f35382f7648718127ebae7eb7443ebd2c2c + +Count = 77 +Adata = a1cfb61d45a140bdea6329ba0fe80429ff9aa4624a1d31bc752f7c97f1d390a0 +Payload = 0568cca4ff79dc +CT = 3ad7cd98dcc358cc40a5e7fffb1fb9a5dd9d6ba91bede1 + +Count = 78 +Adata = 116b5b015e44ceef0061b2d2e73fa0b386d5c1e187782beebdfc6efb5a1c6935 +Payload = bd93d08eea4263 +CT = 822cd1b2c9f8e7468d2b70c311732f11ed72b57d83e500 + +Count = 79 +Adata = 3d55882e6f3f89309b6940a3b408e573458eedd10fc3d0e1f3170eb313367475 +Payload = 4fb62753024e92 +CT = 7009266f21f416b41a70f548e359add30c0e5746fbeb2b + +[Plen = 8] + +Key = 493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b +Nonce = fe2d8ae8da94a6df563f89ce00 + +Count = 80 +Adata = 579a637e37a0974cd2fc3b735d9ed088e8e488ffe210f043e0f9d2079a015ad6 +Payload = e5653e512d8b0b70 +CT = 75d31f8d47bee5c4e2ba537355ae8ab25cc9ed3511ff5053 + +Count = 81 +Adata = 1583138aa307401dddc40804ac0f414d338fc3ffb2946f09aaaa7079426fc1ee +Payload = 2c4ba9ce52e01645 +CT = bcfd881238d5f8f1781a9e359804831f31a1efb1ae1cb71d + +Count = 82 +Adata = 78d3dda40e433bba7a330ca3e5bd5170f0895f2e3e438402344ced79fcb0c719 +Payload = 5eb2d054a0e58c62 +CT = ce04f188cad062d62dcc77c4e1fe2bafd477598977835f0c + +Count = 83 +Adata = dfc762466fa84c27326e0ee4320aa71103d1e9c8a5cf7d9fab5f27d79df94bd6 +Payload = bbbf7830d04ab907 +CT = 2b0959ecba7f57b308946723baf0dbf613359b6e040f9bd5 + +Count = 84 +Adata = 7e8ea82d1137c1e233522da12626e90a5f66a988e70664cb014c12790d2ab520 +Payload = 10c654c78a9e3c06 +CT = 8070751be0abd2b2003bd62ca51f74088bbbd33e54ac9dd4 + +Count = 85 +Adata = 873da112557935b3929f713d80744ed08b4b276b86331dbc386fba361726d565 +Payload = 668d32e322e1da3e +CT = f63b133f48d4348a67e65e7f2cdedf6ef8cc0ee7a6dcfb02 + +Count = 86 +Adata = cfba97919f703d864efc11eac5f260a5d920d780c52899e5d76f8fe66936ff82 +Payload = e39f6225e8eab6cc +CT = 732943f982df58780532f8c6639e5d6c7b755fcf516724e3 + +Count = 87 +Adata = 01abcfee196f9d74fcaa7b69ae24a275485c25af93cc2306d56e41e1eb7f5702 +Payload = 6021a00f6d0610a4 +CT = f09781d30733fe107fd7a33828413ebc252dd9d015773524 + +Count = 88 +Adata = ce1c31e7121c071d89afab5a9676c9e96cac3d89dcae83136bbb6f5ca8f81e5d +Payload = bbaf0ac4e77ee78d +CT = 2b192b188d4b0939d3d51368799325ad1c8233fa071bade0 + +Count = 89 +Adata = bb210ca5bc07e3c5b06f1d0084a5a72125f177d3e56c151221115ae020177739 +Payload = 98a2336549a23a76 +CT = 081412b92397d4c25d1ea568637f773174a7f920a51b1fe1 + +[Plen = 9] + +Key = b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a +Nonce = 274846196d78f0af2df5860231 + +Count = 90 +Adata = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8 +Payload = 615d724ae94a5daf8d +CT = f019ae51063239287d896e7127f17d13f98013b420219eb877 + +Count = 91 +Adata = 162d0033c9ea8d8334d485b29eef727302135a07a934eea5fee6041e9f1f47c1 +Payload = 0d9168eeab3b27ba69 +CT = 9cd5b4f54443433d997cc2cd61da9358b4045fef32f8192cbf + +Count = 92 +Adata = 3f4ab57efa32f51a4c00790280e77c0e55b85bbda4f854e242368e9a289b5a81 +Payload = 6287dcffdd5fb97885 +CT = f3c300e43227ddff75d280f0ffdd560fb8915978e3bd6205bb + +Count = 93 +Adata = 945d18134c148f164b39fd7c4aef0335045553f6ea690a3b1726418d86f0de00 +Payload = 6e5e01b3fd71d16b9c +CT = ff1adda81209b5ec6c7dbf90420a1ff2e24bd6303b80cfc199 + +Count = 94 +Adata = 23af12893431b07c2922ab623aed901c0eaaeb9a24efc55273e96aea4dab7038 +Payload = b51521e689b5247362 +CT = 2451fdfd66cd40f492d741f4329ae7cc77d42bf7e5f2ec5ab6 + +Count = 95 +Adata = b15a118b3132c20c31e6c9d09acdee0e15fcc59d6f18306442682512d22eb10f +Payload = 7f973617e710fb76fe +CT = eed3ea0c08689ff10ec9ffdcc2f36edac14613b1d85baf25a9 + +Count = 96 +Adata = dcfbeb6490f5fa7eaf917462473a6cec98bebf8f17493fe9b994119a6d5a5457 +Payload = 7e909b6727ac3fd02f +CT = efd4477cc8d45b57df5a61a28bb10265b26043d7a8dd357713 + +Count = 97 +Adata = 77e9317294f046f315a0d79e3423f29f7d9ebcd36d6eaa2a3fb2f4500309478c +Payload = a5075638932b5632f8 +CT = 34438a237c5332b508d321c371ae1fd01bdf3b6c75a597da6e + +Count = 98 +Adata = 3aa8f204eb127b547e13873ed0238018394e13686c8734e49e3e629deb352c77 +Payload = c10f15a0de78db8aa3 +CT = 504bc9bb3100bf0d539393d1635bc40ac62405a39155406c47 + +Count = 99 +Adata = 7f67e6f97c6c258f014d721a4edaaa0ddb3f9f09993276ab7b714ea9356c231d +Payload = 8294f830cfca42cfbe +CT = 13d0242b20b226484eff89641e1bd5ad6cc827441b17c45ecf + +[Plen = 10] + +Key = dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9 +Nonce = b3503ed4e277ed9769b20c10c0 + +Count = 100 +Adata = 9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385 +Payload = 2e3cf0af8c96c7b22719 +CT = e317df43ab46eb31be7e76f2730d771d56099a0c8d2703d7a24e + +Count = 101 +Adata = da77c6d5627a2aa34911bd1f7cc5f8aa68a2c6546adc96a186b9af8e5baac4cf +Payload = e081c43a07450ce0dfa2 +CT = 2daaebd62095206346c5bcc7a8260ef361dc39fdb776d041f0d4 + +Count = 102 +Adata = 134d2d9726400d09dd3521326f96fbef993ddc0c4088770057b0f8d70356456f +Payload = c381d2ae5e72fc82324a +CT = 0eaafd4279a2d001ab2d19f0cbb0899f221aac9762f2650f8058 + +Count = 103 +Adata = 0d065dfde1de1f21784c7869eb566c977f807cfbd53578f4616995b51d7dc045 +Payload = 737f4d00c54ddca80eec +CT = be5462ece29df02b978b3dc92a9bd26b9653e5917359c331fcff + +Count = 104 +Adata = 95c54d187f2415535451cbb9cb35869749b171f7043216ce6886dd77baeecf60 +Payload = 4e9e251ebbbbe5dbc8ff +CT = 83b50af29c6bc958519891dda72c27d272561e00f7041845d998 + +Count = 105 +Adata = 0f98039e6a9fe360373b48c7850ce113a0ff7b2ae5ce773dd4c67ca967cd691b +Payload = 0db72b281ab4046d15a6 +CT = c09c04c43d6428ee8cc1928ac628758ad58fc1b5a768d4722848 + +Count = 106 +Adata = ad840bc55654762e5eba0e4a9e7998992d990a06d70da1b1ca922ef193dab19a +Payload = 4f7b4f38ff1ba4df5a59 +CT = 825060d4d8cb885cc33ed11dad4dc8b265a53cf0bdd85c5f15f4 + +Count = 107 +Adata = 911e9876ea98e1bcf710d8fd05b5bf000ea317d926b41b6015998ee1462ab615 +Payload = 58ce55379ef24b72d6d6 +CT = 95e57adbb92267f14fb18eb659a5a7084be48d099467da4395df + +Count = 108 +Adata = 3f68a4fb4043bcf9b6d277c97e11365d949c705bd6679c6f0aaf52e62330ad79 +Payload = a219028a953ce1544835 +CT = 6f322d66b2eccdd7d1523b2b2583fd117cec47b1c84d3863159e + +Count = 109 +Adata = 02f32242cba6204319075ea8ce806a57845355ae73e6b875955df510096ebff9 +Payload = 83b0ee9a52252c456105 +CT = 4e9bc17675f500c6f8625456eb2b6a2d35c649a84051f843153c + +[Plen = 11] + +Key = 4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207 +Nonce = bdb1b82ba864893c2ee8f7426c + +Count = 110 +Adata = 9bcc5848e928ba0068f7a867e79e83a6f93593354a8bfcfc306aeeb9821c1da1 +Payload = 8015c0f07a7acd4b1cbdd2 +CT = 8e9f80c726980b3d42e43a6512a0481255b729a10f9edb5f07c60c + +Count = 111 +Adata = c2e75952ab49216f305e3776865791ce877cef8c0229ca97561787093fddf1d8 +Payload = c97b62a719720b44b7779c +CT = c7f122904590cd32e92e748c514444f00ffdb80a4bb7e9eb651946 + +Count = 112 +Adata = c76a3ff4e6d1f742dd845be2d74c1a9b08e418909b15077deb20373ef55caf91 +Payload = cb7c17ef62464ecc8008f6 +CT = c5f657d83ea488bade511edb609dfc1929ac1ba5753fc83bf945b7 + +Count = 113 +Adata = bdb69f99f9a144b9ad88c6cfd8ffb8304c201de9b2818552ce6379e6042c1951 +Payload = 893a690cc5221de597d0e8 +CT = 87b0293b99c0db93c9890053b74283296d0fca83b262915289163c + +Count = 114 +Adata = 01815f599d6ba0d1c09f6f673bb6cca4c2a7a74f4e985be4c0f37842c7bbc5a4 +Payload = 80f3e4245c3eab16ef8bf0 +CT = 8e79a41300dc6d60b1d21888a34955893059d66549795b3ac2105c + +Count = 115 +Adata = a9db62e9ab53c4a805c43838ce36b587d29b75b43fb34c17a22d3981120f3bc5 +Payload = 641c6914920a79943dca39 +CT = 6a962923cee8bfe26393d1377c4e2f20aaa872a9a0b1d1d7f56df0 + +Count = 116 +Adata = f0c2cc5a1b4c4cbe839338fa0d7a343514801302aef2403530605cf4f44d2811 +Payload = 2286a1eddd80737a724ca9 +CT = 2c0ce1da8162b50c2c15415545aa0c1dd11551891ae553d3a91908 + +Count = 117 +Adata = 9842922499ad4d487488b3731f48765efe0b4eb59e7b491ba5f6636f09ed564d +Payload = d8c63e7d7d332198249c0c +CT = d64c7e4a21d1e7ee7ac5e4d9e07ec5806360843676ef27d811b246 + +Count = 118 +Adata = 399b71ecb41f4590abda79045cdf6495f27daaa559c1b34f513b5c4ac105ec10 +Payload = 4b81804d777a59b6a107cf +CT = 450bc07a2b989fc0ff5e27483b8727c5753ede25e1fab0d86963be + +Count = 119 +Adata = 2c186c5c3463a4a8bad771feb71e2973c4f6dede2529827707bf4fa40672660f +Payload = dfc762466fa84c27326e0e +CT = d14d2271334a8a516c37e64b5c3c1dc577ee8fcf6ef3ebc0783430 + +[Plen = 12] + +Key = d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906 +Nonce = 0b5f69697eb1af24e8e6fcb605 + +Count = 120 +Adata = ea26ea68facdac3c75ba0cdf7b1ad703c9474af83b3fbfc58e548d776b2529b9 +Payload = a203aeb635e195bc33fd42fa +CT = 62666297a809c982b50722bd56bc555899345e0404b2938edf33168e + +Count = 121 +Adata = 0b32069fc7e676f229f1037d3026c93eef199913e426efd786b524ce1dbde543 +Payload = aac414fbad945a49ae178103 +CT = 6aa1d8da307c067728ede1449b15447c904b671824c2ca24c4fc7ad4 + +Count = 122 +Adata = 7a8658302e5181552292aa56e8209de63b5d86934167549b0d936202681757e1 +Payload = 7ee0ce371329192618e3cda0 +CT = be8502168ec145189e19ade7ea13850e99ef9300c65f5abc9419d13a + +Count = 123 +Adata = 4f05600950664d5190a2ebc29c9edb89c20079a4d3e6bc3b27d75e34e2fa3d02 +Payload = b0a1af969a95025385b251af +CT = 70c463b7077d5e6d034831e8486c93c31bbedc9e5ffa2f4154bceea9 + +Count = 124 +Adata = 4530e4dc6a4c3733b8ab7e77e384223cc1a8c179fb66818c08aca47e5c705d89 +Payload = 9f6c6d60110fd3782bdf49b0 +CT = 5f09a1418ce78f46ad2529f7f18b556e7da59fd2549dc57a17bf64f8 + +Count = 125 +Adata = f179353aef342f0f691caf1fcb811e3f6504e14d6d9381c5439b098ff978b01b +Payload = 90958d7f458d98c48cbb464c +CT = 50f0415ed865c4fa0a41260b30aad3a838680cbd313004685a5510c5 + +Count = 126 +Adata = f6df267e5cbc9d2a67b1c0fd762f891ee3b7c435884cb87d8228091b34aeddae +Payload = 9f7ae892e5662803408d4d06 +CT = 5f1f24b3788e743dc6772d411d57b89ed0c91251aed37a6ca68a50c7 + +Count = 127 +Adata = 4372e152b1afd99c7f87c8a51dbc3a5c14c49d04ea1c482a45dfbcda54972912 +Payload = 817074e351455f23cb67883d +CT = 4115b8c2ccad031d4d9de87ad79a3b0feea16ff5fbca16211ea6fdd9 + +Count = 128 +Adata = 82b6cd1c6618c42ba74e746075dc28700333578131ca6fde6971d2f0c6e31e6a +Payload = 1b7da3835e074fdf62f1eb3c +CT = db186fa2c3ef13e1e40b8b7b49f22737c4b2f9fa0a7e3dd4b067fbaa + +Count = 129 +Adata = a5422e53975e43168726677930f6d3e13281bdbd13c67c168340ed67e45d15b0 +Payload = 57473e7a105c806867379194 +CT = 9722f25b8db4dc56e1cdf1d3ef43a48dbea8c1547455ad0197af88a2 + +[Plen = 13] + +Key = e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df +Nonce = 55b59eb434dd1ba3723ee0dc72 + +Count = 130 +Adata = 9b1d85384cb6f47c0b13514a303d4e1d95af4c6442691f314a401135f07829ec +Payload = 8714eb9ecf8bdb13e919de40f9 +CT = ba6063824d314aa3cbab14b8c54c6520dac0f073856d9b9010b7857736 + +Count = 131 +Adata = fa17c693d0997140fbc521d39e042d8e08388106874207ca81c85f45c035d6e6 +Payload = a0837676e091213890dc6e0a34 +CT = 9df7fe6a622bb088b26ea4f20820a423dd30796b6016baff106aaef206 + +Count = 132 +Adata = 27663597b389b78e96c785ca2f5510c8963a5561d2b0b24c4dcdf8e58562c12c +Payload = b8a2ce7e051b8d094ec43f2a7f +CT = 85d6466287a11cb96c76f5d2436032bc79c4aef1f74da25e92b0aa7f8a + +Count = 133 +Adata = d8f1a83371487d611ce704e0a6731f97a933c43569690022fce33cb5aecdc0a7 +Payload = 9e4103ab1dfb77ae3494507332 +CT = a3358bb79f41e61e16269a8b0e658123d2e5bb324c7ead8897f8e32b0a + +Count = 134 +Adata = 05c57aab99f94b315cf8bdd2d6b54440c097fe33c62a96b98b1568cdee4ce62c +Payload = fb3e3d1b6394d2daebf121f8ac +CT = c64ab507e12e436ac943eb0090270758ab09f93fa3ba7d7a2aa8eac789 + +Count = 135 +Adata = 1c1b0933c508c6a8a20846ebd0d0377e24f4abc0c900d3a92bc409ba14ef1434 +Payload = 549ba26a299391538b56ce4bd7 +CT = 69ef2a76ab2900e3a9e404b3eb2293813f1bcb96564f772e9308e42b2d + +Count = 136 +Adata = 9f5cf9149f556124d6bb4e3e243cca1502c02682709392cc2ec7eb262fd4d479 +Payload = 287f31e69880823df7798c7970 +CT = 150bb9fa1a3a138dd5cb46814c81877380d5cf097c2fb5177750f8b53a + +Count = 137 +Adata = 1a49aaea6fc6fae01a57d2fc207ef9f623dfd0bc2cf736c4a70aaaa0af5dafd3 +Payload = 040d18b128ae4a1935f9509266 +CT = 397990adaa14dba9174b9a6a5acf42c75787edc62a180568c6ef56545d + +Count = 138 +Adata = f29a0b2c602ff2cacb587292db301182e6c76c5110b97ca8b706198f0e1dbc26 +Payload = 92441cbe8d70820870bb01ad63 +CT = af3094a20fca13b85209cb555f56d47a0631f2038103e3904b556ba7a5 + +Count = 139 +Adata = 01fcf5fef50e36175b0510874ea50a4d2005ad5e40e5889b61417700d827251e +Payload = f11d814df217de96333dee1cbf +CT = cc69095170ad4f26118f24e4835be15b7ae24edccd0b0934e3af513ed3 + +[Plen = 14] + +Key = 3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0 +Nonce = 61bf06b9fa5a450d094f3ddcb5 + +Count = 140 +Adata = 0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd +Payload = 959403e0771c21a416bd03f38983 +CT = 37a346bc4909965c5497838251826385a52c68914e9d1f63fd297ee6e7ed + +Count = 141 +Adata = 52f6a10a022e5ee57eda3fcf53dcf0d922e9a3785b39fad9498327744f2852e4 +Payload = 23fe445efa5bcb318cc85e2ad1ac +CT = 81c90102c44e7cc9cee2de5b09ad364b603de6afbc2d96d00510894ccbe7 + +Count = 142 +Adata = d236e3841b9556b32dbd02886724d053a9b8488c5ad1b466b06482a62b79ebb6 +Payload = 762fdc3e0c30c7ecf2ec8808bb79 +CT = d418996232257014b0c6087963781a4321c2ddbc35ce4864457d611219e9 + +Count = 143 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +Payload = b6813d5fe8afa68d646c197337a2 +CT = 14b67803d6ba117526469902efa3296e55efebb17fe145cdca9b31ea7bcc + +Count = 144 +Adata = 7f291aa463c4babc76b4a6faf2e27e9401586b1ac83e4b06a4090e94b3ef5fd4 +Payload = 4ce8b6578537215224eb9398c011 +CT = eedff30bbb2296aa66c113e9181059270a0510e7cc1b599705853af2144d + +Count = 145 +Adata = 06bca7ef6f91355d19f90bf25590a44a24e5a782f92bc693c031e6de1e948008 +Payload = 9ebf93643854ea5c97a4f38f50bd +CT = 3c88d63806415da4d58e73fe88bcb55847573bf21e946ce9bdc5f569e3ff + +Count = 146 +Adata = 5a44ff94f817c7c028a8f3db35a4d01364d2598432469f09ded86e5127d42d35 +Payload = da989cc7d375ed5fac4d7f938d74 +CT = 78afd99bed605aa7ee67ffe25575b8a61c5687ea02f0276824b8316b76f1 + +Count = 147 +Adata = 2a755e362373ef27a911c4d93ca07bc97135645442ad7ad6a8ef98146c71e9d7 +Payload = 6fbab5a0f98e21e4d15904af5948 +CT = cd8df0fcc79b961c937384de8149a07ee02791011129fcacffcfb1bf4145 + +Count = 148 +Adata = f7988873f45a5de314e5381d3f14d8f8c48c9b649bf3e745ed5dc882d507da58 +Payload = b610349e8b370a7c195598573637 +CT = 142771c2b522bd845b7f1826ee36d34204b1ce23f5f58a8eb7cf1fa8cfa7 + +Count = 149 +Adata = 95d2c8502e28ab3ee2cac52e975c3e7bccb1a93acc33d9c32786f66d6268d198 +Payload = 1d969fd81dab5ced3e6ee70be3bf +CT = bfa1da8423beeb157c44677a3bbe9c618bb88bbcefb008a5ea6bed4ff949 + +[Plen = 15] + +Key = fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a +Nonce = a5c1b146c82c34b2e6ebeceb58 + +Count = 150 +Adata = 5e60b02b26e2d5f752eb55ea5f50bb354a6f01b800cea5c815ff0030b8c7d475 +Payload = 54be71705e453177b53c92bbf2ab13 +CT = 788db949697b8cd9abbc74ed9aa40cd6852dc829469368491149d6bb140071 + +Count = 151 +Adata = 210c04632341fbfc185bfe3cbf6fe272bbe971104173bcb11419b35ab3aaf200 +Payload = 22197f9ad14591e7a6d5f8b18c969a +CT = 0e2ab7a3e67b2c49b8551ee7e4998556940dc5a7e44bf10234806d00a012b5 + +Count = 152 +Adata = d3a205dd017e79a67400a937a20ef049f4c40d73311731f03ab857a3f93bd458 +Payload = 096b2f530933c1273304a6ad423726 +CT = 2558e76a3e0d7c892d8440fb2a38390898f7dbde25b0b70d335df71a06987b + +Count = 153 +Adata = 0c9b3ba4faf5fc2f310ad1bab06c4ca13474b714feeffb6ad615c1b850bbd6a3 +Payload = d44fdfd9da3a63c1083afe574e91bf +CT = f87c17e0ed04de6f16ba1801269ea02fd10d1f21b6b963c05aeda8eb09e272 + +Count = 154 +Adata = d9bb71ad90152d5c1af358c8501fa89ebd4b17bf4ff43841528cccb79fd791b3 +Payload = 8d836acc13ed83c2b2c706415c9679 +CT = a1b0a2f524d33e6cac47e0173499664491d23d90ff55abca17e9d943b98c7f + +Count = 155 +Adata = 69dc21eb6f295b12ba493ee8fe6c40d78af946067ce772db316a3cbf00d3c521 +Payload = 2a68e3fe746f593c1b97cb637079c3 +CT = 065b2bc74351e49205172d351876dc9616886c6b2adc97db5a673846b6662c + +Count = 156 +Adata = 095eb52135dc6d9c1f56a2571c1389852482e7aa3edc245a3904a0449db24a70 +Payload = 39799b001ed2c334c269acb0f2328c +CT = 154a533929ec7e9adce94ae69a3d932441dcae1760db90379bd354fa99164e + +Count = 157 +Adata = efd7270e0396392fde8b0ddaab00544cbbd504f4d97d4e90d749d1946de90dcb +Payload = 42143a2b9e1d0b354df3264d08f7b6 +CT = 6e27f212a923b69b5373c01b60f8a9c7c7deb28bdcf84886ef843216b94449 + +Count = 158 +Adata = 8bc181ce2e66294e803a8dc3834958b5f173bc2123c0726e31f3fca25b622ed6 +Payload = a3dcf26327059a4245b79a38bb8db6 +CT = 8fef3a5a103b27ec5b377c6ed382a935061ae3cd892ba63c44b809d6d29421 + +Count = 159 +Adata = c39ec70c2c71633ae0dccc41477ac32e47638c885cf59f34ebd4a096d32f91f9 +Payload = 3d54883449ecca8f153436c25a0a01 +CT = 1167400d7ed277210bb4d09432051e3c9ae69a4c59ff8e251c2fe022d065a9 + +[Plen = 16] + +Key = ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62 +Nonce = 121642c4218b391c98e6269c8a + +Count = 160 +Adata = 718d13e47522ac4cdf3f828063980b6d452fcdcd6e1a1904bf87f548a5fd5a05 +Payload = d15f98f2c6d670f55c78a06648332bc9 +CT = cc17bf8794c843457d899391898ed22a6f9d28fcb64234e1cd793c4144f1da50 + +Count = 161 +Adata = a371ca29b92ed676bab5dfc4d78631bb6d9bb23a29f822907084a1f0fe17721f +Payload = 60d55a8d5ab591a51e87fdf6aaa2ad25 +CT = 7d9d7df808aba2153f76ce016b1f54c68b55bbe42d8c97504b97c34a5f16e6a6 + +Count = 162 +Adata = 01ec87920b42639d4ba22adb1fbe5138d2849db670a2960fd94a399c1532ed75 +Payload = cbf112e4fb85276c4e09649f3de225b2 +CT = d6b93591a99b14dc6ff85768fc5fdc51017d8706acd676ae99e93d5312a4113c + +Count = 163 +Adata = eebd2bbf1e9f6d817cd8062a6a9680e7f10464eefeb50b07cb46b14b9b3fcb2c +Payload = 865b89aa38ee1b5a3ce56620307e8937 +CT = 9b13aedf6af028ea1d1455d7f1c370d45982f0fe5d951a8c62c87894657301e4 + +Count = 164 +Adata = 72863362612f146699f6b2f6ec3688f2ca6cb1505af7a309c91c1933e34d516a +Payload = a8efc37d1b8b51f2a47b21dd14da383d +CT = b5a7e40849956242858a122ad567c1de5addfddbb59f4985947fb3a9ab56333e + +Count = 165 +Adata = 9c9efc6593f96207678db813608f2b8bc33ed1bef974ed77ed7b6e74b621b819 +Payload = d9b0eaaff786165f882f41a98dbc0c35 +CT = c4f8cddaa59825efa9de725e4c01f5d6b651053516673402a57538db1a9ce7e9 + +Count = 166 +Adata = dc482a051b58d8a3904d3af37c37b51983f634a504451bbba6f77d71337f8e78 +Payload = df49d972b6ebbbb18ee975ac635d847e +CT = c201fe07e4f58801af18465ba2e07d9d86d772b1a1991b7be6589bbccad36171 + +Count = 167 +Adata = 51ef065a43caa23faf750b02a41ad6ba701aeb8058f6d8738d6f6b005bec7f60 +Payload = 78318aa5cd16699b77bdcea2fc9d1d20 +CT = 6579add09f085a2b564cfd553d20e4c3569387a1a6bcc826e94012670820576e + +Count = 168 +Adata = 88e2a74d2920c89c6a101f5f06d0624a6d5eabd9bdb51395ee3983934c55c73d +Payload = 8e20d65d02dd9a64379f75b6d8328f2d +CT = 9368f12850c3a9d4166e4641198f76cee9c788b4aae9b2c6caf0c44aa9bd2ed0 + +Count = 169 +Adata = ada3ed7db2dabbfbc441ef68a5656e628d6d5bd6c1574369688497179a77601a +Payload = 97e8d8513af41b97801de98cc4269096 +CT = 8aa0ff2468ea2827a1ecda7b059b6975f1df0f01944641a1b04d753e6ab8d3cc + +[Plen = 17] + +Key = 7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d +Nonce = 98a32d7fe606583e2906420297 + +Count = 170 +Adata = 217d130408a738e6a833931e69f8696960c817407301560bbe5fbd92361488b4 +Payload = b0053d1f490809794250d856062d0aaa92 +CT = a6341ee3d60eb34a8a8bc2806d50dd57a3f628ee49a8c2005c7d07d354bf80994d + +Count = 171 +Adata = 4ae414bc888a42141d3060c71c2dbbffd425b6a952806982271a8e756b3c9e24 +Payload = 51eb190c6a9f46e8ec1628b090795470c0 +CT = 47da3af0f599fcdb24cd3266fb04838df13c1c5755a5a240c33b2b890a486aac8b + +Count = 172 +Adata = 7b7f78ae1a5ee96fdc49dacd71be1a6ac09a6a162d44dea0172886eca5674e46 +Payload = 25144e807e389bb0e45b6dc25558caf61a +CT = 33256d7ce13e21832c8077143e251d0b2b4cfca1c19abf447d7bc0898d61885144 + +Count = 173 +Adata = 03f31c6143b77f6ad44749e2256306b8bf82242f2821fad4075b09b388ba81ca +Payload = dbe1ee14abfe2ecf4edf6db206cf9886ce +CT = cdd0cde834f894fc860477646db24f7bff229cc7a390867a245dcb7c434f1db347 + +Count = 174 +Adata = 030390adb572f2bd2a6a4454fd68236cd1d465574328aa001d553375cc63f8a2 +Payload = db6df31f12bf552f81deff5fa2a373fc22 +CT = cd5cd0e38db9ef1c4905e589c9dea401135361b539f9fe0fb7842907c2326aef63 + +Count = 175 +Adata = 7294ae94358669f2ada4b64c125b248df7fe86c6715e3b6a7b9bb2bd99392c8a +Payload = ff2a97b49fcc6a50d4549c979d53ccc51f +CT = e91bb44800cad0631c8f8641f62e1b382e8ed10943929e7d7bf798b2ae8371aae5 + +Count = 176 +Adata = 4d1513478fc1fb0a18eb6d2a9324fefbd975ecd1b409025de826bc397462acc1 +Payload = 73ddfa0185200a890b7690a7e3986d8818 +CT = 65ecd9fd1a26b0bac3ad8a7188e5ba7529f92b9e49ab83f113f8949dc9e4a36e0d + +Count = 177 +Adata = b26a7ff61bfe94864249af7cc9b4a723627dd4463f5a22f0ca6063769522eab7 +Payload = 5c7604f9ac8fdf30ee5820e5aeb75b65d7 +CT = 4a4727053389650326833a33c5ca8c98e6d0e53223adff22a08e3dddf66fff23e3 + +Count = 178 +Adata = 960f9a85cfbfb6eab223a4139c72ce926a680ea8e8ecc3088cf123de659ad310 +Payload = d44fdfd9da3a63c1083afe574e91bf01c9 +CT = c27efc25453cd9f2c0e1e48125ec68fcf833f49a42521a7a2367f91bfcc2180b7c + +Count = 179 +Adata = 3718467effb5d5dc009aaefce84d8cb4fe8f80eb608f4c678f5d0de02ea11e59 +Payload = bb515dc227abb9acad8fefaa14771bb77b +CT = ad607e3eb8ad039f6554f57c7f0acc4a4ac08bd395c6807223311070659f550934 + +[Plen = 18] + +Key = 0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c +Nonce = f61ef1c8c10a863efeb4a1de86 + +Count = 180 +Adata = 67874c808600a27fcab34d6f69cc5c730831ad4589075dd82479823cb9b41dc3 +Payload = 6a26677836d65bd0d35a027d278b2534e7df +CT = d1c1f3c60603359c7d6a707f05ecb2296f8e52f2210b7a798ad5c778ee7cfd7fe6e0 + +Count = 181 +Adata = e0c27cddf919d3092d9a34766c89a5ae6dcf39fe954d1e6f1a70ddf96805def4 +Payload = 4021ff104ff1dbd91e46db249fd82198b0a1 +CT = fbc66bae7f24b595b076a926bdbfb68538f00923bb5a347af13df12f234fca5f03ef + +Count = 182 +Adata = 7ae9eca03f616ab39ebb3be26b848842b4aa584e5c8e5695065ad5af34951175 +Payload = 6a681f164efce199a787bccff223b8ae1a98 +CT = d18f8ba87e298fd509b7cecdd0442fb392c9d03ed7bffac83e890caceb6903d9cab5 + +Count = 183 +Adata = b47c9bc4eb01c74f5db2e6a293bef80db18c58cf06feef7ee0f8a7a9a51c22bb +Payload = 7861dac338ba3f8274dca04c8c6f92b6d44c +CT = c3864e7d086f51cedaecd24eae0805ab5c1d4dd8f30870025b2bd1e2a2511574d3e7 + +Count = 184 +Adata = f6afd661f218c7426b92ee53e65d14898cd0c78a7e594fcc6ac0e3fb5cab1c9c +Payload = a3f0473c620d2739d5ba4f7156f88d0fb669 +CT = 1817d38252d849757b8a3d73749f1a123e386046d17f337f3cb49884d94995edbdc9 + +Count = 185 +Adata = d3802911e341577046cfc61d9043b4af059fb4bef3c6a2ff46ccdcb05670af37 +Payload = 07c535d9456a6ff1e41321150d16dae3f7a3 +CT = bc22a16775bf01bd4a2353172f714dfe7ff25fdc77b43bca254d6459263cdfed8fbb + +Count = 186 +Adata = db60720db67a60ca286fe744d46173c231fbcc7deb4c9b0d87d52a2247e06b74 +Payload = 5ee220720a896249efdab2ce418318bb5ebf +CT = e505b4cc3a5c0c0541eac0cc63e48fa6d6eedd1a1d36c8164c55d55dbf0ff1e9517a + +Count = 187 +Adata = 57f70ba5493265b30491decc726354e2065e7971a2efd56db9cf0f79b1d76859 +Payload = 98e4eb0361c8bf40bcbe0539b0850e4c35ff +CT = 23037fbd511dd10c128e773b92e29951bdaeb476e2ca48fd52bec0539b00744a8a07 + +Count = 188 +Adata = 4a29b9ad548964942f87f28ba267ec0d0e8f72c73b3823ee57693dd63c2605c1 +Payload = 7f0745bea62479c0080ecec52e37c1e32d72 +CT = c4e0d10096f1178ca63ebcc70c5056fea523fad68c62b81d62f2d490ae74f5bb1465 + +Count = 189 +Adata = acbd2e9911b3218a230d9db5086d91dccac3fc93fc64b0f4a15d56954906b2b7 +Payload = e99ed2ac6c38e033061b5d85f3e77dd72518 +CT = 527946125ced8e7fa82b2f87d180eacaad4913b15d8000266c61ba5aec898eb35b52 + +[Plen = 19] + +Key = bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f +Nonce = 05b50c458adbba16c55fcc454d + +Count = 190 +Adata = 89ad6ae1e550975eaa916a62615e6b6a66366a17a7e06380a95ea5cdcc1d3302 +Payload = c1a994dc198f5676ea85801cd27cc8f47267ec +CT = 7c9b138177590edaafec4728c4663e77458ffbe3243faec177de4a2e4a293952073e43 + +Count = 191 +Adata = dfddb719d00398bf48a6cefd27736389e654a93b8595cd5ac446af1996e0f161 +Payload = 791e232bfb42fb18197adc1967da1a83f70168 +CT = c42ca4769594a3b45c131b2d71c0ec00c0e97f8422f736fc435687634d42254b22fd99 + +Count = 192 +Adata = 58ef310997dcaf067dd217274921504da6dbf0428a2b48a65fe8a02c616ac306 +Payload = 3d4127942459bb8682e662dfc862467582fa68 +CT = 8073a0c94a8fe32ac78fa5ebde78b0f6b5127f38a96e68ef7dbaef1b460cc0980eacd4 + +Count = 193 +Adata = 511e5d5e100b595f6b20e791830bca37e23f7b785e482a58405bffe7a632a5b8 +Payload = 0e71863c2962244c7d1a28fc755f0c73e5cbd6 +CT = b343016147b47ce03873efc86345faf0d223c15c5c702a82d468929227502e4e35796f + +Count = 194 +Adata = e48dfaa53b6807ea6f01d8dca67960b9f321f7851f324459a9bf61fe0be73abb +Payload = e0f1cd013e6aea4fa484fc3fa35d348b1a2399 +CT = 5dc34a5c50bcb2e3e1ed3b0bb547c2082dcb8e89188c0940182dd99a902d158c5b0810 + +Count = 195 +Adata = c12c0423fe36e4c88775dd00b4af267b85b7dd2a37a742a3156923c8917c97a3 +Payload = b1cc1946b4fc1dbd033254cdf536f61e9f9cd7 +CT = 0cfe9e1bda2a4511465b93f9e32c009da874c015849acbb7af1892790300bb84fb0558 + +Count = 196 +Adata = 4255f8af18df7237e0abe98421aec9634443561752d893aaffe76380e829ef32 +Payload = 87284658928208e3bddca83e3ceb13708d88d4 +CT = 3a1ac105fc54504ff8b56f0a2af1e5f3ba60c3e75aaf3077ac6dfb5454851ec3910de6 + +Count = 197 +Adata = ab83567833d2f3461b5fbecc0e366694bb5ea00933b2b3e792ec3aefe20325df +Payload = bdb79f931ef3035a33bdd1b032fd9de8f6b2ba +CT = 008518ce70255bf676d4168424e76b6bc15aade70f42e3e1f2b5bb58433bd11f5dea1f + +Count = 198 +Adata = bd1446ba3185d1c16551730947c22142142caa8cc1c540e89ab734ec297401bc +Payload = 1f9c3a8eb8bc59f3869e10f73883aa8f8990cb +CT = a2aebdd3d66a015fc3f7d7c32e995c0cbe78dc564f6248cefe5fc7cfb547c90a558925 + +Count = 199 +Adata = b87577755d2d9489194f6f7cfabf267dc3433a9c91954e81beb72c5e06870922 +Payload = 5f28809181f9a889894da8d6fe1fde6cce354a +CT = e21a07ccef2ff025cc246fe2e80528eff9dd5db52249d812f7f235afa0732e984e91b2 + +[Plen = 20] + +Key = 8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876 +Nonce = 8479bdfad28ebe781e9c01a3f6 + +Count = 200 +Adata = 7aebdfd955d6e8a19a701d387447a4bdd59a9382156ab0c0dcd37b89419d6eff +Payload = 7b125c3b9612a8b554913d0384f4795c90cd387c +CT = 6cc611d816b18c6847b348e46a4119465104254a04e2dfeeeac9c3255f6227704848d5b2 + +Count = 201 +Adata = d119f300fbd74e754a200ea2c3f9fabc1466d02078c84245db693eef3f5672a6 +Payload = 8b013f5782d5d1af8dbd451a4202866095dac975 +CT = 9cd572b40276f5729e9f30fdacb7e67a5413d44338d48329997c5981d678b5e24a6f01b0 + +Count = 202 +Adata = d6204303b86acf62d5ab860ca70161288ede56e3cf017c08dca56fd2d6f8f6fe +Payload = b2b1d82a5523b72ea366a680922ed3a4624536c4 +CT = a56595c9d58093f3b044d3677c9bb3bea38c2bf2a77e3ab68e0a73519591a33ed098b758 + +Count = 203 +Adata = 8557e22eb4529b43f16b1f8ae47c714ac8a2c827c1408a47704778b4c5b52601 +Payload = f8c4eb4285d3d7744da52775bb44ca436a3154f7 +CT = ef10a6a10570f3a95e87529255f1aa59abf849c1cff6c24251c2fb7b8604dfa10c60ef4a + +Count = 204 +Adata = 8c1a4187efbb3d38332f608f2c8bbe64247d9afa2281ced56c586ecb4ab7a85e +Payload = 6e7fe35fa39c937a0e6b3a8c072e218650f42b8d +CT = 79abaebc233fb7a71d494f6be99b419c913d36bb6c3c39f915d081d34559179869b32d81 + +Count = 205 +Adata = a41bb1f256228302cd0548ae2148ff42774d18c2d6d3e38b36bc4938da13bac3 +Payload = 917b467d841850fc6e648f1bc298a7f9f1ee38ca +CT = 86af0b9e04bb74217d46fafc2c2dc7e3302725fc9389a6a6a74c6eb0e1f87562469f2082 + +Count = 206 +Adata = b0b024e20c4f75a6dad54c21a9edbce846792e957878b1c8ed2d916c757e2b3c +Payload = 2b4314fe1a6bfa786b7cfc13fbee861b348efbf6 +CT = 3c97591d9ac8dea5785e89f4155be601f547e6c03bed3a2f5dfdbfcc0d7ac26c88d1962c + +Count = 207 +Adata = 42153925c46fc9d5d328312d62f59bb99fdc4ac479a3386d5f88fefd4b32f577 +Payload = e19fa7f83c79920cbff45c41a9dee8fc99e97396 +CT = f64bea1bbcdab6d1acd629a6476b88e658206ea035ea1d99be344fa1467ee91c73bbca67 + +Count = 208 +Adata = 37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711a08da6acd42299fe +Payload = 53e0475cf492b3d39dad600f5c58eb0bd0021554 +CT = 44340abf7431970e8e8f15e8b2ed8b1111cb08627936ec10a81b36768b606e9a38b2f4c5 + +Count = 209 +Adata = 4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a7977eda6de045878 +Payload = c119a383d9a3d4bff4270a1d22076b346db5f61c +CT = d6cdee605900f062e7057ffaccb20b2eac7ceb2a11575ae03ea8a57bbe4a67c060367b74 + +[Plen = 21] + +Key = c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2 +Nonce = 94ab51ce75db8b046d6ab92830 + +Count = 210 +Adata = 2a243246bfe5b5ab05f51bf5f401af52d5bbaa2549cf57a18e197597fe15dd8c +Payload = 73b09d18554471309141aa33b687f9248b50fe3154 +CT = b7e8264ca70fd2a4fb76f20a8ad5da3c37f5893fb12abeeaef1187f815ca481ed8ddd3dd37 + +Count = 211 +Adata = 0595306eb7441622a49800edee0134492d82320707fceba902af2e0c95fe634a +Payload = b64d00f3a4df754fa4ee6376922fb67ccce0c6209f +CT = 7215bba75694d6dbced93b4fae7d95647045b12e7accc2b55011dbe92ce7619e0ad48b4ccf + +Count = 212 +Adata = bd439dbefec589e120fb4f9825b315bf86523b85c61791cd4da4c8d474ba2714 +Payload = 2b11d1ac74ffe701ec733d32085b1054132726e622 +CT = ef496af886b444958644650b3409334caf8251e8c71e8b1f4d70d8f4c7df4f22847d36b394 + +Count = 213 +Adata = cfebe1cf82267394065bcecfada6709c6c35a3ac835644f560d4c9a8c1848364 +Payload = a88f22424643a523aa3d7d88f4364f1290f49dd0a2 +CT = 6cd79916b40806b7c00a25b1c8646c0a2c51eade47a85e76a9d07b7b361ca56d53c34cda50 + +Count = 214 +Adata = 7a37255b682766a0bfecf78e5162528885a339174c2a49325739d2bd8877e64f +Payload = c81427bc84c6a3cfefd4c4cb210fe82212977e1947 +CT = 0c4c9ce8768d005b85e39cf21d5dcb3aae320917a2fddb010e7508ad03ad287068ecee6020 + +Count = 215 +Adata = 619f2ae80070e278615466a3fd6c9acb7b510c5679bed7038889c77e78d8bd32 +Payload = 28c4d6de3e2ce51b849b135d9cfd3084f0e3155447 +CT = ec9c6d8acc67468feeac4b64a0af139c4c46625aa2ddea785e6c470c52c4fdf432fd78b66e + +Count = 216 +Adata = b2571e56f66a857daffbdc99370ceddd4a7bed3867d600cc797000a3b7b57a9d +Payload = 4c88151cafef75832bacef43a06e862349d56b67ee +CT = 88d0ae485da4d617419bb77a9c3ca53bf5701c690b91232cfbd7ffff252498b35274fb2995 + +Count = 217 +Adata = db409636e3e3bcd606a91aeb7592009896f9ad2c4cc6b7f578e6ad59c0f8fa22 +Payload = 572855e22ce89bc2bcf09cb15a1765d99973449d61 +CT = 9370eeb6dea33856d6c7c488664546c125d633938472b2c50e5e391ad104f9ee33b94f2872 + +Count = 218 +Adata = 62c89a835721207a182968c516dc8be45774ec846e8dcab9ab8611888f2a76a8 +Payload = 89ce46b3de3afaf2518d419b1a2ac24cabca269a96 +CT = 4d96fde72c7159663bba19a22678e154176f5194732d69c5d6db1b130102af3dae0690673b + +Count = 219 +Adata = 33f30ddd83002eea50fd4a8fae39d0980a04160a22ac88b755ac050f1d1f8639 +Payload = edf1682a626e9fbf3d57bb260e0876c6f92ba5b114 +CT = 29a9d37e90253c2b5760e31f325a55de458ed2bff1489903365970c2673c9fd457e1077aad + +[Plen = 22] + +Key = 9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4 +Nonce = af1a97d43151f5ea9c48ad36a3 + +Count = 220 +Adata = f5353fb6bfc8f09d556158132d6cbb97d9045eacdc71f782bcef62d258b1950a +Payload = 3cbb08f133270e4454bcaaa0f20f6d63c38b6572e766 +CT = 3966930a2ae8fdd8f40e7007f3fde0bd6eb48a46e6d26eef83da9f6384b1a2bda10790dadb3f + +Count = 221 +Adata = e3a1555ffe5f34bb43c4a2dae9019b19f1e44a45fb577d495d2a57097612448d +Payload = 946e86795c332031e2d1ee09d3d4a101fb6800d00911 +CT = 91b31d8245fcd3ad426334aed2262cdf5657efe408a5587bdd120a7d08cd3841cb117af444fb + +Count = 222 +Adata = 9c5d43c1a1269cde199509a1eff67cc83a1759b71c9e7a6ee99f76b98c6e23a6 +Payload = b76ce2ab0065ba1c0a754494991c8c452cb416f18ab1 +CT = b2b1795019aa4980aac79e3398ee019b818bf9c58b0545b32f81dcf03e2bcc2aaf62ad366e97 + +Count = 223 +Adata = b07452a7900a289b91b2771dfdd5108852536659aa259def7b41e38f80bd03ab +Payload = a3e0d8d0784155bfc45769c52711d4fa68e8bc390c20 +CT = a63d432b618ea62364e5b36226e35924c5d7530d0d94fea17d78533bc9e022dbfb460afdf499 + +Count = 224 +Adata = 6b30f55c3101540523a92380390f3f84632f42962061b2724cde78ac39809397 +Payload = 6e6a88abbb52a709b47365ad6aa8016fa9a03a9bd834 +CT = 6bb71350a29d549514c1bf0a6b5a8cb1049fd5afd98056defc6dcaeec80b1c639350ab6f1fde + +Count = 225 +Adata = 9fc62d14f8b7a6026509275cff80312ff1ade2b5d9c274cb72a506a571439fc1 +Payload = eba1810d537041821121aeff8e0914ac26a550072c8c +CT = ee7c1af64abfb21eb19374588ffb99728b9abf332d389d37b7251fb8c0ef2b37c36d51219d0f + +Count = 226 +Adata = 6b9389cc42113d639fd2b40cbc732ae0dc7c14513b88b36b45a6ea5a06fe4d2b +Payload = dfc6692cd2442e5ff1f918c8812a27f81d107d16a12f +CT = da1bf2d7cb8bddc3514bc26f80d8aa26b02f9222a09bd279d9da4437c8a2a252436508134c56 + +Count = 227 +Adata = db72d98d63fc10acff7dceec0e2691a80ecee50a0e957ad166c77952a50318bd +Payload = 9ad338cbfd1b52e6ae4178f05e00062274f8b0b25eae +CT = 9f0ea330e4d4a17a0ef3a2575ff28bfcd9c75f865f1a63943543bc1c5f5991ecc5964a288f79 + +Count = 228 +Adata = e98b710c47a4d12a73cd8aa2613fc2910c16f4195ea7f15650132493521d19be +Payload = 9f5a05db89e0e336da066ce81b79ad9be1d0ec4fb7b8 +CT = 9a879e20902f10aa7ab4b64f1a8b20454cef037bb60c0a49ee2b7ceddcbd28abb24b77d5edee + +Count = 229 +Adata = 527817316fc48b105f8ab178dd2db1fefa09c50461aa9d8bdf3c03482343bbf9 +Payload = 58f31e5770070a5d4031fb795dc2d298561d3559960d +CT = 5d2e85ac69c8f9c1e08321de5c305f46fb22da6d97b9b099a68cfa3572d974e03232e09f37fb + +[Plen = 23] + +Key = d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135 +Nonce = 3891e308b9f44c5b5a8b59004a + +Count = 230 +Adata = 0cda000ed754456a844c9ed61843deea9dadf5e723ea1448057712996d660f8c +Payload = 79ac1a6a9eca5e07ce635bfd666ef72b16f3f2e140d56c +CT = 1abcc9b1649deaa0bfa7dcd23508282d9c50ca7fee72486950608d7bcb39dcf03a2cab01587f61 + +Count = 231 +Adata = 3fb6ddb76809b8e6d703347664ef00a365955124c603900d5c8d4ff476138252 +Payload = 76d12e3c4c5d990bf563c60aa4999e52998d887f97477f +CT = 15c1fde7b60a2dac84a74125f7ff4154132eb0e139e05b1c4fb40e5c8bc37152a173d4bbb18c3e + +Count = 232 +Adata = d9fc295082e8f48569eb073ac1b9566246728fc62ccaab4a5667c472c98b2626 +Payload = a027c28fbe22111fd4c8a226cfe8531c16d7790d561eca +CT = c33711544475a5b8a50c25099c8e8c1a9c744193f8b9ee019c359008adae3070b5a543ead0effb + +Count = 233 +Adata = 7a459aadb48f1a528edae71fcf698b84ed64dc0e18cc23f27ab47eeabeaf833f +Payload = fa597e37c26c38694abdcf450f9edc529160fa0d651979 +CT = 9949adec383b8cce3b79486a5cf803541bc3c293cbbe5dbd099ab134756b90746762a92a4a9f7f + +Count = 234 +Adata = 484207909dec4c35929ebe82fcacf20d2af6d850bd69364ebac9557adeadfbd4 +Payload = 9e4c8aa9b58a8eabc5586892f5541000b43f17d9a051a0 +CT = fd5c59724fdd3a0cb49cefbda632cf063e9c2f470ef684fa4f6adfec85d055310107ba89198afa + +Count = 235 +Adata = 88b5448372548e6aab1b262630a28a471d285514703f1bdb10c695850e18fe6d +Payload = 7d9582cf9e3bb9ee34dce965f56b08e716589486b0641c +CT = 1e855114646c0d4945186e4aa60dd7e19cfbac181ec338915d23eb2e952afcc89fbddb567d9d75 + +Count = 236 +Adata = 0e71863c2962244c7d1a28fc755f0c73e5cbd630a8dbdeb38842d7795d830d2e +Payload = 5a387e7cc22491fc556fe6a0c060b4911d01f0c11f801e +CT = 3928ada73873255b24ab618f93066b9797a2c85fb1273aaad6c31828314e24198f005955ca8f5e + +Count = 237 +Adata = 2aa7a28da38c42fda2e578d9d6340cd8e80b9b32047c3db296d0640d517b0872 +Payload = 87946e910059cbaf48df63b220f397049c65ca10cd1920 +CT = e484bd4afa0e7f08391be49d7395480216c6f28e63be04e531ebbadccfe47182b41904bbfebcfe + +Count = 238 +Adata = 3382051c268891da04e6ca73adcead4029f6a1593be4acfe3968e7351a6a2fb5 +Payload = c62f67d208f1c8ffd5d57df9de15ef54f97fbc07d1630a +CT = a53fb409f2a67c58a411fad68d73305273dc84997fc42e7c582414154236c09ee704cf4a5de411 + +Count = 239 +Adata = c352828b1920e53bbb60f2ea6a5f15639659e6f3243405c26f6e48628d5519a9 +Payload = 697e73eaaf562d31bdbf7ce9e78c7426fe1c87e421def9 +CT = 0a6ea03155019996cc7bfbc6b4eaab2074bfbf7a8f79dd57c9990029c89d1b37988745fa5737a3 + +[Plen = 24] + +Key = 4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976 +Nonce = 00d772b07788536b688ff2b84a + +Count = 240 +Adata = 5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975 +Payload = 9cea3b061e5c402d48497ea4948d75b8af7746d4e570c848 +CT = f28ec535c2d834963c85814ec4173c0b8983dff8dc4a2d4e0f73bfb28ad42aa8f75f549a93594dd4 + +Count = 241 +Adata = 1ae8108f216defea65d9426da8f8746a3ae408e563d62203063d49bf7e0d6bdf +Payload = 2b223932fb2fd8433e4b1af9e8234a824569a141f6c96a69 +CT = 4546c70127abacf84a87e513b8b90331639d386dcff38f6f4de907a59c5e4d3f21e1348d7cdf92b6 + +Count = 242 +Adata = 460f08114b1015fe8b7a9b5dd1b9e6a3d28367c4bd15f29b13c02a8cb9a53968 +Payload = 4d57cbe4a7e780d4ed17267d5ebc91750c2f0209e0444bd2 +CT = 233335d77b63f46f99dbd9970e26d8c62adb9b25d97eaed4ff4239544e2f354d6c6837cd9c23b884 + +Count = 243 +Adata = 860f4428259d9c5b17698cc95363db6cfee603258582e3a3e8feb886599d4ac4 +Payload = fda8665f87c618646a89c7abdca275fd10c31453ad4b9c99 +CT = 93cc986c5b426cdf1e4538418c383c4e36378d7f9471799f3f6c6f7cc494201069344e2d6d41bd9b + +Count = 244 +Adata = 1b43c482f83780c21583f88e5afcf6938edd20f21b74d895161b60c27a6a42f0 +Payload = 98104fd3f3413ad1f57ef4912cb50097dca379a58c47b0d2 +CT = f674b1e02fc54e6a81b20b7b7c2f4924fa57e089b57d55d43787a15352cfceb028202c8730beaa7a + +Count = 245 +Adata = b082ccd964617c27a5607b7324faad237ee53acfc18c35502dbf7c1937a9dfcb +Payload = b46b343e64d2d70e0bd909dbb3f6bedf7e4adc74321be526 +CT = da0fca0db856a3b57f15f631e36cf76c58be45580b210020f3a0ca3da647eb31893e867956097983 + +Count = 246 +Adata = b8539ba93ef17254ec1d8d62e8f4eae4d41ee1e75345bf90c9cbb26c63bce501 +Payload = 8e12620bb575e6b167b085255b2b5631ff28e04cbef8826d +CT = e0769c3869f1920a137c7acf0bb11f82d9dc796087c2676be663fbbebbc251b9f1760afa49e89e71 + +Count = 247 +Adata = b6b09463b5ef5ead1f17f4021693a0d8452e98dcbb8e7590f9fde6394970a6f8 +Payload = 792aaa23b923d1b53173fe19853b9aa402a301d48529873e +CT = 174e541065a7a50e45bf01f3d5a1d317245798f8bc136238da90cd87e9d9ca5d85430a150e682752 + +Count = 248 +Adata = 390f6de14d5e1f2f78dbe757c00b89209d0cf8bc48cbbea035779f93de357905 +Payload = ddc5b4e48970ebd72869be6998e9103c014475e8ae6ea29c +CT = b3a14ad755f49f6c5ca54183c873598f27b0ecc49754479afc0cc4601afb61efa7059cfe49ec9dde + +Count = 249 +Adata = 1d75c9e7acb09932db332498d30f82e4009025cb1827047c59a8f97812b568a4 +Payload = d2b66096c475a77648c27235e6972ba8f18761330d3c6adf +CT = bcd29ea518f1d3cd3c0e8ddfb60d621bd773f81f34068fd9cf7474962c3602dcfcb50039f43e3d6f diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT128.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT128.rsp new file mode 100644 index 0000000000..a05492b485 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT128.rsp @@ -0,0 +1,393 @@ +# CAVS 11.0 +# "CCM-VTT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Nlen = 13 + +[Tlen = 4] + +Key = 43b1a6bc8d0d22d6d1ca95c18593cca5 +Nonce = 9882578e750b9682c6ca7f8f86 + +Count = 0 +Adata = 2084f3861c9ad0ccee7c63a7e05aece5db8b34bd8724cc06b4ca99a7f9c4914f +Payload = a2b381c7d1545c408fe29817a21dc435a154c87256346b05 +CT = cc69ed76985e0ed4c8365a72775e5a19bfccc71aeb116c85a8c74677 + +Count = 1 +Adata = 79db716e6b0b1627890d378c4560eba7871883d94527be3454dc3c257ea93556 +Payload = 47f4cdd574264f48716d02d616cf27c759fdf787cdcd43b1 +CT = 292ea1643d2c1ddc36b9c0b3c38cb9eb4765f8ef70e84431676e2df1 + +Count = 2 +Adata = 0d02778f90a164a4f9ada9dc7fd24eeb941069621418ef32c3f9ca6bf6fb2c4a +Payload = 5eadeaec29561244ede706b6eb30a1c371d74450a105c3f9 +CT = 3077865d605c40d0aa33c4d33e733fef6f4f4b381c20c479eb1321a1 + +Count = 3 +Adata = 02e5a1306f612bdec098458cff3e691d93f050ba11ba627355dc7029d2cea5ab +Payload = aac9fb69fed114c62db65090947096a2f5c85c271c6a6d53 +CT = c41397d8b7db46526a6292f54133088eeb50534fa14f6ad3dd8cb4ca + +Count = 4 +Adata = 25144e807e389bb0e45b6dc25558caf61a2263869c4d0e4079d07674d7091110 +Payload = fb6e8d38ce38a8c1e710f3a33c682e6dabf055fb33fe75f8 +CT = 95b4e1898732fa55a0c431c6e92bb041b5685a938edb7278b659a844 + +Count = 5 +Adata = be303c1ed9327ad88dae7cb5930b5a786d4f5477ef9370a9fdb56501964cb8fa +Payload = 87d81389a6062e8ed501ea964c2fe35b2d3de9fd676c04f7 +CT = e9027f38ef0c7c1a92d528f3996c7d7733a5e695da490377e9e5e005 + +Count = 6 +Adata = 46dfb8f3e06c3f168e5ac9b341e7710d7b9c6a19b32389eafb58036de0a27756 +Payload = e1bd9095fa9bb811e4054643feea3eac13fb57b43a0502a0 +CT = 8f67fc24b391ea85a3d184262ba9a0800d6358dc87200520c9fc48e0 + +Count = 7 +Adata = 19eb03c35c352b79e8c32fa40bb9759b0565e04a6c18519ace346e2e9987a250 +Payload = 92f7dc22dcbbe6420aca303bd586e5a24f4c3ed923a6ebe0 +CT = fc2db09395b1b4d64d1ef25e00c57b8e51d431b19e83ec60ac73022c + +Count = 8 +Adata = efa6ddd6fb8e4480a0f64414694e5f9e7f2e9b97cbe9cd145b65173d072ab001 +Payload = cecdf831c4044c8fe149e4cd579a1aecf222bf8e9dadba09 +CT = a01794808d0e1e1ba69d26a882d984c0ecbab0e62088bd895dc8d581 + +Count = 9 +Adata = 1b156d7e2bf7c9a25ad91cff7b0b02161cb78ff9162286b0622fccda2e251c97 +Payload = 7cfb0973ea13dedc33ef6728db90f47559273ea6d3cd4db6 +CT = 122165c2a3198c48743ba54d0ed36a5947bf31ce6ee84a36b941b65b + +[Tlen = 6] + +Key = 44e89189b815b4649c4e9b38c4275a5a +Nonce = 374c83e94384061ac01963f88d + +Count = 10 +Adata = cd149d17dba7ec50000b8c5390d114697fafb61025301f4e3eaa9f4535718a08 +Payload = 8db6ae1eb959963931d1c5224f29ef50019d2b0db7f5f76f +CT = df952dce0f843374d33da94c969eff07b7bc2418ca9ee01e32bc2ffa8600 + +Count = 11 +Adata = 463c65fa7becae5605af80d1feca59075ee88c0abfc72cb463312b3c772ec308 +Payload = bde3fc83287ddd1227bdab4305102c94d885412eb332bf6b +CT = efc07f539ea0785fc551c72ddca73cc36ea44e3bce59a81a8b847d3a0c98 + +Count = 12 +Adata = ab153b0a8933f2eb0d721621c86de0cfe100d13e09654824b09d54277912c79d +Payload = 82176e573c6070faa08d18b5957f119bb1ff51d744b04240 +CT = d034ed878abdd5b7426174db4cc801cc07de5ec239db5531fb4f9d559a8e + +Count = 13 +Adata = b22aba8d3e9f4b4bf006e26062de15daf94597731a6009129bfd12957877b1ce +Payload = bcfc4485eaf225d945146374b737cdf5301c7738ea9f142a +CT = eedfc7555c2f8094a7f80f1a6e80dda2863d782d97f4035b1e09ff3d6a6c + +Count = 14 +Adata = eb80a43c5986deee6925d7c6d53cbdcbe11194843ea133f72d3590d8e8363efa +Payload = aa182e3ec4fb2f7a905c03582b2ee100ab81a9a311a778bc +CT = f83badee72268a3772b06f36f299f1571da0a6b66ccc6fcdb60ba1175f1b + +Count = 15 +Adata = 3ee186594f110fb788a8bf8aa8be5d4ad52d6e3bd5f406f080d9df0d7553a851 +Payload = 8ad6db8216af16bfda3261a220d078cc98c8ad134e4a80ca +CT = d8f55852a072b3f238de0dccf967689b2ee9a206332197bb4a75860f3dd6 + +Count = 16 +Adata = d36fc18b5b12662ff5f6ea55af7c7a82d25d386220e399a85a590b1505c0dcd5 +Payload = a65d24bd1ab92d8d294d654423412860e113c976f12ed76b +CT = f47ea76dac6488c0cba1092afaf638375732c6638c45c01a00cf106d70a4 + +Count = 17 +Adata = f0028503e7cd54474c56dc8b2416fe41f416eed73c63ddd141bdd51a0f8fe49c +Payload = 6e9dc61dd9cf19a6eebc10c9b51c13970636de2c9ea33592 +CT = 3cbe45cd6f12bceb0c507ca76cab03c0b017d139e3c822e3c0193a87ddfb + +Count = 18 +Adata = 9a58a226a578bda012dbd7d04b11c879179aaaa36c6145418586cb103360c6c2 +Payload = b526896c11e514b5b4c26351859e2a33800fefd6fd9e6d1a +CT = e7050abca738b1f8562e0f3f5c293a64362ee0c380f57a6b444d9b63ffab + +Count = 19 +Adata = c015fb08540755a8a8adc387d60553478667158964202eb2d25e28efd94c8c76 +Payload = 88907b639f3fd07f40bf6b9b6334b11b2852557975721bf3 +CT = dab3f8b329e27532a25307f5ba83a14c9e735a6c08190c82c339ba21fcf7 + +[Tlen = 8] + +Key = 368f35a1f80eaaacd6bb136609389727 +Nonce = 842a8445847502ea77363a16b6 + +Count = 20 +Adata = 34396dfcfa6f742aea7040976bd596497a7a6fa4fb85ee8e4ca394d02095b7bf +Payload = 1cccd55825316a94c5979e049310d1d717cdfb7624289dac +CT = 1a58094f0e8c6035a5584bfa8d1009c5f78fd2ca487ff222f6d1d897d6051618 + +Count = 21 +Adata = 25865c1b89f1973bfa680d8458df35a56993a7e81e407e061794004068e481ab +Payload = 36004342dd74e7966692a848b2c11e1fc311eac9d9cef616 +CT = 30949f55f6c9ed37065d7db6acc1c60d2353c375b5999998ceca422687f41550 + +Count = 22 +Adata = e6209480da9e49172ba58a9048f2f1b0349030e8e7a79dcdf295eecd613f401a +Payload = e81f4fb360bcae372d8be3f32655a29bc10a2f31876173cc +CT = ee8b93a44b01a4964d44360d38557a892148068deb361c42d2b981fc741f2591 + +Count = 23 +Adata = 112c969882e685b4ae1ee6b67f680e6a1d9d840e627d12118f991c1a3d71314c +Payload = 27d6443e729d35d7a0690fcb7fe0b20892875f60b5d8763a +CT = 2142982959203f76c0a6da3561e06a1a72c576dcd98f19b4a1fd47cd41fcf013 + +Count = 24 +Adata = 73ef62870c50faca5d4e6c6ec45fa7b54bf79ed229fcf1fc8c79c9c09596039b +Payload = 6c17ad5496dfccde8b877630e1e582dab52aaabe385a321f +CT = 6a837143bd62c67feb48a3ceffe55ac855688302540d5d9143eb86ffa6958d71 + +Count = 25 +Adata = b537f0f2981405f6069b401966656461b3516a32d181777121a60cea537e7cef +Payload = dc4a1e39561f14321238272adff8b74a4e770c0a0c864a52 +CT = dadec22e7da21e9372f7f2d4c1f86f58ae3525b660d125dc1dfc38975c948d29 + +Count = 26 +Adata = 96bd747ccdcd5fa6cd920514a2f38203e82ee9c7ec6e88080e9f6e2a6a812b0d +Payload = c51958d7d7d39906b14d4ebb574db881355ec3e6b41838dd +CT = c38d84c0fc6e93a7d1829b45494d6093d51cea5ad84f575320a48ee3845d9e7a + +Count = 27 +Adata = 690d6a2377314fc2f7dd06ae401e3585c79faf648a7af358ae4ef615669222eb +Payload = 9eaf24f84e8818e286410de321d65ffbf25d1a14073c60da +CT = 983bf8ef65351243e68ed81d3fd687e9121f33a86b6b0f54884188f946c9a317 + +Count = 28 +Adata = 748dc83299a43033239ad2fef2dc3d72b76a38ca127607cef72de94a56d5e5c0 +Payload = 71c8eb0079559a306e236c49b7ce1b6cfe26c7888733eb7e +CT = 775c371752e890910eecb9b7a9cec37e1e64ee34eb6484f00ae2dd33327f8459 + +Count = 29 +Adata = 35a49535684637f67573fb0b4fdc1bdd8a57650a1d8f29b866fa552a6e0cdf91 +Payload = f09569906381138cc49e3fc2384c5d33c34abd3d617c487b +CT = f601b587483c192da451ea3c264c8521230894810d2b27f5c50821a48b93d0ca + +[Tlen = 10] + +Key = 996a09a652fa6c82eae8be7886d7e75e +Nonce = a8b3eb68f205a46d8f632c3367 + +Count = 30 +Adata = c71620d0477c8137b77ec5c72ced4df3a1e987fd9af6b5b10853f0526d876cd5 +Payload = 84cdd7380f47524b86168ed95386faa402831f22045183d0 +CT = a7fbf9dd1b099ed3acf6bcbd0b6f7cae57bee99f9d084f826d86e69c07f053d1a607 + +Count = 31 +Adata = 7b40b3443d00a0348a060db109e8882157612c43084ac5c3e9c5350c88bc165d +Payload = 7ebb051741145a3bad87131553375c6debcbcecee9b79ee4 +CT = 5d8d2bf2555a96a3876721710bdeda67bef6387370ee52b694af9359a96acfb31a4a + +Count = 32 +Adata = 5cab3b84687070956916c11cab0ceea61adb6ea1f909be63d73df96fbfa3a9f4 +Payload = 35a29c1bcbe2182f34fe05f09dfb9ac4a496f95819ef11ec +CT = 1694b2fedfacd4b71e1e3794c5121ccef1ab0fe580b6ddbe36d3920d1012bf093a5c + +Count = 33 +Adata = 6d440b44a069a6967f8750c3b4f8118798fe32d2eaa696ccc7f24e16d6366753 +Payload = a0e21d971876ae4048a61b43a3ac07c685005a20bccbe6ec +CT = 83d433720c3862d862462927fb4581ccd03dac9d25922abec23025c1776811647f99 + +Count = 34 +Adata = 06904325b8c6fc2b5a0412ba8062cd48d3af51beacb5ced9e2bdf8d0e056b738 +Payload = 8d333ed7d4b208e794e1673f6df692caee4e3a00fc49115e +CT = ae051032c0fcc47fbe01555b351f14c0bb73ccbd6510dd0c6efeeaed29e65f1a8908 + +Count = 35 +Adata = e5049e1c32f0a000024882e4fca9b77adb6c87fdbad96d0c8e97bdb8f46789dc +Payload = 4189351b5caea375a0299e81c621bf434b6b97da68ad44be +CT = 62bf1bfe48e06fed8ac9ace59ec839491e566167f1f488ec70d42f84a5411dfa43f9 + +Count = 36 +Adata = 6f0be1905d1b5b607574ad93a1e7b4a536020fc6798acae862253916a0562707 +Payload = 5a063a24410b3d265c9a32a027cb2382a52bb8e35db15b98 +CT = 793014c15545f1be767a00c47f22a588f0164e5ec4e897caadd2256112d1f7d04934 + +Count = 37 +Adata = a90f9f55ef22f5e6c542ed3573a9ab67d9c3b6775587fc2be70817479347ce00 +Payload = 0b72cb09a444be2d7b34cf9997fc5b885851d7e6092008b4 +CT = 2844e5ecb00a72b551d4fdfdcf15dd820d6c215b9079c4e6e187f5f37e8a5029ca4e + +Count = 38 +Adata = 4dd64fd7d8b571704cddabef854c51691ace4c30de74bfecad42eaed65284ebf +Payload = ce2d996c9a4cf85edb888822773e03179feeb9e4b0928d6a +CT = ed1bb7898e0234c6f168ba462fd7851dcad34f5929cb4138fbbb92009435f9ab6691 + +Count = 39 +Adata = 75f4031d2e5098a9ea3eaa20c2423fbc1705ea18289efb96e311f3fefc153b67 +Payload = aa182e3ec4fb2f7a905c03582b2ee100ab81a9a311a778bc +CT = 892e00dbd0b5e3e2babc313c73c7670afebc5f1e88feb4ee3cae38db7cc9d577b0ed + +[Tlen = 12] + +Key = 3ee186594f110fb788a8bf8aa8be5d4a +Nonce = 44f705d52acf27b7f17196aa9b + +Count = 40 +Adata = 2c16724296ff85e079627be3053ea95adf35722c21886baba343bd6c79b5cb57 +Payload = d71864877f2578db092daba2d6a1f9f4698a9c356c7830a1 +CT = b4dd74e7a0cc51aea45dfb401a41d5822c96901a83247ea0d6965f5aa6e31302a9cc2b36 + +Count = 41 +Adata = 78230f73f9c0150f630eca4cd679818551d449db82e665d8dc25fc53ebc11293 +Payload = 048ba28abb191ded5449dfe9dc7d19f9b132a2a9fd779aab +CT = 674eb2ea64f03498f9398f0b109d358ff42eae86122bd4aa6356e2548a22e7cbee3b89d4 + +Count = 42 +Adata = c09191a7d2fca98fca486f8843f275a78d57b8c9a6d330d5652ba641f928c6d8 +Payload = adf51386b3cc133ea9d18e679fe4bbf10ea780b7bed57d6a +CT = ce3003e66c253a4b04a1de85530497874bbb8c985189336b35516f170a2aada38d1d94eb + +Count = 43 +Adata = ea46cc1a7ba5afaa6176f8dedc049283d2ac38fa74ef37ea1fc575328033b222 +Payload = f660a28551416b2f8e21466ba99daee280a91740d98219cf +CT = 95a5b2e58ea8425a23511689657d8294c5b51b6f36de57ceea2d3237788a02ff15258351 + +Count = 44 +Adata = 3093b74eb088bdd59999629d59509920938f4feabbd29df8e0b44364c8b55244 +Payload = b9a96f0e4c6dea8861e888bdd693b300017718da958aaa00 +CT = da6c7f6e9384c3fdcc98d85f1a739f76446b14f57ad6e40165fb6719509987930d350890 + +Count = 45 +Adata = 5580672e52aacb9d714a34c31c33fc221e13e8f90849adbad3f6b3bec8571838 +Payload = cc4acdbd34ec9b7cbc3e23a53e0627c2a7c63206f3e0298d +CT = af8fddddeb05b209114e7347f2e60bb4e2da3e291cbc678c8ecdf173444c334cfda5b22b + +Count = 46 +Adata = c7acf1b17609dc336df1006ffac6497777cdfd497c8c91525377c130accce0bc +Payload = ed75d28be4794ad81bbc0f26a11c5466f23c0270d2d7b8f8 +CT = 8eb0c2eb3b9063adb6cc5fc46dfc7810b7200e5f3d8bf6f92221c860022d92b0f961c3e6 + +Count = 47 +Adata = ac1adca686e1d129142c49f26b52941d037d8052b8a27d5215b7ffcfd2202481 +Payload = b8234b8bd34d9c6ceffebbb85722764e7d37e43c495256e0 +CT = dbe65beb0ca4b519428eeb5a9bc25a38382be813a60e18e11c73d6a695afc704228ed7a1 + +Count = 48 +Adata = 472bf7946bce1d3c6f168f4475e5bb3a67d5df2fa01e64bce8bb6e43a6c8b177 +Payload = 790134a8db83f2da35dde832c3ae45ec62aff0274495d6e7 +CT = 1ac424c8046adbaf98adb8d00f4e699a27b3fc08abc998e6bf1e81950e44c63183a679d7 + +Count = 49 +Adata = 1340ac7ff04dd7450afc13f8fa52df6d526c744a2dc2f76b0aadf284da270508 +Payload = 21ea2f778cf37aa02fea30e855c20a77909548da4ee7eb61 +CT = 422f3f17531a53d5829a600a99222601d58944f5a1bba560c2c3a1876e49a47a9b44b737 + +[Tlen = 14] + +Key = 7b2d52a5186d912cf6b83ace7740ceda +Nonce = f47be3a2b019d1beededf5b80c + +Count = 50 +Adata = 76cf3522aff97a44b4edd0eef3b81e3ab3cd1ccc93a767a133afd508315f05ed +Payload = ea384b081f60bb450808e0c20dc2914ae14a320612c3e1e8 +CT = 79070f33114a980dfd48215051e224dfd01471ac293242afddb36e37da1ee8a88a77d7f12cc6 + +Count = 51 +Adata = 41aa11ec55980609482575b97eee172590ff545d5798fd4246313da3fdbbcda6 +Payload = 811d54bad842a8b92b96fc03b4fff8b5f1939fd3a49876dc +CT = 12221081d6688bf1ded63d91e8df4d20c0cddc799f69d59ba850b0116f3269b5e44e57de7166 + +Count = 52 +Adata = dedfb02e93b975270f50cffa3351c85975a7b21fd89bbb921c40c1e5310e6702 +Payload = 8bbf87b490020b863fc596a8d169d79c0cb3506e1f1f5aa2 +CT = 1880c38f9e2828ceca85573a8d4962093ded13c424eef9e50f053627bd0c90714820c4fbe5ec + +Count = 53 +Adata = a727ed3d13331ee6a224ae4b73f0ccb04b997fcf88533a1f57e9b055275de92b +Payload = 7294ae94358669f2ada4b64c125b248df7fe86c6715e3b6a +CT = e1abeaaf3bac4aba58e477de4e7b9118c6a0c56c4aaf982df865a77d66f1232cd7e36af3d1be + +Count = 54 +Adata = 6704dc39a259152d2dc3f08b8799ffecf4e1bc38ce5b77c71cc293c6664ef2dd +Payload = 48033c46389f6221fb9cdda1ecb8fc25fdec6afe4eaa5fd0 +CT = db3c787d36b541690edc1c33b09849b0ccb22954755bfc97e1fba154f6b166549d0d6bb9b573 + +Count = 55 +Adata = 6cba004dfb5e5d9e1433bf1223039ae1d2df89cd2db68f550327a22c8f946ae9 +Payload = 01acc909b7d3bb3b3e1f72845f05238d2e1d9162976d3bd2 +CT = 92938d32b9f99873cb5fb316032596181f43d2c8ac9c9895c485e9e28ae33959f8acbb640fbf + +Count = 56 +Adata = dd5799710523aa1da0b1209fab1e6f2ed177444ed3880d462deebbd5f774c621 +Payload = 3706def87786e49baec2d13407865286cb4e05908cac430f +CT = a4399ac379acc7d35b8210a65ba6e713fa10463ab75de0488ef976fa9bda9544ed94ef266ed2 + +Count = 57 +Adata = 5d7505ff863d218f6822150455b977ad2df3c02be094f6832ee68872b1ae7a01 +Payload = f38d4b225d9b80a0c5fadc61476aef419ad3d18937d8661f +CT = 60b20f1953b1a3e830ba1df31b4a5ad4ab8d92230c29c5580caadf1dbd07515e3bfb6992e2cd + +Count = 58 +Adata = 796b62c7abf797de7f6bad8bf5d549688ccb7ada62fff9469c14b08208b07a8a +Payload = 993bb3a85f67f6c1a809d8094ee80e2ad9b694063af2fdb3 +CT = 0a04f793514dd5895d49199b12c8bbbfe8e8d7ac01035ef4733ad369e4a067b7976c9d6d0456 + +Count = 59 +Adata = 84fd27557aeb283282366083e3586f3a59691ccd0d43ec81c4e5f4e85715eba8 +Payload = 1286506be19fb865a288b09dda8af4323567cd9a66e08643 +CT = 81b91450efb59b2d57c8710f86aa41a704398e305d11250439860d66891f32ce0a09788f5899 + +[Tlen = 16] + +Key = 4189351b5caea375a0299e81c621bf43 +Nonce = 48c0906930561e0ab0ef4cd972 + +Count = 60 +Adata = 40a27c1d1e23ea3dbe8056b2774861a4a201cce49f19997d19206d8c8a343951 +Payload = 4535d12b4377928a7c0a61c9f825a48671ea05910748c8ef +CT = 26c56961c035a7e452cce61bc6ee220d77b3f94d18fd10b6d80e8bf80f4a46cab06d4313f0db9be9 + +Count = 61 +Adata = ac8dde7ba60e4ba226eecb0a789b1c4673ddffe8f371464389f52f767004f0a6 +Payload = 7c0889854658d3408c5d8043aad2f4ae4a89449a36f8a3b8 +CT = 1ff831cfc51ae62ea29b0791941972254cd0b846294d7be196363d27b9e11fee55111b273399f5ff + +Count = 62 +Adata = 8f2777ec4930f7e349c3bd4830120cebdd896db9d8a33d34f101672024bd737f +Payload = c641cf589020b94026ae5ac0bfdc29822cc13862a54614c7 +CT = a5b1771213628c2e0868dd128117af092a98c4bebaf3cc9ef741e15ad9b2f5ab864ad94d3f9de562 + +Count = 63 +Adata = a87426f83bf91bd3c3556bf859cd97f51c92609879f02dbca9c7ae637a3fbf05 +Payload = d204994c128d6204ef2939c22572daa56c12df2e4d3e33e9 +CT = b1f4210691cf576ac1efbe101bb95c2e6a4b23f2528bebb0652a083ea1b43b7da026692c7aa796d7 + +Count = 64 +Adata = 7ff9ca86f820e4d57995d450611009ffaa726e6fbe4ce1558ca1e775daed9ec2 +Payload = aff9bb0238689255f54cd5fdebe6d3dff5f5604ab8d77038 +CT = cc090348bb2aa73bdb8a522fd52d5554f3ac9c96a762a861057e0faa2711cfa1e3da5499f9a1ee0b + +Count = 65 +Adata = faa6b7f8c6e076b5e5b981119b7ec2e0b9c73da4064f9704e303d5792f59674b +Payload = 95d2cf30b6174b17278ad9f44079a2199082dab917f89763 +CT = f622777a35557e79094c5e267eb2249296db2665084d4f3a90b39704d8913391ebd3424117b93b68 + +Count = 66 +Adata = b553e65640c1ad0d2ff748c5b2af9d970c74131cff4fa73384a33dfec056332e +Payload = aaa53244520e157c4890a0e62100a12daa84f9be710242d7 +CT = c9558a0ed14c2012665627341fcb27a6acdd05626eb79a8ed0a6cb58733be0a3b608afdf78eaa70c + +Count = 67 +Adata = a9be73668b94bc6a212744522a0adff03d49fd495daadaf6cd32f4ca25ebc2b5 +Payload = 1066b96c3c44301073717520ea5c07adbac7759b88d52154 +CT = 73960126bf06057e5db7f2f2d4978126bc9e89479760f90daf20ce64e6a821e39ca96aded43f0875 + +Count = 68 +Adata = 8b516c47e6630b2c31d8eefd8ba152d7315582a3f4d3f0e0eb2984a365b434db +Payload = b5969813d0f892febe64ed52d429cc737b5df8d5e0c63207 +CT = d666205953baa79090a26a80eae24af87d040409ff73ea5ecf4699d23f5fc6742bffebbd16858f6e + +Count = 69 +Adata = 8ad3e84edbe7d9305848746cbd0f769bce47d5ae4609513210e54cd3b984db1f +Payload = daa90a2de3937e7942e6711f165a89b9e077fe322cab597d +CT = b959b26760d14b176c20f6cd28910f32e62e02ee331e81243713601bb16dc91af84ac19ebd43a1ec diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT192.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT192.rsp new file mode 100644 index 0000000000..75b0c429f6 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT192.rsp @@ -0,0 +1,393 @@ +# CAVS 11.0 +# "CCM-VTT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Nlen = 13 + +[Tlen = 4] + +Key = 11fd45743d946e6d37341fec49947e8c70482494a8f07fcc +Nonce = c6aeebcb146cfafaae66f78aab + +Count = 0 +Adata = 7dc8c52144a7cb65b3e5a846e8fd7eae37bf6996c299b56e49144ebf43a1770f +Payload = ee7e6075ba52846de5d6254959a18affc4faf59c8ef63489 +CT = 137d9da59baf5cbfd46620c5f298fc766de10ac68e774edf1f2c5bad + +Count = 1 +Adata = edb8834974b02fc9ab29b4b3c49683426124e729b44e43cde4ab9bb1b30b5531 +Payload = d05410f42d4759f8cab3884785cf8f60ecbf902e525b92e8 +CT = 2d57ed240cba812afb038dcb2ef6f9e945a46f7452dae8be24285996 + +Count = 2 +Adata = 8baf194e81e47a6ca82ca51b488339d014a0a494007793aa5201ac72fc3f808d +Payload = db3022ef4cd68ae22b501599448ffe2dda15cfd2e259315c +CT = 2633df3f6d2b52301ae01015efb688a4730e3088e2d84b0a6c510570 + +Count = 3 +Adata = c0b55acc7fbfa9d9af6e1f32b6626a1cd89b1c32513b5b50a18ddab028470953 +Payload = 7f0745bea62479c0080ecec52e37c1e32d72a6b3864da44a +CT = 8204b86e87d9a11239becb49850eb76a846959e986ccde1cb418cfd2 + +Count = 4 +Adata = 9dc672e64c468242ddeec318c71f9b8cbaa14639eba3c861acfc26463fb7d5d7 +Payload = 263dbe1bd5e9d9b29b316fe36ec8bb10f64543b4921c01f6 +CT = db3e43cbf4140160aa816a6fc5f1cd995f5ebcee929d7ba03e5b5794 + +Count = 5 +Adata = 1798286c37c1504fc0d7402681f6f70711ef506dcc3e29d0183dc578ed976f92 +Payload = 22dbba2b1a39074ddac736767ebdedc37e4208b233e03b34 +CT = dfd847fb3bc4df9feb7733fad5849b4ad759f7e833614162f63b4847 + +Count = 6 +Adata = ed2898d0bcb34eebf98b5279bc3e8a20214321a7e23bc55b2b7613b1a9b94f2c +Payload = f0f1235ee88d04de3f3d1489ec6b28b285a6a4fbb344911a +CT = 0df2de8ec970dc0c0e8d110547525e3b2cbd5ba1b3c5eb4c7ab29a40 + +Count = 7 +Adata = 50c4a285d6a4e64efceb288b82e7c8277307cf1eaa4b8b9294f97a1c38926a60 +Payload = 0e50aa6a3079c0b8d61e51c3bd93b592a03719acb9f0252e +CT = f35357ba1184186ae7ae544f16aac31b092ce6f6b9715f7868f40ff6 + +Count = 8 +Adata = b48a16fb9a065d3aeb2bdf1860e4b0f1348c8f13cd00b1729ff8c19e4e9724f3 +Payload = 82f39f5207afcfd677a7544579f2b888a1eabdee4e835924 +CT = 7ff0628226521704461751c9d2cbce0108f142b44e022372ceeff92c + +Count = 9 +Adata = d92b80544f29aba52496e2c9a0aa4adeb89820be321cfd2f0a53585a15d04c7f +Payload = bc3b08eec6506d1497572f901f0e5f3e9854b40b0f992d08 +CT = 4138f53ee7adb5c6a6e72a1cb43729b7314f4b510f18575e619c1124 + +[Tlen = 6] + +Key = 146a163bbf10746e7c1201546ba46de769be23f9d7cc2c80 +Nonce = f5827e51707d8d64bb522985bb + +Count = 10 +Adata = 599b12ebd3347a5ad098772c44c49eed954ec27c3ba6206d899ddaabca23a762 +Payload = 473b6600559aefb67f7976f0a5cc744fb456efd86f615648 +CT = 26d2be30e171439d54a0fec291c6024d1de09d61b44f53258ba1360406f9 + +Count = 11 +Adata = 3a8423feb661db30542dc3cfb596280429397f80755a4bc8d4d941d03b61aacc +Payload = 7edfce3dedd65a8592aec2bfc7a751e2360f3137941fc960 +CT = 1f36160d593df6aeb9774a8df3ad27e09fb9438e4f31cc0db5e5938e8c75 + +Count = 12 +Adata = 0dc79993047fd6e7260aac4d847fdb4d16483f28b13b5f17330744d401d2875b +Payload = a9fb3ebba43c273cacbf0f7187030c69172f31382e9e059b +CT = c812e68b10d78b1787668743b3097a6bbe994381f5b000f694f534b76f0b + +Count = 13 +Adata = 6546d9a90e0e763679d5469a1bcffcc4f18f35f50c7714d14c7329b76ce7984e +Payload = a7573e5b7dd7f4ce9e4480f603c14145a27f7c7a9246a3cf +CT = c6bee66bc93c58e5b59d08c437cb37470bc90ec34968a6a23c6c025faa1b + +Count = 14 +Adata = 7f398ff0d47e2c0fccd8a16cc9e79b4813abac42e346fa33ba033956f798d6ac +Payload = 84370557e0bbf74fd0a4533185adfe202d9fa9d622bba72f +CT = e5dedd6754505b64fb7ddb03b1a788228429db6ff995a242ae0f88d836be + +Count = 15 +Adata = d0f46fb37d516cc957aaefd3be2a8bede885330a8edb96f3e5e0ab8cd03a8c59 +Payload = 029575400bd3f2621c7d9ca9b6a09ea6f776968b19dc3f3e +CT = 637cad70bf385e4937a4149b82aae8a45ec0e432c2f23a5366d09f64b4c2 + +Count = 16 +Adata = 4abaa4260c864572e12553c5aabfe62e4e7038490d4ba160119fc5d646780cc6 +Payload = 448be3821d94452425fae41a06457260a2666e890fa94954 +CT = 25623bb2a97fe90f0e236c28324f04620bd01c30d4874c39677fd479c852 + +Count = 17 +Adata = 686e0578eadd19583291a01e11a29fc95a2c156da100dd85429ad58ba65440c6 +Payload = aebfe3e15a876412ec9df714f1afa898e69004c1ef25732b +CT = cf563bd1ee6cc839c7447f26c5a5de9a4f267678340b7646bbc332573774 + +Count = 18 +Adata = e3d29f970667286a81586aa02bb490c72d8bb3a308eafec5da0d105fddd1a157 +Payload = 08b2ce5f7296016e86d02f8c7952d746703ee4f0429b8df3 +CT = 695b166fc67dad45ad09a7be4d58a144d988964999b5889e33171a8ccec1 + +Count = 19 +Adata = 9e2ea8eb7f56087ee506925648661eeefffd643a056cd4f4fc5cc23172b5c637 +Payload = e73d7d23736db17cca816ab2440062a8051177d47feb514e +CT = 86d4a513c7861d57e158e280700a14aaaca7056da4c55423bc8299cc9f95 + +[Tlen = 8] + +Key = bdf277af2226f03ec1a0ba7a8532ade6aea9b3d519fe2d38 +Nonce = cc3c596be884e7caed503315c0 + +Count = 20 +Adata = 4d6546167b3ed55f01c62bd384e02e1039c0d67ef7abe33291fecb136272f73b +Payload = 0ff89eff92a530b66684cd75a39481e7e069a7d05e89b692 +CT = 6ef66a52c866bd5df20ec5096de92167ad83cab0e095ad0c778a299f1224f10c + +Count = 21 +Adata = 95722ef5e0cf9f482e4c359f1fd6b9efe2b6e0630413c40285b8958c31188ca4 +Payload = b1ea02e3721e44c327443fcf4b424cce19afbb9e8cf06b76 +CT = d0e4f64e28ddc928b3ce37b3853fec4e5445d6fe32ec70e8a5c2c6b097a04d50 + +Count = 22 +Adata = f7b76a2a4fe0a1b07a6b193b4600aec02360eb35853d88fe8a4f31a8dda48ad9 +Payload = c1f9c7b2e0ba712b4d2b32e4693b145228213999703767fc +CT = a0f7331fba79fcc0d9a13a98a746b4d265cb54f9ce2b7c62f62e74c2312f9243 + +Count = 23 +Adata = 406f39cb77b8d8c63f7797d184b6ebde819af7d48de5003538c022fe96b841ce +Payload = ebf3a717546199c6f6b14efe8888613ca7e075e8290b277c +CT = 8afd53ba0ea2142d623b468246f5c1bcea0a188897173ce2f1cb228ffd2ff8e6 + +Count = 24 +Adata = 3dd3110703a95b05b9b9cff92ab7244e6c6dcb4509522c305d5d33e03f1b0b60 +Payload = a0e317b790870e6703e6077dfb8ea327c12e29a17107284c +CT = c1ede31aca44838c976c0f0135f303a78cc444c1cf1b33d21f38e2d280a8f3ff + +Count = 25 +Adata = 044ae4064156b6ebc0921cb2c3c607976339f824d4dc6902eac66910dce086b2 +Payload = 8a16990690717dc16eea24da39878a2ee7c1579976e5b173 +CT = eb186dabcab2f02afa602ca6f7fa2aaeaa2b3af9c8f9aaedafbcf46b4e75bb11 + +Count = 26 +Adata = 5479cc7f92460ff7a3e500f76d70e3036c44300005058b5517e3f64ad41b46b3 +Payload = 1e7e51f0fa9a33ed618c26f5e37754df0f7de7778882c26c +CT = 7f70a55da059be06f5062e892d0af45f42978a17369ed9f2fac11c84d08e918e + +Count = 27 +Adata = f950e96d65a55efb3be3a55daffb421afad1d5625e3440a16414085469effe1c +Payload = 3ef1f4c438dce131990ba536d7a6166022ae7de4a436f87c +CT = 5fff0069621f6cda0d81ad4a19dbb6e06f4410841a2ae3e2b50cb871173d9bb8 + +Count = 28 +Adata = 52742be3969830ba9c2bce26c98c2fb44ac881ec55c85627b2c94ba17b0de8cf +Payload = 3c7b4a68dfb766e24739f14932563fb81f24591f0e31e895 +CT = 5d75bec58574eb09d3b3f935fc2b9f3852ce347fb02df30b4ce29627efbc3523 + +Count = 29 +Adata = e16e5dc034719e5d815f937b672cf34d5d420a3945c8f73645241779d2bec150 +Payload = 03038acd2d8351e4e5aa308e554abfcd0d0334d8f864ec60 +CT = 620d7e607740dc0f712038f29b371f4d40e959b84678f7fe095168ed90827db2 + +[Tlen = 10] + +Key = 62f8eba1c2c5f66215493a6fa6ae007aae5be92f7880336a +Nonce = 15769753f503aa324f4b0e8ee0 + +Count = 30 +Adata = 1bc05440ee3e34d0f25e90ca1ecbb555d0fb92b311621d171be6f2b719923d23 +Payload = f5522e3405d9b77cbf3257db2b9675e618e8744a0ee03f0f +CT = b9103942dbbb93e15086751c9bb0a3d33112b55f95b7d4f32ff0bb90a8879812683f + +Count = 31 +Adata = 25c32770a299020d8500d8a4b5d7621e4379dbd6ef34a9aceefd4055ea6144f5 +Payload = c8bf145fcffbafd6cd1a4c5b6cedfe008aacb2528ef51c80 +CT = 84fd032911998b4b22ae6e9cdccb2835a356734715a2f77c6982d0796e1bd1cc9879 + +Count = 32 +Adata = cba0e0140f094e17652ea6f64c26f69dd9429bfefb41aaf104c38f3f6501f4f9 +Payload = f8813985f59bf284bd3882e899ca9b67fb496f3eb78d7ebe +CT = b4c32ef32bf9d619528ca02f29ec4d52d2b3ae2b2cda9542fe08edf50e05d4d85faf + +Count = 33 +Adata = a846d0f56eb963b308ab8f697adca378ab6ccf9f739edcd7f5db197b2ffa99ac +Payload = 72862d82d940748d54369e3143192453069b80d10f32e569 +CT = 3ec43af407225010bb82bcf6f33ff2662f6141c494650e95800ae2523c5f161ed96f + +Count = 34 +Adata = 1dc5f6d6103ed2ae7f4ecd7b1bae4d5b9c0adef9100527b1737e1cf57f1175ef +Payload = 46f2199305ff4e1f21a89d96d3902c54939f52278ba7aa0e +CT = 0ab00ee5db9d6a82ce1cbf5163b6fa61ba65933210f041f234a29547607846bc9834 + +Count = 35 +Adata = 8c28bcb9c31191c347dd64e552af5aff500e6e6f39e866351dd7065501a2837d +Payload = 18c38c41a4e70c3f7362249ea329059b0e026bce7ae976b0 +CT = 54819b377a8528a29cd60659130fd3ae27f8aadbe1be9d4c95f73957e86152df56bd + +Count = 36 +Adata = 1081afd5bf9f1a87169973ebdca85c2b69598154673d7ca9d6e2f63d52030fc1 +Payload = c89e388dd6124c41251e7422b420a71e4618f5cf9f0a63fc +CT = 84dc2ffb087068dccaaa56e50406712b6fe234da045d8800b2b028cd785f4f964069 + +Count = 37 +Adata = 079bc543c966734fa70814139ba8051271ee1c4f701579013c427f8efb141db7 +Payload = 68449bc3f6c8bd8f3a46a8e147522d979948c88ca791d204 +CT = 24068cb528aa9912d5f28a26f774fba2b0b209993cc639f8fd3ef357e5e69f504c95 + +Count = 38 +Adata = e7094697b78d20174ec3c97a48abcf67c2ba6790b4db5fda82b454becd2a25ef +Payload = 330088153204c3d5de7744047b60887c8c044e4eeaae4bab +CT = 7f429f63ec66e74831c366c3cb465e49a5fe8f5b71f9a057e092ed15d1a074306a9e + +Count = 39 +Adata = f8d64ce2aa66e67de0f2fa584dec858983333b0570882ab628419bcee541395a +Payload = 893c5c45db989bd39485caa05ed700bb17c526b426edf4ba +CT = c57e4b3305fabf4e7b31e867eef1d68e3e3fe7a1bdba1f46afaad39e9183b2970027 + +[Tlen = 12] + +Key = 5a5667197f46b8027980d0a3166c0a419713d4df0629a860 +Nonce = 6236b01079d180fce156fbaab4 + +Count = 40 +Adata = 29bdf65b29394d363d5243d4249bad087520f8d733a763daa1356be458d487e5 +Payload = d0e4024d6e33daafc011fe463545ed20f172872f6f33cefa +CT = 479f3d408bfa00d1cd1c8bf11a167ce7ae4bcdb011f04e38733013b8ebe5e92b1917640c + +Count = 41 +Adata = 314f069dd4ac5aa3fdc2a74e83daa1d5d18330cd3b90684a9260bb48f5626d49 +Payload = 9ebd994a9af0cb94552ffd749fdd97f75a1ebd0ad3de3a9a +CT = 09c6a6477f3911ea582288c3b08e06300527f795ad1dba58425a1bad4381dc84fee903e3 + +Count = 42 +Adata = 3aa7f30ac5bfbcb3f8de7c5e76269c608fbc76361d215e78abc0e308ddc3528f +Payload = 590a27721a36987d1ffa15f23c6ca5cc556dfcfa6993a2fb +CT = ce71187fffff420312f76045133f340b0a54b66517502239efcb43c6aaec88b51d0a378b + +Count = 43 +Adata = 5630345f662df248886f771b2b77cc0cbdc8fe4cc4a6cde52b1ea4e5d946cebe +Payload = 65f4b3a00c1c1ef39445a69b2150b034705410140ff9dad0 +CT = f28f8cade9d5c48d9948d32c0e0321f32f6d5a8b713a5a12b9a60374d9304316e2fc50d9 + +Count = 44 +Adata = 38ee97f0dc635c7416a024e3af5c95dd1d496db8a5a5c3bcc20b9093ca906dfb +Payload = 0edea2afaeaf650704d2c6c6622aad82169807c983c17309 +CT = 99a59da24b66bf7909dfb3714d793c4549a14d56fd02f3cb07611163d6b0f1734292ed8c + +Count = 45 +Adata = ea3b3f3c5b28f7d48af2ccf97083937baccb0a6b1a041080a73b15b9640ccf44 +Payload = b80175a03dff1b10078ded64ed759e5453e3bc0657c68590 +CT = 2f7a4aadd836c16e0a8098d3c2260f930cdaf69929050552edefbcbb51d9d607b7b2e8f8 + +Count = 46 +Adata = 287f31e69880823df7798c7970c0e42e600bf567ad78f5d559d0182d570c03cb +Payload = 531c1e721e185f58b2c654b9098ce0c1338bab4149c7bef7 +CT = c467217ffbd18526bfcb210e26df71066cb2e1de37043e35f2b6d4dc8afae25ff400d73d + +Count = 47 +Adata = 1d4579c9410cc34ade1352ed433e0d4faaaa28200e359bcb4140d35939b3a792 +Payload = cead1c5af16ca89bc0821775f8cba8c25620a03dfd27d6f1 +CT = 59d6235714a572e5cd8f62c2d79839050919eaa283e4563319cd80c1ce0f9ed40f1e9dec + +Count = 48 +Adata = 3fec0e5cc24d67139437cbc8112414fc8daccd1a94b49a4c76e2d39303547317 +Payload = be322f58efa7f8c68a635e0b9cce77f28e3f8faaa76fcad4 +CT = 294910550a6e22b8876e2bbcb39de635d106c535d9ac4a16e53d5aeccfb4a6837b79a625 + +Count = 49 +Adata = ec6857533675b5ed8d4315b0d5f59c826f3ccb2d0bd6f604bd54f7c9542123ce +Payload = c222374d366baf2d0301340582aa056c04441ac766065ab1 +CT = 55590840d3a275530e0c41b2adf994ab5b7d505818c5da73385e080bf29ae097c328789a + +[Tlen = 14] + +Key = d2d4482ea8e98c1cf309671895a16610152ce283434bca38 +Nonce = 6ee177d48f59bd37045ec03731 + +Count = 50 +Adata = 9ef2d0d556d05cf9d1ee9dab9b322a389c75cd4e9dee2c0d08eea961efce8690 +Payload = 78168e5cc3cddf4b90d5bc11613465030903e0196f1fe443 +CT = e2324a6d5643dfc8aea8c08cbbc245494a3dcbcb800c797c3abcdb0563978785bf7fd71c6c1f + +Count = 51 +Adata = 6f99d9ce00a4be502a5d2c76a07b914d56f49a1592c1ee2e46e11b3c9da0d083 +Payload = 3c3992cac792e019720d38f768beac3deb6a43e7e1f59f20 +CT = a61d56fb521ce09a4c70446ab2488c77a85468350ee6021fcb0e8ec0879db8ffa59125eac239 + +Count = 52 +Adata = deae66f68bb18178d1bc0734f19fd3ab390049c2ca083a159f5c078fcb4f0a38 +Payload = 8eaae72e532943d66ce8250c6b434d299b6afbf8e2b4f8b1 +CT = 148e231fc6a7435552955991b1b56d63d854d02a0da7658e664a2d992f7cf821e19bb7d4dff8 + +Count = 53 +Adata = e2d592cb412e65f9044257d78e7491f9f80c8b08102c2d5da20535cef74ad8c8 +Payload = 1b8096b79ace8c6ee5dbd8735f1287aa2c94865f382dc2da +CT = 81a452860f408ceddba6a4ee85e4a7e06faaad8dd73e5fe546a4a816b709a55db450ac249c5c + +Count = 54 +Adata = 78a292662b8e05abc2d44fbefd0840795e7493028015d9f2aae7b3b7a4634437 +Payload = 014f15219463ac22820ba6a1fa04d7f686003ef24004da67 +CT = 9b6bd11001edaca1bc76da3c20f2f7bcc53e1520af174758fbebbdb2e35ebf682f7fe30996bc + +Count = 55 +Adata = de6ea86d3641d916c4394fdd31e6a50194993d6ef1d3dfd9fffca20b2f58107d +Payload = cc8c855a4c122046916bdcf8089eba3ddb80483e201c7102 +CT = 56a8416bd99c20c5af16a065d2689a7798be63eccf0fec3deee137bb5b1e7385aa1bd5d69831 + +Count = 56 +Adata = 87b937b1d36e8a9ab33a1d3eed617030923acaabc7e620dfcb3c388936030fc6 +Payload = 3fb7d1f17e7e36d5d4b816cc6db11d1d85848c577fdfe938 +CT = a59315c0ebf03656eac56a51b7473d57c6baa78590cc74079b13b729c70e1fa89c43a05a544b + +Count = 57 +Adata = 116f4855121d6aa53e8b8b43a2e23d468c8568c744f49de5f7f1a60cf4e16278 +Payload = 268fe424d6db30f680c10fe2684707a0778069958e9a3bf7 +CT = bcab201543553075bebc737fb2b127ea34be42476189a6c82d900340d90dc4f09a7171d331d6 + +Count = 58 +Adata = e13e0c9cef1f86160a75ccb131586370b0edabbf8b3b63f21f3a6fee072dd926 +Payload = 9d64de7161895884e7fa3d6e9eb996e7ebe511b01fe19cd4 +CT = 07401a40f4075807d98741f3444fb6ada8db3a62f0f201ebe4ad0d90322ed2813a3343029e93 + +Count = 59 +Adata = d4cd69b26ea43596278b8caec441fedcf0d729d4e0c27ed1332f48871c96e958 +Payload = e4abe343f98a2df09413c3defb85b56a6d34dba305dcce46 +CT = 7e8f27726c042d73aa6ebf43217395202e0af071eacf53790065601bb59972c35b580852e684 + +[Tlen = 16] + +Key = a7177fd129674c6c91c1c89f4408139afe187026b8114893 +Nonce = 31bb28f0e1e63c36ca3959dd18 + +Count = 60 +Adata = 2529a834668187213f5342a1f3deea0dc2765478c7d71c9c21b9eb1351a5f6cb +Payload = 2cea0f7304860a4f40a28c8b890db60f3891b9982478495e +CT = 5bb7aa6ab9c02a5712d62343fbe61f774e598d6b87545612380ea23dcffc9574f672bca92e306411 + +Count = 61 +Adata = a4dbf26802b2dba1bf828f57618fd197d3e60b6efc9d884f965ce3b43e1dc008 +Payload = 2baf3d378942bd44f67fb787def50aaf446bf15c56243484 +CT = 5cf2982e34049d5ca40b184fac1ea3d732a3c5aff5082bc8b93605b46a8a6a9c7e02cb8feac67af4 + +Count = 62 +Adata = cbd1302c9fffe29fe882838236f64fe9d9ba35db5499e90f0faa35f34c7490f2 +Payload = a0639aa4e7a8bda4e9e096d17c1c47d3786010fabe9c72d2 +CT = d73e3fbd5aee9dbcbb9439190ef7eeab0ea824091db06d9e82e411c052c0a025ab15767b0242ebf7 + +Count = 63 +Adata = b6112eb8299b28445aca8f72e7170a1cd8bbfee4d2145fbe8d49c6af8831c4d4 +Payload = e2d78ce5df9284c045b84df33f551211ddccf7bb14cd4529 +CT = 958a29fc62d4a4d817cce23b4dbebb69ab04c348b7e15a65ab58a892f7142414d3f7cf10925a403a + +Count = 64 +Adata = c70a9fb811894b73e445b78db7a931705a181f3a8730341cbb50eaff43572c6e +Payload = c3f1e735a6741aa481ad577a98dbac1f03cc80ea0dae1b94 +CT = b4ac422c1b323abcd3d9f8b2ea3005677504b419ae8204d8b5b3ce6bae6ecb060289508d6e9212fe + +Count = 65 +Adata = c7cbda495a7dc1d91837f652a9d084df9b717e99b29bf1ab7f6c17b3341ecd6c +Payload = db8cd5d76e459afce765e07da98f4ac58231224238c293c7 +CT = acd170ced303bae4b5114fb5db64e3bdf4f916b19bee8c8ba16229a91a2298ffe104f9c032720abb + +Count = 66 +Adata = 4bd3a656796cb1fa87976f3a93471e33dd1209ce33d7a28aaca4d17c99d78c94 +Payload = fd66aebc94f2513b1b9218396b08c63a869b9c4dd0752a91 +CT = 8a3b0ba529b4712349e6b7f119e36f42f053a8be735935ddb9cacc4fdb44402971a0eee7f1ad90d7 + +Count = 67 +Adata = 448cdd9cbbf863eb666fda36b825f3798827da3c1349611f45605ab734b24498 +Payload = 5831e9a6af0234d051ffd17a14b8e3c8da95067ab767901b +CT = 2f6c4cbf124414c8038b7eb266534ab0ac5d3289144b8f5713306e7f0a61d4b3da372db669321143 + +Count = 68 +Adata = f8f04f12174b5205866515ce3775bd8e11d50d8b96142be0c347a773379fb928 +Payload = 248a4969621cf291bec7f0d76d80b7f019d4eb002a22c46a +CT = 53d7ec70df5ad289ecb35f1f1f6b1e886f1cdff3890edb2609726d3a3d04005dc13629658624d05b + +Count = 69 +Adata = 4ecd7c2188fb9cfc84a9ee2fab29ccbbd48a574ec20f1959eedfe96887fe0eb3 +Payload = 68f36fd96de8c57210f6f41da5b67d68533d722c604dda62 +CT = 1faecac0d0aee56a42825bd5d75dd41025f546dfc361c52e8631fb934e918210097f3cefc7f3b0ee diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT256.rsp b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT256.rsp new file mode 100644 index 0000000000..dbe86fbb71 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/VTT256.rsp @@ -0,0 +1,393 @@ +# CAVS 11.0 +# "CCM-VTT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Nlen = 13 + +[Tlen = 4] + +Key = 9074b1ae4ca3342fe5bf6f14bcf2f27904f0b15179d95a654f61e699692e6f71 +Nonce = 2e1e0132468500d4bd47862563 + +Count = 0 +Adata = 3c5f5404370abdcb1edde99de60d0682c600b034e063b7d3237723da70ab7552 +Payload = 239029f150bccbd67edbb67f8ae456b4ea066a4beee065f9 +CT = 9c8d5dd227fd9f81237601830afee4f0115636c8e5d5fd743cb9afed + +Count = 1 +Adata = ab91d1aa072947d22f0dc322355a022fe7f0747f4a184b48446bd27999ef01fe +Payload = 25a43fd8bf241d67dab9e3c106cd27b71fd45a87b9254a53 +CT = 9ab94bfbc86549308714543d86d795f3e4840604b210d2de169d7775 + +Count = 2 +Adata = 4c3bdc6186297896097b3297ba90bcde78dc8a9efe3bd8b10a85eed1bf63a30c +Payload = e63d8303fa5c51550e417e77ec1ec647c9e2a853cab00fee +CT = 5920f7208d1d050253ecc98b6c04740332b2f4d0c1859763b9c2e299 + +Count = 3 +Adata = 8587324c1ff6712aed8af134744de5df1f88c5d2cb33f4f888af9fd39eb8e813 +Payload = f27548ec1608d3b8a5bdcbccb7e09cf4b5c29d3661b13a61 +CT = 4d683ccf614987eff8107c3037fa2eb04e92c1b56a84a2ec02f73205 + +Count = 4 +Adata = 58820fb68ba1cd73b05a6698b4394ba1b13e8e296480f5afe1154d9b8536007c +Payload = ecbd7091732e49c0f4bda2e63235ea43bbf8c8730f955f9c +CT = 53a004b2046f1d97a910151ab22f580740a894f004a0c7114e1dd81b + +Count = 5 +Adata = f3034031933e7807d47140cf5c7794e42a228a522a83883b0765b57a411bad85 +Payload = 3002c6fb49497c7d1d06e1bd4edd57a9e54bbbb74e948c79 +CT = 8f1fb2d83e08282a40ab5641cec7e5ed1e1be73445a114f446525bc4 + +Count = 6 +Adata = 05981dc26a1db2d8e2c3d85ea9a4d1dc3432d9edc4795ca03ca4661d2fc35b8c +Payload = 214acfb2613b266f2929d43c7666f3a23e61423061cdbec3 +CT = 9e57bb91167a7238748463c0f67c41e6c5311eb36af8264e651844a3 + +Count = 7 +Adata = 968a302a27624c304e894633af600c3cc7c614b7da3af0bf2d3f239c7605338a +Payload = 9c575d592a9622c014c1303329757a65a414a9ed0c1b1b3f +CT = 234a297a5dd77697496c87cfa96fc8215f44f56e072e83b249fd550d + +Count = 8 +Adata = 9011231ec382ecaaae57f34de1ac6bbb50741014a978160ce59c60491e64f30d +Payload = 426a4c83793abdcff5e2a99e161785dc27c6168a329ee465 +CT = fd7738a00e7be998a84f1e62960d3798dc964a0939ab7ce84137defa + +Count = 9 +Adata = 96f0b1edec4ad14407dcaf30ed68942b46c48d58b2dd63af60fccd5bdd48e560 +Payload = e04006b68c83a5dd4ceac3cde238e48895ae17728fdc7bbe +CT = 5f5d7295fbc2f18a11477431622256cc6efe4bf184e9e33356a4953f + +[Tlen = 6] + +Key = 8596a69890b0e47d43aeeca54b52029331da06fae63aa3249faaca94e2605feb +Nonce = 20442e1c3f3c88919c39978b78 + +Count = 10 +Adata = 4e0d3aa502bd03fe1761b167c4e0df1d228301d3ebaa4a0281becd813266e255 +Payload = f0b065da6ecb9ddcab855152d3b4155037adfa758ba96070 +CT = d6a0f377f7c1b14dcdba729cae5271b027e71cc7850173ec265867a29eb3 + +Count = 11 +Adata = aeef2d1e3d3c9920a4fdb5f9d963b88e78a5d0edae531e3b55e702ed609d9a3c +Payload = f2a8855e34854656df0776e80255ad1d125841c727201509 +CT = d4b813f3ad8f6ac7b93855267fb3c9fd0212a7752988069566e89a72dc0e + +Count = 12 +Adata = 3051ffb19862370bc46ca94a8eb906a660d539b18e965583e95acc149190e3e9 +Payload = 20955a0ca3c9c10d4055406ec12226130ecdaf195b08d65e +CT = 0685cca13ac3ed9c266a63a0bcc442f31e8749ab55a0c5c2dff4f6257e06 + +Count = 13 +Adata = aafa45a107d909756b4a1956d5228b50316fc5852afdeecf401fa2a71aabea46 +Payload = 246b60d17ea70deb1380fbf4bd767d88f53069b0f4136511 +CT = 027bf67ce7ad217a75bfd83ac0901968e57a8f02fabb768def0017c9acc1 + +Count = 14 +Adata = ccdeab6a28b1b9e9f0c67116a91f2215b229d0edcd35d696db2bcf54e77db743 +Payload = 5b735697c5577ee0e352cf6a1495c490d6f7e97c3898f0ee +CT = 7d63c03a5c5d5271856deca46973a070c6bd0fce3630e372c73969437912 + +Count = 15 +Adata = 33a1e7d4820ed6a76a6dab90b4ba830888caf12a262e4eb6d75a505b2207de36 +Payload = 1170416faf81896c7f00815f53c2be5f7246d4794895b4b1 +CT = 3760d7c2368ba5fd193fa2912e24dabf620c32cb463da72dd7cb3721fcdd + +Count = 16 +Adata = 3df3edd9fc93be9960b5a632e2847b30b10187c8f83de5b45fcb2e3ed475569a +Payload = 556765ffe5c46015cbd8194e32abc41e8f711773e2bcac90 +CT = 7377f3527cce4c84ade73a804f4da0fe9f3bf1c1ec14bf0c82183448e643 + +Count = 17 +Adata = 4cb8663a1a934b6b27cbc1ed3040fbb99fbb6812f8ca35ff73cc13feeb483af7 +Payload = 3070e269f3e87cd82af3896895a5dd6fbfa9898279e0f73b +CT = 166074c46ae250494cccaaa6e843b98fafe36f307748e4a76069901b5e3a + +Count = 18 +Adata = 876df130c01d0b9b8ebe43e71046c365e13124169026876d50d7e155f0299676 +Payload = dd18d40728c561e24e6e54834348dde5683f067baf8df469 +CT = fb0842aab1cf4d732851774d3eaeb9057875e0c9a125e7f56d65c2b005d4 + +Count = 19 +Adata = da08b14e1b770b81faaf1e59851df1cba8838cd63bef141340ee378e65fdcbd4 +Payload = 7064a2491f716f4a2969815e4a281a54690ced9f794b264e +CT = 567434e4867b43db4f56a29037ce7eb479460b2d77e335d275b37e9fb9e9 + +[Tlen = 8] + +Key = bae73483de27b581a7c13f178a6d7bda168c1b4a1cb9180512a13e3ab914eb61 +Nonce = daf54faef6e4fc7867624b76f2 + +Count = 20 +Adata = 7022eaa52c9da821da72d2edd98f6b91dfe474999b75b34699aeb38465f70c1c +Payload = 28ef408d57930086011b167ac04b866e5b58fe6690a0b9c3 +CT = 356367c6cee4453658418d9517f7c6faddcd7c65aef460138cf050f48c505151 + +Count = 21 +Adata = a61b6c1f0293a7c35520abf158a995e5ae59b43ec5f38ff6fd6529970c9f83ac +Payload = 1c5ad37d2a55afbc390b27cde0c42d6651fe191239bfaa27 +CT = 01d6f436b322ea0c6051bc2237786df2d76b9b1107eb73f76bca352f92f383e1 + +Count = 22 +Adata = 0f1c6dffeda98f7a159f9cc61820bfb29910d8eaa41b751a41f9fe5648f02fba +Payload = 6efe6652d46a84166d30befe2fbee0795e9475b401eedd60 +CT = 737241194d1dc1a6346a2511f802a0edd801f7b73fba04b014fd7c84052208d9 + +Count = 23 +Adata = 151110a9ce7e44e5d76d9cad53c1819317527fcd169051f01c6a3efcc06ea999 +Payload = 55b791ee495299916ff3c2327b4990952bebd0a2da9acfc5 +CT = 483bb6a5d025dc2136a959ddacf5d001ad7e52a1e4ce1615c3ebc7214b9eef31 + +Count = 24 +Adata = 0ba1210696d735eebc13b609d0ec33bc740805105dd82f065b82892b931f1e6d +Payload = 794a86f5b20d344ad86fd5523d08f1864737be57731440c2 +CT = 64c6a1be2b7a71fa81354ebdeab4b112c1a23c544d409912eff08182f8a00f13 + +Count = 25 +Adata = 5a3b71b0fdecce8bd759d3d72321b5c3e882c82627c14e0b59cc8c6d191f243f +Payload = efa6ddd6fb8e4480a0f64414694e5f9e7f2e9b97cbe9cd14 +CT = f22afa9d62f90130f9acdffbbef21f0af9bb1994f5bd14c46894be1f8fa14538 + +Count = 26 +Adata = 5d344c5b94695a66192b6692e420c8eaa3cb482502be837b2a0a91b787fbe48e +Payload = 561dd3bf419ae33ff521a43898cf12c6a5c6163eec22abc1 +CT = 4b91f4f4d8eda68fac7b3fd74f7352522353943dd2767211f4393bca514c3336 + +Count = 27 +Adata = 08344486df2b2f9a6880a03503a3986c485f067c480c31a51607553b875f91fa +Payload = 6d3596f25401f2e3b099613236f1d88a2f3d8edc1f04bc0c +CT = 70b9b1b9cd76b753e9c3fadde14d981ea9a80cdf215065dcb708ffd04c8c2da0 + +Count = 28 +Adata = 9d0824a4dc7e67326c5b68a6ea99cb68298a2af2cc1952351454b038f6270603 +Payload = c563a43e4cc0f93d955432f68287e63400a7fdcae738ba84 +CT = d8ef8375d5b7bc8dcc0ea919553ba6a086327fc9d96c63541511d7d684d58762 + +Count = 29 +Adata = c4384069e09a3d4de2c94e7e6055d8a00394e268398d6ea32914097aec37a1f4 +Payload = 18c5865b414b2a06b4d71ab9550985b4f3c3d7817e8a8d7c +CT = 0549a110d83c6fb6ed8d815682b5c5207556558240de54acef0919c5f5daf093 + +[Tlen = 10] + +Key = d5b321b0ac2fedce0933d57d12195c7b9941f4caa95529125ed21c41fac43374 +Nonce = b35fb2262edfa14938a0fba03e + +Count = 30 +Adata = ba762bbda601d711e2dfc9dbe3003d39df1043ca845612b8e9dc9ff5c5d06ec4 +Payload = 6aa6ea668df60b0db85592d0a819c9df9e1099916272aafb +CT = 97027de5effd82c58f8dbfb909d7696fbe2d54916262912001a4d765bc1c95c90a95 + +Count = 31 +Adata = 77a685958ca801dbcbf346d6bac72662d3870899d7bcdef6665d57bacd4e558f +Payload = c2992096828325820e2d7acaa17ac789b6830ec3128dd7f9 +CT = 3f3db715e088ac4a39f557a300b4673996bec3c3129dec22288aecb4c38c2391c21d + +Count = 32 +Adata = 3a54d3e14bbd0549570ef12425c4b36fd25382d56b68e217bc711ab1625fe9bb +Payload = e5151262cafdd2f4dea187372dacb9e5975065572446f2a5 +CT = 18b185e1a8f65b3ce979aa5e8c621955b76da8572456c97edb4bd2cb1f1222e0d64f + +Count = 33 +Adata = 5c7604f9ac8fdf30ee5820e5aeb75b65d7855e5d2ff9ccf021640707bf1f53e8 +Payload = 1fe786f52daab92a6aa5f43263bed74153d90579a34bceff +CT = e24311764fa130e25d7dd95bc27077f173e4c879a35bf5249283c1a61e9113462325 + +Count = 34 +Adata = 42b8863ea100babc1713654afcf54f21f8bff754223ad70269ace9d034f26a96 +Payload = 56c3130c5af210b5bcf7c58b968fc75fc92b9c339efb7aee +CT = ab67848f38f9997d8b2fe8e2374167efe91651339eeb4135bd3ffe1b1051ec3206db + +Count = 35 +Adata = c5a369a8291f4278e797ff11ea5e777d69df3b9c0c32d46150ed4b3e2c3defdd +Payload = daa716f3cd1e008b46318ec90d976c3fbf88c3ff73cf0052 +CT = 27038170af15894371e9a3a0ac59cc8f9fb50eff73df3b8910d5d255f193b29eb961 + +Count = 36 +Adata = 63bdceb36a032d3e0e81b4e98ad9861e2c708cef4e870c5b88a87ecc24449be3 +Payload = 42477d7d44881dabccfce52efb8a2cc917b182a23b71fb49 +CT = bfe3eafe26839463fb24c8475a448c79378c4fa23b61c0924e524729fb06212508e6 + +Count = 37 +Adata = b7f8e7b66726e07c3c73d74135f068bb8025c9da9ba70affb9ed9a69675f0eef +Payload = 07f48cdc12aa27119fbdfda4ec07ce6068c92ba7ba9c9309 +CT = fa501b5f70a1aed9a865d0cd4dc96ed048f4e6a7ba8ca8d2222af86d91fb6a2b09d3 + +Count = 38 +Adata = 09891ed14f4488069cd6a5744061e06f8ff8d1bc87b10448b3fbfc1a4e327787 +Payload = e2e7002b769fb5b4201053457158147d99b0d5147f3acac2 +CT = 1f4397a814943c7c17c87e2cd096b4cdb98d18147f2af1194cddcb65a76c40698017 + +Count = 39 +Adata = 8f9786940943752c536548497f9dae2bd8d677b8bbcb0121a9c9f3c399b62e4b +Payload = 86be1d1949fe03b8b80ef7abb3e27394273d7b76d7697f0e +CT = 7b1a8a9a2bf58a708fd6dac2122cd3240700b676d77944d5ddb42d504b6fc47d6575 + +[Tlen = 12] + +Key = 7f4af6765cad1d511db07e33aaafd57646ec279db629048aa6770af24849aa0d +Nonce = dde2a362ce81b2b6913abc3095 + +Count = 40 +Adata = 404f5df97ece7431987bc098cce994fc3c063b519ffa47b0365226a0015ef695 +Payload = 7ebef26bf4ecf6f0ebb2eb860edbf900f27b75b4a6340fdb +CT = 353022db9c568bd7183a13c40b1ba30fcc768c54264aa2cd2927a053c9244d3217a7ad05 + +Count = 41 +Adata = e9ed05813262fbe769c1104d8ba5c836dbd229a22a681de3565d17ac1129f96b +Payload = fdf5a5fb377bb52ad07a971c6a9da3e1a68d279be9ac4ed7 +CT = b67b754b5fc1c80d23f26f5e6f5df9ee9880de7b69d2e3c11c000c9d88f047ca198c4e65 + +Count = 42 +Adata = f246f1e948c81c98ea13f03dd8eea878449d0c3d5b5fe87c633bbe0106fcb899 +Payload = e5e6b57e74ce7afbde3697e2a69d61ca615aa3dfd32fe31f +CT = ae6865ce1c7407dc2dbe6fa0a35d3bc55f575a3f53514e095c09878f1a963b795b29f4dd + +Count = 43 +Adata = e4683285695348ff04a61d51d90b868dfe4cf6ea246544727adeaeface571d57 +Payload = ef2c3a6bb8602d290045854a5f223e6f43bfd0bb9278fa88 +CT = a4a2eadbd0da500ef3cd7d085ae264607db2295b1206579e807d196d2628df1c384816f7 + +Count = 44 +Adata = 42695369dbd69f07b46db282653704c34106aad82efdcc99b452598b5353f904 +Payload = beda29c7fe15c73ee5bef96485eb8c9e3cd3ea7ee633ef45 +CT = f554f97796afba1916360126802bd69102de139e664d4253961c666279394e1e28cf1b02 + +Count = 45 +Adata = 58c3ce3906633475441229cfcdf05e02ff3738ae8d1b255974f431b3309ed41e +Payload = 419c96ba8142b27e3377716358c97a8a636d7fe8403165e1 +CT = 0a12460ae9f8cf59c0ff89215d0920855d608608c04fc8f764efe624dd6c6f8b8cdc76e3 + +Count = 46 +Adata = a9c06d8029f8da31629c3a6ddceb6009220a69fc614af1c231ae8702b3a85d6e +Payload = 69bb441a7640f77e124d66af45a0e9f646658a838dfcb957 +CT = 223594aa1efa8a59e1c59eed4060b3f9786873630d8214410ef4b71970b9f80087533cf7 + +Count = 47 +Adata = a92e88edd297da8c7089e21822b3e6cffd6837c78b975c8413fd6cca1b99bcb0 +Payload = a45b755658d38bdea57d1faae21d75428a17f2c74a33d2d5 +CT = efd5a5e63069f6f956f5e7e8e7dd2f4db41a0b27ca4d7fc36e27dfbf1ff7f08d1b213848 + +Count = 48 +Adata = 421533453c8129fc8e681c68b9d7371adb0a19442ede7accd185129fcb7db648 +Payload = 2c3e28b61cede08121e80ee08c4f1f19dabb19add9d2dc8a +CT = 67b0f80674579da6d260f6a2898f4516e4b6e04d59ac719ca48d1a0b815139fa28652d94 + +Count = 49 +Adata = 55351bc7ddbc6b668d435088f1f9cf6f53caae16d4292b14bc0deec20f393ba0 +Payload = 81fa7fd41ba267bcbdf024cef1543b041cadd96b62a7cf1f +CT = ca74af6473181a9b4e78dc8cf494610b22a0208be2d962091301c87a2a94df147c8cce4c + +[Tlen = 14] + +Key = 5c8b59d3e7986c277d5ad51e4a2233251076809ebf59463f47cd10b4aa951f8c +Nonce = 21ff892b743d661189e205c7f3 + +Count = 50 +Adata = f1e0af185180d2eb63e50e37ba692647cac2c6a149d70c81dbd34685ed78feaa +Payload = 138ee53b1914d3322c2dd0a4e02faab2236555131d5eea08 +CT = 5b2f3026f30fdd50accc40ddd093b7997f23d7c6d3c8bc425f82c828413643b8794494cb5236 + +Count = 51 +Adata = 45c5c284836414407268d7c8a89a0146759cfc92242004027d58d0828fad74e7 +Payload = fe3df84ee9b237f9edd77a5b8af96bc3e184579ac9c6e246 +CT = b69c2d5303a9399b6d36ea22ba4576e8bdc2d54f0750b40c6db5c92de5fb3aafba9537795e17 + +Count = 52 +Adata = a41ea42692eac0914fef35e58409007342cef027de141223ffb46da7f58df034 +Payload = e0f5c02f9f84e57fada3f3575f1b1a748f360e0ea781b7b8 +CT = a8541532759feb1d2d42632e6fa7075fd3708cdb6917e1f21af6cf931ac943fd3affa6ad6fd1 + +Count = 53 +Adata = 17dae00f2a9417780ecfef98f290a5ca9b17c873a9149cd81c18bd33164a0405 +Payload = 3a77a2ec5a1be6cbfbbfaab3e65427cb38d6798b132ff5c7 +CT = 72d677f1b000e8a97b5e3acad6e83ae06490fb5eddb9a38d38a3f09c56ae653be49b355fb938 + +Count = 54 +Adata = 33b44873a7a1e5b0fdbb7e7347623e4fa1ccd937feb26fda2749b42f00744e50 +Payload = d0628b26019dad84de628d9dabf42cfb195165a369c22b49 +CT = 98c35e3beb86a3e65e831de49b4831d04517e776a7547d03974deec7ce2e1f296890bee795cb + +Count = 55 +Adata = f4fc5acff75d404849675b813cf7adcaeb8f3d56cb9a54a083f8ec07feb666bb +Payload = 10b5ec41036e4bc5d61728e8811b520b7080c2177c122cbd +CT = 5814395ce97545a756f6b891b1a74f202cc640c2b2847af798a3bc56f900bee7e8271c6dab22 + +Count = 56 +Adata = ba051d1bc19b9a27520834fa3977b6413a319c9a52c8785e3e9594bd4265d911 +Payload = 648a84813ca97aef4ab7e143ee29acb946388660f18eb671 +CT = 2c2b519cd6b2748dca56713ade95b1921a7e04b53f18e03be6623d80c677633a9e4f999bb885 + +Count = 57 +Adata = f5c629299d18901c8c34c42e8fc29a70c377c160fdea4a6068a36867707575f7 +Payload = 3ead49ed0b41de79c829098d034b666bce052d79bf1f56db +CT = 760c9cf0e15ad01b48c899f433f77b409243afac71890091c65b88ff4fdd9b8187f7d71ba04b + +Count = 58 +Adata = da486fd2953a72838e67e1909ed4042df67c355b648a45bcd2cc1ba610659e76 +Payload = 4543457c8fdf463c4bf8515a762cdc83d9aaa887d3eaa2af +CT = 0de2906165c4485ecb19c1234690c1a885ec2a521d7cf4e5727c3404564ed41528973d389c7c + +Count = 59 +Adata = a0b1d3600f6eba910a11537d61fa12184959f1c3ae386570cbbc9106f7a7ba07 +Payload = 22071ef5d204417f99bc2faf53ecc4c6cf795e77805633ee +CT = 6aa6cbe8381f4f1d195dbfd66350d9ed933fdca24ec065a446ecb536703a7a97928f80fcc7cf + +[Tlen = 16] + +Key = 60823b64e0b2da3a7eb772bd5941c534e6ff94ea96b564e2b38f82c78bb54522 +Nonce = 48526f1bffc97dd65e42906983 + +Count = 60 +Adata = fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a +Payload = a8be794613835c4366e75817d228438f011a2ec8a86f9797 +CT = cc3efe04d84a4ec5cb6a6c28dc2c2d386a359d9550dbdec963ddd56464aed6d0613159d1aa181dcb + +Count = 61 +Adata = b3ff11e57eeab41bc597622c770c9eea333e178d5bd5689c6a30011187a965b8 +Payload = 7590769380dc91832da023798dfdd447b9f7adaa09d7e2d0 +CT = 1110f1d14b158305802d174683f9baf0d2d81ef7f163ab8e7c1273765bc5bfdeca429cc8ebd8aca2 + +Count = 62 +Adata = 2a953a081c5d52bc500c9c12f56cd2aab5c920d73098335baa5d947100cb3411 +Payload = 30e4de5e8c275677f8f4f7bbf9d101f96b38d79968ea028c +CT = 5464591c47ee44f15579c384f7d56f4e001764c4905e4bd2886229c09b986bee3a8a3025c150d3a3 + +Count = 63 +Adata = 99cc9d1b3db79640dfdc4423af3ded03c329f7ba5b6b509269c10e59519053b8 +Payload = 852698f6ab4aa794b3d657c4a2ca7b9c8bfb5fc9b4ad0aca +CT = e1a61fb46083b5121e5b63fbacce152be0d4ec944c19439480cd04041918c4071ea5ac263f36c544 + +Count = 64 +Adata = b76aef71eaf03c2d0dc0623e90596fcb0bc4dbbed1d5bb24c8af37d778863e5b +Payload = cd337fcf362d301d66916c7097bdeb31df8206e00f7ac106 +CT = a9b3f88dfde4229bcb1c584f99b98586b4adb5bdf7ce8858f001d6002eafaec49c472acdfaedf1de + +Count = 65 +Adata = 42a718d892e229a1807b74bd730fb15500ac4a790392100aef362cd7628d5806 +Payload = 0041a0cf48fcf870b21db6107cfd9ef91e409afc7562ffa7 +CT = 64c1278d8335eaf61f90822f72f9f04e756f29a18dd6b6f975d86cde91b6610496c3bb5276238741 + +Count = 66 +Adata = e788c98ae85b11b3ae884eed6f3b8f5bcf5ab1b7b20ad3f44f760b2287cc5793 +Payload = fcc74ef1908dbcab9b05c76ee5a9941cdef933d433c0d25f +CT = 9847c9b35b44ae2d3688f351ebadfaabb5d68089cb749b01db7d9f10e75d1b213beae0e0230dd82b + +Count = 67 +Adata = d330fc1ca406dd9528e9281aa1a3cdf013b698c14a4e55371e7539c9f6867dd4 +Payload = 611dade00cec14743be4e035cafe7507df5fb94b278875b1 +CT = 059d2aa2c72506f29669d40ac4fa1bb0b4700a16df3c3cefc63ba64291e73e6349ed089a53564291 + +Count = 68 +Adata = 06bbadd5d22d1796d88415d7a4b024313f243bd0f58aafc75bb554a691d7e54f +Payload = b67b5dd7f90ecd48a45853cb193e0d9702d78898f07e831d +CT = d2fbda9532c7dfce09d567f4173a632069f83bc508caca43ac4d7bd964a2f9e2303df688dd0513da + +Count = 69 +Adata = 54da66d406f2d98edd999b673ef44d46ffd196091c8b7582ac2ed6bf13dc648f +Payload = d092dc436c41836bdb815e473bc6a1906f37624e73b494f9 +CT = b4125b01a78891ed760c6a7835c2cf270418d1138b00dda7b4cd237cd9a7c9d93b9cc0f171818dae diff --git a/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/ccmtestvectors.zip b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/ccmtestvectors.zip new file mode 100644 index 0000000000..34bb67b1ac Binary files /dev/null and b/lib/crypto/test/crypto_SUITE_data/aes_ccm_vectors/ccmtestvectors.zip differ -- cgit v1.2.3 From 56be5aea623e69a84ddf4ea5f5e2dba6277b83a2 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 11 Sep 2018 19:00:23 +0200 Subject: crypto: AES_CCM test case --- lib/crypto/test/crypto_SUITE.erl | 192 ++- lib/crypto/test/crypto_SUITE_data/VADT128.rsp | 1823 +++++++++++++++++++++++++ lib/crypto/test/crypto_SUITE_data/VADT192.rsp | 1823 +++++++++++++++++++++++++ lib/crypto/test/crypto_SUITE_data/VADT256.rsp | 1823 +++++++++++++++++++++++++ lib/crypto/test/crypto_SUITE_data/VNT128.rsp | 456 +++++++ lib/crypto/test/crypto_SUITE_data/VNT192.rsp | 456 +++++++ lib/crypto/test/crypto_SUITE_data/VNT256.rsp | 456 +++++++ lib/crypto/test/crypto_SUITE_data/VPT128.rsp | 1383 +++++++++++++++++++ lib/crypto/test/crypto_SUITE_data/VPT192.rsp | 1383 +++++++++++++++++++ lib/crypto/test/crypto_SUITE_data/VPT256.rsp | 1383 +++++++++++++++++++ 10 files changed, 11143 insertions(+), 35 deletions(-) create mode 100644 lib/crypto/test/crypto_SUITE_data/VADT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VADT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VADT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VNT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VNT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VNT256.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VPT128.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VPT192.rsp create mode 100644 lib/crypto/test/crypto_SUITE_data/VPT256.rsp (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 170a97aecb..749a57dbac 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -79,6 +79,7 @@ groups() -> {group, rc2_cbc}, {group, rc4}, {group, aes_ctr}, + {group, aes_ccm}, {group, aes_gcm}, {group, chacha20_poly1305}, {group, chacha20}, @@ -116,6 +117,7 @@ groups() -> {group, no_rc2_cbc}, {group, no_rc4}, {group, aes_ctr}, + {group, aes_ccm}, {group, aes_gcm}, {group, no_chacha20_poly1305}, {group, no_chacha20}, @@ -166,6 +168,7 @@ groups() -> {blowfish_ofb64,[], [block]}, {rc4, [], [stream]}, {aes_ctr, [], [stream]}, + {aes_ccm, [], [aead]}, {aes_gcm, [], [aead]}, {chacha20_poly1305, [], [aead]}, {chacha20, [], [stream]}, @@ -425,7 +428,7 @@ no_block(Config) when is_list(Config) -> no_aead() -> [{doc, "Test disabled aead ciphers"}]. no_aead(Config) when is_list(Config) -> - [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag} | _] = + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, _Info} | _] = lazy_eval(proplists:get_value(aead, Config)), EncryptArgs = [Type, Key, Nonce, {AAD, PlainText}], DecryptArgs = [Type, Key, Nonce, {AAD, CipherText, CipherTag}], @@ -828,34 +831,51 @@ stream_cipher_incment_loop(State0, OrigState, [PlainText | PlainTexts], Acc, Pla {State, CipherText} = crypto:stream_encrypt(State0, PlainText), stream_cipher_incment_loop(State, OrigState, PlainTexts, [CipherText | Acc], Plain). -aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag}) -> +aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, Info}) -> Plain = iolist_to_binary(PlainText), case crypto:block_encrypt(Type, Key, IV, {AAD, Plain}) of {CipherText, CipherTag} -> ok; Other0 -> - ct:fail({{crypto, block_encrypt, [Plain, PlainText]}, {expected, {CipherText, CipherTag}}, {got, Other0}}) + ct:fail({{crypto, + block_encrypt, + [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, + {expected, {CipherText, CipherTag}}, + {got, Other0}}) end, case crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, CipherTag}) of Plain -> ok; Other1 -> - ct:fail({{crypto, block_decrypt, [CipherText]}, {expected, Plain}, {got, Other1}}) + ct:fail({{crypto, + block_decrypt, + [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, + {expected, Plain}, + {got, Other1}}) end; -aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen}) -> +aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}) -> <> = CipherTag, Plain = iolist_to_binary(PlainText), case crypto:block_encrypt(Type, Key, IV, {AAD, Plain, TagLen}) of {CipherText, TruncatedCipherTag} -> ok; Other0 -> - ct:fail({{crypto, block_encrypt, [Plain, PlainText]}, {expected, {CipherText, TruncatedCipherTag}}, {got, Other0}}) + ct:fail({{crypto, + block_encrypt, + [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, {taglen,TagLen}]}, + {expected, {CipherText, TruncatedCipherTag}}, + {got, Other0}}) end, case crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, TruncatedCipherTag}) of Plain -> ok; Other1 -> - ct:fail({{crypto, block_decrypt, [CipherText]}, {expected, Plain}, {got, Other1}}) + ct:fail({{crypto, + block_decrypt, + [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, + {truncated,TruncatedCipherTag}]}, + {expected, Plain}, + {got, Other1}}) end. do_sign_verify({Type, Hash, Public, Private, Msg}) -> @@ -1061,6 +1081,14 @@ mkint(C) when $A =< C, C =< $F -> mkint(C) when $a =< C, C =< $f -> C - $a + 10. +bin2hexstr(B) when is_binary(B) -> + io_lib:format("~.16b",[crypto:bytes_to_integer(B)]). + +decstr2int(S) when is_binary(S) -> + list_to_integer(binary:bin_to_list(S)); +decstr2int(S) -> + list_to_integer(S). + is_supported(Group) -> lists:member(Group, lists:append([Algo || {_, Algo} <- crypto:supports()])). @@ -1492,6 +1520,9 @@ group_config(rc4, Config) -> group_config(aes_ctr, Config) -> Stream = aes_ctr(), [{stream, Stream} | Config]; +group_config(aes_ccm, Config) -> + AEAD = fun() -> aes_ccm(Config) end, + [{aead, AEAD} | Config]; group_config(aes_gcm, Config) -> AEAD = fun() -> aes_gcm(Config) end, [{aead, AEAD} | Config]; @@ -2301,6 +2332,12 @@ aes_gcm(Config) -> "gcmEncryptExtIV192.rsp", "gcmEncryptExtIV256.rsp"]). +aes_ccm(Config) -> + read_rsp(Config, aes_ccm, + ["VADT128.rsp", "VADT192.rsp", "VADT256.rsp", + "VNT128.rsp", "VNT192.rsp", "VNT256.rsp", + "VPT128.rsp", "VPT192.rsp", "VPT256.rsp" + ]). %% https://tools.ietf.org/html/rfc7539#appendix-A.5 chacha20_poly1305() -> @@ -2344,7 +2381,9 @@ chacha20_poly1305() -> "49e617d91d361094fa68f0ff77987130" "305beaba2eda04df997b714d6c6f2c29" "a6ad5cb4022b02709b"), - hexstr2bin("eead9d67890cbb22392336fea1851f38")} %% CipherTag + hexstr2bin("eead9d67890cbb22392336fea1851f38"), %% CipherTag + no_info + } ]. @@ -2880,29 +2919,36 @@ read_rsp(Config, Type, Files) -> Tests = lists:foldl( fun(FileName, Acc) -> - read_rsp_file(filename:join(datadir(Config), FileName), - Type, Acc) + NewAcc = read_rsp_file(filename:join(datadir(Config), FileName), + Type, Acc), + ct:log("~p: ~p tests read.~n",[FileName,length(NewAcc)-length(Acc)]), + NewAcc end, [], Files), log_rsp_size(Type, Tests), Tests. read_rsp_file(FileName, Type, Acc) -> - {ok, Raw} = file:read_file(FileName), - Split = binary:split(Raw, [<<"\r">>, <<"\n">>], [global, trim_all]), - parse_rsp(Type, Split, Acc). + case file:read_file(FileName) of + {ok, Raw} -> + Split = binary:split(Raw, [<<"\r">>, <<"\n">>], [global, trim_all]), + parse_rsp(Type, Split, #{file => FileName}, Acc); + Other -> + ct:fail("~p ~p",[FileName, Other]) + end. -parse_rsp(_Type, [], Acc) -> +parse_rsp(_Type, [], _State, Acc) -> Acc; -parse_rsp(_Type, [<<"DECRYPT">>|_], Acc) -> +parse_rsp(_Type, [<<"DECRYPT">>|_], _State, Acc) -> Acc; %% AES format parse_rsp(Type, [<<"COUNT = ", _/binary>>, <<"KEY = ", Key/binary>>, <<"IV = ", IV/binary>>, <<"PLAINTEXT = ", PlainText/binary>>, - <<"CIPHERTEXT = ", CipherText/binary>>|Next], Acc) -> - parse_rsp(Type, Next, [{Type, hexstr2bin(Key), hexstr2bin(IV), - hexstr2bin(PlainText), hexstr2bin(CipherText)}|Acc]); + <<"CIPHERTEXT = ", CipherText/binary>>|Next], State, Acc) -> + parse_rsp(Type, Next, State, + [{Type, hexstr2bin(Key), hexstr2bin(IV), + hexstr2bin(PlainText), hexstr2bin(CipherText)}|Acc]); %% CMAC format parse_rsp(Type, [<<"Count = ", _/binary>>, <<"Klen = ", _/binary>>, @@ -2910,23 +2956,23 @@ parse_rsp(Type, [<<"Count = ", _/binary>>, <<"Tlen = ", Tlen/binary>>, <<"Key = ", Key/binary>>, <<"Msg = ", Msg/binary>>, - <<"Mac = ", MAC/binary>>|Rest], Acc) -> + <<"Mac = ", MAC/binary>>|Rest], State, Acc) -> case Rest of [<<"Result = P">>|Next] -> - parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Next, Acc); + parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Next, State, Acc); [<<"Result = ", _/binary>>|Next] -> - parse_rsp(Type, Next, Acc); + parse_rsp(Type, Next, State, Acc); _ -> - parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Rest, Acc) + parse_rsp_cmac(Type, Key, Msg, Mlen, Tlen, MAC, Rest, State, Acc) end; %% GCM format decode format -parse_rsp(Type, [<<"Count = ", _/binary>>, +parse_rsp(Type, [<<"Count = ", Count/binary>>, <<"Key = ", Key/binary>>, <<"IV = ", IV/binary>>, <<"CT = ", CipherText/binary>>, <<"AAD = ", AAD/binary>>, <<"Tag = ", CipherTag0/binary>>, - <<"PT = ", PlainText/binary>>|Next], Acc) -> + <<"PT = ", PlainText/binary>>|Next], #{file:=File}=State, Acc) -> CipherTag = hexstr2bin(CipherTag0), TestCase = {Type, hexstr2bin(Key), @@ -2935,16 +2981,17 @@ parse_rsp(Type, [<<"Count = ", _/binary>>, hexstr2bin(AAD), hexstr2bin(CipherText), CipherTag, - size(CipherTag)}, - parse_rsp(Type, Next, [TestCase|Acc]); + size(CipherTag), + {File,decstr2int(Count)}}, + parse_rsp(Type, Next, State, [TestCase|Acc]); %% GCM format encode format -parse_rsp(Type, [<<"Count = ", _/binary>>, +parse_rsp(Type, [<<"Count = ", Count/binary>>, <<"Key = ", Key/binary>>, <<"IV = ", IV/binary>>, <<"PT = ", PlainText/binary>>, <<"AAD = ", AAD/binary>>, <<"CT = ", CipherText/binary>>, - <<"Tag = ", CipherTag0/binary>>|Next], Acc) -> + <<"Tag = ", CipherTag0/binary>>|Next], #{file:=File}=State, Acc) -> CipherTag = hexstr2bin(CipherTag0), TestCase = {Type, hexstr2bin(Key), @@ -2953,13 +3000,88 @@ parse_rsp(Type, [<<"Count = ", _/binary>>, hexstr2bin(AAD), hexstr2bin(CipherText), CipherTag, - size(CipherTag)}, - parse_rsp(Type, Next, [TestCase|Acc]); + size(CipherTag), + {File,decstr2int(Count)}}, + parse_rsp(Type, Next, State, [TestCase|Acc]); +%% CCM-VADT format +parse_rsp(Type, [<<"[Alen = ", AlenB0/binary>>|Next], State0, Acc) -> + AlenSize = size(AlenB0) - 1, % remove closing ']' + Alen = decstr2int(<>), + State = State0#{alen => Alen}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"[Nlen = ", NlenB0/binary>>|Next], State0, Acc) -> + NlenSize = size(NlenB0) - 1, % remove closing ']' + Nlen = decstr2int(<>), + State = State0#{nlen => Nlen}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"[Plen = ", PlenB0/binary>>|Next], State0, Acc) -> + PlenSize = size(PlenB0) - 1, % remove closing ']' + Plen = decstr2int(<>), + State = State0#{plen => Plen}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"[Tlen = ", TlenB0/binary>>|Next], State0, Acc) -> + TlenSize = size(TlenB0) - 1, % remove closing ']' + Tlen = decstr2int(<>), + State = State0#{tlen => Tlen}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Alen = ", B/binary>>|Next], State0, Acc) -> + State = State0#{alen => decstr2int(B)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Plen = ", B/binary>>|Next], State0, Acc) -> + State = State0#{plen => decstr2int(B)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Count = ", B/binary>>|Next], State0, Acc) -> + State = State0#{count => B}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Nlen = ", B/binary>>|Next], State0, Acc) -> + State = State0#{nlen => decstr2int(B)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Tlen = ", B/binary>>|Next], State0, Acc) -> + State = State0#{tlen => decstr2int(B)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Key = ",Key/binary>>|Next], State0, Acc) -> + State = State0#{key => hexstr2bin(Key)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Nonce = ",Nonce/binary>>|Next], State0, Acc) -> + State = State0#{nonce => hexstr2bin(Nonce)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Adata = ",Adata/binary>>|Next], State0, Acc) -> + State = State0#{adata => hexstr2bin(Adata)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, [<<"Payload = ",Payload/binary>>|Next], State0, Acc) -> + State = State0#{payload => hexstr2bin(Payload)}, + parse_rsp(Type, Next, State, Acc); +parse_rsp(Type, + [<<"CT = ", CT/binary>>|Next], + #{count := Count, + file := File, + alen := Alen, + plen := Plen, + nlen := Nlen, + tlen := Tlen, + key := Key, + nonce := IV, + adata := Adata, + payload := Payload + } = State, Acc) -> + AAD = <>, + PlainText = <>, + <> = hexstr2bin(CT), + TestCase = {Type, + Key, + PlainText, + IV, + AAD, + CipherText, + CipherTag, + Tlen, + {File,decstr2int(Count)}}, + parse_rsp(Type, Next, State, [TestCase|Acc]); +parse_rsp(Type, [_|Next], State, Acc) -> + parse_rsp(Type, Next, State, Acc). -parse_rsp(Type, [_|Next], Acc) -> - parse_rsp(Type, Next, Acc). -parse_rsp_cmac(Type, Key0, Msg0, Mlen0, Tlen, MAC0, Next, Acc) -> +parse_rsp_cmac(Type, Key0, Msg0, Mlen0, Tlen, MAC0, Next, State, Acc) -> Key = hexstr2bin(Key0), Mlen = binary_to_integer(Mlen0), <> = hexstr2bin(Msg0), @@ -2967,9 +3089,9 @@ parse_rsp_cmac(Type, Key0, Msg0, Mlen0, Tlen, MAC0, Next, Acc) -> case binary_to_integer(Tlen) of 0 -> - parse_rsp(Type, Next, [{Type, Key, Msg, MAC}|Acc]); + parse_rsp(Type, Next, State, [{Type, Key, Msg, MAC}|Acc]); I -> - parse_rsp(Type, Next, [{Type, Key, Msg, I, MAC}|Acc]) + parse_rsp(Type, Next, State, [{Type, Key, Msg, I, MAC}|Acc]) end. api_errors_ecdh(Config) when is_list(Config) -> diff --git a/lib/crypto/test/crypto_SUITE_data/VADT128.rsp b/lib/crypto/test/crypto_SUITE_data/VADT128.rsp new file mode 100644 index 0000000000..a4fe9130a0 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VADT128.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:24 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = d24a3d3dde8c84830280cb87abad0bb3 +Nonce = f1100035bb24a8d26004e0e24b + +Count = 0 +Adata = 00 +Payload = 7c86135ed9c2a515aaae0e9a208133897269220f30870006 +CT = 1faeb0ee2ca2cd52f0aa3966578344f24e69b742c4ab37ab1123301219c70599b7c373ad4b3ad67b + +Count = 1 +Adata = 00 +Payload = 48df73208cdc63d716752df7794807b1b2a80794a2433455 +CT = 2bf7d09079bc0b904c711a0b0e4a70ca8ea892d9566f03f8b77a140819f39ef045103e785e1df8c2 + +Count = 2 +Adata = 00 +Payload = b99de8168e8c13ea4aef66bdb93133dff5d57e9837ff6ccb +CT = dab54ba67bec7bad10eb5141ce3344a4c9d5ebd5c3d35b664b01098842a618390619b86e00850b2e + +Count = 3 +Adata = 00 +Payload = 09fc21ac4a1f43de29621cacf3ad84e055c6b220721af7ce +CT = 6ad4821cbf7f2b9973662b5084aff39b69c6276d8636c0638bd518724ab84fb814fe7b5570769f7f + +Count = 4 +Adata = 00 +Payload = cb43320d7488dfd6eed9efd88f440ea3f6f77a0df09d0727 +CT = a86b91bd81e8b791b4ddd824f84679d8caf7ef4004b1308a7229cbcecef221570cee8345b38cd6ec + +Count = 5 +Adata = 00 +Payload = a350ed58c04473e113b9088b1fb9dad92807f6b63b0d690c +CT = c0784ee835241ba649bd3f7768bbada2140763fbcf215ea1fee47fec27d7764e5e2819c850088bac + +Count = 6 +Adata = 00 +Payload = 0709e691faf41383fab5d1848a8eee77101d1c99e526a264 +CT = 642145210f947bc4a0b1e678fd8c990c2c1d89d4110a95c954d610bc1ab4bc9a8a28c7306f7c539e + +Count = 7 +Adata = 00 +Payload = e7b913c2f0630562eb1c16b3b1ed84090c011a15c09e5471 +CT = 8491b07205036d25b118214fc6eff37230018f5834b263dc2e31657ecc51f5ec8590482fc053230d + +Count = 8 +Adata = 00 +Payload = 6b909697074900d41ce8c7d559b229af11fb3cec334784d4 +CT = 08b83527f229689346ecf0292eb05ed42dfba9a1c76bb379d500827f2081b00397102f90fc9ccd88 + +Count = 9 +Adata = 00 +Payload = 495ff03335bcb39a317b9ea3f8bb6306fa771f3c55adebce +CT = 2a775383c0dcdbdd6b7fa95f8fb9147dc6778a71a181dc63e2e7997803029476598c0e8d4fc63857 + +[Alen = 1] + +Key = 08b0da255d2083808a1b4d367090bacc +Nonce = 777828b13679a9e2ca89568233 + +Count = 10 +Adata = dd +Payload = 1b156d7e2bf7c9a25ad91cff7b0b02161cb78ff9162286b0 +CT = e8b80af4960d5417c15726406e345c5c46831192b03432eed16b6282283e16602331bcca9d51ce76 + +Count = 11 +Adata = c5 +Payload = 032fee9dbffccc751e6a1ee6d07bb218b3a7ec6bf5740ead +CT = f0828917020651c085e42459c544ec52e99372005362baf308ebeed45f67ef8733737c9c6f82daad + +Count = 12 +Adata = 68 +Payload = 9c4cd65b92070bc382fd18146611defb4204acddfdf6b276 +CT = 6fe1b1d12ffd9676197322ab732e80b1183032b65be00628f9b477e3a23bfdfdb619c7bc531fbcce + +Count = 13 +Adata = be +Payload = 2ff93ef2fc5fe2c297ace05f3f7585aed75ef90ade3acf89 +CT = dc54597841a57f770c22dae02a4adbe48d6a6761782c7bd7aa82130f5a86c0cd0433585e5c208cf7 + +Count = 14 +Adata = 7a +Payload = 62766e9acd41285eeed9b4007340dbb611699624274ad117 +CT = 91db091070bbb5eb75578ebf667f85fc4b5d084f815c65499d60012a2f25463e036ceecea57b3c97 + +Count = 15 +Adata = 13 +Payload = ea689c268a04912d0527b16d9d9406df38302fb11cb64a99 +CT = 19c5fbac37fe0c989ea98bd288ab58956204b1dabaa0fec7e337897c90eb260729a729aed1c8a244 + +Count = 16 +Adata = e5 +Payload = f31e35953beb211efcce487ba8c0cd1a8446343d5851b9fd +CT = 00b3521f8611bcab674072c4bdff9350de72aa56fe470da373dc2911c75b37cd995481d42b04524a + +Count = 17 +Adata = e3 +Payload = c4ac3c645387584c2a95b1f16b8317730592924dd831a388 +CT = 37015beeee7dc5f9b11b8b4e7ebc49395fa60c267e2717d684f76ecf3dc5f3307ce982f185321248 + +Count = 18 +Adata = d5 +Payload = 81af394c2ea3a85e1ea954596e3772f01635d007794c0b19 +CT = 72025ec6935935eb85276ee67b082cba4c014e6cdf5abf472c38d0fe4e4eba054c1420c39a3dcc61 + +Count = 19 +Adata = ed +Payload = e013a2edd5b86bab8df5c9940d0a0c864478c1ad42668304 +CT = 13bec5676842f61e167bf32b183552cc1e4c5fc6e470375a7cfa6c9945f5aee3c799eee37b0605db + +[Alen = 2] + +Key = 1538cc03b60880bf3e7d388e29f27739 +Nonce = 9e734de325026b5d7128193973 + +Count = 20 +Adata = c93c +Payload = e7b819a853ffe79baaa72097ff0d04f02640ae62bcfd3da5 +CT = 1d8f42f9730424fa27240bd6277f4882604f440324b11b003ca01d874439b4e1f79a26d8c6dc433a + +Count = 21 +Adata = 4cf9 +Payload = dc6cf325ed6d968efba9f57e48a58f4578cc3540fe121ba2 +CT = 265ba874cd9655ef762ade3f90d7c3373ec3df21665e3d07b40653cd23afc7cc7a31fa13ba8f4e49 + +Count = 22 +Adata = b469 +Payload = 22ab6a0daf953165dda864cceeeb782e275c0b072aedd284 +CT = d89c315c8f6ef204502b4f8d3699345c6153e166b2a1f421c8c10aaf90b1116be216f912c82ca96a + +Count = 23 +Adata = cf6b +Payload = a35f62a431fee63468dc02fdf7bef78d3a5937de56151939 +CT = 596839f511052555e55f29bc2fccbbff7c56ddbfce593f9c2f568ef41324189fb3644edcd76dc19c + +Count = 24 +Adata = af7c +Payload = 548840cb0400824af809fb68447500b77e977128200d3b81 +CT = aebf1b9a24fb412b758ad0299c074cc538989b49b8411d242548c244a875d3681d715db3da19962f + +Count = 25 +Adata = 61dc +Payload = 440b6095c77495e73fff54c785b7ceb5eb358731c213ffcd +CT = be3c3bc4e78f5686b27c7f865dc582c7ad3a6d505a5fd968b599bc8927ad8d43067807f4b858f854 + +Count = 26 +Adata = b97e +Payload = 50c59ca54eb64575b82b13c6dac96488af369e9f5f86cdf2 +CT = aaf2c7f46e4d861435a8388702bb28fae93974fec7caeb577454774ee78f76e555cf743df340381e + +Count = 27 +Adata = 57ab +Payload = 21b8eb1f0bda26ca36167ce7bc2e796818bf11fc8c192885 +CT = db8fb04e2b21e5abbb9557a6645c351a5eb0fb9d14550e20e0a22a5ee031978271c7dd2a0d4e7018 + +Count = 28 +Adata = 5f9c +Payload = b4d84fb1e81e18c89391a7a59fc05fedaf160e0d0d027a7c +CT = 4eef14e0c8e5dba91e128ce447b2139fe919e46c954e5cd99a242ebae5c6da57ee38e5c227c46b32 + +Count = 29 +Adata = e0c4 +Payload = 54dc5a0e1b67577cda4e7dbd48b769c120c1d13dd567cfad +CT = aeeb015f3b9c941d57cd56fc90c525b366ce3b5c4d2be908a5f8a92f4201c4658289307167cee810 + +[Alen = 3] + +Key = f149e41d848f59276cfddd743bafa9a9 +Nonce = 14b756d66fc51134e203d1c6f9 + +Count = 30 +Adata = f5827e +Payload = 9759e6f21f5a588010f57e6d6eae178d8b20ab59cda66f42 +CT = f634bf00f1f9f1f93f41049d7f3797b05e805f0b14850f4e78e2a23411147a6187da6818506232ee + +Count = 31 +Adata = e9699b +Payload = 1555bc87d6c688fd221a2c75cd1e4dd1c1693207ac421d24 +CT = 7438e575386521840dae5685dc87cdec14c9c65575617d28f10835db9897b7528e3204fe3a81424f + +Count = 32 +Adata = 972896 +Payload = b72b2a080d92f3f3bb7d96222982de82a28c9eebaddba247 +CT = d64673fae3315a8a94c9ecd2381b5ebf772c6ab974f8c24b3efa05ba4a73ec2234461d459f54acd2 + +Count = 33 +Adata = 3053f3 +Payload = b5417ed6933ffe2b57ea601d77e97eb12fa1fb8fdc06c86f +CT = d42c27247d9c5752785e1aed6670fe8cfa010fdd0525a863b557537c6525e827750917a1ed49602f + +Count = 34 +Adata = 24db75 +Payload = 4e7f42666035a00e62783283c54b027603917685d27326bc +CT = 2f121b948e9609774dcc4873d4d2824bd63182d70b5046b0dfd06b037e9094f120eb3d8649d48918 + +Count = 35 +Adata = ff27a4 +Payload = 7bf180699c294421ad9565cacc27227a4b3a7cf9637290c6 +CT = 1a9cd99b728aed5882211f3addbea2479e9a88abba51f0cabfa8cfabbd79b3e3210482e6f3822fee + +Count = 36 +Adata = 77ec24 +Payload = 3d47071c13f994cb42fb2887e5c6e53a542be7ddad9779e0 +CT = 5c2a5eeefd5a3db26d4f5277f45f6507818b138f74b419ec3b9575e347051e98d0c8646ad46318e6 + +Count = 37 +Adata = 6d7748 +Payload = 317d5da0a2ec12c3b96c83dd61cc955242a9c1c640e2b92f +CT = 501004524c4fbbba96d8f92d7055156f9709359499c1d92378e7af65eb0388ae7a52f58f6ba32109 + +Count = 38 +Adata = 029674 +Payload = c9bb21306ee1b4a6c4fa5443af2e181716993cbb374e177c +CT = a8d678c280421ddfeb4e2eb3beb7982ac339c8e9ee6d77708019fa97ff70d4d21c0bd83caa434b3a + +Count = 39 +Adata = 60dfe8 +Payload = 44eb7edd6bee501ad97873aa7ecbf7ed8b613760d7c95e15 +CT = 2586272f854df963f6cc095a6f5277d05ec1c3320eea3e191814ed48a21d97ea02e86d7e6e8834cb + +[Alen = 4] + +Key = 9a57a22c7f26feff8ca6cceff214e4c2 +Nonce = 88f30fd2b04fb8ddbce8fc26e6 + +Count = 40 +Adata = a95bdff6 +Payload = 035c516776c706a7dd5f181fa6aa891b04dd423042ea0667 +CT = b92f7ec2ebecebdbd2977b3874e61bf496a382153b2529fc9b6443a35f329b2068916fb6ab8227eb + +Count = 41 +Adata = d2672cbb +Payload = 3ba306bcec94615c347f990b62841a16df7b321f113f1714 +CT = 81d0291971bf8c203bb7fa2cb0c888f94d05f23a68f0388f19e2aa492ce9ddfb6de0ab7a447f5351 + +Count = 42 +Adata = 737f4d00 +Payload = 68313a29ace3efe521c3ca1e5bac8e98d6b4434c80a7dc74 +CT = d242158c31c802992e0ba93989e01c7744ca8369f968f3ef2bf683b1209f104e82ba39f7c62cd666 + +Count = 43 +Adata = 3610b1ae +Payload = 963bfe556138317bebe3936b18a2c1dd100dc73be6fde556 +CT = 2c48d1f0fc13dc07e42bf04ccaee53328273071e9f32cacd4fc7d5cac043f182edbe5c2658f73092 + +Count = 44 +Adata = f1aa7f72 +Payload = 52d5c53ee4f23cb050a95db54112b44033c34ac31de96be8 +CT = e8a6ea9b79d9d1cc5f613e92935e26afa1bd8ae664264473b8234f3fbaca3dc2c497418219151b05 + +Count = 45 +Adata = 6b1013aa +Payload = a302aebc0f8fd61badc8371991beacf5933de46effacb8ce +CT = 1971811992a43b67a200543e43f23e1a0143244b866397558fa5f9539e0500f139016e4a4337d86b + +Count = 46 +Adata = 33028129 +Payload = f7d653c23254875625b20e1ef60ae92847046d84bb4ce857 +CT = 4da57c67af7f6a2a2a7a6d3924467bc7d57aada1c283c7ccfa2379fde155e64b5b84e336056445c3 + +Count = 47 +Adata = 2cab4a09 +Payload = 872a3f7230e626abff519e5aeecc93897249405daeaffc98 +CT = 3d5910d7adcdcbd7f099fd7d3c800166e0378078d760d30358208335cb81e4fb10923fca4ddb9ff9 + +Count = 48 +Adata = 73142ba7 +Payload = 766f94e7d9b1ce74bbaf2c99d215350f060122767fc1953f +CT = cc1cbb42449a2308b4674fbe0059a7e0947fe253060ebaa42d6ecfb49ac8983415503efef1e21950 + +Count = 49 +Adata = bc9f967e +Payload = 5f089ed9267363bc23c6c7b8f73208a36f61fa8ea8084ff7 +CT = e57bb17cbb588ec02c0ea49f257e9a4cfd1f3aabd1c7606c1978a62d15430fc20b87940292b49641 + +[Alen = 5] + +Key = 54caf96ef6d448734700aadab50faf7a +Nonce = a3803e752ae849c910d8da36af + +Count = 50 +Adata = 5f476348dd +Payload = c69f7c5a50f3e72123371bbfd6bdf532b99ef78500508dfe +CT = 20c43ad83610880249f1632dd418ec9a5ed333b50e996d1a4e5a32fbe7961b832b722bc07a18595b + +Count = 51 +Adata = 07db8aada5 +Payload = 9cf8b638f2b295b85cf782fabab11153dc091b4afcd761a9 +CT = 7aa3f0ba9451fa9b3631fa68b81408fb3b44df7af21e814d401a2222443696021b5faa520129b563 + +Count = 52 +Adata = 31ef6561ff +Payload = 62b8263dc015ef873cd16272e4da89799b910f2b04204420 +CT = 84e360bfa6f680a456171ae0e67f90d17cdccb1b0ae9a4c4f842681d2e90da5718234ed893197662 + +Count = 53 +Adata = e97dfcbafb +Payload = 810bed3a2bc0f9d75389155b7a39d9d014c08646814f9718 +CT = 6750abb84d2396f4394f6dc9789cc078f38d42768f8677fc33a08eb30ee154f71279682ab02eff27 + +Count = 54 +Adata = 4981c51fcc +Payload = 063d23fc3ec344c1ba3486802e01e55617455d5cfbfb5279 +CT = e066657e58202be2d0f2fe122ca4fcfef008996cf532b29d8d3071c79f0cf86fe4148cb5e8ace0ce + +Count = 55 +Adata = c8437dba76 +Payload = 41db5b245ea0fab985b93e7fc0a00cd3cca5bdbb642b7ebf +CT = a7801da63843959aef7f46edc205157b2be8798b6ae29e5b842700619dc1599603f3f3f6cfdf5e0b + +Count = 56 +Adata = 6f65a24344 +Payload = b0e36734b2ba871d59df0b029c7f32af68e003a689ac4911 +CT = 56b821b6d459e83e331973909eda2b078fadc7968765a9f539a0cd8d8bbf211b907f34411f868c79 + +Count = 57 +Adata = cd62d6d203 +Payload = 747e53e627eabde0cd77d78d1bd720bea518f8a2f76e57a2 +CT = 922515644109d2c3a7b1af1f1972391642553c92f9a7b746c4a90e5fc11266bab77eea1d24fbdbb9 + +Count = 58 +Adata = 9663b3c8e6 +Payload = c70c92ec4c518802662fa4c41a6a33a22599f79f8f7264b3 +CT = 2157d46e2ab2e7210ce9dc5618cf2a0ac2d433af81bb8457b3c1246f7dd6462ce757db82db45f36e + +Count = 59 +Adata = 35c4720d3c +Payload = a26835605b66fc08abdbb5dc77e39783d60b8e8f2314e95f +CT = 443373e23d85932bc11dcd4e75468e2b31464abf2ddd09bbd472c06a5f4c04f97d06ec401d3e7fd9 + +[Alen = 6] + +Key = cc0c084d7de011e2f031616a302e7a31 +Nonce = f0b4522847f6f8336fe534a4e7 + +Count = 60 +Adata = da853a27aee2 +Payload = 15b369889699b6de1fa3ee73e5fe19814e46f129074c965b +CT = f39755d160a64611368a8eccf6fcbc45ef7f1f56240eb19a2e3ca4ec3c776ab58843f617d605fd72 + +Count = 61 +Adata = d4ed4584678e +Payload = a18c0460b56a5bcd5bf6842cec6ed44d90b2bfa968a6a7e7 +CT = 47a838394355ab0272dfe493ff6c7189318b51d64be48026327804c44c8f17a4446a3d5ba85f9c7f + +Count = 62 +Adata = 590a27721a36 +Payload = 41cee0ecaf9c65cef740440af37954ef49a585779d2abbca +CT = a7eadcb559a39501de6924b5e07bf12be89c6b08be689c0bbcd00e9cb726d75e4283820ee81d933a + +Count = 63 +Adata = 58830fb0b1f3 +Payload = dce983e4e3734a9bd8848dba0d744d07bbeba602f4006025 +CT = 3acdbfbd154cba54f1aded051e76e8c31ad2487dd74247e4d5d71a1f0f1b6518c35f0632a30931fd + +Count = 64 +Adata = eedd0d767a25 +Payload = 4653b3e879ab18b65c5c3706a5139698262cb830a22d943b +CT = a0778fb18f94e879757557b9b611335c8715564f816fb3fa3ad112899e9ba442660eb5dfe33b2f96 + +Count = 65 +Adata = 618bcf2e3e79 +Payload = 8586383281925363ac15fb19c26d64c639c75920c792dc2c +CT = 63a2046b77ada3ac853c9ba6d16fc10298feb75fe4d0fbed54fba446028919342b2fe86ee67efcc7 + +Count = 66 +Adata = 549c9b84c7f7 +Payload = 95c25ae4445cd8c4d267df82687484667e309992fcf1e737 +CT = 73e666bdb263280bfb4ebf3d7b7621a2df0977eddfb3c0f69fc23013142f62881ccfa3037067e1ef + +Count = 67 +Adata = 92d7fa6a8135 +Payload = e58034bbb0e6f5e724e32ee56896dadae25c2a3efb8c6f2f +CT = 03a408e246d905280dca4e5a7b947f1e4365c441d8ce48ee8263568d56fae8bf35b2f2cdecbffe0a + +Count = 68 +Adata = f43e126c0f83 +Payload = d98f0dddfe9cb3cae1336970d5efb55316a65e2c51e316f4 +CT = 3fab318408a34305c81a09cfc6ed1097b79fb05372a13135de2c2fbfdddc7dd6672714af174c5121 + +Count = 69 +Adata = f02074812dde +Payload = 548747b1669c6383b793054d93957f9e99d605761c6c23b5 +CT = b2a37be890a3934c9eba65f28097da5a38efeb093f2e04743704560ff23ce0000fba8812c45940ad + +[Alen = 7] + +Key = d7572ed0e37261efa02f8c83e695efdc +Nonce = f4f96d7b4384a3930b3d830f82 + +Count = 70 +Adata = 922340ec94861f +Payload = 1edef80c57d17f969f8bde10ab38a1a8811a124de72c526e +CT = de14558cc686e1836f1f121ea1b941a9ebd4f0fb916dc870fd541b988a801cb5751c7faaf5b0c164 + +Count = 71 +Adata = 4eb379f21b1531 +Payload = ddd5282a207c1dcb03c1c3bbc9eb12a7bd28534118db2735 +CT = 1d1f85aab12b83def3550fb5c36af2a6d7e6b1f76e9abd2bc068bd1b1c309dfbd52d9a24be07c630 + +Count = 72 +Adata = 7fa89e9d6e3fec +Payload = c5b7c462eb166f48bb59c8102ee7b3dc67a28e5de7570c51 +CT = 057d69e27a41f15d4bcd041e246653dd0d6c6ceb9116964f2d114d6ab082738d05d60acca8e8ccfb + +Count = 73 +Adata = fda8665f87c618 +Payload = af793815e147e3180f5146aa6a582e343dc479f26b4226b2 +CT = 6fb3959570107d0dffc58aa460d9ce35570a9b441d03bcac1cc84bd77fe00e1a13433f2c10e3b799 + +Count = 74 +Adata = 46bde207491ebd +Payload = 47c76a0bbd5b1616b278089d41a050c509c7a1c280574bf7 +CT = 870dc78b2c0c880342ecc4934b21b0c463094374f616d1e9990c81f1bae32c953bf02ddbde047632 + +Count = 75 +Adata = a799f5f895fd7a +Payload = d554806ffc3900a0952a3c094c745808950697a6e5d62c1d +CT = 159e2def6d6e9eb565bef00746f5b809ffc875109397b6031af19f1f080dd1dd2da799059755e49f + +Count = 76 +Adata = 20225831a9ee06 +Payload = ba45e1859efae362a44a0116a14e488ba369da6c76c3913b +CT = 7a8f4c050fad7d7754decd18abcfa88ac9a738da00820b2523d3b9a0060834ac4860dae0eac570ef + +Count = 77 +Adata = 785360916464eb +Payload = 57bc338946ff78cf76adf5021e2e44e34e687fb68ad703f3 +CT = 97769e09d7a8e6da8639390c14afa4e224a69d00fc9699edff96e7cf841a66c50bbb6fb2bac7ef51 + +Count = 78 +Adata = 57b946369226db +Payload = 9ac5be9929c4fe5a9992749a38dc69874866db3d4747da97 +CT = 5a0f1319b893604f6906b894325d898622a8398b3106408986e1c33a45f9d52755c374650635bef6 + +Count = 79 +Adata = 73e4da8973c1e3 +Payload = 5a05410aa3a71f5f1a253b8576eba269c06a4c30591144cc +CT = 9acfec8a32f0814aeab1f78b7c6a4268aaa4ae862f50ded2d78592c2d89c15edc5bb7486aa93f896 + +[Alen = 8] + +Key = 98a42d7a0c5917deaf3b4de3f0cbe0a1 +Nonce = 03d33ab0c2df7bfce88b5ee4c4 + +Count = 80 +Adata = 2d5438b728b950d9 +Payload = 9aa9c8358117564371366beeec923051ef433252197aaad5 +CT = 9ff942baa60f440c17a78e9581216b9a947a67f04d54911feecfff971fdfaa856310b014aa59c978 + +Count = 81 +Adata = 6e430b497a16e7f5 +Payload = 5758a500978c71a9b90f6e5beae9d96ef05a41486b10ea2e +CT = 52082f8fb09463e6df9e8b20875a82a58b6314ea3f3ed1e46a4d7b4b4df6c831ee32116ee4dad98c + +Count = 82 +Adata = e12f98507d6514c3 +Payload = 49efe18c76a8355127d914a3a830c1c6ff2a163d728526e1 +CT = 4cbf6b0351b0271e4148f1d8c5839a0d8413439f26ab1d2b3243fc75cd1624e152f451678edcac87 + +Count = 83 +Adata = eecf8d641ee0bee9 +Payload = 49ae2309fbe6ce4e9421516b8f79ae64b1316cb849eaf638 +CT = 4cfea986dcfedc01f2b0b410e2caf5afca08391a1dc4cdf2dd6d8ca57da1880e1baff43736b3da34 + +Count = 84 +Adata = 9066367c784de0a4 +Payload = b1bda5fa4242aa6aad0f5a5b1d31d86b8d4a97588b3e315d +CT = b4ed2f75655ab825cb9ebf20708283a0f673c2fadf100a97f05439a661001513a96b896de46b7081 + +Count = 85 +Adata = edf848b2510f7803 +Payload = eaa8608f6763d968576a7e89056b9828a1686c8441b06377 +CT = eff8ea00407bcb2731fb9bf268d8c3e3da513926159e58bdcf20709b2dc2ff9946094190b5ea09d1 + +Count = 86 +Adata = 0f49cae81c8628d2 +Payload = f32029cf51609f0df9832ad1b283ea94a5356f70112c1328 +CT = f670a34076788d429f12cfaadf30b15fde0c3ad2450228e2a5bb6b4f87b9b198665203e4fdf9e7f7 + +Count = 87 +Adata = b0c47e9cce46a276 +Payload = 7a550ef9254a8da6e4fee290a76ea838ffb61d3533d4d31f +CT = 7f05847602529fe9826f07ebcaddf3f3848f489767fae8d529f416f89f1a34bbbf2ce40d943c6d8b + +Count = 88 +Adata = a6fe7c9ce2d49f85 +Payload = e67c486dd7ba9a9061844b9354f55890321ae626efaa28cc +CT = e32cc2e2f0a288df0715aee83946035b4923b384bb8413067eb95550b91b955d5c2d72d5c189b704 + +Count = 89 +Adata = eb1d11cc4876f58f +Payload = 35f2c810091e930a52e4a3f28c9c8184967f1554c2675eb5 +CT = 30a2429f2e06814534754689e12fda4fed4640f69649657f0e8e8a5a7e0ea6860bab4a4320f03ae5 + +[Alen = 9] + +Key = 2a68e3fe746f593c1b97cb637079c3e5 +Nonce = cd62d0f27b7f4864dc7c343acd + +Count = 90 +Adata = abe4f1d3812bfe3ccf +Payload = 13b4a874888db0e5d8fd814b5e7e04f7fdfbc1601ccc02bc +CT = 032835a3dbf688d09cf2a32a92b101959d33ff47500f92f4fd49840440f866d1a22b0854996111d8 + +Count = 91 +Adata = 2e21f466814d3d6340 +Payload = 08b5c773364cded74d7b308984313c17ff90eed496a27a2b +CT = 18295aa46537e6e2097412e848fe39759f58d0f3da61ea63de2f5c335df537fbbc6ae59cd562732f + +Count = 92 +Adata = dba22aabcea0e694fc +Payload = bbac1790abb7aafe272ec472c897e6363e335b3c4126c762 +CT = ab308a47f8cc92cb6321e6130458e3545efb651b0de5572acc5ed6e4a907ff4742ab6c835a427f92 + +Count = 93 +Adata = 97e9d16bd757395ec1 +Payload = 7249612dc09809bbca9dd311e720f7da2cb54ce33e3eb9c3 +CT = 62d5fcfa93e3318e8e92f1702beff2b84c7d72c472fd298b1714b5a3df454f3bc35869da75adc882 + +Count = 94 +Adata = 866cf710470cac74d3 +Payload = 060ae0ab9857324a3b2ac79f3b6e6f90f5de884ce9c7b930 +CT = 16967d7ccb2c0a7f7f25e5fef7a16af29516b66ba5042978aa33dffe2596832f98a9c8413bd898b9 + +Count = 95 +Adata = 2dd7a7f832b29ccce2 +Payload = f77a9fd5363836deefd34e1bea0882484a7ab746b4495d59 +CT = e7e6020265430eebabdc6c7a26c7872a2ab28961f88acd11dd5049f7c53d6a7fe5d7f959689ee960 + +Count = 96 +Adata = 502349a60e897356b5 +Payload = 96118dbfe53434d8aed88769a535eb0c8b5849dca1c81c34 +CT = 868d1068b64f0cedead7a50869faee6eeb9077fbed0b8c7ced9c3a0d0de8788471c5f6c2f9638b7c + +Count = 97 +Adata = debed45c9acf129268 +Payload = df5a47d3eb5c0b6cabb6711a45400602d205b82ecae9e849 +CT = cfc6da04b8273359efb9537b898f0360b2cd8609862a7801d49b4b9bead1b7de2021cff280d6f93b + +Count = 98 +Adata = 2726702dd62a6e5344 +Payload = 5a7649cb001fbb6f653cbca17756c5c1a078c2e240d92085 +CT = 4aead41c5364835a21339ec0bb99c0a3c0b0fcc50c1ab0cd69df31aba209d87ee22bd6a1dcadb168 + +Count = 99 +Adata = e8006cfb0536696ac7 +Payload = 95186d41f927cdbef42157f21d966e88061b6558b5ec932f +CT = 8584f096aa5cf58bb02e7593d1596bea66d35b7ff92f03677cc5b60c881fe834a789d28447d8fb54 + +[Alen = 10] + +Key = 46b067cf9b1a28cf187002e90b14e130 +Nonce = bad8c03292bf01cfd8d34f860c + +Count = 100 +Adata = 8d65880eddb9fd96d276 +Payload = cc0915194218d4536e467433cd6d79ff1d9eb9ff160ab684 +CT = bd56edc015692c6ab9bec493a9893863598414a3d11a6a0f27ecdcb257d0d30491e5bf1aa8f90958 + +Count = 101 +Adata = 8a65cde13149d9d54a5b +Payload = 28257133b1d8b0b2be4faecd6e819ac783707a5c5f50c302 +CT = 597a89eae6a9488b69b71e6d0a65db5bc76ad70098401f89b10f9fc201e4128696dcd899dd2e24ea + +Count = 102 +Adata = e999ec3e1bfb25b5877c +Payload = 96ab0cfc204bafc4f5851d6c682d631d0c5ad03ac925a943 +CT = e7f4f425773a57fd227dadcc0cc9228148407d660e3575c8c522e5ba5adbc6a639cbd06f103ebc9e + +Count = 103 +Adata = a8554441e073d6065dce +Payload = 50925853a84a33ff392154e4e737efc18dcfc98f4d5235a9 +CT = 21cda08aff3bcbc6eed9e44483d3ae5dc9d564d38a42e922e1a4e0f7ebc3cff3915d27971cce7e91 + +Count = 104 +Adata = 838f0be8d04d28d77549 +Payload = d0700658d5f4010ff21091f3d119c99645e339198029c3a9 +CT = a12ffe818285f93625e82153b5fd880a01f9944547391f22c215c88d80bffc881aff10ba40f11976 + +Count = 105 +Adata = 20f014d928d5b25fbaf4 +Payload = 4bdf28748a0c281dd49c7294ae8e55fe7a52d45ff6384db3 +CT = 3a80d0addd7dd0240364c234ca6a14623e487903312891382cc9391bc06aa6ca9d486a4e2a218c54 + +Count = 106 +Adata = 56c026b8a71974ff7ecd +Payload = f75db057f0276fff85014f54ecdec8f90b96a2a982db14cb +CT = 8602488ea75697c652f9fff4883a89654f8c0ff545cbc840778b05c6c582a0bb7d1d9dcf6a46b9f6 + +Count = 107 +Adata = 75c3b9e52648a4f9aca9 +Payload = c15c554169dbb9b08494afaa44819a10dc9ddad54199ab54 +CT = b003ad983eaa4189536c1f0a2065db8c98877789868977dff47d9ebbd3cff14623b10cecc94b53d6 + +Count = 108 +Adata = 1c76c3014a14b7fa1ca8 +Payload = 19eef6f798fc68086aad1cda6d7976cdcfe6b8af74598032 +CT = 68b10e2ecf8d9031bd55ac7a099d37518bfc15f3b3495cb9d2b74b84dc170c00dce85b56e346a976 + +Count = 109 +Adata = a4eb60d4eb7ead1bd0e6 +Payload = e06e5dba5ac35cfd07949e5cc12ad70507d4a86a952ecca3 +CT = 9131a5630db2a4c4d06c2efca5ce969943ce0536523e1028d92e19fd8b5c1fcbff36adaa5e47ae84 + +[Alen = 11] + +Key = e94dac9c90984790a7c0c867536615ff +Nonce = c19f06f91e645d4199365f18c0 + +Count = 110 +Adata = 537038b5357e358a930bd6 +Payload = 4d64461c55eb16bf7b9120f22be349598f2f394da8460dc6 +CT = e9fc5004c2359724e1e4411ae6f834ef6bea046d549753c88790c1648f461a31c84e62ea8592a074 + +Count = 111 +Adata = 7e3d7b3eada988668f3784 +Payload = eab7d5dbd91d4cbbac8d79fadd70b5dcb3baadac5cb713a3 +CT = 4e2fc3c34ec3cd2036f81812106bc86a577f908ca0664dadacb1d1c9231d2c22ecfeed622792dfd0 + +Count = 112 +Adata = 78b107b29c4878ff18f749 +Payload = 3c6ae2e2578875a1f5611582528e058aece2ddc33a4dde3d +CT = 98f2f4fac056f43a6f14746a9f95783c0827e0e3c69c8033fffe60299768f048e7098033cde046b0 + +Count = 113 +Adata = d293908bb516c5f3a411b9 +Payload = d7a46e726ed43f1580eb52141a93390982cc809dc833e3f0 +CT = 733c786af90abe8e1a9e33fcd78844bf6609bdbd34e2bdfe4ee6ebc0d90a0de05b428495c93e1801 + +Count = 114 +Adata = 33ef208faad4d2948c9e67 +Payload = b1fe5d9d34157193fc0608cd8ecb872e17720f5f6814a466 +CT = 15664b85a3cbf0086673692543d0fa98f3b7327f94c5fa687e7e64cc0fcd6a92c79ceb6ce2abd8ee + +Count = 115 +Adata = b7f7ed9ccac3c2b4fbfee0 +Payload = de6bb539fb7a9c87414f62a7cf25a4cfca176509e991af41 +CT = 7af3a3216ca41d1cdb3a034f023ed9792ed258291540f14fb02b53bc779e0976b634b0d1b88fc0a9 + +Count = 116 +Adata = a6e287383927f76e4927af +Payload = 8719d20c20c8959068b8adcd65e6f6bc7b3693828f0735a0 +CT = 2381c414b716140bf2cdcc25a8fd8b0a9ff3aea273d66bae3c37fa936243b393f07fcccb0fc13e41 + +Count = 117 +Adata = 70828be6dd93954f4e7b6b +Payload = 30b39426831f61c8ba5f2ef5b71f0c4b2f916e3b5a578110 +CT = 942b823e14c1e053202a4f1d7a0471fdcb54531ba686df1e0d7534a489e6d242966ebea4455f8f79 + +Count = 118 +Adata = 506015fc2831df293f4da0 +Payload = 818d5d810f678629f078723f5c6c3657271077533bfb7c29 +CT = 25154b9998b907b26a0d13d791774be1c3d54a73c72a2227ccbf64f04e95b180d09e843847d22104 + +Count = 119 +Adata = e9394b0245b379e68e3dea +Payload = f0613205a7a0822849df9e8a3cf6caf281f3adfa966c5507 +CT = 54f9241d307e03b3d3aaff62f1edb744653690da6abd0b0927b546ef8cd717073832584fb25a0645 + +[Alen = 12] + +Key = f6bb5d59b0fa9de0828b115303bf94aa +Nonce = 05358f33e1fc6a53ab5a5c98ce + +Count = 120 +Adata = 040b25771239cc2a39446e3c +Payload = 011fc50329bfd63a85ebd4f7693363602f1a4147371270b7 +CT = 4432d7eb42980734d34f19c50cf8abf71ac1b19ed75a727854e5d050a405f755047d09cb0f49546a + +Count = 121 +Adata = 50a1d37fa2f3462bd304631b +Payload = c90e40540d372ab1eb00ea5d5b8de5bf7c94ce4e376d6949 +CT = 8c2352bc6610fbbfbda4276f3e462d28494f3e97d7256b862abee8547ee3f24cfa677468ecc1d121 + +Count = 122 +Adata = ac3bb872a41df35e415d2b0c +Payload = 9e7be78c0ab9e6a4c6c257e77c63681bea35d951f168b0c5 +CT = db56f564619e37aa90669ad519a8a08cdfee29881120b20a61cef865ce4080e7c7abfc43f62c03a3 + +Count = 123 +Adata = e3106ae6456153dd922640a1 +Payload = 00df0c5a5d3eceb2bd293066529799544f846672a9a1d31b +CT = 45f21eb236191fbceb8dfd54375c51c37a5f96ab49e9d1d4e1d19c321a1e0852adba939b447220ab + +Count = 124 +Adata = 297b4498bf5427e6341aa927 +Payload = 14967a0476dbaea03b07fa8d40d344eabaf479be2443243a +CT = 51bb68ec1dfc7fae6da337bf25188c7d8f2f8967c40b26f579ea5fb65018abdcde1a39f6859ecb56 + +Count = 125 +Adata = 5de60dc0e3b5bda0b33a9520 +Payload = 2da3716d76d10b6766a1f9cbf9f420316fd5f396e7b9a2ba +CT = 688e63851df6da69300534f99c3fe8a65a0e034f07f1a075c2629ff871ee15745fd8c1ddbdae4c29 + +Count = 126 +Adata = 1c9b8541943ad50b4243c179 +Payload = 8c1b3ba18d1f5cff74a457aadd6b3e7d093d06ad2622e6a0 +CT = c9362949e6388df122009a98b8a0f6ea3ce6f674c66ae46f04e198ad16ad1106d3ba6172f4a13a8f + +Count = 127 +Adata = 51e926d2542ac8faef61465a +Payload = 88936e97db070c0ec2aa58d1c6f5b34df3d32ddf7db34a8b +CT = cdbe7c7fb020dd00940e95e3a33e7bdac608dd069dfb484475981131e3934ec6d41e00d502729799 + +Count = 128 +Adata = ebefbac97b363e6f32526aac +Payload = c20742e4b410c5b661da373a905fb0ed55b20e0e879eff5c +CT = 872a500cdf3714b8377efa08f594787a6069fed767d6fd93e2c005b5bebe07ff578b1b4bc51971cd + +Count = 129 +Adata = 1ef059ac7d648e9e32d9b1f2 +Payload = 65c55ca21a89a8325365bf2be861d700559de2eabb41b37f +CT = 20e84e4a71ae793c05c172198daa1f97604612335b09b1b021a25f15b5b4229a872a9199972c85b3 + +[Alen = 13] + +Key = d1da2e961e78063af8de41865b226873 +Nonce = 03739f5474857006340cce554d + +Count = 130 +Adata = e3afd091d2b588465872a6300f +Payload = 8e5fa1a6662a8378cda15697e926841594f2f394fa5a34ab +CT = ca0d95e3ff186ad6b88d45fc4079e6b7b4a615e7e8dd5f4742d522cc9dc19c47a4fa0b1528069cf8 + +Count = 131 +Adata = ce3186bb737753b59ee76b748c +Payload = 311ebc5ff2f625944562ea699b2690df3e6e64a17c62bd3a +CT = 754c881a6bc4cc3a304ef9023279f27d1e3a82d26ee5d6d659b26510b8f25610799e011d7c850ecd + +Count = 132 +Adata = bfd636989dfbcb0edc9f014cc8 +Payload = c96cee5ba7b799f16254a17b1870cdb85fe0ef3f42110c13 +CT = 8d3eda1e3e85705f1778b210b12faf1a7fb4094c509667ff52942aa0d39649f3d9ed535bebc2b603 + +Count = 133 +Adata = 4812b092aa59d57451bfd812c3 +Payload = 13b1b4404dc5735655139414fcbd02c5327ae9fb148bd324 +CT = 57e38005d4f79af8203f877f55e26067122e0f88060cb8c8c1e61efb9c1d84ddac2d24f43531f569 + +Count = 134 +Adata = f6ef9ac4f4c9ce1e4309c64fa8 +Payload = 6c5b59319e2710f5d63407f85b424d1860425ef8ce0cfe53 +CT = 28096d740715f95ba3181493f21d2fba4016b88bdc8b95bf13350de0ef34df12fb945b0ae0a0d9bd + +Count = 135 +Adata = 9bf12168bb3d79ebd25262f2b4 +Payload = 968e1d78008da78611e82985c4028e86770858cfe61c3723 +CT = d2dc293d99bf4e2864c43aee6d5dec24575cbebcf49b5ccfa0734563638598d8c4bf1fcd94009925 + +Count = 136 +Adata = 7d870d7e52d3053c65eefad477 +Payload = 6a1306d911434cc7400d2f9a95e36aedceddca2b3d583f51 +CT = 2e41329c8871a56935213cf13cbc084fee892c582fdf54bda1f5fc53b08aca82bccfba6fbcb27e69 + +Count = 137 +Adata = e95099f04371e445e5eaa1d80e +Payload = b9197eb50c8168d16b8a12bd261d553ffcc521d979b26fee +CT = fd4b4af095b3817f1ea601d68f42379ddc91c7aa6b3504027d1a922953facbd630d7fea6b63594ec + +Count = 138 +Adata = 3e80eb03db6545204ef4241ad6 +Payload = 95f59e36eac8eb3b51709d635b07fa2da0976ea20e25807f +CT = d1a7aa7373fa0295245c8e08f258988f80c388d11ca2eb9383fa000d10078256b71249d9d1f1846c + +Count = 139 +Adata = 9748798c0f3cc766795c8ce0e4 +Payload = a48db9add9ecdeb49e51d3ab7bb2075202ed2aa50c0195b1 +CT = e0df8de840de371aeb7dc0c0d2ed65f022b9ccd61e86fe5d2773c2f55b752477c489facee812c614 + +[Alen = 14] + +Key = 1eee667267ef10b03624cf9c341e3f75 +Nonce = 0630a3eae27e505c61c56e6560 + +Count = 140 +Adata = d24651ef0561282d3e20e834960c +Payload = 798e31cce0a83702a95171fb1162a17b9ce00ec3592ce262 +CT = f3c3e52f1a1ff528a8d3783ee4e75f114e3e6416334815d2d9236d5c5c9319092078411b72c51ba8 + +Count = 141 +Adata = c527d309ab29ee91c5fc53117e71 +Payload = d79cd4c8891ec4ce2c51136712d23b32266b2b73768aeb1e +CT = 5dd1002b73a906e42dd31aa2e757c558f4b541a61cee1caed8ad2a48cb734e3f93e602c15c7c775e + +Count = 142 +Adata = a93dfc3944514ddfc5acdd89fab7 +Payload = d7fa81c949f1f2af29dbd56529b307e3b348e996d0936455 +CT = 5db7552ab34630852859dca0dc36f98961968343baf793e5f34b297f3f106a9cdae255f7634fbd0f + +Count = 143 +Adata = e502abe21c7b22120693a08ef3e6 +Payload = 6330caaeddf0473d564d175b9408c6f12e6d3cd4ee2c423f +CT = e97d1e4d2747851757cf1e9e618d389bfcb356018448b58f4f5d9c3dbfe3e2fe03a002e55039ebe6 + +Count = 144 +Adata = a49b34dfad43333fb2ffd701a2d6 +Payload = 45671482c390e65f75de15ca91b93596e9bf3d6fc9178bcb +CT = cf2ac06139272475745c1c0f643ccbfc3b6157baa3737c7b6f7bb0749c99d75740f2d193fef36c60 + +Count = 145 +Adata = 9e4d8aa3dbdc4d4b4b8d72734f52 +Payload = c8f34bea8bdc403a48d8ed9268429141cd03c29558050ef4 +CT = 42be9f09716b8210495ae4579dc76f2b1fdda8403261f944ceec82fc674da9efa6926e8641729ed8 + +Count = 146 +Adata = 052327ad59cc791259817fd0ed96 +Payload = d8d1c57b16c23894b66023c29f8648ce4a6074647e1f5f69 +CT = 529c1198ec75fabeb7e22a076a03b6a498be1eb1147ba8d92ff19e93f60c8f3a511300fddc38ee59 + +Count = 147 +Adata = 14bc3c44c001ccb261a2a0526523 +Payload = 71c14a7031033db15bfe23b75fed9daf8886dd11392a0b78 +CT = fb8c9e93cbb4ff9b5a7c2a72aa6863c55a58b7c4534efcc87fa00fb244eda0d77cf6c05c8fd590af + +Count = 148 +Adata = 3477384c396a9e9efb3e169722cb +Payload = afa795f836763a1210bb36fef167864f73ba3b6abc593537 +CT = 25ea411bccc1f83811393f3b04e27825a16451bfd63dc287bae19612657c87d3bb73cfb8cee7c8a8 + +Count = 149 +Adata = 0c3b9a6924ad506038cb2d6590c9 +Payload = ca4a186f116a179579e3d327aec3f5be358bc7094f853bc3 +CT = 4007cc8cebddd5bf7861dae25b460bd4e755addc25e1cc733d9713d2e916c23ac3039de34c295fc4 + +[Alen = 15] + +Key = dbbd26f5d9e970e4e384b2273961be5a +Nonce = 0b1eabe504ef4822542e397fec + +Count = 150 +Adata = 477937301c83ba02d50760b603e0ea +Payload = 553714e17a208a2eceb847a4a2d95088388b1ac8d8ca43e0 +CT = 1c80213268bad5402c4dc9b5d836ab7499810d0d8a974716df9a0e986ab2890736423bb3772cec3e + +Count = 151 +Adata = c91eb5a07ff19c044023e5cf339203 +Payload = c94d0b9e728413c58202cb3f6b82dba7aa9e3ca0a72c40c7 +CT = 80fa3e4d601e4cab60f7452e116d205b0b942b65f571443139f907a92cb01215e3cda84ae13af48b + +Count = 152 +Adata = 38c71a8e9b279c605c7f0418a0afc1 +Payload = b4e8c4fd5ad98a1be8b5a11677c57ca1c1694e3528092aa9 +CT = fd5ff12e4843d5750a402f070d2a875d606359f07a542e5f3dbd8dbf7485106cdf9ea0e7088a5650 + +Count = 153 +Adata = f2c76ef617fa2bfc8a4d6bcbb15fe8 +Payload = 578ce26cdb5ba2e8798e23588e5cd04ef782820b80e49a42 +CT = 1e3bd7bfc9c1fd869b7bad49f4b32bb2568895ced2b99eb4853fde6f4dca88ff11bbce20ed9e5012 + +Count = 154 +Adata = 36004342dd74e7966692a848b2c11e +Payload = 78733c635d4d4e8b0729732f1e174dfcec4e020a7ac3870d +CT = 31c409b04fd711e5e5dcfd3e64f8b6004d4415cf289e83fbd94e979108fcecbd32f6bdf72f0ccb4d + +Count = 155 +Adata = db92bc3fe5d4141aeb39baea6f114c +Payload = c7aafe7760945e45703c1e19f1032dfd56ddc216c3b03826 +CT = 8e1dcba4720e012b92c990088becd601f7d7d5d391ed3cd0229c8f9d4e39fc16cbdb44236ef125c7 + +Count = 156 +Adata = 34ec2d5b6f0d950509b47a0637d74c +Payload = 2345e36a63be0b78df95e60907c78da0e48e61e70685a1f3 +CT = 6af2d6b9712454163d6068187d28765c4584762254d8a5051c9ab7cb0a779c3fa78c9ee12603802b + +Count = 157 +Adata = 6ab658d177c2dd87c9b8787cd70182 +Payload = b0725f735543eb0c0ec88ae69b140f5787d28ef4a2e36d57 +CT = f9c56aa047d9b462ec3d04f7e1fbf4ab26d89931f0be69a1648c6307ec5ea304045a7cdc93f36b9d + +Count = 158 +Adata = 483f135c61250fa610b4d14b99ecf0 +Payload = 315a947bf5291278d446d332ee5ca0def7655d5c957a8fb4 +CT = 78eda1a8e7b34d1636b35d2394b35b22566f4a99c7278b42364ff3b1ad915347b1c7f062b10d3da4 + +Count = 159 +Adata = bb022aed60819ef84ae83ce27db9d0 +Payload = f78d00755bcb45e6822121fe7cb03c8e627c9f548ccd7e7c +CT = be3a35a649511a8860d4afef065fc772c3768891de907a8a7569808dab58d42181543b2e2d05992c + +[Alen = 16] + +Key = 10a7720f2e18f739c26924925af6b670 +Nonce = 8c4e7813ab9bce9dafee01c628 + +Count = 160 +Adata = a209941fab710fda38d11c68b13d930f +Payload = e59782a9aea45f467b90e51a0fdf166baba05663def2d8b6 +CT = e357b1ccdaca6f3506dc45279c2e4c59f5307a5fd6a99cd72341ea8c0785569973f90ee9ee645acc + +Count = 161 +Adata = 2e2f6f9755a492ee54df77b2ecab9808 +Payload = 042a072f6ebf11f79fcb4f5a64f7946dc837d9d2355785ea +CT = 02ea344a1ad12184e287ef67f706ce5f96a7f5ee3d0cc18b703eb81224cdb1fd2e1cfb2fbfe1e402 + +Count = 162 +Adata = 99e98c9983c85d1f49ae43ebad67a652 +Payload = 5db6bda27910e7b8b61ac476c6532570b71b3932bd6a698c +CT = 5b768ec70d7ed7cbcb56644b55a27f42e98b150eb5312ded64c4aea7f17f18f068897557c93ffaaa + +Count = 163 +Adata = 37a837d73fa15793f6f823fb99c2ea74 +Payload = 8cac261a461c3ddd2642b8e4e5c3389e491fcb2ff8356412 +CT = 8a6c157f32720dae5b0e18d9763262ac178fe713f06e20736f3b2e70e6e2dc7acc74a823a7f49722 + +Count = 164 +Adata = 11119a4e779cfb64c736d425e4ff554d +Payload = 3429f9b088b501d7944c462694d0799568282e7ce07d3e61 +CT = 32e9cad5fcdb31a4e900e61b072123a736b80240e8267a000dc3b57096f0df1d4eb5328c416921bc + +Count = 165 +Adata = 962d7d4305f23d1692747b504960c0a4 +Payload = a46ae4c71d4c9eb72fabfa76b8074aa02e07653eca10eef5 +CT = a2aad7a26922aec452e75a4b2bf6109270974902c24baa94f62ed804e9f2ac0f7001d0f35ea9f3c1 + +Count = 166 +Adata = bbb1fdfefcf3657ba6cd93ff341a04e1 +Payload = 92f5e3083f57c77ac9553a2024a66489698bd2261f05d415 +CT = 9435d06d4b39f709b4199a1db7573ebb371bfe1a175e9074907dcd7ac1e0bb248d46c3036c39fb02 + +Count = 167 +Adata = 74be126f7c596642dafa8fe3da904e69 +Payload = 41ecc3aae5cfebfad7921a47a0684601ffe73816380f8716 +CT = 472cf0cf91a1db89aadeba7a33991c33a177142a3054c37787cbb80fd21127feca7e76fd6947d5b7 + +Count = 168 +Adata = d72cc521c90a468522af8966c24799f3 +Payload = 8850bdda4bd0271e333db344a47b837183eb48269c3dc0b6 +CT = 8e908ebf3fbe176d4e711379378ad943dd7b641a946684d7cdb5d1243b6e73b8e380d8ca041647db + +Count = 169 +Adata = 28f427fba8d0bb0380bbe5072ccfa519 +Payload = fdd3ca2f193f93f5a349b50357d26748b767cde6ab5cbfe7 +CT = fb13f94a6d51a386de05153ec4233d7ae9f7e1daa307fb864a0ae8604b103f882f17db893ed5c576 + +[Alen = 17] + +Key = 6bffab1f4f4c1ff66b4a669b515b2f8d +Nonce = ddb34d5e0140fb96d690e1a2b7 + +Count = 170 +Adata = 5cbba9ea778e01af00afb2a934f28c7211 +Payload = d91b12e8655dd92b1332fc1d71c391c96a17111562d90ba3 +CT = d302e5b2d5d90433186b804cd7717e2db2f22cdc34fb2942ab30780a2c4f12af8f35350d65284c59 + +Count = 171 +Adata = 1583138aa307401dddc40804ac0f414d33 +Payload = eeafb08d4a4819f5682a01d44371e34cc5729079e74e73a6 +CT = e4b647d7faccc4ed63737d85e5c30ca81d97adb0b16c514746577901b7f6feb88b8e2b8562f9cb5f + +Count = 172 +Adata = 23931c258c84086500c6a3b6eda457e6b5 +Payload = b8737d5bbfc976c2d8d9786148dea664dd83cee98df537b5 +CT = b26a8a010f4dabdad3800430ee6c49800566f320dbd715548735a59390ba7a892741694f3a89b0bf + +Count = 173 +Adata = e12f98507d6514c3b551d240595346bc9e +Payload = eb021b63c61c0b194bd44870608d7ef0b932b6104412d7a9 +CT = e11bec397698d601408d3421c63f911461d78bd91230f548f4f81ed18cc1820375a7bec2318cde1e + +Count = 174 +Adata = e14b87d49d231c0199eec627fd7f1b5332 +Payload = 93b42584c4956078359d77e80aef52281b9228a1f66aa36b +CT = 99add2de7411bd603ec40bb9ac5dbdccc3771568a048818a187b430caa60d98dc3e2aeefe6249b44 + +Count = 175 +Adata = ca095aec96a8b093e62b10f0950ce35ce7 +Payload = 6a788d8238c7b313b8eba27b210a71c36819d719115b9b76 +CT = 60617ad888436e0bb3b2de2a87b89e27b0fcead04779b9970a77372b727408e1bf5a70790b9eba3a + +Count = 176 +Adata = d1cac02b34ad33c0e77a5bda2c3baf5e5d +Payload = 3bc1ee54d0094603dfc68eee118e547d031fb36e464e776d +CT = 31d8190e608d9b1bd49ff2bfb73cbb99dbfa8ea7106c558cdc1f5cb4d4fa2204e82eedcb3784443d + +Count = 177 +Adata = 065c06b49a49898e20bb679e35edbb1f76 +Payload = 8a12adb8b746216baa8a418725e608e4377f13816a036a10 +CT = 800b5ae207c2fc73a1d33dd68354e700ef9a2e483c2148f12413f9496592a75a1d6e42ee3a258607 + +Count = 178 +Adata = 98a42d7a0c5917deaf3b4de3f0cbe0a191 +Payload = 30a226c07401d0ae24c73d682e3a6e7e377ec1613bafba17 +CT = 3abbd19ac4850db62f9e41398888819aef9bfca86d8d98f6b571a3150887df1ac5f813676b2eb24f + +Count = 179 +Adata = e245a7528931841b52a5f59d861d98d7b7 +Payload = 3d17bcdf30445ebd8a9b6aa2fe11d443c1161bb1ee69ced0 +CT = 370e4b8580c083a581c216f358a33ba719f32678b84bec3131aa5e4657c92e31c69ab18d447d3578 + +[Alen = 18] + +Key = ae6136df9ab43631ef143515dacedbe7 +Nonce = c5c445792208a50c8e93d64aa3 + +Count = 180 +Adata = e04006b68c83a5dd4ceac3cde238e48895ae +Payload = 6a493c5ef3769ccc4101dbb2eb36e1e5bbc577a057ce0731 +CT = c7584c0203c2535c5702c6ae93b7cbfb066f4a055c627a180d6d676d11fce907b5c93fa1ed7bff2b + +Count = 181 +Adata = 5da64e368f45153ea5b7ddca966b6c5b699a +Payload = 15e0c672c6764f3699d9d3e7120f8ce5daab166f08fdd074 +CT = b8f1b62e36c280a68fdacefb6a8ea6fb67012bca0351ad5d2cd45f211b1a1364c91ad07959bf0ee5 + +Count = 182 +Adata = 1b315d024bb5d1e03d7510e61f37d8adb10a +Payload = de907d58cd8f5a72acaa1d329b937dfbbfed65a4e45eb029 +CT = 73810d043d3b95e2baa9002ee31257e502475801eff2cd0018f021a98b2edfb0b7500363099c2a1a + +Count = 183 +Adata = 8691ba4f9232ca86f919fe72ddb39c91d707 +Payload = c7fa314d27be79f9d3e2d1e188c1785b0c970f91b8ed4290 +CT = 6aeb4111d70ab669c5e1ccfdf0405245b13d3234b3413fb92ac9aeb018c48f3902276ac759710b6d + +Count = 184 +Adata = ff0baf1cbb5884a9290ea7b5ee49915efb4b +Payload = 33b05b20f3c849fac091a5028cbfa0bc9a1c32514136fee3 +CT = 9ea12b7c037c866ad692b81ef43e8aa227b60ff44a9a83ca7dac49f606dadb9f7034e0a1860d519b + +Count = 185 +Adata = 2d118cda20700bc2748ea1753fbca6f74933 +Payload = f43832e420e2eccd5d80502bea2ba1804e17d4433318fc86 +CT = 592942b8d056235d4b834d3792aa8b9ef3bde9e638b481af623ccbab19c1442806e21c5a820945da + +Count = 186 +Adata = 0c7a5fd2010c999a8a0efa81f89ff5bfefe0 +Payload = ceb203c842a962183f22e602644fc66e4290b3d5be445fb4 +CT = 63a37394b21dad882921fb1e1cceec70ff3a8e70b5e8229ddbcd18947ac1800856c9c92eb0388c70 + +Count = 187 +Adata = 73fdddb9e0a64f5671fd70c4ea8443507789 +Payload = d6015b6bd5f5eabb2a649129f8f727c06a3ad59499f21caf +CT = 7b102b372541252b3c678c3580760dded790e831925e618639c29ea73b0c5aa130d8b14f7b9926a9 + +Count = 188 +Adata = 82c4484e3a6e18b6bbfd78b69b00c40b30c5 +Payload = c288b810fb533441bd549d02c0b28d5b834293683eaacda2 +CT = 6f99c84c0be7fbd1ab57801eb833a7453ee8aecd3506b08bf0a0f148ae138c2ea02538c8fd7ac76c + +Count = 189 +Adata = 267d8385b14721eded743cffd69e4d595f7e +Payload = 667cc47d13c34923be2441300066a6c150b24d66c947ca7b +CT = cb6db421e37786b3a8275c2c78e78cdfed1870c3c2ebb75285eb537e7583f04e040a0ddc41106213 + +[Alen = 19] + +Key = f1908328edf2996ebfc9655472ca5ad0 +Nonce = 4c693364546930b6c5250e2699 + +Count = 190 +Adata = 4a3634e5028df97fbe00eb016e8ea4f1918faa +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06eb +CT = 90c850790b0b380f5aeb2488fdf43c9d5ef1759861e86f6e52570e769629dcc2e568737ba53a1195 + +Count = 191 +Adata = 041b93e3fc059fa44aa755e88df277b9b6e499 +Payload = e61ca7310172eec16745a73e34516f65844eecd0dbc5566a +CT = 980af6f885e3e6f2e2ba4a2bb3e020d1a87976ba1bf63feff1d82ec19a2e3ec43bbdb34e10999d90 + +Count = 192 +Adata = d1be393376cb5d23cf8139da0fd92f3d520ae9 +Payload = ea887edee68ad5fa6bae928aa480dda898037f820700ec52 +CT = 949e2f17621bddc9ee517f9f2331921cb434e5e8c73385d7f2abb0ce4de9eeb5e8af9cdf3391d3cc + +Count = 193 +Adata = f3e551b34d2db1286a9f41085e4dda95ec3f75 +Payload = 71fe1ba5d299495d2a56039c64032ec6263d437f55e3f5be +CT = 0fe84a6c5608416eafa9ee89e3b261720a0ad91595d09c3b239c73b01ba49a8498b5ff4833851069 + +Count = 194 +Adata = a69ddc66e63a3415f21009d53adcf26bc1a9a5 +Payload = bd04d854216740a6ceb9827cbddd83761d19feb2a21d78ef +CT = c312899da5f648954b466f693a6cccc2312e64d8622e116a2248dacd3903c26a2dc5ae649566ad67 + +Count = 195 +Adata = 5735d6f5882d8f27155eb4cc285a65138ad64a +Payload = 33b44873a7a1e5b0fdbb7e7347623e4fa1ccd937feb26fda +CT = 4da219ba2330ed8378449366c0d371fb8dfb435d3e81065fd4156cf7d97b2e744351b6960a807cf8 + +Count = 196 +Adata = 5d94ed976ab2063512690ae704c3b115519742 +Payload = d3909d577a4e89642227cc6fc146b61bc18392175e342898 +CT = ad86cc9efedf8157a7d8217a46f7f9afedb4087d9e07411d5a50086b6711ac72533c3c5717f6892c + +Count = 197 +Adata = db20b384620ab8691aed2fed14a745188d94c0 +Payload = ba0716355fffb8ef947d2a15eb58375a1ff1084c56699029 +CT = c41147fcdb6eb0dc1182c7006ce978ee33c69226965af9ac54fb74ecb9a5163b01b9dbf97ff2f999 + +Count = 198 +Adata = 94897cdd04e0c8480b2ef7b5201dda37558ba9 +Payload = 5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9cc +CT = 215d1e5e323b409e36cc81509d1d78cbf27d452d494cb049d2a81702f665ff5c54f586defd268c94 + +Count = 199 +Adata = 95c44e1e5ad256b3ce1cc1d87137a1e09f1fd4 +Payload = 598e91d39c414496fd5e69f2cf80826b4e7d59ba28e0a0d8 +CT = 2798c01a18d04ca578a184e74831cddf624ac3d0e8d3c95dfa641889723e163825ab65727e8a5343 + +[Alen = 20] + +Key = 61cb8eb792e95d099a1455fb789d8d16 +Nonce = 1f37b3e59137f2a60dc09d16ac + +Count = 200 +Adata = 09db3efac9473f713da630ae92c2c8604c61c51e +Payload = 6ad541695a37c32d73ff6d5f870abd5b0f362a8968c4fce0 +CT = e65fcc975865c1499b088b58ba163283085d8ca68dc3b235d89756e5d78753ef22c012ae34b39a20 + +Count = 201 +Adata = b6d07035aed9c141c713cc3bce60f7ba8ac2545f +Payload = 9cce4c82fe9d38ef64ac8abdf0619f201a25ce6903675627 +CT = 1044c17cfccf3a8b8c5b6cbacd7d10f81d4e6846e66018f2fc78ebae9c143a7283b0641e1f83f5a0 + +Count = 202 +Adata = 80a5ab693378af29cd5a33555cb3579f9ae540aa +Payload = 7295a7aed3e987baef19ad68c33ba5a5dcbff27875ff5236 +CT = fe1f2a50d1bb85de07ee4b6ffe272a7ddbd4545790f81ce35a7e44348d2b3085348f787128a4e96a + +Count = 203 +Adata = 220817144a15a0a654fc1beaabce60270aa72df8 +Payload = eb21fe20fc4f92452b261eac0d7b70016f7469afdff7a3f5 +CT = 67ab73defe1d9021c3d1f8ab3067ffd9681fcf803af0ed2024dfc096cd8a09d2d81f6146fb54082a + +Count = 204 +Adata = 5a2423c2ff2d642c80ac1ca27dd779321f3e9c01 +Payload = 23bf80f51dfd83f63986910e69d54a315c2bfb43f432b7de +CT = af350d0b1faf8192d171770954c9c5e95b405d6c1135f90b5da82204f4dd8f535cb2fec2f133d882 + +Count = 205 +Adata = f2c76ef617fa2bfc8a4d6bcbb15fe88436fdc216 +Payload = fc3a50cc8a68778327923ea697f5388da4c814381e29c5e4 +CT = 70b0dd32883a75e7cf65d8a1aae9b755a3a3b217fb2e8b31108630135498ba409f4b6c8caee8a85b + +Count = 206 +Adata = b40c8c1d2cee490653105ca2443356cdb63e4fd0 +Payload = 465e41c69928d08c33e063ea119595a04d0de6bffd17bba5 +CT = cad4cc389b7ad2e8db1785ed2c891a784a6640901810f570f89c515837d129ba41f9c24b0229ddcf + +Count = 207 +Adata = 6ebfa1e8f80b3cdb1bedf2e3c7e74f30f55c38e1 +Payload = 3f98ee3922f8f1086e3135ae66c5465426b13c8794954880 +CT = b31263c720aaf36c86c6d3a95bd9c98c21da9aa871920655a352fa6b9c4e40733ddcd3fcdaf9ae63 + +Count = 208 +Adata = 6d0159861031c1a5f01aab35927fe2ab28154d19 +Payload = 5b43067a5ab3a9f9e633fdc084c44ffa7f11edd12ea5873d +CT = d7c98b8458e1ab9d0ec41bc7b9d8c022787a4bfecba2c9e82c1aa13f062c0f1f5008e27ff2191942 + +Count = 209 +Adata = 15e5ade017b30ab41878a2747e93aa91c61c2908 +Payload = e40b7e9e46e339e64891526e730b3bf6562fa37acefce307 +CT = 6881f36044b13b82a066b4694e17b42e514405552bfbadd2e149dd02bc7face0c4dfe4e501c2ac2a + +[Alen = 21] + +Key = be1ed49e2cb0caf6b6a0940c58453b93 +Nonce = b78ad129457681fa7346435b97 + +Count = 210 +Adata = 161d92c7df1ebb0924719e066e08b95eb4914a5eda +Payload = a9eec383f63892521e4616fcbadc5485942ffaf4669c43a7 +CT = 949be340720c4fdc4adc05cb777dd81a2549628d33fba07e62d2b338a7b34ebd9d85c244c952d681 + +Count = 211 +Adata = 6b1d94bc0c6e45fc905c509ea667853e4b2c5a8848 +Payload = 7b44a093162bfc8b4d65f1031d890a6b08a3705b142c0c26 +CT = 46318050921f210519ffe234d02886f4b9c5e822414befff8a4defafeb3d61dad8c007b68d8fb9b3 + +Count = 212 +Adata = 868dd3e241f60f097a7a2fe571307ee5eb961218ca +Payload = 28c4d6de3e2ce51b849b135d9cfd3084f0e3155447cad9d5 +CT = 15b1f61dba183895d001006a515cbc1b41858d2d12ad3a0c57cbab553b511d68a4f41db211d0a2fc + +Count = 213 +Adata = 3776f37fbf8803bdfd246ffaff2e59658a6c3f0ebb +Payload = 16d345606a315ad2406abbcb43cd8cabe948107ba6d17a72 +CT = 2ba665a3ee05875c14f0a8fc8e6c0034582e8802f3b699ab0290fd7dbf0afa3e597274e3c9fe170b + +Count = 214 +Adata = d0f2769eba9b8e618f00eed6b34c261c59322a253b +Payload = fcbbcdd9599a86e7c8ccb9347065789a9728ca1220fa51ca +CT = c1ceed1addae5b699c56aa03bdc4f405264e526b759db2139c7dec3960e6aba3174d793b4e08f449 + +Count = 215 +Adata = 2be180892faed0bb75887668d187807666d3c66c68 +Payload = 8d145b1f792cc31a2e5b86216609bb018e7aea3012ff70a5 +CT = b0617bdcfd181e947ac19516aba8379e3f1c72494798937c7057b9e2d844e86ee5c3ecfb3270804e + +Count = 216 +Adata = 52859849a5b7c1d432c3bfb35271cd8141db2ec774 +Payload = 741db990b43ef34993c33d1c4953b67b128b9299dfe86d74 +CT = 49689953300a2ec7c7592e2b84f23ae4a3ed0ae08a8f8ead1150fa899152eef7a30ae0f20986818e + +Count = 217 +Adata = aa192759625f4e42d1d1fa73dc0f62199142155615 +Payload = 51dca5c0f8e5d49596f32d3eb87437bcae866640310ce1e3 +CT = 6ca985037cd1091bc2693e0975d5bb231fe0fe39646b023aba7ff9203608089558698ec29472dda7 + +Count = 218 +Adata = 6de564226884188ec7bea3894535a875cff2a42fdb +Payload = dfaa7aa8b28626210d5c24e2ddfe516189be05aabe26f3b2 +CT = e2df5a6b36b2fbaf59c637d5105fddfe38d89dd3eb41106b85bd0a5074ef852575baf5f12c22663e + +Count = 219 +Adata = f245f2ee23755df863dee55d7ef0c3c09a0b6f0b0c +Payload = eedf00aab5edefdd6549d37ed44358e11c588c24f141dc57 +CT = d3aa206931d9325331d3c04919e2d47ead3e145da4263f8e9eb617436bae012331daf020fce24e47 + +[Alen = 22] + +Key = 34ab6fd7f54a2e0276fcb7cf1e203aba +Nonce = 6091afb62c1a8eed4da5624dd7 + +Count = 220 +Adata = 1ab5cc3d7b01dc74e6cf838bb565fea3187d33d552a2 +Payload = 8d164f598ea141082b1069776fccd87baf6a2563cbdbc9d1 +CT = 0d30ab07153b5153637969e6bd3539448c541e42b3d432fd7ef14622a9b621d1721b944c60f7fd67 + +Count = 221 +Adata = 1f1ac4674b272bc7a4ee9f4eae33e969b16fa90a69ba +Payload = 14e99a2ef0de650adbd785c692342cdb765e6d20d5fca09a +CT = 94cf7e706b44755193be855740cdcde455605601adf35bb6dfa4ec2c92671c64ee07946527be67f0 + +Count = 222 +Adata = 43ee77f12ea42e82a02275a68aa95cbd1bb440442bcf +Payload = 383242c709fe5f2ce782bf8c83b645d171f2bd238abc655d +CT = b814a69992644f77afebbf1d514fa4ee52cc8602f2b39e71173572fbf3d9495760aae4347397b110 + +Count = 223 +Adata = ae2ff288199be25bf640811541394ad7e1dd0dc0d24d +Payload = 9c16a5b638c35c97c5c981c1b8dbcba11aec30e72e45a936 +CT = 1c3041e8a3594ccc8da081506a222a9e39d20bc6564a521a4d2327956e030b9df753e063b5b71201 + +Count = 224 +Adata = 4ccfb4281852b5ca7e787723d689384a68ff9437db31 +Payload = ec9d8edff25645520801b6e8d14a2fc3b193db70d5e5e878 +CT = 6cbb6a8169cc55094068b67903b3cefc92ade051adea1354e4dac0c9130f5641afd035dd884b6271 + +Count = 225 +Adata = d3a2fffc798fd9cc2f409471faf18caa2ff3dcf4e652 +Payload = 0db33eda4188a9165147e24e40f79fee1985eb68d5162728 +CT = 8d95da84da12b94d192ee2df920e7ed13abbd049ad19dc0448807dd50a9cf41651083c49c7493ceb + +Count = 226 +Adata = 7b5121aa4d1e314f209ffe3e92cd26ee4f74d91e27f2 +Payload = e0d3ea4308376423c4322503f56e427a64e2e6d8b4f5e668 +CT = 60f50e1d93ad74788c5b25922797a34547dcddf9ccfa1d448ea0da53046733f522ded40a09c6d7a6 + +Count = 227 +Adata = 6e12c112720ef346bbbe7d1c19483721b1c52c438dad +Payload = 491f2bca585d6b5fdf38d18890e4d1bc923fe26930b3d2f1 +CT = c939cf94c3c77b049751d119421d3083b101d94848bc29dd345cb5a968f39654b994686699d532c2 + +Count = 228 +Adata = 20433402a2d869c95ac4a070c7a3da838c928a385f89 +Payload = f45908d691ddaf89c0bc129ffada94c3ceda5f47d63ef76a +CT = 747fec880a47bfd288d5120e282375fcede46466ae310c46cce85eb55339b886b7121b306fccc0b2 + +Count = 229 +Adata = 42f944c21cc221beaacb288115ac628346b8a1d94bd5 +Payload = e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b +CT = 63261824c00c9038caaa5a64603b09dd40bc4e3a210ef667a37ca5ce12aa6f0659467642deb8bfcd + +[Alen = 23] + +Key = ea96f90fbae12a857f5c97e0cba57943 +Nonce = 21cc46d9ced1539b0ad946e600 + +Count = 230 +Adata = 105258d2f25f62675aee975cfdb668aff833f05b61eb2a +Payload = 49db80f22bc267a70e5636dfbc8a21c83d9691fe4b9c3051 +CT = d2fcc8b7809b5fc07e44083e437d8180157f1782a9ce9f65c7fa9ee2e7cdc1b755258f2212a8a8f4 + +Count = 231 +Adata = 0f5938540651fa4ca03867e67518eb2b73f60dd8750fa0 +Payload = 26618e21099a79d6c517335389551323065ad89c8848ea12 +CT = bd46c664a2c341b1b5050db276a2b36b2eb35ee06a1a4526bfdb9bfcd3b969fb2e41221eb92b0147 + +Count = 232 +Adata = d6b228960fcbcf07c7bede616139db62b3808718a5b511 +Payload = 4de1d6d57144896ddea1c30f49afecd27bdf4840ed9928b5 +CT = d6c69e90da1db10aaeb3fdeeb6584c9a5336ce3c0fcb8781f8beea22cba93203c912209c78c03aa1 + +Count = 233 +Adata = 75f8f071e229355e286882917ce5dd4f1db591fee51b6c +Payload = 785359b1dc754a1e1b6d8731bd2d917ce3e91507401310e8 +CT = e37411f4772c72796b7fb9d042da3134cb00937ba241bfdc69a2e3ea4a40f7c491912c1a0778ebde + +Count = 234 +Adata = 4afb62aa8648ac7474dd16fcc376f8909c69e1ce36e6d1 +Payload = ab627aac1496d011ed2edcb2fc6b2afbcc394654f56124f6 +CT = 304532e9bfcfe8769d3ce253039c8ab3e4d0c02817338bc2a75c7ba2a769c27903e99b72639b0841 + +Count = 235 +Adata = 736fdf94db820a2efe89e7fc9dcfe7c23d5754ac2bcc7c +Payload = 40722cffb37f1455c2618408e777ed0f4b1bd039952730cc +CT = db5564ba18262c32b273bae918804d4763f2564577759ff8f84f4ca4a69fde75d7207e50494819b6 + +Count = 236 +Adata = 8a9a0367137c28db4c4e78d9cd9a68cde0d1b4583532ae +Payload = dcaabf7a061502618541c09ea59dbbbd52b2692fd0064747 +CT = 478df73fad4c3a06f553fe7f5a6a1bf57a5bef533254e873a0c34a24d3ee0946034c71fba4dbb333 + +Count = 237 +Adata = 34dbbff560ef04ea731b8979aef2ae50972f4db3efe14a +Payload = dd641a893b16e0e173ea2eda20638bb01849ac11e64e8ddb +CT = 464352cc904fd88603f8103bdf942bf830a02a6d041c22ef0f5e24a435a39a716c39f43dabdc4281 + +Count = 238 +Adata = f3d1fcd912252431db9d8ccfc3e203d5b34d537468b4c6 +Payload = 9aa3e8ad92777dfeb121a646ce2e918d1e12b30754bc0947 +CT = 0184a0e8392e4599c13398a731d931c536fb357bb6eea673f623d59f66764d859a772bb50ec91fc3 + +Count = 239 +Adata = 513b4cdc551c203ed5f1e659813584862023911590b672 +Payload = c8f44ae4b02fffdbce0df773c24075f877945fc7a86be460 +CT = 53d302a11b76c7bcbe1fc9923db7d5b05f7dd9bb4a394b543b6549eb16fba96318afb3df51f4675f + +[Alen = 24] + +Key = 35b403a15212097085d6e2b77ec3d4f2 +Nonce = daa423bf9256c3fcc347a293aa + +Count = 240 +Adata = d3c0ed74e5f25e4c1e479e1a51182bb018698ec267269149 +Payload = 7dd7396db6613eb80909a3b8c0029b624912aabedda0659b +CT = 5b00cf8a66baa7fe22502ed6f4861af71fa64b550d643f95eee82c19ecba34280604b58d92dacd3f + +Count = 241 +Adata = 62f4fe53e99a9b0c51e9561d910d7e2ffe19a5176c9dec06 +Payload = 897f0dfd90213f64a9277a0eda4f134f303fa89f56ca54fb +CT = afa8fb1a40faa622827ef760eecb92da668b4974860e0ef5ab4999e9689d52b8afeb87923efa3b48 + +Count = 242 +Adata = 191c4dfa653c20292657f7694c6b6a4a410c49a879abd217 +Payload = 2b7cf9e6e2d6abcd7775f8a6eb6294e822041c4c45f09c3c +CT = 0dab0f01320d328b5c2c75c8dfe6157d74b0fda79534c632cdc71e556c34fd4e1b5ebc50d38da8b3 + +Count = 243 +Adata = ba34741f8edb51470eb20f891869aabeab562d92571ac943 +Payload = dccb9a4625512496b372a2b8b768f75741d8c2e30e57d638 +CT = fa1c6ca1f58abdd0982b2fd683ec76c2176c2308de938c3646223d381090661c2ee2370d29a572a9 + +Count = 244 +Adata = 8b922aca6125722ec490b134a45864397f4e2c281d6e2089 +Payload = e0e452c990665465160b02cad6367ca89723613488d8efbf +CT = c633a42e40bdcd233d528fa4e2b2fd3dc19780df581cb5b1f78af50466646b7c7e652f787afe5357 + +Count = 245 +Adata = afb9fd78e3f8eaf4e8c91da62b2da534508e54f7dfa214fc +Payload = b536fdb8839f87080ae65ec35da347e792622ffe18a61d46 +CT = 93e10b5f53441e4e21bfd3ad6927c672c4d6ce15c8624748cc9d9a1270f78648a6b66cb8c0f2471b + +Count = 246 +Adata = ecf942ccee7396cb3ee177eadd4d96a4af1d90afdce97376 +Payload = c81233826e5125e1f31fe275184ccba8f1a743e58e146e4d +CT = eec5c565be8abca7d8466f1b2cc84a3da713a20e5ed03443b17d3d6f1fc4f530841b749d9f3a0a7a + +Count = 247 +Adata = 16fea92ffcaad563792aa924bffe7ef690edc90ea4e29cc0 +Payload = 24ab253b5b06552665c3c810254c0ed15e68a783180d7eee +CT = 027cd3dc8bddcc604e9a457e11c88f4408dc4668c8c924e05852ed48cf88d9ab2326aa46b6541b60 + +Count = 248 +Adata = 76f110eecd369d79e21fb208058359d3a2f37581d1f7f691 +Payload = 7f596bc7a815d103ed9f6dc428b60e72aeadcb9382ccde4a +CT = 598e9d2078ce4845c6c6e0aa1c328fe7f8192a7852088444c62dff6bcade5ac2edb8ec9797ce433e + +Count = 249 +Adata = 8834c776a3237f060ae0ab9857324a3b2ac79f3b6e6f90f5 +Payload = 11cbfb3d348c7abef99f562607e289de34a2bb379a5dfe50 +CT = 371c0ddae457e3f8d2c6db483366084b62165adc4a99a45eb936ac4764575f85352c24ab23209d42 + +[Alen = 25] + +Key = 7a459aadb48f1a528edae71fcf698b84 +Nonce = fa4616b715ea898772b0e89dd4 + +Count = 250 +Adata = 0c0b4a45df5c3919c1e1669c5af5d398d9545e44307d95c481 +Payload = 0b3d947de8632dc8ff752f619ba7c84716fac7a23e101641 +CT = 7db9f3f7dc26fc2adf58d4525d26d5601e977de5a7c33911a1138cff7b624f9908b5b4d7e90a824a + +Count = 251 +Adata = aa27a28a36b5a2cee57ffeca0233feb4bdd4eacb2cae28e98f +Payload = e6dedce2c278c44e5678d13e7d5b5d3501d61bb0bb6b5558 +CT = 905abb68f63d15ac76552a0dbbda401209bba1f722b87a08e23f92b598f7a248a894e6b8f5691bee + +Count = 252 +Adata = 66220aa9b40a1772caba7749a544bff938e804dbc6e556498f +Payload = a276b0922fbd5094bf89b9329d07341e039d6204397b81c0 +CT = d4f2d7181bf881769fa442015b8629390bf0d843a0a8ae90e94043c0d80fd651469232fe9d47a81f + +Count = 253 +Adata = 3d765d20e03a4cebfda50316c4b7d8b6c55078d5b3e9cbc567 +Payload = b99afbc2dbb377350cc58d4bfe8e954cef25d7b27b82fad4 +CT = cf1e9c48eff6a6d72ce87678380f886be7486df5e251d58425088b522fc0731097e729448236b317 + +Count = 254 +Adata = e91b6265879153e1692b00a112b4205111c8eb1a7b7f2c6898 +Payload = 56114cc783b80ca2dd2881387b6d92a59a237dfc8e976d8b +CT = 20952b4db7fddd40fd057a0bbdec8f82924ec7bb174442db2208cf07574cc4f3f83ed6301b904404 + +Count = 255 +Adata = 340b16f352817babb4fb70e9e6e18784b3e67bdd449872158c +Payload = eb21fe20fc4f92452b261eac0d7b70016f7469afdff7a3f5 +CT = 9da599aac80a43a70b0be59fcbfa6d266719d3e846248ca514b0a900068e55cd24c92bbb78c521ad + +Count = 256 +Adata = 5a2423c2ff2d642c80ac1ca27dd779321f3e9c01445be684dc +Payload = b15083a73607c9d7e197a8cc884ad3be98ac343f6493df67 +CT = c7d4e42d02421835c1ba53ff4ecbce9990c18e78fd40f0373f8ba66d74321c80c057f010078d2f28 + +Count = 257 +Adata = 5fe8bb27a59a5f4e370adbba96484c2365fc0d8c6e58d7d3e6 +Payload = 07542d18e8f2d3e199fca0f90cabb78b169525fdce81666a +CT = 71d04a92dcb70203b9d15bcaca2aaaac1ef89fba5752493a0a189319e4f06d53c1405d37b06cc8eb + +Count = 258 +Adata = 23e5422e8d7560a9e65642b5e723a47536c16791f3a0cf918d +Payload = cd574ed56bdfd1408f7831e0b24b4345ee979ac906a7aa22 +CT = bbd3295f5f9a00a2af55cad374ca5e62e6fa208e9f748572dd72f48ae03670249d74f8460b63b1ae + +Count = 259 +Adata = fcc9422ba5023a9997baa9c4ee6cb196ffe96e08eb9c2b8a75 +Payload = 8c9abe94beed4c9bd46adb1d04fbfe7016dd50d324525abb +CT = fa1ed91e8aa89d79f447202ec27ae3571eb0ea94bd8175eb1717c00c93d36a77141b723d573c8c65 + +[Alen = 26] + +Key = ca748225057f735f712ecc64791367f0 +Nonce = 1341a6998eb1f50d4b710a13ac + +Count = 260 +Adata = 5fb96b045f494808c02014f06074bd45b8a8ad12b4cb448ec162 +Payload = e92cd0cb97afe4fb00c4f12e9b9abe1d08db98f49a27f461 +CT = 82b666694232e86e82295beae66ae67d56aceb5d6b1484ceb4a6843ec16078038c10afedc41f5362 + +Count = 261 +Adata = 87db0d9d69bc0cf69cabeb92570e482bbc8ff3e1ba72f12f3225 +Payload = a6dbad96ad23ff61479df39b99f0673a09f2a7eaebbd34b9 +CT = cd411b3478bef3f4c570595fe4003f5a5785d4431a8e4416a7c6566d0b8ff97f946d7c7773a845f2 + +Count = 262 +Adata = a061a09024f1e03b223695d4703ee202e90e07156b95859a22e3 +Payload = b1dd81cc3b2b0efe540a3194d6fe304cd2de53db7929ebe1 +CT = da47376eeeb6026bd6e79b50ab0e682c8ca92072881a9b4ee1d66a4728b67b42602e23c8500b0115 + +Count = 263 +Adata = 0dd513c5d8d62b723ab8b0a3aaa477e843d9149dc8a2f878e585 +Payload = fb30c2e98f3d7e4ed7431da285711d3d287884db13a474e7 +CT = 90aa744b5aa072db55aeb766f881455d760ff772e297044803c51e8c59ed13b3e5d9b489d4ea2ccf + +Count = 264 +Adata = 3ff59c40bd796048e586eccc23a82e4d09fc5e779f38eb4afbed +Payload = 886f9f91a6566ceb99c39462ab675a3ae3be98f68787626f +CT = e3f5293373cb607e1b2e3ea6d697025abdc9eb5f76b412c0f1ec270b43fc5a9811b56ccf033789c6 + +Count = 265 +Adata = 0df7ef91f7124da867e992bcbc6fb38232ff6d5205f38768da72 +Payload = ed370d1c2d6dc03e4fae4deb9343a7d4339562cffd427587 +CT = 86adbbbef8f0ccabcd43e72feeb3ffb46de211660c710528bb4ed25940d58cba64271fe1d2e8013d + +Count = 266 +Adata = 6777de159c34d005b94f67c33ae4a35ebab09d9cb9c56b4c9c81 +Payload = 2f77c2eb07db14bd713c5af10c0760ea3a6ca5ff8d046d36 +CT = 44ed7449d2461828f3d1f03571f7388a641bd6567c371d99392636a5e373c1354ea9b969abb4932a + +Count = 267 +Adata = 75559898f4ba03c55afc25ea91aa61a93c2f8270a5fa51b6f6dc +Payload = 360fb89429dc9b48358097d930c8561b2bd18dc0a470d1d6 +CT = 5d950e36fc4197ddb76d3d1d4d380e7b75a6fe695543a17959a7e8bc0570f19159f91fc14ac6532a + +Count = 268 +Adata = 5e03fc430473c5de96d68907fa506f9da353ae48a965445e1f24 +Payload = f2d8d67b9f291c3edc264893922622b2693f3e7231137eba +CT = 994260d94ab410ab5ecbe257efd67ad237484ddbc0200e1507e559568c27a30b5676f98cc66f57d6 + +Count = 269 +Adata = 7eee4869e77f6db12c91d1f647cad2340d33a3defaeb362d311d +Payload = 7fd6fb81c36e44b150af10e04683b1ec9b5dda87c71ff939 +CT = 144c4d2316f34824d242ba243b73e98cc52aa92e362c89964910615920f6f3c3421a9c2bec1bec7e + +[Alen = 27] + +Key = fdf2b2c7fcb3789b4e90abe607dca2af +Nonce = a69ddc66e63a3415f21009d53a + +Count = 270 +Adata = c76846da496ed87b9c0f65c6266c9a822224acde9775efb186a4a5 +Payload = d7aa4efa5d75195a400018bd38f7d8cd53fdffe88df1837f +CT = 150d9a8b78d9c04239d66207a1f95021bbb1b7c70d7c354825d05e5a2e76a90f6fe489fd74cab2a3 + +Count = 271 +Adata = 4efbd225553b541c3f53cabe8a1ac03845b0e846c8616b3ea2cc7d +Payload = 5f94a2e48d348a1d56c55a659306e319c3d2ad78b9fe43a7 +CT = 9d337695a89853052f1320df0a086bf52b9ee5573973f590be6af49ce97d5e0e77c7fd5d9cc6d932 + +Count = 272 +Adata = 7631cf7822a545daefa16a5ec43c877d475a82d5aa2d51cec7fbb4 +Payload = a44b010fc1c659eac9241a58b11a73d7ce33156ddfc54c3c +CT = 66ecd57ee46a80f2b0f260e22814fb3b267f5d425f48fa0b924b268cab915f999aea3e1cc3a88ccd + +Count = 273 +Adata = e4da34663edc44370bfd8aa8315945471a893a1cc069628a071ee0 +Payload = 28d157f5741f1be057d5219711414c0638b47d165a905a6a +CT = ea76838451b3c2f82e035b2d884fc4ead0f83539da1dec5dc368f5af8e311e67209e02dfa2613377 + +Count = 274 +Adata = 077509eae1dc367540f87832c5780f6c5b29e180bc6c1fee38e826 +Payload = ba7432a8e34bfaa91b35c8dfd822d86850be39e63150257f +CT = 78d3e6d9c6e723b162e3b265412c5084b8f271c9b1dd9348ad175fcad35d29396380b79a28784cff + +Count = 275 +Adata = a513d750ca1e8bf6cb7b8cea5204e064c15c2dc40d742b31cf5459 +Payload = 3f5830b0ce8849a660af7d58a60c19a9824a3033bb5fed43 +CT = fdffe4c1eb2490be197907e23f0291456a06781c3bd25b7493b4b3e33d325359c9c651290ce73bed + +Count = 276 +Adata = e439db829c1291df49fc42c2fa1a92118c2665f11e13f28dc6f11a +Payload = e69b2a243340df5dc70b2cb05be12e5992ee36f7d9f4ca84 +CT = 243cfe5516ec0645bedd560ac2efa6b57aa27ed859797cb371f88ca5857c6d801e726a01c621a0c3 + +Count = 277 +Adata = a12c690568114fd7a677f49d74e84fc1a6b7f7d2a08693266c0a91 +Payload = 9de35b840a69a84701ffae1b1d2bf13c34b42a57d14c524d +CT = 5f448ff52fc5715f7829d4a1842579d0dcf8627851c1e47a0592d360fc6a46aa18c4ce5d74fa4532 + +Count = 278 +Adata = 1813bf176a1127f4d508d7663ae750f9c4bcb84a6e26811ac60d46 +Payload = 9e2fa20bf76768a5a1467d90a048bb503a2c33bbbaa71653 +CT = 5c88767ad2cbb1bdd890072a394633bcd2607b943a2aa0648b772cef893495cf0a94e8ebf06e920b + +Count = 279 +Adata = cc6e9cc2699d3ba0e624e715599480d6b7dbc6eeea0d12a9236444 +Payload = 6681b1cbeceea57a828324831407280b00f4917ed52a10df +CT = a42665bac9427c62fb555e398d09a0e7e8b8d95155a7a6e8b1851d571a1ef8aed565b784dcaaac4e + +[Alen = 28] + +Key = 7d870d7e52d3053c65eefad47764cfeb +Nonce = 37d888f4aa452d7bf217f5a529 + +Count = 280 +Adata = 9610949f6d23d5b1f3989b2f4e524fab4f297a5bec8ddad4f16cb616 +Payload = 109317556c21c969eda65a94176d7a11462c9ae18a865b6d +CT = 4e6b967b1571c6d7b9e118b112b7ac949a4a175650316a242dd579cb0d201d22c86bbc7fbe47bd0d + +Count = 281 +Adata = 96118dbfe53434d8aed88769a535eb0c8b5849dca1c81c34626ac9b9 +Payload = 3e6c914a196e175079315b1c92b2b8a844deb472e249e3d3 +CT = 60941064603e18ee2d76193997686e2d98b839c538fed29af0dd7aef4a609f3587652173446ebd82 + +Count = 282 +Adata = 21fc96f73975298207f818909088295d6d6861677130ca258c2174f6 +Payload = e0014147d5771b4380dc0192d45f36f7d60776d1ba47374d +CT = bef9c069ac2714fdd49b43b7d185e0720a61fb6660f0060463e4405d45caf4836467edbf35089d87 + +Count = 283 +Adata = 72a5151abcb55933ff7c9314f3235eba2a400121454144c2670e8359 +Payload = 0f1c6dffeda98f7a159f9cc61820bfb29910d8eaa41b751a +CT = 51e4ecd194f980c441d8dee31dfa69374576555d7eac44537441c813e90fac775eddb7290df059d9 + +Count = 284 +Adata = dbbf192914b1ad73666e9f5e9c22c08ca398f7524af62b1046a863bd +Payload = c1ddd14e380cc91324cf2a381df1da1ccffd90ae436a373a +CT = 9f255060415cc6ad7088681d182b0c99139b1d1999dd067334d9316f1f1c3142c1c9b26e5c220a32 + +Count = 285 +Adata = 28e4b88fbf04e9897057ff5bfde7eb04fa480256817a50fa281030b4 +Payload = d4dae9c4cae92afb80f9a5c99383ff16e23a2ec942eed4d2 +CT = 8a2268eab3b92545d4bee7ec965929933e5ca37e9859e59bc0b188e33bfab29b237d6c6920ce3418 + +Count = 286 +Adata = d9ebc1cbfab9034317132a72e0f11c341331146a59e7a2f26bf4f3d7 +Payload = 8a188d40a6e6fbb06a9f06304349a7a808b092cc2fc10b9e +CT = d4e00c6edfb6f40e3ed844154693712dd4d61f7bf5763ad7fdde04d21b876468bd9184101b5f32d0 + +Count = 287 +Adata = 34ad69f192ae4dcab771aeeacf01bbd32609bcbbea8ff9df31ded719 +Payload = 590c1aac30ab166b1caff748452fc146765c372e226ffc26 +CT = 07f49b8249fb19d548e8b56d40f517c3aa3aba99f8d8cd6f068c65e9d0e5f1b81c86393900e64c19 + +Count = 288 +Adata = f5e50ce1f99ed5e9f2baa54b96ae7039234b1131e734ec190695d28d +Payload = 16d0522b2e691e42bd80ce95e00c8a7a1fc738169e904bdb +CT = 4828d305573911fce9c78cb0e5d65cffc3a1b5a144277a9206ab3b72c56c8df4a12dba89a2f21276 + +Count = 289 +Adata = 9b1e7e52ea1a12444d884866e11dcf367b70b816460936fdaebba36d +Payload = 0bddf342121b82f906368b0d7b04df1c682ecd4c2b2b43df +CT = 5525726c6b4b8d475271c9287ede0999b44840fbf19c72960170ca7b16d23537eeb3034105334699 + +[Alen = 29] + +Key = 8fcac40527c0e7ca8eaff265ca12c053 +Nonce = ae9f012fd9af60a400e20b1690 + +Count = 290 +Adata = 9ce65598cd1f86afc9aaaf172809570cc306333c25523f863c6d0e0154 +Payload = 78d1e96af8cebdcc7e7e2a4ddcfa34f6cf9a24fb85672ad7 +CT = 9adb9a95a9379ad795d8d3ffd4e37a045160d6d727f974a6cb3b5151f327e65447e52c7525562c91 + +Count = 291 +Adata = e7c78ef4c4b959ee00cb1a09d71221a43892ef8ad705edd27ed85d03a3 +Payload = bc59f18c8473941abc681a92741ab5ee13679829f542b8f4 +CT = 5e538273d58ab30157cee3207c03fb1c8d9d6a0557dce68534e5b08e27d8f5eeef0f064ff620652a + +Count = 292 +Adata = f1bce6f2a4bdd3a07ebf5f8d47f931d27e7e63389d70e1059f701216be +Payload = 5575d950312c14c89ac609dfb0b2fd1af732bb6aae5e8651 +CT = b77faaaf60d533d37160f06db8abb3e869c849460cc0d82044c0a96baae318f4714f0206812516b5 + +Count = 293 +Adata = 3da3bb091016e54477dae88af1c84c1a51b59c1bb49a05deb6f32064e6 +Payload = df5947d8c6094ccc25816639ec42214b28731bfd7b8312dc +CT = 3d53342797f06bd7ce279f8be45b6fb9b689e9d1d91d4cad4e7bdce2dc6aae24178aab6984f31028 + +Count = 294 +Adata = c4cd183071c37a8157c6930a7d4d530cf4b7eb021682327810bd48209e +Payload = 2fbb6dc235761875411ef59ae06110df8f15f66b721b0fd6 +CT = cdb11e3d648f3f6eaab80c28e8785e2d11ef0447d08551a7f18ece8260bd56ecdee768022d0dd8d1 + +Count = 295 +Adata = 0e0fece7b6b659b642668e8ba3dca330523e70279155f485f3f6f8041e +Payload = cd149d17dba7ec50000b8c5390d114697fafb61025301f4e +CT = 2f1eeee88a5ecb4bebad75e198c85a9be155443c87ae413f6f0fb3b7440b84ddc3cc53819c2e93be + +Count = 296 +Adata = a35c6f70f637a9a5e6f215c694fdf65b6fd85f794ed3eaa1bc19abe592 +Payload = 030390adb572f2bd2a6a4454fd68236cd1d465574328aa00 +CT = e109e352e48bd5a6c1ccbde6f5716d9e4f2e977be1b6f47129ca778c51f9320f121dd803ece8d5da + +Count = 297 +Adata = c2992096828325820e2d7acaa17ac789b6830ec3128dd7f904398afbec +Payload = f2d9cf953c8d3a051d9b3eae4307a3cb4fffaa2435b49586 +CT = 10d3bc6a6d741d1ef63dc71c4b1eed39d1055808972acbf79c223a5ad65120bfca4a5992e5ebc6fc + +Count = 298 +Adata = c023763a285ea934bc5bc7ddfc2aefe2b3f9eafe7b87c61383dcc07990 +Payload = 4b92e8d2ffaa4af8f3e0ac037a900bd18e195f490a3d71e1 +CT = a9989b2dae536de3184655b17289452310e3ad65a8a32f905c3bc4f618ffb3a159f4e2d0622cea6e + +Count = 299 +Adata = 0a39ec0163c7aeb1b4fbe7cb4fa5b0592fade70f430e23730a23ed4160 +Payload = 7c0e6a0d35f8ac854c7245ebc73693731bbbc3e6fab64446 +CT = 9e0419f264018b9ea7d4bc59cf2fdd81854131ca58281a376f099dce6e18435fba4d26c1e93bda0c + +[Alen = 30] + +Key = ddf9f150cc3f1c15e8e773663c5b061c +Nonce = 98c5036b7d54da9a1177105600 + +Count = 300 +Adata = 20c5ab290e6d97f53c74121951f39ba865b3acc465fa3f0fb8a591622277 +Payload = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d +CT = d00d29396ffa9e691290d746527777bf96a851f306d4da0b1816df1e0e82bb7bc8105930ad6a2232 + +Count = 301 +Adata = 0e205a4dc5d5ead0d9ff7f182dc140fc49511c01b0fdbc7e6d6cb5fdf027 +Payload = 88b2572fbe7cf2b46df04db476ffedb41778ae2eb3c3aae4 +CT = 2167fa0c69b415af3383c4e8ae35d41e00b8232e3dbc3cd2df823c8ccd466807f2bd1c4032f0cfeb + +Count = 302 +Adata = 48043560d60381e83c11d4bc9d997d3ee2add6b0524b779c62dfaa73ce0a +Payload = d44bf28b010e076b45db1b053af03db718b60748da51db1f +CT = 7d9e5fa8d6c6e0701ba89259e23a041d0f768a48542e4d2931f5be8c9965345c760c72cc1b7908d1 + +Count = 303 +Adata = f0729a8a2fd073699ab87b521cbe0420b43529556a505f5f87874d1a053c +Payload = eab8cffb512eabe267cd64353552513defe97c2d10f35503 +CT = 436d62d886e64cf939beed69ed986897f829f12d9e8cc335381d94a828a95872ebdfda8a4c6a196b + +Count = 304 +Adata = fc2cd69bb61223f713e33a5071d09bf2783640c307c22d836dd94952dd37 +Payload = 001056926546c261fbbdf92b94498e038c2bcfd0b6345497 +CT = a9c5fbb1b28e257aa5ce70774c83b7a99beb42d0384bc2a163931808533f4f70d7a78242ced110eb + +Count = 305 +Adata = 8f653c5c003c807d16d17f833eebb97c9c2f0e5aae3780a52ce53a6c33f7 +Payload = 29ffaef9415fd300127ffd26ef324083a9d90e0f60e2ab4f +CT = 802a03da9697341b4c0c747a37f87929be19830fee9d3d79f34553198f8e40fde6473f9cf04f1de6 + +Count = 306 +Adata = 8d05e7d3077151c6d9378cb08e049e4d7c28a908f7f7c079c46ff92cd01b +Payload = 9874dc5ca1b541f7b21c7b3860fa6b0c3ab1b712ab0fca98 +CT = 31a1717f767da6ecec6ff264b83052a62d713a1225705cae0fac20e8d45d2b0771d140b5e4a47c87 + +Count = 307 +Adata = d4feb3ea76ac2945651f557406f3f38a2d7e9232ed55ff4eaf1201dd8255 +Payload = 1e01c7128c821fb9c971a27fc7c6f9bb902fa735de583b8a +CT = b7d46a315b4af8a297022b231f0cc01187ef2a355027adbcd3cacfe4281e52d79e60eeb38319bc3a + +Count = 308 +Adata = 7cbb4ae995a3367a256cafd11cd6c6cab5bf3252fa97f27a8a1434ca9a27 +Payload = 51cd306fac7d20e3c7043eae3a6dfec046c5c24a666a0723 +CT = f8189d4c7bb5c7f89977b7f2e2a7c76a51054f4ae81591158f0d7646a799b14288bb2f354b5d8847 + +Count = 309 +Adata = bd40b06a4beded2be3d176266b10772c7fa2949f0a9b20d613af90c2daf5 +Payload = fc5b26befc633a3e8ace011aa7a42bd0258a9f3dc14fc1c8 +CT = 558e8b9d2babdd25d4bd88467f6e127a324a123d4f3057fefd7f95e1d331e700aa9ef83f09b689fd + +[Alen = 31] + +Key = b1dc81d116d94f5eced526b37c004b95 +Nonce = 97c8f69fb91b17299461fd8d63 + +Count = 310 +Adata = f8b08aa83bed09ca342249b2cf9e2b45a89dcfb8711a120395e455921af481 +Payload = 54390715b6e7c7bd51a234db059a51ba030cf22ee00b7277 +CT = cb629994c3418a662a8cde1b5f4d99aa7df66e24c53dc6df11297930fd44c63675b7cca70671ef4d + +Count = 311 +Adata = 0351c969dd38eeaa4b9b0000e346eeb1a2cd462033c59d9e6e3331822045cd +Payload = 65b5e856a8cf35dffd42c5ba105cba4c434aa1c2a0390352 +CT = faee76d7dd697804866c2f7a4a8b725c3db03dc8850fb7fa7e77f5566ca2fd9293835bceb461dbaa + +Count = 312 +Adata = 5db8b6bc16740680f78fba917733a6899cdba5e4c10a8058963d1265681eaa +Payload = 9a7685e3daac43ccf22cad0df900ba8acddc5d420846118d +CT = 052d1b62af0a0e17890247cda3d7729ab326c1482d70a525ec2cf9f5d35521c1c000685e49d2ed42 + +Count = 313 +Adata = e7d6024611210da0cfb90a9955195aa0a0539280a3a7c792a1540930daae2d +Payload = c18d9e7971e2ae5fc128777086338fbe194443324e2d2cd1 +CT = 5ed600f80444e384ba069db0dce447ae67bedf386b1b987966f33dfb44ae413283b238616c6b99fb + +Count = 314 +Adata = 77a878c9c76f3e6a4ddd330d1d8828949d08e0fedffe0d8e2e557b29e7c78c +Payload = fcf8982f7342f1b953658453cd5ea413700eff00f1ee7d6f +CT = 63a306ae06e4bc62284b6e9397896c030ef4630ad4d8c9c731df6fc6b4cf0b6332936ed7cfe9455e + +Count = 315 +Adata = aa540554ee80dbffa475f702d862d6b60e0a4090792420a26d02926517723e +Payload = 0d5690d2a7083ad6daf22b308314b8f5363aca77ca72835e +CT = 920d0e53d2ae770da1dcc1f0d9c370e548c0567def4437f67c8162a815f2809601ad02595e2e0ff4 + +Count = 316 +Adata = fae86f95dd06fb7fbae63a646615555aec8153dc328bdf79da5d4cc9677ed6 +Payload = f6e313cc35e8f8812b10a44f8ad00b6893f8084d942effe0 +CT = 69b88d4d404eb55a503e4e8fd007c378ed029447b1184b487fcaa11bdeab86f60f9cd0a2b45cee1a + +Count = 317 +Adata = fd525302d2fb246a47cf4e3a27808bda89d8488cf450f1a1c7df6eedd810ee +Payload = 91e961ea2eb750577c5137c609602dbfcc4c07955ba429ec +CT = 0eb2ff6b5b111d8c077fdd0653b7e5afb2b69b9f7e929d440a86a810881bd969744ad80f579400f1 + +Count = 318 +Adata = 767b1bdf9793a512d3a84e99ef77b43011a3bcb8de4cd375dfe47a79293e01 +Payload = 98438c4411bead6f30c89ead762a12bf39391d3652b78b7a +CT = 071812c56418e0b44be6746d2cfddaaf47c3813c77813fd2250ca00d3231819ecdf501ad39c864f3 + +Count = 319 +Adata = aac7014f606df6feec415a75e29015891007f07518c955875fbf5619262ff2 +Payload = 540cb00c0eface3d1b2d632d80a642f53c78ff672a1ff6ff +CT = cb572e8d7b5c83e6600389edda718ae54282636d0f2942571224d1d0294d46981d7dc39114a693d2 + +[Alen = 32] + +Key = 5a33980e71e7d67fd6cf171454dc96e5 +Nonce = 33ae68ebb8010c6b3da6b9cb29 + +Count = 320 +Adata = eca622a37570df619e10ebb18bebadb2f2b49c4d2b2ff715873bb672e30fc0ff +Payload = a34dfa24847c365291ce1b54bcf8d9a75d861e5133cc3a74 +CT = 7a60fa7ee8859e283cce378fb6b95522ab8b70efcdb0265f7c4b4fa597666b86dd1353e400f28864 + +Count = 321 +Adata = 55a62968c222a8501d1ae56a9a815667f8a9554607b7c56e6753f8fa92a4d054 +Payload = 764dbefb42644d18d23e5e4568685d14dbacfa418d36c4ef +CT = af60bea12e9de5627f3e729e6229d1912da194ff734ad8c4423862a715dda2f63a4197f894515803 + +Count = 322 +Adata = f8436e35b7a1c810ac6aabe8e2d48a3678d19e1e96337dada514ee5fc075fce4 +Payload = cecef24b62676a5623bedae8087b9b05d7e22b41a14dd2d5 +CT = 17e3f2110e9ec22c8ebef633023a178021ef45ff5f31cefec200f190bd700f6108f9959f6d12f0f0 + +Count = 323 +Adata = 548e2152f3a15b8fb81dc01062d99f7b4fc8f074e5cbdc1030c97f8ccc02ec3f +Payload = 53c164a4990c6e0637267ff2556c1542712fc584f6ff7458 +CT = 8aec64fef5f5c67c9a2653295f2d99c78722ab3a088368733a66ebc4e0777a6fc140a51e04a10f86 + +Count = 324 +Adata = d100f1d08ef1e3eda4aef22cd970c2b785c4ff9b523c401b4064324aecf7f2d9 +Payload = 15681d2121ac56a63b9d0a38b9c4eccf84fdb746d32c14b4 +CT = cc451d7b4d55fedc969d26e3b385604a72f0d9f82d50089fb810cdc08db0a9966dffeb43ba26446e + +Count = 325 +Adata = eece934a807c9f21487cd810f15fd55d7bb4421882333ff2c43b0353de7fc5a6 +Payload = 412a8ef924ca156de860f147575e5731825f0a3759688928 +CT = 98078ea34833bd174560dd9c5d1fdbb474526489a7149503cfc5b397578f8d02a0b936ffac29b99a + +Count = 326 +Adata = 86311ff444d9be90459b6ee3652e1705ed0b5cdac3d27293ddea3378fb686ee5 +Payload = 54ba8a020d0876fa369dc32e8627f565ba3dda862ea0bcfe +CT = 8d978a5861f1de809b9deff58c6679e04c30b438d0dca0d52c3fcd6d618c260d51724126f257534a + +Count = 327 +Adata = ab6efbc44a8906d5c067eaed71af467e130aaf170827a58beb03c55069674125 +Payload = 7a15506fd1dae444d77b2a3ae7b57a8d5b4f10e25a9f78e2 +CT = a3385035bd234c3e7a7b06e1edf4f608ad427e5ca4e364c9bf8b2821920640b992b00cd1c9618025 + +Count = 328 +Adata = ddb640923d083725587aced81ae1d7409983d1f1e3ccc8dcf94376dc1bbcae8b +Payload = b18a61a89cd698f32e059b7a2a9f62a46be2c248790a9915 +CT = 68a761f2f02f30898305b7a120deee219defacf68776853e4cd52d41a968284af8907ccbb4588cc0 + +Count = 329 +Adata = d95ec4a6f594be1ba39fa1aa933dc0a5dafff5ce44509577ebb3a3e8084c4401 +Payload = 16ee3bc9ec8b4448e292b8973618e02a99da1c348539d5c7 +CT = cfc33b938072ec324f92944c3c596caf6fd7728a7b45c9ec47449a5cb4943ff2846c589b7c98ef49 diff --git a/lib/crypto/test/crypto_SUITE_data/VADT192.rsp b/lib/crypto/test/crypto_SUITE_data/VADT192.rsp new file mode 100644 index 0000000000..1a7a5875fe --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VADT192.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886 +Nonce = 15b369889699b6de1fa3ee73e5 + +Count = 0 +Adata = 00 +Payload = 39f08a2af1d8da6212550639b91fb2573e39a8eb5d801de8 +CT = 6342b8700edec97a960eb16e7cb1eb4412fb4e263ddd2206b090155d34a76c8324e5550c3ef426ed + +Count = 1 +Adata = 00 +Payload = 296fbda0017351491c2187273fbde2c3a427170e430a703c +CT = 73dd8ffafe754251987a3070fa13bbd088e5f1c323574fd2167ee33e75d05023a7d63c770cfef2ea + +Count = 2 +Adata = 00 +Payload = eb61c284fe009921039ef6a9ce50e702823e44b35357923f +CT = b1d3f0de01068a3987c541fe0bfebe11aefca27e330aadd170647420f79c0d91cbbd69b806fe96a5 + +Count = 3 +Adata = 00 +Payload = ffeccc6460d23fdcc387c697e75dbb959b78013a8282eaa4 +CT = a55efe3e9fd42cc447dc71c022f3e286b7bae7f7e2dfd54a8a3ef2324754539ac774872282534386 + +Count = 4 +Adata = 00 +Payload = 90958d7f458d98c48cbb464c74bf495a49846dd468c514e9 +CT = ca27bf25ba8b8bdc08e0f11bb111104965468b1908982b07e292cd0e32535a848e327bc53cdae94c + +Count = 5 +Adata = 00 +Payload = a4fad5205d38206e25097075687ca86032b95b3fe7e82a07 +CT = fe48e77aa23e3376a152c722add2f1731e7bbdf287b515e9bb21701af36936be5f62d02b84df87c3 + +Count = 6 +Adata = 00 +Payload = b37114c65372b052cbeecf83d05a5da44f7b5bbff7d986b5 +CT = e9c3269cac74a34a4fb578d415f404b763b9bd729784b95b7da7f975367be24341e4af51b8bb156a + +Count = 7 +Adata = 00 +Payload = 9c0f0426f171ff18b2a4392f61fb4ee4a44c476fe03dc930 +CT = c6bd367c0e77ec0036ff8e78a45517f7888ea1a28060f6de360c6d50a96f316eda0b216cbb6380ef + +Count = 8 +Adata = 00 +Payload = 7b6e0a480a40585545b0e940e8d97c9ec987bd3c0e9c16a8 +CT = 21dc3812f5464b4dc1eb5e172d77258de5455bf16ec1294634cd1bd98e8137b578a174e39efe09b8 + +Count = 9 +Adata = 00 +Payload = 34dac6dbc28be62332a6935efc122e37b26ee100eb4033f8 +CT = 6e68f4813d8df53bb6fd240939bc77249eac07cd8b1d0c16909a895a3b08b63d7a2a1e75d25e7861 + +[Alen = 1] + +Key = 9748798c0f3cc766795c8ce0e4c979c1930dfe7faefea84a +Nonce = cdf4ba655acfe8e2134fa0542f + +Count = 10 +Adata = 67 +Payload = 100fa71462277d76ca81f2cfdb3d39d3894b0ca28074a0f0 +CT = 36e2415b4f888a6072f260d7e786d803be16f8b9cbee112d7ff74e3b05b7d7c13284573bd3e7e481 + +Count = 11 +Adata = 17 +Payload = 0217eb6778691f8dfe2d0e5241f05fcbcf97b9171f4de3f0 +CT = 24fa0d2855c6e89b465e9c4a7d4bbe1bf8ca4d0c54d7522d3ee7ce845f85dfc770d96dee9ca54ccd + +Count = 12 +Adata = dc +Payload = a78b7bc6c1a7250c5fc236f2a8343725a9a7bd3ca81b53e4 +CT = 81669d89ec08d21ae7b1a4ea948fd6f59efa4927e381e239dc14ddd8ae0aa5d810040a8d1d4da1e9 + +Count = 13 +Adata = 0c +Payload = 390c808d998582793bb10ee60568eb8d975c51d68b4e4da9 +CT = 1fe166c2b42a756f83c29cfe39d30a5da001a5cdc0d4fc746b40dec7e647720f1f5e8474bf570c2f + +Count = 14 +Adata = 3e +Payload = bcd9747fb54184b61b2e9e049caa75e22006e250f3722c0e +CT = 9a34923098ee73a0a35d0c1ca0119432175b164bb8e89dd3c10c4aac45d90119cce490cc8681a49f + +Count = 15 +Adata = 7e +Payload = d0342e3cd2c1142b642da7297ee3b9978cec405e6810f12f +CT = f6d9c873ff6ee33ddc5e353142585847bbb1b445238a40f2f9a95091d2cab7d3d9fa3e10d3e67ac9 + +Count = 16 +Adata = e3 +Payload = 7fab91d1aa072947d22f0dc322355a022fe7f0747f4a184b +CT = 5946779e87a8de516a5c9fdb1e8ebbd218ba046f34d0a996180f7818c373e89f7ff3003f53260060 + +Count = 17 +Adata = 3e +Payload = e487143dc4d98dcc6a2dfe6ee0f85d565d1f46bb0fafe62a +CT = c26af272e9767adad25e6c76dc43bc866a42b2a0443557f71905f581585e59e3c8c038b5bf966559 + +Count = 18 +Adata = 3b +Payload = 976b489244ed6789a34251500057d1d4a3229367a42b9066 +CT = b186aedd6942909f1b31c3483cec3004947f677cefb121bbea56569c34f8d9eea23e85fec18cfc51 + +Count = 19 +Adata = a5 +Payload = 71efa75961dfd60ad533082a8cfe111214eb02573adc4591 +CT = 570241164c70211c6d409a32b045f0c223b6f64c7146f44c212da23548f2ca4e9a8a07962be6422c + +[Alen = 2] + +Key = 393dcac5a28d77297946d7ab471ae03bd303ba3499e2ce26 +Nonce = fe7329f343f6e726a90b11ae37 + +Count = 20 +Adata = 1c8b +Payload = 262f4ac988812500cb437f52f0c182148e85a0bec67a2736 +CT = e6d43f822ad168aa9c2e29c07f4592d7bbeb0203f418f3020ecdbc200be353112faf20e2be711908 + +Count = 21 +Adata = 9db5 +Payload = d5982c462ad40458660cd7b120ce07fce9afe812caedcebd +CT = 1563590d888449f231618123af4a173fdcc14aaff88f1a89015e5cd97b7dd3d981321ae0b2d99e1a + +Count = 22 +Adata = 69cf +Payload = 1a95f06b821879df3fd3ac52fc99a7c1d3e9775263b7d036 +CT = da6e85202048347568befac0731db702e687d5ef51d50402bf3e75863c7acd2699caba3cc301f4b2 + +Count = 23 +Adata = 6c6e +Payload = 373c157e59b934a1afb57d4c5dd9ca7fb736b206a6210bef +CT = f7c76035fbe9790bf8d82bded25ddabc825810bb9443dfdb5d6a8f7a9f52a8038aa9dc1bdc9ed876 + +Count = 24 +Adata = dafa +Payload = 26e10a2ed8cc883a6552aee162c5542ff8bb8e758a1975f8 +CT = e61a7f657a9cc590323ff873ed4144eccdd52cc8b87ba1cc8a15603f10cbfdb041f8b2b12cc8f037 + +Count = 25 +Adata = c8b1 +Payload = dd235b05c15479dfe0326ba206ac784eca50038bbeb35d32 +CT = 1dd82e4e63043475b75f3d308928688dff3ea1368cd189061278bf62ba6a4819513d49fdcdb45480 + +Count = 26 +Adata = af48 +Payload = a0818342a5cae4a90ef281d3d1289d83f273f418a545fcbf +CT = 607af609079aa903599fd7415eac8d40c71d56a59727288b8b4d00309b50f9ea72f8105c94475b52 + +Count = 27 +Adata = b1cd +Payload = 33c0d06b6583bb4d15b4a07364c4be70ac6e72795c3dae0f +CT = f33ba520c7d3f6e742d9f6e1eb40aeb39900d0c46e5f7a3b220ba58e97936612c4183ba86705b2f9 + +Count = 28 +Adata = 649a +Payload = 3ba11282d61fe36e38cab7b559c2fd9cbe8bf7eb5863bde9 +CT = fb5a67c9744faec46fa7e127d646ed5f8be555566a0169dd87d602dc85bb260fb3df1221e2fbd10c + +Count = 29 +Adata = 593c +Payload = a97faefcae36732fcfe47736c2334ea7d411bf7638b0c019 +CT = 6984dbb70c663e85988921a44db75e64e17f1dcb0ad2142deb3835b7eecad6dac9785ad1d370ede4 + +[Alen = 3] + +Key = a74abc4347e4be0acb0a73bb8f7d25c35bae13b77f80233a +Nonce = 6a850e94940da8781159ba97ef + +Count = 30 +Adata = a4490e +Payload = 6372824bf416cd072a7ad0ae5f9f596c6127520c1b688ab4 +CT = b14a07bdc119d87611342c4c6935c5786ff1f9ae2eb49e6191c88a3cb4fbafcb8a4a157d587d7e39 + +Count = 31 +Adata = 5cad2e +Payload = 295f4f3417a77fcf0bbda17b0fd629ad57a6086573c87eb1 +CT = fb67cac222a86abe30f35d99397cb5b95970a3c746146a64235c34d1390bba5b008c3fb29c2df958 + +Count = 32 +Adata = ebdf4c +Payload = 86f354a505de941d34cd98e3af3706d56a938ab9a2797182 +CT = 54cbd15330d1816c0f836401999d9ac16445211b97a565575a733bba0a6992d0664dc77d2b5d194c + +Count = 33 +Adata = 7c0d70 +Payload = 88c3bfb546abe2f6bfc92a7c56c627e24ab92a8a87a6b43c +CT = 5afb3a4373a4f7878487d69e606cbbf6446f8128b27aa0e90902a31b15eed99c2dc4ed1bf11cad96 + +Count = 34 +Adata = 8fa501 +Payload = 75d4216bad77943bfe82be216157843b0da0fd16eeee8471 +CT = a7eca49d9878814ac5cc42c357fd182f037656b4db3290a42f25595ae00103d4eb20288158132e7d + +Count = 35 +Adata = b7aca7 +Payload = bf1401e8dcf6f681ed6dd74c7e23b7e54b384608b0e5ec52 +CT = 6d2c841ee9f9e3f0d6232bae48892bf145eeedaa8539f88760e67693b509ea4795b7da32c5c5d17f + +Count = 36 +Adata = 1f283f +Payload = 7e623e7ef7d0a678b5d22a8402d89220f4f1bf759e3084dd +CT = ac5abb88c2dfb3098e9cd66634720e34fa2714d7abec900880ef8ea380a1a0a38b2c20288e637a9f + +Count = 37 +Adata = e93f31 +Payload = 14f80e7a6298d85d31fb80376a394a8f88b0ae47f00450c7 +CT = c6c08b8c5797cd2c0ab57cd55c93d69b866605e5c5d84412d553aafe8536385d34c412c14d3a1563 + +Count = 38 +Adata = 27e9a5 +Payload = 3330df12249639961f562a74b34f60b0a8bc7c783f6572fd +CT = e1085ae411992ce72418d69685e5fca4a66ad7da0ab96628f594d366c8fc826ce58309e9053c27f7 + +Count = 39 +Adata = 72d566 +Payload = 1a1860ac8c11c5d262f8141738cae8ff91ca05906dc98bb4 +CT = c820e55ab91ed0a359b6e8f50e6074eb9f1cae3258159f61cdd6ac6c42cd3d11e0344a9c1001e253 + +[Alen = 4] + +Key = df052e95aea3769a433ce4e4e800b8418649bbe8c6297eb0 +Nonce = ba356d392c3f700f4f2706a4ca + +Count = 40 +Adata = 8ffc0e3d +Payload = e8c1a89228d8212f75c136bab7923a89f9fea18e781cb836 +CT = 66b5d782323925e1bd0a8413a9a5a881356453d5df2cbeb199b2e1e803550dcdde55fd66ecb45edd + +Count = 41 +Adata = 2b4f9cfc +Payload = a12c6324e022affd61b7e0d8cccbeb23e2e6c65355c1d586 +CT = 2f581c34fac3ab33a97c5271d2fc792b2e7c3408f2f1d3019e8fbc507244ba234a0581dc69962a66 + +Count = 42 +Adata = b4de3039 +Payload = 7cccb26f1dd227bc77458b99fd9e00f8e801adaece7bfcd1 +CT = f2b8cd7f07332372bf8e3930e3a992f0249b5ff5694bfa5628a2857099af20a4ae08e687bdb02c75 + +Count = 43 +Adata = bc59f18c +Payload = 692b53c1355475c71ceff0b0952a8b3541b2938270247d44 +CT = e75f2cd12fb57109d42442198b1d193d8d2861d9d7147bc3e33a6416e387d9e571a1954471ec9cc7 + +Count = 44 +Adata = 4fd9fd39 +Payload = 7e3e755e25bbe78d4a7770f9356ab9f4ff1bbfdba46383f5 +CT = f04a0a4e3f5ae34382bcc2502b5d2bfc33814d8003538572180f9735f994c8335e593f30b331a920 + +Count = 45 +Adata = 296cd04c +Payload = 997b712cd9295dc43cc19b40679f218c27af3e8c638d2e5d +CT = 170f0e3cc3c8590af40a29e979a8b384eb35ccd7c4bd28da91990fa537d2657d01f66872ba9af22f + +Count = 46 +Adata = 88037d3e +Payload = 577981ccb6c893dfe6405075fcb41507de7f9bfda860791f +CT = d90dfedcac2997112e8be2dce283870f12e569a60f507f984915cb93e84028c7aedce1a2dadbb6bb + +Count = 47 +Adata = fc4bb852 +Payload = 37ba9f57ec230675ce060ba3d388095adf15907aa0b0673d +CT = b9cee047f6c202bb06cdb90acdbf9b52138f6221078061ba25baa6385af8d7b807a2d2ab19aa4999 + +Count = 48 +Adata = f40ec14f +Payload = 401e0cdc132a9e4a9b5ceeed3c181f67e5203ea69508deff +CT = ce6a73cc09cb9a8453975c44222f8d6f29baccfd3238d8786adcdb44870e1105b7318d8bad0af957 + +Count = 49 +Adata = 90e2c63b +Payload = 0234dae5bd7ae66c67ff0c1a3f1a191a0d7bceb451bc2b7d +CT = 8c40a5f5a79be2a2af34beb3212d8b12c1e13ceff68c2dfa8b079fb71d45bd985bffd343c3362653 + +[Alen = 5] + +Key = 16d345606a315ad2406abbcb43cd8cabe948107ba6d17a72 +Nonce = d4ef3e9e04f1b7f20ffc5a022e + +Count = 50 +Adata = a468f08d07 +Payload = d3bef460223c81e4579c9d1d463ac5e0881685de1420a411 +CT = abb85db49a9b1c8724ecbc734cc8373bd20083cfa4007b1cfe4d3a3bb25f89f692884be230c6035c + +Count = 51 +Adata = 4497649a54 +Payload = 81ad3f386bedcbf656ff535c63580d1f87e3c72326461ee1 +CT = f9ab96ecd34a5695258f723269aaffc4ddf5c1329666c1ecd05ae56511a230627e02d066c52a919e + +Count = 52 +Adata = c30ddd994e +Payload = 84b88264afec06b370dfcebf5e1d3e2c1f005faf248b3215 +CT = fcbe2bb0174b9bd003afefd154efccf7451659be94abed188ef92fc17dca026f1ac1eaf78a05017c + +Count = 53 +Adata = 9573270f7e +Payload = 9e4c8aa9b58a8eabc5586892f5541000b43f17d9a051a040 +CT = e64a237d0d2d13c8b62849fcffa6e2dbee2911c810717f4d38eddff1e60e2d9ae74a936364b8df21 + +Count = 54 +Adata = 40336790fc +Payload = 260f67122dfbe03365bc9e35e9d4ac4b2eb150eddb30857d +CT = 5e09cec6955c7d5016ccbf5be3265e9074a756fc6b105a70aa3d464ad89cae59b474d019a5a7605c + +Count = 55 +Adata = 0b310c8529 +Payload = 1d55e7352bd895c4ef77389a7225c664f72b38c8de778d57 +CT = 65534ee1937f08a79c0719f478d734bfad3d3ed96e57525abeab0c520e64939c6950c0fa406eafb1 + +Count = 56 +Adata = 5756b2c681 +Payload = fbd315e1f5bd0f0e60ee6684c88f3543452c62ea0701d11d +CT = 83d5bc354d1a926d139e47eac27dc7981f3a64fbb7210e10d22d339c382343bf39c239fd64c2a64f + +Count = 57 +Adata = 3b919e3665 +Payload = d68d6556c5a5b1f5a123389b3ce966d5837cb8fcf5accfff +CT = ae8bcc827d022c96d25319f5361b940ed96abeed458c10f2fcd6b562a1b6aa10be92a81f99ed540c + +Count = 58 +Adata = 58749b643f +Payload = 062cb6962fa5b3a6239b95f3a51b478a1f32b081dc538a80 +CT = 7e2a1f4297022ec550ebb49dafe9b5514524b6906c73558d4b853022237d94d253b375bf2150e699 + +Count = 59 +Adata = a5d50c008b +Payload = 08c62ff9bd7bcf189f530d5065f8764532d2692f69858483 +CT = 70c0862d05dc527bec232c3e6f0a849e68c46f3ed9a55b8ee7aee0d403b2cf6f8b993eebd6b93615 + +[Alen = 6] + +Key = 1c476cfd7dd300d961fd3f24a6fe0e80742b00851676ca63 +Nonce = e300fc7a5b96806382c35af5b2 + +Count = 60 +Adata = 28130f938c45 +Payload = 6f3938932b5c1280311e892280d8a822a828a0be7fdb1bcd +CT = df48662fe134e75a85abc2cece2c3b6236c88a70fa792e9beadc9601adf9fbdf4e3e94b395b0a332 + +Count = 61 +Adata = f600024a7bf9 +Payload = 0af7345e71f4e8886503395ade0b0296a5856e086638b06a +CT = ba866ae2bb9c1d52d1b672b690ff91d63b6544c6e39a853c0692a40a6aba8d7c5addae21de90fea9 + +Count = 62 +Adata = 4eef510d1f48 +Payload = 37f57772f056f45a5ce9f46d27be1858980c8935b9c839b7 +CT = 878429ce3a3e0180e85cbf81694a8b1806eca3fb3c6a0ce122f64becb581070411957e632e19bb8f + +Count = 63 +Adata = 4c9c76b6fad5 +Payload = 8bb10c82bcabb7fb2b169252ab443b01df217cf908b8c241 +CT = 3bc0523e76c342219fa3d9bee5b0a84141c156378d1af71708c59f83aa97d069b6d83d9387051f43 + +Count = 64 +Adata = 5572ecfc7e53 +Payload = d1ccb4654a22b1afe32f3d3035fdccd87e9cbed83c679007 +CT = 61bdead9804a4475579a76dc7b095f98e07c9416b9c5a551f04686ee1d7b985d903f1de6cf78f8f4 + +Count = 65 +Adata = bffdf9d20d74 +Payload = f990a8f6ba14065d48665db36eb470c49f38e2b6376a9bde +CT = 49e1f64a707cf387fcd3165f2040e38401d8c878b2c8ae88f8118f1b9f39b51965ae9ef1bdb40111 + +Count = 66 +Adata = 3f27e678c580 +Payload = f8c7d89639ab742a8bcfffe776e868d671e1fbdd55807a8a +CT = 48b6862af3c381f03f7ab40b381cfb96ef01d113d0224fdca3236d02f33f49759f281315e449bfef + +Count = 67 +Adata = 1294cb9db5f5 +Payload = 8601cfd7d935e8a8487b9c39d55ca27096255f2eb9e009e3 +CT = 3670916b135d1d72fcced7d59ba8313008c575e03c423cb5e74770a07c242c3854ceb242dadc1976 + +Count = 68 +Adata = cec271332b75 +Payload = 77c85b8022f58337b364142a2474fe5cfddb31cfca48af46 +CT = c7b9053ce89d76ed07d15fc66a806d1c633b1b014fea9a10d6c65f19175cfa49898655ccdddb864a + +Count = 69 +Adata = da06bd140502 +Payload = b0f2db802475fa70af02057373844f637a3244cda4b4f93d +CT = 0083853cee1d0faa1bb74e9f3d70dc23e4d26e032116cc6b458822e49e69031431b3eea872a72eb7 + +[Alen = 7] + +Key = 79d1e38a70df1cf239be168833dcd0570bc8f37b3aa26c37 +Nonce = 8229d6d7e9e21fdc789bff5dcf + +Count = 70 +Adata = 076887d2abe900 +Payload = 83c24f3a77b83b4ef45277ba90225f3ba1722312f52b1a07 +CT = 19d880f1d959a68f162de243d4a45747ace704613359b27218d1531a066de60a95d2924a6910e990 + +Count = 71 +Adata = 7535bcc6fbd1a0 +Payload = 24f85ef683cc521387f484bc0b2ad9172f61884c09a9718c +CT = bee2913d2d2dcfd2658b11454facd16b22f4af3fcfdbd9f96dbf58406020e6df7b312b6825127f9a + +Count = 72 +Adata = f4f96d7b4384a3 +Payload = 212bedfa06b5e1a2c3a2f31f6f791dd9df8ef26077821c0a +CT = bb312231a8547c6321dd66e62bff15a5d21bd513b1f0b47f64dd755177efc87f8b1daf1fd88e51a6 + +Count = 73 +Adata = 3b7e3d9c1a7fa2 +Payload = 8b9036914bb0f440c8dbcfde9b9547be5e5ef1f56492c75e +CT = 118af95ae55169812aa45a27df134fc253cbd686a2e06f2b0be31cab31f1a20805d5c07dc516d707 + +Count = 74 +Adata = a8c35fae8912d6 +Payload = 50f3f3a91bf6fd9573d5ef54b9bb5805205b2f9865d81fd7 +CT = cae93c62b517605491aa7aadfd3d50792dce08eba3aab7a2399df9a45ad153c0dfb3fec3b9d6f7c5 + +Count = 75 +Adata = db636541f2429d +Payload = 6fbda8d435555e735443f1e6bc09e96065092efd89edd64a +CT = f5a7671f9bb4c3b2b63c641ff88fe11c689c098e4f9f7e3fe20b7da94eac8c7ef8478671165e0d82 + +Count = 76 +Adata = a8de55170c6dc0 +Payload = 640ef4c246a2c6e16ddc49072a5aeef70319149ffba071ef +CT = fe143b09e8435b208fa3dcfe6edce68b0e8c33ec3dd2d99a4979c35bdbf9538666b6fa57f0f915d8 + +Count = 77 +Adata = f8d64ce2aa66e6 +Payload = a14e3910766f31594a28ad2c3678c31d0c3aee88484ca6d6 +CT = 3b54f6dbd88eac98a85738d572fecb6101afc9fb8e3e0ea3752824a691da2e99374ae6c031d74ffb + +Count = 78 +Adata = b3c340afdc53a8 +Payload = 1b8e0a09e6364020b4cac704dc19bfa79455295604cf9c9a +CT = 8194c5c248d7dde156b552fd989fb7db99c00e25c2bd34ef04159a68706faa2e8c3376b4dbeb423a + +Count = 79 +Adata = 73824034001519 +Payload = 52c84a0735eea6c5c230644075ebfc5db0c3128056e7a8f4 +CT = c8d285cc9b0f3b04204ff1b9316df421bd5635f390950081e5adc7564721ead2af75cb98e61148b4 + +[Alen = 8] + +Key = 72e6cebdaf88205c4e74428664bc0d7eb4687a272217b7ca +Nonce = 3820db475c7cb04a0f74d8e449 + +Count = 80 +Adata = f427c47e10c45bb3 +Payload = 54bc7e3c227df4e83252a5848fea12dfdb2d14b9e67c1629 +CT = 91e7baff2b42af63e26c87ce6991af22422c1f82906858b1721961de5c768f4d19bd3034f44f08d2 + +Count = 81 +Adata = ca25504f3f5559aa +Payload = ff4493fea916f49fbb3cae2838bc84e293531092cc0904ab +CT = 3a1f573da029af146b028c62dec7391f0a521ba9ba1d4a3342968c638ecb8a2b358e8eaefd931efb + +Count = 82 +Adata = 8215753d9efc5132 +Payload = af16ab8558269a93d8e8c9e38f12a8768947d8b69be0e259 +CT = 6a4d6f465119c11808d6eba96969158b1046d38dedf4acc1f8ac11752fe51e354f3f8a68815539aa + +Count = 83 +Adata = 9e7cdbc6202e6492 +Payload = 744a167ae31a8ca20df82290766429de9ef0b7dfe199a78d +CT = b111d2b9ea25d729ddc600da901f942307f1bce4978de915489de8e241dcab16bdcbf1a1ff4d8d10 + +Count = 84 +Adata = b8d511d0ab86a07f +Payload = eeb39de1fe21b5aba654da45fe1481decb22365fa4cbe49d +CT = 2be85922f71eee20766af80f186f3c2352233d64d2dfaa053fab212a1b6dc7b953e2bc211be194ae + +Count = 85 +Adata = c74a5d4265f9f3d5 +Payload = e95c20e80153bae3fde3c3d82b6b33b35fc1959fa31a5d11 +CT = 2c07e42b086ce1682ddde192cd108e4ec6c09ea4d50e138973918ab70fe048d6c5b63a01725eddfb + +Count = 86 +Adata = fd849d3ada03181a +Payload = 6d00606c72cea3deaea5b51ae09e61924355e167058ef42c +CT = a85ba4af7bf1f8557e9b975006e5dc6fda54ea5c739abab487089bc20867f474c1127aa1320f0000 + +Count = 87 +Adata = 56825a68681f498c +Payload = c47705d897a6c7e7aed710b96e2d8532c23b82090e21b114 +CT = 012cc11b9e999c6c7ee932f3885638cf5b3a89327835ff8c34a23b0b6ac4d297dd7832a5e2102272 + +Count = 88 +Adata = 72e4da839913a26e +Payload = c822a1ee581cf85b0482c821473385bd3f28528e5e5760d9 +CT = 0d79652d5123a3d0d4bcea6ba1483840a62959b528432e41dd665766c7af21ff890bd40178f1c660 + +Count = 89 +Adata = 138457571ee8dafd +Payload = 3ffb82a83308da66e95ac63ae92931b09ffe0e42afbb4979 +CT = faa0466b3a3781ed3964e4700f528c4d06ff0579d9af07e16a6a58bb772c79481dc26861ffbd68c6 + +[Alen = 9] + +Key = 39c03a0c8634047b1635348f284d3dc1e752ab40548eb337 +Nonce = 9e2ea8eb7f56087ee506925648 + +Count = 90 +Adata = 28d157f09a71da80dd +Payload = 0662e63c88e963d3e0cf2c4653515ae4474a2c78ab0394c0 +CT = 01dcd4dd3b8c1369518136ce45e8bb9df565b0ad231a887b02ada34addf0aa2f4744ed2e07995491 + +Count = 91 +Adata = c17d311362c41d442b +Payload = d6df8b60c697093987b3d89a3667b36504b6ddddf12b0900 +CT = d161b98175f2798336fdc21220de521cb6994108793215bb38a27466b8741bffce44ef04b23af321 + +Count = 92 +Adata = 006669ef1a11b65b1d +Payload = 49ad29ef5e82b08752ac5a50dd982e4bcb700005454ade6c +CT = 4e131b0eede7c03de3e240d8cb21cf32795f9cd0cd53c2d77d11372fb0dab1c99b159e5fe9f91118 + +Count = 93 +Adata = 8eafce9ba466fd53eb +Payload = 385f9fb139dbf88561b7a500b0c7b835fe57e2698c6d9f76 +CT = 3fe1ad508abe883fd0f9bf88a67e594c4c787ebc047483cd09e4898a4046f6ec9f40e412915007e4 + +Count = 94 +Adata = 796e55fbe7bed46d02 +Payload = 4ebb149b01cbacba32d11168ca61928ea149dcf2ee2c1001 +CT = 4905267ab2aedc00839f0be0dcd873f71366402766350cba5d40a9902481bfac7ff33d08fb4b3d31 + +Count = 95 +Adata = 8f958d796be0566512 +Payload = 0d974e5621caa1d86eaaee689ccbca57843373fcf20db407 +CT = 0a297cb792afd162dfe4f4e08a722b2e361cef297a14a8bcd972d09a17172161eb68a30b593b1bd6 + +Count = 96 +Adata = cc879ff2d583a7288c +Payload = f8e0dac6a691dfb231411b5c5f70a0daff83cc637b0c7bb3 +CT = ff5ee82715f4af08800f01d449c941a34dac50b6f3156708119cc26a80c152c253fbc36cb886e0fc + +Count = 97 +Adata = 4765d696d19dec58bc +Payload = 096a36396ccfa260f28fb0919157a5076b53506c51a2a4ef +CT = 0ed404d8dfaad2da43c1aa1987ee447ed97cccb9d9bbb8549de06cc5c3bc4ad75076c774576843fb + +Count = 98 +Adata = a004f283afc3309c31 +Payload = 5b943269be41e2758a4ea6a3cc621b711a8ba6002783aa72 +CT = 5c2a00880d2492cf3b00bc2bdadbfa08a8a43ad5af9ab6c9135493b44f79a5774df6b2943b0bec67 + +Count = 99 +Adata = cdd5d8aefe49a315ad +Payload = 5f27867109e74862ce0dbc9ba73c420b93067bdede17ae51 +CT = 5899b490ba8238d87f43a613b185a3722129e70b560eb2ea7a5da4a29a9012d78b6de6f1b3e8c9ed + +[Alen = 10] + +Key = e2a92ffbb0b5eb68cb82687f12449fae5167d375131b0b10 +Nonce = 441ad5e1382e083a95224f395d + +Count = 100 +Adata = 2352648299b0413cb2ce +Payload = 048c9ba4597c3bb595bfd5048e5e9a1296f30e5c0118b177 +CT = 25247a258e4ac0a988d8def60cc174a9d4578cd5346fb5150c96e8ab8774baa421f39c64a386c418 + +Count = 101 +Adata = ce003c836a6f5f066053 +Payload = 02ea8e7e488c863584f828df13dfeb68433294d11d9ca9d7 +CT = 23426fff9fba7d29999f232d914005d30196165828ebadb5d453036cdc6bad0c5e770a6249a52e74 + +Count = 102 +Adata = d11be73a104ccc6346d5 +Payload = 6d5573c9279897d7d1602d8a95c04bb5ca3fad2dbe89a024 +CT = 4cfd9248f0ae6ccbcc072678175fa50e889b2fa48bfea4464627ad75bbfe17f3f5ddfd3dbc1045f3 + +Count = 103 +Adata = 6a7b80b6738ff0a23ad5 +Payload = 97a813e75d95d25c2edb1c705c4ffe4d7c08c756761fbc0b +CT = b600f2668aa3294033bc1782ded010f63eac45df4368b869af8943f74706cc3394a170fd49f7011a + +Count = 104 +Adata = a391acdb3a06dae4a671 +Payload = a78981ac244307451e4d3fd7f654b70cc4e6518aa47a3c18 +CT = 8621602df375fc59032a342574cb59b78642d303910d387af22597f63074ca3533bb5e107860481f + +Count = 105 +Adata = 0b9f28f2d3215785f569 +Payload = 5d649d79ff0e304e164a383c74f13d7ffab145d00cb0ec2c +CT = 7ccc7cf82838cb520b2d33cef66ed3c4b815c75939c7e84e905b5609f593c6ea9281f66cd2e646dd + +Count = 106 +Adata = 7928b1091cbfb2eef0fe +Payload = 83a273687dced7b94d569f81d75508595cde668f06406183 +CT = a20a92e9aaf82ca55031947355cae6e21e7ae406333765e1428195355618ea0cf87260ad20b6d7b9 + +Count = 107 +Adata = 3b74afb81f54a93c79d5 +Payload = b4dc3c059cf7b47dd0bb7f165a63fc80b5c6b5f3ca7eeb73 +CT = 9574dd844bc14f61cddc74e4d8fc123bf762377aff09ef1155019659f41a5f0430695b4ada9d8b8d + +Count = 108 +Adata = a46ae4c71d4c9eb72fab +Payload = 7e919581c5105d98717d0613e1ca869c6516506ea482d5c2 +CT = 5f3974001226a6846c1a0de16355682727b2d2e791f5d1a01514b252f33dc870c42260e48c4fa9fd + +Count = 109 +Adata = a1ace61711f0a09ac17d +Payload = 3a4558b55214f21cbd2ae2eda5a2321cfc2f102e059b744a +CT = 1bedb93485220900a04de91f273ddca7be8b92a730ec7028c263c667d7ed58907452c092905d0b31 + +[Alen = 11] + +Key = ef1ad3eb0bde7d4728389da2255d1f8a66ecb72e6f2f1ac4 +Nonce = 8e7d8a44244daa7df2b340993e + +Count = 110 +Adata = 521583c25eb4a3b2e46120 +Payload = 9f580cc6c62a05ce125c6bec109a48ca527ee26a64b14b68 +CT = ff0ff95bcb0bccd5e4aadd77ac6770f5013654eb3c6386fded2c87135861b43a99f258b6938f66e3 + +Count = 111 +Adata = 31adb39e947f8883fa4b69 +Payload = f16bba081bddda83546eabc9a55c81a439720dd8562ce964 +CT = 913c4f9516fc1398a2981d5219a1b99b6a3abb590efe24f132b87476d66a1bd405f484ef9ac8ab7e + +Count = 112 +Adata = f05f39eb0a3d6460076aa8 +Payload = 6baf784f63cf45a1836fa8f3609fff7870ce8cbd1e91268c +CT = 0bf88dd26eee8cba75991e68dc62c74723863a3c4643eb19a120b455b366cb104fd8b6dc2c80471e + +Count = 113 +Adata = 74c7a633ff73ff507009c5 +Payload = d8176a6de1c15a14c8b8b58725c179dc84c9308268d718d5 +CT = b8409ff0ece0930f3e4e031c993c41e3d78186033005d5400c8ca09f4bf06b1c27e75abf15112e49 + +Count = 114 +Adata = ab322a88cf44b9ca774415 +Payload = 3706e4d8ff748574f382e5f9b0a3b6258f1f360fd87001b0 +CT = 57511145f2554c6f057453620c5e8e1adc57808e80a2cc25b3159274a7de3550baf759f7fae53dbc + +Count = 115 +Adata = d6fe6e17221d4e06ed3ab9 +Payload = e02217394772deffe218c405e40f2a3a56ca01d55d6d3330 +CT = 8075e2a44a5317e414ee729e58f212050582b75405bffea516fba8d193e133e6f78daa39681cb262 + +Count = 116 +Adata = 2739d2cdfcbe7d5cd7d28c +Payload = bb713f74a884bd1a994adba87561d637853c6181290ef5e8 +CT = db26cae9a5a574016fbc6d33c99cee08d674d70071dc387d65f92db3b3d1c2de04c69c5d06b0e001 + +Count = 117 +Adata = 5841571299cd064a6262b7 +Payload = 9641dedd50d80ac0abf7591436065fa2e23e4687abbb86e4 +CT = f6162b405df9c3db5d01ef8f8afb679db176f006f3694b716e4d20ab5ffad6f71155f6839dfdbb25 + +Count = 118 +Adata = dc5d7fd97bb3243ba585fa +Payload = aefda8501193edacb8abb94fff875529a537a462c4b9b69c +CT = ceaa5dcd1cb224b74e5d0fd4437a6d16f67f12e39c6b7b090ebc3af2de52b8bee3d130fa973f716b + +Count = 119 +Adata = 8789e0b3e0dc13d9725b37 +Payload = 65e53f549b62aca03f21ab2a494b93805e02cfecf4f12aa4 +CT = 05b2cac9964365bbc9d71db1f5b6abbf0d4a796dac23e731b5cd5a004a0ef28e30383bdaed8f93c7 + +[Alen = 12] + +Key = 44cba20b7204ed85327c9c71c6fea00b47ce7bdde9dea490 +Nonce = f3329154d8908f4e4a5b079992 + +Count = 120 +Adata = f1e0af185180d2eb63e50e37 +Payload = 6333bde218b784ccd8370492f7c8c722f8ef143af66d71d7 +CT = b9401a4927b34dc15e9193db00212f85f0c319781ec90e3b4484d93cb422cb564acc63d3d18e169c + +Count = 121 +Adata = ea74231e49e667ca1c21d46d +Payload = 3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e +CT = e67d8fbeec794d42fc64d7f36a87d2ac22aafa440021ea72c4c151d9927e6a9f19d47ff7d79ca6f6 + +Count = 122 +Adata = 7f5871a8300471dc325f8289 +Payload = c642c9722d84d708682350dc70bdaa9a1181a415a9e72b93 +CT = 1c316ed912801e05ee85c7958754423d19ada9574143547f959eee29be1415ab03444de0fa42707d + +Count = 123 +Adata = ee7e6075ba52846de5d62549 +Payload = 2286a1eddd80737a724ca941217e9f0232870b6c2f20d29c +CT = f8f50646e284ba77f4ea3e08d69777a53aab062ec784ad70ce97c1c8aea70de04580d7b37f8c014d + +Count = 124 +Adata = a30f2fd445820cdf80014554 +Payload = 92577d5db20391110309d490f52acecdfc18382f368bbe42 +CT = 4824daf68d07581c85af43d902c3266af434356dde2fc1ae23b536f993381e525a14599dd5c02e80 + +Count = 125 +Adata = 0cfec933831644b468724e80 +Payload = 6803dc3f7c06568ca78ee5aa2e9b1b354a4f1e067ff6a25b +CT = b2707b9443029f81212872e3d972f392426313449752ddb7d6ea722fdd82ede2c7b8832dde3cbe80 + +Count = 126 +Adata = 6bd14e3bf91dc7fd6be07647 +Payload = 5580672e52aacb9d714a34c31c33fc221e13e8f90849adba +CT = 8ff3c0856dae0290f7eca38aebda1485163fe5bbe0edd2565c2994b2b469ad977564d83db1ebfe38 + +Count = 127 +Adata = 6c6ad35e97d023217018162f +Payload = 1bd1bcc6766d251144376d91ff93ef83033d0e0ee546266f +CT = c1a21b6d4969ec1cc291fad8087a07240b11034c0de25983ac31ebf9e255eecf3c69ddf198760556 + +Count = 128 +Adata = 52c35db85cc34b6efed180ee +Payload = 28f71a2fe498f89203a5d23e8f8fa64b124aea6459fe721d +CT = f284bd84db9c319f8503457778664eec1a66e726b15a0df13424079e3de87fa59c3d10fd62380a90 + +Count = 129 +Adata = a96e4776270683ee7d0c9b6e +Payload = 5be078ead1926074afca81f9a97dc93dcb954c955e4343e4 +CT = 8193df41ee96a979296c16b05e94219ac3b941d7b6e73c082258e1f3fc3eb7e976c86c8a21bd6569 + +[Alen = 13] + +Key = b5f43f3ae38a6165f0f990abe9ee50cd9ad7e847a0a51731 +Nonce = 13501aebda19a9bf1b5ffaa42a + +Count = 130 +Adata = ead4c45ff9db54f9902a6de181 +Payload = 3726c1aaf85ee8099a7ebd3268700e07d4b3f292c65bba34 +CT = fd80e88f07dad09eed5569a4f9bb65c42ef426dda40450119503d811701642143013f28ce384d912 + +Count = 131 +Adata = e63b89e95df8338ecdcc885c3b +Payload = 37f86aa62b1e31e9ded3e1a38a7e1a8a638d619ac109694f +CT = fd5e4383d49a097ea9f835351bb5714999cab5d5a356836ac6d3f9c7b9f25e09ce164a11370b8b05 + +Count = 132 +Adata = a2161536e263459e0b0a29a225 +Payload = 1749f5977197359a5d318d5fea38aba95b3603f1d7011e66 +CT = ddefdcb28e130d0d2a1a59c97bf3c06aa171d7beb55ef443e02b848b006c28803303fd97bdc35476 + +Count = 133 +Adata = 8ac95a6ae0bce0fb07f85368ab +Payload = 0842bfb8b38283257c2ea58b29c8350775f1dbf15f73c905 +CT = c2e4969d4c06bbb20b05711db8035ec48fb60fbe3d2c2320431de2bc45b2b726bfda92939a11f68b + +Count = 134 +Adata = 44cc9b2510680c4d73f1938c77 +Payload = 68d09fce5e89e4ef6d453b8ee326090cedb97b75b886c7b3 +CT = a276b6eba10ddc781a6eef1872ed62cf17feaf3adad92d96786add8c2619f0782ca12312a1d64266 + +Count = 135 +Adata = d8a662ab8449bd037da0346a24 +Payload = 45245de4ac6a6196a0b15b77c622a21bb50627379ddb4256 +CT = 8f8274c153ee5901d79a8fe157e9c9d84f41f378ff84a873b6bd4a09f9b4aa2864d39ff1a03e0ff7 + +Count = 136 +Adata = 8ed39da1d9179e77156eb909f3 +Payload = e928e37dbe8389a53c650edc86f83cd3589a53dc8e45adfd +CT = 238eca584107b1324b4eda4a17335710a2dd8793ec1a47d819b6935778ffbc0953974de0a9d87a31 + +Count = 137 +Adata = 423515f7bd592d6a7a2408661a +Payload = 4c3bdc6186297896097b3297ba90bcde78dc8a9efe3bd8b1 +CT = 869df54479ad40017e50e6012b5bd71d829b5ed19c64329400a3da0d3ce34a272b51582a998f461e + +Count = 138 +Adata = 5a6bc2cd6890a473d478a582b4 +Payload = 1c5ebaeb7b926a39b8aaf65a4c484b113d6f2caafadc33ea +CT = d6f893ce841652aecf8122ccdd8320d2c728f8e59883d9cf4ef28c338f497a40f550f2945734ad1a + +Count = 139 +Adata = 7bdc26b5b4df58af539d91eb2e +Payload = be5c9fee6babf569c66e6a0d0f3c4dc314f40c0aeca493f7 +CT = 74fab6cb942fcdfeb145be9b9ef72600eeb3d8458efb79d2e07f1998e57ba9b611568632dc5cb9fe + +[Alen = 14] + +Key = 13f179aa2a23bc90a85660306394940e9bb226ce3885ec01 +Nonce = aaa52c63ca1f74a203d08c2078 + +Count = 140 +Adata = 5cc924222692979a8e28ab1e0018 +Payload = d3b36c6289ad6ae7c5d885fe83d62a76270689ce05fa3b48 +CT = bc4fcef401c2e1d1c335734ff23ea52c3474d2e6f31648a7f58649400ac9e825b038d67f0c2a6f1c + +Count = 141 +Adata = 21fb9cdd9b110bbbc6832275dfa7 +Payload = a7742dd9c3e8bbad08157fbd01ebfb94e1639117c4b4eb5d +CT = c8888f4f4b87309b0ef8890c700374cef211ca3f325898b23fa5ad4142e0b4650fa5cc8f7ef70d62 + +Count = 142 +Adata = 9919ddb6ee6c330646cd15953d39 +Payload = 297b4498bf5427e6341aa9275c1f62e3b0c9b150a195ae72 +CT = 4687e60e373bacd032f75f962df7edb9a3bbea785779dd9dfec551d11b8647432cc4320173939600 + +Count = 143 +Adata = f94cfd1f8c7902a57784c10b9a5a +Payload = 2218868033e17220655f0196dab6193c58293ca105d467d9 +CT = 4de42416bb8ef91663b2f727ab5e96664b5b6789f3381436a79a075ec2cacee1482b8328b697a3b2 + +Count = 144 +Adata = 63f3fe58c348dc6bcbb44c3c370f +Payload = 4a9bc26fb10000a57b9e73a8a3d30f66ef9de8782201ffa8 +CT = 256760f9396f8b937d738519d23b803cfcefb350d4ed8c4739cbe17b4edd64a3dcd2b8ae3352c04a + +Count = 145 +Adata = dec0ce763833305aa9c9efdc2c65 +Payload = 1b61b3ff3e4847a17f55f7565826b0e2ccc1368f4de32022 +CT = 749d1169b627cc9779b801e729ce3fb8dfb36da7bb0f53cdf54665c476d0741164685b0d81caca31 + +Count = 146 +Adata = 592ef6784ee839a049e0d96257fa +Payload = 32e5998b37987a38800f5bfe3132979ca1447314570aaef7 +CT = 5d193b1dbff7f10e86e2ad4f40da18c6b236283ca1e6dd18500d93b11fecc8b4560320878ba53550 + +Count = 147 +Adata = 4a47a82b999a2a739959f153a091 +Payload = 84acfb6cf10b301558e5acbf41bbbe0b145dc66dc600f4df +CT = eb5059fa7964bb235e085a0e30533151072f9d4530ec87303c2a41443578adaf31483bbb6b9f10b0 + +Count = 148 +Adata = 4ceba98cc0ff5de1a7d580cf23d2 +Payload = d7c73d77a286df38aad116843620911c92e11486be5fcb0c +CT = b83b9fe12ae9540eac3ce03547c81e4681934fae48b3b8e32232a856c07999e99a4701988b486ef2 + +Count = 149 +Adata = 15e3b3c5794fececd703ac58ccb2 +Payload = 140882c5d3534bb0861e7ba9423e67439a02ee6f0b0b00f3 +CT = 7bf420535b3cc08680f38d1833d6e8198970b547fde7731cb3a6d50a92f3183c0c5090edc3c7f822 + +[Alen = 15] + +Key = c1dfc48273d406a3a7b9176f80b2dc4e9a7f68134bab66d2 +Nonce = 1ac53ba965cdaeeef7326a37e4 + +Count = 150 +Adata = 39ba54a410a58a5d11615a2163cc3b +Payload = 67d9728a88f1fac3af43ed6d634ba902896bd226858697d9 +CT = 360f0fc714994e3b59448b50cdd61d511b4f09e0e5fb5ac826a51fe5b9b598a17eb3da10f936813b + +Count = 151 +Adata = 38b0cca09d69320105d24ee3f96684 +Payload = a8365ba9fcfff060b28895f7a2d786c5991a8f7758962caa +CT = f9e026e460974498448ff3ca0c4a32960b3e54b138ebe1bbba673a94f4280e84724f4a2510165e9a + +Count = 152 +Adata = 76718dfb9c68acdd82592d96def39a +Payload = 497be597dd695cb159d8a64f44049c3b549ac927837b1b90 +CT = 18ad98da4101e849afdfc072ea992868c6be12e1e306d68118865ab37be6f015316e0d177b6c2e91 + +Count = 153 +Adata = dd719ba1710916a546233c1494a7a7 +Payload = ca452c21383ebc3fb584f0d59a227374854983f243a3f460 +CT = 9b93516ca45608c7438396e834bfc727176d583423de39713d903f67ad0d72fb8ffea2035216b769 + +Count = 154 +Adata = d893fa2bd7c70e21a5934dc2e99037 +Payload = 3dd118ed65453d3d7844d8de78d7a43587ac5e9305b11464 +CT = 6c0765a0f92d89c58e43bee3d64a10661588855565ccd9750b885e3e054f519d0355db1bd589bb35 + +Count = 155 +Adata = 97c60265a3a6993b97ac1b375a79b8 +Payload = a7375ba32251af0138bd9fd8fcd56a7c43ab2ca9a7fc0117 +CT = f6e126eebe391bf9cebaf9e55248de2fd18ff76fc781cc064a950e4bed4137e38787839e39924821 + +Count = 156 +Adata = acfdf302ed116ac4755069d1704423 +Payload = d39d188f28521e4fb0a0c5e48e6d6efe4383c95b2535ea8d +CT = 824b65c2b43aaab746a7a3d920f0daadd1a7129d4548279cca94dd97fd2a5d50eb7dd6234b40c525 + +Count = 157 +Adata = d449f97164aae9a3046624e98810bc +Payload = 758102470e221e30d87d2807b5f8b793a7a56c83eecf32a4 +CT = 24577f0a924aaac82e7a4e3a1b6503c03581b7458eb2ffb596f11450d5d2ba55ffb4a6cf7eab847a + +Count = 158 +Adata = 3e6c914a196e175079315b1c92b2b8 +Payload = 1db875c4b4f9dd4926dfb5604d6c4d21aba7d905aed9d1b0 +CT = 4c6e0889289169b1d0d8d35de3f1f972398302c3cea41ca164894e9218ecacd143fb62df69a13d33 + +Count = 159 +Adata = e2b7b00d0cfbdfcc24f1819ae1869f +Payload = d7a75bc621addccbbe162b86d536d69c887c278384af54e7 +CT = 8671268bbdc5683348114dbb7bab62cf1a58fc45e4d299f685a7c19bc9c2f8e36ed95015ebb679ae + +[Alen = 16] + +Key = d8a662ab8449bd037da0346a24565683a3bbbbd1800e3c1c +Nonce = 166fb8d0e110124c09013e0568 + +Count = 160 +Adata = 1c1c082eeb5b8548283d50cc2ace1c35 +Payload = 61fdd10938557080191d13dd6c3002dd445d9af988029199 +CT = 23c05927502a4ee6e61e4e10552d49b020643eab476eeacc867601fe79a122a7817819655183283e + +Count = 161 +Adata = cae884fa25adedd883ef4e7c855def19 +Payload = 8c7ae2c3c503e9072d6e04e44c2ea78fd24994503567a136 +CT = ce476aedad7cd761d26d59297533ece2b6703002fa0bda63160bb976ab072aec8fcea8eab3dc5aff + +Count = 162 +Adata = a350ed58c04473e113b9088b1fb9dad9 +Payload = 863f9a26182f131c594972398b52b3a01a9d314fd9390bf4 +CT = c402120870502d7aa64a2ff4b24ff8cd7ea4951d165570a1291b2c13a3f5e49ce35b9047ee1e8627 + +Count = 163 +Adata = cb7090f7a465782f680fd44cbc558107 +Payload = bd94c9ad6253c25dc417f87b6e52e03621ccf4b3bff5b402 +CT = ffa941830a2cfc3b3b14a5b6574fab5b45f550e17099cf57fdd9fd1d469a9042b80e6458d25292b4 + +Count = 164 +Adata = 914cf55a3fc739b5f87ac7518cc4171b +Payload = c313bd213dc29c00691e25ce028884192e21a820003aece4 +CT = 812e350f55bda266961d78033b95cf744a180c72cf5697b1a8b8e82175ff30c69ea71d2cfb814ada + +Count = 165 +Adata = adc8b69d84ef7ae62f9ca9f371d3488e +Payload = 85e4e053b976e06a64dfa8523130cdd802d3e7c3d6d797c2 +CT = c7d9687dd109de0c9bdcf59f082d86b566ea439119bbec9776fa36db27b2f84d1b8ab55e2fc89ab8 + +Count = 166 +Adata = 29ed477994dd231d3a71157eb56d219d +Payload = c77aae5fd09dc9bceee7428e0734d4b0556528396a58f909 +CT = 85472671b8e2f7da11e41f433e299fdd315c8c6ba534825c0e32058ea939036805a735198934a072 + +Count = 167 +Adata = 494c8f931029a4919e2dcbc16512a8bf +Payload = 1f47273103f265f963e498878361c06c01a5ffcfb630a161 +CT = 5d7aaf1f6b8d5b9f9ce7c54aba7c8b01659c5b9d795cda3437098c81475f8a1d8f3b0e63d499d387 + +Count = 168 +Adata = 53200bc5d1f1fb0eeff02d2bc42f7d54 +Payload = a38231af405dc7b70c8dbc8cb84e6be8a0dc2e95fddc2ce8 +CT = e1bfb9812822f9d1f38ee14181532085c4e58ac732b057bd9d7317973878957e8fc1fa57a025a3e9 + +Count = 169 +Adata = 61e0e28bf344a9a1b04b15156e06498e +Payload = a0d3a94ba6bb3bedf38220d1cba7e91273ad19f9a1c436c0 +CT = e2ee2165cec4058b0c817d1cf2baa27f1794bdab6ea84d95b0aa1befae96e71b9d221673844b1cb7 + +[Alen = 17] + +Key = 116f4855121d6aa53e8b8b43a2e23d468c8568c744f49de5 +Nonce = 924322a3ef0c64412f460a91b2 + +Count = 170 +Adata = 03c2d22a3bb08bbb96b2811ce4b1110a83 +Payload = 1bd3b5db392402790be16e8d0a715453928f17f3384c13a7 +CT = ad736402626df0f9393fe4491eb812725ad39d6facf20b5b2f9340b0d48a17ae1cc71d7515e61ee9 + +Count = 171 +Adata = f390387610741d560325b5d2010d8cd4a0 +Payload = c93aaa04279e451b6880ed7b7fdb3ca9e80ab76180434937 +CT = 7f9a7bdd7cd7b79b5a5e67bf6b127a8820563dfd14fd51cb717bae4c040561bcfcf80fd842ae8dd8 + +Count = 172 +Adata = 891d7988a56415a7b433f463b1e80eaa62 +Payload = 2611612ccb5ffefaa73195509bb52c641472bca0dfd09d49 +CT = 90b1b0f590160c7a95ef1f948f7c6a45dc2e363c4b6e85b5bc9fb15d874feccb6b5f581fa470734f + +Count = 173 +Adata = 831c0fed5e600dd82d7d55669262a9a17d +Payload = 08136e946e306cde0544ddc2f3f4a529c89c7b77a5e635c1 +CT = beb3bf4d35799e5e379a5706e73de30800c0f1eb31582d3da72589ee50d23f925f7998ab3ccac37f + +Count = 174 +Adata = 32ca9d412d4ef0e89928496e96c9de7f2e +Payload = 695aaac402942de7d899cc3f741c7fb2b2d8247a7676cf29 +CT = dffa7b1d59dddf67ea4746fb60d539937a84aee6e2c8d7d555c0b608f331dca47c65f5c879f2d532 + +Count = 175 +Adata = 0746b2e6149c7f55854e9ca3e6861bf0e9 +Payload = 8f958d796be0566512f0512dcebd2e12f3160b05b72ae955 +CT = 39355ca030a9a4e5202edbe9da7468333b4a81992394f1a9b039bd916e923e2fc1f7c60eb59916fd + +Count = 176 +Adata = 0e4cbd1c574d656112bf6e70a8f23347f0 +Payload = 367ecd1b71dfb96a84e2369f28705dfaebf0c73ed35d5364 +CT = 80de1cc22a964beab63cbc5b3cb91bdb23ac4da247e34b98ac07f2c0847069fe5be26e623033f532 + +Count = 177 +Adata = 1a05ff12412bf728497536534c234901ce +Payload = a9ccee975feb10f635d548a8502f7c8b6adbd2be74117257 +CT = 1f6c3f4e04a2e276070bc26c44e63aaaa2875822e0af6aabf4e66a2b210e5a03bb10ff2926ed8a48 + +Count = 178 +Adata = 3bd063a51c71fab5aeb47e7f8f958d796b +Payload = 7df6220599d6235eb450989b6f0cd6c96db62b0d13afc4f4 +CT = cb56f3dcc29fd1de868e125f7bc590e8a5eaa1918711dc08ec90169d0c5c11fff8f255fedb13a99a + +Count = 179 +Adata = f0d334e0a27c3d00d56b15c2ee426e6347 +Payload = 6f65a24344c32debaf9f8c3fa426fe0b139e8ad1c8b1fbbb +CT = d9c5739a1f8adf6b9d4106fbb0efb82adbc2004d5c0fe347170141cf3f207c4f0fc1b0238477cfad + +[Alen = 18] + +Key = e67f3ba11282d61fe36e38cab7b559c2fd9cbe8bf7eb5863 +Nonce = a727ed373886dd872859b92ccd + +Count = 180 +Adata = 68d199e8fced02b7aeba31aa94068a25d27a +Payload = d7a954dae563b93385c02c82e0143b6c17ce3067d8b54120 +CT = c6cfaa1f54d041089bd81f89197e57a53b2880cefc3f9d877e30b2bcc3f1ea9ec2b8f28bf0af4ecf + +Count = 181 +Adata = fc4bbe329a86089ebe2a2f3320dad55a9bda +Payload = a206a1eb70a9d24bb5e72f314e7d91de074f59055653bdd2 +CT = b3605f2ec11a2a70abff1c3ab717fd172ba9e9ac72d961753a6e6844102d6bb86986c030765d3393 + +Count = 182 +Adata = d8741e540330692d83cc806a8ac1c4742be6 +Payload = 56ef76dbec6b8b46f5b7b4e311c0baaa6fcf54c69c0b9c3b +CT = 4789881e5dd8737debaf87e8e8aad6634329e46fb881409c3f92a80b1d82f8c1dc32bfe64adca12a + +Count = 183 +Adata = c8b1992dfba55b4ab86b480546c861655e1a +Payload = 2729636112f2abe2c76ea5e52a3f80b0f882f0f3b6f7c806 +CT = 364f9da4a34153d9d97696eed355ec79d464405a927d14a12fb48ad162b0c0678674d79d26a6b5ef + +Count = 184 +Adata = 347e12eec56e95aafcc7d25bf10fc756b4e4 +Payload = dd433eb7422c7c4dccee57a1679633ced3b5f08df763d457 +CT = cc25c072f39f8476d2f664aa9efc5f07ff534024d3e908f081c7cd81c974d985bf24b7fe9542141a + +Count = 185 +Adata = 45b35a04d6e2645e9a5aef206ed4e36199c9 +Payload = 70523bc397417e09d791a4976960e02636ca7144a5681cf7 +CT = 6134c50626f28632c989979c900a8cef1a2cc1ed81e2c050a7f6a5c04e59896074e1594706ab27e9 + +Count = 186 +Adata = 378b48531fe34f55125b2f14f59715dd6ef0 +Payload = 514cb462dd4b117f26cac22062fcbeb353650c71649a7b3d +CT = 402a4aa76cf8e94438d2f12b9b96d27a7f83bcd84010a79aa9d16c3ab79276cff345444511940a9d + +Count = 187 +Adata = 73ed686d6fecdc031cd97653137f269d6537 +Payload = 7f0c2b261db3f3de0ce3a733f4b8c446c374567d96d00379 +CT = 6e6ad5e3ac000be512fb94380dd2a88fef92e6d4b25adfdef92bf8aa6facbe6f9607ea02b54a1bf0 + +Count = 188 +Adata = 5b0441107e5560be94f030a41cedbdb116d9 +Payload = ebb3e2ad7803508ba46e81e220b1cff33ea8381504110e9f +CT = fad51c68c9b0a8b0ba76b2e9d9dba33a124e88bc209bd238e4936ee93b5c7a302913292df33c1700 + +Count = 189 +Adata = feedcc5f8524fe7d49bcd178415b9f4c450a +Payload = 3216dce3b8b1ce0e79e40fffcac728ab191aaaf319d971d3 +CT = 237022260902363567fc3cf433ad446235fc1a5a3d53ad7493426b6193afe765a76b3dec00266e69 + +[Alen = 19] + +Key = e0a29a2c7840cf9b41de49780b9ee92d646a4bfc5b9da74a +Nonce = fc9fd876b1edded09f70b18824 + +Count = 190 +Adata = 36e15baafa0002efbb4bb26503b7e3b79f6c68 +Payload = 344dc8b6bd66a1fbbe330a95af5dd2a8783dc264d6a9267d +CT = 43b3b96aa5a54378f3bb573ffda3e154aa7f425fc3008175b60a77b9d38740356b544b1c0f259086 + +Count = 191 +Adata = 712b788f0276e2b5a58be80f9114a12ab2a268 +Payload = 6d0546d4e95d1cfcb37a8f88a62064f5d95791311511535b +CT = 1afb3708f19efe7ffef2d222f4de57090b15110a00b8f4535f750bb4cd42db3038e2c1622b72cea8 + +Count = 192 +Adata = 07f77f114d7264a122a7e9db4fc8d091334a03 +Payload = 05024ce13b9057dd2c509db7dbcbd5585e4e64a1e2e380ff +CT = 72fc3d3d2353b55e61d8c01d8935e6a48c0ce49af74a27f761e77b59ef7eeeae35bb53bb9543b64a + +Count = 193 +Adata = 899b036138cee77cd28382ba27984d858a6351 +Payload = 77b8e735b13b10e45e411ab94c6fe1a9eb89f0a7af40ff1a +CT = 004696e9a9f8f26713c947131e91d25539cb709cbae9581244a60fdb473098a11b2176d37b2c4643 + +Count = 194 +Adata = 4b000440a8484a5201cd54aec058919769772e +Payload = 6b21800ae599a15254bb33f0bb080788fb6e9fa054bfd8b2 +CT = 1cdff1d6fd5a43d119336e5ae9f63474292c1f9b41167fba58d4afc30a7f672ea34e05ec1843d848 + +Count = 195 +Adata = 73a222e681ed1ca47d92a6dd90625d895fbf29 +Payload = bfa9d9af6e1f32b6626a1cd89b1c32513b5b50a18ddab028 +CT = c857a87376dcd0352fe24172c9e201ade919d09a987317204ef270e0f3b5e3ca0b8440af65c76e85 + +Count = 196 +Adata = 7109a3a36b286059bc1a1abb2767c92f884e3f +Payload = c68b1bc0050e19780ab53efbea175634f70a7245d966966e +CT = b1756a1c1dcdfbfb473d6351b8e965c82548f27ecccf3166ffb66991b38a0345fbbff5f2362f87de + +Count = 197 +Adata = cd15973753b94b77bb4b778de8b3b0cabbde85 +Payload = 4256f1c9b64390fe2120df9fd38e497c2903c2ca5679ab75 +CT = 35a88015ae80727d6ca8823581707a80fb4142f143d00c7dd033a087c44c2e44adbeb333aa9ded10 + +Count = 198 +Adata = 6e5e0793855f7145e13a5872f563e5ec61cfd2 +Payload = bb0036b34b0c20094d335a8c74f6b3dea42eeccf4145192e +CT = ccfe476f53cfc28a00bb072626088022766c6cf454ecbe26ff9c8713422fe38d5bbf2dedccbffe10 + +Count = 199 +Adata = f844684f5404e7d8eedfa20394b40b4f5d910a +Payload = 86afa9cdd743916563ebfd3adbdd56e015ea3a4ebc61cfe2 +CT = f151d811cf8073e62e63a0908923651cc7a8ba75a9c868eae75de56eabcf8e02c1a27705adef2732 + +[Alen = 20] + +Key = 26d0a3a8509d97f81379d21981fe1a02c579121ab7356ca0 +Nonce = 8015c0f07a7acd4b1cbdd21b54 + +Count = 200 +Adata = 093ed26ada5628cfb8cfc1391526b3bcc4af97d9 +Payload = 37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711 +CT = a3a60b422eb070b499cf6da0a404b13a05cedda549c6b93e6ca0e07e04674f21a46df2659a5905fb + +Count = 201 +Adata = 7df13c9d2247aa40af7bbe2da98bd366d8b47b43 +Payload = 93925579b6367ff592ecbd59495fdeccb50f31ea4fa390bc +CT = 079f7430e3ef9b6373c1c0cb11d884507d02a31d83cd9e93836597806f5da1d176c745d95c4fa46a + +Count = 202 +Adata = 7f369bbc99b6f08049eeb43566269a174829d4dd +Payload = 8363aef9c7c34e1f8149de46c97d5ac79d38c6ed31ab1d12 +CT = 176e8fb0921aaa896064a3d491fa005b5535541afdc5133df826dda99111691993027628c70ff6ae + +Count = 203 +Adata = 04aa8442179f62babad0c006e36af0c21105f27a +Payload = 17281acb525b13653000ab45d86e70106c10a93c99b18f76 +CT = 83253b820782f7f3d12dd6d780e92a8ca41d3bcb55df8159d074b018143a7ea1b5369b7f80eae20d + +Count = 204 +Adata = 997e646014f19a53beab8877ca6022bef23016f1 +Payload = 5d48a71557608736eded309027a80349a18e9ce5dee2bc6a +CT = c945865c02b963a00cc04d027f2f59d569830e12128cb2455db17d3f75214c3cf39858617cfee57a + +Count = 205 +Adata = 60ffcb23d6b88e485b920af81d1083f6291d06ac +Payload = 6c9d11cfb64d96bfab61c04a25d9e19294fb7330fb4847c8 +CT = f8903086e39472294a4cbdd87d5ebb0e5cf6e1c7372649e79550998376e61e11a5a69e9f8fe1c329 + +Count = 206 +Adata = d574632658bf456dfbb11c2653602ed0f4dae777 +Payload = 7d41688c86d5e3bc53966810f2299fdd732e3471fb0a88f9 +CT = e94c49c5d30c072ab2bb1582aaaec541bb23a686376486d6a1b0d05a7ebc657c3235479893bf7e5d + +Count = 207 +Adata = d896ed60128f4bb0277d3af94c5138cf91697aa9 +Payload = 8c7ae2c3c503e9072d6e04e44c2ea78fd24994503567a136 +CT = 1877c38a90da0d91cc43797614a9fd131a4406a7f909af1980c98c8959c158ce209aebcbd554f250 + +Count = 208 +Adata = a350ed58c04473e113b9088b1fb9dad92807f6b6 +Payload = 49bc9d3bcf3c22daa8cf55c1b59d4bffddc2412d60518e98 +CT = ddb1bc729ae5c64c49e22853ed1a116315cfd3daac3f80b7573175f9105cd16ee384465ebb232200 + +Count = 209 +Adata = 1db5887001204194e8b5dcee92c8af8fa5f7321f +Payload = 25f3788e0d3dd8f5821faa4e45a9d6b3995fd881f927135c +CT = b1fe59c758e43c636332d7dc1d2e8c2f51524a7635491d732b67e993384f2e7229d1838efd040d99 + +[Alen = 21] + +Key = aac60835c309d837aacc635931af95702a4784c214283ebb +Nonce = 0e20602d4dc38baa1ebf94ded5 + +Count = 210 +Adata = 796e55fbe7bed46d025599c258964a99574c523f6a +Payload = e8610756528f75607b83926597ef515f4b32a8386437e6d4 +CT = e0a3d5f43e688ce104f4ae1a4fcd85500aa6b8fdbcd1b8d3003c0c3b7369e79339433e1754c0937f + +Count = 211 +Adata = 5170836711fcb1a350b087907d8a17c7637aa1595b +Payload = c61b0c1845fa9b2e0013b3fa9a8cb4f4fbbc6846f63ed180 +CT = ced9deba291d62af7f648f8542ae60fbba2878832ed88f87120a7f18d021833b167bf330c4858239 + +Count = 212 +Adata = 2a68e3fe746f593c1b97cb637079c3e5ee352c107a +Payload = 10c654c78a9e3c0628f004b061e28c39a3c23e7250f53615 +CT = 18048665e679c587578738cfb9c05836e2562eb788136812ca9698d9a88e892c364e57dd35c2f17a + +Count = 213 +Adata = bf38ca0e89b8f5ccd29387f7f193ab5a967caa715b +Payload = fa3a959fdff853c39f76da626094a1ea6dbc78bd2f091a79 +CT = f2f8473db31faa42e001e61db8b675e52c286878f7ef447ef3839d6f7e20a2e343f4c4da9eb9be13 + +Count = 214 +Adata = bee00f2f75a4415ce993d2d14a6d8e01d1d59a48f6 +Payload = 76d12e3c4c5d990bf563c60aa4999e52998d887f97477f6d +CT = 7e13fc9e20ba608a8a14fa757cbb4a5dd81998ba4fa1216a6630bfb7a2a2441e020efdf36274b72f + +Count = 215 +Adata = d5b614e4e8f72a5d8b1ec2b375da5dac64c2cc30b1 +Payload = 693fae7af84aa397f0b2baaed9b3c7953f75e7424c49b634 +CT = 61fd7cd894ad5a168fc586d10191139a7ee1f78794afe833866bcee343ec5aae61f9effa19b99d3b + +Count = 216 +Adata = 33f11aa36d8ab0fc53486839a576b31ee915dbd769 +Payload = 56ce9a09f38127b14dbbdcaa59f363c92a3b9843ad20e2b7 +CT = 5e0c48ab9f66de3032cce0d581d1b7c66baf888675c6bcb00331b60eb252f744a06b4a95aa9f4e7c + +Count = 217 +Adata = f40bce1a6817b29b9e8b56f214fcca7dfde17e7ee6 +Payload = 5cd8986e974d09ede34ba68fd81d6109a64092e7fbbaf87d +CT = 541a4accfbaaf06c9c3c9af0003fb506e7d48222235ca67a4153778a644cb2469cef3ad125e257bc + +Count = 218 +Adata = 53c457d8d4d4ab95ba116c28b82c16743cb09de9fe +Payload = 9c3c610f204d98702dd91ea28e0cc14830b26bb5e2ee0349 +CT = 94feb3ad4caa61f152ae22dd562e154771267b703a085d4e7013e1c34dbc5efc7bcd4f8e52797644 + +Count = 219 +Adata = c7acf1b17609dc336df1006ffac6497777cdfd497c +Payload = 90c5dd9db0316dac89db18f70491bdf0a06a6a7f72b77d9a +CT = 98070f3fdcd6942df6ac2488dcb369ffe1fe7abaaa51239d66aed667c761b7dea44822e30cff671f + +[Alen = 22] + +Key = 671544bf2988056f7f9ccd526861391a27233793a23f811f +Nonce = 0a259148a1d081e0df381ecd0c + +Count = 220 +Adata = 61dafc237cb52f83ab773ba8a885462b6f77d4924611 +Payload = 576b069ae2713f53d2924c1fd68f786cb2eec68892f9e1be +CT = ce06b3d09b02921f290544032a081a7766612940048867281bb089af0245792c16e6320cf5ffa19e + +Count = 221 +Adata = 87e49b8164e7052becfa0c966991637b38df833fc5f7 +Payload = d7eb0d7dd737805cd3b8dbf451aeea2fa1f6a96eb58cb428 +CT = 4e86b837ae442d10282fd3e8ad298834757946a623fd32be3cec29bd5df92363d6bb75456f5cd32b + +Count = 222 +Adata = d302a518d7c625756d3e4c8cc2b1d973a19107c945fc +Payload = 77d8c9e6321314524afd05b7ad599c29f4eedda9e9f0763f +CT = eeb57cac4b60b91eb16a0dab51defe32206132617f81f0a901ca82cddb78a2fe3904d1d8bf6fe5b2 + +Count = 223 +Adata = 6566bb616a94bb03df5c26b722bcd38d516285c5f6c1 +Payload = abbf28b3ae164051648293d0b94e11f5af8468450005c7c0 +CT = 32d29df9d765ed1d9f159bcc45c973ee7b0b878d96744156d095ad121f0f76f07b715cad996def52 + +Count = 224 +Adata = 141be3601e38185a9fa1596d2ee406415c9673af32f5 +Payload = b67d50110f844b36a00d352123012a1123c7c3cba959dc48 +CT = 2f10e55b76f7e67a5b9a3d3ddf86480af7482c033f285ade8529ec8f477462dc2409482c3479756d + +Count = 225 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732b +Payload = 2a63f7b09b43fee65738e8115bd8419b3ef3e8f86eca707f +CT = b30e42fae23053aaacafe00da75f2380ea7c0730f8bbf6e9b14fe8dbb3c361ea61d7b44e689a1c48 + +Count = 226 +Adata = 87faef55c54250c30232ccaf5efa1ff41b6243b2a5bc +Payload = 59dad755af92c29522da4348ab9b3037fe87004f5fa1394a +CT = c0b7621fd6e16fd9d94d4b54571c522c2a08ef87c9d0bfdc54f0659fae291f943f2f3b33688602cb + +Count = 227 +Adata = 5d895fb949344e603ce5de029842b20d2bb614ecbbb8 +Payload = 64d8bd3c646f76dc6ce89defd40777fe17316729e22ba90f +CT = fdb508761d1cdb90977f95f3288015e5c3be88e1745a2f993af4e3a7a20390a8da264299712a34e3 + +Count = 228 +Adata = 74cc8da150b0bacdefa8943900b4ea047611d96be70a +Payload = 0c3c9a634a000f00be003846eac7482e303a5bef3a70fe75 +CT = 95512f293373a24c4597305a16402a35e4b5b427ac0178e3a7f79d2b5a9bde5bd453bc8a03e971d8 + +Count = 229 +Adata = 65f6adbaaa803dbad5ba9cb6d231314d55147cc61399 +Payload = 712c788928c8a1562bc1f3f0eb1286e15c3405f6a6fa0443 +CT = e841cdc351bb0c1ad056fbec1795e4fa88bbea3e308b82d5ffccebfb8c833833db40e98a1950fb70 + +[Alen = 23] + +Key = 90e2c63b6e5394b1aeec03f95a9d13a01a7d4e9d58610786 +Nonce = dada5465eb9b7229807a39e557 + +Count = 230 +Adata = f5629ca0eea589f6cf963d875a7d2efb656983f2dd2231 +Payload = 44dd098b1f869d670a8a841900c4bef023a1946a0c278354 +CT = 6b38ca85450e05e7b9362ed7e6e291a130ff233b5a561cdef7ec84dd992fdf98514f845dac8f656e + +Count = 231 +Adata = d43d7753530a7280b76221906dca85d396b6cf05125018 +Payload = cea19562328bd1fea889f575db6a28a14b7d06fb9f9c98bb +CT = e144566c6803497e1b355fbb3d4c07f05823b1aac9ed07313613ed15d527d9dc58ab6893e723db58 + +Count = 232 +Adata = 75650ce366757618af20205b69af7e5d4e82c398c00101 +Payload = f0641f595b791edd860977fcf699688587a354e053e9c7fe +CT = df81dc5701f1865d35b5dd3210bf47d494fde3b105985874ef8728d1bf3a2d93db3266bafadb7c26 + +Count = 233 +Adata = c00f1b8066677c63e898fddfb8a1b482b536963da0628d +Payload = c7486a084f8475e6f5138e8d6e9f42a1de90f05aa88a362d +CT = e8ada906150ced6646af244388b96df0cdce470bfefba9a7a5bce94d7564d297fe87730f1a36acf4 + +Count = 234 +Adata = 5a89ab6b26b2ca78f98a8f8409fe8008b97ba9ef185d41 +Payload = 091ef698e16dc43a11d3ea005d5a5cdb7f1bdb5665a6c81e +CT = 26fb3596bbe55cbaa26f40cebb7c738a6c456c0733d75794cd971b07fc14c512b8df6dd964b129d0 + +Count = 235 +Adata = 5d24d80f22afe713c4076c200c1bab36917907fde7b6d3 +Payload = 62f204394b367c4410746001e02dfd171858396568fdd43b +CT = 4d17c73711bee4c4a3c8cacf060bd2460b068e343e8c4bb1a192b781dc94448d4a0f6a439a716339 + +Count = 236 +Adata = 4a47a82b999a2a739959f153a091a65c4d7387646da66b +Payload = ac1cd5ba4997af91dbd74aee7730f9ee92cf8a360ca96a8a +CT = 83f916b4131f3711686be0209116d6bf81913d675ad8f500cade9533b272e0a3edeba68362b057b4 + +Count = 237 +Adata = d9fc295082e8f48569eb073ac1b9566246728fc62ccaab +Payload = d0a249a97b5f1486721a50d4c4ab3f5d674a0e29925d5bf2 +CT = ff478aa721d78c06c1a6fa1a228d100c7414b978c42cc4785d68df8ff28345be4d83541a72071059 + +Count = 238 +Adata = 720a9dc3e33ac080775a06f67f4a6591c37d0e101944a0 +Payload = 77fb98f24172f5d5edadbf466ee910855a71d46090b789ee +CT = 581e5bfc1bfa6d555e11158888cf3fd4492f6331c6c61664caa7ec8892be6a18458c663665495035 + +Count = 239 +Adata = 13cdaaa4f5721c6d7e709cc048063cfb8b9d92e6425903 +Payload = 77fb98f24172f5d5edadbf466ee910855a71d46090b789ee +CT = 581e5bfc1bfa6d555e11158888cf3fd4492f6331c6c61664862fda880e45e891a3a50da7e14344c8 + +[Alen = 24] + +Key = 13cdaaa4f5721c6d7e709cc048063cfb8b9d92e6425903e6 +Nonce = f97b532259babac5322e9d9a79 + +Count = 240 +Adata = ad6622279832502839a82348486d42e9b38626e8f06317c4 +Payload = d7c837971b973f5f651102bf8d032e7dcd10e306739a0d6c +CT = 4709600418f2839841e6d126359f6982bdb53acc7ff209635623d15b24184481eadc63bb8c878fc4 + +Count = 241 +Adata = ad4833aa53218949cfd724814a43889a74a2114bbef4cf37 +Payload = 7d672bccd0fb01ce79320ed61779146aa432038daa13cb41 +CT = eda67c5fd39ebd095dc5dd4fafe55395d497da47a67bcf4e614c3e546273f0aeef207bd3f4d32fca + +Count = 242 +Adata = 54a723826086c7175e8fdc854b62d780de6ac1f90b57dd3a +Payload = 0e1b73df74982f535a5fb08bc13d22515ee10969efe033bb +CT = 9eda244c77fd93947ea8631279a165ae2e44d0a3e38837b413c6395ce9aee2e22ac0606beb140185 + +Count = 243 +Adata = bec02d7df4cc3deefdd7e7d3ea82d381c870ad46bc06d64f +Payload = 9a55aff269b180118ff0ea99e851c7474d19d23e641f16a9 +CT = 0a94f8616ad43cd6ab07390050cd80b83dbc0bf4687712a661e4f02150bedd86dfa49f52b214239d + +Count = 244 +Adata = 1b8090d712e0ec95a01bc3aeb6f5230c67c355e0ed68043a +Payload = ff19294e8faed8353dbcab0b146e2ef928dd2680833424bd +CT = 6fd87edd8ccb64f2194b7892acf269065878ff4a8f5c20b2f0e82b9f04bfc0cc0ba432b5135450c2 + +Count = 245 +Adata = 5ed0b9f25d07b26717cdcb2507bef9d681ecd9389831ac15 +Payload = db1eba6ac4a79aa1d97838d263c7c4ffa7d354770e762805 +CT = 4bdfedf9c7c22666fd8feb4bdb5b8300d7768dbd021e2c0a2e64c82b60880c5c7506321a1060a481 + +Count = 246 +Adata = 55f16fefaf2168aebc61b5e01d9e1f7bfe215eaaef118974 +Payload = 012d45168505ca9fde5aed123875639a207d473b993dc7b8 +CT = 91ec128586607658faad3e8b80e9246550d89ef19555c3b77152f64dc993b36ad9d5d12bb52b1ad5 + +Count = 247 +Adata = 9893bf14fd3a86c418a35c5667e642d5998507e396596c50 +Payload = b205f26d6c8a8d6085ab28d595703cae046f96d82093082b +CT = 22c4a5fe6fef31a7a15cfb4c2dec7b5174ca4f122cfb0c243e5c69256b6326ebb7ee6e677d396765 + +Count = 248 +Adata = 244b840085bda9576c8424bb05a925a6b09cad2d0528ab8d +Payload = 549ba26a299391538b56ce4bd71dbbfd96995836f8915ca5 +CT = c45af5f92af62d94afa11dd26f81fc02e63c81fcf4f958aa2083dac565c7a63908f0022e2867bb68 + +Count = 249 +Adata = 9e8d492c304cf6ad59102bca0e0b23620338c15fc9ecd1e9 +Payload = 9e9dbd78a1066800ae33253be6104015158a0187e4f38116 +CT = 0e5ceaeba263d4c78ac4f6a25e8c07ea652fd84de89b851968242fe32958ea32e670ae1b3543974f + +[Alen = 25] + +Key = 90851933d4d3257137984cdb9cba2ca737322dac4dbd64bc +Nonce = be02df3a840322df8d448c600c + +Count = 250 +Adata = 69a9dd9ac8be489c3a3f7f070bdaca10699171f66ab3da9351 +Payload = ba1785a149cb8b69a4e011c11a3ff06f6d7218f525ac81b5 +CT = 89ab2efefa8406336d9e2245199fbc9454f0ef650b9ed0f446c7246bd3130803bf8d703ef5bdf15c + +Count = 251 +Adata = 0c39a72f0f38d2713c164b0f870646fc65b9838a322ecfddd0 +Payload = 263dc4fb5cd8798ce0f183a816e51fafba167533dde1bf96 +CT = 15816fa4ef97f4d6298fb02c15455354839482a3f3d3eed7096a6a4422e582c5d02973952ac80e5f + +Count = 252 +Adata = 911d9f5c4c34c2f4b69be1e253d43fe729e2ab2622130394b1 +Payload = 7b5da2c283116713f3d80c7907114270964541e03ab80d50 +CT = 48e1099d305eea493aa63ffd04b10e8bafc7b670148a5c115965f6df4332fe7a2cdc4d1b80e28a34 + +Count = 253 +Adata = 8a961df9c23f6d5ecdafa94c61164a22f460a1bf7415258d39 +Payload = 541a2b3ee25022c92fdc6783a6cbde90680ad3dc41868e5f +CT = 67a68061511faf93e6a25407a56b926b5188244c6fb4df1e18bed174081b2170ffc6ab53b54c9ddb + +Count = 254 +Adata = cac7a248a4d4e96a9733627e247234995d6aa57e491498118a +Payload = ebb2e893da9f32c363f98bc76fd14eda59e7cc620070f6d3 +CT = d80e43cc69d0bf99aa87b8436c71022160653bf22e42a792bac3d3a2b9ef6d4c8715f9a5c6fe8245 + +Count = 255 +Adata = 41eacf70d05a6d0cdbdd38f197a52987def8fde37f332eebd9 +Payload = 199cca0d0e1c70ec405d6816cbddc69f8ada624f2c168891 +CT = 2a206152bd53fdb689235b92c87d8a64b35895df0224d9d07f9610c82fe9a7c78e8f1980e886b446 + +Count = 256 +Adata = 78b6ed20ed85337c969618bd41917cd85c37e7c35c3a12e25f +Payload = ca481f557306f9ce386edd0cfde375a550cb5b574be524f7 +CT = f9f4b40ac0497494f110ee88fe43395e6949acc765d775b6aab366637ec41d0bf557f578be424a8b + +Count = 257 +Adata = 87faef55c54250c30232ccaf5efa1ff41b6243b2a5bc93e7cf +Payload = 6f1b4ff66d3aec7b0c0d9e202acc52722e15bca0983291e0 +CT = 5ca7e4a9de756121c573ada4296c1e8917974b30b600c0a1e57a5b3ae26469d229425f887ad5a2a1 + +Count = 258 +Adata = 7f19ac3e53a629a2df1cb56d68fde0c80a46be40a996830e2a +Payload = 7533c88ce55c2243b64b6c5bd01aed4dd6ac8bb9fd333e06 +CT = 468f63d35613af197f355fdfd3baa1b6ef2e7c29d3016f476ce4fe492062f74bff4c3c0e9ea849a4 + +Count = 259 +Adata = 0516a69bfd8785ad001367b51e5410b75c11b761be08b9eea5 +Payload = 19ea09a9bfd10db2a74e398859d8f4831fa5749767773acf +CT = 2a56a2f60c9e80e86e300a0c5a78b8782627830749456b8ead47ffc17b871f530f62b9f9aec98509 + +[Alen = 26] + +Key = 5c5d02c93faa74a848e5046fc52f236049e28cd8096dcac6 +Nonce = 54cbf2889437673b8875a0f567 + +Count = 260 +Adata = 09fc21ac4a1f43de29621cacf3ad84e055c6b220721af7ce33bb +Payload = b4da43ebfe9396b68f4689fba8837c68d0064841c6ddd4a7 +CT = d40725397229021a18f3481e3a85f70445557bb2a85e4ae8101a34c777e918e16186fda05a386572 + +Count = 261 +Adata = 10f0c45d06a138a964fb11b2d450620a2977bcd2952afe371cad +Payload = 7b628930d44e22907277db057395601b82b65479fbd59613 +CT = 1bbfefe258f4b63ce5c21ae0e193eb7717e5678a9556085cc1e79234882846d916dabae40b1bd055 + +Count = 262 +Adata = 64dbb170a037b36beed28a2637c87830e2b23f8eea6cd9a7331c +Payload = 9db30b669fc5d25f05e0dc708d597da6ddce2dacc85ae99c +CT = fd6e6db4137f46f392551d951f5ff6ca489d1e5fa6d977d3e35499e3c09dc384eb41344ee8be3769 + +Count = 263 +Adata = c47de6608546a02c6eebd6628c9123f6936c0154d3df52a367e5 +Payload = 62036cbed3666d85624d3dc9c1f437454b9ab5c03ce0de92 +CT = 02de0a6c5fdcf929f5f8fc2c53f2bc29dec98633526340ddd605189608ce40b237dde7bed6fde487 + +Count = 264 +Adata = bab7e36098d59d3a31d7784d549aebfc6938bbd0612c85c0edb7 +Payload = 5c9bc739f6b6fe4214f3c6aad307d1f208892d79de010e37 +CT = 3c46a1eb7a0c6aee8346074f41015a9e9dda1e8ab0829078c31f69c847440be20bd08cfef330002f + +Count = 265 +Adata = 8a9716135fa38c250e249f6712f7cb3ad9210d7278b53d599df9 +Payload = 0df109298083d3896214b84ff6edb11e9cfdbd88f5702839 +CT = 6d2c6ffb0c394725f5a179aa64eb3a7209ae8e7b9bf3b676ca83622b127fa50fc9637998c0ddd44d + +Count = 266 +Adata = 2d52447d1244d2ebc28650e7b05654bad35b3a68eedc7f851530 +Payload = 518f651f6d82f670b63767ad8476ed8fc24df12a45110611 +CT = 315203cde13862dc2182a648167066e3571ec2d92b92985e81e738b9e4b0dc7b7a39eb7d03adc64a + +Count = 267 +Adata = 3cba0fd2bb16ae1d997cbe659a2dd101885c97f2322b0172b5d6 +Payload = e91a694bea2d351928b6098660d49f382c087f6777de159c +CT = 89c70f996697a1b5bf03c863f2d21454b95b4c94195d8bd3d298c05b1d2e597f44f8621ecd11ed16 + +Count = 268 +Adata = c7f93152016bba584dadc6002ec493a46305726068886d2340da +Payload = 2d14792ed349a878b2b879e7fa5f438a50e36947ce827e73 +CT = 4dc91ffc5ff33cd4250db8026859c8e6c5b05ab4a001e03c5fd5221fceecbf0dc7211a1aec06793a + +Count = 269 +Adata = 799cac048eaccded37ca6a70dd89595e1ee04606212da5572679 +Payload = 315b8d95938d304015bbc94ea03c21f6dc25c90f991ba680 +CT = 5186eb471f37a4ec820e08ab323aaa9a4976fafcf79838cf5c25f00b862b49fcfe8447949f39787c + +[Alen = 27] + +Key = 0234dae5bd7ae66c67ff0c1a3f1a191a0d7bceb451bc2b7d +Nonce = 16d345606a315ad2406abbcb43 + +Count = 270 +Adata = c37fdf7449fd7e943595d75e977089c623be0a3926e63fdbbfdf4a +Payload = 0f960a89a7e806f8709047cb7a2e7c4211ad724692c88a05 +CT = 3907880d25f910eab12dd14e704d1b33ea7c453634d54da2a461f44dac1112ae3f9c65671a931d3e + +Count = 271 +Adata = 85f647d940a6d1acb6b7851912f807063515631eaabaa019dcfb99 +Payload = ab40a4baa39b0e568bf2193fecbc36b84c76bb50523b2912 +CT = 9dd1263e218a18444a4f8fbae6df51c9b7a78c20f426eeb5ed15db6e142ee07b59eb5b0ad3a59194 + +Count = 272 +Adata = 79ae14843b2e7ccf0fd85218184f7844fbb35e934476841b056b3a +Payload = b74c06d9077c568762796d5be14f3563e7205a6e9bc65bcb +CT = 81dd845d856d4095a3c4fbdeeb2c52121cf16d1e3ddb9c6c203f11f66b74366caeca8dbded2bf17a + +Count = 273 +Adata = 542d86fd7ff591f97e6926a090553538bc3b8a6bcd45f2e29c7d9f +Payload = f2179beb5635a6d8a8340acea0ffcf4428e5de1306a8c12b +CT = c486196fd424b0ca69899c4baa9ca835d334e963a0b5068ced925fb9a4cf6b6bf17f72ab044653d1 + +Count = 274 +Adata = 4392c3043287dd096b43b4a37ea7f5dc1d298b0623ccbf4fd650a4 +Payload = d1a9e4593bc3d02c407e84a1736e587c1819c72195a07d57 +CT = e73866ddb9d2c63e81c31224790d3f0de3c8f05133bdbaf0d1f677deca1bfda83c1b9223aaaedbfc + +Count = 275 +Adata = 966954582e78e99ba68d6ffaf794b55a82325834ec4f373b2bd227 +Payload = 15b94910853a8f23dfb8b31c0262b8461f777075cc0937e9 +CT = 2328cb94072b99311e0525990801df37e4a647056a14f04e12937871932a7ca3e1e27a90a7f73694 + +Count = 276 +Adata = b7aca715dcc402565cb711b001f21e8e95ec54c4afab2e2dcc8a2f +Payload = fd1681cc306518bf77766f55226afac3eb21e31ed897075c +CT = cb870348b2740eadb6cbf9d028099db210f0d46e7e8ac0fba0464ff4ddeccbd523a5ed3b32337f7c + +Count = 277 +Adata = 290a36f7daeeeafca4431446b396dbec0bea0a1f6f081418811656 +Payload = 0804fa48fc76f98bb021e3501bef8875b64a3b508adf8594 +CT = 3e9578cc7e67ef99719c75d5118cef044d9b0c202cc242332f68ed5e44a71c5ba8bade07b7bf5495 + +Count = 278 +Adata = f0739a855422310a21ed863376bce9d75dc7c687b9b535cb7a05cc +Payload = 4f5c6d80a3955f12f4d2594e02a045c42fabb11d90817fff +CT = 79cdef0421844900356fcfcb08c322b5d47a866d369cb8583b5dc1fbe32743e257b7c1c9d624adc8 + +Count = 279 +Adata = ffac0edb0b62977bb5040e4128a48deaf711f5e6a84d8f677341f3 +Payload = 5c29c458212d010a0d9c5a547aba1138eb4ce94742fef01e +CT = 6ab846dca33c1718cc21ccd170d97649109dde37e4e337b9e53b654de1976294897cae0476ac6248 + +[Alen = 28] + +Key = 6351a67fd6daabd2fd49ee944dd41dd37301f958dd17fcc3 +Nonce = b8d517b033754058128d13d11a + +Count = 280 +Adata = 511c6924fa96db716f6b053b7a48aebdc1504145a56cd02d6be2590d +Payload = 0c0663dd69ccbffbbd0c8c2e9473d0354451ae7a20fa3695 +CT = 19f2745df5007619c79c84d174e4521b942776478a0601d982c560fede4741e2fd3b54b3a48f3e38 + +Count = 281 +Adata = d9ccd93317441e9d6ccc358f31e7e2ccef8c921b23d742993eff9d53 +Payload = 34a882834172924d39d2df5d637d9d273a99a9222971701c +CT = 215c9503ddbe5baf4342d7a283ea1f09eaef711f838d4750ee82d927a2aa678e792acdeb615409f8 + +Count = 282 +Adata = c268d65f7a7b30d3d198b2045fc8d1db7adda56604fa567d8855d1a5 +Payload = 5b7450b73d68de079e92bba56c7860f11126b8fdedd3334d +CT = 4e804737a1a417e5e402b35a8cefe2dfc15060c0472f04017a48226389d24ed3ec3da2da1a9bdf7c + +Count = 283 +Adata = 4c2b6815156f0643b4573825e28b9f2a668a4976e3342884f48bc310 +Payload = 140c6933248f052e05bd4a36aec185ee86730108cc2989b6 +CT = 01f87eb3b843cccc7f2d42c94e5607c05605d93566d5befa16fe6bd83993ccbdd50e1ca061f4845f + +Count = 284 +Adata = f11c873354b3c0cff2c8f8010e9e364582b9c05c62efdefbdcc2e1c0 +Payload = 2a083de317380d94dd991349a7b8761c7c98013b1b0227e0 +CT = 3ffc2a638bf4c476a7091bb6472ff432aceed906b1fe10ac577c5893cb3896400012e48f5b190b73 + +Count = 285 +Adata = d0a056754098d7f7ef2f639d61ea3d2b9cc936c48a1b2c5a9e96d169 +Payload = 02769283d5a06c363c2cc66c09b1ac954134e3ec7df773f2 +CT = 17828503496ca5d446bcce93e9262ebb91423bd1d70b44be80c80101fdfe6dc4cfce080bf921582e + +Count = 286 +Adata = 56de0e55653b9a04a3ded71c31f8807c3c8dd96bc82892e4acccef30 +Payload = 4890404bc5b24822b4cf7a2fe28abc52fbefb919ae0629ec +CT = 5d6457cb597e81c0ce5f72d0021d3e7c2b99612404fa1ea0122dfc20e3088dcd33b6706a0c1fdfa8 + +Count = 287 +Adata = 794a86f5b20d344ad86fd5523d08f1864737be57731440c29aa6b425 +Payload = 161f8501f59338f72026815c77cad6d8d581859192cd5644 +CT = 03eb9281695ff1155ab689a3975d54f605f75dac3831610828f0a78ce798448529afe26eec875aa6 + +Count = 288 +Adata = b1eafc03ea2fa3e9e3842a09a225e83055de8a1f412badd6fc9ead12 +Payload = b3f38aedbf08dd7ead9d402c5aaa1ec9279c7e4bfd4a2967 +CT = a6079d6d23c4149cd70d48d3ba3d9ce7f7eaa67657b61e2ba48856a266c0d404474316f418f8f4e4 + +Count = 289 +Adata = 8fec99f1be0e69267620c0b934bf984d60c1437f74c6ac19610fe188 +Payload = 5c09e2a6a055fe9c21e06e5519cf56b8e2e7fb44094e79f9 +CT = 49fdf5263c99377e5b7066aaf958d49632912379a3b24eb56412292d8015285efaa6f1154580eb57 + +[Alen = 29] + +Key = 9a5a9560baed3b8e0e90b92655d4e5f33889e5d7253d9f6c +Nonce = c0049382cdd8646756d4e6bff5 + +Count = 290 +Adata = c95a86d52088a8b0107cc5b437a8938b2c9e74e46e2e03bb9bceecdbe3 +Payload = 5bbe9c1fb2563e3e82999fe097b28da4dc6ff2e020f3b4f3 +CT = 6d5401db42b5c48b79203b6ad82806d7460ac4c82ad0809b811020480e834f6fe55900a162a4e61a + +Count = 291 +Adata = 1dd56442fa09a42890b1b4274b950770ea8beea2e048193dfa755a5943 +Payload = 8a85a9b32a323c6af156a3fa2f1448b6387cc3660aa8a0f4 +CT = bc6f3477dad1c6df0aef0770608ec3c5a219f54e008b949cba9827513c7f1de970d316b6f81c109d + +Count = 292 +Adata = c834096e059ea73ddc90b0c982f9a3a31bfc6b1b81a03f9d41c9c741e7 +Payload = 1e02c13104937fe084b18eba1ea8951dcc5e75b692937dea +CT = 28e85cf5f47085557f082a3051321e6e563b439e98b04982c9d79dd3255a8323f8229ac1c6d76ae4 + +Count = 293 +Adata = 9249022bdead3d86ef5bd03acf053132d08663ba1f2426e19c126b22e9 +Payload = 3225570fb15ae13a13c71e364ae9a9fef03d1c9a7fa5dfa0 +CT = 04cfcacb41b91b8fe87ebabc0573228d6a582ab27586ebc8425dc81f93257ae8399fc2d48b4a7685 + +Count = 294 +Adata = 3c3a92c4ece49fb9f84243d7c1bc91f595fce118305a758c83985c34b4 +Payload = fa0a458174537ddba25708b8d0c22d5517d57b122517b0c9 +CT = cce0d84584b0876e59eeac329f58a6268db04d3a2f3484a1b595003c58e69600c2a3b9ec45c0e15a + +Count = 295 +Adata = b49b845ccf76acf508f9db8543c73375d530d91f3b0e4ed70decfd2c2d +Payload = b7fbdaeaa3ee1d0bbf5ec47898b069ec4ba6a140a3e83996 +CT = 8111472e530de7be44e760f2d72ae29fd1c39768a9cb0dfe0da009261c43c6640303696655e2981f + +Count = 296 +Adata = 3aabdf589eeb1709bb3d60b08bc71eaa3ffeba4e2903a5dbd8339aae85 +Payload = 9aea86b9fbd9bd4504ee2e25054942b33d3cdbd84215db7e +CT = ac001b7d0b3a47f0ff578aaf4ad3c9c0a759edf04836ef16dfdcdbd4ad711c493d3176f032a02af0 + +Count = 297 +Adata = 6a79879cd62bd1dbf9609897d2ebf2dc4dda43cc15fcb241aaa0deb4b3 +Payload = 3a861638ccd6591e51e2a525be59447e4a28bab32e36a5f3 +CT = 0c6c8bfc3c35a3abaa5b01aff1c3cf0dd04d8c9b2415919bfd59b45c05873c670f5f8bb47732d59f + +Count = 298 +Adata = c5b6ca474eb251817ae4d2f47c0632c381e222aae3b6f585a0dcae120a +Payload = c7da4e9ba6e5758be726e6e227d7bddb0332228f7e3ecb6b +CT = f130d35f56068f3e1c9f4268684d36a8995714a7741dff031572a24bc00b40a6b4b172b3648142e7 + +Count = 299 +Adata = 64a96d191f1d5f95f5fed6259e33e7206adc07b0279e16cb453a9c6438 +Payload = 2b9347d3e195152dce22afdb92acd179eb484872285704c3 +CT = 1d79da171176ef98359b0b51dd365a0a712d7e5a227430ab828bc33396179ac39ce0027a1d62e0fe + +[Alen = 30] + +Key = 3e61094c80df0053e86d43fccf4e1d3ee2cdb862d3237b0a +Nonce = 63f00b2488809fdc49ca5f05d5 + +Count = 300 +Adata = a08763ca936abdeece06467bef8c3c47c3a473636a039d4db540c867d3e3 +Payload = 1fada8f4c7daea0d1c370184c169485b80a278708ed41451 +CT = 680dd22f16a1290bde42c9792dfa997aed24d5bd2265b6e095aa6b99d3f894d3790c2aa2dae1ba2c + +Count = 301 +Adata = 19508a6c83b992c660a1a28597e07c729ea2ed39401aadbf9d7586b5720d +Payload = e9f1f2cf0b8d563e2d20f39f9f464a808b136dba364a6446 +CT = 9e518814daf69538ef553b6273d59ba1e695c0779afbc6f72d9d77109f4597e9c4c8cf7023dc5f3b + +Count = 302 +Adata = e5929c3b5d68a4c9fcf1168ea35bf8c0bf3043cb1ed54ff301578b3b7266 +Payload = 07a74c3b874849ecbf013713b80a84337c90b690cea0b837 +CT = 700736e056338aea7d74ffee5499551211161b5d62111a86b2544ecc3c7d5accd22ac075e7b44d5a + +Count = 303 +Adata = caa5cc5d0d87680eafc29429bac55c9e33167d485789c7c124b5c57a1ba8 +Payload = 4255f2cf90f0d15e9bead4be799165c57f7225980713d609 +CT = 35f58814418b1258599f1c439502b4e412f48855aba274b8f1a8a1db25de0fab7cabb11a18497584 + +Count = 304 +Adata = f61cf7ae23a66777bd3fabc3d542feed2b00c6d4f46a772fda11b5214551 +Payload = 70b1e2e4cf260b108f5a52d0d8234838ffd6ffe7b4acd78d +CT = 0711983f1e5dc8164d2f9a2d34b099199250522a181d753c5a9718ed0257a50e38de86154054fc3a + +Count = 305 +Adata = 85f647d940a6d1acb6b7851912f807063515631eaabaa019dcfb993e86f4 +Payload = af4be10b3a59ea99dadc75fbe5651f6f7630852bb556aa39 +CT = d8eb9bd0eb22299f18a9bd0609f6ce4e1bb628e619e70888550d1acca34c28ba8a3b890bb0542b23 + +Count = 306 +Adata = 296cd04c4d9ab493def7aeb6841a45309e777028868efe45166235c56b2d +Payload = 72d5663727592f1bfc9c65be83f4d3508126fecc4e34ae72 +CT = 05751cecf622ec1d3ee9ad436f670271eca05301e2850cc3a268dc1596a7855639c63fa76ad8479b + +Count = 307 +Adata = f380ca0a26a94adcf2c1ce26d226d3bf520268c72412e58a71acd9a66d00 +Payload = 3e2ccce03c10ce1527ef8e002adb265edba5779fbd4fcaf6 +CT = 498cb63bed6b0d13e59a46fdc648f77fb623da5211fe6847e3416c75fc28924a21cc123e62a7894c + +Count = 308 +Adata = 8825532a31680cb3b5bdb027802d2d8718755e135367e0c8c88e21288311 +Payload = a18dfe7f2d7bbaf316366f67445170afcbe18e2a1de1e947 +CT = d62d84a4fc0079f5d443a79aa8c2a18ea66723e7b1504bf6ff1a47f23d08485951aab18b393584ef + +Count = 309 +Adata = f768375589b687fb17c56673af4263626da69eb991007d94d4f5a163fd05 +Payload = 17ca72a440c944fefd6c08ecc3a8ecb54d96b9cad9d2aa4c +CT = 606a087f91b287f83f19c0112f3b3d9420101407756308fd7d024456bcb69a4f77008773a3f48805 + +[Alen = 31] + +Key = b5664dd6ed435df006052f6ded74bb7ce9482ca9229886f7 +Nonce = 7a1649896f3e030c18f0205599 + +Count = 310 +Adata = c5f1a26351e53e6509c8bbbed03c42c23ad81c65fccec7ffa1cb494c7f1fc4 +Payload = 0b6de49b530703affc94010c2b793ddc6de0c44d48037ff2 +CT = 56b02fea595cc24e798691ae905be3d466ca68ca744005dba260b5ea3b047020b73b5bafa17e5084 + +Count = 311 +Adata = 89899be18b4c389afa769b11ecd22e9fad8f38fd614ea5f8eb7a066c0ed8d8 +Payload = 2f1821aa57e5278ffd33c17d46615b77363149dbc9847041 +CT = 72c5eadb5dbee66e782151dffd43857f3d1be55cf5c70a685e4bd97b9dc83134867c00c2acea0aaf + +Count = 312 +Adata = d43b841f174335f1347834590b0984a2cb35f7a00a0ee993157d2d4f848748 +Payload = c7da4e95cb38342c6d5bf0c381d5a192adc3bfc1cda3a1d7 +CT = 9a0785e4c163f5cde84960613af77f9aa6e91346f1e0dbfe55202ba34bb9918fe915776de65947c0 + +Count = 313 +Adata = c1093518efd80245e3c42371f220b21f2034e6738fe02ef43e828190f01aef +Payload = 414a70aba5a219dbd41cdc46b84812b28cc4f7399218004d +CT = 1c97bbdaaff9d83a510e4ce4036accba87ee5bbeae5b7a642fdf807b5a6880f2d4c36d558b40eb90 + +Count = 314 +Adata = 90f627d5b939625bc76fe1bd4643b39edc11d3dc7f4bfe16e61bc26c3d49d8 +Payload = 58b260d3f645a35bad7a3842440bc03608248bd46e725e60 +CT = 056faba2fc1e62ba2868a8e0ff291e3e030e2753523124495a9307ca4239380a45bb7f87e41c4cf7 + +Count = 315 +Adata = 2f360a4715074e942244ab7f9b6db127b0442df9af2efa2e78db1a94312905 +Payload = 5505caa97218957e90247fde60275bdafce4b16bcb36c263 +CT = 08d801d87843549f1536ef7cdb0585d2f7ce1decf775b84af3aeadff9dd60468aef2a8e2c56dda7d + +Count = 316 +Adata = 7db564811f14bc5c2098d5635655c3671fbd8288ea14944af925eaec653408 +Payload = b93e40f556a786e39126b8834a6ecacd2dc9f0f528bab135 +CT = e4e38b845cfc470214342821f14c14c526e35c7214f9cb1c8335f2e31a0468b830c5009cd02dbd5f + +Count = 317 +Adata = 36be91854d3d02a5d62503bb9047ef4354280510f7576c4272fd757240b621 +Payload = 543a070fdb3a855dd7d83fbc5f983671ad9e905f307148e4 +CT = 09e7cc7ed16144bc52caaf1ee4bae879a6b43cd80c3232cd5d772a599e91504e022b9dbfb124b71a + +Count = 318 +Adata = 6aa6ea668df60b0db85592d0a819c9df9e1099916272aafb8813ccc2f2dd96 +Payload = 86ef67572cb339c6706eb5909b96848aba5246a196972a1e +CT = db32ac2626e8f827f57c253220b45a82b178ea26aad450379846cd12430f7adc910d1f0c51d80636 + +Count = 319 +Adata = 3a64414c3588d7c26871d7d054ac6c8420d4917e3baad4a343685916265321 +Payload = cecef24b62676a5623bedae8087b9b05d7e22b41a14dd2d5 +CT = 9313393a683cabb7a6ac4a4ab359450ddcc887c69d0ea8fcd9ee65ac3a8fae1b00a4f1dfe2577293 + +[Alen = 32] + +Key = 50925853a84a33ff392154e4e737efc18dcfc98f4d5235a9 +Nonce = 809343e986f6ff47f54d4cac22 + +Count = 320 +Adata = d70aef3532bdc5293a3ebb11589ac1f801c9f93ea0d656e1d04068facf9f768b +Payload = 718f061e8b972a3adcf465d66c5b28e8661f080127f6722f +CT = bad3b0e6772e9c4c9c631c095e259d99692292932efb72b8966e91a19617bb748f3495aa433585bb + +Count = 321 +Adata = 1ee0eb409398bc252175cb460ef9a2da4c9beab2ef6d8206e4fcce74df785246 +Payload = 72e6cebdaf88205c4e74428664bc0d7eb4687a272217b7ca +CT = b9ba78455331962a0ee33b5956c2b80fbb55e0b52b1ab75dc8f70aa565a12ca3545e68110968040f + +Count = 322 +Adata = 3820db475c7cb04a0f74d8e449f026ec951fa59667738698b0ed5c8cb09a8c96 +Payload = d959dd38a458039e2400d21d27b9a2faee8fe23683330cb5 +CT = 12056bc058e1b5e86497abc215c7178be1b278a48a3e0c22daf38076c810e14a7843444a02f010e0 + +Count = 323 +Adata = f555216840a1f40b411d44128e567617e2694caf16216ea74c604a8d6ec01e72 +Payload = 337f12e8ebc0544b82fcdd3c4a0dab0e5e75c9f433a27d66 +CT = f823a4101779e23dc26ba4e378731e7f514853663aaf7df1594aebf9b8318877bdec2900a22df858 + +Count = 324 +Adata = 2311a6fe1feeda3a1f16310d635496c0dd662024f0b0f1de79325e030cb850e5 +Payload = 463c65fa7becae5605af80d1feca59075ee88c0abfc72cb4 +CT = 8d60d302875518204538f90eccb4ec7651d51698b6ca2c231d9872d1c10a6594b5c349b84f710d64 + +Count = 325 +Adata = b2c633e3181ae5fe7828707ed5b70e0460088a84465eadeecdbcfa0e9ff19bb1 +Payload = 23c1732959c4bf85bc707e45cc964b6227acd3a8fc73e675 +CT = e89dc5d1a57d09f3fce7079afee8fe132891493af57ee6e2a9db7c4bcaf6087e158c1a5d4eb1c2cc + +Count = 326 +Adata = 791f23252094b9b99fafe7fac1d8ff3ba09305c476041e75afb245ac438b4069 +Payload = 02f60f967e7fbcf957313619882407ea8a03fc943062296c +CT = c9aab96e82c60a8f17a64fc6ba5ab29b853e6606396f29fb5e1c87d9e1c1f3b7d30fdc2f0ccac783 + +Count = 327 +Adata = 22197f9ad14591e7a6d5f8b18c969a553de9a85309757fa5d319cc505c24f438 +Payload = 6c1aa088d1a6086d0e72636744a6840c80ab8223409c61b7 +CT = a74616702d1fbe1b4ee51ab876d8317d8f9618b1499161201514b449a741e07f9287f7e9090fa54b + +Count = 328 +Adata = 0bb18f7280a30767cd769cb5ffd3edd1c18914b92d1b2192e27ac88f57135616 +Payload = 57275bc3b4d63b9b01b0b0760235c9785d45761cace23f1e +CT = 9c7bed3b486f8ded4127c9a9304b7c095278ec8ea5ef3f892c889b610157e16e9f31558c669298a7 + +Count = 329 +Adata = 3e5f0f32e27be18ca6f84de11e6e9c25fc0c4cb0cf83633eea1f033aa1373f3c +Payload = eba27a27f0d4604a5296a41b3fe995c50c66bcba302d0447 +CT = 20feccdf0c6dd63c1201ddc40d9720b4035b2628392004d0fbe19321dc22c748a17aa5eda29d8cf3 diff --git a/lib/crypto/test/crypto_SUITE_data/VADT256.rsp b/lib/crypto/test/crypto_SUITE_data/VADT256.rsp new file mode 100644 index 0000000000..af4f5c1df7 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VADT256.rsp @@ -0,0 +1,1823 @@ +# CAVS 11.0 +# "CCM-VADT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Plen = 24 +Nlen = 13 +Tlen = 16 + +[Alen = 0] + +Key = 26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886df3ba3e6da3a1389 +Nonce = 72a60f345a1978fb40f28a2fa4 + +Count = 0 +Adata = 00 +Payload = 30d56ff2a25b83fee791110fcaea48e41db7c7f098a81000 +CT = 55f068c0bbba8b598013dd1841fd740fda2902322148ab5e935753e601b79db4ae730b6ae3500731 + +Count = 1 +Adata = 00 +Payload = e44b4307234281209bd41f89dbe2cc3fbf68e14df2f7fce4 +CT = 816e44353aa38987fc56d39e50f5f0d478f6248f4b1747ba003abc6a4b020625adc8b6cd7bafbd42 + +Count = 2 +Adata = 00 +Payload = 8db7a73856bcb4007346bb3e00096f69e75e97c0bb960f3b +CT = e892a00a4f5dbca714c477298b1e538220c052020276b465e7cfa7a208a8b3e6b6377236045df17d + +Count = 3 +Adata = 00 +Payload = 48f3ceda4fd390a7eb38f7f5bcd14310af6b5a557e676d44 +CT = 2dd6c9e8563298008cba3be237c67ffb68f59f97c787d61a81b39a0c55822e32042b4f8981021090 + +Count = 4 +Adata = 00 +Payload = 7cdb2c9b167b3ae811289acf7dc1814bbe241f553447699f +CT = 19fe2ba90f9a324f76aa56d8f6d6bda079bada978da7d2c1091117e2ad77db510d902038743b5a98 + +Count = 5 +Adata = 00 +Payload = 41eacf70d05a6d0cdbdd38f197a52987def8fde37f332eeb +CT = 24cfc842c9bb65abbc5ff4e61cb2156c19663821c6d395b5ac7379b8e51592b98e4874f4592278a8 + +Count = 6 +Adata = 00 +Payload = bde9e3eb9f0c57302c9185b1cb912ef76d88f2f9c3b51e9a +CT = d8cce4d986ed5f974b1349a64086121caa16373b7a55a5c4d08c1c902c4c2f078452dd6943b85028 + +Count = 7 +Adata = 00 +Payload = 6f9ccc033c6bfbdfad4719ad033c927e2175727a9a021dc6 +CT = 0ab9cb31258af378cac5d5ba882bae95e6ebb7b823e2a69832fefb87445f1ca42811899acc0cdf68 + +Count = 8 +Adata = 00 +Payload = cc67bc3b7afd625b2610226d3b30e111e6aa47a3254f711a +CT = a942bb09631c6afc4192ee7ab027ddfa213482619cafca4481d605a1019c8e9778b8928b4636053e + +Count = 9 +Adata = 00 +Payload = a10c81725f49ab9075fbf4d96be030a2d881d8501b115d61 +CT = c429864046a8a337127938cee0f70c491f1f1d92a2f1e63f96a82e8411e5b04426dc608298c6408d + +[Alen = 1] + +Key = a4490ed6ab51dbfccd6f3702a857575dad44da3a27eaf31178abc97da60d1e4b +Nonce = 26ceaf6e3b28190a17c4f0c378 + +Count = 10 +Adata = 9e +Payload = 1b5cc6b1651dec4bbbf5130343852e971c7ff1774100d9be +CT = 789bce069a725a96c484e64a9e54dcb7a7c268c85df47815a462ff2dd8ba44a381e1f6edab12b5a9 + +Count = 11 +Adata = 4e +Payload = e7ab98901c0cb1d7d76e125d8ac8e86edf6f469fa937bc10 +CT = 846c9027e363070aa81fe71457191a4e64d2df20b5c31dbb6b0789c5866b7e3312ad992e228d6d20 + +Count = 12 +Adata = cc +Payload = 53bc7e3648d0b389b887b065e9e8f79685beb2eb36e2eb95 +CT = 307b7681b7bf0554c7f6452c343905b63e032b542a164a3e39b1b1a480fdd268c1c75b131cde798b + +Count = 13 +Adata = 45 +Payload = 6d7262476da95db63b322c5193ea05030923c3cbf0f8e8b1 +CT = 0eb56af092c6eb6b4443d9184e3bf723b29e5a74ec0c491a32060fea35c3e9528fd18994fae9fce8 + +Count = 14 +Adata = 2c +Payload = 8246bf7b81b287411777df7ecb53a1795e54b150ff3dd584 +CT = e181b7cc7edd319c68062a3716825359e5e928efe3c9742fb4e0a604ab30a764e8c98a9cafbca8d4 + +Count = 15 +Adata = a9 +Payload = 2596ca8772bc69b50bcbf33088c6efbab614b691ed836f92 +CT = 4651c2308dd3df6874ba067955171d9a0da92f2ef177ce397ca72f1acf6dfd078b6f4eb82fa01e9b + +Count = 16 +Adata = 85 +Payload = 703065d701f4fcadee20d64300b3082c0c76490eb2dc4ba7 +CT = 13f76d60fe9b4a709151230add62fa0cb7cbd0b1ae28ea0c2a85c9252ee62612dc29cffa7289b2ca + +Count = 17 +Adata = dc +Payload = a1aeda4b4cb8dd2943675181561bac48ba07e8de5b327837 +CT = c269d2fcb3d76bf43c16a4c88bca5e6801ba716147c6d99c9fbdac729413152c089d3939e30b8602 + +Count = 18 +Adata = ce +Payload = aa17341f4cead054d41c171dd34c459f7052da225c6c365d +CT = c9d03ca8b3856689ab6de2540e9db7bfcbef439d409897f6f86266c273f8184e901b50c04845b8ab + +Count = 19 +Adata = a6 +Payload = 448cdd9cbbf863eb666fda36b825f3798827da3c1349611f +CT = 274bd52b4497d536191e2f7f65f40159339a43830fbdc0b4ddd02d5c9ae2bbac47a7a076edb1d207 + +[Alen = 2] + +Key = df594db94ef8eca56a417afe946085eaed444c7cc648d07d58132e6cb5bc2bc3 +Nonce = c1ad812bf2bbb2cdaee4636ee7 + +Count = 20 +Adata = c0c3 +Payload = f4d7978fad36223623ccb5bb18a7373cba8a6e3b1c921259 +CT = bea778540a90033b2c0d087e3cc447711ea25f7eea96855506ec97f23bd6ea97834f92f7263c3195 + +Count = 21 +Adata = 34b9 +Payload = f6c043c70136585d012ae0df6f42b25584e374649d0116c5 +CT = bcb0ac1ca69079500eeb5d1a4b21c21820cb45216b0581c9f3230df0b52b5cb7ac907dcadcb662ca + +Count = 22 +Adata = d4ab +Payload = dec0c896b04490816409da1783478ef2510231d0a28c5b39 +CT = 94b0274d17e2b18c6bc867d2a724febff52a00955488cc35a99c3165ce83102891ef3885088ed6eb + +Count = 23 +Adata = 2a3a +Payload = cbfd94fc31785d30214271dab2264134805fee6e52aa0b5c +CT = 818d7b2796de7c3d2e83cc1f964531792477df2ba4ae9c50c9d8078607994ae5dff0de6526fb53d1 + +Count = 24 +Adata = 4eb1 +Payload = 134d2d9726400d09dd3521326f96fbef993ddc0c40887700 +CT = 593dc24c81e62c04d2f49cf74bf58ba23d15ed49b68ce00c7e84da7d2564533e7ad55390ec3a6ff9 + +Count = 25 +Adata = 0a79 +Payload = 1ccdcf789d42caba80d7893feaf26d3853fbcaf7d964df0b +CT = 56bd20a33ae4ebb78f1634face911d75f7d3fbb22f604807520849295a56191367a696999ffef8e9 + +Count = 26 +Adata = 865f +Payload = 4042dbe148db3e6dc542b25d57a5787af535d38e8c34c71b +CT = 0a32343aef7d1f60ca830f9873c60837511de2cb7a305017bc4aceed1a10309b6402b9e9420b33a3 + +Count = 27 +Adata = f4ae +Payload = 85b6894fec36294aa934cdc3523fd95c90ad56cbd18545dd +CT = cfc666944b900847a6f57006765ca9113485678e2781d2d176c180d2e299ccf0b8781ba6de8a72ce + +Count = 28 +Adata = 10bf +Payload = 0f27f4fc8538a676a763b3e5db845a1bfb20d5fab340dee3 +CT = 45571b27229e877ba8a20e20ffe72a565f08e4bf454449ef98d91c68d94873a5d6557611a5402a0a + +Count = 29 +Adata = b92e +Payload = 1b5ec0cb03810a12fc6a0a1ff565afb001405d2a45a1f18a +CT = 512e2f10a4272b1ff3abb7dad106dffda5686c6fb3a566865321cedf1122354636e130acbd69718b + +[Alen = 3] + +Key = d98193ab2a465e3fcd85651aaeca18b8e91489b73b7c7e93b518c4b5b81fc6ac +Nonce = 2247dc7e2674e9e0a63fe70613 + +Count = 30 +Adata = 4dc2f4 +Payload = edba7d6312144e90ec9eaace7576045a46e553dcb8ee5a98 +CT = 44b9ea727c847336fd739ad11f4b906b292edb810462f06ef59626ad5cdac2e4d4cb07b538a1fd8f + +Count = 31 +Adata = 2f3bf0 +Payload = 52a9626f5279c11e17e96f5dc5e1c1f58c1e913020d8499b +CT = fbaaf57e3ce9fcb806045f42afdc55c4e3d5196d9c54e36ded0d53402253453e494ad350994ca77a + +Count = 32 +Adata = 95d2cf +Payload = 87b6447d97a74d0b315031078aa06fffc7b9f246bfa5f147 +CT = 2eb5d36cf93770ad20bd0118e09dfbcea8727a1b03295bb196dbc3bff865a1d94b164df23d708e8e + +Count = 33 +Adata = 0caba9 +Payload = 1852848046706f2e274ba381a2bee1422df4f61d93219af7 +CT = b151139128e0528836a6939ec8837573423f7e402fad3001791b4469fe50d45f8efb81217cd68580 + +Count = 34 +Adata = f8d459 +Payload = 99aac82fa66a15e4f76b76cf4590150999d5cf8468df7f42 +CT = 30a95f3ec8fa2842e68646d02fad8138f61e47d9d453d5b4587106da25012f92f01cc2db8d11ac29 + +Count = 35 +Adata = e883dd +Payload = 4e2f0f91990b855a00d27fbb2e8db7184cd82909de361b52 +CT = e72c9880f79bb8fc113f4fa444b023292313a15462bab1a464148536847290e4fdda7966fe6d5e3b + +Count = 36 +Adata = e45da4 +Payload = e558be3fd246170b294d18ffa708842242681890baf8bed9 +CT = 4c5b292ebcd62aad38a028e0cd3510132da390cd0674142fcc4cb33472825363940e2b26424b7802 + +Count = 37 +Adata = 3b6fc8 +Payload = f8b284c2d851289275973fcd807fac5d8e5e3b6a75ba2ace +CT = 51b113d3b6c11534647a0fd2ea42386ce195b337c9368038a99dd8dbe89b3ecf663eda1b0f92be7f + +Count = 38 +Adata = 043d68 +Payload = 8edf1eb90f0ad33be8a7c6446899e06addc10b3badc4ea25 +CT = 27dc89a8619aee9df94af65b02a4745bb20a8366114840d3dc4894c8fa0a1e1aa760acf9360042f5 + +Count = 39 +Adata = e89257 +Payload = 8fe9a6bd82462c97f436d382d1ff971c95406b1a6c847d81 +CT = 26ea31acecd61131e5dbe39dbbc2032dfa8be347d008d777cdad1590fd8bf2d7ea919e60d0316566 + +[Alen = 4] + +Key = 45c8afd7373cb0f6b092af3a633d9fd97c4ca378e19d75f9b74d089429726c29 +Nonce = fdb1fa230ae0b172ff98fc7496 + +Count = 40 +Adata = 270981af +Payload = 0b92adbb251dc29a67f0bb97f8e7160862b6c4e843d07fd9 +CT = 274e2faea3271ea6fa0494c1951f115b5491a893056c3ee4c76fc350e585277e373e9119bf9595cb + +Count = 41 +Adata = 633f3efa +Payload = 1f88dfd4f5c52c22b1db47f9f4fb6e2f8bcd78d593061369 +CT = 33545dc173fff01e2c2f68af9903697cbdea14aed5ba52540fa7e55dc54e80488a05ee7f1fc96e9d + +Count = 42 +Adata = aad86fb5 +Payload = b2b4cb5e90ebf4bd265093b7f5efd4d62dc60e29737aa496 +CT = 9e68494b16d12881bba4bce19817d3851be1625235c6e5ab18151c17d9e3f97244000a3b2d3c2f95 + +Count = 43 +Adata = ed42941a +Payload = f312b47d05f8eb5a29943b41347cb1983c75cb7a458a3868 +CT = dfce366883c23766b46014175984b6cb0a52a7010336795562d521c4b5c7a6f2c5ac65f2fd15b066 + +Count = 44 +Adata = e5b085d8 +Payload = e9fb86938ea7f04cc230296859e7c96fcc352f968c9473e4 +CT = c5270486089d2c705fc4063e341fce3cfa1243edca2832d9e491a31218f688744098851672a09a64 + +Count = 45 +Adata = 3776f37f +Payload = 8af6b7540f997954812e38dbd99ccfaedd5c69963c353a4e +CT = a62a354189a3a5681cda178db464c8fdeb7b05ed7a897b730ece28347d7ebf8291d7eb66b7651b4e + +Count = 46 +Adata = 4eb08c9e +Payload = b90cfd9dd58e320d98510483b1d939bdb5f3b81666ecee59 +CT = 95d07f8853b4ee3105a52bd5dc213eee83d4d46d2050af64cbd25fb40480d15c039878b5d2f25afb + +Count = 47 +Adata = c7f93152 +Payload = 02caabc6ed0641681e7148c10cf3159fe35e44013252071e +CT = 2e1629d36b3c9d5483856797610b12ccd579287a74ee4623fbfd98c8567b78d4b9c3a49a4641908e + +Count = 48 +Adata = 57957630 +Payload = 2f29882fdf1418d04f0b9d44272995a56973c4369c687a99 +CT = 03f50a3a592ec4ecd2ffb2124ad192f65f54a84ddad43ba4655c1abcb3ed1a175f12721a407c5d00 + +Count = 49 +Adata = 19da955d +Payload = 4e427130be9e94639320529ec135715e65da1117b5ba3c76 +CT = 629ef32538a4485f0ed47dc8accd760d53fd7d6cf3067d4b90621a5e5683df421a0dc52341485d1b + +[Alen = 5] + +Key = a2e6bf39efd1ceddc92b4333ed92d65efeea6c031ca345adb93a7770a8039bcd +Nonce = 693cbb46bc8366086ec7cd7776 + +Count = 50 +Adata = 3ba11282d6 +Payload = d822f84b023f12ea9e3ce16b904278e4aaab5e11c2c23f3f +CT = 9f91fd2f6472e33b02b1eabb9d6655729d44c44dad6b3883fe0667bcc5806b225224b04ade8b21c1 + +Count = 51 +Adata = 3f3a4718ea +Payload = af87b347b59e37a424004a00907dcbcf6a554e6782a9be12 +CT = e834b623d3d3c675b88d41d09d59e6595dbad43bed00b9aea6750fffa5a487540ce65770cd836e99 + +Count = 52 +Adata = ff79ca8965 +Payload = 82b7cd168b6a82cb2d837f41ceda0c27adc5f5b28030454b +CT = c504c872ed27731ab10e7491c3fe21b19a2a6feeef9942f7e7cfafe32bd71ea9813607c5df446c9d + +Count = 53 +Adata = 0021be18ed +Payload = 1c1a0f144df76781e7c85ab178ed9b1ce8c6dc3f15c59149 +CT = 5ba90a702bba96507b45516175c9b68adf2946637a6c96f576716fe674c33ad3b9d3e54cc86bfccf + +Count = 54 +Adata = 9ae7996547 +Payload = d9bb71ad90152d5c1af358c8501fa89ebd4b17bf4ff43841 +CT = 9e0874c9f658dc8d867e53185d3b85088aa48de3205d3ffdab55dbee34f1bab555bbb196095fb5fd + +Count = 55 +Adata = fa292d1958 +Payload = fc7d028a1aa05c74b7ffe333ba6f676913b0f9f1ffa050b8 +CT = bbce07ee7cedada52b72e8e3b74b4aff245f63ad9009570476a4e9e759d5bb79c187a157099e3d12 + +Count = 56 +Adata = 88800df7b6 +Payload = c9ea772e61742a6706da3ab3e81df14b31506ae58b063ece +CT = 8e59724a0739dbb69a573163e539dcdd06bff0b9e4af39729f0f3699c9743ad6c9f09dc00ea10487 + +Count = 57 +Adata = 715041afd4 +Payload = 70d2b8d64121ceccf1961444e8d33b7b7f998aeb58d3d270 +CT = 3761bdb2276c3f1d6d1b1f94e5f716ed487610b7377ad5cc560d78cba6d9f50e9c2677a710f92155 + +Count = 58 +Adata = 14682301a9 +Payload = 1013946815001a2c08acca4196e0d6668ffbb3883cf111e7 +CT = 57a0910c734debfd9421c1919bc4fbf0b81429d45358165b95ffb6e29172a283d47e4478e2e1f7c4 + +Count = 59 +Adata = e44c3c21c1 +Payload = f40dc834067bd163e0004d0ec5dd4b96e2a1ea31ea431c98 +CT = b3becd50603620b27c8d46dec8f96600d54e706d85ea1b24ccf233caf0bad9f68f71d78ee58512ec + +[Alen = 6] + +Key = c5a850167a5bfdf56636ce9e56e2952855504e35cc4f5d24ee5e168853be82d8 +Nonce = c45b165477e8bfa9ca3a1cd3ca + +Count = 60 +Adata = 4759557e9bab +Payload = e758796d7db73bccb1697c42df691ac57974b40ca9186a43 +CT = 93ad58bd5f4f77ac4f92b0ae16c62489e4074c7f152e2ed8a88179e0d32f4928eff13b4ce2873338 + +Count = 61 +Adata = 2ea07d393a0a +Payload = ce60ddbe40b70bd55a9147036ad079dec1558ef4c2c625b3 +CT = ba95fc6e624f47b5a46a8befa37f47925c2676877ef06128b7d812c4d69f1f53ee9158382e56625b + +Count = 62 +Adata = aa6667faedc1 +Payload = 89eb3056770a6157f06921bc153834447c4b6d862d10d185 +CT = fd1e118655f22d370e92ed50dc970a08e13895f59126951e26fdbed62b228db008a1b14bd7942e12 + +Count = 63 +Adata = 9e2127d92311 +Payload = 132f3e19e12f462a7463226b716c41a05a59c76f0e1a2f72 +CT = 67da1fc9c3d70a4a8a98ee87b8c37fecc72a3f1cb22c6be9124e1eb78de01b8af83b684baf3e43ad + +Count = 64 +Adata = 2f191bc9cff6 +Payload = b8611cbb9a3667b9458ca57eb636eb1dc580e7dbb5701692 +CT = cc943d6bb8ce2bd9bb7769927f99d55158f31fa809465209cb0f79736d1a810d06a776094f9fb67f + +Count = 65 +Adata = ad739d5f4736 +Payload = 112f89ccbdadc2433008d3ede2290f9ce81e5c736abf42a8 +CT = 65daa81c9f558e23cef31f012b8631d0756da400d6890633bfba2348f629471c232c9ff7e5f6f85a + +Count = 66 +Adata = 01acc909b7d3 +Payload = d47f2ff745de39a9055ad002de6334971fde480bef268b33 +CT = a08a0e27672675c9fba11cee17cc0adb82adb0785310cfa8c0f694d03ffed043787343827ea2603f + +Count = 67 +Adata = ce003c836a6f +Payload = 13be365884b8a91a284ca24f70011e48794b51be275153b9 +CT = 674b1788a640e57ad6b76ea3b9ae2004e438a9cd9b671722279b553998a6fee0a86e177a448573a4 + +Count = 68 +Adata = 6a759a4efd00 +Payload = d5c87c649579da3f632ba95cb0a07c924095e4bdd4e0376e +CT = a13d5db4b781965f9dd065b0790f42dedde61cce68d673f54eeb434cca3ea719827417e94d6ed564 + +Count = 69 +Adata = 02b84a26c773 +Payload = b7bc1580c68fd5d06c1bf75c31dad7a3e26d636d7eee20b9 +CT = c3493450e47799b092e03bb0f875e9ef7f1e9b1ec2d86422a74b5e4e2edb91fbbe722bfaf1500db4 + +[Alen = 7] + +Key = ae8f93c3efe38e2af07e256961dd33028faa0716e5320a7ab319a10d2f4c5548 +Nonce = 6333bde218b784ccd8370492f7 + +Count = 70 +Adata = 0b1fabdf2a4107 +Payload = bc9ca92a9c9919e39095d3e53fb148694620ae61227e0069 +CT = 45811b0c8f754bf03950e520cd4afc81c2e3eb8a11f4fd386d5a6e4b1fbee15d35939c721004502e + +Count = 71 +Adata = 2fc7f5c0ce052f +Payload = f25a4ca20bbf4969bed6b93c1c77e3d7415f60fe3784216b +CT = 0b47fe8418531b7a17138ff9ee8c573fc59c2515040edc3a24a68f98716190fb55f743a8bf62a085 + +Count = 72 +Adata = 8a74412da3034b +Payload = 3237bf953989d17c65a0fafd2bb1e32c237f98f55389e8f8 +CT = cb2a0db32a65836fcc65cc38d94a57c4a7bcdd1e600315a923afef7b4955d7d1e8f1abef9933bf9f + +Count = 73 +Adata = 7139f3c1d6cc36 +Payload = 55d86dc0423cfc2616ef996a3316e776707f8d25c985884a +CT = acc5dfe651d0ae35bf2aafafc1ed539ef4bcc8cefa0f751b8e824c62632dff5cbc103d3060fbd174 + +Count = 74 +Adata = af7a380f079aa1 +Payload = ac48398adb10292314973946f261ec39397442ca09b98dd8 +CT = 55558bacc8fc7b30bd520f83009a58d1bdb707213a33708980202d518ca871c9544f4a8c55fd8d20 + +Count = 75 +Adata = e602abe8f72964 +Payload = 2fb78654e4395df8c37f260d74def234a3a4e3d2b1fe8614 +CT = d6aa3472f7d50feb6aba10c8862546dc2767a63982747b454b33ea6e4344033f74f513d1e41b82ae + +Count = 76 +Adata = 82741c5fd6e1df +Payload = d488bdda400932de56a9f105f0e74ee79c2ed869faaadc31 +CT = 2d950ffc53e560cdff6cc7c0021cfa0f18ed9d82c920216073ccf18c7ea7dce79d0be1204c593234 + +Count = 77 +Adata = 78f0cc22535402 +Payload = b22aba8d3e9f4b4bf006e26062de15daf94597731a600912 +CT = 4b3708ab2d73195859c3d4a59025a1327d86d29829eaf443b81b8af57b85093778690266e20e2fbb + +Count = 78 +Adata = 18e468139dd16f +Payload = bd864f7b8efd6ed2b068f425482d449bf53a203ea88e1ca1 +CT = 449bfd5d9d113cc119adc2e0bad6f07371f965d59b04e1f09b94a857e7a0423ef6c9cbebde1f9c40 + +Count = 79 +Adata = a6dab47c0fbfe1 +Payload = 47d9d18b6addc5f88986f0457b666faae59aba4fa3a02abb +CT = bec463ad793197eb2043c680899ddb426159ffa4902ad7ea64718820065a739fbd3ba560a416895c + +[Alen = 8] + +Key = 548c2d1eb7d91e003633d4d9ff199e4a8447180edd89ac7867d25a1db288b5ce +Nonce = 23b205bd6ff8ed0bab0c98999c + +Count = 80 +Adata = a6601111cd92c943 +Payload = 49fd5cbe4aff89dc3b8718f9ce545d612cbbebb289ecbf42 +CT = 3cfc6211e359ae322802fc9566f377b0dfe17d1dfe0878ebf2a9047e37cc0be1fab0006af8db8dc4 + +Count = 81 +Adata = 96f0b7cd7439721d +Payload = 94a95e945f660d1571b4d7d22709b000b45ff98b2129a4ae +CT = e1a8603bf6c02afb623133be8fae9ad147056f2456cd6307106a430b04938e97f2e4cda81108ad3e + +Count = 82 +Adata = 2ee135dc2ddd9501 +Payload = aeed3aea01755c912213c8c276a2b75dad24f888a611efa3 +CT = dbec0445a8d37b7f31962caede059d8c5e7e6e27d1f5280ab2ab219c6c4952d52505cd9f904b0e04 + +Count = 83 +Adata = 10c361934fd6ff77 +Payload = be1fcebea4c22a1d71e08047b028d7f4ccab0a6b8085d344 +CT = cb1ef0110d640df36265642b188ffd253ff19cc4f76114edfc1f7b2fe314faea28ab0dae349feb9c + +Count = 84 +Adata = 3f6c8a69917f7776 +Payload = 87680ac26fe1511e0f1f745aa4c2a5b9f6c0117dcf08feaa +CT = f269346dc64776f01c9a90360c658f68059a87d2b8ec390308e529d64e786a29661cccddc0366f3b + +Count = 85 +Adata = 0f7a1426ff3b5ee1 +Payload = 9e004b072a27b085e59ca201c157c7d3c906a2c3b455c56e +CT = eb0175a88381976bf619466d69f0ed023a5c346cc3b102c797c6510b85dfd097f3eac276aff00ba2 + +Count = 86 +Adata = faa5bed84dcf168e +Payload = a1bf47b15cd66e43daff420edf014a14b11994b97ada4030 +CT = d4be791ef57049adc97aa66277a660c5424302160d3e87998e522b6f13f99ecb553b6de845940907 + +Count = 87 +Adata = 2851dae3cb3fcb1c +Payload = 2d15734871adc63ff32d7002ab40c4a235a4d5fad223953f +CT = 58144de7d80be1d1e0a8946e03e7ee73c6fe4355a5c752967a9ca39566189ee96c86462bfea78af5 + +Count = 88 +Adata = 35a29c1bcbe2182f +Payload = 5a84c4fdd47510fb7aebc0f79d7b625ccd0a96575740b8e6 +CT = 2f85fa527dd33715696e249b35dc488d3e5000f820a47f4fa613b5fbbe73a2df6c630a00ff4b1b92 + +Count = 89 +Adata = 45820ae66c3e8e77 +Payload = 2052a94e1392dc1db0e89be19ea8f7379ee4cb607a914c89 +CT = 555397e1ba34fbf3a36d7f8d360fdde66dbe5dcf0d758b20d19feb067e9f6225376da21b4899d296 + +[Alen = 9] + +Key = aab793e377a12484dbdd74c9b3a85c74c286e1cc498663fbd7c718b5633bb91a +Nonce = 10022cddb323e88b3c08f95a0f + +Count = 90 +Adata = 82b8c736037ce2f2e8 +Payload = 7c0889854658d3408c5d8043aad2f4ae4a89449a36f8a3b8 +CT = 1044250f58857c69f72b5d3454d43949e5c02b3822970b280de1a3f7fc5d06cc30f06075f5504ed7 + +Count = 91 +Adata = 8f2777ec4930f7e349 +Payload = bd845561f099500a6ff3fd09964dc3820f7ab48ba4ed04d5 +CT = d1c8f9ebee44ff231485207e684b0e65a033db29b082ac45835840df6fa96f5c972ac09d94148cbc + +Count = 92 +Adata = 5cab3b846870709569 +Payload = a6e09404fe60badfc63dc228057485e6f563ba82acdabd7c +CT = caac388ee0bd15f6bd4b1f5ffb7248015a2ad520b8b515ec2f83ef84b299cfdb61d2b5039d536c3f + +Count = 93 +Adata = 0938f2e2ebb64f8af8 +Payload = 33404d7e0e620c1030b91020e33619c5f53d8b210fa86489 +CT = 5f0ce1f410bfa3394bcfcd571d30d4225a74e4831bc7cc19db04e655cbe22b9ea508d2a03757b97c + +Count = 94 +Adata = 82f78ca0e0da2b2d3a +Payload = 617868ae91f705c6b583b5fd7e1e4086a1bb9f087a50bf50 +CT = 0d34c4248f2aaaefcef5688a80188d610ef2f0aa6e3f17c04bd88dc6985f819004c2b634c5303ed8 + +Count = 95 +Adata = 401191aa3fd34abe87 +Payload = 949cdd7c2973d7519e7bca98b2c5947e6d8e91c90e632319 +CT = f8d071f637ae7878e50d17ef4cc35999c2c7fe6b1a0c8b894ff3572e4ebf78473760d8cb4b0366b4 + +Count = 96 +Adata = 4df4377596d8987671 +Payload = f6720a0bd8705c70e0f923338965e810b3ea939bad652327 +CT = 9a3ea681c6adf3599b8ffe44776325f71ca3fc39b90a8bb7de95ec3eee17753e60fb3c0661bdd098 + +Count = 97 +Adata = 6593194b9970545c5a +Payload = de9b0556661e726f3e6e34515ff7196420fe61b4f38419f2 +CT = b2d7a9dc78c3dd464518e926a1f1d4838fb70e16e7ebb162b8590ff04f967e51fbd1be84f01b4dcb + +Count = 98 +Adata = ab2d432058b540ac72 +Payload = 6cad7f3b9f196839bbc5a7f755c09aa8e17c83d9cb8b3954 +CT = 00e1d3b181c4c710c0b37a80abc6574f4e35ec7bdfe491c471d67b75b2da855a12ffb24ddd64a048 + +Count = 99 +Adata = 5dc631eeeacb5a0b0b +Payload = 70a55aec1144357377612fd0bbc2c817f33465a656219957 +CT = 1ce9f6660f999a5a0c17f2a745c405f05c7d0a04424e31c71fc798dd16c1fadef607a9297cbfbfef + +[Alen = 10] + +Key = 06ac39896073a44283611a66ccab067e2dd2faa8da82ff9a45bb29e54d2e6e77 +Nonce = 6c7942c9819cf69b817bfcdb0a + +Count = 100 +Adata = 215e2a6c24325340fdec +Payload = 3216dce3b8b1ce0e79e40fffcac728ab191aaaf319d971d3 +CT = c5b3b50ed8a7b7b96b02ba9464b6a2ff80e90548605699a63d70e6dffb31a376a1eb7f94526dca48 + +Count = 101 +Adata = e0a29a2c7840cf9b41de +Payload = 7e5e5710a693ebfa36335cf7965574740880acdddd13fb1a +CT = 89fb3efdc685924d24d5e99c3824fe2091730366a49c136fcbf516608fe20e06bbff931e84683545 + +Count = 102 +Adata = b8026fbada6339d84802 +Payload = 08c342a50aa23362622934dfab55d9b22c22c249ad08138c +CT = ff662b486ab44ad570cf81b4052453e6b5d16df2d487fbf9d70eb14f3fa0229906b9e0360be3d3f9 + +Count = 103 +Adata = 65f4b3a00c1c1ef39445 +Payload = e085aba85882c75d5e41559167731496cf17d3907894352a +CT = 1720c2453894beea4ca7e0fac9029ec256e47c2b011bdd5f4184771199a427861bf17cd8401e794e + +Count = 104 +Adata = 96118dbfe53434d8aed8 +Payload = 710f890be2b8da77c1eff429ede9cc931d50f059748cbcb6 +CT = 86aae0e682aea3c0d3094142439846c784a35fe20d0354c34e20b2db52fde68f88bfb886fdcb2c47 + +Count = 105 +Adata = cdf4b485d2e04709cf8f +Payload = cda96efee4e188ab3048bc1904ac2c36ab018f2ab7602682 +CT = 3a0c071384f7f11c22ae0972aadda66232f22091ceefcef782ee3df38ddea8e269eb47e39900345e + +Count = 106 +Adata = 50e57e57cf8e49e3a4e6 +Payload = 3dc596d52e520779a50bcba3049388b340dbf6d0f2eb94cf +CT = ca60ff384e447eceb7ed7ec8aae202e7d928596b8b647cba44aaac4ed86f687cfc031f22827725f1 + +Count = 107 +Adata = 48c670f11ff7f74e7003 +Payload = a33105c0dccf8e3b687212a870af9f710462756705fe09b3 +CT = 54946c2dbcd9f78c7a94a7c3dede15259d91dadc7c71e1c6d75255006ac037d6a4d048f1fc338012 + +Count = 108 +Adata = 465e3be6113a2fb2ee20 +Payload = 573ac2436158eb7dd9be981e3cfbe75d3a188ea9cf2b1ee2 +CT = a09fabae014e92cacb582d75928a6d09a3eb2112b6a4f6976c1da33a80bc8157cece1acf9400b2bb + +Count = 109 +Adata = ee4e10574faeae85e9b6 +Payload = ca35bdb54e73eac5a5200a296b3aba5f37c87349746102d4 +CT = 3d90d4582e659372b7c6bf42c54b300bae3bdcf20deeeaa165c1cb98da4a1a920ca1ed9a7b6ec514 + +[Alen = 11] + +Key = 50412c6444bcf9829506ab019e98234af1541061557412740bc120b456052763 +Nonce = 85684f94c3702c5d870310166d + +Count = 110 +Adata = f706a3e09df95d3e21d2e0 +Payload = 6cdbd63f6d591f59776f828533b28e2453a214d1d0dd8a39 +CT = 8c8b4ae854a5d5c265b25e3b54bded9444cc454b3e0e6a24d6c05eaf406a5ebd578e19edd5227380 + +Count = 111 +Adata = e46b25b9a41a858e87900a +Payload = 100132c315bfc9c4fb93023f5d3500d7208a68acb4d2c630 +CT = f051ae142c43035fe94ede813a3a636737e439365a01262d5088446e42591c0ede68e82334d97cfa + +Count = 112 +Adata = 28d34b29afe6586fd9bf0e +Payload = d5460c1db0d24dedc63c4c78ce6d1f0b2d46f3b01934525c +CT = 351690ca892e8776d4e190c6a9627cbb3a28a22af7e7b2413eaaef2823f5ac3f313f560bd774d10e + +Count = 113 +Adata = 2852d4fd68a3e9e47d44a7 +Payload = d2d73b62e3b1c9ab75f3544ff8616741e0adbae84b8cf9d0 +CT = 3287a7b5da4d0330672e88f19f6e04f1f7c3eb72a55f19cd62d30d99bb7dadec34e2891c156a1f5d + +Count = 114 +Adata = ec1c17b2ab13d7c8ac874f +Payload = 74796d78d6ad03634ed80800af530212baa7e5093651cedf +CT = 9429f1afef51c9f85c05d4bec85c61a2adc9b493d8822ec241c9a05ebf9ed27792bbced83b5dc582 + +Count = 115 +Adata = 4f1ab5ddb1c199e9a5daab +Payload = fb432488b5d08d576a90f085181ad883407a6ce9ea29950a +CT = 1b13b85f8c2c47cc784d2c3b7f15bb3357143d7304fa75171ffc24020e86b1314724104e6b57b3ce + +Count = 116 +Adata = 864e0e728aea856fae6c6d +Payload = 2b82d96ed1778412378abe4e09c633acf3359b9709ae3dcb +CT = cbd245b9e88b4e89255762f06ec9501ce45bca0de77dddd6539bbb0af8ecf77b4508533247b3501a + +Count = 117 +Adata = 21ee21a5ed0d75d0380a28 +Payload = 85143071241bb65261fe7afcc102416e59b9e46ee0c90073 +CT = 6544aca61de77cc97323a642a60d22de4ed7b5f40e1ae06ef8981ec6ce7c4687b178f2103fa8c8be + +Count = 118 +Adata = 2b63f7b676f13f45d103dd +Payload = 185577b48237acbdaa3590b8057fe374f875ce829b62c98f +CT = f805eb63bbcb6626b8e84c06627080c4ef1b9f1875b1299265d9d899c6b71c0ab3049ea1dbfaf6a9 + +Count = 119 +Adata = a33e86d813c2c4ff3bab20 +Payload = f051beb936e60fd4f3bca31964f1ad3e6fa16dd27b65a6db +CT = 1001226e0f1ac54fe1617fa703fece8e78cf3c4895b646c6b246474c4e79822f5fd55f2fb0067a40 + +[Alen = 12] + +Key = 8a56588fe5e125237b6cdc30f940b8d88b2863ec501a0cb00b1abade1b5ce0ed +Nonce = d80210b9f9776ea36dc0e0a787 + +Count = 120 +Adata = e4296d1c8cf4ffc4b2635135 +Payload = c825952293e434ea866db558aaf486ef09a92bf366988f71 +CT = b8b3b15fdf6a4a0b5abc313afc769e4e8413bd887552583ede3ed995d1b70561c8e28a7b1a7e3dc8 + +Count = 121 +Adata = d18bfcc1584eeb8695388ebe +Payload = a1e0248355bfd1d881fb1a4798cda2f6f6ad513c69c5f9b4 +CT = d17600fe1931af395d2a9e25ce4fba577b17c7477a0f2efb561575f6743c5759494be59afa0c3e11 + +Count = 122 +Adata = 14682301a99bf680805d1ffe +Payload = ded135fcbf62219bfba2cba40c2d2cbe4815ddaac1342231 +CT = ae471181f3ec5f7a27734fc65aaf341fc5af4bd1d2fef57e34f689367228cbaf3cd76fb407109cf6 + +Count = 123 +Adata = 8853aa2dfea9c4d370678bb6 +Payload = 12d3900c6c01968b8344762e0e883e5e219f42b052dc6215 +CT = 6245b471208fe86a5f95f24c580a26ffac25d4cb4116b55a2cacb7fc3856abcf759feb8dc0998ab1 + +Count = 124 +Adata = c5d3b9c593c3185fe4b6d1bc +Payload = 8c3c1193fe1a1ebad7e01a1eed1a32c08a0091b1c948e184 +CT = fcaa35eeb294605b0b319e7cbb982a6107ba07cada8236cb42a740cd3262424a2c3d77849ead6149 + +Count = 125 +Adata = dfb9e8149b51f89b1ec00a8e +Payload = 8219618b7728ac89237705ecf84012cc7c80293c4cf171d8 +CT = f28f45f63ba6d268ffa6818eaec20a6df13abf475f3ba69747d4dbe0f9415d40843070e1e93059eb + +Count = 126 +Adata = 08a4590d262e4dbcb7e23ffc +Payload = b344b7dc239617fa51b9ea10a349e940c3163779f5284c9c +CT = c3d293a16f18691b8d686e72f5cbf1e14eaca102e6e29bd31215b3dccba4ca5de64be7fab8a7a22c + +Count = 127 +Adata = 74aab7b5b96238710637c6e5 +Payload = 740d4b25ca7221d0826057701a6bfd66c50a82f010a57be8 +CT = 049b6f5886fc5f315eb1d3124ce9e5c748b0148b036faca734e09945ee44c95c7923d8b9249ade7b + +Count = 128 +Adata = 420aac47a3f212fffca40549 +Payload = 5d9000489186abdf4f0a2794f0222fcaa156fe6309c10f79 +CT = 2d062435dd08d53e93dba3f6a6a0376b2cec68181a0bd8360a568dd779526a0058d522af1dafde30 + +Count = 129 +Adata = 6e80dd7f1badf3a1c9ab25c7 +Payload = ac2c44263363810bec3a309aa618b303e05099dfdbeb5c16 +CT = dcba605b7fedffea30ebb4f8f09aaba26dea0fa4c8218b59279442c88d612ed1a39ae0005f88155d + +[Alen = 13] + +Key = a4cc7e1c90f8684e6a5f95e6898ab4e3c194cb46e196d8228062b9f3fa744930 +Nonce = cdc2712e51c7f333d6bad78eee + +Count = 130 +Adata = 569c56b27268d3db54e728aac0 +Payload = 10d4cff95ef490923c9e0906880729d4d05412e7675cce76 +CT = be3ce3e9dc72499839a98ae52abb17415e8547687e8a3c7b8aaaac20d4c9276f2851cbba2b04d185 + +Count = 131 +Adata = d75635b6450e43285fba966835 +Payload = c9db03e2efbab713b0b640421018d3971ffe2abd70fe8fa1 +CT = 67332ff26d3c6e19b581c3a1b2a4ed02912f7f3269287dacc121ff83891335dd1214ea6fc25f6a68 + +Count = 132 +Adata = 70750acea6a05f8b7b425d262b +Payload = add631ce5846ce71434aad4998f8e429aed430e7d38bdbb2 +CT = 033e1ddedac0177b467d2eaa3a44dabc20056568ca5d29bf549e71ec517cd65150f42b3cb53f936e + +Count = 133 +Adata = 2a567c7ec7edaa5a438ae3bb35 +Payload = a514d170422feb1d87bb7725a9e77cc6fc8afb45c2af6d90 +CT = 0bfcfd60c0a93217828cf4c60b5b4253725baecadb799f9d0e432ec394ddbb65205dc40a5a8e90a4 + +Count = 134 +Adata = 0f8795385b805246a0a2573afc +Payload = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d +CT = d730a80a3ab4a07849d4ddf9280170800fb9897c917dbe30926b0d977107a3918717f79b63f36b0a + +Count = 135 +Adata = 111d224c102b136159fbeb44a7 +Payload = 2edd498e54b23aab6f4fd7b3f22c4c787e3a4f1fb06c9ec7 +CT = 8035659ed634e3a16a785450509072edf0eb1a90a9ba6ccac2cd61599bb93db3dd3dabc12aa90932 + +Count = 136 +Adata = df0821c9ea6ab329c626d11b4b +Payload = 6e3e25db29da2c787bb37755ee770e2402fb8208da23389d +CT = c0d609cbab5cf5727e84f4b64ccb30b18c2ad787c3f5ca90bd027ecd00cc6dc5ffd5d746d92281e9 + +Count = 137 +Adata = aacaf4839c35338d6e2b47ac45 +Payload = d4ed4584678e982ace8664e77d0e55be356be558cead3755 +CT = 7a056994e5084120cbb1e704dfb26b2bbbbab0d7d77bc5583c01354a450eda2588be7578530e38c0 + +Count = 138 +Adata = dc6eed3f8bd1b5563c1eeb9afa +Payload = 4ebf00eadaf70711f630f5badf0214d8518a200afb0e5765 +CT = e0572cfa5871de1bf30776597dbe2a4ddf5b7585e2d8a5688d7a1d546e25ba026cd46556eb2c4b7e + +Count = 139 +Adata = fbfe7e910f242a78dd6e69a2ec +Payload = 2729636112f2abe2c76ea5e52a3f80b0f882f0f3b6f7c806 +CT = 89c14f71907472e8c25926068883be257653a57caf213a0b0e951aee790239e7067ef37f497b4bf4 + +[Alen = 14] + +Key = 347e12eec56e95aafcc7d25bf10fc756b4e42bc2e43da7f97df24331f27f1f5c +Nonce = b8d517b033754058128d13d11a + +Count = 140 +Adata = 511c6924fa96db716f6b053b7a48 +Payload = ca88dddfc876a12f45f19562bc9ca250f43267ab251a7f34 +CT = eeedcfa8f5b5b48c1d7e277526eecb7294213b9f5785167ae949b93003dfe63c95c1d49edfb4de3f + +Count = 141 +Adata = 10c26d5939618189a9503623f55f +Payload = de0c0d17c3950e7f8985b56d60623cbd010cd765da4df5ab +CT = fa691f60fe561bdcd10a077afa10559f611f8b51a8d29ce585c32a90d77fed97eb0ac164ed616e1c + +Count = 142 +Adata = bc09c59d20e55a9e184d70af2c7c +Payload = 2f35102d78a32fcde1cfb563ea8d310ecb83c146ab8de362 +CT = 0b50025a45603a6eb940077470ff582cab909d72d9128a2c180fdf5f63045f326057cf74fd4cee6b + +Count = 143 +Adata = b75887f13d6e8c4b35b27b965693 +Payload = a3fcce3420effdd6edb37271735a0d30c10c65233aee173f +CT = 8799dc431d2ce875b53cc066e9286412a11f391748717e7134959a180fc2cf2ba99af21cc1bc8e5c + +Count = 144 +Adata = 603401a9b8ecde4d5c86b6107363 +Payload = 4ac918727e41b8c536484e3781c403e260c278712853508d +CT = 6eac0a054382ad666ec7fc201bb66ac000d124455acc39c32ca2e5195dbd44f0a119538c95788510 + +Count = 145 +Adata = 7206b06f306124ca3a302e84c5a6 +Payload = 97d770cbb2c42a552e450cc4e35e5668b2ff89cec735cc91 +CT = b3b262bc8f073ff676cabed3792c3f4ad2ecd5fab5aaa5df74a4e1198878a76291594b9826d4b563 + +Count = 146 +Adata = b15efed90a5d1d62f545ac22af6e +Payload = 86bb2ae50e36c72936240a74502172625cbca210cf285077 +CT = a2de389233f5d28a6eabb863ca531b403caffe24bdb73939ff5f993dcfbd048274da7439c0f9ef5a + +Count = 147 +Adata = c9eb714ed9858a8dc11a26ee3f00 +Payload = 0dc79993047fd6e7260aac4d847fdb4d16483f28b13b5f17 +CT = 29a28be439bcc3447e851e5a1e0db26f765b631cc3a436590e87710559a375ece6ef2953b6aa2542 + +Count = 148 +Adata = 07ca22271e95cb48a872046822b7 +Payload = f950e96d65a55efb3be3a55daffb421afad1d5625e3440a1 +CT = dd35fb1a58664b58636c174a35892b389ac289562cab29ef998035c81716e2d1ed4b4d56ff18af5d + +Count = 149 +Adata = b65f6773516124317cfb4b1fcdf5 +Payload = e160e28e601a49d16db18f25410756b330b036c42e615fd6 +CT = c505f0f95dd95c72353e3d32db753f9150a36af05cfe36981ae73a9b6896d8fc1b8c0d772d632983 + +[Alen = 15] + +Key = 520902aa27c16dee112812b2e685aa203aeb8b8633bd1bfc99728a482d96c1fe +Nonce = ddf50502f414c1bf24888f1328 + +Count = 150 +Adata = 22b4f8f1aac02a9b2ef785d0ff6f93 +Payload = 533fee7d2c7740db55770e48cb1b541d990ea3f8f08ed1a6 +CT = fc867b319e0e4ab45ec518a1b5dcec4f29982173f3abfd4d8a8f8d14d2bdac84c3737cfbd75b7c0b + +Count = 151 +Adata = d0a43de391d492746ecf322acd6e5b +Payload = cced20b59a6b2c3c45ea6c87802440c9c47b1015e83d86c3 +CT = 6354b5f9281226534e587a6efee3f89b74ed929eeb18aa28fce59f5e6e3cee284b4cc747ff5ee13f + +Count = 152 +Adata = 3a789c06f87f05933c34a1cf9834a8 +Payload = 90939a4530181ad6900664f66bfc2ce0289432a0afe9babe +CT = 3f2a0f09826110b99bb4721f153b94b29802b02baccc9655ddaef56d8255125f7c316c6c59ce779f + +Count = 153 +Adata = 785260973f112c56d9f891160c4c11 +Payload = 86cd926b9565b76a88fde73c31e9ac908ffd1e6ca30b59ce +CT = 29740727271cbd05834ff1d54f2e14c23f6b9ce7a02e752555810cbcdf48f05d0a7808673c82d08d + +Count = 154 +Adata = bf6a144591c0ea7b10274fbd3345a1 +Payload = 6ecd1c1acc6290672f9cf639ed0cebcb21ed0c56f35a5ce3 +CT = c17489567e1b9a08242ee0d093cb5399917b8eddf07f700849e41e5d34a698ae1d96f16bc68da944 + +Count = 155 +Adata = 7d9488b500d89a27f367f34a448a87 +Payload = b01e3f4fb5ee7501e8c2f4ccefb542ae20d7fd61a2c41c8b +CT = 1fa7aa0307977f6ee370e2259172fafc90417feaa1e130601bc54e546d1a6fcf6187169feb1ea533 + +Count = 156 +Adata = 060fc718e994edc7bac9962ca7f28d +Payload = 22ab6a0daf953165dda864cceeeb782e275c0b072aedd284 +CT = 8d12ff411dec3b0ad61a7225902cc07c97ca898c29c8fe6ff2eb6c0ab42acf42985c721bfd576e71 + +Count = 157 +Adata = cb6f96dd06015967279ade310a7401 +Payload = f96ed20b23c784015ff58f5f040798ca75e3b98045deca8e +CT = 56d7474791be8e6e544799b67ac02098c5753b0b46fbe665ac502b8e65cc1329b6895afdd354f5db + +Count = 158 +Adata = 9aa6d501455019b4ef4c7fb789d22f +Payload = 648a84813ca97aef4ab7e143ee29acb946388660f18eb671 +CT = cb3311cd8ed070804105f7aa90ee14ebf6ae04ebf2ab9a9a87e5f8a8148f21adf721477c36bd99ca + +Count = 159 +Adata = ebd1d12bbd14176a0d4080aa1edb89 +Payload = 32d71e59634126ac6c6156a80a0dfa0175b29e9f40a31696 +CT = 9d6e8b15d1382cc367d3404174ca4253c5241c1443863a7dda9ea0427522dbeaa509a11755434760 + +[Alen = 16] + +Key = 57da1c2704219ed59abfdf04743a9a93c87a63d471818de0f1564b2db6421562 +Nonce = 4b60a47b7e90f622fa0bf803e1 + +Count = 160 +Adata = 0ae8c012ff39753510df3ee80707e4e2 +Payload = ddc3c1aa73fb6de92bb4db138e26f3c2e0543ab4f5924871 +CT = daa8256d4753fdf9cfef876295badaba89b45cc497f54d220ec2c6fb687753bca4580adc6aa2f296 + +Count = 161 +Adata = d5b22e7697ba70e00c7ef32709563f01 +Payload = 34270576724083e9989764d08a0d5c1b4738f34927a1e436 +CT = 334ce1b146e813f97ccc38a1919175632ed8953945c6e1658f30b9c8e380c98bb939a4e8a85af758 + +Count = 162 +Adata = 6b4edef415763aabcef01863e8197aec +Payload = 904fe88e7a8e76447a64b488ef84184d0f1ab1b67f0c5a7d +CT = 97240c494e26e6549e3fe8f9f418313566fad7c61d6b5f2e53e80d8ccc687fd303f4cdef44b6e8b9 + +Count = 163 +Adata = 4c099809061024c010a77e9621fc2bcf +Payload = 51fe7bac8f3255f17f64fb9322210fb7d8da8e762498b233 +CT = 56959f6bbb9ac5e19b3fa7e239bd26cfb13ae80646ffb7600c635dac5b70338dac3f33ce16a99145 + +Count = 164 +Adata = 9d329439588164d5a96675a85c07a039 +Payload = eab6dbc13bb92df36b1882df2b8f34c3cefa41f95717fbd7 +CT = eddd3f060f11bde38f43deae30131dbba71a27893570fe84f996e8163affb1494bb3c12eeadf16b6 + +Count = 165 +Adata = b768fc3daf29ff9e8bd575072d986e99 +Payload = c44c9c287d3eac7c30570d9c4adf2e4857c598f7c54cd126 +CT = c32778ef49963c6cd40c51ed514307303e25fe87a72bd47598b4206a9622d5631751a497dfb1f662 + +Count = 166 +Adata = 3efc7cc2d16bf82d2bcfbc559a09b2c9 +Payload = c11b9c9d7607f387359c0038d3e8ec4d527562ce63c3384c +CT = c670785a42af6397d1c75c49c874c5353b9504be01a43d1f7dd300167d267ad700dea37fb475ecdd + +Count = 167 +Adata = 0ff89eff92a530b66684cd75a39481e7 +Payload = cc17904b166f28df82f57889f391159a4a308e752d714ee5 +CT = cb7c748c22c7b8cf66ae24f8e80d3ce223d0e8054f164bb6303e9c9bd0d8e4aac42894ca03d6ab06 + +Count = 168 +Adata = fbd11bc75759f0461e796f6917aeb42b +Payload = 6f97e595ea2f40612ea84a2097b974d235055fe1dae59403 +CT = 68fc0152de87d071caf316518c255daa5ce53991b88291500953f46e0e9cf1369e9eb018a4df3c09 + +Count = 169 +Adata = b79940952f42537484aa2907c72dffa9 +Payload = a48cbf933b88c0ec5ddcdd8fcad186391c2cbef308607de5 +CT = a3e75b540f2050fcb98781fed14daf4175ccd8836a0778b68a1702dfa0cd9c290c5ff9c35cc83705 + +[Alen = 17] + +Key = 9267ebc99ccf648b146cba3c251187e24a9947d806ceb0ced6894211641a1e0d +Nonce = 9b7298950280e8762ecdc9bbe4 + +Count = 170 +Adata = 5824689453bc406bf891b85e4576e38fe8 +Payload = 967daf12f16f166b7b5038f83a1cf0b980f5abf4c7746f2a +CT = 7cfe2a7a54306eb8d8a63d3d1ae86794f9a2c22198b2cb4f10ca926f1a430c08c12e23db3d913e93 + +Count = 171 +Adata = cd15973753b94b77bb4b778de8b3b0cabb +Payload = c4a756f6024a9dceabf6e264fffff9c719217fb418141ac5 +CT = 2e24d39ea715e51d0800e7a1df0b6eea6076166147d2bea05d5b674fd15410cc235dba6d8c8d82a8 + +Count = 172 +Adata = ed8540f7ce451c522c1ff5d2d1030d7b3f +Payload = e0d5de7d1eace211c0e70859ff315ff485d1200c6dd13f93 +CT = 0a565b15bbf39ac263110d9cdfc5c8d9fc8649d932179bf688750b5f36c86e7eda9015e960a7471a + +Count = 173 +Adata = cbbecf92551a15f5cf00a5be4a50b0eb17 +Payload = 05a4a4ba28fe8876f9bcfa5ec60651fd3fd4732f22049bd5 +CT = ef2721d28da1f0a55a4aff9be6f2c6d046831afa7dc23fb0d5fa842209dbbc04c87965f78500fec1 + +Count = 174 +Adata = 873ba7f8b71517ec50297b21cf94cdb7a5 +Payload = 9cdebaeee8690b68751070691f49593668a6de12d3a948b3 +CT = 765d3f864d3673bbd6e675ac3fbdce1b11f1b7c78c6fecd67d147edbe114bfdb3f3b9b37d5719ef5 + +Count = 175 +Adata = ac087420feb1e1e8c2546c2a8b8a5af0d0 +Payload = 5672e61cf664d73918dc1ca84df1fce82db0e305a61d57b9 +CT = bcf16374533bafeabb2a196d6d056bc554e78ad0f9dbf3dc57b4c2bbc377937d15b3b89543e29d0e + +Count = 176 +Adata = a12c690568114fd7a677f49d74e84fc1a6 +Payload = 0f5452e6b51540cf219998590995cd7f8785fa40b4f217fc +CT = e5d7d78e104a381c826f9d9c29615a52fed29395eb34b3992e6ca774074b47b59adabeaf8835582d + +Count = 177 +Adata = 7a78ddfe5afb2dc90ee4a600c2fc014b0f +Payload = 9ad338cbfd1b52e6ae4178f05e00062274f8b0b25eae72f7 +CT = 7050bda358442a350db77d357ef4910f0dafd9670168d692bd320f48a7221537e3cbed5ac4154a56 + +Count = 178 +Adata = 6053e466ed1f647a3cd88c4d2052ec00cb +Payload = d17b8d556e83190c84d4a812957c64ffa7f336298f4e2c72 +CT = 3bf8083dcbdc61df2722add7b588f3d2dea45ffcd088881740574e201f9a26932a87c8d822505814 + +Count = 179 +Adata = f7673e3beb526834d6507058fe62e34987 +Payload = 2eaef86b0f602364f86510eabc58bc9ad1e6f0a6f6df0b83 +CT = c42d7d03aa3f5bb75b93152f9cac2bb7a8b19973a919afe6837dfa3fdef2f012b6609de2ac5dd9d6 + +[Alen = 18] + +Key = 7a855e1690ee638de01db43b37401dcd569c1ae03dc73dd0a917d0cadb5abc29 +Nonce = 8f160a873a1166c8b32bccbba7 + +Count = 180 +Adata = 72674aca7eba2fc0eeafbd143c2c4d8aa6c8 +Payload = 33ae68ebb8010c6b3da6b9cb29fe9f8bd09b59ec39f4ce4b +CT = b22afdf4f12c43ec23e01ac1215a3f5286059211207e957057e9a9203da74387a9468f8af5e27547 + +Count = 181 +Adata = f7da3f100b80e2ade812f1700aab6b72f746 +Payload = dbb29817b86cb80e0d008742cedfbf52b236f15ee8cad50e +CT = 5a360d08f141f78913462448c67b1f8be4a83aa3f1408e35a3985f12a49eac424a35c94645917e91 + +Count = 182 +Adata = 4b05eaadf98505d0806c233b2cdcaf4254e8 +Payload = 145aa8cfd544a2f46bae1aa83cbdb3d21c3d1350078a3af4 +CT = 95de3dd09c69ed7375e8b9a23419130b4aa3d8ad1e0061cf4ab089a8724b87a1167180963d44ec65 + +Count = 183 +Adata = 05a3aaa08b9a6aaeb84704431425d0e45a14 +Payload = 6b32e8906dc89194a69410b79cd041b62eb01afb28a3e10a +CT = eab67d8f24e5de13b8d2b3bd9474e16f782ed1063129ba310a7d1520141892e140448292185c41c7 + +Count = 184 +Adata = 74db01edc26a2d2044cb8eaad8b907b78863 +Payload = 545ed03588fd85a8bbfeee66d2082ae6f8e2f3c9dbd8725f +CT = d5da452ac1d0ca2fa5b84d6cdaac8a3fae7c3834c252296472d3eee219d94bd788f62df4add5ec40 + +Count = 185 +Adata = 5f2c6ddf5a2403e04dac8b2813c060b67e76 +Payload = 66dd5fd8611c551973a3d0c078ec2b4d39ad163d9168de3c +CT = e759cac728311a9e6de573ca70488b946f33ddc088e28507c600496f4f8b1b7da118ee36d8cd57f8 + +Count = 186 +Adata = a650a2a5e3c6f7c95614570aaefd0cdd9a42 +Payload = 6f364b3f778376cbf3f4b0b0c5350a8fa278f9d8c25faad6 +CT = eeb2de203eae394cedb213bacd91aa56f4e63225dbd5f1ed4710004d06ce7a7efbd19da4e3ce3cf7 + +Count = 187 +Adata = 477c2484cf5c56b813313927be8387b1024f +Payload = 3de4798d8ad84c460b92abc10b7f5e7c9fae46a1dd353687 +CT = bc60ec92c3f503c115d408cb03dbfea5c9308d5cc4bf6dbc304099641c4ec3dc2c54fdf4f48dbef2 + +Count = 188 +Adata = 564e1df74aa2d7ee33b66cfeda810774e16c +Payload = 7769b45fea11f530fb9a67f1b5b1964a34cfa32bbb03f4b1 +CT = f6ed2140a33cbab7e5dcc4fbbd153693625168d6a289af8a905c1b05e8945685f8688faea777eb43 + +Count = 189 +Adata = d5e66502529b0045883d935e05acd242baa8 +Payload = 0c0a502b42f81b51806c7080a8155280f493f2922cdc7df8 +CT = 8d8ec5340bd554d69e2ad38aa0b1f259a20d396f355626c3ea5a3b6a8bafde4006b993cfb3b13557 + +[Alen = 19] + +Key = 0ebdc6ddb4c502725dd6ee8da95d56a0d1044b4694d6ba8475a4434f23a8474f +Nonce = fb717a8c82114477253acc14f6 + +Count = 190 +Adata = 41e9d65632f74f449a6842d5e6c4a86ef83791 +Payload = c7360282c85484a5a33ab1c68dd70873ab4e74ffd4a62cd5 +CT = 2e961b3a2fa1609a4e6fd04bff6ac5e306ae2638706f997b42be2e2ba05c54b619850db5c9d684fe + +Count = 191 +Adata = 555304659bde926cb2553b8a4605251fcddd92 +Payload = 1332314d1cf783b9f64e0fa2d42d43d225da9fd5165b5f0a +CT = fa9228f5fb0267861b1b6e2fa6908e42883acd12b292eaa4bbdee2605bc69601b1e83d1e7a0b400d + +Count = 192 +Adata = 69ea953dbb910ec589372d797c7379d3f3b9e9 +Payload = f264da8606ea429e0e25da3f2efafe28beaff05b42097369 +CT = 1bc4c33ee11fa6a1e370bbb25c4733b8134fa29ce6c0c6c7304611baf530932da7954f714514d228 + +Count = 193 +Adata = d7186a67061319b44eedc0677ebf5d932d5bce +Payload = c9ee6482144dc61c43041324a2c18ede370011cb4882b0c5 +CT = 204e7d3af3b82223ae5172a9d07c434e9ae0430cec4b056b6d1d44e26404b7324767f0b3f7486f8b + +Count = 194 +Adata = 38f37d5e2da017f1953ff3701be0b38809ba80 +Payload = 40524a4d32a711e7d5a59809878c318f42b6e2375b77b8a7 +CT = a9f253f5d552f5d838f0f984f531fc1fef56b0f0ffbe0d095453724d2db19f606c85d00e49b0bb38 + +Count = 195 +Adata = b3b2d249cd3517555fa692bbe9116f069e7405 +Payload = 961c15bd7dc34cd5409c9e8869988676ec6845ecb0ee85fd +CT = 7fbc0c059a36a8eaadc9ff051b254be64188172b142730536db1e4112fcd650e8c0f0f6fbf2d07e1 + +Count = 196 +Adata = f5b5bcc38efaff01f69bd3a106dcfca3cc6414 +Payload = 879568ab9ebdea768a5459ced1d3181d822536c3d1ba38c3 +CT = 6e35711379480e4967013843a36ed58d2fc5640475738d6d1cedb29e68322e47ff9997f859257d98 + +Count = 197 +Adata = a2098e3e23826e01f31107a208202f710eff00 +Payload = 47cb57599686716c75d7ecef5541d20fb908e6d98c39925a +CT = ae6b4ee17173955398828d6227fc1f9f14e8b41e28f027f41c12bf2a3571ed672592b27e986e9058 + +Count = 198 +Adata = 20a3d53e77201599540344c4e746c3ae3a5f84 +Payload = 4a8667b5ee09d3d4a6dca9a95f4ad406f1da94b846dcc6b8 +CT = a3267e0d09fc37eb4b89c8242df719965c3ac67fe2157316f12b2be8f5966d96602111c28f87b104 + +Count = 199 +Adata = 92c592ead4b3f193cc36687593d4f0f412a5d5 +Payload = 1dc9e32ac4176f64bd78a6edd651ebeea3ba85dfcd8298a8 +CT = f469fa9223e28b5b502dc760a4ec267e0e5ad718694b2d06776df0a0cf048892e65bd8ad77cb2255 + +[Alen = 20] + +Key = 2ff64bbec197a63315c2f328dcb4837d0cdc21a5d6f89ff1d97cb51195330cd8 +Nonce = a235f8ee3de9896b71910ac02c + +Count = 200 +Adata = 2b411bea57b51d10a4d2fb17ef0f204aa53cf112 +Payload = 4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a +CT = 1bf122798bd8ee8e73391d589bd046a294d1615794e69cb9e6f3ba30143acbc3a1c1c6ec74333107 + +Count = 201 +Adata = 0248359f8071143c3cc1d61882a3547a0b3d2175 +Payload = 4a6a7151465c2abd7e7fa1fd13019ad098b6ebcd190e96f7 +CT = 1b8c01056a837081553cb646ef73115a3ddcd3a095074e6436cb510c13a039f4df8cc26a942f9911 + +Count = 202 +Adata = cca77bc4cf6c0abd3393dac3fbe90fbc8a1154f7 +Payload = a94f5ede43929d48d2c5a58c3262d9127d2ac3cb2fbd5768 +CT = f8a92e8a6f4dc774f986b237ce105298d840fba6a3b48ffb7fe0dedc2899dff81a251cff16bf5897 + +Count = 203 +Adata = 9c082a84646c070bb11b7d6b92b62f06ee5b5b71 +Payload = 7303bd41cf47289a3111366d08e8e21548baf293052029eb +CT = 22e5cd15e39872a61a5221d6f49a699fedd0cafe8929f17886c43ac23800de60a1fd2caef0f03261 + +Count = 204 +Adata = 1c3ede1982a807a410ae1e21947bf430f8db7027 +Payload = fa9743a67978c20316cb91801d7789e350079aae3aadbd43 +CT = ab7133f255a7983f3d88863be1050269f56da2c3b6a465d026f7907e235c09d3322c4092d2e88f88 + +Count = 205 +Adata = deb05a30a026ff66ce71e98afa62f0255aef84f5 +Payload = 99599b4042dcdb685350cdecfdf24992fd5b165670025d0c +CT = c8bfeb146e0381547813da570180c21858312e3bfc0b859f6bb44a28c145d49f49f2821d4044e4b6 + +Count = 206 +Adata = 93dd9b00a3353e5331338dcfcb7ca7e0bb873a4e +Payload = 451101250ec6f26652249d59dc974b7361d571a8101cdfd3 +CT = 14f771712219a85a79678ae220e5c0f9c4bf49c59c1507400f7d20aa3d792d6a3ebc5ee0df2fd89c + +Count = 207 +Adata = 0855263860043207543c8c34648d53ec51c4f47e +Payload = b2db87b7787531968d603098cb20ca7c438b4af72623fea9 +CT = e33df7e354aa6baaa6232723375241f6e6e1729aaa2a263a7ca4733f0208668b0a7879305e861d71 + +Count = 208 +Adata = ee2d3a66deb3ebca867a902bb9202226ed516ded +Payload = ca18ce38086223e63b4f0b616d110010f9e45eac42f2ba46 +CT = 9bfebe6c24bd79da100c1cda91638b9a5c8e66c1cefb62d5d76b482ff20429da8f60f0f863e1af50 + +Count = 209 +Adata = 8e531aaea849addab6a83497cbc504f489505952 +Payload = 5717ed5da5b8aa806a18bfe979502bab6632c9428d3a7725 +CT = 06f19d098967f0bc415ba8528522a021c358f12f0133afb6aab66e1ac2346ef97850a4985c64b737 + +[Alen = 21] + +Key = 24e9f08a9a007f9976919e10dc432002e2e078a339677f00105c72ed35633a3f +Nonce = 15977424eeec0ec7f647e6c798 + +Count = 210 +Adata = 2d838eb51a4bc69a001a18adf2084a680f02a3c5fc +Payload = d3416a81b4246eb0bf8119a72a886bbc0ac9449c69f71d2f +CT = e001a8fae390dc5d672cdd18f86a1f728158ec83a002050def9af5679edbcbb7db20ab6af30698db + +Count = 211 +Adata = d83ee7ce22fd1a2882d8d552346e4d7b3efdd67da4 +Payload = 22b6f10b482448626f6c7bebb14f1497896d071738133b4d +CT = 11f633701f90fa8fb7c1bf5463ad605902fcaf08f1e6236fd435a5a38f84387f63b13407f65ec86c + +Count = 212 +Adata = 2d5537b24d0b0f7a45703c1e131656ec9edc12cdf7 +Payload = d60edc830be8207ffd9e9f646d3b4343b10b3d56acb89d44 +CT = e54e1ef85c5c929225335bdbbfd9378d3a9a9549654d85662ede8a705f8c988f55459542bd631b1c + +Count = 213 +Adata = 1a750eb326923412d94ccb35f5acd0f87415268178 +Payload = 716d3132f449a9def383978102ae50ed3ccae0cb346ba1df +CT = 422df349a3fd1b332b2e533ed04c2423b75b48d4fd9eb9fd986de774a612230ce6c71449d26732ce + +Count = 214 +Adata = b10fc523bc4562d44edfe5956f93c15c4ab38bba3c +Payload = 063c2ae2a15f26f979bf90657d20643e3184f1a9f75a3aad +CT = 357ce899f6eb9414a11254daafc210f0ba1559b63eaf228fe710431005264fa7d3fc04bac50fc1ec + +Count = 215 +Adata = fe4f60ce9634e7dbc5e56204c4bf8aa9be577027ec +Payload = bdc513e56a5bb70c02abc041af04d6e45e735d10cc88357f +CT = 8e85d19e3def05e1da0604fe7de6a22ad5e2f50f057d2d5d5c13bea6ad0cad724e6cd02c89517ffc + +Count = 216 +Adata = 48f3ceda4fd390a7eb38f7f5bcd14310af6b5a557e +Payload = 7dc5d8cd90ce2faf76bbd0d52e5ae11b310fc2b0051c4377 +CT = 4e851ab6c77a9d42ae16146afcb895d5ba9e6aafcce95b55d2a5531655aae01e249f213e0e04af0d + +Count = 217 +Adata = 199ec321d1d24d5408076912d6bb2b6f192d6b347f +Payload = 66c2696edec26ba3d07bd3f485a0d6ce8a1b0a85b20083e7 +CT = 5582ab158976d94e08d6174b5742a200018aa29a7bf59bc52a127ef341345f9641b26e91265e1482 + +Count = 218 +Adata = 8b013f5782d5d1af8dbd451a4202866095dac975fc +Payload = f4da8ac3e8fe5ec6a5b6a2f27b68396e850b46a024d441f0 +CT = c79a48b8bf4aec2b7d1b664da98a4da00e9aeebfed2159d2a005ca13c4bf715c3b7b2782f799b23a + +Count = 219 +Adata = e320df32b71cc530e8493b12b9afbeabc255c5eb44 +Payload = 244891cb4af66cc8e99a3784a2e82475e51bd5c7fde67cf5 +CT = 170853b01d42de253137f33b700a50bb6e8a7dd8341364d704642aff9cb9288d49f0e567dd837e05 + +[Alen = 22] + +Key = 0ec1b22b8df05dc92135d2dfbefed8ea81458f5ea1b801e8a218faf6cbdf1a79 +Nonce = 97ebcb8575bb58260208d5c227 + +Count = 220 +Adata = a2f6337f86dd00d1a58448851e95d8c9bace4a5c8710 +Payload = 2f59d94d4ab8eeb84c2a6fefb7fb0a3ac059c1e1a65ae34a +CT = 7ca0b1dbe34b0391e524b868b0af08b3e096917664d6aa2cabc1f9d0132394149c9062b74b82f04b + +Count = 221 +Adata = abf26b05558252c8e38c52b1ace087bbd1eb3d561239 +Payload = c25381853f73a3dc4195fdcbc45dfa1a40eb8324749adb2e +CT = 91aae91396804ef5e89b2a4cc309f8936024d3b3b61692486d7df57c6a792f6f6b24cb5f87e92123 + +Count = 222 +Adata = a13ade56b47803897666e42ef2ef88be0e779ac86c28 +Payload = 8dc5226a2a13088c87f4bf94262e0c0413f06b35d2fda79b +CT = de3c4afc83e0e5a52efa6813217a0e8d333f3ba21071eefd4ac19b0b74cd9d5e100598b96c9f1f2e + +Count = 223 +Adata = 3c5b68b65edf62755b7e064bd26c843816bf6c1cd481 +Payload = ee4b23039cd512cfab8c7a2d0f2c78d66764520bc88759e1 +CT = bdb24b953526ffe60282adaa08787a5f47ab029c0a0b1087a77a27eabfc79f192c0ac491280af8d0 + +Count = 224 +Adata = 0213fe13c49083d7c00335e1864dc139c9e7123162d1 +Payload = 30b48d4021838090fbd5251069ff8c631452daee5ef899db +CT = 634de5d688706db952dbf2976eab8eea349d8a799c74d0bd39935f91c1e29fc1e4c5c5427ca9da79 + +Count = 225 +Adata = a32291746b151be8134e183798aa82bef210343feaf6 +Payload = 2286a1eddd80737a724ca941217e9f0232870b6c2f20d29c +CT = 717fc97b74739e53db427ec6262a9d8b12485bfbedac9bfaaeaec90ada2a1ffef64c3873af645a40 + +Count = 226 +Adata = a30f2fd445820cdf800145540602c877da0e4c311272 +Payload = fe703ca0901e4a706ce1393c7d8ce18a03eb2caadbfa7b8e +CT = ad89543639eda759c5efeebb7ad8e30323247c3d197632e87932952831d0ba25c77c18fe154d8ed8 + +Count = 227 +Adata = ed438e393e0e37629cb25044ae89de9fd0d42d60c1a3 +Payload = 7043c67726870bb5816da925925bc2722478311c8a606cca +CT = 23baaee18f74e69c28637ea2950fc0fb04b7618b48ec25ac234fd0241d00f3890a23ccd0bf16dcbf + +Count = 228 +Adata = 1013946815001a2c08acca4196e0d6668ffbb3883cf1 +Payload = 695e9712dbbf883e9bf8af9188bd01fc631968928258168d +CT = 3aa7ff84724c651732f678168fe9037543d6380540d45febaf43498b0c3f70c119f82d5812db940f + +Count = 229 +Adata = 44cc9b2510680c4d73f1938c77de21242c8ee790ed7f +Payload = 67ba90d22c6bb5f649bc0c505c5ed23a299882559a3bf520 +CT = 3443f844859858dfe0b2dbd75b0ad0b30957d2c258b7bc46db66dbb03a4c943ac089ed11eb214bbb + +[Alen = 23] + +Key = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Nonce = 451101250ec6f26652249d59dc + +Count = 230 +Adata = 7cc9c51b69f98a06391ab32742fb6365e15106c811fe8a +Payload = 065ef9eeafbe077c1c7049f43eb0d8999708e8609f214d5c +CT = 990065322a438e136860f7b019807e9feff52a642bf3d44a9163fa7a867f04cab6f52dc250070f31 + +Count = 231 +Adata = 7bb1bc069a783d45d51d8ecd0a53ab7a386fa1f5ef12a1 +Payload = 69b2b056f2265e707d3e31e68bff6a060544c8a737b2a9b9 +CT = f6ec2c8a77dbd71f092e8fa2accfcc007db90aa3836030affd33dd9155619fb040dcd6038c7b7367 + +Count = 232 +Adata = 0dd220919d0eeee3b7cec36c47e376b778583b38bf61c8 +Payload = b98d79aaa4c04171398c7f1189497acaa7546ef068bc7a3f +CT = 26d3e576213dc81e4d9cc155ae79dcccdfa9acf4dc6ee3294fcba5a886b1f33cf1cf44618d28f01f + +Count = 233 +Adata = 1c1915fab09348b9a5536495c70d1a040305708c112479 +Payload = eeaeb773ade5fb2d27b50bb892916333e0b123c6e3ae5bdb +CT = 71f02baf2818724253a5b5fcb5a1c535984ce1c2577cc2cdeafe2c670eac203d5e90b9d520e7a618 + +Count = 234 +Adata = 614b0ac4611b6c6d3b4ed089510dcd2215567bc3789f85 +Payload = f2198e1f91fde2672a1ef60403c0d175f366b6780ee9f1c2 +CT = 6d4712c314006b085e0e484024f077738b9b747cba3b68d4f0388746438e83b731b5588fef53f1f3 + +Count = 235 +Adata = 866fea4483d4e903566844e31c24283571832dfae32c74 +Payload = ba37617342b4eefd4bdce8fad30c4751b206d47814973b3a +CT = 2569fdafc74967923fcc56bef43ce157cafb167ca045a22cfca81f8b36d16698a600fd701f2c6424 + +Count = 236 +Adata = 9d7546f7e8b949c539d21a357f81d0151e278d0bf2c5a5 +Payload = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f6 +CT = f6f3563424142a9d8a8edc1d384bea5d612e770ac247b8e04c15a6d292c7ed2f31cf9512435ec7d2 + +Count = 237 +Adata = 42b692048c8b3cce1b5e83f4f33232a7d7d0bc20695e7e +Payload = e0753d4248643642c7a96404de8d76c9d80527b659ec6d31 +CT = 7f2ba19ecd99bf2db3b9da40f9bdd0cfa0f8e5b2ed3ef427a2ad73179d0314b5fe52dd7217518cb8 + +Count = 238 +Adata = f1dfb6fdb31cb423226f181c0988a52ee4015aef4536f4 +Payload = 79ba959c7221b293e2115f538d9394c64284c756563c04b0 +CT = e6e40940f7dc3bfc9601e117aaa332c03a790552e2ee9da69ccc5ba1caf933b80bfc6f281109688f + +Count = 239 +Adata = 8eafce9ba466fd53eb87f499d7c76bd486db0e90a3d281 +Payload = e1590206717a708cad9cca7d23a3b8ee5f7fb7786aa3be47 +CT = 7e079edaf487f9e3d98c743904931ee82782757cde71275173271ec36d92fff34609169f579c8f1d + +[Alen = 24] + +Key = ef4c1d2314e671f666cc6667660f1438a293208c7cc29b412d81277f0a635c91 +Nonce = 50b23b052922366c25dd40e348 + +Count = 240 +Adata = cd0522ebe1fed82465277d1c10ae9316a98b4469be63b180 +Payload = c99c3e79125b6fd95e737326a842424eb6c6ecea4c0475c4 +CT = 76df4be4ec8373864399acda11294b220b9f7c3a7d2b3660b25764e40ac6a171e7e6bab4fdee4288 + +Count = 241 +Adata = ce5bf070678cb07e963263b1562ff79311144addb6e4de4f +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06eb +CT = 519d742d71422c63c2fe1661c32e7a45cf9f7f2290f4454ffca49758d17f2073066b82667eae6ce3 + +Count = 242 +Adata = 07175be2475cc735c9a3c1140895277378debf8fb1c87c24 +Payload = 6d5579aaaf8737b01620424f3ddeaf538f10dfad094e5ec4 +CT = d2160c37515f2bef0bca9db384b5a63f32494f7d38611d607c1d64d7e9de47a6ad7878283da9d870 + +Count = 243 +Adata = c821a8d4bab9d993c20dd206955304a55968e6db5ab6480d +Payload = d0628b2027f06c246497977d05f211b2c2e302d5b82700b5 +CT = 6f21febdd928707b797d4881bc9918de7fba920589084311adc2bb471862d25cfe25e66fedb8e28c + +Count = 244 +Adata = 68439bc9d176feeeb4119d00ed5449dfefb72b5a582bfd97 +Payload = 6cc9749f48c61050e421afa3a10ad3dd3aa02cc3f8586915 +CT = d38a0102b61e0c0ff9cb705f1861dab187f9bc13c9772ab1319a493abc947945f1312395ea98d937 + +Count = 245 +Adata = adb262c924942e4e1964e9d97c6a8c159fbf9bfedc5ff296 +Payload = 92d50736466e64e6225962e76bd90da824f716a3301a1a90 +CT = 2d9672abb8b678b93fb3bd1bd2b204c499ae86730135593421d0602d29447ba6b24a67509eaee1e8 + +Count = 246 +Adata = fc7b08707d3c3dac7689ec18088ee6502ef08d3ffbff38ed +Payload = 87c7ac031fd63e4c83280dce6b68a92dfafb6ea19388fa9f +CT = 3884d99ee10e22139ec2d232d203a04147a2fe71a2a7b93be52a2eeacb1f023e849161b6306b6cfa + +Count = 247 +Adata = fd43dfb66041b117f2ac54c94f7b6e2677860864d9494175 +Payload = 6b53c46266b2f4284d8fe7f0549c98977344d67e178e9a8e +CT = d410b1ff986ae8775065380cedf791fbce1d46ae26a1d92a0d8c5b1e96b21460e0b5414639abeb0b + +Count = 248 +Adata = ef1ad3eb0bde7d4728389da2255d1f8a66ecb72e6f2f1ac4 +Payload = 8e7d8a44244daa7df2b340993e32dac50e05d7b2e103be98 +CT = 313effd9da95b622ef599f658759d3a9b35c4762d02cfd3c1c97260d20797d374c595cbc2ff080bc + +Count = 249 +Adata = 9895b24d12b004b215583eac70a95f4fba7442164f35c57b +Payload = cec07df916ffb7a453d0eb588b7462096f22874bd5abf814 +CT = 71830864e827abfb4e3a34a4321f6b65d27b179be484bbb06cd287afcbdbc5531f11246080b22677 + +[Alen = 25] + +Key = 8544808e8fbf8c3a5e1d4ca751d4b603af9fe119eabc6923205815e0e748b7e7 +Nonce = b44a58724596b4d8dea827c1a0 + +Count = 250 +Adata = f5b2c88f5232c37273b1e66aa31cfa7201e33c21d60054d025 +Payload = 617d54fc6a23601c79e3984f93bfc2d151fde420863206b3 +CT = 57b3414db48982c6567265e1e0173bf38fdfaffe4461fbebc1411af83237c0f9eb0bfe8ed914da66 + +Count = 251 +Adata = 8fabe14dcb3aa2fd28281147c326e98ad699ca7997f03a105d +Payload = 337290d0b4ce1e87afc3cf01d6c98f8c17a4603120dcfcd1 +CT = 05bc85616a64fc5d805232afa56176aec9862befe28f01897ed6e23720b60ffe54bbb9f7ff371008 + +Count = 252 +Adata = cf193eb3d755cb8e06c5be2334b5c8b7a22b6524d46d547ba3 +Payload = 01ef7ac6470aa02ccd8c1712827e52699d05751b78e4c5a6 +CT = 37216f7799a042f6e21deabcf1d6ab4b43273ec5bab738feb6aa6b284e7720acbd027a50317f816a + +Count = 253 +Adata = b4cadb5f9cb66415c3a3b71421b926f147566a174160a0bcc0 +Payload = 64fb9322210fb7d8da8e762498b233b0eb172c91231c50cb +CT = 52358693ffa55502f51f8b8aeb1aca923535674fe14fad937058e9c0164ca079668097fde19e5302 + +Count = 254 +Adata = 48400d76ff882d6d5129c8674acc71f445356c9db9c91f8256 +Payload = 291aa463c4babc76b4a6faf2e27e9401586b1ac83e4b06a4 +CT = 1fd4b1d21a105eac9b37075c91d66d2386495116fc18fbfcf988611d5ce0f65b217bb4787bf59bbc + +Count = 255 +Adata = 749d369d837002ad33feb8aa22c3f68705eb4872e1b8f85a7f +Payload = 141cdd7f964a78815be144a785c6a2a298c54230e73039e2 +CT = 22d2c8ce48e09a5b7470b909f66e5b8046e709ee2563c4bad6251a5fd375a48583a6d0f8eb75cbb4 + +Count = 256 +Adata = 80214108b16d030feff6e056c9a07a00a1d5e3ebb07abd3f4a +Payload = fa2441cb7f9d072b8a3f1a496b2be6728a38b94a4f44c9be +CT = ccea547aa137e5f1a5aee7e718831f50541af2948d1734e6af1dab0f105414293cb130bea285fd6a + +Count = 257 +Adata = 8b9fabe29718a8f297c9bf6f199c80bbc71f94eb3034a11ecb +Payload = c8ce88ab40b62229223d46cc44f21bb39cfef27aa9fdccad +CT = fe009d1a9e1cc0f30dacbb62375ae29142dcb9a46bae31f51cc3f7640a42460be877fb7059a3ed61 + +Count = 258 +Adata = 8812f28a0cd5fdaa226fdd44ed857241007377057be3bea577 +Payload = cf59f75ca4d6d216cf8862b44b5192c382c140f862def117 +CT = f997e2ed7a7c30cce0199f1a38f96be15ce30b26a08d0c4fbbe0ddd2e7f4aa2024b3fec9281b6cac + +Count = 259 +Adata = c8f05e96d703a4850bae1421ae9ff3aec7531baf9b899dfd75 +Payload = 4eed58f381e500902ba5c56864f6249d191e14d1b1fad3dd +CT = 78234d425f4fe24a043438c6175eddbfc73c5f0f73a92e85e5df1e5e96bb84f730fcb253d468278f + +[Alen = 26] + +Key = e19eaddd9f1574447e7e6525f7fd67e3b42807e44fbb60e75d8c3e98abc18361 +Nonce = a8c459ce0223358826fb1ec0f0 + +Count = 260 +Adata = ef88f4393d6c1e7b7be55a12144209ee051bb779e440432721ef +Payload = b3b0de10b7c0996662f1b064e04e528b7d85ca1166985d33 +CT = d63e6082c95c6c5ff2bc0771321a4f883ef61cff7b99e0ea8a20a1abe7c842ebc08c8c81a2743c81 + +Count = 261 +Adata = a4c891c9dd1fcc982c35bc74cfe71651bae424602519672b466d +Payload = 4f0b40913f07269550b7b06ab9027a4d9331f8ef98a45dca +CT = 2a85fe03419bd3acc0fa077f6b56674ed0422e0185a5e013845e2d6de83ab729dd200a21088a1ec3 + +Count = 262 +Adata = 4db5730cb9794f3b1facc9d6738115d02ba9f27ba02330fbb856 +Payload = 841e032773d58bc72a3237bc9b24c61b9efdd850fc2ea605 +CT = e190bdb50d497efeba7f80a94970db18dd8e0ebee12f1bdc10ed272c732247a696a608ef67510f9c + +Count = 263 +Adata = 471a900ee49f2cfa1d3eb37c951d810c349364d4cc3b5b64fc47 +Payload = b4db42e523e65557157b93dc0281601f7997e6731543a914 +CT = d155fc775d7aa06e853624c9d0d57d1c3ae4309d084214cd15f0df52e392c37ec15f7458469dae84 + +Count = 264 +Adata = 7b40b3443d00a0348a060db109e8882157612c43084ac5c3e9c5 +Payload = 73e0ed35c0e847188e607cde46586eb9e237fbdc5d59163c +CT = 166e53a7be74b2211e2dcbcb940c73baa1442d324058abe5421433dafea2b5484ba87b5050e1fb49 + +Count = 265 +Adata = d563f5c048a1b45265182b99ca7b9004fdc73a9cb07806dd44fc +Payload = 4f7669caaedee961dbba6bde9d09fee1a20eee55baaf98f5 +CT = 2af8d758d0421c584bf7dccb4f5de3e2e17d38bba7ae252cdf91749fe3cd52a9431d9a847a8c2a9a + +Count = 266 +Adata = d301a61eb17366d4e70942ab69b4f4bcf8ff6a97f5972ee5780a +Payload = 154454fb74e9565c56775a8e4654f75a38b954dd28c4e939 +CT = 70caea690a75a365c63aed9b9400ea597bca823335c554e07563d37846f5185bb44d71be1ea6a73c + +Count = 267 +Adata = f74b48d168f77fbd3429728c0b168ecbd854264eaef70b74fffb +Payload = 716b371857e68a17b20ea06651cdcfd4560a741830ca8a13 +CT = 14e5898a297a7f2e224317738399d2d71579a2f62dcb37ca55e93bc2d3f05d7016747690fb920e12 + +Count = 268 +Adata = 3a257ce3592a8f88162f0bb4ecd5db3bb79b54ab17b0bbc61506 +Payload = cfdb7363985aa01af6f8e8237dbfb7871eb39303b4135269 +CT = aa55cdf1e6c6552366b55f36afebaa845dc045eda912efb01c46822f839f09c41b7aa6dc06035c93 + +Count = 269 +Adata = 21916ebeca9e66b77cf55d1cac80a4c85d8b6b014f268ffa73ca +Payload = b4b67ac551d1966caa20d951351387f384c2e5d81a76a92c +CT = d138c4572f4d63553a6d6e44e7479af0c7b13336077714f54f8e77600c5bbc6d028fa25ba61a1719 + +[Alen = 27] + +Key = 9498f02e50487cfbda1ce6459e241233bd4c4cb10281dcb51915dbc7fb6545c0 +Nonce = e3bd4bc3a60cddd26c20aa8636 + +Count = 270 +Adata = 70cfcb828d483216b46c3cd22e2f9ee879e9e3059b566179b6e16c +Payload = 0d16cc69caa9f19b88b05e151b3d26accd018ca4a5786a80 +CT = f1c4bedb8d6f91676881daa37656a7e6402f472735b04a0f1f8332f4236437737438e7aa1b5100c7 + +Count = 271 +Adata = e7e5779282db80f424dc050b2c1e7754b2a5d3a8beae77beb74e34 +Payload = 148de640f3c11591a6f8c5c48632c5fb79d3b7e1cef9159c +CT = e85f94f2b407756d46c94172eb5944b1f4fd7c625e3135138be2f6f356c2eb401468be15104e7763 + +Count = 272 +Adata = d17e8189a94a559b07be9549f73d653172740e8e978f5b0a38ad43 +Payload = 00a23b25bca7c206edd051814d81083db1cd00048ce8ead5 +CT = fc704997fb61a2fa0de1d53720ea89773ce3cb871c20ca5a9646f2b6c2455603f1a6f20ea5a4611a + +Count = 273 +Adata = fda37ff136895de7ebeaf81e701e5751245201baed2e13d7e1b591 +Payload = a89409b0977f60a029dc4c1560ba6dbe7c65b068633acf74 +CT = 54467b02d0b9005cc9edc8a30dd1ecf4f14b7bebf3f2effb303fa5d8321241b1c9e18a5909d6e428 + +Count = 274 +Adata = 9c179fd0d6277a5e073e77dd6abb4cba00ad9c9932e6c002b951c7 +Payload = e16c69861efc206e85aab1255e69d6d33c52cf058dec9d0b +CT = 1dbe1b34593a4092659b359333025799b17c04861d24bd849e8cb01db1da077502814db1610662ce + +Count = 275 +Adata = cf5703228e615428d3d3805e428e754961d205c5aa0297ecdea71d +Payload = 62036cbed3666d85624d3dc9c1f437454b9ab5c03ce0de92 +CT = 9ed11e0c94a00d79827cb97fac9fb60fc6b47e43ac28fe1d40a02a49857d7b280330b8105efac854 + +Count = 276 +Adata = bab7e36098d59d3a31d7784d549aebfc6938bbd0612c85c0edb796 +Payload = 790ac86c5e9d8ce8cbec1dfb7e4fc4dca3d0b1039adfe585 +CT = 85d8bade195bec142bdd994d132445962efe7a800a17c50a5ecfa9dd03e2db70aa212ee7dcb573fd + +Count = 277 +Adata = 96f0b7cd7439721d4c9cc4f69585f8c90a95bed8fea22150efffba +Payload = 3cfacd61ea3398de20ca6bdb00e81af482320614bdfb8642 +CT = c028bfd3adf5f822c0fbef6d6d839bbe0f1ccd972d33a6cde17a7a0cd162945a3616892e101e3e93 + +Count = 278 +Adata = ee71e53d0b4eef82575c2bd38d7bd21b41fabe58c6f571954fe159 +Payload = d75c153e34ae1c6d1fcf5b1052190d8882041e1f9c5490e2 +CT = 2b8e678c73687c91fffedfa63f728cc20f2ad59c0c9cb06d15fadc2d79841d230cd55c04379f22b4 + +Count = 279 +Adata = 18a4aa894861c7720ddb43809c3d2ed2af2f1bfe8f9fd4f872c14c +Payload = 0e728056c7c64214be8f1f1727408d8cca8c42e2ac7bf67e +CT = f2a0f2e4800022e85ebe9ba14a2b0cc647a289613cb3d6f1b229b9bae4634eea6b723f432e19ae55 + +[Alen = 28] + +Key = 3ac7d5bc4698c021e49a685cd71057e09821633957d1d59c3c30cbc3f2d1dbf8 +Nonce = 54c8ff5459702aac058bb3be04 + +Count = 280 +Adata = ecbd7091732e49c0f4bda2e63235ea43bbf8c8730f955f9c049dd1ec +Payload = 89198d3acc39b950f0d411119c478c60b2422ffe7e26e00b +CT = 7717b8e4447afcea1eeebf3e39ffdab2f52828e7931ef27e475acd27900478f09fec1f479ab3a7c8 + +Count = 281 +Adata = 9a04820205234795ecd540b6a0b2fbd0b19f18106c42f374a2b98425 +Payload = c0f61950f98110db4226e269cf197c7e2794c5b87ad68cf9 +CT = 3ef82c8e71c25561ac1c4c466aa12aac60fec2a197ee9e8cf7b7ed6e8ede6ef5a73b484bf13b3424 + +Count = 282 +Adata = 0e4dbd167da0240298f4795102ef18ff9a8772c6fd73b3374cdfa30a +Payload = 7960dbc9136880e2eea7956c3271adfe2aba7dca53da917d +CT = 876eee179b2bc558009d3b4397c9fb2c6dd07ad3bee28308e47d08ea0788f7ca0ecd846689c8027a + +Count = 283 +Adata = 2de4291068a5d290b599a73c6a8ecff4f9fd6c9cc48f14c233e18581 +Payload = 0c5d7055bbfbd2bc213cfbbafa763b71b1fde6f4de96fa59 +CT = f253458b33b89706cf0655955fce6da3f697e1ed33aee82cd081f66b1c7b70718dc50367c3da6792 + +Count = 284 +Adata = dedeb714f555575fcedbd9de8171484090e6466dd4fba3c6b7c42eae +Payload = b5654edcc8f09e4f80d0258c9376d7c53fb68f78d333b18b +CT = 4b6b7b0240b3dbf56eea8ba336ce811778dc88613e0ba3fece672883438da186741e6c542b3f805d + +Count = 285 +Adata = 03d340904ace1cd52d4b72a96d96afd77aee68ac3936415005ed0d56 +Payload = d796f3409a7eeb896c3d4ebef46e9c6e553aab28b1cc4a90 +CT = 2998c69e123dae338207e09151d6cabc1250ac315cf458e5cf58d4a5552bc8ed1b1dda46703a256e + +Count = 286 +Adata = c67f9aa8cf1be3b4377c30c175d33ab2af390982c6a015d99209acdd +Payload = e4dd279a79a381c68de777df941a4779e50a1381c8aa9122 +CT = 1ad31244f1e0c47c63ddd9f031a211aba260149825928357f95cf2b57e06de4d01bbb6c0e39f37e1 + +Count = 287 +Adata = fef1b2ccd661b9fac85ba005addebdf8317ab104920549d3a490a21a +Payload = bbf0c267d952aeb6f810601b9cf1962a92dcaba7273e6902 +CT = 45fef7b95111eb0c162ace343949c0f8d5b6acbeca067b777589cd12984286af98908db88920323c + +Count = 288 +Adata = 693fae7af84aa397f0b2baaed9b3c7953f75e7424c49b6349c2fc20f +Payload = e8b13a263e0c4fb5645e500e88ab8074ab7d92e5a8dac6aa +CT = 16bf0ff8b64f0a0f8a64fe212d13d6a6ec1795fc45e2d4dfee8fc441da990dd92c0caeac9d956699 + +Count = 289 +Adata = 85e5df4ddec99f0bea14b3338b2eb190ab6584f5253c6c2ee3064637 +Payload = 067de2869333ed22c7b63ed7eeba1301bbac69b0d430adb5 +CT = f873d7581b70a898298c90f84b0245d3fcc66ea93908bfc0d502f5434bea8c3c13ad5422ff90e218 + +[Alen = 29] + +Key = 948882c3667caa81c9b900996e3d591e6fcb3d08333eeb29911e9c6338710c17 +Nonce = 43b0aca2f0a9030f90559fa6d3 + +Count = 290 +Adata = a516ca8405e5c8854e667921b5c5e1968bdd052915b55ac9984b7eefb3 +Payload = 8b9130b0c3c15366831bbb19f377e3209a8dbf7619cd09bd +CT = 4646b2acdeb11174171da23999cd54e297daa32bbc13d30512e57c576b315f48c11877178389aaa0 + +Count = 291 +Adata = db3121ea71294983b185207a9d8de3e484a66c0431bf07c962eb82977c +Payload = 7f369bbc99b6f08049eeb43566269a174829d4dddb05cb9b +CT = b2e119a084c6b292dde8ad150c9c2dd5457ec8807edb112366775e693f93af6575dccc7903538065 + +Count = 292 +Adata = 1651cf38fd9b2da65ebb4922b97dcb861128eeefa060d6c1c94b25eb4e +Payload = fd0900b5fa72e2fba43d611bad25de40a3507a5cc5d186c7 +CT = 30de82a9e702a0e9303b783bc79f6982ae076601600f5c7fb70d8de40c2068de96a274d3b5086b5a + +Count = 293 +Adata = af87b347b59e37a424004a00907dcbcf6a554e6782a9be12cb3047625e +Payload = 36318d80c02a1da41ef1652d9a752e155526b5f597fba226 +CT = fbe60f9cdd5a5fb68af77c0df0cf99d75871a9a83225789ee7da096d2fb28f20f64a000fe93e96e2 + +Count = 294 +Adata = 0680d5bacefa2ab14aa12b0e517a1432862d4215dc72dc4d5ac6b96c1c +Payload = 7a29aa2994d11215ab3ef3382b3db6ed581164a235c4b1d1 +CT = b7fe283589a150073f38ea184187012f554678ff901a6b69b88748a2de31261534cdb2237565bf8a + +Count = 295 +Adata = 9af701f0a9de52309267289bd170fb97c03c131c0a169d736137ff3d74 +Payload = 3542fbe0f59a6d5f3abf619b7d58b199f7caff0205093f8b +CT = f89579fce8ea2f4daeb978bb17e2065bfa9de35fa0d7e5330c003eb65ceedc98ae4e38ef341ee47d + +Count = 296 +Adata = dab7845fb7ead205569475753c7e26540c09d3a74312f2de25181511f8 +Payload = 83c15520d9541c86b3dd809ede42de22bbb2b75ff18a023b +CT = 4e16d73cc4245e9427db99beb4f869e0b6e5ab025454d8835c2fb596d8ff6a863604cd224fa3be42 + +Count = 297 +Adata = a844d6dbd05545ecc736994dc9fc2260c5ab63ed6ffdc40b915f8744a1 +Payload = 793a188fa3efa32f41d6e4c5b42353b95024117d546c79ca +CT = b4ed9a93be9fe13dd5d0fde5de99e47b5d730d20f1b2a3722ac782e2cd8ecb06172eef2cb9b0e331 + +Count = 298 +Adata = f9112503884615c0e8a1d8414724b0d19298988f393a27c436b2b6734c +Payload = 6b237444fb0e1f4150701546c4cb24021c5edad30d9b31dd +CT = a6f4f658e67e5d53c4760c66ae7193c01109c68ea845eb65f814492b42571033f4dffc0282ea2f51 + +Count = 299 +Adata = d633a5a3defdde6a68f959ef39a91c6ea6e13ef1a7859d2c2c94d3a5b4 +Payload = 6342312e8a72f71f2e5afe04cfcde4d60a41556111752103 +CT = ae95b3329702b50dba5ce724a57753140716493cb4abfbbb75999099df2de6e436bd99f0341423f4 + +[Alen = 30] + +Key = 3bf52cc5ee86b9a0190f390a5c0366a560b557000dbe5115fd9ee11630a62769 +Nonce = f9fbd02f28ecc929d369182752 + +Count = 300 +Adata = ebf0b3e3199a5c3773c761c725c7600add5f9d8321c9f8e5e5fd1c7a5d2f +Payload = 094b538110495e938b08cf748a6bcf3e0c80ff9c66570237 +CT = 4d8b53016fc8bc9677184c0fa15bbd3d671b9366d82ecb67f8562eadcdcbcdbad1299bea1523f5d2 + +Count = 301 +Adata = a865b88d512e485ab3f2844c29e6dde0cf1151efa9ad3b3021d06fffb74b +Payload = 23edddd8732cdbf03af08162f0e4a24c9222bdbb4549c663 +CT = 672ddd580cad39f5c6e00219dbd4d04ff9b9d141fb300f3359ff77cf0962455b3539dbf91f3077cc + +Count = 302 +Adata = 16918dbc785d94a8f1720c5ad234dde860219874c9fb076a5c290903f85b +Payload = 1798286c37c1504fc0d7402681f6f70711ef506dcc3e29d0 +CT = 535828ec4840b24a3cc7c35daac685047a743c977247e0806dbed76d94c90595b49d50c84c3efc76 + +Count = 303 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732bf8e592e3d3884918 +Payload = 0d02778f90a164a4f9ada9dc7fd24eeb941069621418ef32 +CT = 49c2770fef2086a105bd2aa754e23ce8ff8b0598aa61266248fbe60c146056e5cb01268403e4b9f5 + +Count = 304 +Adata = 2de5222a0609f058f60e9e581b6e4f0ddebed84fc8302c8e985d17b89241 +Payload = b0c3858231e284af6d231f043b95772f5e7b16a34ffcd2ec +CT = f40385024e6366aa91339c7f10a5052c35e07a59f1851bbcacff35df1ec942b43eef5aef980cb038 + +Count = 305 +Adata = 3fc7453df038a92829dc103d44b63ad097d7cd7f9ae7996547012090c7c4 +Payload = 319f396cc02834f8e69d65f77496d0eb31ce1a7b7e324820 +CT = 755f39ecbfa9d6fd1a8de68c5fa6a2e85a557681c04b817091a93f5fc28e5f4f351cfb888da763dc + +Count = 306 +Adata = 18f1e92bd3c4a597ed970911d03a78ff9a6790147c9bb0ca5f23b70cce7a +Payload = 25550c03f8fa02b3781330f96e0fdc58681b0c0bc5e83fe9 +CT = 61950c83877be0b68403b382453fae5b038060f17b91f6b92c6a90ef2e9a969ec0576fae1d126a85 + +Count = 307 +Adata = 09ecb2406054716418ff3600c3c5cacb0845a377a2d80542abc36ec81bb1 +Payload = 210ff7975e08388b9a46eb732230e3a3856a497549b5eb49 +CT = 65cff7172189da8e66566808090091a0eef1258ff7cc221959fd6aeb047200907911621e8756b45f + +Count = 308 +Adata = 62d515bb0525b565a6a3613ae20343c8da7424c8368e8cad6a862b7d37a5 +Payload = 5d867265965bb2aafebb0691de9e157a24066d06fe3cbd7c +CT = 194672e5e9da50af02ab85eaf5ae67794f9d01fc4045742cc4db6d5fd910c83fd77aefba3f7665d8 + +Count = 309 +Adata = 00617ca141e55b045a188e4934caf6db63d4577f634db92c22010e1cbf1e +Payload = 396b27afd16a1081f37bbc1f742b549f5f68df799b93083f +CT = 7dab272faeebf2840f6b3f645f1b269c34f3b38325eac16fdf5f21f32cbe5d272004f1c104cbcae9 + +[Alen = 31] + +Key = e45bb1730d0d539aab3805350ac986540de9f0f6c239ee70395c291397b70309 +Nonce = d5c7824af715bb7822b6b340fe + +Count = 310 +Adata = 860f4a09ad8b3d345c2aa18ffb803f0bc3b734a4d047a1437701a5e3d95288 +Payload = bc8b3bc48c7a88c9fafde258b6ccaa9d4f0d018703d63871 +CT = 95f083ad6bbaee6ab540fe023858f8baf25e333fd3e89c00e678a392d228b210dc5c991905dacf3f + +Count = 311 +Adata = 8a84b57915bdbe7bf5a1c1a426512b3c178d883251cc46c95a8bbc8ed9e56b +Payload = 9499ea48edab9bc21b91dd614f04934ca20db8630622f481 +CT = bde252210a6bfd61542cc13bc190c16b1f5e8adbd61c50f010fbdd3b305522dae6b652322d89d9ac + +Count = 312 +Adata = ed8540f7ce451c522c1ff5d2d1030d7b3fbd1219a21aaa84044c4f23c08f5d +Payload = 73843a4e9e7937fed24bb1fae15822213b1aa86c07f1b5d1 +CT = 5aff822779b9515d9df6ada06fcc700686499ad4d7cf11a08b6b08548e794eaf85ad9f5de80b1c00 + +Count = 313 +Adata = 61bb196b212feab645f05a8aa1986f6210a384c15bc749245d840b3565fb36 +Payload = a8e24266e5981b2ed14213a29f961cbbf7f02f63a33c987e +CT = 8199fa0f02587d8d9eff0ff811024e9c4aa31ddb73023c0fcc73643a7ee9291e15137d7046a92f3f + +Count = 314 +Adata = a49c2df94ba65107f375ce1c53b72406143f6bcd270945de5b7811682fe361 +Payload = 3e3c402caeca41687d12897102e04312edf7b8c7d8567a22 +CT = 1747f845490a27cb32af952b8c74113550a48a7f0868de53204438662ea82f423a69c6e4e3c0623a + +Count = 315 +Adata = 7c48480e9bc87ba299e03899698b2259eef150ee0f2efff40a5583b80ab484 +Payload = cfa9292b9052ac6bb863205d3c0dc2d9e20d2ba6a680d2ed +CT = e6d291427792cac8f7de3c07b29990fe5f5e191e76be769c6ea00b9cd881e3f4b1e838dfa31f6560 + +Count = 316 +Adata = 5cf9744090366d828b477dc890eab8ebebd44f6aeaa5b101291bf67d12867e +Payload = e0fe4e139ab0deb4fdf2145b719f35c50b869e6cb20608b5 +CT = c985f67a7d70b817b24f0801ff0b67e2b6d5acd46238acc4c59b3b87d722a58cd1de58f3963d12b3 + +Count = 317 +Adata = 761d74be5fae170a1bdfa16081b44c1e49972e15ce0818df1390bf7204f619 +Payload = 665fdcdf55a1231e9912562eaa5a5011d69f6948e29e3f8f +CT = 4f2464b6b26145bdd6af4a7424ce02366bcc5bf032a09bfe158759886124f1f0ce8147c94f4e7114 + +Count = 318 +Adata = 9815353b69d0b4effa52cefff13703fa71a6296f9cca0f02568661be4b64cb +Payload = 7b2d52a5186d912cf6b83ace7740ceda3f5f443530c5a49f +CT = 5256eaccffadf78fb9052694f9d49cfd820c768de0fb00ee6310a79c9932456dbc00515b264f3168 + +Count = 319 +Adata = 69dd1a050c8d79dafbbe3403af4dc1f070b9b2b980888aa796e6cff68d9060 +Payload = 3cea5ff50167c5641066852fd00061df35b1f66bedb894b7 +CT = 1591e79ce6a7a3c75fdb99755e9433f888e2c4d33d8630c6da7e97f9984a7db3b93aefb4316d9acb + +[Alen = 32] + +Key = 2e6e34070caf1b8820ed39edfa83459abe1c15a1827f1c39f7ac316c4c27910f +Nonce = c49ccef869bb86d21932cb443b + +Count = 320 +Adata = d37e35d7cdccd9824a1ae4c787819735e4af798a3beb49d4705336d6496853ad +Payload = 771a7baa9cf83aa253349f6475d5e74dba4525307b022ba7 +CT = eebac2475004970071dfa2cfb855c4e78b1add8dcbccfc0bd6b14027324b657a56263df148665393 + +Count = 321 +Adata = ab22bc22bf2628b0e0ab245c3db2fc5128d13a011c2cc9b9fea05a79a3410704 +Payload = dad95a4b4d3754613f0542caa62cfe4e375dfbdd369ec32e +CT = 4379e3a681cbf9c31dee7f616bacdde40602036086501482a8c810b6944815fd2e434193520b1d5b + +Count = 322 +Adata = c48c5aacf701137fc40fd0d3649641aaa5be427ceee702cf7ddf6408f458a581 +Payload = 3f28df9263e473be648fabad163aa4142b633388b16d8392 +CT = a688667faf18de1c46649606dbba87be1a3ccb3501a3543e8aa447b79284c588bef50b423de97908 + +Count = 323 +Adata = 477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2 +Payload = f83107b50a1f192ed45cc43fa80e6b519bfd859173ea9ee9 +CT = 6191be58c6e3b48cf6b7f994658e48fbaaa27d2cc3244945d4f4a413eb3ac2c474134995d4db9a16 + +Count = 324 +Adata = 143bc037f1d0bd4ec16825c58cb3796bf8989200d27bda9beabbbc49247f59f7 +Payload = dfeb324ba459ec4a5c54d2534e98002412e67db19cfc66bb +CT = 464b8ba668a541e87ebfeff88318238e23b9850c2c32b11756a3fb2e06734b28fbd57942a609d914 + +Count = 325 +Adata = ffc416f1dae4e43c1a01339a604c44d6a0f25ab9ca3978c6aacb6d270d510ee6 +Payload = 0765949e6f22c422ebd47dc1ed73f1b849d7a058a1656fc2 +CT = 9ec52d73a3de6980c93f406a20f3d212788858e511abb86edb94280d3c4a1cd8cb00705f60ae36f2 + +Count = 326 +Adata = 6090b596b4082ec6926576137f6561cf13916860ad1cfc43650d1b5142a12041 +Payload = 6db320cbe76bc5b8cee9ef89aca11765571c6c501993195a +CT = f41399262b97681aec02d222612134cf664394eda95dcef612caca26cc3bbb289da3be0616b3445f + +Count = 327 +Adata = 178ba75adb7c5bea6769270bb3b4f6ce208d4a786913d3ced7bb4090b5f65544 +Payload = 0875020959ed969cfb38636d1d5aabce9658b00171a7614e +CT = 91d5bbe495113b3ed9d35ec6d0da8864a70748bcc169b6e26cc8c665289d907628eb0e299c2d411e + +Count = 328 +Adata = 90f0474dca998916075b1b1428df14d90be05491bb8d5d88e32e65ec890ba9d3 +Payload = 4f89ca6ad371f86a6e073ec12fb1b928bb10d6639233b918 +CT = d62973871f8d55c84cec036ae2319a828a4f2ede22fd6eb4f7e481607a2a0529f9cda1d5903325b7 + +Count = 329 +Adata = 5ad8dd40ecdce52d5b30424ca0bccb666f34f66b0c9a4c1260051ac04ca06aab +Payload = fe2009d0a4a1711b83057b948cd0b174a3a042fd97579ab8 +CT = 6780b03d685ddcb9a1ee463f415092de92ffba4027994d140a1b9ba2bfe5bf778b859f0ff0c29a67 diff --git a/lib/crypto/test/crypto_SUITE_data/VNT128.rsp b/lib/crypto/test/crypto_SUITE_data/VNT128.rsp new file mode 100644 index 0000000000..b796541cf5 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VNT128.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = c0425ed20cd28fda67a2bcc0ab342a49 + +Count = 0 +Nonce = 37667f334dce90 +Adata = 0b3e8d9785c74c8f41ea257d4d87495ffbbb335542b12e0d62bb177ec7a164d9 +Payload = 4f065a23eeca6b18d118e1de4d7e5ca1a7c0e556d786d407 +CT = 768fccdf4898bca099e33c3d40565497dec22dd6e33dcf4384d71be8565c21a455db45816da8158c + +Count = 1 +Nonce = f7a5098b2a4d92 +Adata = bc498326755503ff25d02805eb3517221b54eb4fd79af0fcdf9312b2a9ad95f7 +Payload = 3e2144e2a381b718962a77e167778bf579957a8fae29612c +CT = 98ce91033fabaa8fe853d347be6cbe5de102fdccf042e7be697b41c9a69acaf8386140ee6e36f406 + +Count = 2 +Nonce = 732d2dd64b4a25 +Adata = 495b03df82e317e4f351c5323d17c673f4c77856983179d7c7cb75c2b0573c72 +Payload = 4bb0d170bdcc70fd18f19605cf9c6181082c4367f1e6fbce +CT = 9bd9304259962448fa8487bc15d950303621213afd88f1e32d442ff663242fa269c4a742a220edc5 + +Count = 3 +Nonce = fefd3ac595428f +Adata = 91ffb6be8e129cef9189f7e0fec8e937afcfc6083b6a79a778a724bb3e8d0794 +Payload = 9e8c4f1292e8d7e5179b34ae5d2ba2491d7754acc54bb91d +CT = a5d012b3062cc93b831860d76539169c88854b85550c67fc564a2f1cb7d77e0223287740d5ff9003 + +Count = 4 +Nonce = e14d81ee3b873a +Adata = ecdc5249ceb48e8d5a4483043921c00c1acb1843fae00155a28f3a127150b1c4 +Payload = f99e23288e6b5ae85c14610994d90d5fcbcab62b4ed1333e +CT = cc4ee711d0202deb58664e00cf0cf70b737f48ddadcefd6cd217fb611daeb66fa2d8e1bd43cb2131 + +Count = 5 +Nonce = 2cbeaba94dbbd1 +Adata = d129674c6c91c1c89f4408139afe187026b8114893d0f172f16469b183fee97e +Payload = 1b42cb685bd462fbd40e0273a81c767aa81cb43f17d3c0c9 +CT = 1a1b1c7130aa63098dea17ffbb2216d1d276cb10145b0762a45116736e95d823e579d73dc31dc487 + +Count = 6 +Nonce = 8a961df9c23f6d +Adata = 07185502bf6d275c84e3ac4f5f77c3d4b30d8e106603be84410c11849a3c18ea +Payload = 434e182d04ecda519a6119fbaa4c45e8c9803a9a3eb51dae +CT = 3f603939c6226d8208b2b0e675b82557609ceaeeee4032c7837ed517dbd7e6fe34ea42b01c69d370 + +Count = 7 +Nonce = d3604d390faab3 +Adata = c95e7329d36145664da69d25f24b301d334e1bca2baa74b2d5c325ed7d04fae4 +Payload = ee104be898a225eb1da99163bbf768d8ae6d5850af6f8767 +CT = 3e6a7683d9d804f791f77d2b69996102ba82477ec4557747ef2e0b322f51abb366a1e8e37f4fe4ee + +Count = 8 +Nonce = db5004a1cdae8e +Adata = 1370fc9d5bf1ad2d071be5a28b235402a85270f536b5601c221519a3b329c71a +Payload = 59bee7d18fd4ba573f3e4f61076f5b9f6a3487e47d98c729 +CT = 6db54d6f5c3f3efa6da67aea1234d46e8b679a5c257c66d82e4ef944778281ed186b4a8099b47fff + +Count = 9 +Nonce = 783477f981ef05 +Adata = 04bbf2a826bdf3d55069b1936c4f8e8e08189f54066a035c950c7347604b1b65 +Payload = 6150f132b25727ebbaed9f16bd91ebce00c68e5b39bc0ef9 +CT = 36f78cef22cacaf9f3d4464821737f7fbacd79be517b4727bc5c098625c51ac7fdd15da2cc9ef4b6 + +[Nlen = 8] + +Key = 0b6256bd328a4cda2510d527c0f73ed4 + +Count = 10 +Nonce = 21fd9011d6d9484a +Adata = 66ff35c4f86ad7755b149e14e299034763023e7384f4af8c35277d2c7e1a7de2 +Payload = 78a292662b8e05abc2d44fbefd0840795e7493028015d9f2 +CT = 5a0be834c57b59d47a4590d8d19a1206d3c06e937a9b57f74034d9fdb43c3f48932aa72177b23bf6 + +Count = 11 +Nonce = 97f940d7c1230bd8 +Adata = 78337ddfe38be7897372b0f805603a9a9e55598452285764641c3bb7aeb54a3c +Payload = 772aeff60eb3adf5a9589ad54dda0401cc9765589609dbd3 +CT = ef5c408dc6d0b501925a47def54d8deb9880a07a3e6380bca20a3995cf25c5a7b9477d8916adff73 + +Count = 12 +Nonce = acfdf302ed116ac4 +Adata = fe9d9989bffae3c9e6161eb0aa9d54ee8f5051f0dcabb5a750c5478c11798ce1 +Payload = 99ffe16de323a9b65fe60305a2d062cae490ccca6d9fe9da +CT = 1bbc2c7877d845591660636cb6ccf4edcd4c156996a26a707d0e2fe322f203c08f44d7f9bd7258c3 + +Count = 13 +Nonce = c8d36e13b7459c47 +Adata = 3f3c3a4c26dba18f385274ac5ac3df73282686488d91bc8190b7f61071b07f62 +Payload = 316ee95430329f706348886b8ac7779e3056809e25da0a03 +CT = fd2db9611a26a3e90f4861467df60edcc595f442332b089905fdd72307c3355b19ea66d4a16ef17d + +Count = 14 +Nonce = 5822755a3e47c27d +Adata = 1d72d6b371e85ca359483761704f80b3360f4d6610e6d5e490b0d509f73c3233 +Payload = af4ae8f19cf6cbd199677fe033859f56906f1979b1b5926d +CT = d5ed6f8d5c42f4f3ea527094173b278724a2ba787e416ad759124db19ab1373a5376f46ec7095ef4 + +Count = 15 +Nonce = 6c1c94c2e71b865b +Adata = 298cac1e4684182786f386ef3de79c11e30b2dab7579b8ca18d0312200860403 +Payload = 6e4d992d7541e02a4aa167e56c7e47206abc25fea6c5125d +CT = 560cd43a502a6e8b1af478a3b640a68937d1a83057110d38eaa52d69ab9790edc384b9a5d8c91dbf + +Count = 16 +Nonce = ce7ec65cfeda31da +Adata = 13c1298cbf7fe6a9ab378f86d3c2207944cc2a232f9383513ceb3b202086d365 +Payload = 196c80d02b663bdd89fdaa31e329b5a8f7c596236ee8dd80 +CT = 00174dd83a7f8edc71afbe5da095160336be9184f693db3db1f45de395e021c6fb1b2991c91bd643 + +Count = 17 +Nonce = ddb739acda6c56ec +Adata = 7f89bbe513b9a7ebe9be3f6eb88782080593c83e8cbe47fbe15bdc3e5782090f +Payload = e95e142217c838d1f998a52e342e4f2d80b1cfd35cf6b73d +CT = 819d73dadaf095652cf39729b2e2cad7fc7783887a5acc15713d941b845d96a5bf65e9f80ae7f923 + +Count = 18 +Nonce = d9bb71ad90152d5c +Adata = 20bfcba120cdbeb07c5f4d70338ffce493822d78a03c9e80b5b934e16e39f70e +Payload = f1fe98b50ea2f9f088f6f93910757cf744d5aabf3081966d +CT = 36decda8ade6ab104a201c6d370412b907a559738eef59665e99761cb1ac77d772b9cce9345d9a75 + +Count = 19 +Nonce = 2c9ec9f1f1358c50 +Adata = 96f0b1edec4ad14407dcaf30ed68942b46c48d58b2dd63af60fccd5bdd48e560 +Payload = d74badb8ad7f2c2bcdf67e497151d35a4fc2a3c4c871868a +CT = 0e9066270da6e03cb4307c43adc71b4b596213a63fc8032085ce60506ac3bd97327904ad2e072a6a + +[Nlen = 9] + +Key = afdccc84f257cb768b7ad735edbd1990 + +Count = 20 +Nonce = b7776aa998f4d1189b +Adata = 9f9ac464de508b98e789243fdb32db458538f8a291ed93ddf8aeaacfbfc371aa +Payload = 56d0942490e546798f30d3c60ad4e3e110fc04f5b1c1fa83 +CT = 96f124c74fd737819008ddef440320f4a3733d0062c83c893e259aecf12ba08f2a2e966a3341d6d4 + +Count = 21 +Nonce = 278cf1f09b13f467fe +Adata = af9627922758a9f7792345716782e8837ca78e8f9db16e3fe12a7124a3d4e99d +Payload = aa9b9e80cef47b6db3816b1d665f233e696337e21bb8333a +CT = 5eba7e3b3ecab78121b0d56acb9dbfc6756c1255b42f145d11751638ed36c1fd3c7268b71633c1cf + +Count = 22 +Nonce = 4ae701103c63deca5b +Adata = 5872a1507c833c581ac2750b2b54add4b92be14e45d72db7679f8fa2b4d1eeeb +Payload = e832b053854fbd40c0d8b6d6b8fd5de2da0c173f5fe594ef +CT = 3b2b964c3a90d51c0ace186db79818b4d0f7b81236d36017d3635aa1d8167087600b01643b0a5ce5 + +Count = 23 +Nonce = cfb5b12928e1c36849 +Adata = febe755bb8e4475d8d12f5e96269abd0d4e40d73cb966e2c523343e9a6d2d71a +Payload = f46d6970dcc37d32d93ff062e68034c1906ee487fd28eefa +CT = 0d5332a42fc583f4f81744b899cdf2a64cad1e78d577112fee6f8c4b252e10b42fbaf8c7af1e9f3e + +Count = 24 +Nonce = 68d5863cafc69e6ceb +Adata = 048ba28abb191ded5449dfe9dc7d19f9b132a2a9fd779aab7da44d2887485954 +Payload = dd4438d7ba3edc73872e42dbbf78cf300fe4bf0eac9e16b6 +CT = 874d3ef7f916db2c2799b6892ef4bfbeb4729ecbf26ac4983a8639f21f8548fae45dc76de57bcee0 + +Count = 25 +Nonce = ea09fbe5da0fa4fe91 +Adata = 63ee18eb720b21ee4c157dafcb8c7bcc6817f54d5c1b8dd7058c37228a03f8ad +Payload = c1811d613bf0789beeef693611ef733cd173da703b66ab3c +CT = cbe5c799952b28fadf414607a6cf8194e9f41194abace4541d3853a52971b0ab46cc0a3eded435c1 + +Count = 26 +Nonce = 0021be18ed76b3a34c +Adata = bb5eded483f0ae1106fd08c5e2b91cf06d3a7a73518ad4c479fb05e631ba5399 +Payload = 2d5531d1c51c6ea100b028596bf9f24dd90be14eab58f07b +CT = 7af0449f7359b7f3e5f6c1e7bc264c7724037f4f16077fd0a2a8e3cfb827c7e6edabb34f7bbafd01 + +Count = 27 +Nonce = 449b51ee0760179e35 +Adata = e99bdf783070a3a48431704e90277ca65a9704c12eeae2e2d70b62f816115267 +Payload = c4896d58442877c986e4f862a9f3a3179f0e9b96316a90d8 +CT = af7531c073df01077fd5c8ea9a5530c2fe1688d529e5c2f24aa8feae6a500919a336dbba1d9fb7e9 + +Count = 28 +Nonce = 232114642e0c6b55b5 +Adata = da288d2014616f16a2abf5923dea49aded1748592adbcd97415c33ebfa57150d +Payload = 11fd3f94b5a5ce94f2740a27a0771aeeac77f3155d2bc12c +CT = f0c174a7927da0bb88e92917af8ae1df4ffc3527004e9e2d0b25cea7ed6e4fe9069a2ce49875230d + +Count = 29 +Nonce = 660cb6d654afcbdab4 +Adata = bd96c3c225099fc58cc1f97779304606b11efe9712fba13abf74fc1d7d44a900 +Payload = 793c0bc3deb6e0bec4c1d1fc17e455eb1aa5e9e25cada861 +CT = fa4b14a381ee41fec7b7279e58f0d06a3beec26d645f81336218635754d5563f2cd48bdbb267e5ca + +[Nlen = 10] + +Key = 6ccb68d3838d4ddf660b9cd904cad40f + +Count = 30 +Nonce = c4fb7519a19f13d9d1fc +Adata = 092e64fef08b5655a86cdb8de63ffaa7772e8730844e9016141af8bad2216246 +Payload = 5ea35c082e2b190e9d98e6b2daad8672f587b4f2968072fc +CT = cda5fe3d15d00150b99120c7f206b88a4c2c4a39ca9143425603ab284a73a38cc916f8b653c92ab4 + +Count = 31 +Nonce = 45927852550961f1ae9e +Adata = 53ae030474795ffda4d9ac0fc3c45afb592ddd761f7b5335c13a6747e21075a7 +Payload = 6c5f468077536b4c9a94ea4a6fe3cf621083a210daee45b6 +CT = 694847b6429cbc3902d9cb7049625aef1e97b569e1e3169035bb811491d142cf1b26350f8451bd14 + +Count = 32 +Nonce = d8c54463dfcf02d0e327 +Adata = ff95c0ed0da32d1b5f57570b815a50592ecdc9c1c4e727e0f6dfd93fc10ce88d +Payload = 7321a6de8d694ea05623206f5df438c5c2cdd6b1eccab4d8 +CT = 9cf8ef119aa5cf3d6305d50b2b520a0b10bcd240e27276749c68e8e641b0120f7dd66e8f0cfa4205 + +Count = 33 +Nonce = f690f3a996928275050b +Adata = 41c05fda535770699ed22cef253753b658437f833afe65c9c393581d835f0fea +Payload = 56520a4bfd7b73a471e0446f9524a407e81c2681b7329e35 +CT = 14aa15f9f64c4c64f6e88094e012ecb24193249f044c033dda44a62f97c0fead3f65b28928bfbcc3 + +Count = 34 +Nonce = 26eb9ef25be62148fa61 +Adata = 8f45608a07521de86ed5a84a851e629b579b51d7bf4cc7202a773e0f9e9d8748 +Payload = c68094c26c7f017b79f126dc26b3bbcb95f97535ca412da5 +CT = 7ba8a0c2fe2b230768d1c1874085ddff8926931961bc4558f0d5444466bcc631bef8e58fe5818af7 + +Count = 35 +Nonce = fad21bc27dabafe7a4ae +Adata = dc5d7fd97bb3243ba585fa0d71a07191667af418e30a6b76bedd05b32c673403 +Payload = c247fa8d8091cd3f299cdacba7fb7af93549e9e3160f9cf8 +CT = 3097d2ec0f8bf00b22504ab03a75e740d3e59c269c3ee3f00b5419293a67eb008aef0f9f675201df + +Count = 36 +Nonce = c911348848fe67406dea +Adata = 50d50a0b5ed4d6904ec3045263af0255a6494b7a7e2e95ea806c4bb788423dc1 +Payload = d846c170ae0111348362901503b26d58f5efc17b6d296aba +CT = 5d72562f7dfb47bf34b90ee4ea11ff9f726c915b07f4d843dec5a554f4bbecbf6943ffdab8d8a26a + +Count = 37 +Nonce = bb921b46a16d20ae4046 +Adata = 7d17f8f60ad1e61a168b5b0e7fbbc90cee79b612b6d6c0d7ff6ede042341e8a1 +Payload = 71bb6ae84262646c9be95e0f4289ffeab7555ec6746c6ae9 +CT = bac123320888b553666249756e6d63b3498760791cbe9e34e5b1162b7489a59a50c0f0f3618e6c2e + +Count = 38 +Nonce = 61a8b8cbfc9bdbadb2a3 +Adata = 51cf2a8949e13eaa087a34c9ec4d7fd92b862efd6a0b1fef8b016fa2c6933426 +Payload = 362f9a46aab59fb6213c83d791b2129b34367ac2de2048fb +CT = b8a57e8714d8789f4ef2af29e0efec21b1ef67fdabc7cdf0ed5505f1f0ff77723771338585c456b7 + +Count = 39 +Nonce = 6bc4cd23c32a913998a7 +Adata = 92fbc970b5e64198ce2a138de92767edff8d82f12f8832444b346d159657356b +Payload = fa442383da234cf8f0c5fb667218bc3bea0c091b3a8e6b77 +CT = cdfe3e83aba43a9804c5a1832e0e47a9a153359cc32db907714025f485c7f40256049f16f859b859 + +[Nlen = 11] + +Key = e6ab9e70a4fb51b01c2e262233e64c0d + +Count = 40 +Nonce = 74e689eb5af9441dd690a6 +Adata = 42f6518ee0fbe42f28e13b4bb2eb60517b37c9744394d9143393a879c3e107c7 +Payload = ba15916733550d7aa82b2f6b117cd3f54c83ddc16cd0288a +CT = dcc151443288f35d39ed8fae6f0ce1d1eb656f4f7fd65c0b16f322ce85d7c54e71ac560fd4da9651 + +Count = 41 +Nonce = eb118fb41284bfcb1bc338 +Adata = b5a6067fbac46578cfc8d3fe04108588c9de077eb009249374f205553bba9d02 +Payload = 863da00c7accf45418d47c1eda72338734dcc49cd599f328 +CT = d64de7a56146b971e21bf5784d67bab32dd837cfb81591da4a0177883346dc896eb39e8a32bc1393 + +Count = 42 +Nonce = caba2716d07e95de83855e +Adata = 0e0ff2c73ea5fa8f8726a3514cf906ce1610a1a6dc19b22682f9e4619f762d82 +Payload = 2af6d5636ab65db2058b2ba16df257369fc4e8aef8b9481c +CT = 3c9e006c7d8eff5f448b0cc9c27c964713241aa7fed3665d775ea25fb272981de8b8aa0a637498fb + +Count = 43 +Nonce = 314c136999e41d137bd7ba +Adata = 366c659bc45d0a88acd54ef7eeaa3e140e1cafb1b01474a065a9d460c5e83bfd +Payload = 217b19ea6a431a1f66bd9d02b718e8507a08ab8e6f603e3f +CT = 33d7b672b23e8b03a39ff3fd1e7b0f2be67163e3e3bae072f2aaa211dec623947a50b1252bc5aad3 + +Count = 44 +Nonce = 6fe51f5013f53d4e4fd907 +Adata = ff182f2e179d790e827cbfd0bd8b9297ecae57ffcef9e25ef114474a22e4ec5b +Payload = c6bf582b49dd4ab6cb33f3f88e8a4d14fe32b308ee3b4682 +CT = 26cd5dc5eac2acda283ca03354260ad57af79e20c5e92f5775ed171bb0fbaa6f431c5411cf9b536d + +Count = 45 +Nonce = 24bc8dc1e2354667b79ba4 +Adata = d0d48d01fc79685c6bee04d45e40d06cdf1f4607542b1ece556fc2d1bb2b03f1 +Payload = 90f52ebb1bd5439386faeaa194623285f750672a7baae64b +CT = a7f43f56c50705a1a101044b954414fdfbe32b518e934d38f391749ea3acd624c01e4583ab1506b7 + +Count = 46 +Nonce = 89ce46b3de3afaf2518d41 +Adata = 5767202c913584d653f37d926a0c5ac1c67db3efd1dc58fbff998778a6856254 +Payload = b2ab379a0dd15baf91415eee3a4e56e7eca54d4c1c3094f8 +CT = 9f530e455a54b86835eacd8801b34c884a3b2ac819ba38f894e43a6b1cf73cb2d6a1dd8331549520 + +Count = 47 +Nonce = d3208eb695e84c7a925037 +Adata = 91d8fa65a6885f162a795afe2898f391990a8b3a87c11f94734dcbddf5f58da8 +Payload = f15e39f0e4eaa5bf81359d8e30186522f1a1a415436668cf +CT = 7f1d9fcd9e5cce3a81e3495bfecec817fd7180d8bbfe0abab27fb6425fcc3537ce471425a5b17dcf + +Count = 48 +Nonce = 067de2869333ed22c7b63e +Adata = c31e441fd551b3fdfbe23ceec5ec1f838f31a5300f6055ad2a936a9d0c1c856e +Payload = 1536d9c9a09302d142c85638202f5bbf0c287f68115d51d8 +CT = b1a5c7a7fd23228dc7ea26885802daa0719f6a23681e1d65dfb879c21b46f3307ef22f1da579303f + +Count = 49 +Nonce = 15f61b4526d19bceae1093 +Adata = b97b122af73e928e617e98684f845be4cb80566345739b7a884c6a3eec5102bf +Payload = 37c81988c07a5b01e2b40ff9f9ada5f50ca764efb717ff9e +CT = 0d93a5c77482d573b7f1b8c5e283f2571efc9f54216a4c01900504a73c8817ff2b55618b2602bf38 + +[Nlen = 12] + +Key = 005e8f4d8e0cbf4e1ceeb5d87a275848 + +Count = 50 +Nonce = 0ec3ac452b547b9062aac8fa +Adata = 2f1821aa57e5278ffd33c17d46615b77363149dbc98470413f6543a6b749f2ca +Payload = b6f345204526439daf84998f380dcfb4b4167c959c04ff65 +CT = 9575e16f35da3c88a19c26a7b762044f4d7bbbafeff05d754829e2a7752fa3a14890972884b511d8 + +Count = 51 +Nonce = 472711261a9262bef077c0b7 +Adata = 17c87889a2652636bcf712d111c86b9d68d64d18d531928030a5ec97c59931a4 +Payload = 9d63df773b3799e361c5328d44bbb12f4154747ecf7cc667 +CT = 53323b82d7a754d82cebf0d4bc930ef06d11e162c5c027c4715a641834bbb75bb6572ca5a45c3183 + +Count = 52 +Nonce = 6a7b80b6738ff0a23ad58fb2 +Adata = 26c12e5cdfe225a5be56d7a8aaf9fd4eb327d2f29c2ebc7396022f884f33ce54 +Payload = ba1978d58492c7f827cafef87d00f1a137f3f05a2dedb14d +CT = aa1d9eacabdcdd0f54681653ac44042a3dd47e338d15604e86a0e926daf21d17b359253d0d5d5d00 + +Count = 53 +Nonce = d8e133e7ff8e0a0ec6c4096e +Adata = ef9e432c15d8c93a4b5c0666608e61c824cd466d7940d642acd3dc33057c0395 +Payload = 2836de99c0f641cd55e89f5af76638947b8227377ef88bfb +CT = 5edb056d85dafeaaf74bdf4caa47339d6a75bf1ee998565e9f9cdf6ab825f6e026f5be2ad895033e + +Count = 54 +Nonce = 2fa8120398d1a946f391367c +Adata = 377cd407ad28dc02bd3835a31d92f8295c9dbe597f56662ceda112c588dc73a5 +Payload = 7a37255b682766a0bfecf78e5162528885a339174c2a4932 +CT = 701f5f506fc7e9ea4a27a4db5cb890f7be3b4f6bcb20f97ed3021f6ad620648b8196ab1693710398 + +Count = 55 +Nonce = 8d638ef43f56dece910139e9 +Adata = 87ea7b095388de70ac0ed23e86f502400910028a8ab5e3bbb91d05821c0d2d61 +Payload = 7370d9b453936955b9c9d336f4b283237986232de007bf41 +CT = be2f03f6ce1731418a5f53b6f6e467b73992a0c8102d8ffc2d236162688096d80b8733d2afbcd244 + +Count = 56 +Nonce = f479ea8812b6b2f6ac78fe9d +Adata = 20c2b8f5d3a65a66ba8a25e2ee339a779a32d45f5db91077efae6cf308feef50 +Payload = 59ff9f7581a781808d36fed378080963f35c00ea5a6e3932 +CT = d127c956349c16e2186f55b72254c677f03c61f1c4ada9e661bb9415b32d6a58f5f7647ed41de685 + +Count = 57 +Nonce = 423515f7bd592d6a7a240866 +Adata = 19eef6f798fc68086aad1cda6d7976cdcfe6b8af74598032972c939db300d8c1 +Payload = 3c379f90b11c622a765756a15efc8fc3ca7b08b3281945f5 +CT = 15792e01fc17f5294c3405484291082c00a8f46dd9af8ca230ba95c4058501234a1b97543c998e9d + +Count = 58 +Nonce = c3f3da69e13c5733039744b1 +Adata = eedf00aab5edefdd6549d37ed44358e11c588c24f141dc5731303fe0bd56b11e +Payload = 9db6fe9adb8c0fee87cac9a7f01a7ed8a84f0512d09b1834 +CT = 9b6b829ca1dc4e90d4402188632ea3377cbec2ba60f0f072afca1b08b6dd589a17a32d49b6f7135b + +Count = 59 +Nonce = 0a57d59f21ead5b6d80cd2ce +Adata = de5f2d413c98c6ea2a5640a7b1c424aebe75cbc78b06710b5bff8bec6afb5a76 +Payload = 0b5f6389f7c20f4ba326e8f05d373ca27b7ebe59e6d729f0 +CT = 0b704e14bc7d2977d89e0b2e7ed7fe3c9e0f2ea80d2d6165f344f2f1b2218d9b4283fe640a6d315b + +[Nlen = 13] + +Key = ac87fef3b76e725d66d905625a387e82 + +Count = 60 +Nonce = 61bf06b9fa5a450d094f3ddcb5 +Adata = 0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd +Payload = 959403e0771c21a416bd03f3898390e90d0a0899f69f9552 +CT = cabf8aa613d5357aa3e70173d43f1f202b628a61d18e8b572eb66bb8213a515aa61e5f0945cd57f4 + +Count = 61 +Nonce = 2a27257bfaadf23a87df082c57 +Adata = 0001dc666c9daf3560daeaf514270db0b5075d295068e6caf231c1de0e1a9300 +Payload = 6cbbfa6d736fbcc4cf73ab4d7be537420e0e574ee1f2d1b5 +CT = 72d525e6bb312bf2c20b91f41108779789c25720797ebffa4cd9d735f51430275387c565cf1a69bc + +Count = 62 +Nonce = b94ac8ed14895c80a91fda8367 +Adata = e1eaf35fb266f243a3fa407cd41815ae6432ad79877bfa59d8f196cbf19bfbb2 +Payload = e6ec561496ce18d96b26d594a47ffad02d68ef25d2d2edb9 +CT = c63500445239bbdf71a8dfe3f8c01061d659cfeb038b825dc89fb5f507f5aeefaa9365f0b18dcb3c + +Count = 63 +Nonce = bbae10aa491ac9c668a3ba8d7a +Adata = 981fc31e64fbad244ba1ef0303ba1e4beef5bacca74f60ffdb9142a25a1ad5a3 +Payload = b9bec3e2adc83620772048d6cbfb6f78e4fad74d754ffbbb +CT = 9c629c375f014e162895cfc25a972c29839f97407e7c7cca83d0a61d453d596fbc5c2e315d9780bf + +Count = 64 +Nonce = e0b10e78e9fb41ee970143e9e3 +Adata = 399b71ecb41f4590abda79045cdf6495f27daaa559c1b34f513b5c4ac105ec10 +Payload = 4b81804d777a59b6a107cf3c99c9d1a35bd8e4ed36596789 +CT = 867799b30558697d6efb4afcfe458cfad8da21139a0b43128e8f8e13b7896b244d0c9aa52ed31a95 + +Count = 65 +Nonce = 17b61109f5e37754e4e92a28d7 +Adata = 0bc2fdd890c19882640f8d4188b88b9db99cc1934cc3e98a5df08589287968a6 +Payload = 347c1eb4aff917bc0012f005e74caadc93f4f18f2b614ece +CT = ee19f3120991b67b2389e6f36543d99590f2e6d785c9c8ecc40eb85585cc3b7520a940a4e993327d + +Count = 66 +Nonce = db3ca9e80ab761804349379961 +Adata = ce01369d08d37dcda2c899c9fc0d11ccf94a0051b2816a1d6c3ad07fc8dd02d7 +Payload = f0e1af1276d2918be91a191814660bfe735463d3983de1ed +CT = 0f1b1228729b181772d7cf55ad257fbcb19cd46f7b31a885401358c7b44aea27617b429583103a1a + +Count = 67 +Nonce = 1f57959cecbd377374477e33b3 +Adata = de1c7c83ac61e1f99ae99b198f4af5d24f8de60ea98fe637f3a801fab38b2a4b +Payload = 42a42b84df098ceb43519c4cb86c14c2fafca39346159e13 +CT = 12425453de653d0fe8103013fde1ebf4a8fe18f76f0c9d60e93525fe8048c3b2147a149f12eaecd3 + +Count = 68 +Nonce = c9db03e2efbab713b0b6404210 +Adata = a2969243b0955402ab45a430fef2ef9e0c025006732bf8e592e3d3884918696a +Payload = d633a5a3defdde6a68f959ef39a91c6ea6e13ef1a7859d2c +CT = 5cdc183c32b4c1878eb83e8473a17c55c88e2ad6b944ab1f64ddee42614aa737231207636c114575 + +Count = 69 +Nonce = 89ed296a3ac03fbfb71422b921 +Adata = 1ffbe1aff0a1e7fa3e68be31a74612a1519b59397e7007ef61fc015f316d55b5 +Payload = bff42516e30c92ed46710013c656600406a48a84c1fa32ce +CT = e08c1ab4ae7edb5184c30ffb3e74689ea855f50b0e890392f26b130720f75c422fdf66fb174383b5 diff --git a/lib/crypto/test/crypto_SUITE_data/VNT192.rsp b/lib/crypto/test/crypto_SUITE_data/VNT192.rsp new file mode 100644 index 0000000000..06e9ff5655 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VNT192.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = ceb009aea4454451feadf0e6b36f45555dd04723baa448e8 + +Count = 0 +Nonce = 764043c49460b7 +Adata = 6e80dd7f1badf3a1c9ab25c75f10bde78c23fa0eb8f9aaa53adefbf4cbf78fe4 +Payload = c8d275f919e17d7fe69c2a1f58939dfe4d403791b5df1310 +CT = 8a0f3d8229e48e7487fd95a28ad392c80b3681d4fbc7bbfd2dd6ef1c45d4ccb723dc074414db506d + +Count = 1 +Nonce = 026a0b8b17be95 +Adata = 44caa8ecfaf38e5e773cb0366e1b04aa0b9fac5c34a362310f471960c4a1e1c9 +Payload = 0e52a384cedcdf7f179348de6e7336aa86f8855fbd903cfa +CT = 3417044bad5fddd9455579123dda4fd342c273a57ff6333dfedf191496d88cbe17c6271b65096e66 + +Count = 2 +Nonce = ea09fbe5da0fa4 +Adata = 1d9799f2bb0f7ab57fe3de27949ff64066131c81bfee172b308f9bb0b3171067 +Payload = 469ff9698cfc96b581d7115c822e4363d7355ec5daed2eae +CT = 1dae7cc16f1b469290902cfad47b959784b4d6f48a79e690d47e30b635d10d1663477d61d7ffb55d + +Count = 3 +Nonce = 8d27bcbf9ebfd3 +Adata = a7070b85b7add9193c9dcd2e6c03f6e7ecc52ffe9e099866baf7472f20c03aab +Payload = 225651d072dc9d93762dd79691ac2b6ddba00ec1252d69eb +CT = 5da819adefbf794612eb458519debcd524c283763eb3d7252eca8766bdf0db6bb2dcc793e1749c21 + +Count = 4 +Nonce = 13f560187b6077 +Adata = c4ab4244db75f8256e55c5b613a07b11c963c3cc24f66128aad4ba8b7ca99331 +Payload = a38231af405dc7b70c8dbc8cb84e6be8a0dc2e95fddc2ce8 +CT = 3aedcf8347aa23fd3325ce08b6b00462536baed69968a753feab6761c55431bb5668e1f5b7505e89 + +Count = 5 +Nonce = 61e0e28bf344a9 +Adata = 5f998952de70449ad46428f2ff8a01c5af43c0107a1bcc6930f19d4112598666 +Payload = db21b37e875d7709a02239ce6ea529cf37255d5b617c153d +CT = b8f5fed39c723d7643d6dcf2efd3bbd1ba0da1ec901305fd64b2302ace4f66216ca8b4d776197692 + +Count = 6 +Nonce = f6be4aad63d33a +Adata = 18339be863fb8a887d04ae9ff3b4a7db095075cd5d113a9ec87b41fe85ea405e +Payload = e53101e6eabcda32c13d7b1dd1d88e7c2ca3ddc2064f64c6 +CT = b758858ab60e1630a0883d4d330119a593729a3015c42525effb985b9c2dd9ec954bd25d9c464c67 + +Count = 7 +Nonce = 2c1c59aa0d8eff +Adata = d44af86b89fda8448a9b2fcae20ea156dd8738c8251699c02b785811c830bf72 +Payload = 1fd7188a43dee7b059420e8634d71d2c0658f6d0d308dc73 +CT = d046f845a67800a5a58f461e5a8641e8fc9b4c53b32e61d172adafffbacb297d67f6b5c02b982e04 + +Count = 8 +Nonce = 48e4598edd191e +Adata = 61588bdc980ea2310e87dec4c651e9a55c27e3858b6505cbf3bf85e51931badc +Payload = c25868f390af5e59c035cb5830e018c62c5b96bd35b764f1 +CT = 0ece161bd77b7f969b3b20c818769a98c178d84524544664500ff4cfe66ade1832babc019778acc3 + +Count = 9 +Nonce = 6d576ce3c5fcb5 +Adata = 92c598cb5ca2926c11f67c3b3cf25493d77606fa60d7290430e0e975091644a6 +Payload = bcd97479db934357a163a9e5f5a85999ca987f8243d8017b +CT = bee185e11b3d42bac846b9d92c70a078aebfa630ab763840391031b3a22b2adeb9791ee35765c8cc + +[Nlen = 8] + +Key = 1dd56442fa09a42890b1b4274b950770ea8beea2e048193d + +Count = 10 +Nonce = ad749d596d88a4b4 +Adata = c67219909828adef64422286008e1e306867a1c0b3da95444507a68b45c953e4 +Payload = bd92d6744cde446fc8621625658fc4bc00dcb97f06195ad7 +CT = 076cffd0ca978fe2bad411ced45a090abafb22a99896f6a75a1969276aa2b0cdb37ccaf2845dbf6e + +Count = 11 +Nonce = b1dc81d116d94f5e +Adata = aa4b71906b6642f10f66c2391ec157c7cde97eb322db10045af4c5248807f691 +Payload = 9aa6dbe1cd3eb98d330c937d31ef93bee8938b6c5cfd38de +CT = 720f6876ac91665f20147483f0655fdbe21963a01e36f1daa67e36d7cc8d54cfec0762514475127b + +Count = 12 +Nonce = e758738df5c89af3 +Adata = 5715fa238f432c926e62dd93708d0e3145428e0ed45e1efa8148d2c4ab6cba50 +Payload = ce80b99039a16e69018d1e3c239dd1bf06e94a78b0b1df37 +CT = acdf7ba3edca1563727ed85cabf085c2f0c8f27556c3c064ef50d85bc3ade6a773d956b2660ac367 + +Count = 13 +Nonce = d586c4c67d535476 +Adata = 1e8dc63c6c54a540b6b02067ba7c719221cf289fa3897299722c9a2bd6eed05b +Payload = 2f88305117f9a5d807d54b7e95ecfeb7327e52d9acac352f +CT = e42b86e619be1a38973c934babeb4688243a9012c85d643d81e024aaf0a62b353f9bed36681288d2 + +Count = 14 +Nonce = 77e83758f68d272b +Adata = 25c80edef3d5bd8b049fa731215b80ca2ee9ee6fb051326e8c6d0b9e11e3d7ef +Payload = 92e47b82b728d639777d5d5843de2a5c364956cb4b21cabd +CT = 1b9177f5b76403cb8c690b39c3dd22b55da35cebccb9b64e05fe32f796f0b4a75a459fce6c7d740c + +Count = 15 +Nonce = 311dc245549206cd +Adata = 87767f13bb4904d0df0d64eb22c9ddb65e81b5739baad86ad5e2c239ffde9f6c +Payload = 8691c0301a216a5f3ed9123886d100309bd85630d6b845f5 +CT = f39fe3620a03b37a4bf457909e0770447b498ad2a2f0f9d7b75f9e4239e43bbf93066897e60f6fbe + +Count = 16 +Nonce = 2a17b70f10e120c0 +Adata = 981fc31e64fbad244ba1ef0303ba1e4beef5bacca74f60ffdb9142a25a1ad5a3 +Payload = b9bec3e2adc83620772048d6cbfb6f78e4fad74d754ffbbb +CT = 92187955ee1ae702ef01a385537119b2bd4545402e8b2384a0c069a2439a2d8843302c6a9999e658 + +Count = 17 +Nonce = e0b10e78e9fb41ee +Adata = 9d072b8a3f1a496b2be6728a38b94a4f44c9be40c8793b69afd81d01696a6b4a +Payload = cea28e7cd0eff0c5eafeec908d4aa8ba303e72ada33db087 +CT = c605e48f2e66e8e0a92471e466981ae5e31db3e4ad80b09f5005b06d15f63f2f015cfe447828da09 + +Count = 18 +Nonce = 02d72dde23f9772c +Adata = 2dc44c39940e2d9c94d2dbe40bbf5cca5efb4d4b250a31aa24f208b87e9c2453 +Payload = 809343e986f6ff47f54d4cac22ed39babd12271d4c7edb58 +CT = 0bb59581f22f6b15de76c0066645495a5c19e44381c349263ed92ebb789c314a89c83542b15ed694 + +Count = 19 +Nonce = 28c4d6de3e2ce51b +Adata = 913a8eda924589d3206ce0a951fef93668c6c0c454824b217997bff6b3026d54 +Payload = a19f65ffdafd6ad5ee43570f7e168f94a8b4a7b7402ac80b +CT = f0c91a29f1222b906550ef5c7c0944c5c4236cb6c31122cfada8e796f2ce7f9449f42de504873868 + +[Nlen = 9] + +Key = 8cc622645065c72d0d2aca75802cf1bbbd81096721627c08 + +Count = 20 +Nonce = cd84acbe9abb6a990a +Adata = 447b6f36acdad2d1cfd6e9a92f4055ad90142e61f4a19927caea9dbe634d3208 +Payload = 597b3614ff9cd567afd1aad4e5f52cc3fa4ca32b9b213c55 +CT = 2d7fb83e6621eed9073e0386d032c6941bef37b2cf36a4c6c5e36222d17c6fb0631c3f560a3ce4a4 + +Count = 21 +Nonce = 1fc7a43ed124745d04 +Adata = c892b095173076a40e24522297be27fd3a765c8d417f24c71a9f03b3fe3d8e20 +Payload = 415cd8312dd20a1c26f4b90d98104cdfbe06739466fc0aa5 +CT = 7bebd6f55f15ae57ab73f92f7be6ff37ddd99740e988f01a7a2a13c22df4a156e6d6063235452c85 + +Count = 22 +Nonce = 19ff5e7c1f2c594abc +Adata = effcea4e4dbc57410426b39fcf51c9daecd9d310888590d77827973a29c4ebff +Payload = 97fd2c259a4e672e9555a9a5b98f4c0ec8c4c49c7ade26a4 +CT = a460674c2f358762e97dfc958d90973e1e419dbc6a832e987579b2c4a6bcf0356f48cf8959cfa54a + +Count = 23 +Nonce = 64d9bd368ac2357cf2 +Adata = 62c5a16f946b4312517f67c80afe2614c822e3a01b87dc81538c00bbf3fc0108 +Payload = b6ada12f7a28211e9d2c07cbb3d39fa77aadc077b34c46f9 +CT = 8fb5e0954388b9b58519482962487e9b0768f0cee08afe9a92be2b06a0ecd2d00877abded7d9634c + +Count = 24 +Nonce = b4aaf2cd93efc0ce93 +Adata = 79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d1ae70413e4e43d14 +Payload = dd42449da4c95e858b796085b6b5b3b5eef484dbf3c2bc8b +CT = 893f86e29972928c1f3c3e25c73947c8d677814bca7fff2cf8d301ceace678f9bf91fc361dff5812 + +Count = 25 +Nonce = 132f3e19e12f462a74 +Adata = 176cc5a280f6171d00e247edacc81f05c1b9faa87fc831163ac9d76aae59a6c3 +Payload = 8ea05a5033ab8b009664fa2800c24e217488ce6888cad147 +CT = 4771d210ea678dbfab96e320e9c44b68f47cb05b01826ccf42ca4f4ccf986eb6a6b85b99db2fcd93 + +Count = 26 +Nonce = de709ba64cb75704c0 +Adata = 0cf8e9ab95766b6fa85e88d86e4f349a17c0d90509939e343eede988e7462255 +Payload = 51dd9fda9549f25dd868245a6a54b8d59346d2f336adf9af +CT = fccc3e44afa6bd2fbcfc5c834db63dc9d152c04c0dc0b43d393162252ae91ca46fb8e8338cbeb75d + +Count = 27 +Nonce = b11b4c1b7a26387265 +Adata = 14ed867cc909c0619f366918a7d5ae25279fb137e1dee7fd98ddbe3bd19d841d +Payload = e35ea4a16e274fcab457fd4dc7886c3d81fc668c19e0f374 +CT = dcca8aa2eab8ac3f5db9cd9560ae0758d7df40d7d868d1f71f498ea6ec8251a6d149c7ca38b25fe4 + +Count = 28 +Nonce = 20d03227a7fcaef1ce +Adata = c5c15245e641687d0ca9e913406acd2de3f21fbaf2dc5e4e8963222da61d02a6 +Payload = 6775e5faffd0b13e78da70a789042245d5ef31eab5245380 +CT = 4bb8ed2207f36f40f62d3a2c90f8e3bd8f589059b69037118ce3ab864545ea81943ef0ea9489d223 + +Count = 29 +Nonce = 267f76b9ec0f5e7c6f +Adata = 2b421be47d07dcb12a0706f7490d05024fce8f433079e18ec78f4c8678f5f155 +Payload = 9330bb23428ab45f573923e977db74882282cbe1371da68e +CT = c6ae24f82ac5cf9c18a2d98e610027eb2566a1ccfcf99945655e14c7bc8be97ea47388cb7b18bcf0 + +[Nlen = 10] + +Key = ab72eef2aba30205c986e2052d6e2c67881d24ae5fceaa8f + +Count = 30 +Nonce = d7a46e726ed43f1580eb +Adata = baa86f14271b2be7dbb37ddc7c95ce4857e57aa94624d594d7bd6ceeaada8d5f +Payload = 2a794b84fc9e4a7e6d70a82b5141fd132177a86b4e8fc13a +CT = 2d7f76464417613bb61d3657481346b74fc9d6abc6a3babd39365dce86859cd82395d11bfc8cf188 + +Count = 31 +Nonce = d0afcbc1b2524a4a4553 +Adata = 7c267223047af946b06f6a45ffde4a5ec49c28b81ca22da4a36bf523e89e9da8 +Payload = bfc5ce1316ccdbcd8ac62484e7656c87947ff98cbba8e1e9 +CT = 4772c121367d0e8d3edade883342395f3ea065fe7dd7be8c8355b915ca2633fd557ca7ed41e00926 + +Count = 32 +Nonce = 6eecffd227e8d5349523 +Adata = df7736560b1a13aa8e536500ea6cdb9a6757309aadf25a6a9189055a309c3f8b +Payload = 19eef017100dc82f26ed0815c55c122e0b1587302894c391 +CT = e2864c6e12ac089daaa1e94af4b2ed04060d7ef65d2f72f0e7d017514d498f1f3c07d650afde8293 + +Count = 33 +Nonce = a67c0675753f725a8fd4 +Adata = 7dd546397a9a0129861fb6815d419a307f90d259d55f3503961754126cd1b776 +Payload = 80f1f1ea46c92d28f2d60eab39ce056a4aefe63fa688538e +CT = 882c687c03eaaad9d7f591649e736f0c1c78f95e40d40cd77499a8544bc2a8fe95f55fefc7316f8d + +Count = 34 +Nonce = eb83928f0d5f7aa3a74f +Adata = 060cd3e4aecdb03837dfa9f544318c0a16cdc37fa2a3135be7888ac67e7eb26b +Payload = 81e9174e9472777b6b184707108c01d6ea6b5d108ec3c6c8 +CT = 243cfa0a0a36a4c20333968910e6f52acc04c6f74e704180623f3a13fc13db958cbac49f7421d6af + +Count = 35 +Nonce = 5757abe01f7a1183fdcf +Adata = 744629263041f0eccfce4a1ebcc18c4c984010f9241d35966263a8b2f72ee26b +Payload = 991049f26b529af8b0bee0cc83989cf817d248254182f332 +CT = b20469b5f33f0996e8de869ad10ce09924a0bdd7b67a89a09c447a3132fbe5213133650000d50b06 + +Count = 36 +Nonce = d9adfc5b44ad7aa94b05 +Adata = aa6a5448c6ec87be75eca35725ad2e902dbccf840d25b2bdf7e62e4a8fa4a511 +Payload = 14682301a99bf680805d1ffe62e1506d48cee8c51ef1d255 +CT = 9b44efa185b0c10325bb4c3c0815e6a6e46eea366b9a416b5ae554cb440eadd875657fd5cecc214a + +Count = 37 +Nonce = dc3ca30782c9c0a7fe89 +Adata = e788c98ae85b11b3ae884eed6f3b8f5bcf5ab1b7b20ad3f44f760b2287cc5793 +Payload = f9cb86f24536931a1b095b426a07e4621c000cf09b472bf8 +CT = 463f9124d1cc387a0f8b971d1e2da448f0efffc3956ebb2af8312986315522081f0989838ef0429b + +Count = 38 +Nonce = 9523f53f92b6e4ba86e5 +Adata = c3b123ccc916d26a2e6a8b5e30041ad69a944217e9b402b7acc0170c31e8c2e4 +Payload = b9bdcac80f64175836ab51bb1a1bee5ffe3a6b9b71afe3ef +CT = c356b5a78cebd123808fb740754dc47a8ec7c9448bfacf39768e94f062e86129cc9210dfcd3e6128 + +Count = 39 +Nonce = 16bdf18c09d60f3a2a32 +Adata = eedd0796f23612749e9fd282c864f3118d0683409d3bef1fda352e1422273c7e +Payload = cc96133e473d197be1bafdfc1a21d58e57d0d89b2ba1c3ff +CT = f9d78e9e3a41b3bcbfe756385a3715776eb84bb7d8d15432978757883f07802b25e9a5b15c43b451 + +[Nlen = 11] + +Key = af84c6f302c59aeee6d5728ed5da2e3c64a5a781c52c4d1b + +Count = 40 +Nonce = df990c42a268950677c433 +Adata = a6ab5d78427f297a4b7e21f1091ff3a5b20caa3fe1cbcb09459d9df596a6c8e1 +Payload = 6db41aeb5f7c24df8929dbc30483b3c7934b3bd1cdce5bb9 +CT = 8c9328258bf71970d33e23a3ff81cc1c9cbe196a1294264bfd6a7255e4801963bb30a63de3fc5b82 + +Count = 41 +Nonce = b7ea72641bbe2dca6d85e7 +Adata = 4e0f2ddf183281ec131693bdcea3fc9743733c07a486a42d5737735b3f6e3fdf +Payload = 726844e41b1e4d883024b32fee0dcea38c889cb328885b7c +CT = 9a133e4582c2ebc445862a9c6f2f4e39223c84081e322c8f262de30da6ef505fe640c53d765f672c + +Count = 42 +Nonce = 446fee1e75e79c0dfc9ddc +Adata = 42b598eaee271e06d9e98dd94152b28ef10f506d65bd660b2fb8b1be9a2d7254 +Payload = 0cdcf348ecc9c3588001802c2106fb64be9c301adcc66e73 +CT = 0c2657b0482b6ca92e1b1c8fdf75eae3b0cd3af205e9bca396ecb1e46beb16000d585e1d9559ee22 + +Count = 43 +Nonce = 2e6e34070caf1b8820ed39 +Adata = 8bd1ef3a1831fcc8919d736fb23111ca3ef4cccaf20264fab8eb3b071e56667f +Payload = ca0860cc1e96506c2beb25b53d2947fbab634f0372afc8ba +CT = 19e4774030e43e6853ab5bf176ba9c4b59f29f285977e3c15198cbe3e34c884c3f56a732974aa1d6 + +Count = 44 +Nonce = 428542ecfb94a745980aa6 +Adata = 8efe01716b9018084e2ea7616f85b7333d945c0c970f8cdd400130b98db67cda +Payload = bc6b59120ba2845b0e41f65a55e2ef1c45a81485c926c14c +CT = cb48b0af6fad251d409d14ce0fbfae9cd9c40bf4a0c1e2b7e7cec415030997e1ac5db974b617b5a7 + +Count = 45 +Nonce = eff703e6d72ddd23ff52d9 +Adata = d7fc74035e66709d2590b7bb3276245dd43824c9896fbd801ec1d07018b39b6b +Payload = 1a5432e8085511ddac1be91be3e2945f85f0cdcc3a1c9f8d +CT = c0a00cbaec65b7ca525fb26e80ee0cd18c7ef47c39c704833e59bfecf263bfdb24686627fd95e120 + +Count = 46 +Nonce = 6a652ce21334a40a259dcf +Adata = 5d24d80f22afe713c4076c200c1bab36917907fde7b6d34e141066f543526db6 +Payload = eb8f1988cb405041bf48d138ad41da7ef364d4ac59a9e324 +CT = d4f23166c09a15466c7e0e2b30627ee5a84f22d7e6135b4a0652b67d559a84b4a915ca6a420fd300 + +Count = 47 +Nonce = 9382e12d447c0ca23cc9c3 +Adata = 239129eb760f8a770410c160e4e13a6b9497077c3e463b65397393fcd3cb5c70 +Payload = b40e80564263c7f450c53ef84df67247d72e8a04dbb284bc +CT = 6de2ba26caa80874814816154784912c55e3d6da83488e7250f5a52f82211542b4e2661cf870c80c + +Count = 48 +Nonce = 2c3a4148cbb02504a2483f +Adata = 33c3bdbf185b580353de79e51e675b03b31e195f19ba1f063d44def0441dc528 +Payload = 60a31736d99c3dcf25b349f6110e1c152b93506e85a01e67 +CT = 4d5e705d08f3ed1ca6f1caa74b46e4b1eee18a0783686f207de16aaa41d06bc071657dacf14da754 + +Count = 49 +Nonce = 691cdf6fe9ecc2154d0101 +Adata = dc096596644c4e09c44078b86e5e0887c45094042eb0d74a6a13aa2524463076 +Payload = 77e6441ee017a93dd876ff2c7980540c77ee15edb0f23933 +CT = 24cecc81c8ac7ca9906372dc5263f2220b4dd162f1e08283f07f23e65475a20fd96e45c6c695cd83 + +[Nlen = 12] + +Key = d49b255aed8be1c02eb6d8ae2bac6dcd7901f1f61df3bbf5 + +Count = 50 +Nonce = 1af29e721c98e81fb6286370 +Adata = 64f8a0eee5487a4958a489ed35f1327e2096542c1bdb2134fb942ca91804c274 +Payload = 062eafb0cd09d26e65108c0f56fcc7a305f31c34e0f3a24c +CT = 721344e2fd05d2ee50713531052d75e4071103ab0436f65f0af2a663da51bac626c9f4128ba5ec0b + +Count = 51 +Nonce = ca650ed993c4010c1b0bd1f2 +Adata = 4efbd225553b541c3f53cabe8a1ac03845b0e846c8616b3ea2cc7d50d344340c +Payload = fc375d984fa13af4a5a7516f3434365cd9473cd316e8964c +CT = 5b300c718d5a64f537f6cbb4d212d0f903b547ab4b21af56ef7662525021c5777c2d74ea239a4c44 + +Count = 52 +Nonce = 318adeb8d8df47878ca59117 +Adata = feccf08d8c3a9be9a2c0f93f888e486b0076e2e9e2fd068c04b2db735cbeb23a +Payload = 610a52216f47a544ec562117e0741e5f8b2e02bc9bc9122e +CT = 83f14f6ba09a6e6b50f0d94d7d79376561f891f9a6162d0f8925c37cc35c1c8530b0be4817814a8e + +Count = 53 +Nonce = b4cadb5f9cb66415c3a3b714 +Adata = c4384069e09a3d4de2c94e7e6055d8a00394e268398d6ea32914097aec37a1f4 +Payload = 22bade59214fa4b933cb5e3dc5f096e239af4c2f44f582b0 +CT = 2296e3f8a2245224d274f1b90ed1287cbeeb464c70a89ee475ecb546efb8872a3f8b0281b3901752 + +Count = 54 +Nonce = 72e6cebdaf88205c4e744286 +Adata = feaf010f462ad40a38eefb788b648e1cc292cd4bb08ebeff3c39182862296042 +Payload = 30655a6b5a5965db992e7248d24141055e988d726abb8e72 +CT = 69b27f2bbaa61c4f24e1c25e0779147fef79ec1582486b4651cffa571570618e2ada3376bd9f3e5f + +Count = 55 +Nonce = d8030fb31eca2c43f3f5eb88 +Adata = 66704365ddd0145febeb33f68b228a3f09e1e5a4b68149e6e06d886301841295 +Payload = 9d014a02507a6f266bd1ace21b55ab8b73983ff503bb9adb +CT = 233a883650538ab8c0da30b90527f880fcad5b16bd435e762beeeea7a638c717e63764b3a5118a0c + +Count = 56 +Nonce = 58038cc35ad3dcd75195e125 +Adata = 3da7a757e942409a3b39ccdc0669ce6401f7e133c07c4c42e366d70a8e9bdd49 +Payload = eccfd817fa5e3a0146967fae13fc2471ee3944cee37969f4 +CT = 415a36872a04f5b4b5372f63394ab9fb353e0eb9b430450133a87fa29e5fbfa9bc0430b0cac00b7e + +Count = 57 +Nonce = acd82ae31bfcabd90af5af45 +Adata = ce22126f01bde16249c47102b4da68ad3edebcd4a16c24a16ea7ccdd5d364d10 +Payload = 9d2126d34963d3ba12cd841bd321036cb82cfb78f2a6535f +CT = 88a5b889e6fd74fc15336e23374b430988416c7e6b6e7248b336cbbeb64fbebf2e7076a98ecf5bbe + +Count = 58 +Nonce = d24457d567fd0a65fdabf219 +Adata = 0091d39f3478d2c59bf874b96db9ce0f7e8b85a9b805e07dc96b219819d51663 +Payload = 6da3ac85505e93c4f391ea367a9e15fa9b388ef7ae2693c1 +CT = 7039a8a49cfa6402b4ba3b840e69200c13ac4a3eb1c709a30ea909047af4998c660afbaf346ed65b + +Count = 59 +Nonce = 50c59ca54eb64575b82b13c6 +Adata = 5e4e42cbf172853c351d597c7d6d38b1a9cbb7ac92c00863a80ac4a2d9f0e7fd +Payload = 25b2ba0a937b71f3ee68e7172cf2c4524b662efcd08ce2b3 +CT = e95fc44287ce39c5ad6b91c88582563fa68a9e304094deb8b193dd767f17783f0b51ac0fb7323301 + +[Nlen = 13] + +Key = 36ad1e3fb630d1b1fbccfd685f44edd8984427b78deae7a9 + +Count = 60 +Nonce = 3af625df8be9d7685a842f260e +Adata = 308443033ecd4a814475672b814b7c6d813d0ec2a0caeecbcaba18a2840cdb6c +Payload = 8b9db1c8f9b4892a5654c85467bcffa2e15e28392c938952 +CT = 6bc6890fee299c712fb8d9df9c141f24ee1572b8f15112c2f8c99ccf2d82788cf613a61d60dae458 + +Count = 61 +Nonce = 24eaeaa437649e61b706942b8d +Adata = fff75462f96157d9554bddb6aac156fefd88fd4a90a8536dfc28cc577f19c83a +Payload = 49ff4ff85f7407ca383cfa4fd7177adb4dab26e642c8186d +CT = 3647fae50c588d792442f43a20125e77ab5db3c469391d24d0a421bbbc002eb9ac9ad01f625f824b + +Count = 62 +Nonce = 7325932d6694aaf61a8204c172 +Adata = be20ceb8ca14e9bef7158b280a26bcac763da79cd0eba9b1833ea808c5e7a66a +Payload = 2861494eb40b9d964d339797c1b6aac63c6674187768957c +CT = 286dc74001e2a6000a23db164f4b2912de4afcf1df8c3aa5ee32a7ffd4e7bc303d3482fbac431828 + +Count = 63 +Nonce = 61c9949df5853e42599e5ee0c7 +Adata = 243d09ceb16755cb58d62065df84890b840ad9b7eec1132c6427cd7c3d843fcc +Payload = 943a49073db6ae94a88844ed895f8fd99ed25c3f42a2f78c +CT = d3c56bd265a2cb0811dd218f248800ceade4f02b5403b9635eb30cbec49cbb51c41cd5032b7fd759 + +Count = 64 +Nonce = 07b6c18dd3b0fd9e8ff026a436 +Adata = e85f141c3d1af7727fcdb00f8e2c34e42a436d04ac5b8ca9f321a178a2056806 +Payload = a18b0a4618063c0519818d113b8e5435aaf153f664058f1b +CT = 69f933a2a5e774e8d013cbf78c6ab0b73e6ca323d0c52691acb5cf2631987d3d963349b035324aac + +Count = 65 +Nonce = 0c075df70630dec2fe81834945 +Adata = f3f5c5ffbfe8247bc0c33c793652f749fe91b6dd141cf0db56e71cef8a2fd266 +Payload = ddc4bac4115e8cb06d29d22e400674dbc615a667f933603d +CT = 26bdd25c9f204fc7520d26c161464c28fb35e395b295b3db4e239d33283d18415b54c2aad4bde354 + +Count = 66 +Nonce = 0c2d20375057fcd4241d290f6a +Adata = 70ff1b9ff8ec08fdb18b0e7dbe01127ed0cfe0b0a449ca2ace4992b7b6248b71 +Payload = dacbdf1979e000d52b573e74800761b30acc26681f372acd +CT = 6a642c389433a3464fc64783ae6a14a9a45f0998b56a5b9162d7e0320dc930df3640a786d7ea9ae4 + +Count = 67 +Nonce = ea0801cb3dab853750a922dd25 +Adata = d83360d0896e022bf014bd33710ab212ddedda6d95a54996f33db304e5f12f01 +Payload = 46cc5653bbd8300dfb0df6d0af3fb7c7639a830bdc9f68c7 +CT = f1b0728920351d9edfdbe7df360b21f6cc5b628dcf43a3f10d06b4a545609a2128a95d4d73471559 + +Count = 68 +Nonce = 97e6de379c90fccf3fa8f27013 +Adata = 539f8eb802bfecaa4fb5b19debbf3d4847db9c4e0473a308ab3f3c859e68fecf +Payload = 8b013f52a828905013f250fb9c006a173f6c66a64b5ba317 +CT = 556a439bc979dac1cfea8c5b64aa78547f52a62896c19893f3512baf72cd79ba9301194be204bcc0 + +Count = 69 +Nonce = e832b6330d3e5e190598cb9c61 +Adata = 093be516277e8b197ba5e9c85a831529befff0f3971510ab611dfe0dfb50a2ad +Payload = 635d2d7894bb816f154210946a369df37ea492993ba23af9 +CT = d8e19c67e5aa7f14a16ecaaac414a2b15a15bb5f966932e6b0bfe9a5857fd36df94aeadda7f83a79 diff --git a/lib/crypto/test/crypto_SUITE_data/VNT256.rsp b/lib/crypto/test/crypto_SUITE_data/VNT256.rsp new file mode 100644 index 0000000000..2817684910 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VNT256.rsp @@ -0,0 +1,456 @@ +# CAVS 11.0 +# "CCM-VNT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Plen = 24 +Tlen = 16 + +[Nlen = 7] + +Key = 553521a765ab0c3fd203654e9916330e189bdf951feee9b44b10da208fee7acf + +Count = 0 +Nonce = aaa23f101647d8 +Adata = a355d4c611812e5f9258d7188b3df8851477094ffc2af2cf0c8670db903fbbe0 +Payload = 644eb34b9a126e437b5e015eea141ca1a88020f2d5d6cc2c +CT = 27ed90668174ebf8241a3c74b35e1246b6617e4123578f153bdb67062a13ef4e986f5bb3d0bb4307 + +Count = 1 +Nonce = 195c0b84baacc8 +Adata = c7d9557b2ed415652ce6faa8cff5217ac803530ec902890b31eaaf3eeb0aa98b +Payload = fe012718481b2c4e1d7f9a7685e3daac43ccf22cad0df900 +CT = 893af0f130f1317de9f217234274b0c04fcc202cea9a0df882c00b5b463654adbf82888099a7d258 + +Count = 2 +Nonce = 363e0e921c6f11 +Adata = 805678936d4e94746ab4818dc5f50c41e32cf32e7a8aafb300fb91af6406108c +Payload = 7e7e33e1a07d4e8fde2f33304f21cb564d146860ccfeb49f +CT = 645cdd11a1c232815ce1e07ca3ea83f372eba46cedafddd980adf2762a1617adfd4d8356bb48aa8a + +Count = 3 +Nonce = e323cc866af462 +Adata = 163c747f3ba4ffd68af87f2475f48f2714659a2ec43b9ed115e02fe0e3c8be99 +Payload = 2bfc76f3b108ba3118b07433c4d3d5f41564d22547c12822 +CT = 0db04c6b068e73e3c4d71059bdeee3d27622f99dfd07d868fb9c02753c57fec7e1a5fa8f3860501b + +Count = 4 +Nonce = 03ae777078b95d +Adata = f1dacf9062dff9a6a3d0498f9d058782f891475684196bf2d8e7e905393acff7 +Payload = 38c4275a5f605fd1d99517e13deebf0c9794ef586070fa9a +CT = df8f524872b5f06f3f219ba76524990b466409894930d7e0d104990e598eabd88cc8342ac16424b5 + +Count = 5 +Nonce = 1c6c351d4fe9be +Adata = 14285e97cc3cae452e1a52e2fa0bbe24df96abf2faf6b9779acc59764612eadd +Payload = 9e2220f3c17532e1ce0d6f562b049fcef35bcaf9a7e196be +CT = c274b28228a6b13b670c325080f88d188d40d78d385481eae004894b1861db5d2d8ae98ed8926c1e + +Count = 6 +Nonce = a121dc27479397 +Adata = 359421e9f78cc4a31f4f019977d7fd29780524e20288798c50002a682a6368b9 +Payload = d42b16b32e77637724144eaddb21ca8d7db4e7f73acbf707 +CT = 56e3e3e59e978161355e7d8573dc0657db400ca0b083dae8ed2ac2cb63e1b9d7dc598634198fe4fc + +Count = 7 +Nonce = b1f0e26b60bf1d +Adata = 2ab4239fffd13762fb5391f5a4760d12d96ea12666a793b4d651e9f4891c22c1 +Payload = 9a2851083ad4e7b915bb0526bb4054e4c0b4adf8626edc90 +CT = 5b2e0215523ff37f0df46e84f996fc9fc779986c766fa51595b8a23ee377d5c2850f4ed95a385253 + +Count = 8 +Nonce = 50412c6444bcf9 +Adata = 09cdcaa87ddf8bbe6db8411d14bb9064e4a121286cc8a6e97fce1844935f436b +Payload = b28a5bc814e7f71ae94586b58281ff05a71191c92e45db74 +CT = 05cbc32a6ca797684636dedd16ce65a1eed69bcab1b1bdbd514ef5cbf9991a919fb4974d55506ce1 + +Count = 9 +Nonce = 225557b0faca3d +Adata = 21611da060fa90cf7fd68b721caf303307a56e56453326495b628c7dc93cd175 +Payload = e831b739e8eb9f787f63c0bb071ddcc9f44cab8d5b447d23 +CT = a97e0879407eb3b7f93118ca73f17eb34e9f4baf43b07be2e8a3f7b848054cb235e1b58d6a12c5cb + +[Nlen = 8] + +Key = 472bf7946bce1d3c6f168f4475e5bb3a67d5df2fa01e64bce8bb6e43a6c8b177 + +Count = 10 +Nonce = 790134a8db83f2da +Adata = a7a86a4407b7ecebc89434baa65ef173e88bd2dad9899b717ca578867c2d916f +Payload = 59eb45bbbeb054b0b97334d53580ce03f699ac2a7e490143 +CT = db4961070f528ccd1a5a0681ee4d0ce3515fb890bccedc2dbc00b1d8b2bc393a8d09e87af7811f55 + +Count = 11 +Nonce = fb2441d1594a488a +Adata = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Payload = 451101250ec6f26652249d59dc974b7361d571a8101cdfd3 +CT = 1bca7b0d35a68c0ffc568ffc8221cca738b67b95e3ab26efee21c5738d1f7fddf3030d004a702704 + +Count = 12 +Nonce = 0855263860043207 +Adata = c7fc24863c33f7e8cf97b337918495d52d864ac570c99cbb09d151758d6b504e +Payload = 61fcd7ef9bf151b9d8a81dc1ba4f82c45e9c2e4784627acd +CT = 9b939b6b188e1d0fe016f366fb01eb79a99ef7b1b57c6f7ab223454c57c714d96681cd4d55615afd + +Count = 13 +Nonce = 415cd251a5e36943 +Adata = 1a393c7e85fb286709f4eb50f09640e1d65ec1135cb4443820136b3cec69772a +Payload = 66ae08d494dc9df9b7f8f53199fa37d0c88885458b168c57 +CT = 1731e260ae31b8068ad1099313b167d9e6cbe49f471da61a9af96d3ce4ea94213b60cb69d92050e6 + +Count = 14 +Nonce = d95bd65242bb2265 +Adata = d0e20e1358be5cc1c45c1cf02c82d0a6d0824cfcb65774cf95f047b9f2cc1d3f +Payload = 312c3791c64d79205a11eebfc14b2d7a6b00391793c9559b +CT = c3fbe558ff9ea83ed86b7d66503ee38eee94e4a41fd53f0f627a352d056712e0d44404c61712e2ab + +Count = 15 +Nonce = 3f0bf0141dd3ace0 +Adata = 9dd4ed18209dd6cdf19cc76fee443827e7331aaf020960c15d7bbed0f6a3b1f7 +Payload = 08354480047eee3beeb5ab165da17d23f2f1a4ad98720611 +CT = 2db9d2c54134d37ebefcecb9e2076034b975677fde58ef6032645a322fa9bc8aace600f942a84db4 + +Count = 16 +Nonce = 3fd8b3a3ff563a42 +Adata = e58327efebad3276a7cd1b1ccb56db0caddd02a303cd9fc7ea5c607a2ebefaae +Payload = d1abd89351384e1a3c3366f77c3175f6390801554d7cd783 +CT = be284dcb357ae99ada7cc891730320ebb32ca627eb8c80623957a2a5b6164218fc83e12c42d5c532 + +Count = 17 +Nonce = 14db1ffc1c87117f +Adata = 6c2b091433833a0ed915354dcb70d982095b614dc51a95a22cec417184d8e786 +Payload = 0594307491f157821e63f50c94034f9284f095d5b897153c +CT = a114c84a10071e359bba2b2ba4ea67f893e27e6ea880aa4b2cf16ce68a93f8839245baebb2278300 + +Count = 18 +Nonce = 40b0f74ff27a3fc8 +Adata = 3b9e1f4e9b57a6dfb5e0ca7ef601fc6af30a1f8650228e51e0dc61180d0bec6b +Payload = fc8b7dbceef6b0ffcbade789e09303044042cd671607e819 +CT = d00ef56074a8213740af8b8f974f778db560ac365d6ce916b8d191130e864bcfcd1dec94a1aaeaef + +Count = 19 +Nonce = 96cbe9cd19351359 +Adata = cf498fd042f9a07503e490cec4873d4df91162cfde60bd2cbb2b710c6681a9fd +Payload = 315e81c9ce556dcf97a5b68503fd2228a7a6a174a15cd618 +CT = 7383c2de08bce3f0b7e504dc03d062f44396bcedd2180fd954e6ec9f6ae1e0976ecf04dbee6463c2 + +[Nlen = 9] + +Key = 58ae7965a508e8dd2eda69b5d888a28a1cb3783bad55d59d5b0da87137b72e93 + +Count = 20 +Nonce = caa3d928d2bf2b7f2c +Adata = 304678b3ffd3200e33a8912bcb556b3cfec53ca17f70ecba00d359f9f51d3e3b +Payload = e61bad17640ecff926d0b0238271ee4c9f8e801dd7243e9e +CT = 7bb1137c14cb4d324a4a8f1115c619ebf74927f0bed60a8d5a9140ff50dc4da375c7d2de80de097f + +Count = 21 +Nonce = cf09ca67659a583bb1 +Adata = 5507c4c3107cb446d19975f91207dbf3e2a51d1dcfd7da2f082159dbc3f41547 +Payload = 1887bb0c02500093a30a44b99e137483704b06615d308c6b +CT = 834d3b2e5f0915c2348c706b4d2ff2717983ab4490edcc63971f02b7122d1e4f78de9c3376520f5a + +Count = 22 +Nonce = 97f940d7c1230bd8d2 +Adata = 56be2c9e09b555373d58f6fe2a0ca9b4ddba899addddf12b0fda860ad791773a +Payload = 5ac67c9bec9b95c54e187a4a6812f5d701c4ac8f847c005b +CT = 9f372ba1c87a115847cd708aaf5b8a143b6981ffc2c61cefd30ece13481609809b218de04c4e5ed0 + +Count = 23 +Nonce = 147c7ebb6c92245054 +Adata = f95d64a513a9f3e6c95c9ed27b22fafd7dd10da52636029523142149116aff53 +Payload = 08f199a8d7e3ea821dd3106e8947cd2e9d485342b25a6471 +CT = c438aa6d187643d030dfe4d6b5b578f84838f4dc5c396d700c0986ecd7dab44e5e97db37392a485a + +Count = 24 +Nonce = b9bad794d49cdac9b3 +Adata = de9ff2a43f49cdc502cd17a373989bafd13fa6ccff6660557ce05b6295186d47 +Payload = 40d1cd4063750184356a1d7cae1cf1824f552c5d59a62dc1 +CT = 9952b25f4f4f375440cd958456184fe61610381ba92ca48f38dd977042c4d97da84e4effa650799a + +Count = 25 +Nonce = bbe054fbef86db3ce7 +Adata = dcec76181e3b872a5a6e79f070354e38866c7f67fc428fbca29ae6d929b1dd7f +Payload = 5f29808ba74b672a0f82b3b7581dc32478c6e790e2b8c61c +CT = 4d176f48b09b772dde8adbdaef720aba128a8d38a902847ebf22c81a5d824b4916660be6f9b513e6 + +Count = 26 +Nonce = 6a35e1a4307f6efc6d +Adata = af28120505a84a75b0f6b18cc9d8c75c661bf143be29c11d8ede78b9bb98c98a +Payload = 5e2f601395ec406fcf96785f768162e849f867dca77667ab +CT = 4e305e26d34711c6aa775f490939cc6560d3cb6905f5b0f5588ace6fc303600abc8e5825cbaedc7c + +Count = 27 +Nonce = f6c237fb3cfe95ec84 +Adata = 038f8ed89444784417a9c23bf11e9b436174e6c10959e00faa1704ce2f7f2c7e +Payload = dfd9cacbf7d73d688447ebab13d2e13f3613652379b386f6 +CT = fb16c17a6b22a8658f446203ad46a48b34808083b271cabb015a1f78abc287bd2a63381ead07c558 + +Count = 28 +Nonce = 50d024a3e7455d7249 +Adata = 8513365786b7988b208984e11022c15573f978bbdc29e8a7a4745c8a81885a1d +Payload = 400317786b7df63373ffe541efcee6318cfc95bb673aad3e +CT = d33b3141fea3a9ebdeb80d1da32dae42680be78471fb3023721f714120162514555b60560afa4256 + +Count = 29 +Nonce = 02769283d5a06c363c +Adata = 292c0be3713c6c588cb4e29a1c43b3e6353e33556194e568e800e4e44e8281e0 +Payload = 12ba8eddff1c2a03ddd25bb924ff065a93fd712b2c4f61eb +CT = b15b1789c323a68568f86f35483bd7e204beff8f318ae14351f5e62b3b923a937e6c307af202fab3 + +[Nlen = 10] + +Key = aecc5e18088bf9fd7b17f089bdd5607b69903b04b726361f8a81e221b1c91891 + +Count = 30 +Nonce = c527d309ab29ee91c5fc +Adata = 8f9a73e7bc1c11e2919020ba3a404cbddf861e9e78477218e3be2cd4337b278d +Payload = d4291c99901345afe29f58912a414a7498f37b44362bdf3c +CT = 392784a9e0b14bcd37639ec5409d6ead3e75f855e5a92c33ffc040ef3977e0035ce6ea6d157c18d3 + +Count = 31 +Nonce = eebc31a5813b4fb93b63 +Adata = 9c87ad77953bf8a811e001ddb946eefafbfaa598150e85f0701853fa307d77d6 +Payload = ebcfd71120b0f9a2cccb898e6dfa082998cbe10032de3e61 +CT = e38eaad1e2df77e85e7129a8ce0f82cfc32b0aef79ab651bade65aa17e4dfb0aafe18cf71a72b180 + +Count = 32 +Nonce = 231b33dc406c9210f59a +Adata = 38be46d271bf868c198052391f8a2147c663700d9bb25a0caaa36974f18dacea +Payload = 9032f910347daf661092b5c1f15b5ffed1369b194d9e12f0 +CT = 868b85288828501cf1d06610fec25e8b8a4b437e2e4f5563b7f3b898a2356909784598f8a8916f5a + +Count = 33 +Nonce = f2a88c3ebc74e62f24c7 +Adata = 5f495c5da035cabeb77e8aef10e91a05bd5aa414d1a37fa1099af959b26e5403 +Payload = cfe8ee9b475e36058471e2984ae66f6ba1b3cb477b15155e +CT = 22c16333ac651cd9c183e78aba3e9312fb3b77dd6f9199502788860aae5534cf84979e30c3327d37 + +Count = 34 +Nonce = 9cbaf1c83ba60b1e90ea +Adata = 7ef136bd9a5809676abbaa68016d6fc713e34ac4b768a8246b1198c959f43085 +Payload = c3bcb0aaea93893f05eeb6439c8619dec17670a6439e2921 +CT = ebd9fb86563aa8f10062624441336f982c161ce5717d990a599ca6ec1c61a14c37b5902389e47aee + +Count = 35 +Nonce = e25322845d87d8a76753 +Adata = 2a89b9f0e56a1cf87dd38ed78028b6286ef8b7141dd2b3c65c5a8e1ed79bf4aa +Payload = ae622ff9381854f831892c318bae5c003e74b15199bc12c0 +CT = 144c920f0fe278f353d0b053563d907c7589e4f1479d7a93a0604deb3fd9cea2d89987833ff5c2f1 + +Count = 36 +Nonce = f4d7978fad36223623cc +Adata = 8671de7e994967f2521d263925e745af9273682d9c08ced07d4a98fc985f68a0 +Payload = ef9b4ff8da108cabc972192ffecd5f96594c6d0871ffa6aa +CT = ae4948b3bc1e50beb9f5d005871fc0d3dbde295de1c9ec3cbc866ab47bea7a4d0070e52b492fb8f6 + +Count = 37 +Nonce = 6597ffb9eaad0fd9d830 +Adata = d2967ddf69ef62a9e23c9118dfaa55df92b4116322f1c9275131e3875dc92faa +Payload = 5015c894b2437ff15c46bca9236830ff4bb057cd5764f027 +CT = 0b1dcb3cb0b4c32f398f3c43eccfe8f4242f33c99a2a2283efcb3dacac25bed0304f227fd5b77b8f + +Count = 38 +Nonce = 80e376b87272d99cde28 +Adata = c9cc8f967dff45c05b9345d03813b6e30dace99556f7df75b7120bb6e5f55827 +Payload = 615f657e24129a3e0f119988959608821219ce8354c4be26 +CT = d3e8b8f7ff8faa666ffe2509187fa7befc7412fd4e3bdb06cd2f7494b1fb0a0c6a2184e5c4787fea + +Count = 39 +Nonce = 344cce96455541d403f3 +Adata = 748cce18fb40126ce125dbe341fbbc59d2aacc170ed5ef0293b15713c9184a07 +Payload = 828b6a4cd49f499a6e8e8508f9ab35255d8e9fed33ba4d91 +CT = b67e582a74d7f022a16ada2de7ec18caafdefa6b104baf4ed93b6f8c8a1bf72be75976e4ebe6dd1f + +[Nlen = 11] + +Key = 97bc7482a87ba005475dfa3448f59d4b3f9c4c969d08b39b1b21ef965c0f5125 + +Count = 40 +Nonce = 0bcf78103ec52d6df28887 +Adata = 049c10f0cb37ae08eae2d0766563b7c5a8454f841c2061a4f71a0a2158ae6ce5 +Payload = b99bf4dc781795fc4d3a8467b06e1665d4e543657f23129f +CT = 0d3891fa0caac1f7ebe41b480920ffd34d4155064c24f3b17a483163dd8f228d1f20cd4f86cf38fd + +Count = 41 +Nonce = ab6374c6b2faefd92fa3d3 +Adata = f19c044023e5cf339203738ee70e76527519763664c06ae00e002a5ba94c32c6 +Payload = a2e5c51f516db01688b64c173bb25645182a005018022ee1 +CT = f70c598df3c64d3527ebb7fc8408b7de2cfaa1da7984ec361f1ad61758d828b70d4881b7d6ae8cd0 + +Count = 42 +Nonce = cfb89e7ddcba601e875110 +Adata = 052714010da516c896ac5842a839ae845324643cddb080e6206148432d0d0407 +Payload = 037f206cab78a6ca0745dc8fc137e22e14f3d7183917ef83 +CT = ccd675862502a2e2520a33250150b8b7b220e84db854888c316dd62075fc761e2bc80edc5c564bdf + +Count = 43 +Nonce = 967cb6f8530bf8a43adb42 +Adata = cf391a84d03e2e22aec1965cec821f99e7bf21a7c3580dffa531464b22d83225 +Payload = caa3d928d2bf2b7f2cd8a7f357055b6d6895a5e34f47972a +CT = 4f4f509debe6e52eae4af8b1740dde0a5338f78711a3b4ebfc8b5aca6d606222d6af7cfea0d1f4e1 + +Count = 44 +Nonce = f5b7b5dd2b5e1ec93710c9 +Adata = e7a6b228a67d37b9d29a38efc547e50b4a6d95d599b45ee189ece21101ac6b5b +Payload = 4a74ff35418723f2cecec1012484b52114067b2b2393e7f4 +CT = 25b140922a9d4f2ce153a4ff86596a49d7de6a6184e931e8b2ff27a98029b23484e00c2a5d291887 + +Count = 45 +Nonce = 713de00faff892977d99d0 +Adata = 14ea93488d4284d21d4c7ce14414adf45c1ed9d2d99db866d0e59accb6234dac +Payload = 3820db475c7cb04a0f74d8e449f026ec951fa59667738698 +CT = e4d92ab8d1ffb0976670d891cc8338da12f86d5d79b334103d2ae816edf857c810b6fdc7f2c71f1d + +Count = 46 +Nonce = ba87934808de09b2ae829b +Adata = 30e2ea2a505f19e8760a0a84961000c7a0b7fe3460a9d3f5a38f54149be2e9ee +Payload = 0e52a384cedcdf7f179348de6e7336aa86f8855fbd903cfa +CT = 6df893eed2be958e5f542f8cb4adb392b34786cb4ce821ec93fc57997b977948d55bdb026db5bc48 + +Count = 47 +Nonce = ea09fbe5da0fa4fe911e18 +Adata = 237dc8512b29bccdeb8ee39cf83b9b6dd203823d175c44d5f605b194e7ec136e +Payload = 41cee0ecaf9c65cef740440af37954ef49a585779d2abbca +CT = 2f204ebcf549ee2a800d870e6341b9a89a41ab4ae91b6902ff704a2bcfb8becd0226f76d68fbb08b + +Count = 48 +Nonce = 5b80d7affc4ab4a4b68bdd +Adata = 3a38dd7da30f5c312fb1e978d87b7a39792fd9ea3e9ab1565874e99df587327c +Payload = 5ff92f6d3ca791421363e10cc84b4e8e21e0ebe5d8c55d6c +CT = 05472db7875d59f8bed45606f355a516de93740aa2baeba18df9400df42baee6b9a0d75b45840104 + +Count = 49 +Nonce = 514bba483fe7f2b7e555cc +Adata = ac8beb419099cdb42a39e9b46fd900cc52eec4b43a96ed18b37b899b63fb931c +Payload = b0b11dfca9b3936d1b4a423c5acd3d012b399a487c19c994 +CT = fa20629d514c4ce7bf727629bca5aa1c0c7e7851fc1bfc5c847729a70d7b4cff5281aece37006015 + +[Nlen = 12] + +Key = d6ff67379a2ead2ca87aa4f29536258f9fb9fc2e91b0ed18e7b9f5df332dd1dc + +Count = 50 +Nonce = 2f1d0717a822e20c7cd28f0a +Adata = d50741d34c8564d92f396b97be782923ff3c855ea9757bde419f632c83997630 +Payload = 98626ffc6c44f13c964e7fcb7d16e988990d6d063d012d33 +CT = 50e22db70ac2bab6d6af7059c90d00fbf0fb52eee5eb650e08aca7dec636170f481dcb9fefb85c05 + +Count = 51 +Nonce = 819ecbe71f851743871163cc +Adata = 48e06c3b2940819e58eb24122a2988c997697347a6e34c21267d76049febdcf8 +Payload = 8d164f598ea141082b1069776fccd87baf6a2563cbdbc9d1 +CT = 70fd9d3c7d9e8af610edb3d329f371cf3052d820e79775a932d42f9954f9d35d989a09e4292949fc + +Count = 52 +Nonce = 22168c66967d545823ea0b7a +Adata = 7f596bc7a815d103ed9f6dc428b60e72aeadcb9382ccde4ac9f3b61e7e8047fd +Payload = b28a5bc814e7f71ae94586b58281ff05a71191c92e45db74 +CT = 30254fe7c249c0125c56c90bad3983c7f852df91fa4e828b7522efcd96cd4de4cf41e9b67c708f9f + +Count = 53 +Nonce = 225557b0faca3d6cbaedec5c +Adata = c7aafe7d3b419fa4ea06143897054846ac4b25e4744b62ba8a809cc19253a94b +Payload = 0e71863c2962244c7d1a28fc755f0c73e5cbd630a8dbdeb3 +CT = 2369b56f21336aba9ac3e9ba428e0d648842a7971182d5ffac57f6ae1080efab4ed93f8b4ce1d355 + +Count = 54 +Nonce = 78912be1a35e156a70fb72f7 +Adata = 12ba8eddff1c2a03ddd25bb924ff065a93fd712b2c4f61eb80d77fab2c4900e0 +Payload = 113efd182f683596862ccd5eba2e2d4ffa709d9b85c6f1d5 +CT = 835a22eb8d718c0ee1531a2d1bb95f58215c997c612908eeed3ccaeb7a814f69d3ec1fbf2ee9792d + +Count = 55 +Nonce = 91ad90b58d2044abacf957e1 +Adata = 4fc795b9126c23dd7fd514c2e5a8ca583e88a783b28cbb2a5df09f8b520ba0d1 +Payload = ed55f6b9eb8fe74474c037ede94ffd84ada846ede4ecff74 +CT = ecb595276fd5d412a7cc3f5cfe960f47a0d0e2df0b08a11ac257d67143722a976c9d7f44b09a767d + +Count = 56 +Nonce = 4bbe4ca29122c4892ca09b5b +Adata = 367ecd1b71dfb96a84e2369f28705dfaebf0c73ed35d5364449b2391230be846 +Payload = 8dd497bb777bbc3e56e3af25a43545007bb00f2b9e9f815c +CT = 563d61fc0a5b82804a580a7d752a8e61d3342fb39372b39b6843a685bde3175695796f6e64f35901 + +Count = 57 +Nonce = 218e7b8a8fd62927f90b70e5 +Adata = 01815f599d6ba0d1c09f6f673bb6cca4c2a7a74f4e985be4c0f37842c7bbc5a4 +Payload = 80f3e4245c3eab16ef8bf001429122e46bde21735f63adba +CT = aaceb16589b9de253c99d0d32409a631db71e8df8a7644bfd027e3466e8220144cb0552f9b2800e6 + +Count = 58 +Nonce = eecc9f106a0721334cc7f5ba +Adata = bf38d0ee11a796a517539bbc9ab00ff85a4ddbf0a612d46e2bc635180ad34c50 +Payload = 36cefa10af1a3446a2c8d4a1171144b9ddd8e33a7cd5a02d +CT = 9bf3b2df93cf5b587ecc96f45fc75e6eb066cb286cb06f284c9027fc41bb8c848025fcf9d092a873 + +Count = 59 +Nonce = e41af8ca408c4c12e37561a4 +Adata = e0b20892875f60b5d8763a04958487fa5b7cf8d67a456e430475b337245d671c +Payload = 32a4da08bdd51336ed5798c7177b853a534bc98f2e6f7d4e +CT = 95ffdc68f721cf2294d0d88002e3814167306fd906dbebdb7e6e0e5dc0a03826e51bd94269d7a41d + +[Nlen = 13] + +Key = 4a75ff2f66dae2935403cce27e829ad8be98185c73f8bc61d3ce950a83007e11 + +Count = 60 +Nonce = 46eb390b175e75da6193d7edb6 +Adata = 282f05f734f249c0535ee396282218b7c4913c39b59ad2a03ffaf5b0e9b0f780 +Payload = 205f2a664a8512e18321a91c13ec13b9e6b633228c57cc1e +CT = 58f1584f761983bef4d0060746b5d5ee610ecfda31101a7f5460e9b7856d60a5ad9803c0762f8176 + +Count = 61 +Nonce = 8a56588fe5e125237b6cdc30f9 +Adata = b3aee5fbf409bcfe9b46ae68d570edbbed32c12d13926ffb5ddc60ff0bdb7f85 +Payload = eca81bbd12d3fd28df85e2cc3dcc2ecbd87408002fd00fe1 +CT = 9aad62a5443550d11f9efdab2de0eba74d47ae4f7d16adf4276664f6567f2f978bd4be4d80cd07be + +Count = 62 +Nonce = d908b04840caca2280e5293ade +Adata = 314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e +Payload = ad1109ea5c79bb55d22e9713eb2df42767cb29a2eba3ad2c +CT = 61fdcebb158cd03151697ae7871c0a998802997e0672e5886e5a9df1b1d6284ef657cde6f74734bb + +Count = 63 +Nonce = 6df8c5c28d1728975a0b766cd7 +Adata = 080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5 +Payload = 1a95f06b821879df3fd3ac52fc99a7c1d3e9775263b7d036 +CT = 704f60f9cc3ef7bc00b4f7a271ca70a89f4d5605387b3e2f8cc80aa08572b90e9598d0a73712b720 + +Count = 64 +Nonce = 6c6ebacce80dde9fefb7e5bb47 +Adata = 93f0fca0c8c84d5cc48160b25e246226d489225c0f8275e52856da592c715aa6 +Payload = 46820aec46ebd0d61706129584058a1498514928a87fe620 +CT = 00f6cccf45f046da1e6266afe61eed61c60c28515b2e1ab386b2c952055899184f0d95ffe3959f89 + +Count = 65 +Nonce = b94bc20d8c9abca7645fc6bebf +Adata = e1c083c93663f5a066ef337a61aa3fddde7c301a42463137c375cc2dcdd76954 +Payload = f1fca581d3dbbc61060c0c02adb47bc57954d25a283f66d6 +CT = 90c65d23e0e1786cebb95f9b1306d001b2e503842cdedb75e37a53d77b9e38605febdd7b2b666f98 + +Count = 66 +Nonce = a4974791d417d7e9eea0f4ae8d +Adata = 33602f308f3a0f7e1c75fc1e4321d545ffa278234958dbadd37f59a0f85349c3 +Payload = 41712c058d2d56b43b2c79278e790858a289320746c15a60 +CT = aab5656a1ef060c9b1ef7e2f3cc0bda40ff067900401182563ceb824708a20724c99c83f1caacd70 + +Count = 67 +Nonce = 6003b771afe4e99e1ef1ed4a31 +Adata = f60d8362b2ebf523681bb051fd3ee13919ad86acd963c703c4178a5f01a84236 +Payload = b766022311c5e1d74a607fec7cb8ee805b8397a6c5f374c1 +CT = f73b2a6dbf8f798d4bfb489a6578c9c79152e42aa3b81b64a84e7af3116a18f7ce44ae93f420270b + +Count = 68 +Nonce = 27861168ac731a223dc35c03e8 +Adata = b7ba1c66282cb6092ba601407ff9578afdadf7ba7a4d08edef06dbbfd87171bf +Payload = 0822e3e6ba982091d532cd5271fbde25305d1f6e71880f81 +CT = 5ab3e5296cd1f08704c82f6b42939702515b7733853d723d4009312bdae46958d844eca502bcb005 + +Count = 69 +Nonce = ef284d1ddf35d1d23de6a2f84b +Adata = 0b90b3a087b9a4d3267bc57c470695ef7cf658353f2f680ee00ccc32c2ba0bdc +Payload = bf35ddbad5e059169468ae8537f00ec790cc038b9ed0a5d7 +CT = b702ad593b4169fd7011f0288e4e62620543095186b32c122389523b5ccc33c6b41b139108a99442 diff --git a/lib/crypto/test/crypto_SUITE_data/VPT128.rsp b/lib/crypto/test/crypto_SUITE_data/VPT128.rsp new file mode 100644 index 0000000000..f79db90b4d --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VPT128.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 128 +# Generated on Tue Mar 15 08:09:24 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = 2ebf60f0969013a54a3dedb19d20f6c8 +Nonce = 1de8c5e21f9db33123ff870add + +Count = 0 +Adata = e1de6c6119d7db471136285d10b47a450221b16978569190ef6a22b055295603 +Payload = 00 +CT = 0ead29ef205fbb86d11abe5ed704b880 + +Count = 1 +Adata = 98d477b7ef0e4ded679b0bc8d880f09823ad80e9732fde59c3a87da6a1fcf70b +Payload = 00 +CT = 5b85d144bb51d4927074d3536a2db83a + +Count = 2 +Adata = 28f32de10b6c9d3c3f46efec7aee24006208a54c4d1c2bba4b8cdce166cab7d9 +Payload = 00 +CT = 01045de4a09486eea5efa33ecc6cd299 + +Count = 3 +Adata = af397a8b8dd73ab702ce8e53aa9f0189995c6c9e920dcb75795149550b499deb +Payload = 00 +CT = dfd75400b59c3ad387bc86dfbbfb52ac + +Count = 4 +Adata = 3fa956bfaa27e249bf0a1276468d808259f3b8e2687851d780885d44cc2f04bd +Payload = 00 +CT = 2b11d2549b4e2f0a81c07ee90af4d081 + +Count = 5 +Adata = babbd1b44cae3af06e0150bf0e3d898f6fe862b71ea9f6b727accfc18848fc79 +Payload = 00 +CT = 10f76ab445f4ec158ccc1f7c6fee3ede + +Count = 6 +Adata = 7fba0bfda3b03c736c121cf9a257db55060b621be5168619ec4182f13ef6a408 +Payload = 00 +CT = 59e02d6a6aa3fb2692b04e65a0e735da + +Count = 7 +Adata = 057354a29808f4ed77671ed3dc36f8b03f5cd952caac5cb80dc3b319f3333e29 +Payload = 00 +CT = 367a2ade4087964dcb0ca2984d44657e + +Count = 8 +Adata = ec08b618602d091e9304715cb552b357c16fd1d7f7f023a28d84a98ba21ca0ab +Payload = 00 +CT = 47cb92cd40bc89328d4dd44fbd727032 + +Count = 9 +Adata = 45622834ea658b09b17f32777d18b34b387ef957bd344468f68e7178417a7c24 +Payload = 00 +CT = f5185afb8359b5ef995483c0bc4192c3 + +[Plen = 1] + +Key = 6ae7a8e907b8720f4b0d5507c1d0dc41 +Nonce = 7f18ad442e536a0159e7aa8c0f + +Count = 10 +Adata = 9c9b0f11e020c6512a63dfa1a5ec8df8bd8e2ad83cf87b80b38635621c5dc0d7 +Payload = 0e +CT = 4c201784bdab19e255787fecd02000c49d + +Count = 11 +Adata = 73616a428f1a567b2e9af86b1fc8aec6d597b1b55f2aa2219b3b662fa6bd3407 +Payload = 30 +CT = 72f14519f06b63fac3d5b2d9bbfa0cb758 + +Count = 12 +Adata = 6d62f4e15e8bcc9ba4993bc50a046737121016f0d15020b90068250551167b1c +Payload = 34 +CT = 7676b581a28ca0a0ba5178eba7fe028da6 + +Count = 13 +Adata = 8f0b8289a1834ecc2167b59ce3c9d3b58465c4cfaad50c728d04360cb7e5bc41 +Payload = ec +CT = aed99b805c0a4785ff2913cab3e50f6205 + +Count = 14 +Adata = 477b2a6932f838f0d1bc420c0ca306981d8e2dab945b6f259e15fe888667220a +Payload = ec +CT = aeb50e41cd7af84a8fdb6aee144e904616 + +Count = 15 +Adata = d6518d409b1f05708d0b44f18fb5721f20f3220f8d2f2718650aa9932e4579e0 +Payload = d1 +CT = 9312639c863974f077fe8236c943b464c4 + +Count = 16 +Adata = 865e7cde73b558e9bfd05356923f8a697970811fc484acad2d5b3528baf1f986 +Payload = 24 +CT = 66d7265cde50bc7a3989458437baf06db5 + +Count = 17 +Adata = f0c3c67a935eace53ed32435655dd0974fafe283622e8294a15d70977398eae2 +Payload = c5 +CT = 87063144b25d2268063815d1b42ebbac34 + +Count = 18 +Adata = 341e71b2ef26e9db03882e06d06cde2c0617326cd157d5984d22f6f3407a9c39 +Payload = 34 +CT = 767da45c10d0d6498716bcf3f13ca7e26c + +Count = 19 +Adata = 31fce6735ba9a3385df11c153179b8e4141a3c6b8ad6eceaa211f3f17bfd0474 +Payload = 7d +CT = 3fcb0a6f562974cfb3fb7c8d5cafd50f2b + +[Plen = 2] + +Key = 3d746ae6cac5cefd01f021c0bbf4bc3c +Nonce = 597b3614ff9cd567afd1aad4e5 + +Count = 20 +Adata = 90446190e1ff5e48e8a09d692b217de3ad0ab4a670e7f1b437f9c07a902cad60 +Payload = 4360 +CT = e38fdb77c1f8bbac2903a2ec7bc0f9c5654d + +Count = 21 +Adata = 6bc3d30925c67371573271f1a4273ad76e91e07dfab65f7bce0b241b5e4cd00e +Payload = 17c6 +CT = b72955210d62e1393e4fda647c2b2e59a47d + +Count = 22 +Adata = d1bb4cdfc3f2c16d92576068543692aa4b5a427d688387af0f1583e91a0e8b3c +Payload = 6575 +CT = c59ad54fd88a47b9f6e39cb4606af86d13e8 + +Count = 23 +Adata = ae6136df9ab43631ef143515dacedbe759b3459e951bfaf4712a21c86352f1c0 +Payload = b1dd +CT = 11326de841af64b55bb7ebe3fd30ba493c7d + +Count = 24 +Adata = ffead34ac26e21158212d07c367c3a7cb6b795887ee2d3d8ae25c60556ea88d3 +Payload = cd16 +CT = 6df93a206339de534271f6469edfa5ed07d3 + +Count = 25 +Adata = e768e7d867820d46c1cc62ee0e51d4dac6f5c4b5785b5ccfbf05236871bdce2a +Payload = 12f5 +CT = b21aa8f65144f2ec5809e2ccb38c8760f7bc + +Count = 26 +Adata = 402e802885e4119df17fe85f141c3d1af7727fcdb00f8e2c34e42a436d04ac5b +Payload = 39c0 +CT = 992f9af825957abe7d89e175b6e8c0b84b5f + +Count = 27 +Adata = 8a3a622b3d347c0c5210d484adf77fa33205ba02224ddceea71d89c9ad8429ae +Payload = 912f +CT = 31c025d6a12e91e84e355934547f6b5dceb8 + +Count = 28 +Adata = 636114e5e5f83cec94e1df21d6babb9f6a14a532fcbfc3bcf649fbd79ac1abbb +Payload = cb6d +CT = 6b826db959a21e9e4ebf25ca4f98501b560d + +Count = 29 +Adata = 04e84f9156998c2eca9e96079a6001f2947dc49a081b3d75e47d75f71ed4a606 +Payload = 5bd2 +CT = fb3d2006ff22ff231a6646ae561923818a21 + +[Plen = 3] + +Key = 3e4fa1c6f8b00f1296956735ee86e310 +Nonce = c6a170936568651020edfe15df + +Count = 30 +Adata = 00d57896da2435a4271afb9c98f61a650e63a4955357c47d073c5165dd4ea318 +Payload = 3a6734 +CT = 384be657bfc5f385b179be7333eb3f57df546b + +Count = 31 +Adata = 50f6e6dd57bd3a24f6bfdc8b1c7b5a36ebdd07fd6d194e6e82da47151d9c88fb +Payload = 4ffad3 +CT = 4dd601b8ca97bda492546d82dccdebef441f8b + +Count = 32 +Adata = 70e132023acae1f88c7a237b68f5bdce56bcfc92be9f403d95d3bcc93b4477a9 +Payload = 8a594b +CT = 887599fa0f3e397d9a580aa39c7028e1a508c9 + +Count = 33 +Adata = 08d2b011f36e05dc728c1a8bda3d92c779a3d2f27c4b041810bd6222c852b14d +Payload = 1f89df +CT = 1da50d593460d335e2f7a6d40b8fe305b0f690 + +Count = 34 +Adata = b207eb870aeeab27c6201ef04650bdc7ea30028a243420f7d198f1c9c9a43023 +Payload = 72e9c1 +CT = 70c513a2d49e1a113767ea4219107819d88b65 + +Count = 35 +Adata = 74294088721fc9e7aabd5f1c66b5369b1e2d2cdb3e73abaa28ecd1c37d4ecea2 +Payload = 016083 +CT = 034c51dab1c819778be8453db163c882063af8 + +Count = 36 +Adata = abbd347999a1c26368cdb17ab08bf57a8e942d1248296e952f5f42f2cabbf0e6 +Payload = 25f665 +CT = 27dab7537eb435df8d0e48c3f7e0bd1877c866 + +Count = 37 +Adata = 231b33dc406c9210f59a5df1cfd595c803474db34b9b1848f0bcbe7b28df33c2 +Payload = 158606 +CT = 17aad4da549fc63d55b5910bbbf64435b95220 + +Count = 38 +Adata = 69b851e63a78baef90637978e3dfe8c47be4b21e85bb89bf67051cf251004376 +Payload = b07452 +CT = b25880d5ee29fb2af47f8040fad585921057f5 + +Count = 39 +Adata = 9b1f786c887d310b8efd3e8192fe504f603024c94aaa4ec9123736a40bf1605d +Payload = 65187c +CT = 6734aebc3ee43e10205f83143e0d3794a6734c + +[Plen = 4] + +Key = 7ccbb8557f6e08f436d0957d4bbe7fdf +Nonce = bb8e2ef2ed9484f9021cda7073 + +Count = 40 +Adata = fba1d18a74a3bb38671ab2842ffaa434cd572a0b45320e4145930b3008d8d350 +Payload = 4cabeb02 +CT = 32501f4235c4dd96e83d5ab4c3c31c523453c317 + +Count = 41 +Adata = 78b3faecb2bdf6ed14ac2b86ded07aa791b60f5d54f9e24a965a8453f5131898 +Payload = 5ff73653 +CT = 210cc2137907d6a03e66403a7d9330d30d934a8d + +Count = 42 +Adata = db1239528eb464dd063e2a97ee83a87d6002ebb4fbafa77036f72c14f3fe959b +Payload = 062fa9ca +CT = 78d45d8a44f4bc78fbb969935076134437df82b4 + +Count = 43 +Adata = 0071f1edb3a0ce57af3c88bb0ccf138f752697a77e55695838fb39de04c78dfb +Payload = cad710b4 +CT = b42ce4f459692911fea2e0034d06c3b2e89af3d1 + +Count = 44 +Adata = 7381471a62b1fa6f5061c4c37e9721f07099d007ffaf8639aa2ae3f82da5a559 +Payload = 7ac716b4 +CT = 043ce2f468484e22381923bfcaed16e0cb85b0f8 + +Count = 45 +Adata = 19bea6d92d5892216e8e4a30dda802387800bb046a6717817fc46c7edafe17b0 +Payload = 362da02c +CT = 48d6546cd081de39c247df309c4b56c31c03690d + +Count = 46 +Adata = 8503c8eb9cebc6110f259e35e03a0740267768130ce6f61b1c7d1d25be942274 +Payload = de52b209 +CT = a0a94649c6c6bd7b3a9d7c4dfa2738847ea3cb33 + +Count = 47 +Adata = d2445db6efecaa3f426b06de8d496ceed54a1d0171384cc762e21b31e265c6d5 +Payload = 8fe8b383 +CT = f11347c32ca874d18d0b790856837555f4d4699a + +Count = 48 +Adata = 8cda7d1e135cf5fde1ec9473c4b42c1bbb445c27fd87b5f73df61ceb2d0b6f75 +Payload = d8d6b2c9 +CT = a62d4689932c2f8d78e322aaffc90846025190f1 + +Count = 49 +Adata = b506a6ba900c1147c806775324b36eb376aa01d4c3eef6f5a4c25393ecbf2025 +Payload = 6a029e53 +CT = 14f96a13c346a4084918081b4bbe53b50d896788 + +[Plen = 5] + +Key = 3725c7905bfaca415908c617b78f8dee +Nonce = c98ec4473e051a4d4ac56fd082 + +Count = 50 +Adata = 11bc87f1c2d2076ba47c5cb530dd6c2a224f7a0f7f554e23d7d29077c7787680 +Payload = f5499a7082 +CT = e378b776242066751af249d521c6eaebdff40b2642 + +Count = 51 +Adata = d54219ef4fb851bebd1c546011ae3922b8337e19c28d4d58428efd66f80edcf0 +Payload = 513c46fcce +CT = 470d6bfa68e7258df363e0e9af67a543c86db3c994 + +Count = 52 +Adata = a92e88edd297da8c7089e21822b3e6cffd6837c78b975c8413fd6cca1b99bcb0 +Payload = 9d62e557c3 +CT = 8b53c8516572b7573e5b27a1d0e15cdb7b06c8857f + +Count = 53 +Adata = 77d9c306aa257379053cf1f2043c388a301dac2a9e2bb89eb8bab6eb3f150fe3 +Payload = 7a05db235f +CT = 6c34f625f9de691a412ad54bbdb6ceac45ed45902b + +Count = 54 +Adata = 081568ae0b948aa647b9d4dda5d42641ad5de72aa9874d8d0717d872007720a8 +Payload = 30a22ca0fc +CT = 269301a65a8a1bb8ba3d6763dcb1bdd3400e3459f7 + +Count = 55 +Adata = 695ba4dea0f84baf190ec25a25fc00cb9898902d7a17e6f5ff2df323b974f7c4 +Payload = 35e25aa51f +CT = 23d377a3b9403897d496cabcd5bd9de3282199a8ed + +Count = 56 +Adata = 1f3ba0336a634efdd11f8168c0fe25039f9403bfa70b3898f4dbe577dbd52957 +Payload = 8bde704c74 +CT = 9def5d4ad270a81f7cb0ab7ab2b495f51d66abeee5 + +Count = 57 +Adata = 097b9ebff3ff93a143678d59721fdf359e95cbc82585ae47727a773317925d38 +Payload = 428542ecfb +CT = 54b46fea5dce68e9b01a4462a2221bd2f3cadf64c0 + +Count = 58 +Adata = 76d0341dd44c39e43a23dbcf4cb602f15d5fb9fee20c3d0d262d539c3fd1dfd5 +Payload = bd6866ded0 +CT = ab594bd876f2545964ef3978cad3387d61104bab84 + +Count = 59 +Adata = 7e7c40ad64b511005b4546f9ec61ca24829390fbc4bd8507225bc348ae0807d7 +Payload = 5822755a3e +CT = 4e13585c98002c41938a935d51905b2a708a2c5194 + +[Plen = 6] + +Key = 80bead98a05d1bb173cd4fca463b8fa3 +Nonce = 8a14a6d255aa4032ebff37a3d7 + +Count = 60 +Adata = bb4e706e73d21df66f64173859d47e247527cd9832e20dccff8548ed5f554108 +Payload = e479990bf082 +CT = 89c9246238878427f36b1f6c633e4542f32b50ca8edb + +Count = 61 +Adata = 9db2182c8a4f5471082bfa1a8496602cbcdef2790f7e8f71f791303bd48dcb05 +Payload = 017a7fd1aecb +CT = 6ccac2b866ced76fe54da69af5edf8309c7f013bb07e + +Count = 62 +Adata = bf483f59fb73681f27b68168c998c90ea8ceea997654c6fab2bd737dcdc884f9 +Payload = 512fc5e4973a +CT = 3c9f788d5f3f662f53d17f7cb6673415bb2324ca0666 + +Count = 63 +Adata = b91e641d8210e1ef705fec2beb9f58a391c7d1a38935cd1d13f2c00363388ff5 +Payload = 06212e989616 +CT = 6b9193f15e1340c86156b1065b64af1e4d6c89b32603 + +Count = 64 +Adata = 5cebf908e232d797fcce8453c4c3000868d4172622a4ee0d6a1bdd876a0b7c96 +Payload = c45629069ebc +CT = a9e6946f56b9c07ef5349903b928e39e99e2e32625de + +Count = 65 +Adata = ab92cbc97f3aa6f9ea4dae5d8c3d9e91231f43ffff548da7b668e61c183ac2cf +Payload = b949ced37725 +CT = d4f973babf205e40654ea16e83cc6faeaad668c416f3 + +Count = 66 +Adata = 2c3d2f9c7e89c2b9e07317c4db6e9f00f5faadfad531c5bea79d164ac24d4543 +Payload = 517ff7b383b7 +CT = 3ccf4ada4bb23102a502dbba0c280e1d5fc627fe3a9e + +Count = 67 +Adata = d798e77ab0f3697768f23014fd31b9e8762ae65b6aa8a4bbc17ecb8cbe78461f +Payload = b40d863ca4ff +CT = d9bd3b556cfa6745fd4c954396e696697731e1f9a262 + +Count = 68 +Adata = 45b44e3dec57e24d960fd1767797ffdbbab81e38bab37e6974df262c3d932327 +Payload = 56e00289a003 +CT = 3b50bfe06806bdf2b2dd47077c98234eae5d47c3b594 + +Count = 69 +Adata = 645d27970ccce096d082fccfc1183955bad2611af0dd7c58c9d54430f28bd992 +Payload = aa22bb1de579 +CT = c79206742d7cea66649ad7e204a344d3234125aa324b + +[Plen = 7] + +Key = dc8ec91184ba18eae31ac2d3b252673f +Nonce = 0da4c988f521f5648259f2bec2 + +Count = 70 +Adata = 6d5573c9279897d7d1602d8a95c04bb5ca3fad2dbe89a024b3651eb227e73bb5 +Payload = 2a5775986551c8 +CT = 4f259f2a718faea852a7c4358dfa9f5467357638acac90 + +Count = 71 +Adata = ff0ab5021ef466e2e898b0993d691145168be558682c74914c172f2b5e863754 +Payload = 8db3c1ca0580f9 +CT = e8c12b78115e9f8767c76e707d48a2144e090812e0192d + +Count = 72 +Adata = 2ee03cc28f79773af139c4ea55ec4daa48bb2885b8adcd5f066eceda5c4ec27b +Payload = 3c69e2e83236b6 +CT = 591b085a26e8d05486df740083c959fb62ef7e2e221602 + +Count = 73 +Adata = f041504d4c1b3d5be358bd6d350af42921205d29ab22b44ffe221358adef5bb4 +Payload = 777828ab5ccb68 +CT = 120ac21948150ebdc4d2b86b2528f75db4a7f5423f4395 + +Count = 74 +Adata = 81ea116832d69542ac8d3d22c16c82eecf2ccac39264dd933c4f9c13c8d0f1d4 +Payload = af556fef3584e3 +CT = ca27855d215a85a7b06d1b710baa15daef19069ecf46f0 + +Count = 75 +Adata = 8a0a120ed290a62456f002da1c250a0ddb1ebd57185a733d8fb562aad482679d +Payload = 98f26635351f14 +CT = fd808c8721c1723811129add52e1406d50cbff4aa82802 + +Count = 76 +Adata = 12b5a76faedf6f855e328c2cb87be8aea78c5e926b32d828e167b46205c86de5 +Payload = bd22c1ec05dc26 +CT = d8502b5e1102401563d3da8a6cabb7515f642e42fb4b2e + +Count = 77 +Adata = 8dc32f35ef4bcbfd040ad25dc36d0bd2486f93d0cabb7704cd1582dc99f65449 +Payload = 2a87c0d64806fe +CT = 4ff52a645cd89817609a21f703253e5e56beef4ac71759 + +Count = 78 +Adata = 83ced632359a11eb0c4c99baad84df5cac15bc5453b6593d9ffb4c5e8c84037f +Payload = f05f39eb0a3d64 +CT = 952dd3591ee302236c72f98da859b54be7c598d85c37eb + +Count = 79 +Adata = 771a818a24e7da7b98f4b4291ef34bec7e1656b0c6c6e9474a989a04ea7de385 +Payload = 59dad755af92c2 +CT = 3ca83de7bb4ca464c8cd38cbcc46e7f09bf3e1c6590c71 + +[Plen = 8] + +Key = 19f97ef5318b8005fc7133fa31dd1236 +Nonce = 01ce9814c6329dbee1d02b1321 + +Count = 80 +Adata = 85853f120981f33cf1d50fde6b8bc865fe988a9f12579acdb336f9f992b08b89 +Payload = 6d972a673fbe1ca1 +CT = 2f12a7e7acecae5d2563309efc19368cdee8266538ca89d3 + +Count = 81 +Adata = a4ec5aee89e2cce2115b6c1f42570bc5062887cad08192a682d0b4508fcd936a +Payload = 68b1b6367a15fe49 +CT = 2a343bb6e9474cb528096a5fec5e5359c369833eac3b7efb + +Count = 82 +Adata = f5499a7082bf1e6e2923211271f5f7f6d7c7b26db7963071705a58ddc4dca0dd +Payload = 707023615563a40e +CT = 32f5aee1c63116f2754a65863efb60c98dbb536e2b5a69d8 + +Count = 83 +Adata = 765f267befe6fcfaaa4b46eda32e7bfab87f12ceb07fa3b37be74965bb664a21 +Payload = b56454bc50df3e28 +CT = f7e1d93cc38d8cd40b6e9b7f3b3541ffee66a1f668f67d28 + +Count = 84 +Adata = 9ce65598cd1f86afc9aaaf172809570cc306333c25523f863c6d0e0154c55e40 +Payload = 962f765da3565bde +CT = d4aafbdd3004e9227018c9db8baf6be349d93d4eef7d7c9d + +Count = 85 +Adata = d0125e30c36232a8c07cee9abc53453b276849a7c04ade80ad586ed8cbcede51 +Payload = 4f18bcc8ee0bbb80 +CT = 0d9d31487d59097c501b28887f05fd66f050525943d101f8 + +Count = 86 +Adata = 90dfd9e7bb7bf8fb70c22a879ffa760d14cda7b79ce4968f69b8a7f2b7a59642 +Payload = ca293c9e1780b401 +CT = 88acb11e84d206fdda53dde2e1aef96b3658a7635ee54188 + +Count = 87 +Adata = 58f518710e6b282482a7f1950fa353b13bdda10c9aaea6d5f0d7ea0a965d31e8 +Payload = b9df9fb4a6b299b4 +CT = fb5a123435e02b48b62a5ec234f1efd1b52c8fad1cf09890 + +Count = 88 +Adata = df052e95aea3769a433ce4e4e800b8418649bbe8c6297eb07545e6802de7e807 +Payload = fb2441d1594a488a +CT = b9a1cc51ca18fa76bc051ede6f37cf67543a7252d7d9b203 + +Count = 89 +Adata = 0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c +Payload = 451101250ec6f266 +CT = 07948ca59d94409a5be4be6bc6b18104fac167b6e3fc15f7 + +[Plen = 9] + +Key = c17944bfaeeb808eed66ae7242ab545f +Nonce = 910b3db64df3728ca98219e01b + +Count = 90 +Adata = edf64f98b3ab593cbcf68ab37a8c9472e49cb849d4a744deae925a5a43faf262 +Payload = 7caae2640e734539d3 +CT = 0dae8b3ccf0b439f6ff8ee4a233dfb7753f6bfe321b3e26959 + +Count = 91 +Adata = 29ac8fd6a20a5df4ec79660c44d373da42de7d7c5fc35982b6c29b480723b484 +Payload = e574b3a37af3bf2251 +CT = 9470dafbbb8bb984ed63b1477d9506a51ae23abbac179d8b02 + +Count = 92 +Adata = 9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385 +Payload = 2e3cf0af8c96c7b227 +CT = 5f3899f74deec1149bdb0986198bce2e486581c041029a81d9 + +Count = 93 +Adata = cc8e789462879e348d20be4e1161d7b7fc6f8371d8f8cb2d25d13f0e07de47b0 +Payload = 16f22817c5b79f9fa6 +CT = 67f6414f04cf99391a0cbb2df2079a6eb964c3469f4f326122 + +Count = 94 +Adata = c63061f2800228269015693336f78bb535ae8b88869e4ccf4ead2f3b0ea4e48a +Payload = 64fe8076d4e8538e18 +CT = 15fae92e15905528a4a40ca7622acf7266b7c24cf0c3202e4c + +Count = 95 +Adata = 71c14a7031033db15bfe23b75fed9daf8886dd11392a0b787660e7b1a581af11 +Payload = 4814aaac48bdf43c92 +CT = 3910c3f489c5f29a2e7de20e98586cd5d684bf015a7abbe82c + +Count = 96 +Adata = 8f4947f8588ed866ed7477d7f1a28046430c6470806a50e3c9e80958c61f1b42 +Payload = 392a692b57a8a97f60 +CT = 482e007396d0afd9dc8d503f5d87818f7c0e173b857cef4288 + +Count = 97 +Adata = 9d44f6df58c2b43db67e3daa95b176c81daff32e996d670e86405e15eae72e93 +Payload = cba1e00e345b0cb7eb +CT = baa58956f5230a1157c85e2283d9e80700268a6459d1451d00 + +Count = 98 +Adata = b6ada12f7a28211e9d2c07cbb3d39fa77aadc077b34c46f93006c1ca2ff66f87 +Payload = 22f5b6752582919dc1 +CT = 53f1df2de4fa973b7d1056aea3d3e4f7a5219170aaa52465e1 + +Count = 99 +Adata = d6411fd5b25433f67ca75e4560ceb809d3721266beec358dde126b2f6a514137 +Payload = 6e1b55d6f5288c5451 +CT = 1f1f3c8e34508af2edfbfcf8200a8a3f8d995f50284a7280c8 + +[Plen = 10] + +Key = 0fb9df6f638847f5de371f003dd938f4 +Nonce = c9ddf61c052f3502ad6b229819 + +Count = 100 +Adata = 4f9938d5bc3dcbe47f6b256d5e99723d0891e50c6175aba41b011e4686113c49 +Payload = e10cc36bc1c5d3c646ab +CT = 7f797367de50be6dc04e4cf0d8c24189affd35060cb7ca3dd136 + +Count = 101 +Adata = e013a2edd5b86bab8df5c9940d0a0c864478c1ad42668304a643141855adac10 +Payload = 15841284c959febe63f9 +CT = 8bf1a288d6cc9315e51c4148ef85caab151488c1a6b3df540d21 + +Count = 102 +Adata = 147d77d509f642189594df17574a0ce62b52a838feb62310e11533995ba4c851 +Payload = a8b4e5829069c335d1d8 +CT = 36c1558e8ffcae9e573ddaaa1e7c22b3efa8362abb3d31ee8884 + +Count = 103 +Adata = 0bb09658e23fe8a08c01a6994ef36cb8dcc9a806297a09c67efe3558ca56bb5d +Payload = 1bb2da0f1ae7e044deb0 +CT = 85c76a0305728def5855317b141383ad38dd78569d5f846f2520 + +Count = 104 +Adata = 34eb2e6149bad764837f6f25ddd96865e5b05d5cbf233c4f6cc2aa654dfea3b7 +Payload = 63af538196add9b3fad2 +CT = fddae38d8938b4187c374e6432971aecf6bf7cf5244d21f7f173 + +Count = 105 +Adata = b69f26fda6d1cd92897e03758cae020c4e1beb019ce5ad987f872940780a9468 +Payload = 6ef2df5a1688ae795537 +CT = f0876f56091dc3d2d3d2e4d0ffc0f0add38a80c7ffe6b4701e54 + +Count = 106 +Adata = a7375ba32251af0138bd9fd8fcd56a7c43ab2ca9a7fc0117d25f6d4ef9c2fcbc +Payload = 3f46c83021069ac488a1 +CT = a133783c3e93f76f0e4447fdd0b2f29f39094ba5a7375e278349 + +Count = 107 +Adata = f9b91f7298b4e43843fc739a2f41c57c3f2cf36378fe4c34b574a43f9cedee7b +Payload = 86c10a6dfdd6a06ef638 +CT = 18b4ba61e243cdc570dd57500f913ee3f46801e1bba9d4db7ecf + +Count = 108 +Adata = 9d35876d9449a1642b5062dfbfc7a26a7ac080b7198f4aeff2c79e463565cfd2 +Payload = 196c80d02b663bdd89fd +CT = 871930dc34f356760f1856a6b87519b4807a2114ced587f72189 + +Count = 109 +Adata = f2d5e927eb507f889efc6f21d783851f638f978c74960cc347f89f2703476114 +Payload = bd27ae3ade0781a33d5f +CT = 23521e36c192ec08bbba2101012808adefe9b8166e04685bd537 + +[Plen = 11] + +Key = 006ff7d3153caf906ec7929f5aef9276 +Nonce = 57db1541a185bd9cdc34d62025 + +Count = 110 +Adata = 7d9681cac38e778fba11f4464f69ed9ebfea31b7ffcaf2925b3381c65d975974 +Payload = 31be1b241cae79c54c2446 +CT = 9dd8a4244fbdb30b624578a625c43233476bbb959acd9edebe2883 + +Count = 111 +Adata = 1b0012c468009bd2851653013782c7b71ef43c393afd4dc0aec4d6d0c3fa11c5 +Payload = 8802831e22092b30110cf7 +CT = 24643c1e711ae1fe3f6dc9d477ca066ec2befa854a1faef018ea8b + +Count = 112 +Adata = 48b216375c00ca7e9c4048834b37944d2543e24fa091fb3c7290e11c53a6b6a0 +Payload = 3b3f782d637319d7fd161d +CT = 9759c72d3060d319d37723eb6be9a78dfbd9e16181679b782969ad + +Count = 113 +Adata = f3e06a45fcf1f6abeb00727bf2c9bcea00ce621d38f7b7eba17c27e51f04c793 +Payload = e98f5e5a20d02c80372d6d +CT = 45e9e15a73c3e64e194c533d9574d95b821a5170e9b61d8e6b2ff3 + +Count = 114 +Adata = b36e27729f9a139d8ec4f61215b7bf1149cbb4d93a5c14bebd7cfb7c6fe585cb +Payload = ceeed4fde3406ec40f7ac6 +CT = 62886bfdb053a40a211bf8aa193d257907be1330abaa56bc4f431a + +Count = 115 +Adata = 8886ed7fa414d74aef704a9751b197cbab02c41c6aedcaf65cda019dc2d2d815 +Payload = b38f03449883773135c0cd +CT = 1fe9bc44cb90bdff1ba1f31d92029a6428748664b5c815f15ca1b7 + +Count = 116 +Adata = 816d81af167d2294497d9b06a39fdf75e37cbacf4d10c3a444068c891b361bba +Payload = 8efb141db7b77c521003cf +CT = 229dab1de4a4b69c3e62f1386e4ad7c72ce0081a85d4cfd34254c7 + +Count = 117 +Adata = f427c47e10c45bb3c7e75e9e604503b3560427691470358efdef48ddaf3794d2 +Payload = 6dc38e37d1379732df4dd5 +CT = c1a5313782245dfcf12ceb98eeb05bc376a1042735569d5b63f8fa + +Count = 118 +Adata = f3df712b5e8dd8e4aa8b7c5f41e93bd11b0df66a3456a01f3d0094ad91482cdb +Payload = e0e358aff203369dd5960c +CT = 4c85e7afa110fc53fbf732065b03ebeb68a9153cb4ed152ce0d64c + +Count = 119 +Adata = 264f2c7b095a296eb8ff6b5151ab3d9497ea8dc0002a9e5b09c2fd0ccd32b6ff +Payload = 57b940550a383b40f3c308 +CT = fbdfff55592bf18edda236fcd16c8360a408e2787f930ed275bf3f + +[Plen = 12] + +Key = 026331e98aba9e8c23a9e8a91d0b0c97 +Nonce = bccfe69bba168b81cbdf7d018a + +Count = 120 +Adata = 26e011143a686a7224ddb8c5b1e5d31713fa22c386785e2c34f498ae56d07ed5 +Payload = a82200ef3a08c390dec5cbf9 +CT = adf4fc6f9be113066c09248fcb56a9c1a1c3bb16fbb9fbaedacdb12b + +Count = 121 +Adata = 97a720ae4720546e31263a1a538ce1d35c198c23bd4362e0023a67536328ab9a +Payload = 7fc58d1bb450b396b9161f53 +CT = 7a13719b15b963000bdaf025002120b619a391fbd23402e5edd4949e + +Count = 122 +Adata = aff6c8cefda055c67262e9c68825d1ad2a7488e5b09640a111fabf6254d96cc0 +Payload = e9ea182d7f895f312b9738db +CT = ec3ce4adde608fa7995bd7ad48b6e9a8de0099a28cebbf5c2bad42ff + +Count = 123 +Adata = 35a3963b43f47855ef3df12af5de3626e0c5c8d9cd2a534c737cd695609b05a9 +Payload = cfbc8bcbb5e5bb744bb1f340 +CT = ca6a774b140c6be2f97d1c36df80fd62e751757bb0a32a987980afe6 + +Count = 124 +Adata = 46a2e6bd3fd5336abf02eace3cd1e1f6dde505ab976a9fa596edd6fbde7175de +Payload = a334f8f41897cbcaeb5cffdf +CT = a6e20474b97e1b5c599010a93b211350c70adf9bab5c01081bdc6a99 + +Count = 125 +Adata = d110651c00ac5540f9d1ed9eb175e06b97163fc36d43f048565e5d0c30a069b1 +Payload = 3f781267290e8e73c6355e75 +CT = 3aaeeee788e75ee574f9b103d7f65690d9a2fb6759d658c9bdfdfc37 + +Count = 126 +Adata = 978644dc4e36f1d98a2a63e19bbf8af11785d09fce58a95c00cc6bf6cecf6161 +Payload = 3dc39dbb91efe8b16396d488 +CT = 3815613b30063827d15a3bfe0d5df472f49e7f713cd1373293810906 + +Count = 127 +Adata = 5ae7528c5e965880b1533cbd78c1e81a8187379327a2fc3f76ff45829049e183 +Payload = 6caa8c0764512baa39dabac0 +CT = 697c7087c5b8fb3c8b1655b64bfca9ef00b0f2bbb03c1a3f7a0862e7 + +Count = 128 +Adata = afe754828be6e3731d3eee54b021b4fa182247bd958e9074fb0094a11030f5e8 +Payload = b19bc92e2305883580dd7742 +CT = b44d35ae82ec58a332119834a03be1d1d262b03c0ab425d533fe4ec1 + +Count = 129 +Adata = 0650859c635654ca4d815963c0a99f9d2f47456ad37f739c425e924d4360bd7e +Payload = dab87e79544df1cc98096b91 +CT = df6e82f9f5a4215a2ac584e7da61ca8461925996880e2874393232d6 + +[Plen = 13] + +Key = d32088d50df9aba14d9022c870a0cb85 +Nonce = e16c69861efc206e85aab1255e + +Count = 130 +Adata = 0eff7d7bcceb873c3203a8df74f4e91b04bd607ec11202f96cfeb99f5bcdb7aa +Payload = 4b10788c1a03bca656f04f1f98 +CT = 89f15b1cb665a8851da03b874ca6f73242f2f227350c0277e4e72cdaa6 + +Count = 131 +Adata = a533b3279db530eaed425842b0d3528f5c5e4c16acfa0f49de43d6491f0060a9 +Payload = de6ea86d3641d916c4394fdd31 +CT = 1c8f8bfd9a27cd358f693b45e594271cc06f81d510075728cfeb89222c + +Count = 132 +Adata = 8e6c1cde142e18635c1b4f0cb54d3cf817f22ad7c25bf6a022501682f6a7da1c +Payload = 6f3b32adc8c0314872947f3d31 +CT = adda113d64a6256b39c40ba5e5ab1aefed75400a41447b2bd8f0605542 + +Count = 133 +Adata = 248a4389da2d51b87907dc11c46253515503ba80de5d06c9b505cb89906614a6 +Payload = 0cc992a8c736b44fedb4ad498f +CT = ce28b1386b50a06ca6e4d9d15b46b3a6463876f1a43a287748f339e913 + +Count = 134 +Adata = 2e2c8244a2cbf53816b59e413207fb75f9c5ce1af06e67d182d3250ea3283bcb +Payload = 98104fd3f3413ad1f57ef4912c +CT = 5af16c435f272ef2be2e8009f8f625786bdc58af24b17c1ba34fa87baa + +Count = 135 +Adata = 4ada86d88d5f49dfcde13fc30ba9a1af58d5254b47fb1885a20fad915c87952e +Payload = 3b4fec79d52d8b2a533917b75f +CT = f9aecfe9794b9f091869632f8bd4a918290cf97208232c76908514b07a + +Count = 136 +Adata = 9e3b23232e5a9e69747f8bcb148cd6d282fd9b7ecd6d97e8bb5cdc261b2fc86f +Payload = f10c19c76ae7ed55e1651155df +CT = 33ed3a57c681f976aa3565cd0b01d6306bb91c315bb4a23fe23d496d09 + +Count = 137 +Adata = ccea2c815ea4efadc3007f511d633e98f9fa38b0e0fb572b282ed6a610adf7a9 +Payload = fa34af376868d9a49aa200f59a +CT = 38d58ca7c40ecd87d1f2746d4e620d9d3004587c5d510e2a857fc857ea + +Count = 138 +Adata = f7277fb296e2c0d2c9ceb7013ea8b59fe37e26b3b42a0b8cd01aaaa8d35283d4 +Payload = abe2fd996bb6804ed3286c057d +CT = 6903de09c7d0946d9878189da982d2438a5138977bde5f514e2335c28c + +Count = 139 +Adata = 14dd1810df3eeee78ed3836c77edf510d91ea28f119bf57111e580d70da94b74 +Payload = 395ea6979b77dabd2042aee4ff +CT = fbbf85073711ce9e6b12da7c2b78100a05448fa6e74bd3ed16c3bd364e + +[Plen = 14] + +Key = 7301c907b9d2aaac355c5416ff25c59b +Nonce = 7304b65b6dab466273862c88b9 + +Count = 140 +Adata = 2c5d114eff62c527cc2e03c33c595a80fe609bfc0fe13ce3380efe05d85cceac +Payload = 484300aa3a506afcd313b49ead8d +CT = 928ca58b0d373dc50c52afac787ce8eeb5d5b493661259a9d91ea31a5f7e + +Count = 141 +Adata = d9ebc1cbfab9034317132a72e0f11c341331146a59e7a2f26bf4f3d778da52c4 +Payload = 8b318f75ed79a7978adc17c4d2d4 +CT = 51fe2a54da1ef0ae559d0cf60725552193439abfedda67d765d030cef30b + +Count = 142 +Adata = 9aea86b9fbd9bd4504ee2e25054942b33d3cdbd84215db7ea337e548cb706780 +Payload = 0256b0d154c768c85070da6ea8c7 +CT = d89915f063a03ff18f31c15c7d3615013c2bc9338868fad0d2fac11df019 + +Count = 143 +Adata = 08afe10bbfbd65b948a6561bbeaf3ab46a8e3d0a861f1cfc46584156197f30a3 +Payload = 89ed296a3ac03fbfb71422b92117 +CT = 53228c4b0da768866855398bf4e66c3c4cb8c50891d6523245e4c619aa99 + +Count = 144 +Adata = 7d653792bb8683e07c7d2c800db6f7f08343c85af2377115df4fc86ff7d8fcaa +Payload = 414b6acb1db479028f5cc8800f2b +CT = 9b84cfea2ad32e3b501dd3b2dada792d2cb93e45811a4c897ae9d907c9cf + +Count = 145 +Adata = 4d73c1484f9429eb15742f29ab05cbab6552abf40e127b93427d649d195ed25a +Payload = 163f67b3766c3c650ce26c5bd8b5 +CT = ccf0c292410b6b5cd3a377690d441983a87812eaa7b66c5a0e54a01cb882 + +Count = 146 +Adata = 2fba7a881f019a8745691343d79ef3656e25bb37b93fb5ab7311889f92010a5f +Payload = 9c5b4aa703c27d16d82013853e16 +CT = 4694ef8634a52a2f076108b7ebe7b0afabd23b33765a63753cad66b0e6db + +Count = 147 +Adata = a640343fd4a866aec07b667d25176e11a32fb4d8bfc08fde2c46dc9b492fa010 +Payload = 99eb86b3202c7ce68a2339065f47 +CT = 43242392174b2bdf556222348ab639b8d0f97540373a7b9061aa3b2f7044 + +Count = 148 +Adata = 9efd58d3ef5f74f663b2b5ca5e96c5a2fe85ca5eac1495d7f1751c7d8b412b3e +Payload = 3f5c1d038161e65c9ed955c961af +CT = e593b822b606b16541984efbb45e312c803e29f7be7c5eb236401037a320 + +Count = 149 +Adata = a7d7ba684c0903323f7efc83dc32815195df325394162fb5a18f201047be7999 +Payload = be8dea2b4e602a787ecd28f2f7f0 +CT = 64424f0a79077d41a18c33c02201fd929c717d75388387dc25bfcf90b707 + +[Plen = 15] + +Key = 38be46d271bf868c198052391f8a2147 +Nonce = 6758f67db9bfea5f0e0972e08b + +Count = 150 +Adata = c6de3be97f11d0e2ab85c9353b783f25b37366a78a2012cecf5b7a87138b3c86 +Payload = 61bd1385be92097e866550a55278f0 +CT = 7c9fa8d99b38f825315ece6a2613f55e902f296dcce870263ae50cda4fadae + +Count = 151 +Adata = 7c8cf9c650511f33af82e807e60336ec086bd2d9400a5f35652b8c3fcf968ead +Payload = 7e5e51301fa44a21f2734731ee3710 +CT = 637cea6c3a0ebb7a4548d9fe9a5c15cae8a9e4b606f5fbeac2b829b42a150a + +Count = 152 +Adata = 5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975 +Payload = 9cea3b061e5c402d48497ea4948d75 +CT = 81c8805a3bf6b176ff72e06be0e670f5419c6085e5434f056162cf80f6729d + +Count = 153 +Adata = 238d3c9d9de32f2040b1dd0dd040b921e456c3653263f4020cffdc552b948a46 +Payload = 20660408d6890aed84aa65dfe23032 +CT = 3d44bf54f323fbb63391fb10965b377fedcc743389a9d48e6b871dc0dd63b2 + +Count = 154 +Adata = 3b5d61ca21953fdd22280747dd4ae908a511750127875da84dfe7d0063a318c9 +Payload = 9ab83c81f2d2c896c6596660c3974d +CT = 879a87ddd77839cd7162f8afb7fc488137e0a856d3d911af9f420b68d8110d + +Count = 155 +Adata = 78c1751e86144a78285a30dc04f51742bd47e3d36b607bab48d91cddabfff4b7 +Payload = c1ec469aa9c73b677af225a9f5f6f8 +CT = dccefdc68c6dca3ccdc9bb66819dfd5644448fa8445b6cd185bdf9b3718033 + +Count = 156 +Adata = add33e9a1d7e91e2c160c1123537e3f7e3535881cb4aac1a80ecbe367379212c +Payload = 9df1d6b6debffdd316aeb27143508e +CT = 80d36deafb150c88a1952cbe373b8bbd38e4dc44f768cef0c51344e3a7f7b8 + +Count = 157 +Adata = df7736560b1a13aa8e536500ea6cdb9a6757309aadf25a6a9189055a309c3f8b +Payload = 19eef017100dc82f26ed0815c55c12 +CT = 04cc4b4b35a7397491d696dab137172e7f2ec918099898b843a34c385f2a57 + +Count = 158 +Adata = b40c8d22069b8a65cddb51c1ea3571160cacb19fd371552436b19c7122b28d08 +Payload = 2af5db43f2a5fe8b494b40661510bb +CT = 37d7601fd70f0fd0fe70dea9617bbe94c2709685b0827cc42f3a25b579db28 + +Count = 159 +Adata = 9de5559ea8ccc70f4375a436ce0b72551a75960ad5ed6a1949ee8f6c47548558 +Payload = 5de41a8ca8ed8011304fa9e9f36498 +CT = 40c6a1d08d47714a87743726870f9d63bf4b40ce7e672587816fdcda16efbe + +[Plen = 16] + +Key = 70010ed90e6186ecad41f0d3c7c42ff8 +Nonce = a5f4f4986e98472965f5abcc4b + +Count = 160 +Adata = 3fec0e5cc24d67139437cbc8112414fc8daccd1a94b49a4c76e2d39303547317 +Payload = be322f58efa7f8c68a635e0b9cce77f2 +CT = 8e4425ae573974f0f0693a188b525812eef08e3fb15f4227e0d989a4d587a8cf + +Count = 161 +Adata = b6fecd1edeb55a9a4148b1aefb716a1e162779a5ab2a682e4adce4479c527bd2 +Payload = 0e6118d0409751d36cb642504678535e +CT = 3e171226f809dde516bc264351e47cbedf7f186e8d3d7c21c549c41ebcc7f505 + +Count = 162 +Adata = 5c3933c30bf9d4841eff4000aaa1cb4d39cdf8ef1240e2aabbf9da95bdee5270 +Payload = 5c8a5fb36f860d00c21ae9e3f24097c4 +CT = 6cfc5545d7188136b8108df0e5dcb824810a68be1814f53c09aca4066527fef8 + +Count = 163 +Adata = 7ca7ef30d3ac08aa51a9e5d3d84e8b6bb7fdde921e72b98ad6a93ebf2efc6b04 +Payload = ebd1cb4b35257790c9806be476bd25a3 +CT = dba7c1bd8dbbfba6b38a0ff761210a43cc30245a6e64625c4f6531d7497fb144 + +Count = 164 +Adata = 90f1416768fca7dd48d01230dabf95f2f1a0c044bf2d755448aaf72316c8448c +Payload = 842b7e5f22d921b2b8ab3131684b7eff +CT = b45d74a99a47ad84c2a155227fd7511f10d85725dacc274034669acf7f34fed7 + +Count = 165 +Adata = adc5c36849283d57acb2bcbc0e12465cb7c1830cb4e314b9ce6e25acbd8d460c +Payload = f0c2cc5a1b4c4cbe839338fa0d7a3435 +CT = c0b4c6aca3d2c088f9995ce91ae61bd5f731b465eb59c4989e42020d86102a59 + +Count = 166 +Adata = 80a7a483d1dbcdf00ed02a700e93d8b87fa6ac5c7368d1e81bd1b32cd1621cd7 +Payload = 2c1a5f906f2ae0373cc25e3519df2ba4 +CT = 1c6c5566d7b46c0146c83a260e43044484bcd2775448447ed801b3b0ff071c19 + +Count = 167 +Adata = 13c02992992d2708250184a579c43bc29a3a8cf1e02dade4496cbd8b1214f97d +Payload = 1da5190517546f1ad852f64263e1f679 +CT = 2dd313f3afcae32ca2589251747dd99901d1919f1451ad16f115cde863f15303 + +Count = 168 +Adata = f6f18dfe093e4c0c3fbfa8a5b1f4a703c08addc2ab959741611a594b93d08bf7 +Payload = 13ccb08a580efea53dfba6a59626bbe2 +CT = 23baba7ce090729347f1c2b681ba9402ccae4f6ec07bf73d6f086cf09e2e14ed + +Count = 169 +Adata = 63708e12dfa14f192ec5ee5856dc3cf2403817d9628c31899b4613f65e1e61c2 +Payload = e0b5fbc6c2269d445a60273bf844892b +CT = d0c3f1307ab81172206a4328efd8a6cb2bad8bf67d32a855c3940ac908397a5f + +[Plen = 17] + +Key = 79eae5baddc5887bdf3031fd1d65085b +Nonce = 9da59614535d1fad35f2ece00f + +Count = 170 +Adata = 46603500af9e4e7a2f9545411a58b21a6efd21f2b5f315d02d964c09270145b3 +Payload = 001343e6191f5f1738e7d19d4eec2b9592 +CT = 2162e27bfbf1d00f2404754a254665fd9270f0edb415993588b2535e2e0e4fd086 + +Count = 171 +Adata = 278afebc604bb7d87bed3574a2c5053de17eb8ca7e18ddc7892f2c54b38104a8 +Payload = ba47d5bfb36f6150a100e36caa116405c4 +CT = 9b3674225181ee48bde347bbc1bb2a6dc4778e3c4a11f3f9dc42554d45796379ef + +Count = 172 +Adata = 3239b2ce4efe4f6a6255dc53347400a6446ed3280c65422386fab471ef09eed6 +Payload = 96eccb7f9b0e16c6883de0a381e4767f5a +CT = b79d6ae279e099de94de4474ea4e38175aab5540cc01d867f641c9b196fa159291 + +Count = 173 +Adata = e2a5488d5f7930ea4ce399f2a6c0810265f7c0dc52fe824d19a0fa0d9ffd55e6 +Payload = d68f5990da1a2fe39ed81af145ab834fa4 +CT = f7fef80d38f4a0fb823bbe262e01cd27a46366fbe302e142dcf6aa16337d98550f + +Count = 174 +Adata = 0071f1edb3a0ce57af3c88bb0ccf138f752697a77e55695838fb39de04c78dfb +Payload = cdd4d8b3d8f6e4742793b456cefc9e686d +CT = eca5792e3a186b6c3b701081a556d0006df88c07797267bf5a49b3d0f601a225ce + +Count = 175 +Adata = f5d6989587e463969d97aadabea9538511f8d109cc2d3cecf09ba7cc346aaea0 +Payload = e7d7fc60ae852b68102e01b506f9dab986 +CT = c6a65dfd4c6ba4700ccda5626d5394d1865c9fbf69d81cef238ac513562d4a0dd5 + +Count = 176 +Adata = e0b5fbc6c2269d445a60273bf844892b26fed03b82869edacd6dd7a63fd69e8d +Payload = be9f51abfbe2da5a56db0f9a31b67c9f83 +CT = 9feef036190c55424a38ab4d5a1c32f783e2c748c8c9e3190de095de8eb0650203 + +Count = 177 +Adata = e6bd0010c98e60b9af7cf905c58e0653bc425e2ccc809bd4f9cd7b1f95c18786 +Payload = 81b9c73029cea1936ef8755c80ba8d4093 +CT = a0c866adcb202e8b721bd18beb10c3289305cf563c5b4ba4ebd5bf107f2ad3555b + +Count = 178 +Adata = b1688cbc058816974694cd26c0f28ba9418e9912867fc8c5f4e7bd9c891a8d2e +Payload = 618dc26853ee339689467ffbc2a77be69e +CT = 40fc63f5b100bc8e95a5db2ca90d358e9e60dbbd8f46343c8442b03a472da4e23f + +Count = 179 +Adata = 469e004fee9878ed40621b41d04ec34af175f213d64d16e2f77d0bb2b6efe2e3 +Payload = 4f18bcc8ee0bbb80de30a9e08629323116 +CT = 6e691d550ce53498c2d30d37ed837c591643352e46995e8c1aee43dbdb26b46c30 + +[Plen = 18] + +Key = c14eda0f958465246fe6ab541e5dfd75 +Nonce = 32b63ca7e269223f80a56baaaa + +Count = 180 +Adata = 733f8e7670de3446016916510dfe722ce671570121d91331a64feb3d03f210e6 +Payload = 617868ae91f705c6b583b5fd7e1e4086a1bb +CT = b2dc1e548b3d3f225a34082f4391980a0788b4cc36852fd64a423fb8e872252b248e + +Count = 181 +Adata = b6ec659856866959ef6fd4e71ba930f0e3e5fd49d7465fd65f6813ab4ca1a770 +Payload = b8b342c49c28bffc2a1c457db0b537ad46bb +CT = 6b17343e86e28518c5abf8af8d3aef21e08895a66eb5b902bb23a1a8584249409fda + +Count = 182 +Adata = 89eb3636fff80230352a3582be5698e3401c9e0579d48f2680c6e5e24d99f74b +Payload = 37d694ba94d0af8df662134f20d142903839 +CT = e472e2408e1a956919d5ae9d1d5e9a1c9e0a7fa792fb7246218f7d56d5fa4a5476bd + +Count = 183 +Adata = 03434f3709e19a1e37edfcaabc215116763b71ab1c5e053dbdb599f86959f25d +Payload = 90e4c0550cb7b279ef61f9140b7d94b8003d +CT = 4340b6af167d889d00d644c636f24c34a60ea83dc3f0012ae6da32a15fd1684835ef + +Count = 184 +Adata = 0e2ddb65fcc72094ac388d53a1055c7e902285c4c3c33c13bb6fbb4f1956414a +Payload = 69b851e63a78baef90637978e3dfe8c47be4 +CT = ba1c271c20b2800b7fd4c4aade503048ddd7f09d38d3dba01995e36bd685c8ea3371 + +Count = 185 +Adata = a42b2538ee2fb5f6a85d4d00524b01ad3331f61c404069243f35f28e2c2d0a82 +Payload = b7dbf8382115199dd2a2d87938c6ae6c4241 +CT = 647f8ec23bdf23793d1565ab054976e0e472c89becf8d2bb935cb17f44b950df3ef5 + +Count = 186 +Adata = 09bc5c426dc1faa4d71f50908bd6f297ec8e754d4d20def005585b4bc1fa31da +Payload = d53698d719c51bf9eae346269c6a1da07162 +CT = 0692ee2d030f211d0554fbf4a1e5c52cd75196e28badf0202097e80561451796194d + +Count = 187 +Adata = 2ac87e59c2c86532cf165af3e8ff4871d730f5e742cccca38bbcdffff4472c93 +Payload = cfdb7363985aa01af6f8e8237dbfb7871eb3 +CT = 1c7f059982909afe194f55f140306f0bb880710d4d7f66660891ac655d6eca4a3f3e + +Count = 188 +Adata = 05d2fbc3d0ec81f52f31cb0c4bf960c2076867f6d9f0174ed9176e20177b2693 +Payload = 56fdf10dc0c1dfd10965b83938e557459c61 +CT = 855987f7da0be535e6d205eb056a8fc93a52f90ab18925fea6964490f364a975a473 + +Count = 189 +Adata = c2c3902cfe8622254b3787cc13e79c5a3c388c2357c29f1c1ab5539a10bfae5c +Payload = e7c9812eda2ed7dcfc80fc5fe0d43e1e5982 +CT = 346df7d4c0e4ed381337418ddd5be692ffb168a00e5e7a39b371024927d3ac98fe43 + +[Plen = 19] + +Key = c5e7147f56ba4530b8799ababeb82772 +Nonce = bdd38e173fb20b981659c597d6 + +Count = 190 +Adata = 3a069a2bfda44abbb0a82a97e5e9047258c803da2c66190d77149e0f010b3af9 +Payload = 2f3bf0b566440912a1e47a0c07f1cfd39cb440 +CT = bd6265dcba9e14c59e515e395dc60bd053345fa6d7568c738e3a7fdf142d8f2d1562c0 + +Count = 191 +Adata = 7709132415c94960025cc39c950ead208703a9d5a71e224fd022dc0a1817d0f4 +Payload = 7c880d787726c4ddeb2304b5d161b4a257298e +CT = eed19811abfcd90ad49620808b5670a198a991f22337efa5cb7db7240e7518b67ffbb1 + +Count = 192 +Adata = aad77595f87a27f2c7995fc7149317f4cbebcece8336db2068380070784a4283 +Payload = 08c43bbfa706512aa39e2bfa5c365aca11e22e +CT = 9a9daed67bdc4cfd9c2b0fcf06019ec9de623140bac6094528f02eeda093312fcf716f + +Count = 193 +Adata = bdb1b82ba864893c2ee8f7426c7b9a8460b00a50f164fc8f2ff2ae9cddab8657 +Payload = a531c0ed8840b2fcf08d76eca71036153b6e11 +CT = 37685584549aaf2bcf3852d9fd27f216f4ee0e0c041d86dd483c1d6da366e91bd826dd + +Count = 194 +Adata = 38b3b9f45041ceb743fc2655b409213fa081427e41c833a2321a09fbd566c80c +Payload = 177946b4dc3b0b825a505f097a0a203eb21c00 +CT = 8520d3dd00e1165565e57b3c203de43d7d9c1ffde45ca2a83dec2f930bb652a6fcdc5f + +Count = 195 +Adata = ec9d8edff25645520801b6e8d14a2fc3b193db70d5e5e878742de83154a578da +Payload = a2634ef20a2a418b2c3be64f0b5f79d7ea9b7b +CT = 303adb9bd6f05c5c138ec27a5168bdd4251b648b89aa22cd7d0170a975565cd3a33dc1 + +Count = 196 +Adata = 8f6c1de4efdc5ac2d6e5452b5b4f58416d618da672f521332fd297ede8350134 +Payload = 40e52edaad5acf2d4eedfb3f9ac2908112e9b1 +CT = d2bcbbb37180d2fa7158df0ac0f55482dd69aed960b33c3df5cd38a82980dc0950ada4 + +Count = 197 +Adata = b0f1dc85fe223bcf29cdfa9319866bacd0a0a79c554e24d1f10889279e31c0af +Payload = bf97780f498c23adcf1c49f60873780a235969 +CT = 2dceed6695563e7af0a96dc35244bc09ecd97638fa273c4102b5ca050b23044ac2064f + +Count = 198 +Adata = 7d02a323aa769a8201549bf48a520d940bf6f69ed6106f1ce68856c22a594216 +Payload = 58bfe1eb2d38d91f80b3467db94fdcb84ff5f3 +CT = cae67482f1e2c4c8bf066248e37818bb8075ecc15438af1bafac3eac61e1c24ed00ab7 + +Count = 199 +Adata = d4b90ef8abad08c552c8c3b080b8c37df314d514049d45e27ec4527cb06cdf85 +Payload = a206a1eb70a9d24bb5e72f314e7d91de074f59 +CT = 305f3482ac73cf9c8a520b04144a55ddc8cf464422d9e2f4f84fde49e9701296294d5a + +[Plen = 20] + +Key = 78c46e3249ca28e1ef0531d80fd37c12 +Nonce = 5de41a86ce3f3fb1b685b3ca4d + +Count = 200 +Adata = e98a77f2a941b36232589486b05f4278275588665a06d98aec98915cc5607e06 +Payload = 4802422c9b3b4459ba26e7863ad87b0c172cfe4b +CT = daea2234ea433533bf0716abe1aa3844b6d3c51e9d5ca3d8ec5065630d2de0717cdeb7d5 + +Count = 201 +Adata = 5970a836de1f1e91d94d7eef79742cbbd46a759c413715eb0224fd6a27145333 +Payload = 796a69ad0e9379173ef6b66f44f5c84fa70a0e28 +CT = eb8209b57feb087d3bd747429f878b0706f5357d0ff0648ddb07f42f815b38bfc95688b1 + +Count = 202 +Adata = e3f08834c4894f6fa66a55a280c0e677a79e97c1ef9488b21384e74e57b1b51f +Payload = 98e1f8cf250183b13ad418024dc40c1a6a7ee8ac +CT = 0a0998d75479f2db3ff5e92f96b64f52cb81d3f93ddd9a6977ea8e7adf5c5234346e560f + +Count = 203 +Adata = 18349be2894d49290339b97f4db28c92b3e112ffac77100abbf9c093935b1a46 +Payload = 4a856d9b50a5b40d6566b38eae6a53ed0c192805 +CT = d86d0d8321ddc567604742a3751810a5ade61350bdee05328a7ea8cc6c2e42bf3faeeda0 + +Count = 204 +Adata = 7355e34ad13880de17a1d66b02672ea5c9f51774019f64ecbe36747ffcd9b671 +Payload = ad048eb2ad75266b43b59d9d1f073c44e4cbf25e +CT = 3feceeaadc0d570146946cb0c4757f0c4534c90bafb1435cf929db35ec5986aabaf4a7d1 + +Count = 205 +Adata = 4be21ba2eb26234ddcbb6aac6b4c3be7ef644af64edf51b7c29ffc3ddd80036b +Payload = 5b527ac6cc6d1b4c3c56f8315bc96dae91632df9 +CT = c9ba1adebd156a263977091c80bb2ee6309c16ac736be6563cf9f5bce97486b7cc6f1c18 + +Count = 206 +Adata = 266e0e3365e06d3b1e864c6e5897145df7bdde90eb744013a7b36632d4cf6580 +Payload = cee059cb0fe91a39faccc2914340baeab4b644ce +CT = 5c0839d37e916b53ffed33bc9832f9a215497f9b2e90335fcea56b969b4fce65442768dd + +Count = 207 +Adata = 55a723883a340877d85ad1a5f264f2c834d824c7bbf207cdd8500c9d11ef9225 +Payload = 85321fef6a2b7d31cbd079c4bf2bfbbc979df90b +CT = 17da7ff71b530c5bcef188e96459b8f43662c25eacd6afdb3578ebc75e8a408d32758931 + +Count = 208 +Adata = 773864475a1a60a778468a66cbe13dfe3458094e62abb593f50c8495e3a8b81e +Payload = e227b8d44320bd3ce9d3f7d688f3de887947b1e9 +CT = 70cfd8cc3258cc56ecf206fb53819dc0d8b88abca19fb73fc0488d9f29a09c1b47e3e066 + +Count = 209 +Adata = f64f3b00c9117aed3c486aa4c8d574b44d679be4069e1078bb7100af38cdb190 +Payload = 206e9eb2bc3f8534d844a38debf1306df808744a +CT = b286feaacd47f45edd6552a03083732559f74f1fce2c5ef8cdce76b358739e2a1b173fb3 + +[Plen = 21] + +Key = 8883002bf13b3a94b2467225970df938 +Nonce = 818a702d5c8ee973b34e9acda1 + +Count = 210 +Adata = 545aeac737c0ca2a3d5e1fd966840c3a0d71e0301abbe99c7af18d24cc7e9633 +Payload = d516bbff452e7706c91c7ace3e9baa76d65ff7050f +CT = b85242fdc06344f2bd9a97b408902ebcd22aece3d42f2da4dd4d817c9fa2d44bc02163a0a9 + +Count = 211 +Adata = f032db01da60ca078d35c3fb5d05d6750fce1c01911a0422e827e8976946e4dc +Payload = 590d1aa655fed50ca2e402299f2da6fe20eed56071 +CT = 3449e3a4d0b3e6f8d662ef53a9262234249bce86aa180f41bccbcd47c8b7890754c032269b + +Count = 212 +Adata = 71ecb4252518997b53491cf42a3e0fe1496a2af2329a16f9fcd9c4f249900341 +Payload = ecd86cdb7d78d310dca5b477cd9da2612f5a05ab39 +CT = 819c95d9f835e0e4a823590dfb9626ab2b2f1e4de21d6ba58cc2eb474401851bf9502c3413 + +Count = 213 +Adata = ec7abed9bda4a52fdf1bf278b6bdd6b0a27d4688deb9ff5ca9c8c865a4d2f730 +Payload = 0024b14c283df032cf80c22ad8d2c96289ee229092 +CT = 6d60484ead70c3c6bb062f50eed94da88d9b3976499b94d4b7a2044696c72322e850537b6d + +Count = 214 +Adata = c2c77d7ad7b27d7c0f976a1e28881ea4ec7ad03b63a4e67f47280a40b8f58086 +Payload = bc6965d8f62d066d118c14044c1fd2a224b9d95110 +CT = d12d9cda73603599650af97e7a14566820ccc2b7cb9d8da8e718570caf8bed7909fbff3ec6 + +Count = 215 +Adata = 28929286bd1391468ac75f5c03689f74780ddd7585fc16f9a9bf7b00357a72e5 +Payload = da4a630cabaff0728a1cc3e6a79721a7176b708f1d +CT = b70e9a0e2ee2c386fe9a2e9c919ca56d131e6b69c6e671012690c61fe3c9abd50a78eb4736 + +Count = 216 +Adata = ed360d22081b019dc979420a3a45c21c8903c59daedd9f1b4ef2bfdedff0ec1d +Payload = a95058f8e1f6bc0f143a9ca7e4425a2a63eb2f7e33 +CT = c414a1fa64bb8ffb60bc71ddd249dee0679e3498e8e657e2250427130acef7032454cde7b6 + +Count = 217 +Adata = 2b4022d0b951fe48635d04fb3e2fa032c07c855fdd73f45670953bb9ddc77cb4 +Payload = fcbbc7f9d1ace60e830ca56ec84814fbd2579993d4 +CT = 91ff3efb54e1d5faf78a4814fe439031d62282750faac6ff0a264b8199550d93c1f06063da + +Count = 218 +Adata = 48e553a87a7d3c1bd68af39f96aca67583da86e06701d5e4c4ed404dc66d70f3 +Payload = b95d298d391c6b893c6cad66f9780534516e71455e +CT = d419d08fbc51587d48ea401ccf7381fe551b6aa3857e68bf636e81c332f72063dc0d6fc2b6 + +Count = 219 +Adata = e8e2835e47144365a2f218d4c95d7522e824fb43b66d4727ee570f8303dd6dd3 +Payload = bc79d444dff9d9e722effab07b068cb7723ae8fae0 +CT = d13d2d465ab4ea13566917ca4d0d087d764ff31c3bdf3af9e9c4e04bad261dc17cf00a00dd + +[Plen = 22] + +Key = 5cea00ee44cfb9cfbb598d3812e380ef +Nonce = 948788a9c8188cb988430a7ebd + +Count = 220 +Adata = 50422c5e6a0fb8231b3bb6e2f89607019be6ad92a4dae8e0fe3f9e486476004b +Payload = 33bfd0713f30fcac8f7f95920ac6d9b803ddd5480dd8 +CT = b168747dea3ae0fbede4402af9a3dc3185d6d162f859d828101682de32923788c70262b84814 + +Count = 221 +Adata = bb0036b34b0c20094d335a8c74f6b3dea42eeccf4145192eada64ae00c726b2e +Payload = 5576d94b577ed26820fb13c00ab0e2d1a1c3589bfdc4 +CT = d7a17d478274ce3f4260c678f9d5e75827c85cb10845bafc4ae4d31907def6f648b081174e2a + +Count = 222 +Adata = 5140324aa758dbbb5391b5e6edb8a2310c94a4ae51d4fba8a7458d7cc8488baa +Payload = 13303e14068205cbfa992d4ccb6a265804ea64a15d7f +CT = 91e79a18d388199c9802f8f4380f23d182e1608ba8fe314e378e9ed6e725a14c07632b02bdbd + +Count = 223 +Adata = 74da07d324060e590356988f27d9879fa3a3ade0fe71e2a0e49054211cfa1fe1 +Payload = 567e6d14b446add630d53ea86a537c0938537c4604a8 +CT = d4a9c918614cb181524eeb1099367980be58786cf1295bc2f2f9331536f7f70be09c41bda0ad + +Count = 224 +Adata = 0e403cff47adee3ec5bb6b178dabfc7d53b60a04eaad33a2fedd9db705358a4c +Payload = 9f3d165d44cf1c5770346d211d4ff34ca2ecd6b28549 +CT = 1deab25191c5000012afb899ee2af6c524e7d29870c86b59cc9c3c008bc5876ef86327859cbe + +Count = 225 +Adata = 211e6ce3d0c3abdef069e6e4fa35015797bd8a9d64bc9b75f20b028b12cca04a +Payload = d726e599db6a6d40629bc4bda5e3fa2e5aeda229cea4 +CT = 55f141950e607117000011055686ffa7dce6a6033b25135e6d59a5385a78658d60d254f99962 + +Count = 226 +Adata = 3c5c67b083322115e1b3112c2b6968efc050094e23e646dce982eac9d6e67d10 +Payload = 42646cfb8a99e48a35cee3f5f9b3e6175695973f6de0 +CT = c0b3c8f75f93f8dd5755364d0ad6e39ed09e93159861e234e83d9a0570dbf2b2fa59ce3cdbd9 + +Count = 227 +Adata = 37a931f1dd05755b376d1a164aa36b8de802e39f8108a0453c1114754665fe46 +Payload = e814c7b5c72d973a9bc7ccd463f107325ffa3321783b +CT = 6ac363b912278b6df95c196c909402bbd9f1370b8dba2084e352b1b157267228576dd056c1a3 + +Count = 228 +Adata = f1ddc2c49da7363526ba36c600c589b4c3121fbb8c5b9a8aa0de0e7453b30568 +Payload = 4f7a5618870945b89f194e31b1aa802c5350326dc691 +CT = cdadf214520359effd829b8942cf85a5d55b36473310bf88ad35ee338e489e55bb49732447cf + +Count = 229 +Adata = d14b3d3803df432488b5d66704abef6a500d397e855bc2c2574df746a515cf70 +Payload = f555216840a1f40b411d44128e567617e2694caf1621 +CT = 7782856495abe85c238691aa7d33739e64624885e3a07ab67f9397a81371ef6ebc775cb7007b + +[Plen = 23] + +Key = cb83f77751e72711401cbbf4f61aa0ed +Nonce = c0b461b2e15b8b116ef9281704 + +Count = 230 +Adata = 2bd112231f903fa0dff085db48a2e2a96ec0199249b005d5ab4c2eab753f9ad0 +Payload = eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06 +CT = feb114b7bd3b43497b62454a675a632c3546d2802462c6af57647efda119c59862cd5dd3904efc + +Count = 231 +Adata = 864e0e728aea856fae6c6daa6357d1542cef7177f441ba21a563f6c4f6fdc1dd +Payload = 8a56588fe5e125237b6cdc30f940b8d88b2863ec501a0c +CT = 9a394d88d7405656df1a50e7e45fa8ddcca85e9ed5a3cc2af4027ca5824b41c7bb238d3e8eeebf + +Count = 232 +Adata = dac7f3cba0b5a47f67f85b226b66df695a8ae2501355e36aad105375bb95f732 +Payload = 66e34540d7accf377877aa2d3e6d2db0cfafc608a1eb3d +CT = 768c5047e50dbc42dc0126fa23723db5882ffb7a2452fdf7fbd7044ce1d7b266bdf545247a3c2b + +Count = 233 +Adata = 07f48cdc12aa27119fbdfda4ec07ce6068c92ba7ba9c930905aadd156b1dd56e +Payload = a9ebd04fba7155c39b5c29c5571b5354c9ae228f5e5b13 +CT = b984c54888d026b63f2aa5124a0443518e2e1ffddbe2d3afabc559b552cf7c7730c7dca25bc3ed + +Count = 234 +Adata = 2d24e79abd157af2c21b60932947fd9f9d6478f09ec56fffd341ea04a17b8e5f +Payload = f179353aef342f0f691caf1fcb811e3f6504e14d6d9381 +CT = e116203ddd955c7acd6a23c8d69e0e3a2284dc3fe82a41488ca99e0f85ac388f981ce25560b8f9 + +Count = 235 +Adata = fea280f710379e4665b5ed3d1620729a7bc164899dc83e6aee3612d538fa20db +Payload = 6c19a18eab544acc883c5886eaa89f54d61ae5f1f1368c +CT = 7c76b48999f539b92c4ad451f7b78f51919ad883748f4c9156faae3d8860bed216e8d497a75962 + +Count = 236 +Adata = 18f2e3457127c35f2e0cff2d821af8178028fcc7803bc795c49f4a435b37abeb +Payload = d0df1bdf1df6203241722fb9c9c1cf7405017497ae1545 +CT = c0b00ed82f575347e504a36ed4dedf71428149e52bac8588cd7791c544d1098b2de49d04b1e0c1 + +Count = 237 +Adata = 35221f0efcb109cb93c38a62c58b5ab8b236437e171e8507cf417a569af1767c +Payload = 479526b33c42c240b9a4549ca70cbfb691f16ae3be8888 +CT = 57fa33b40ee3b1351dd2d84bba13afb3d67157913b3148c523fd8a2524717f63dac75c22268fa6 + +Count = 238 +Adata = 95f2ab02af01aeacce86b02cf846f9fbd516963d06e350e8b7f6df2778765a01 +Payload = aa6761148b254a2ff202b620c2ec2c5e623bf61f05e483 +CT = ba087413b984395a56743af7dff33c5b25bbcb6d805d4392904f05dc2397596543df73de5aa708 + +Count = 239 +Adata = 3746a36154e42dd600049d506f5ce4d034864263b1a65cecd24c8e25fb9c82e1 +Payload = 2f298f106703b8a994cbb20acf47f9442e44f6b5e82c38 +CT = 3f469a1755a2cbdc30bd3eddd258e94169c4cbc76d95f8c3cbfecfa3f75fb111ef0011222b7948 + +[Plen = 24] + +Key = 43c1142877d9f450e12d7b6db47a85ba +Nonce = 76becd9d27ca8a026215f32712 + +Count = 240 +Adata = 6a59aacadd416e465264c15e1a1e9bfa084687492710f9bda832e2571e468224 +Payload = b506a6ba900c1147c806775324b36eb376aa01d4c3eef6f5 +CT = 14b14fe5b317411392861638ec383ae40ba95fefe34255dc2ec067887114bc370281de6f00836ce4 + +Count = 241 +Adata = e82fc3ffd276218a82aede65fe5abf4fd35c7059a26923f8dbb97a59c903a7f4 +Payload = eab8cef576816a82ed036f158e5036f5987b195e60582a6f +CT = 4b0f27aa559a3ad6b7830e7e46db62a2e578476540f489460d2d30268e9f1ce0e7c762993297d828 + +Count = 242 +Adata = 776aae7f62225556b6da522c0c9432ac70fe72ac6f3f361071ef3deb4a6715e8 +Payload = 566ef9ce1d397be2547c385639507a9e7d6f9eed9a3b1055 +CT = f7d910913e222bb60efc593df1db2ec9006cc0d6ba97b37c0939e56f0b7200d1b1409f3f8e8179cc + +Count = 243 +Adata = d9aef0955922f89747ba4a8ddcdb8c1c7579aefd3c2eb8ad0589c66576a8504c +Payload = 8c28b6d93b23f1ea031d5020aa92f6608c3d3df0ee24a895 +CT = 2d9f5f861838a1be599d314b6219a237f13e63cbce880bbc138e3b817023993608be06fe92efca8b + +Count = 244 +Adata = 13c222a65ce30570ecac85a185a2a0922a8c96d633339a1ca067ce57ae426e1d +Payload = f0c1cd60f5fa8d1efd5e2e1ab37c4f7e6aef76d15e8d6ac8 +CT = 5176243fd6e1dd4aa7de4f717bf71b2917ec28ea7e21c9e1f3ca13b4ab7fd0d4badf158972570c06 + +Count = 245 +Adata = ce40fb0cbfdf07676ed55b040ae6be5db8f0a0f28816ae8ea71da3cbd71661d8 +Payload = 570d5f79aa8db14b1ac99ee567cc105ae9e238e482b52628 +CT = f6bab6268996e11f4049ff8eaf47440d94e166dfa21985010a79fa4e8b27a31ff360a1b6c05ff844 + +Count = 246 +Adata = 446b01d09cbc41b6393ef81ca65ab7e099018187d5f9d22f5074dfc491e72077 +Payload = 7c267223047af946b06f6a45ffde4a5ec49c28b81ca22da4 +CT = dd919b7c2761a912eaef0b2e37551e09b99f76833c0e8e8d5d34ef0ca0b47d6a2ec7442cbb739504 + +Count = 247 +Adata = 01ec87920b42639d4ba22adb1fbe5138d2849db670a2960fd94a399c1532ed75 +Payload = cbf112e4fb85276c4e09649f3de225b2398e86ac3fe48bc7 +CT = 6a46fbbbd89e7738148905f4f56971e5448dd8971f4828ee8f607d154393e35fd1efc1ae8cb244e4 + +Count = 248 +Adata = 5032b818d202872f3fe2b08fc7940696df02cf393a6d6247f5c6f5f2125cb08b +Payload = 4324a89788e8ddae5d560cf937df701743cbbc3bf980558c +CT = e29341c8abf38dfa07d66d92ff5424403ec8e200d92cf6a5617d9cebea38591a00c9fba4ef9c8e71 + +Count = 249 +Adata = 27b661861717f00a3ae22ead78f4dc3f32b40e8fcb8ed58167a31a61f2becd77 +Payload = db72d98d63fc10acff7dceec0e2691a80ecee50a0e957ad1 +CT = 7ac530d240e740f8a5fdaf87c6adc5ff73cdbb312e39d9f897062a1ec759a515b938780f902fa7c2 diff --git a/lib/crypto/test/crypto_SUITE_data/VPT192.rsp b/lib/crypto/test/crypto_SUITE_data/VPT192.rsp new file mode 100644 index 0000000000..abf1775dd1 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VPT192.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 192 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = 086e2967cde99e90faaea8a94e168bf0e066c503a849a9f3 +Nonce = 929542cd690f1babcf1696cb03 + +Count = 0 +Adata = 58f70bab24e0a6137e5cd3eb18656f2b5ccddc3f538a0000c65190e4a3668e71 +Payload = 00 +CT = 3bf9d93af6ffac9ac84cd3202d4e0cc8 + +Count = 1 +Adata = 760d065275e345900a7bbab451cc9309fb161e6cfec526538b98800e4102e14d +Payload = 00 +CT = b0078a769ab68db44e723993da382abc + +Count = 2 +Adata = ffedc67efd355ea404fcbcb3993d3bae81386ded86230270771deb747163bf44 +Payload = 00 +CT = 31fbff2d715a2eb9af54e8320a8e42e1 + +Count = 3 +Adata = 55153ff5e4d208d2e647794f382c788e0e36f293e63e7290ba9ff2657ae0f167 +Payload = 00 +CT = 945839d62c9d1b899f6dcd0ca9517e68 + +Count = 4 +Adata = f8813985f59bf284bd3882e899ca9b67fb496f3eb78d7ebe6ffbad084f639915 +Payload = 00 +CT = 903f90d23321a6882d6c4c1955b14847 + +Count = 5 +Adata = 7b95cd827ab93507f1819ae76627d6e2a31d29890c092e5c300f0e2f9e4ef4d2 +Payload = 00 +CT = 652ec5ab43088eb568186d0d9887b30f + +Count = 6 +Adata = bd144c9bb974729aaa1188ceefdf85e1d9fddc0b0c8afe8828ba204aa9293feb +Payload = 00 +CT = e6c1455d1117eec49338c96f51007309 + +Count = 7 +Adata = 92b911cdc3137a6f7f32651b788eb82975660aea52b2c03b4759755a6da4a0f8 +Payload = 00 +CT = 1cf3c32fb229dac209523eaa517bb59a + +Count = 8 +Adata = a8200dbbfe4086015cdbdec2fc8e4934d0d663527430c424627ed44065ade091 +Payload = 00 +CT = ee10bfeb1cf9b3cd5a0faebd4d8f3fe1 + +Count = 9 +Adata = 3b7f37b6b8e3c1390a99d59c47f7c102cf659d361a132ef8b4e70b9585bafebb +Payload = 00 +CT = c51ed994253adb9bb5b9a8c34a27f225 + +[Plen = 1] + +Key = 992d38768b11a236945bd4b327c3728fac24c091238b6553 +Nonce = b248a90b84b0122a5ad8e12760 + +Count = 10 +Adata = 27cabc40da0e1eda0ea5f8abbb7c179e30776250a7b30d711b0e106c5ee9d84a +Payload = 1c +CT = 1a96f58c3f38c44d1a345f3e2da6679f20 + +Count = 11 +Adata = dc2e28d5ae726c1beadb1e7e92ae7d14f5546320deb81a910bf170cbe0210eaa +Payload = e9 +CT = ef0579aee7c17482691f3f832d867ffea7 + +Count = 12 +Adata = c579f912ac1b45d5aa8cf20f78f0a1ace32abd3dc7fd0b3f3a7182a008795c7f +Payload = 97 +CT = 913452d8ece38ffa1d4107d6a053acd8c8 + +Count = 13 +Adata = 69ea953dbb910ec589372d797c7379d3f3b9e9fd48894c9b55e6e8eb360a6211 +Payload = f4 +CT = f20d760b9fe29530738157db0ba2d253f0 + +Count = 14 +Adata = 622835dea57b2c70cca8f7548d6210714070b55b36adde7a4c547269c07aba9c +Payload = 9f +CT = 996fc21f24dee7b52f51d69eea30819f4a + +Count = 15 +Adata = 67ebda0a3573a9a58751d4169e10c7e8663febb3a8cf769d81bc872113f0720f +Payload = 43 +CT = 4594c5b8db0064426a77dc536814c56147 + +Count = 16 +Adata = 255412e380e9a28cbcd345be172c40f72dec3e8a10adfd8a9ab147e9022524e1 +Payload = c1 +CT = c76d36c0b0d699a22da3116dfb8f453181 + +Count = 17 +Adata = c7c8e7151eb6844a954d091b460f83add0f0a634aa5ac213b774f2451aa497fb +Payload = 31 +CT = 370c3a1690acc3f0eb09c9cfd3396c7fa9 + +Count = 18 +Adata = 63f00b2488809fdc49ca5f05d54e98468906308115f7e702da05ddfd970b5537 +Payload = a7 +CT = a1ad45070fe4c61270c13cc52247fee411 + +Count = 19 +Adata = 8e2c5e55c0bf70014e9897b6f6940e4e738b1e84e8269b6382f0b1fe59b0e162 +Payload = 40 +CT = 46b2a2a8b283ff7eeff5c2670f77b8809d + +[Plen = 2] + +Key = 5012db40ff6ae23c1e1ce43768c5936c4400b0e79ae77f30 +Nonce = b67e500b35d60ad7264240027c + +Count = 20 +Adata = 40affd355416200191ba64edec8d7d27ead235a7b2e01a12662273deb36379b8 +Payload = 0c6c +CT = c996ef3d6ef9f981557506ecc8797bbaaaa7 + +Count = 21 +Adata = c5e12e17e02bcc12b3a4c14cf837250e2886db3ee1c717d28bd11e8a3b764ddf +Payload = 23df +CT = e6254405257a837c5343b59d5689d6de5269 + +Count = 22 +Adata = 213b5b6015d472bd593be5acf85ebba6d6a09f3a962be302ba83c6d70c61f241 +Payload = 0dc2 +CT = c838e93e67d37d2367bb1f27f71b54b29317 + +Count = 23 +Adata = fc1b6e152fe232b6c10b5d89900961c445f4c46833df242c826678b68c869811 +Payload = dc88 +CT = 1972ca3744a4ab375af9060621a9dc4f4c32 + +Count = 24 +Adata = 5b2eb1a6fa585d61d1fb3da68f5b93829c8e2d5e4fe03782617553d7a130ecf1 +Payload = 8179 +CT = 4483172626e930d24052bc056d8609c4175f + +Count = 25 +Adata = e2b3c3bf33cf847660929e48cce51d9d9289945169651aaecb1e939756e93105 +Payload = 01fd +CT = c407852310207be8d3417de800b372700da2 + +Count = 26 +Adata = 6051f12cd8aae68b4023aaf7178fd086aa582b8d8821e36637abc97025f5e858 +Payload = ca18 +CT = 0fe228553bc037954dbf4ce5db99792c2c7a + +Count = 27 +Adata = 2d3555faf285caaddfe95c010c2a7f233e09c2fc0cd30d644035269280527ad7 +Payload = a855 +CT = 6daf904725668634d6345bd8f90a3831b452 + +Count = 28 +Adata = 4fca820dc545bf93bdffed33a04b67eb45384e696f092c2197e5d79cecd09913 +Payload = 5555 +CT = 90afdf6098cb3135c3045a54ffce88efaceb + +Count = 29 +Adata = 1789ae403e183d2225f431f001d475b53bccdec66572bb027340ae592839ba8b +Payload = 11dd +CT = d4278568e8c08ff5ee5ea0a608589c2fc029 + +[Plen = 3] + +Key = fa15cc7f0de294d7341b1fd79326c8be78e67822343c1992 +Nonce = e5257aed2bda0495aa44591db4 + +Count = 30 +Adata = 31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94 +Payload = bcb898 +CT = 68f08298d9a2147776dca9c1a42382bce323b2 + +Count = 31 +Adata = 4863dd810ee70ef0f5da81f60c5ce550abb96454619032322e34657af25207de +Payload = d1da2e +CT = 059234a9a77755b324f3a557217752ade14ed7 + +Count = 32 +Adata = 173594fc26b167f044aeaf9bfe920cab99a27eb2b01827d61f7553cb2018b5fe +Payload = 394f31 +CT = ed072ba4441a79a90e228a28069fe109d5d876 + +Count = 33 +Adata = 71cdd16eca9255aeedc23bd623513918ea97da21485074415fe75bcc42f454c0 +Payload = 868bda +CT = 52c3c065f272f44c5210b5bcc571e819580910 + +Count = 34 +Adata = e84418d332d16d2298e69e7ff3c37bc7b6e030cc822e73b3f4a0029bc2ea4d80 +Payload = 52d6bf +CT = 869ea559c5f7f73a1b5f419c9f63ca401894a8 + +Count = 35 +Adata = 42d962109bea1d50be0f3d83b4c2a6033d53b3d7112591866b1ae52dc84cb5d0 +Payload = 6f8d58 +CT = bbc542220b828cf5365137fb3f1df67cc8d2a1 + +Count = 36 +Adata = 943b4327b5c70dba63c82f27e0412b3ada012bc0f7dd39ebb13db2f864daf80e +Payload = fda286 +CT = 29ea9c422b0f41075ac79a0afa2d1047cbbfb5 + +Count = 37 +Adata = 6076b94caabfa476ab7e6482e4fda9b29f2e2b2883efe44d668c7c74628505bb +Payload = 8651fb +CT = 5219e1ae68cd6d6815ecbfd01293d160d4d38a + +Count = 38 +Adata = 3e4bb5781f84b4bbd23583e3dae561c6ff4af8eff35e2a4f35b50d2f360d3469 +Payload = c3e179 +CT = 17a963fbaa81cfdbcaee476860cd5102f556e4 + +Count = 39 +Adata = 364008acbad330d0b8d574641a97b0682c49279cfdc80ff309b7514514d18a44 +Payload = 4a97d5 +CT = 9edfcf7ad1520564b68824a3a939371c21a336 + +[Plen = 4] + +Key = b5330a8447d74a7987fb718cfae246b5c7e057991064eeaf +Nonce = 2ef29d62b40d8643848797cde8 + +Count = 40 +Adata = 1225b036e6044df52314016760e92750de0936120395de750a2c54a7fa0cea82 +Payload = b46b343e +CT = c2c39d6f9344e2de064f269d065a2a6108605916 + +Count = 41 +Adata = aaa6257d6783936a4445833c2ac3bea8cb7334f22ade9c035d515bbc91d6a78a +Payload = cb216301 +CT = bd89ca50693d90b8297b90bc41c231d08b0204fb + +Count = 42 +Adata = 1c1915fab09348b9a5536495c70d1a040305708c1124797e564b63e008e7b8ab +Payload = 697a8696 +CT = 1fd22fc79d0146fe373437c529fb2eeb169e4bd7 + +Count = 43 +Adata = 864d0f786497c7ce283762ca0959ec9c825ed445a5dbe5b4b2e5772fe88ce7f5 +Payload = 6bee3db9 +CT = 1d4694e8e389c549bfc4ede936d7896e544b23ad + +Count = 44 +Adata = d5388b0b548c58886dcd335dff2b1ed23ce3eebbb708fb5bbd831c83e959d3fa +Payload = 85d95855 +CT = f371f10495177a9fe6d9329a585c8737c92a4d29 + +Count = 45 +Adata = 83cddd189736f224cad6a29efba45e43c75450a14f1541713b7fb926ffc768c6 +Payload = e8b23340 +CT = 9e1a9a113914431a10b1f94a2b99b9e442f3dca4 + +Count = 46 +Adata = 8fccbd1fc5240691cf24e8807bf3416c1b2d87fc86dbf3955fa2e52b9a3a8457 +Payload = 595c4d7c +CT = 2ff4e42d383d8dc98b22010dd93cd0cbb396d9e3 + +Count = 47 +Adata = 513d45f6f37f3f051667dc743215059e06e4fdc8945789b16d50556a2e839368 +Payload = 314e0c7d +CT = 47e6a52c40c513bfc92d1a7db5ed7cab2d8212b0 + +Count = 48 +Adata = 70828be102e554f0d4b07641fa3254bc8db06eefaf5b85a7c97e01c217fc8f3f +Payload = 35753e32 +CT = 43dd9763ea98f4ac6b3eabd483f1e6ab92f3b83c + +Count = 49 +Adata = 343d5a4ad39acf81adcf24e9807618932abcb3bc076734f179174c77c8cb89e9 +Payload = a531c0ed +CT = d39969bcf99fb67b1e2aba2d232db2445e6aec2a + +[Plen = 5] + +Key = 30419145ae966591b408c29e5fd14d9112542909be5363f7 +Nonce = 27e6b2a482bbc6f13702005708 + +Count = 50 +Adata = e04e81e860daf9696098c723085d8023c240ebe7a643131e35359ab04bd650fe +Payload = 8ceaeb89fd +CT = ec9d5ed36243ddf77b33d8cf2963ba76fd4e19f3c5 + +Count = 51 +Adata = 6217cd581d4b3b2f7bcf1b8dad9ad6430e2e3a0063cad52260e0a1cd6fc9e73a +Payload = 7e51d6f870 +CT = 1e2663a2ef6b73fe9e638e205b27f78ed1bb9b0ed0 + +Count = 52 +Adata = 8aa7847e496f5e9f1f87851442de844f27a21c1b48f82fe525f0dd5a88b8ec38 +Payload = e0023b674d +CT = 80758e3dd25936115e23158aff1916edec241fad56 + +Count = 53 +Adata = 3612abc865a4d8d7b86a84109388584df6526525adb1006ec6c8d00048d725bc +Payload = e2b5b6f36e +CT = 82c203a9f1f15aae4b70dbee244be1daa74475d7e2 + +Count = 54 +Adata = 849a99c6f1cae0ad4bcde4bd0811e87ca5ed7b913de1a8285a206e980b4b7043 +Payload = 9a17e4a22a +CT = fa6051f8b5bbff424487848385f8501ab5a77f327c + +Count = 55 +Adata = 9066367c784de0a4d1116bbe95ce55ded85edddb6273c2049ee24e0fb3429352 +Payload = d4e765fc78 +CT = b490d0a6e772d8d5da6f593a8d9956731b42645aa9 + +Count = 56 +Adata = e7aa9f767fa8920f96f91c41d9e86755faaedaeda596a444b65f99b7a9e23e85 +Payload = 1074349e10 +CT = 700381c48fe3eca12b835dcfd08166ac8831585626 + +Count = 57 +Adata = bc0db1ebf910b6f4dcad5401401d6bc2272e23130947dc236ca664d5b5ed6d66 +Payload = a46dd7fb58 +CT = c41a62a1c72bcce66018e9e552d2c8a229301361df + +Count = 58 +Adata = fcbeba2d0d73239d05f691a52b08152c9dd871f8dc76c2c18b8a638a74460d31 +Payload = 2e0ca09221 +CT = 4e7b15c8be3e41a50a28ea3be14baadf12964a37c4 + +Count = 59 +Adata = dcdefce64ae4339f46c0759a4a10b29d59daaaf1e5dbf75cf11b4e4f73c5025f +Payload = 2e108ce0fa +CT = 4e6739ba65bee2ab25bfafa76dc3e54832b2f76864 + +[Plen = 6] + +Key = 748ad503388a34041a7bdae6361d57894357c333bacf02ca +Nonce = 518b79d194579b19f2d8845b70 + +Count = 60 +Adata = 691dd98f61fd213b0840ec5a6f06ef9a1420be0d59bde5e43546347a2a865a94 +Payload = 24d6880aed7e +CT = 270120f9634ec15536e21d961c675070ec4cff9037bc + +Count = 61 +Adata = d1fd047cdb18463766841abb1fcd25257f1458b595bfcf24066ff9385232fa97 +Payload = 2298028d0213 +CT = 214faa7e8c239b303af0b098f902dc24e66fe56adc6e + +Count = 62 +Adata = 65a480d120a0459dab69e8f23094801e10092666cc56f9fb2549662982bda6d0 +Payload = f248e5225e3d +CT = f19f4dd1d00d1b657925a9740d6828bd85cd12205764 + +Count = 63 +Adata = b738a53fbc9689dd49f68f97f5a99665258cd52e74dc653b594cffec045508aa +Payload = 611dade00cec +CT = 62ca051382dc395a1c49129ef6cce0ad5f6ef378aa1c + +Count = 64 +Adata = 7006f54184f0ff0ab215ca408d46325b86c1cbae6da7838435b1826ff81f55dd +Payload = 5871a8300471 +CT = 5ba600c38a415e68468d1b2b516be3d688567d84ab80 + +Count = 65 +Adata = 9e6e6675d4c6b1e0f3894aac071f4c99a364708edea12f319cbc27b40fabc0f1 +Payload = 3ca8a7520e94 +CT = 3f7f0fa180a40ba1af163049d16817021665d183bc9e + +Count = 66 +Adata = 10ceef716f54b74d7c8a435d6aa38a10ff23939ca29e2de7b6c3e0a8269a23c9 +Payload = 9c2a0070fbba +CT = 9ffda883758a670f35869da9821b6ff1fab3e6062ad4 + +Count = 67 +Adata = 3ee0865f29be50160273b4a94ec078932b9cd10a858e31838d5b607867e1ce69 +Payload = 436179c74fd2 +CT = 40b6d134c1e208f395250fd79087c858b83755411114 + +Count = 68 +Adata = ec2b8bfe1ccd491b02aa4a9178fd6f099556963e39e2ca5fe6ecb6b5d2a46085 +Payload = ecfa41c614c5 +CT = ef2de9359af5afcbd9af2d584a0f638d066f2496d9be + +Count = 69 +Adata = 5b6f6369643d83b1db33d75257d7dea761e574e6e1f1ecead64e5e354a2f4235 +Payload = b48c10105dbc +CT = b75bb8e3d38c17861882b8930296fd51d969a1e9489e + +[Plen = 7] + +Key = b930cca30a3fd230c237c8f3cc6792d0c4084dff5c18d775 +Nonce = 7574802fd82fe96c05431acd40 + +Count = 70 +Adata = 1cf83928b6a9e525fe578c5c0f40c322be71b3092239bff954dd6883738d6d71 +Payload = 2a755e362373ef +CT = f06238b0450fd1f4b6cab1383adb420c4724aa7bdfefb7 + +Count = 71 +Adata = bb5450f66273f63b2f79dce177381ce846584ce4f7a0ad5a0171a56e149370bb +Payload = fab43224bf8989 +CT = 20a354a2d9f5b7a1f99175d3dff5a73f0053a95c36fd8d + +Count = 72 +Adata = 3e5e1037bd2922eb20c34200c470b76e537baf7e7f1d8dd2f7a184a593c66554 +Payload = e3aed6715aa429 +CT = 39b9b0f73cd81734b4ad0e41117940abf530093dac648e + +Count = 73 +Adata = 3cc88a096a1a440827f5b7da675389e50b5cce35fa2cc36674d6bfc5a3a966b2 +Payload = e78db0f83997cb +CT = 3d9ad67e5febf5663a8324014550430c7eaeffbd8568f7 + +Count = 74 +Adata = 2cca33a10b9da7ba99a6b552d1405f2df3fdfd15358d8fdab5e15296b38f9135 +Payload = 726557906845b1 +CT = a87231160e398f34ab635c4eb5b38b86e71da8af3840ae + +Count = 75 +Adata = 2fe5dd58b17914187e29029c53cfe5b015ca74cab750d8f95e05f818c3cdf947 +Payload = 043a759b578be4 +CT = de2d131d31f7dabd9961766e03eaa7e8888227c98d1f42 + +Count = 76 +Adata = 8b8e3d7c88fa16d70130cee290b7e2eecf0ce711118cd9265093b11467e63554 +Payload = f31f2fb4b3fd80 +CT = 29084932d581be637842d96d13c4aab97e296458745a9d + +Count = 77 +Adata = 6341370e126097f9721a13c977eb4875cf1286e15c3adfa4e7597e0e13d93b6a +Payload = 7e3c8224104669 +CT = a42be4a2763a57a51ac46611366c666cab6bfd3d1baaa5 + +Count = 78 +Adata = 227926b62f7cdd90e4d3b0cb5457e71fb087d329671f0fa891ec06eb8edeb58a +Payload = 26a0528ae6f9c1 +CT = fcb7340c8085ff8c7d7e5aec14845f844ad38544a2f11d + +Count = 79 +Adata = 05b50c40b02e79b74b94d726a7ce8b2b7216ef8af6e7a42d041d2a692a58ad83 +Payload = 61dcf53d1a184e +CT = bbcb93bb7c6470f1605ab8a2332012b759ccd2eedbed24 + +[Plen = 8] + +Key = 314c136999e41d137bd7ba17201a9fa406025868334e39b3 +Nonce = 65f7a0f4c0f5bba9d26f7e0ddb + +Count = 80 +Adata = 5c7ce4819b30b975ae6ce58dcc1bfa29a8b6dda8f4b76c7e23516487745e829c +Payload = 4d54d8b06b204445 +CT = 2baf90c490b11f9607482362ab3f157c42d0e9c6c5cffcf0 + +Count = 81 +Adata = 90257ed88679197b8219bc4c2434a71a4e3664d5859c4ffb9a075654898ffedf +Payload = b2a35df881cd63a2 +CT = d458158c7a5c38715389509b5b6f2df1faf7e8c39203970f + +Count = 82 +Adata = dff8ad83525d8235eacdccc91abeb80795e6b5f463fd28af35c46199f646ceb8 +Payload = e98f5e5a20d02c80 +CT = 8f74162edb41775395328747ca544e987df28883d0377b35 + +Count = 83 +Adata = cde159c5343cd9d98001cd719d3e9ea25e47e1ff13fc87055d4a53b741f59285 +Payload = 90c3e48313cd4fe4 +CT = f638acf7e85c1437a4ba841883a0d7aeda398c043161966f + +Count = 84 +Adata = fa88cf5a08be4fb0c1a7960f45726c303eb559861fa60d17aa8dfe8bb5795382 +Payload = 8ad6d5a28ec075e6 +CT = ec2d9dd675512e3509195efe66c5faf413e0f68df8cb647d + +Count = 85 +Adata = fe9e93a9370b43efa1560aeb017ff04fca7f207191e6f707c1c35b2e90c44eb2 +Payload = eb83928f0d5f7aa3 +CT = 8d78dafbf6ce2170b51af067ad69ad96009e50ead3d03f02 + +Count = 86 +Adata = 35792c854fdf1c8cf7f3f8ed2b8ec4f31fe17bf8d4ba49caec03f954bd8bb17a +Payload = 4cd74ed2fd083011 +CT = 2a2c06a606996bc26b1cb03ee76587f84364825f7c1fcbe9 + +Count = 87 +Adata = c084108f9c0a74cbf70f614dceae592546865006930db0401828a0eecff98671 +Payload = 52365f94579e0646 +CT = 34cd17e0ac0f5d958fa70c5e195f1f955d64892f532b7683 + +Count = 88 +Adata = e8045949de61c5c18a63e628330a4d1d12782379a8f9187755409d1825f453c5 +Payload = 8fb85c857a3e38e7 +CT = e94314f181af63342ddf297bdad58083645a052815d29a83 + +Count = 89 +Adata = 53cfdfd66d63c2924bd583487b90b1dd9ec199f90d660cb9c3a763a4776abfe1 +Payload = 43d2828e86f7856b +CT = 2529cafa7d66deb81ad3b2be41dbc39df4c0145dcbae3e76 + +[Plen = 9] + +Key = a19f6be062ec0aaf33046bd52734f3336c85d8368bef86ab +Nonce = 7f2d07f8169c5672b4df7f6cac + +Count = 90 +Adata = d68d5f763db6111c5d6324d694cb0236beab877daae8115ecb75d60530777b58 +Payload = 13511ae5ff6c6860a1 +CT = b3859b757802ebd048467fd8e139eb9ee8fcdca45ed87dc1c8 + +Count = 91 +Adata = f6e219b29884dab9ea9bad34d9ef8a50ae389c9a908de7154a1f2e894f27141f +Payload = 7e7e33e1a07d4e8fde +CT = deaab2712713cd3f3789d0ee8323ea2ee7a68aaaa9c49b98df + +Count = 92 +Adata = bcca002d69d9d1044c40ae741ea33ce6b8463f5a28d0514e044fdae2fe7d3c3b +Payload = cc88980c73e6c5f0cd +CT = 6c5c199cf48846402437c9fe3d9feb0485e6d7c04423b77a53 + +Count = 93 +Adata = 39cac8f0825ffdb0668455933ad1581263a23b9e5f1305340528f0320d4b1269 +Payload = 34cb528f50d073cfdc +CT = 941fd31fd7bef07f35b87e90a71ffe6c30bee1771078a701ab + +Count = 94 +Adata = 510a02a44d142c8e975d1d933f828fd7e47d28b88223f1698cf009dc3b079be6 +Payload = cbce3df86438a61065 +CT = 6b1abc68e35625a08c9e9c5be0657649448c38692e8d703d30 + +Count = 95 +Adata = 40e0418cd52f74d78a8e18ed86210e3661a86d8574aedcee540340d8996d9852 +Payload = 80a2b835f8b0729a4b +CT = 207639a57fdef12aa213e5f2bfd33101597cfae7cf334a8528 + +Count = 96 +Adata = 1f2938b3bde19e1af91299c08638061dc3c1ea3284c259d415e996477cb37b0e +Payload = dd04794e65ce34127a +CT = 7dd0f8dee2a0b7a293516a7310fbd4ceb90d8db9a86cb6311b + +Count = 97 +Adata = cbae5b46e35fa2a279dcaa4c724b923805d4707412a84252b64228c91cedd019 +Payload = 00c4101052f54462d5 +CT = a0109180d59bc7d23cef6165af65f3522dfbfed0293db39ecd + +Count = 98 +Adata = d0f27c7f42892f3ad4c0029c5b698abb1d035ba5869a665b1de8861db6c055e8 +Payload = d0865445d3b26b6f49 +CT = 7052d5d554dce8dfa00726434c1349e3e874a2d6bf598d05fc + +Count = 99 +Adata = ab0f5a829a9319a74d5d5179aa0a410a0fcf52f344a7a896aeb1f7a6c5d398ea +Payload = 7c7c8580b944ed3fd3 +CT = dca804103e2a6e8f3aab491e60fc97b3cb5248291e4866dcab + +[Plen = 10] + +Key = de1c8263345081d2dfa9afdf37675971135e178df554a4d8 +Nonce = a301bb82f91a582db01355c388 + +Count = 100 +Adata = 9ad52c041390d0d4aaf65a4667c3239c95e7eae6178acc23fb4e70a852d483c6 +Payload = f777aba1fa70f94e6de9 +CT = 9d8bff6d2dcde77104ac6aba025abc01416a7ca9f096ab2529cb + +Count = 101 +Adata = b49c7e7b47870c1cc339c7c09aaacfd6115fa8a0f04990367eea10cfacb9d23c +Payload = 349feebfbe58f93ea3c3 +CT = 5e63ba7369e5e701ca864acb200e85a0d4753a8ba226aca72f98 + +Count = 102 +Adata = e61ca7310172eec16745a73e34516f65844eecd0dbc5566ac5213626b9096ef1 +Payload = 678a40b4c2c7df0e4c9d +CT = 0d761478157ac13125d87869784e3321183d8c044657a020e9b9 + +Count = 103 +Adata = 690f5e5d8da6cdb0f492e80449e152ffe88fea9742564d8383c79cef739a7f74 +Payload = 2b81e0533313664bf615 +CT = 417db49fe4ae78749f5070634d00b1facf0e9e9979ca257a71e2 + +Count = 104 +Adata = 78e34b0a1d61ccd411cbfd306ea2ef3ce89c0b085deb4cfbaec2ab72ce16daa9 +Payload = 1ac63aa38a206d8e7d68 +CT = 703a6e6f5d9d73b1142d994630ed92e2973b22773f229b45bdad + +Count = 105 +Adata = 51bacfcf87ea11da34b76acba8c444792ec3db3c8ee6e600d69679975a682a54 +Payload = 027a7fd7897808ec7a56 +CT = 68862b1b5ec516d3131304571b015bb6b4651f1eb9f6fb3a7b74 + +Count = 106 +Adata = 5159357a133e4743f903d05bd641da369a3675337760fcd2424a99221ba70b78 +Payload = 1086953d352e94a51a6d +CT = 7a7ac1f1e2938a9a7328bb0e11ac4608081fd0702a137da0aea3 + +Count = 107 +Adata = f567820865340314d46a17f520ff315efb6b33bdeda590ca9c4fad604c2d8e8d +Payload = b8b148aafec4a035e9a7 +CT = d24d1c662979be0a80e252c9ec1317ce30dffeb4c9bf3fd0bbdd + +Count = 108 +Adata = 0cfec933831644b468724e808bb3d25fe8f15850ce513fc341da46089c845208 +Payload = 884242a87779d3921f8e +CT = e2be1664a0c4cdad76cb691e32be3cdd9721a13aabad26dba58c + +Count = 109 +Adata = 8edc2b85d44297ac66bdd90d05d8df38124033d6a583bb8dda18a2246ba096e8 +Payload = 25c32770a299020d8500 +CT = 4f3f73bc75241c32ec45333a381be77800654aac335bf9220ac9 + +[Plen = 11] + +Key = 248d36bd15f58e47fcf1c948272355821f8492e6e69f3661 +Nonce = 9e8d492c304cf6ad59102bca0e + +Count = 110 +Adata = 9ec08c7ed6b70823d819e9ab019e9929249f966fdb2069311a0ddc680ac468f5 +Payload = 33709d9c7906e2f82dd9e2 +CT = 9114d36b79b1918b2720f40cddce66df9b4802f737bea4bd8f5378 + +Count = 111 +Adata = ba13974d95f2eeb367b63850609c53dc66c2710f682f10bef0142d48f851b430 +Payload = 84172985e7d194ba28a87c +CT = 26736772e766e7c922516a12c94615be2bd81bd598f3022f5775a4 + +Count = 112 +Adata = 5f16180bfac9b7483774cb0e1d57a43e9bf3cf03bf6fe758293aadcbbef25b80 +Payload = 9a34d32070c71d7de8f512 +CT = 38509dd770706e0ee20c042758e936750e335702542bc598e211c4 + +Count = 113 +Adata = 4352057bdd1735a85dc0fc4dbeedc73279c27eb24a97641236f03f11cdafb8c0 +Payload = 2054a268b1f6fae4f15d91 +CT = 8230ec9fb1418997fba4870762bb2a7d04ba2ad251d595d0619dc4 + +Count = 114 +Adata = ddf118ae403b2509e75eb7a26d17e73e527acbacfbe49a56fa3210169030144b +Payload = f71afe9a60f08a0ef694aa +CT = 557eb06d6047f97dfc6dbc27d85594da3fd35bd8498d7e389ee7cd + +Count = 115 +Adata = 973904409e8154132439926f0dc45c0d81bbbd5793f7f81e20eb818bfa374d58 +Payload = cdf5b47ff73306aa55c496 +CT = 6f91fa88f78475d95f3d80055936db383a8ad10b152046d721d3f7 + +Count = 116 +Adata = 06bca7ef6f91355d19f90bf25590a44a24e5a782f92bc693c031e6de1e948008 +Payload = 9ebf93643854ea5c97a4f3 +CT = 3cdbdd9338e3992f9d5de5d57e228369e24fe955fd8924526af6e5 + +Count = 117 +Adata = 8321f65baf9dc856ac1c24f3fee5c74d697eb0b50470d59d8f4a14b506e86c53 +Payload = 685116faa5cc527ac8bfa1 +CT = ca35580da57b2109c246b76c23abfb3b4eb39deb8da2064390dfa8 + +Count = 118 +Adata = a4e7738038a5116592bb9d92d6d4ed191ab774310f6409e4e45fe907674c006f +Payload = 9e8c4f1292e8d7e5179b34 +CT = 3ce801e5925fa4961d6222b4272c0639e8e6a1d356fb4fea86762c + +Count = 119 +Adata = 0df202431ee7f251a38aaf6aa8cd313782bd293af9114005adfe9faab253b572 +Payload = 3ecc2ba566c723462eb0ea +CT = 9ca86552667050352449fc0633a0f9cdc9490231ec2dd69f6e35db + +[Plen = 12] + +Key = 77a67fb504b961028633321111aac2c30eb6d71a8cf72056 +Nonce = acadc0330194906f8c75ac287f + +Count = 120 +Adata = 8c18486d52571f70f2ba6a747aaa3d4b3ebc2e481ee1b70907dddb94bdfa0ca6 +Payload = 10554c062d269ff6dcd98493 +CT = 7f8b0cad79b545e5addf0b04ff4b0f2b2a5067283210aba8630d0306 + +Count = 121 +Adata = 4e0b4771c7f6c66f9577c430611fdeec5702296ee3691b6bb8c6a81217edabe4 +Payload = 1c9e7875cf02129ac52daeb0 +CT = 734038de9b91c889b42b21275b16dbdf0b9be3c8c82ac652992d630d + +Count = 122 +Adata = 4a687e1d0a95ed2efb95b4c6b040999fcd35136811cd665f934d10224b6064c2 +Payload = 34575694dde459d195b7357a +CT = 5b89163f897783c2e4b1baede629274d654ef5a4480e24f6bef3bc8c + +Count = 123 +Adata = b5330a8447d74a7987fb718cfae246b5c7e057991064eeaf823641a12bfce9f5 +Payload = ab20c8e8aab1aac1e4f64206 +CT = c4fe8843fe2270d295f0cd9142ab5407a08b648ce24e9955e28fe47e + +Count = 124 +Adata = 4f19bbc3135d7a216465b4c1df2616e8bfc3cc64af0bf52bdc42543f4d2448d4 +Payload = e556ca05bcd1991d2c9836a9 +CT = 8a888aaee842430e5d9eb93e151e94d311c7cd2c1b9048575076ceac + +Count = 125 +Adata = b6ffc7387b19786282bda7caad52eb37fbe7e557afcb80faaf57767e2a0f178a +Payload = e5b665600a2aa413e117c538 +CT = 8a6825cb5eb97e0090114aaf61b71330d72506050368186a5619f180 + +Count = 126 +Adata = 6a493c5ef3769ccc4101dbb2eb36e1e5bbc577a057ce0731203ba3f25b52497b +Payload = 870864a611aa0475d120bc40 +CT = e8d6240d4539de66a02633d7ea21e36f99e5aab6ffa85994d13d5bb0 + +Count = 127 +Adata = 8215753d9efc51325f182199e39f9082cc3fe524400f2a7434c68df7eb2b06d4 +Payload = 71afe8d00c6f2ea8c8b050d4 +CT = 1e71a87b58fcf4bbb9b6df437cc93a50dea11c5e0b19f14b9c8f16bd + +Count = 128 +Adata = eb8f198da6ee92a03913c6575343f6c749d2377a09430eb751b13c041e6edbea +Payload = 7021f18b8f398a5999fcdcd1 +CT = 1fffb120dbaa504ae8fa534699cbfd1beafa2d2942f6812b8dfc88e6 + +Count = 129 +Adata = de2ee30359e390db72f682c2ca0f14b72b60ff9bccd8c6fbd19a512b12add794 +Payload = affca856eb412f0b3276ae6e +CT = c022e8fdbfd2f518437021f9337405235dce6161441caa25cc6007c6 + +[Plen = 13] + +Key = 0d423519e4110c06063061323f8c7c95387776b6ee4e4b6e +Nonce = 39abe53826d9b8e300fe747533 + +Count = 130 +Adata = cdd9bf1b4f865e922c678ec4947ea0cb02e78bd5c1538f33aeb818ad3f47e519 +Payload = 4021ff104ff1dbd91e46db249f +CT = 7953d3cd66d093785d123f65ba37f16761dd6aedbfc789ad96edf1490d + +Count = 131 +Adata = 342de5fe61e05c2e58ac2978a871fbdf186a7294ec5f85c4631c21b584231211 +Payload = 95050ca1d494bdb561d4840f8a +CT = ac77207cfdb5f5142280604eaf8f8e855ae975a1fc64bcce3e7492e9d6 + +Count = 132 +Adata = 7871482948d8d09d0a7491d915543082cb5fc7d6c1e82ee2218279f54c15c154 +Payload = c45823203b20821a48502f9c67 +CT = fd2a0ffd1201cabb0b04cbdd42017a6515156691b3161b747576078da4 + +Count = 133 +Adata = 65781d018f27ca0c72a9fa9ab4648ed369646dd3ce45d7ad3a54f6b051f1b6e9 +Payload = e901661b7d47c9918244ee1077 +CT = d0734ac654668130c1100a515225cec7d2566a07cd78181ae94577befe + +Count = 134 +Adata = 05556b04dae5cde8525633d1862aa200c54af534e302d2cbd34ddc2b78532a60 +Payload = 5556f799d6a6cffb343f28c1a9 +CT = 6c24db44ff87875a776bcc808c133f51dac00f973fd42e0948fab70ea9 + +Count = 135 +Adata = 151304e3e4f3c2d4d3227e035d849e0d3841ba00cf6cab1cf2e3e4d6cc760623 +Payload = 56bf26be81c7b55ef898e23981 +CT = 6fcd0a63a8e6fdffbbcc0678a4fe78bdeaa8d408ffe8fe64811aa87742 + +Count = 136 +Adata = f870cc1fe67d6169279f905b0fe5fd9a0436c36498e4b7c6f584f00f7efe8784 +Payload = 36b304a72dbf4acfffa1d7d624 +CT = 0fc1287a049e026ebcf533970197228d155dda2bc814ff33ebeb9a7ffd + +Count = 137 +Adata = 5692c9d452ea1c067e62fdc554ddd2b18c8433d59067f971316797fd9853ae6a +Payload = fb529eb5ae79a0830474ffbc98 +CT = c220b2688758e82247201bfdbde7ba03e144e34a4ab34791a372a2b8ab + +Count = 138 +Adata = dcf7fe16b7ca9e27ec3291103398eaa2e77c7b770b67f8858c215af4c523822d +Payload = 6218c778955d9a56360f06c704 +CT = 5b6aeba5bc7cd2f7755be2862103c2eb5ef0657306d12b753a0694efcc + +Count = 139 +Adata = b0f1e2668611dca86e8d0f58c2a4cf4a9472d81ba013e271800b75841fe5ffde +Payload = bf6b143fb713a81c965c5a9d8d +CT = 861938e29e32e0bdd508bedca87cc6119151393461ecf65bfe06e0163b + +[Plen = 14] + +Key = a60cf7ceb62bf3118532bc61daa25ce946991047f951b536 +Nonce = 7499494faa44a7576f9ed5580d + +Count = 140 +Adata = baa482c64eefd09118549a8968f44cfea7a436913a428e30aa4ab44802a4ba35 +Payload = d64f9426febce6a84c954dd5ded5 +CT = f7580f17266d68237747bf57c7ed8242ac1a1979c5a9e7bc67d7698c7efa + +Count = 141 +Adata = 2ad8ecc5ac9437ace079419f17e6018625b10490120fbe2f12b41e64b73b653c +Payload = fcd9b67717bcadeceddea336c671 +CT = ddce2d46cf6d2367d60c51b4df4918abced491c063d8bfd0e7341febddc3 + +Count = 142 +Adata = 7585ee95e74d7a869bdc0b59ca9939dd57e7b09afab179079d467bfe0668416c +Payload = 18232d7c792fb80e6ca1c8f2c3cc +CT = 3934b64da1fe368557733a70daf4659ecbb3dbfbcdb0f913abedf8afab05 + +Count = 143 +Adata = 41be6ca6188f34da1ce83fb8c27652848dc2a71e32bd3631fb9b33ae69e5d879 +Payload = 764dbefb42644d18d23e5e456868 +CT = 575a25ca9ab5c393e9ecacc77150a220d5ec0b5397d6b4e323b5dc7d1b63 + +Count = 144 +Adata = 197cee3b15320d57996191dd13106fbd4546a5cc3d2bcf0c886af52ea3d9a855 +Payload = 8003586af34bdd0acae4f5547394 +CT = a114c35b2b9a5381f13607d66aac3a5f713f5d0793b732c6e114805cc9b3 + +Count = 145 +Adata = ee0b647a47656a6e9e09c2d64f734a2cc3fd45b7ee52fea51c24af59ee22a006 +Payload = da143266516a4145cde92c93f961 +CT = fb03a95789bbcfcef63bde11e059ed90e8650bc16f590789dcc625b9e63d + +Count = 146 +Adata = 9f5bfffa01f1425d95465723735b49fc1dffbad06cf37a00ca4b59efa21739c1 +Payload = 3842b033f3ca31a6f8e5a638b39e +CT = 19552b022b1bbf2dc33754baaaa6bda183dda1aef021d92210e27cdd7c5e + +Count = 147 +Adata = 64e92ba2748d07f602808f7c5ded15cb0e43140400d37107e59a01e7d45b4c9c +Payload = cedf60b17185fc71b957cb759260 +CT = efc8fb80a95472fa828539f78b585e4087fb314f893937e95383e66745c0 + +Count = 148 +Adata = 6ebcaeb4bd44ff4c990305ac64264dfe2ada5f7cd4b294eb9f492865cd28905c +Payload = 035f449bb28f43365f4a0556096a +CT = 2248dfaa6a5ecdbd6498f7d410520a71ce5813c578532b742d704fa92276 + +Count = 149 +Adata = db617207dccd1f6baea5f2242d5e577adb8d69af3bb1707a7a53a8b75452455c +Payload = 9a2a45424f4965a71270e77cc403 +CT = bb3dde739798eb2c29a215fedd3bb7fc45d15d6939668065d2282fc589c7 + +[Plen = 15] + +Key = 82d4bc9aac298b09112073277205e1bf42176d1e6339b76c +Nonce = 70325ef19e581b743095cd5eb1 + +Count = 150 +Adata = 6d14bb2635c5d0ae83687f1824279cf141173527e1b32d1baf8a27f7fe34a542 +Payload = 25a53fd3e476dc0860eeeea25fcb0c +CT = 4a1cfd0023557a184b929965b0a445cb3993ca35acf354cb2b4254ff672e7f + +Count = 151 +Adata = 9f8a56fecf32fa7d50f033b2524c3d798e254bc87245cce57e38edd6ee5d5f1a +Payload = 797dca47597947c057789433309b67 +CT = 16c408949e5ae1d07c04e3f4dff42ea25b5eb103bac224cad66ec0f100875c + +Count = 152 +Adata = 86f15b8b677b7655f358a2c7fd5785bc84d31e079ed859b6af88e198debd36fc +Payload = e61f9a663d3a2b50ea2f9475971270 +CT = 89a658b5fa198d40c153e3b2787d39b598cc6ec2295c586e7ae270a01846d1 + +Count = 153 +Adata = 4de6bd43c28143ea5d40919cb5330a7e674f5bd8aeb7b178343a2851281c8668 +Payload = df990c42a268950677c433555319b3 +CT = b020ce91654b33165cb84492bc76fa97ff732093f7d0a96b30d8cdfd1bd583 + +Count = 154 +Adata = a5c3a480dea1b2a1e3a0ce416148b04f60104217c9d24a5b267b4aa6aa07a4dd +Payload = a7e72fb4bec3768594a2f6f5b4379e +CT = c85eed6779e0d095bfde81325b58d7ad98e32a9156e125ff021ef6951b0c40 + +Count = 155 +Adata = 51b041f1666c59045d333fe63d43457107e1adad34fcbf965e0d191f3e414776 +Payload = d3d1550047cf90eceaea7000d8e280 +CT = bc6897d380ec36fcc19607c7378dc9390f10df08a84c21031626861b201fbd + +Count = 156 +Adata = 22f8a3c9d85b2d53ffd92078d3c94373f855ecd01a8ac521d1abd0f2c7cba9ff +Payload = 756412c4ee6416f2f4e0342011cde2 +CT = 1addd0172947b0e2df9c43e7fea2abdd5d840bb8c4348a9a548482e6b93043 + +Count = 157 +Adata = da08b14e1b770b81faaf1e59851df1cba8838cd63bef141340ee378e65fdcbd4 +Payload = 666e4a4b3f6cf598aa763cdada4109 +CT = 09d78898f84f5388810a4b1d352e403f0d49927cd6103e3705ba201e8f73c6 + +Count = 158 +Adata = 2db3ded385ef9c82fd39ea5782d9befe66e8a070066269b2aa7c4bbfac3711c3 +Payload = eb9013a74352b0677a88bd73052477 +CT = 8429d1748471167751f4cab4ea4b3e2d97f7c2b3b42bf570cce79bf30ccc50 + +Count = 159 +Adata = 194c9e1eaa8e376f9c41bf33823efa28ee60a9213438665b7002cf0fcad7e644 +Payload = e3126400e3c571a4d39b37bc938a22 +CT = 8caba6d324e6d7b4f8e7407b7ce56bd3c2a4fc45d014a0c54edab2930a5bdc + +[Plen = 16] + +Key = 6873f1c6c30975aff6f08470264321130a6e5984ade324e9 +Nonce = 7c4d2f7cec04361f187f0726d5 + +Count = 160 +Adata = 77743b5d83a00d2c8d5f7e10781531b496e09f3bc9295d7ae9799e64668ef8c5 +Payload = 5051a0b0b6766cd6ea29a672769d40fe +CT = 0ce5ac8d6b256fb7580bf6acc76426af40bce58fd4cd6548df90a0337c842004 + +Count = 161 +Adata = e883dd42e9ddf7bc64f460ba019c28597587d06e57c3b7242f84d5e7d124ab81 +Payload = b31dfa833b0cda20eaa84d2ecd18f49a +CT = efa9f6bee65fd941588a1df07ce192cb8707b1a4d9ce3def33703e19eaab6dda + +Count = 162 +Adata = 409401eb49cd96b1aad2525c5124c509766ff86f88b2011c67a1d501d3485e31 +Payload = 24bc8dc1e2354667b79ba4d7061448ff +CT = 780881fc3f66450605b9f409b7ed2eaefd9041ddce37d88e79fba28e385b2327 + +Count = 163 +Adata = 83bf5c063bf1febf71688a832d615e09d6f14badedeaeb6ffbfe343fc7274e78 +Payload = d41d95a1d2326e12cba636910ddfca53 +CT = 88a9999c0f616d737984664fbc26ac0291d971893543868bd8c69078fc2bdb24 + +Count = 164 +Adata = 8cdd70524e24318c64d681aa27752d4c86c5348c05c9e48f06ed41594785a6e6 +Payload = e8a4b80e081919f1912542d3136764f2 +CT = b410b433d54a1a902307120da29e02a3866b23e4c991f4007e56a1ee9265c6cf + +Count = 165 +Adata = 615985f63571c0f94ffcd4df77326abd41e84f388f061d97573a181da7ee5695 +Payload = 7fca7388058d6d1438b6eee0292131cb +CT = 237e7fb5d8de6e758a94be3e98d8579a2abbea637996b954027efa9464ced6b9 + +Count = 166 +Adata = 17aa90f2bff0419011b01dee62be31354431cbc89f22332704b096143d4743f4 +Payload = aa540554ee80dbffa475f702d862d6b6 +CT = f6e0096933d3d89e1657a7dc699bb0e757bc8d48d82ebefc76f17323c518ecc2 + +Count = 167 +Adata = 85288b2be612e42335c144fb058a7dcd567c382fbcee3962bd5be4cc7a7000a8 +Payload = 6d745581831edba437e70ea89cad217d +CT = 31c059bc5e4dd8c585c55e762d54472c65470c81e487a26cdc26830f2b51bd1c + +Count = 168 +Adata = 288f9f52824b54b608dd7226a0a89d43ae8c05107dbae761e1c756911a003b74 +Payload = 811a61869c7a6b2aa9ac0fcc523ef784 +CT = ddae6dbb4129684b1b8e5f12e3c791d5a3043722be9448c3ef144f2288066f75 + +Count = 169 +Adata = 51dbaba180d4746edbb3420461919b5b735797bf7dd19f84d80475f5efc2748d +Payload = 378a4e39817f308ed1e639f943b694c4 +CT = 6b3e42045c2c33ef63c46927f24ff29549aba95e04e11cf18ddf73773d395c1a + +[Plen = 17] + +Key = 3cf8da27d5be1af024158985f725fd7a6242cbe0041f2c17 +Nonce = 07f77f114d7264a122a7e9db4f + +Count = 170 +Adata = 30457e99616f0247f1339b101974ea231904d0ef7bd0d5ee9b57c6c16761a282 +Payload = f6dd2c64bf597e63263ccae1c54e0805fe +CT = ce3031c3a70600e9340b2ddfe56aa72cffdc5e53e68c51ee55b276eb3f85d2cf63 + +Count = 171 +Adata = 42370f115bbd4b31bb99fe82cca273b3c93072f96b2e09bdc6718d926d48db69 +Payload = f45fee3e086c28a7c590ec0cc05b972664 +CT = ccb2f3991033562dd7a70b32e07f380f65c6328a7476db2c10ec7bca3f6bd3df42 + +Count = 172 +Adata = e2d692c5678124998a7862b8e87276b0a19e293a609103c99583b36305bcb2b0 +Payload = 4ad69a8ab433ed8909825c71f6081f64a7 +CT = 723b872dac6c93031bb5bb4fd62cb04da68080f0d51d3b8841683eff361984f7e4 + +Count = 173 +Adata = b5b38791160959dd2836ec1ad25286c1ba410d7212347a95b5738a3d725bb651 +Payload = 3d47071c13f994cb42fb2887e5c6e53a54 +CT = 05aa1abb0ba6ea4150cccfb9c5e24a1355c1428ef5d40bc9e363817f219af2ed56 + +Count = 174 +Adata = 02691171795a77d1e3bdad513b6fab5b50d1def81bcc1df15012de3433a6aa78 +Payload = e8a4b80e081919f1912542d3136764f264 +CT = d049a5a91046677b8312a5ed3343cbdb65fdfb37dfd1236198035c8461b304152b + +Count = 175 +Adata = 7371d8ae79e628f53ffede174eb068db2318c05e2f6d94ad2233a59369b16db0 +Payload = 549aa84bb182312dd016e3107f3b1f9c5b +CT = 6c77b5eca9dd4fa7c221042e5f1fb0b55acefde0e84a3ce0cb702ceb73ca1dd9a5 + +Count = 176 +Adata = bb1e1f51082e470f7245458ec902098e1e41d0ed28efa31be71d21ce86527ff7 +Payload = 31a12ca6d69db2e6e252474d7d59ed6552 +CT = 094c3101cec2cc6cf065a0735d7d424c53f8441d46dc5456a587b765e1a820c11c + +Count = 177 +Adata = 7584f57b49e95bbf5a67153e18b9b8c4722644e8f611613c39cbe8c679aba5b4 +Payload = 5bb121e70452a954f420a56aca8cd5c059 +CT = 635c3c401c0dd7dee6174254eaa87ae958d0daddcfcc92349ef059149c54a25cd0 + +Count = 178 +Adata = 505687182c06e6f4effe7fe03c1f436199a9015380ff21d0b2aa9453cfa10b1d +Payload = 5b80d1cf745b14cb71cbc8dfe0bc7c7358 +CT = 636dcc686c046a4163fc2fe1c098d35a5948c1242b89490c6ee69dedc1e91286ee + +Count = 179 +Adata = 7ebb051741145a3bad87131553375c6debcbcecee9b79ee451bd1429cbb33fc1 +Payload = 79ac204a26b9fee1132370c20f8c5bcada +CT = 41413ded3ee6806b011497fc2fa8f4e3dba2ddd54e509bca0a45dcf2fd514e1496 + +[Plen = 18] + +Key = b46a3a24c66eb846ca6413c001153dc6998970c12e7acd5a +Nonce = b79c33c96a0a90030694163e2a + +Count = 180 +Adata = ea9405d6a46cac9783a7b48ac2e25cc9a3a519c4658b2a8770a37240d41587fb +Payload = 56d18d3e2e496440d0a5c9e1bcb464faf5bc +CT = 01baba2e0d5b49d600d03a7ed84ee878926c0ca478f40a6fbde01f584d938a1c91bf + +Count = 181 +Adata = 72340d595f3dbd23b46513f8f2b73b6249328c705e7968084bcb647fe734a967 +Payload = 7a76eac44486afdb112fc4aab939e4d1eedb +CT = 2d1dddd46794824dc15a3735ddc36853890be4646492b6f4cb169383c075756073b6 + +Count = 182 +Adata = d5c87c649579da3f632ba95cb0a07c924095e4bdd4e0376e06bb90e07460172e +Payload = 48348c5ec996f7a97ef0ba2cd6885572fe64 +CT = 1f5fbb4eea84da3fae8549b3b272d9f099b4f584289f560cbf76606942fe1a92dd63 + +Count = 183 +Adata = ffa6277395d31d5db13034d362228a87610e441c98ca3038e252a9db12bdbcef +Payload = d5c58f10e1a03d8a2501d1eaf5fcdfff3ae5 +CT = 82aeb800c2b2101cf57422759106537d5d355964f5f5532d7cddd7207f0e9a6aace9 + +Count = 184 +Adata = daf83d02a9bd992ea58c23e7ad18d41796314bae20e864e729f40ccc215454fc +Payload = da2a863ab1c58ddde320ecadeecac9c5d2d8 +CT = 8d41b12a92d7a04b33551f328a304547b50890ae047e35aecfc38ffdc07e7d8f5705 + +Count = 185 +Adata = 21ddad5f550044dc5cb123ade17eeef549c4e0173b216bcc602c1e736764cca8 +Payload = 4573969afa831c244817230406fe51183091 +CT = 1218a18ad99131b29862d09b6204dd9a5741b2bdf539ceaa35015712dd15265ca476 + +Count = 186 +Adata = 9228265ae5c3daf1485ff8011738da508bf2a73731396c5d9aa56fc554e0c00b +Payload = edf5557e15473b747a819398c9ac1459ffdb +CT = ba9e626e365516e2aaf46007ad5698db980b241412124ae20b84c13b0c3671d305c9 + +Count = 187 +Adata = c0a2ff0de21b3ba961e06015ccd71374856a65a4c57cf8cde0a1643aca8ed868 +Payload = e139263478900df806a0f3446bd6600c1aeb +CT = b65211245b82206ed6d500db0f2cec8e7d3bee9803747bf9fa63412bfc4e10aea89e + +Count = 188 +Adata = b54378f031a31cf3985f573829c9ffca14616742e0a7e03b0a2d7f05eff0219e +Payload = 660eaff0f113eaa2f5f7ad4b62bb849a3a25 +CT = 316598e0d201c73425825ed4064108185df55afdf430b57845dcf622d4f25cdeb2a3 + +Count = 189 +Adata = e67f35c18a9336469eae23040f98f52338ca8d0cab269ac32fe6bc7605d3ea56 +Payload = 0f89897271f5d0349d57399005ea60c0cadc +CT = 58e2be6252e7fda24d22ca0f6110ec42ad0c7ed4c04c4b4dd585891ecfddeab8cc87 + +[Plen = 19] + +Key = 7b71045ccef735bd0c5bea3cf3b7e16e58d9c62061a204e0 +Nonce = 2b9ecfd179242c295fe6c6fa55 + +Count = 190 +Adata = b89166f97deb9cc7fdeb63639eeafb145895b307749ec1a293b27115f3aa8232 +Payload = 890d05420d57e3b3d8dbef117fe60c3fa6a095 +CT = f842ff6662684de8785af275fa2d82d587de0687ebe35e883cbd53b82f2a4624c03894 + +Count = 191 +Adata = 4392c3043287dd096b43b4a37ea7f5dc1d298b0623ccbf4fd650a49569a5b27b +Payload = 6b425cdcdf8304e7fbb70b2973d55e6940025b +CT = 1a0da6f8b0bcaabc5b36164df61ed083617cc807d4824f0a98db2d87365a42ca3b80e1 + +Count = 192 +Adata = 9b4fc98fcdcf485205e7054bc9d1e02d0d8584420537e20d3821de2fd6824787 +Payload = c8bf145fcffbafd6cd1a4c5b6cedfe008aacb2 +CT = b9f0ee7ba0c4018d6d9b513fe92670eaabd221404e631735c544edeeb4c0105c55bf0b + +Count = 193 +Adata = 45622e1472542be2f63f463d253617eafd4f2ad609f9020884905dd5c22fba53 +Payload = 12b5a76faedf6f855e328c2cb87be8aea78c5e +CT = 63fa5d4bc1e0c1defeb391483db0664486f2cdc16a4cf37e8e96eed1217d21133e83d1 + +Count = 194 +Adata = 958689aea3c6cd19020eff9d635ef44ee0793424df38fdf13a238b969d429777 +Payload = f0927c3cb0a876d7877466507da8bfa0bd9a16 +CT = 81dd8618df97d88c27f57b34f863314a9ce4859facf81a636351f6e67d6ec12636ae0b + +Count = 195 +Adata = c22911efc36fa739048af0c951ef2449bb3605c52f65120c4d71fe5976026032 +Payload = d2c5d4e2362f19c99de66da7bd9c495c03d9a1 +CT = a38a2ec65910b7923d6770c33857c7b622a7327ce73a7e2db69d30441f89a03fd0e84e + +Count = 196 +Adata = 799da61e2c10ebb4783f618b8f69da7704a1b2b925cebc228af57d7ceebb9825 +Payload = 1c9d7f5b329ef4d384b8b7955a20f8a3fc15cd +CT = 6dd2857f5da15a882439aaf1dfeb7649dd6b5e8d787a9d06b8533ca96fb1db8aecc8e5 + +Count = 197 +Adata = 14a8e18afe0b9fe18ddfd754219a7e18ed36f419f8262d91678e10daffb31c81 +Payload = 3a64414c3588d7c26871d7d054ac6c8420d491 +CT = 4b2bbb685ab77999c8f0cab4d167e26e01aa028ff5f819d552c08054b5ac02063e102a + +Count = 198 +Adata = 7294a8b4ad97c81969e4a2876a3dc0ee322d554726997dc9ed98c5601985ee5b +Payload = 545dd71bea9967e07a89f84a2027aacd132187 +CT = 25122d3f85a6c9bbda08e52ea5ec2427325f141cde5af8fada67c47cbb5787a6b2d9c9 + +Count = 199 +Adata = 99294b22d73805805630fb416d20d4fca67419ab660ff45cd19a3729e81b9f69 +Payload = ec1b17b885c018272652453f47fa6e9ed972b9 +CT = 9d54ed9ceaffb67c86d3585bc231e074f80c2a7412640b179bd3e8a417dc38462c16e8 + +[Plen = 20] + +Key = dc7c67715f2709e150cceff020aaacf88a1e7568191acbcf +Nonce = da56ea046990c70fa216e5e6c4 + +Count = 200 +Adata = f799818d91be7bab555a2e39f1f45810a94d07179f94fe1151d95ab963c47611 +Payload = f383bd3e6270876b74abbb5d35e7d4f11d83412c +CT = 377b5df263c5c74f63603692cbb61ea37b6d686c743f71e15490ca41d245768988719ede + +Count = 201 +Adata = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8 +Payload = 615d724ae94a5daf8d27ad5132d507504898f61e +CT = a5a59286e8ff1d8b9aec209ecc84cd022e76df5ea9bc8cfaf2a1734a792076618c4b9690 + +Count = 202 +Adata = 4586f73a1f162b2cdb65f6e798a60b5f48938d40b4612d84c1f39244f14efdce +Payload = 6e923e1f404002aa5cf8f8aaf1b9772da425e21c +CT = aa6aded341f5428e4b3375650fe8bd7fc2cbcb5cc5122df904b052e4d5580fdeddf5297c + +Count = 203 +Adata = 9f7ae892e5662803408d4d062265846441a43c1fa202da59f640ae722a692671 +Payload = 68115771505daa18bb3ce90054bfb7d077e1f37c +CT = ace9b7bd51e8ea3cacf764cfaaee7d82110fda3ce0ba1bb1af18e15ade3316c21d6b41fb + +Count = 204 +Adata = 1f0769a7ae82bd985661e031c4a892c15d3ef37bdcfb45243d02f40fdb51d34b +Payload = 681fd2a324b3fea4cfebed567ae4546ba373c8f1 +CT = ace7326f2506be80d820609984b59e39c59de1b1dc71e342fbc44289ef7e53e28edf3839 + +Count = 205 +Adata = bf957ef5ab2805e58ea752da5793f7f23d98fce1b2b67738929e5de8a15f9801 +Payload = a7b9d2d069941e8b943706a02d2847ea713bb103 +CT = 6341321c68215eaf83fc8b6fd3798db817d59843ced1fb4a2a3e349aa590aabbfc3d13bc + +Count = 206 +Adata = 833264c1bebb597043b4158087cb651960915d9023189c9509c0d2aed84e7fe4 +Payload = 9b946e8198ce69d2173e970f4e0c103a47ee4160 +CT = 5f6c8e4d997b29f600f51ac0b05dda68210068205079f6c2739e2b789b6e3d3c60389374 + +Count = 207 +Adata = 94c8414cbbec52e2d73bb8f02ef687c91432495c0c744666317d02e6d46706d2 +Payload = 81ac4618f3db6bcf9bbf67220b7671be4bb4f8a2 +CT = 4554a6d4f26e2beb8c74eaedf527bbec2d5ad1e22a02f287db7217148317d897f65f6a0c + +Count = 208 +Adata = fced1131dab3dabdc1a16d3409fa09a90ffe02f0e2c814a63f77f771c08c3389 +Payload = 90851933d4d3257137984cdb9cba2ca737322dac +CT = 547df9ffd56665552053c11462ebe6f551dc04ec362df9f8b41b1dd4821f8f14e9e633d7 + +Count = 209 +Adata = 495dfcf91f4735ab35c6bc4deef8468bd988e4099cd291a32b4707f93e13d82b +Payload = c14ce6d57f0fe7367331c9fe159ae1fb8f1ccb2c +CT = 05b406197ebaa71264fa4431ebcb2ba9e9f2e26cf61ffb51e56497ca9f39c6665fcbdfa8 + +[Plen = 21] + +Key = f41e369a1599627e76983e9a4fc2e963dab4960b09ebe390 +Nonce = 68ef8285b90f28bcd3cb1bacea + +Count = 210 +Adata = dbe3e82e49624d968f5463ceb8af189fb3ad8b3b4122142b110d848a286dae71 +Payload = 81ad3f386bedcbf656ff535c63580d1f87e3c72326 +CT = 9f6028153e06d14d30b862a99a35413413c04a49dc6f68a03a11cf00d58f062a7b36465d13 + +Count = 211 +Adata = d9acfd611e5bbb08c5d05d56791b8aebabf8d69734ec89153c91a1f65b2e1adb +Payload = 35f6bb3f6a388f3a5a039b0a495b676d0b928aeb19 +CT = 2b3bac123fd395813c44aaffb0362b469fb10781e3ca1fb470b666523a19f83481f16481ed + +Count = 212 +Adata = 6003b771afe4e99e1ef1ed4a31b10540d95f4ac49885f0c8e5cdcb63d213127e +Payload = 6aa7e3802b5a29d4f9ca88eb59f94af783d1054466 +CT = 746af4ad7eb1336f9f8db91ea09406dc17f2882e9c53cb05bfcd64da2b45c2e9a89a380b49 + +Count = 213 +Adata = c371644275a6290821e7d308714bec2bf62d36c30f7fa77a0d60b28894f1c82a +Payload = 13332b67ba5ba18137c306bd860dc3eb0a9a0b871a +CT = 0dfe3c4aefb0bb3a518437487f608fc09eb986ede048f70fbc680cf7092b3dd90b943fc6e5 + +Count = 214 +Adata = 8eceb15300ec4220510ed5b7deb3429de6ae5f618e1c222c28990a9ab4b4bac8 +Payload = 05981dc26a1db2d8e2c3d85ea9a4d1dc3432d9edc4 +CT = 1b550aef3ff6a8638484e9ab50c99df7a01154873ee386f33c0b8da8d0c5934e617dd618e5 + +Count = 215 +Adata = 96d1cf3690c48c77a155ce13e67bbd62e6f03d88c893c1f7c30a6435d5ab36e0 +Payload = 60249343a8cd4d33c6edc583ea7e5c221ef3064787 +CT = 7ee9846efd265788a0aaf476131310098ad08b2d7d3d2db1360fb1121893f4d197731bce4f + +Count = 216 +Adata = 379bbc9f919dc2a8687f2a86cc9c3291804240a9b566c58519956848102e6155 +Payload = 79003a8d3d20d412f468f11712cec4d37cee847440 +CT = 67cd2da068cbcea9922fc0e2eba388f8e8cd091eba335ce1bfafc0948f2523e75f2aad86f9 + +Count = 217 +Adata = 9bff9c9a8f94cd77e7016748da31f86d1b9c68465cbf954511c93a4776981524 +Payload = 7d078a8b200514a00628756250d410f7a0f8a769e6 +CT = 63ca9da675ee0e1b606f4497a9b95cdc34db2a031c7dc265e281307f0f4c38cddc556ac725 + +Count = 218 +Adata = 25125a4668c31dc2e8a68b6c4c95ad7cf9322852e371b415a357d09acb01b587 +Payload = d9b0eaaff786165f882f41a98dbc0c355b3a1aaf40 +CT = c77dfd82a26d0ce4ee68705c74d1401ecf1997c5ba61c78a2f85a447c3e62b6197d65b9065 + +Count = 219 +Adata = ad34d8f0902a5b79fb145b8206bb4d3b77e0bd8ae2d0964815389eacb33b4007 +Payload = 17b517ef577f588da374340d2522cc9ea642c8d8ae +CT = 097800c202944236c53305f8dc4f80b5326145b2540312d067c08a9b4400e1df8bb7ed671a + +[Plen = 22] + +Key = 3289e59e3a7b29bf4a309afc253030bba4b9bdd64f0722f9 +Nonce = 30259ce106e9bd7a8bacbaf212 + +Count = 220 +Adata = 2870bd9a26c510e9a256920899bbc77a4eb9b53f927045a943d5ed6b13638cf3 +Payload = 53911a67b65738f87fc7c20d6db8044bde1af95838d1 +CT = 70cf37d4b6f7e707376b1574ce17c040b5143da47abb2fe9afafc2fccd98ccf63b0fdec30eac + +Count = 221 +Adata = 611032a95ee87f89ad6be7c0fed8bd245c5f81076087b3bda4cde5587b8d14b6 +Payload = 46917e38b8a542296d290d065b0aa7c8aaa38950c386 +CT = 65cf538bb8059dd62585da7ff8a563c3c1ad4dac81ec102dfd8c231d6a355f079c213ce6858e + +Count = 222 +Adata = 2e7ea26d1cceaca3b7862a7a8469e366b52ec27ca127e3317222ee651d8da4a0 +Payload = b527828c89f674dc6f024f8cdd80c694bb3ebd57b2d9 +CT = 9679af3f8956ab2327ae98f57e2f029fd03079abf0b36df11febe34dd568da12c374674b9ac4 + +Count = 223 +Adata = 0bf4413010daec585de34142224d1cad3072f9720f91ac664ad152820e838741 +Payload = 78230f73f9c0150f630eca4cd679818551d449db82e6 +CT = 5b7d22c0f960caf02ba21d3575d6458e3ada8d27c08cb2916540d9439b832aa44236a7e187ac + +Count = 224 +Adata = 2e7cae3306582eb5bad148247aa6c6ec943f8748e84b8a069ca9488b11844716 +Payload = 847bb12e0e56fa07a086eeda5907ae148148fa4107d2 +CT = a7259c9d0ef625f8e82a39a3faa86a1fea463ebd45b80d0768a18dead55700901408aa3f901a + +Count = 225 +Adata = 63036dc4ad13aee5dc1832e867f7538da108188fec7b08262af440d07579c451 +Payload = ec59e208c4bb429a371f1b3ffdf07fce5dea8a05f0ce +CT = cf07cfbbc41b9d657fb3cc465e5fbbc536e44ef9b2a45f2073605d2a441805b6ff89d8beb68c + +Count = 226 +Adata = f9ec5ce4b63156d57e451eb67ab6d7a59cc397f43f6d26dc07d1036f0fb4a8cf +Payload = fb12d94bd21b5748b23132a03065c78dae65a0bd2cfb +CT = d84cf4f8d2bb88b7fa9de5d993ca0386c56b64416e91dcabef6907811c6b7df4e74c7a63d83b + +Count = 227 +Adata = e13a204e16f42bbf4716e95f1cb7e125ffac66a87f591c8ef2c7b8485ff707fd +Payload = 239fa31d4a65de0318bfc5b60a06d706c129dcf255ac +CT = 00c18eae4ac501fc501312cfa9a9130daa27180e17c626aa8aa37e858cd990f5593d9ef35f2a + +Count = 228 +Adata = c4591c3ad984a1e189c526b719212f8248289eeb277827272b8205d78191eb2d +Payload = 57caadbb1a56cc5b8a5cf9584552e17e7af9542ba13e +CT = 749480081af613a4c2f02e21e6fd257511f790d7e354d81e424d6b4528901ae46fb35f8b3106 + +Count = 229 +Adata = cf4795bc7f43c30d3c3a8fd1b8a9d77d69bf59eb8b59d0f464315f40cb52335d +Payload = a68c74e05f0a44d4a0372c0e5915b83d8e6729efacbb +CT = 85d259535faa9b2be89bfb77faba7c36e569ed13eed1f25a4bfda35e1390f3f16f638dcd4047 + +[Plen = 23] + +Key = 40f1aff2e44d05f12126097a0f07ac0359ba1a609356a4e6 +Nonce = 0df3fc6396f851785fca9aa5ff + +Count = 230 +Adata = e9699b20b0574fce8b5cbc4ef792eb96e2c1cce36b1b1f06ea2a95fe300633cc +Payload = 8d98c580fb366f330dbfda20f91d99a0878b47efd14c6d +CT = 579cdf9da62a2df471e03450516adb4ce99ae0f70b1776a39c3b429a1f922fac0b59e29a122e43 + +Count = 231 +Adata = bd94c9ad6253c25dc417f87b6e52e03621ccf4b3bff5b402677aeb51e216335f +Payload = 7391ba60fabe2c632bbaca16af9a235b2c7dae61691c0b +CT = a995a07da7a26ea457e5246607ed61b7426c0979b3471067bf538e40f9366adf8758968f06ce8a + +Count = 232 +Adata = 4f263cda4a50b0e5379ec2fb546b326a07943527c1d175c029455a917753883b +Payload = 7e1e93a6ca35a2c0e4f08fdb2e7ee22b9f486f0ab919e2 +CT = a41a89bb9729e00798af61ab8609a0c7f159c8126342f964a1199251b54f419720a30de83161de + +Count = 233 +Adata = 4d43702be4f0530319555d7f1a3356160f6cae48051f12e22a153d7e405c1149 +Payload = f94ff053c7413f34f96eae41fd1ac101151069af5a9428 +CT = 234bea4e9a5d7df385314031556d83ed7b01ceb780cf33b417e4cceb8dcf45ef33cc0007755bbc + +Count = 234 +Adata = f4d7978fad36223623ccb5bb18a7373cba8a6e3b1c921259e319266042db8887 +Payload = ba0716355fffb8ef947d2a15eb58375a1ff1084c566990 +CT = 60030c2802e3fa28e822c465432f75b671e0af548c328bd35aed57f49dcfecf248cf9d246ac024 + +Count = 235 +Adata = 12e4fe727b1f27a619dd67bb976ddc2b18b2ef8b7184290d9553494a500d933e +Payload = 872940780a94680a791c937994ceafd2c8b7a22b5f4927 +CT = 5d2d5a6557882acd05437d093cb9ed3ea6a6053385123c97cda0e04d2ff65c2e06a8276bdf6f97 + +Count = 236 +Adata = 2c16724296ff85e079627be3053ea95adf35722c21886baba343bd6c79b5cb57 +Payload = d71864877f2578db092daba2d6a1f9f4698a9c356c7830 +CT = 0d1c7e9a22393a1c757245d27ed6bb18079b3b2db6232b3494dd2ee0a0fe5bfc9f69234c8142ed + +Count = 237 +Adata = cefc4f2fb796c2502329ca3d8f8af3200dd9edb8f164e15acec90536a15b6fdc +Payload = cda681aa3109ebf5f21ee3a849098ea3a551e844fae4b4 +CT = 17a29bb76c15a9328e410dd8e17ecc4fcb404f5c20bfaf9008ead8e923997508eebf5e776198dc + +Count = 238 +Adata = 94fc7eb8febb832097ba6eecd2697da91b5a8a1f2248f67a7659e0ac55a09a0d +Payload = d4f8d262870b5000a40b8fcce88f55c65c4d12e729975e +CT = 0efcc87fda1712c7d85461bc40f8172a325cb5fff3cc45f136cc6ea1b0fdb554e0803053875b89 + +Count = 239 +Adata = 459085184094e302b2e921cc04270b676e75bbcf0e4b53ed387df2bd0e75e0ac +Payload = 732f211061c0a32c6ad124c58418d560ef5eab2602314c +CT = a92b3b0d3cdce1eb168ecab52c6f978c814f0c3ed86a575da8ceccae093888daaf92c95817fc3d + +[Plen = 24] + +Key = 91f9d636a071c3aad1743137e0644a73de9e47bd76acd919 +Nonce = 1bf491ac320d660eb2dd45c6c3 + +Count = 240 +Adata = 3bdfd7f18d2b6d0804d779f0679aaa2d7d32978c2df8015ae4b758d337be81dd +Payload = 4eaf9384cad976f65f98042d561d760b5a787330dc658f6c +CT = 635530cab14e3d0a135bb6eebb5829412676e6dd4995f99cb7e17f235bd660e7e17b2c65320e9fd4 + +Count = 241 +Adata = 9de45b7e30bb67e88735b8fb7729d6f3de46c78921b228bad8f17cc9c709c387 +Payload = 59bee7d18fd4ba573f3e4f61076f5b9f6a3487e47d98c729 +CT = 7444449ff443f1ab73fdfda2ea2a04d5163a1209e868b1d99f40890c7d650afccda40fb2a4cd603b + +Count = 242 +Adata = 783477f981ef0551b5e7a714b640bbb38316c53756c96e30c898cdee3b72e6f4 +Payload = 4e7f3c86d846ff351db81dbe1d2e9ed73ec0450587ae681b +CT = 63859fc8a3d1b4c9517baf7df06bc19d42ced0e8125e1eeb50236cf1a12a9e3542a4051788f9775a + +Count = 243 +Adata = 2851d40243512a43f70f9c25e9b18c122a1433f05c61e65017e197e88b129e43 +Payload = 2db7cb2739c839383b64c2c93c7d5c906d984756c3dedaa9 +CT = 004d6869425f72c477a7700ad13803da1196d2bb562eac59b1bbad9861192df356c6678b2f561ea3 + +Count = 244 +Adata = 1cfa2d62cc1f6313fb0c6eb21803e09cdf61ee3ddb15192529560e5d8096cafb +Payload = 2f2b82497c78369890809460d80a16be4f3330e8a0089165 +CT = 02d1210707ef7d64dc4326a3354f49f4333da50535f8e7951da4211d4c28d2d91568117fc99fd911 + +Count = 245 +Adata = 5a14b556156191b2704936f64df0bf1dd2bd8d587418f4f85472338fcf86aa52 +Payload = 7cfefca725da1b6bb5d9545e3e50f5a624a8160bdb0e7d4e +CT = 51045fe95e4d5097f91ae69dd315aaec58a683e64efe0bbeda99be0e054bb881a25a74b547d3ed5e + +Count = 246 +Adata = 148de640f3c11591a6f8c5c48632c5fb79d3b7e1cef9159c680d71fd1f9801fa +Payload = 5205165c4e9612974dc92f60d1e328d68aa9466e27dbd499 +CT = 7fffb5123501596b010a9da33ca6779cf6a7d383b22ba2694c1fedb47fa30ff2ead6bf382431b2de + +Count = 247 +Adata = f852e38703097cc37c589b7860dbc333e091411462d5576dc9909a8cf6ac99d4 +Payload = f968f2833427abbc9fe1cab7e7a3f905a3b23a35802029ff +CT = d49251cd4fb0e040d32278740ae6a64fdfbcafd815d05f0f338762a4e4299615c67130a28b56a383 + +Count = 248 +Adata = 43df03a0e23c7ad0d13485150ca224c0b3f39d4e5f2d718db6308e003d3dc683 +Payload = 67da6ca42655188af0b8e389152b2a1b6e2c3ed88926afa5 +CT = 4a20cfea5dc25376bc7b514af86e75511222ab351cd6d9559dbdf61387294812f483aad76d48d899 + +Count = 249 +Adata = b297dce04ada2ddebc7e94eff7c51b87eee2f98c410c5c0919d0652653ab7458 +Payload = 9777cf90dd7c7e863506686fc3ba6d3d05328f78b350f92f +CT = ba8d6cdea6eb357a79c5daac2eff3277793c1a9526a08fdf078177541e19b11dfec995f40c99af70 diff --git a/lib/crypto/test/crypto_SUITE_data/VPT256.rsp b/lib/crypto/test/crypto_SUITE_data/VPT256.rsp new file mode 100644 index 0000000000..e9cd7eefe9 --- /dev/null +++ b/lib/crypto/test/crypto_SUITE_data/VPT256.rsp @@ -0,0 +1,1383 @@ +# CAVS 11.0 +# "CCM-VPT" information +# AES Keylen: 256 +# Generated on Tue Mar 15 08:09:25 2011 + +Alen = 32 +Nlen = 13 +Tlen = 16 + +[Plen = 0] + +Key = c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476 +Nonce = 291e91b19de518cd7806de44f6 + +Count = 0 +Adata = b4f8326944a45d95f91887c2a6ac36b60eea5edef84c1c358146a666b6878335 +Payload = 00 +CT = ca482c674b599046cc7d7ee0d00eec1e + +Count = 1 +Adata = 36c17fd901169e5b144fdb2c4bea8cd65ad8acf7b4d3dd39acf2ad83da7b1971 +Payload = 00 +CT = 67747defe5da5fecc00b9bf3b249f434 + +Count = 2 +Adata = 9a37c654ab8e5a0c6bdfff9793457197d206ed207d768cbc8318cfb39f077b89 +Payload = 00 +CT = c57ef5d0faf49149c311707493a4cfd4 + +Count = 3 +Adata = 5ab80169184541393a6975f442ee583cd432d71a6d1568fa51159df7c5b8f959 +Payload = 00 +CT = bc2fb5571a7563bb90689a229d2f63a7 + +Count = 4 +Adata = c78a22a667aafab0c94047e03837d51b11490693d5c57ea27b901ff80b6a38f9 +Payload = 00 +CT = 428888c6420c56806f465b415a66e65a + +Count = 5 +Adata = e11e30cbf63623816379f578788b0c8e6b59ee3c9c50aa6e1dcd749172d48fed +Payload = 00 +CT = 9f1b7520025e1075731adc946b80121d + +Count = 6 +Adata = 05716168829276ff7ab23b7dd373db361e6d9e1f11d0028d374a0d3fe62be19f +Payload = 00 +CT = bd36b053b6a90f19e3b6622cba93105d + +Count = 7 +Adata = 3e915389639435629fcc01e1b7022d3574e2848e9151261ad801d03387425dd7 +Payload = 00 +CT = 458595a3413b965b189de46703760aa0 + +Count = 8 +Adata = 2f496be73a9a5d9db5927e622e166c6ec946150687b21c51c8ca7e680f9775ac +Payload = 00 +CT = 8b259b84a6ee5669e175affca8ba3b1a + +Count = 9 +Adata = 0a8725bd8c8eab9ed52ca47835837b9f00a6c8d834ab17105b01eb4eb30402e7 +Payload = 00 +CT = c5f35fdf2b63e77a18d154f0ddcfedbf + +[Plen = 1] + +Key = cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14 +Nonce = 6df8c5c28d1728975a0b766cd7 + +Count = 10 +Adata = 080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5 +Payload = 1a +CT = a5f24e87a11a95374d4c190945bf08ef2f + +Count = 11 +Adata = f6cfb81373f1cbb0574dda514747d0099635b48cb809c6f1fa30cbb671baa505 +Payload = 40 +CT = ffd43c5f39be92778fdce3c832d2d3a019 + +Count = 12 +Adata = 5a88b14bada16b513d4aa349b11ce4a77d4cda6f6322ff4939ad77d8ecb63748 +Payload = 41 +CT = fe753b7b661f1aad57c24c889b1c4fe513 + +Count = 13 +Adata = a92b95b997cf9efded9ff5e1bff2e49d32e65f6283552ded4b05485b011f853f +Payload = 06 +CT = b91c5ac66e89bf2769ef5f38a3f1738b24 + +Count = 14 +Adata = a206a1eb70a9d24bb5e72f314e7d91de074f59055653bdd24aab5f2bbe112436 +Payload = c8 +CT = 773fe64379cea1a8ae3627418dd3e489a2 + +Count = 15 +Adata = d3029f384fd7859c287e38c61a9475d5ddbfd64af93746b1dc86b8842a8c194c +Payload = e2 +CT = 5dabc529442ff93005551b7689bcb748f7 + +Count = 16 +Adata = 51ca3d3b70b5e354451a5177d7acfd8e7b44eae55e29d88b5e8eb8fc1e5c62fc +Payload = 1a +CT = a5ee68e416617ac974b3d1af7320cd51f6 + +Count = 17 +Adata = 8c6c6791f1ac957b18bf008e260a0af4a5b7bfdb1e0008d6eaaa227f45cf4f62 +Payload = dd +CT = 6243883d93d7066991e0fac453400b4fbf + +Count = 18 +Adata = b0a1af969a95025385b251afd1e89f353426ed6e5d71019cd73366aa31d5b464 +Payload = 4c +CT = f3b940d416f3435812f9d1b18f441b7721 + +Count = 19 +Adata = 7e72b2ca698a18cb0bf625f5daddb0d40643009db938340a9e4fe164a052fee1 +Payload = 88 +CT = 371d27e9a32feea28a6a7e7da2d27e1cc4 + +[Plen = 2] + +Key = 36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510 +Nonce = 021bd8b551947be4c18cf1a455 + +Count = 20 +Adata = b5c6e8313b9c68e6bb84bffd65fa4108d243f580eab99bb80563ed1050c8266b +Payload = be80 +CT = ecacc3152e43d9efea26e16c1d1793e2a8c4 + +Count = 21 +Adata = 38e5032c5949c2668191ef1af5bb17eddc28abdb4e5bb41eaffec2523b2525d6 +Payload = 82c9 +CT = d0e5d06bf4b50ccce0b2acfd16ce90a8854d + +Count = 22 +Adata = 0b50f5173249fb7118f80d25874d6745d88e4ce265fa0dd141ad67ae26c31122 +Payload = 8239 +CT = d0158d784f486c1dc4a2bafd5b02ca1e1c05 + +Count = 23 +Adata = 0296743a3125b103a2b2a78a109e825ea10834bd684215ab2e85cc4172e37348 +Payload = 16c1 +CT = 44eda3377002a48f9fe306d157358e6df37d + +Count = 24 +Adata = a94e64becb803e211785ba51db7f3db042fbf44a7a821509156a6828b0f207e9 +Payload = 2801 +CT = 7a2df6c09bf1dcb1c82bd98c6e2c13a8d7a5 + +Count = 25 +Adata = 105358cc17b12107e023a23d57b44c66a2c58d8db05100311575e1ea152fc350 +Payload = 65e7 +CT = 37cb2ea363c0d8864363056467570959ba03 + +Count = 26 +Adata = 669f9a63cf638a202dca1965c4116273249813ce0b39703887d89bdf5b3b12d6 +Payload = 819d +CT = d3b16519377e6d0252b5f80cdf3d0253eccf + +Count = 27 +Adata = e288590a3eba28ac6847a50b0294ab6bd0a548716ff5102c44a5b656b2d9ddd6 +Payload = 761e +CT = 24329a4dee6ca2cde473f08f76f779856c3c + +Count = 28 +Adata = 5b222aae3c7786c3b9021ba672f9136190ec931cf055f84c85706127f74c6d5b +Payload = 56de +CT = 04f29e65c0f01e644e74092253b470cd5511 + +Count = 29 +Adata = 2082f96c7e36b204ad076d8b2f796cccf5cbc80b8384b53a504e07706b07f596 +Payload = b275 +CT = e059809fa107f379957b52ac29fe0bc8a1e2 + +[Plen = 3] + +Key = ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944 +Nonce = 0bddf342121b82f906368b0d7b + +Count = 30 +Adata = 887486fff7922768186363ef17eb78e5cf2fab8f47a4eb327de8b16d63b02acb +Payload = db457c +CT = 54473c3f65d6be431e79700378049ac06f2599 + +Count = 31 +Adata = 0683c20e82d3c66787cb047f0b1eb1c58cdde9fb99ee4e4494bbf27eb62777d1 +Payload = 62a6c5 +CT = eda4853b186edc15c22ba24e470eb5a072da9f + +Count = 32 +Adata = 413074619b598f8bed34cab51ddf59941861ba0169ebe7570a5ed01d790c08e5 +Payload = cc67bc +CT = 4365fc52a1fb5a58bd51931230c1a7dfb1a8c1 + +Count = 33 +Adata = 2d65a5175c29a095dc082dab9cfcf4b895efbfa715c57614589d4db159543ce9 +Payload = 33800b +CT = bc824b7d3810f59176cb108c7e969da51d4d79 + +Count = 34 +Adata = 6a831b6059456be98e6fce608d8c71cb8efb04a96b45c2dfbdaeabf5420a1482 +Payload = b2c826 +CT = 3dca6646ffea832595c9c86e6517215541ddbd + +Count = 35 +Adata = 3a04a01160402bf36f33337c340883597207972728c5014213980cd7744e9e41 +Payload = d7e620 +CT = 58e460e89a6725f0fc35622d89d2f3e34be90a + +Count = 36 +Adata = 64d8bd3c646f76dc6ce89defd40777fe17316729e22ba90f6a2443ee03f6390b +Payload = 795af4 +CT = f658b4b1bd7ad5d81686aeb44caa6025d488bd + +Count = 37 +Adata = 7bef8d35616108922aab78936967204980b8a4945b31602f5ef2feec9b144841 +Payload = 66efcd +CT = e9ed8d0553c801f37c2b6f82861a3cd68a75e3 + +Count = 38 +Adata = 92f7dc22dcbbe6420aca303bd586e5a24f4c3ed923a6ebe01ec1b66eee216341 +Payload = 78b00d +CT = f7b24de3eeb8ea6c08b466baf246b3667feb3f + +Count = 39 +Adata = 71bf573cf63b0022d8143780fc2d9c7dbd0505ac31e9dce0ad68c2428b0878a0 +Payload = 9dd5e1 +CT = 12d7a11db811640c533794bfec6eeb977233ec + +[Plen = 4] + +Key = 62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0 +Nonce = 5bc2896d8b81999546f88232ab + +Count = 40 +Adata = fffb40b0d18cb23018aac109bf62d849adca42629d8a9ad1299b83fe274f9a63 +Payload = 87294078 +CT = 2bc22735ab21dfdcfe95bd83592fb6b4168d9a23 + +Count = 41 +Adata = 75c3b3059e59032067e9cd94d872e66f168e503bcf46bc78d82a4d4a15a29f6e +Payload = 0f28ee1c +CT = a3c38951b5de3331078aa13bd3742b59df4f661a + +Count = 42 +Adata = 8fb9569f18a256aff71601d8412d22863e5a6e6f639214d180b095fa3b18d60e +Payload = d41c9c87 +CT = 78f7fbcae52afe7326a12a9aaf22255a38d4bd0d + +Count = 43 +Adata = 8b62d9adf6819c46c870df8a1486f0a329672f7d137bb7d8659f419c361a466c +Payload = 046bc0d8 +CT = a880a7957543692a72f0d599de48b5e5f5a9413f + +Count = 44 +Adata = fd98f8f39dfa46ea5926e0ffacbabbe8c34205aade08aa0df82e1d4eaaf95515 +Payload = 39bd4db8 +CT = 95562af530fc357f5482b9004d466bf858586acb + +Count = 45 +Adata = 09bf4f77a9883733590a3cc7ee97f3c9b70f4db255620e88cd5080badc73684c +Payload = b43cdd3a +CT = 18d7ba77a9e8db046fdd548b52d40375c1e9a448 + +Count = 46 +Adata = 40326d765e0f6cf4b4deccb128bebf65a7b3c3e5bcf1d58f6158e1e9153b7e85 +Payload = e0052e9b +CT = 4cee49d64efbdd4ad8d3e863172d9372fca07c20 + +Count = 47 +Adata = aa5ae6dcdc21b5446489bdabf5c6747bdf3bbfdb3de2c03170efefe5ccb06d69 +Payload = 696825f6 +CT = c58342bb95bd661b32bc18025808f8b4035acad6 + +Count = 48 +Adata = d3d34f140a856e55b29471fde4c0e5f7306b76d03faab26db79c10f95ffb3122 +Payload = 7eb07739 +CT = d25b1074ac05b072264e31a4b2801a6d790512d7 + +Count = 49 +Adata = 648a84813ca97aef4ab7e143ee29acb946388660f18eb671194646e0b0136432 +Payload = 9cad70b1 +CT = 304617fcc00514d260e1d211de361c254369e93a + +[Plen = 5] + +Key = bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576 +Nonce = 4f18bcc8ee0bbb80de30a9e086 + +Count = 50 +Adata = 574931ae4b24bdf7e9217eca6ce2a07287999e529f6e106e3721c42dacf00f5d +Payload = 3e8c6d1b12 +CT = 45f3795fcf9c66e1a43103d9a18f5fba5fab83f994 + +Count = 51 +Adata = 99cd9d15630a55e166114f04093bd1bb6dbb94ecaad126fe5c408dee5f012d9f +Payload = 76fc98ec66 +CT = 0d838ca8bb6f3cd579294f706213ed0f0bf32f00c5 + +Count = 52 +Adata = 1516fdf7a7a99f3c9acc7fff686203dec794c3e52272985449ddf5a268a47bc3 +Payload = 6564c247cc +CT = 1e1bd603117d38e026f706c9273dbcb6dc982751d0 + +Count = 53 +Adata = 0c9c35be98591bf6737fc8d5624dcdba1a3523c6029013363b9153f0de77725b +Payload = c11b9c9d76 +CT = ba6488d9abc3e46166767c6ad2aeffb347168b1b55 + +Count = 54 +Adata = e74afe3ba960e6409dba78ecb9457e2a4ce2e09792b1d2e3858f4c79f7ddba62 +Payload = 45a4e0d7dd +CT = 3edbf4930033a7dca78bcbf4d75d651ee5fadff31b + +Count = 55 +Adata = 96cbe9cd193513599c81f5a520fabaff51ee8cbdb81063c8311b1a57a0b8c8fd +Payload = e5861b2327 +CT = 9ef90f67fa11585167c83105ee16828a574c84ac86 + +Count = 56 +Adata = 2e7ea84da4bc4d7cfb463e3f2c8647057afff3fbececa1d20024dac29e41e2cf +Payload = f5b5bcc38e +CT = 8ecaa88753ffaba456f78e431f4baa5665f14e1845 + +Count = 57 +Adata = be125386f5be9532e36786d2e4011f1149abd227b9841150d1c00f7d0efbca4a +Payload = b6cc89c75d +CT = cdb39d838034714731f9503993df357954ecb19cd3 + +Count = 58 +Adata = 3fa8628594b2645bc35530203dca640838037daeaf9cf8acaa0fb76abf27a733 +Payload = 3802f2aa9e +CT = 437de6ee436c1b008b7572752f04362b2bfdc296bb + +Count = 59 +Adata = 642ae3466661ce1f51783deece86c38e986b8c0adea9e410e976f8a2fe0fe10f +Payload = e082b8741c +CT = 9bfdac30c1a3f7c3c29dc312c1f51a675400500e32 + +[Plen = 6] + +Key = 5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c +Nonce = 7a76eac44486afdb112fc4aab9 + +Count = 60 +Adata = a66c980f6621e03ff93b55d5a148615c4ad36d6cbdd0b22b173b4b1479fb8ff7 +Payload = 1b62ad19dcac +CT = 4ad1fcf57c12b14e0e659a6305b4aeffae82f8a66c94 + +Count = 61 +Adata = c13f65bd491cb172a0f7bbc4a056c579484b62695e90383358d605307d5be0a5 +Payload = 3ef0faaa9b79 +CT = 6f43ab463bc779fa7932d365e2da9b05c00a7318384a + +Count = 62 +Adata = 59dcca8fc50740831f8f259eb55d4db11f763a83187d93758d78d166f4d73cd5 +Payload = 1a98ddbf35f1 +CT = 4b2b8c53954f813229912137b7a4945dc07cea24a974 + +Count = 63 +Adata = 578509ca4f57aadb78056794bf18b0714090970db786e2e838105e672165761c +Payload = f46a7b1c28ea +CT = a5d92af088546e045f19f737a24c8addf832ed3f7a42 + +Count = 64 +Adata = 696c0c6427273cf06be79f2206c43af9cbda0b884efaf04deba0c4bf0a25cb26 +Payload = e98f5e5a20d0 +CT = b83c0fb6806edaae8a7dcd3b0fbb59438f88743ec6e8 + +Count = 65 +Adata = 95a66b60249ed086eecaeb9bc449afcee9de212619e87516ca947351b25120df +Payload = 06319c0480e2 +CT = 5782cde8205cd9cb636ca6543c4e35964f47341f2814 + +Count = 66 +Adata = 2b411bea57b51d10a4d2fb17ef0f204aa53cf112e1130c21d411cdf16a84176d +Payload = f4c723433b7c +CT = a57472af9bc2ec82eadf4eb1f055da1a92a82052ab8b + +Count = 67 +Adata = ff3bff3a26fc5a91252d795f7e1b06f352314eb676bff50dc9fbe881c446941e +Payload = 02f809b01ce3 +CT = 534b585cbc5d01b10a7ae24a4ca2bfb07ea2a3b31a97 + +Count = 68 +Adata = f6be4aad63d33a96c0b5e9c4be62323c9e2308b29961fff980ba0dbda0549274 +Payload = 2b6004823a29 +CT = 7ad3556e9a97231323a4b88af5d7d0b07c0e73ddce1d + +Count = 69 +Adata = c3706a28d7420b41e072dcecc06b6b13116cca110bde8faea8e51f5107352d71 +Payload = 236c60cba4fa +CT = 72df31270444db30eb33d2ede33abbe22f37704fe68b + +[Plen = 7] + +Key = f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2 +Nonce = d0d6871b9adc8623ac63faf00f + +Count = 70 +Adata = e97175c23c5b47da8ce67811c6d60a7499b3b7e1347ad860519285b67201fe38 +Payload = d48daa2919348d +CT = eb32ab153a8e092fa325bafc176a07c31e6cc0a852d288 + +Count = 71 +Adata = ba45e1859efae362a44a0116a14e488ba369da6c76c3913b6df8e69e5e1111fa +Payload = f95b716bfe3475 +CT = c6e47057dd8ef1a24840f4f40a7963becde3a85968b29c + +Count = 72 +Adata = efcaa6f6cda3036b0b52ff9f36bc38ca74049c32c6b7cdfb8a46ca4144bacd64 +Payload = 4862e3677083f0 +CT = 77dde25b5339748f2a4a5c276727e0a210fc2efb5aeabe + +Count = 73 +Adata = 360bcb407603fe92f856bf677625b9882521e6dae8f35fdfc3dc737f9398f609 +Payload = 7f1ca0728f6d65 +CT = 40a3a14eacd7e1051734fc31232ab2ab63474020ab4dc9 + +Count = 74 +Adata = f12ee9d37946cfd88516cbe4a046f08c9bbba76a3973ff1e2cb14493405bd384 +Payload = 67478ef73290fa +CT = 58f88fcb112a7ec715244f307609ffa253e4e3659b0ece + +Count = 75 +Adata = 5833dde0c577b2be4eb4b3d01d7b0042fa8441ad7043ea462bbbbd56a59790ea +Payload = 36bb9e511276c5 +CT = 09049f6d31cc41f11047da612d2987fa2e50ada5ae7f9d + +Count = 76 +Adata = 1e103c63d8ead36b985f921044cd32b8f9f04a2ba9fa154a09e676ffaa093970 +Payload = d68d6556c5a5b1 +CT = e932646ae61f35382f7648718127ebae7eb7443ebd2c2c + +Count = 77 +Adata = a1cfb61d45a140bdea6329ba0fe80429ff9aa4624a1d31bc752f7c97f1d390a0 +Payload = 0568cca4ff79dc +CT = 3ad7cd98dcc358cc40a5e7fffb1fb9a5dd9d6ba91bede1 + +Count = 78 +Adata = 116b5b015e44ceef0061b2d2e73fa0b386d5c1e187782beebdfc6efb5a1c6935 +Payload = bd93d08eea4263 +CT = 822cd1b2c9f8e7468d2b70c311732f11ed72b57d83e500 + +Count = 79 +Adata = 3d55882e6f3f89309b6940a3b408e573458eedd10fc3d0e1f3170eb313367475 +Payload = 4fb62753024e92 +CT = 7009266f21f416b41a70f548e359add30c0e5746fbeb2b + +[Plen = 8] + +Key = 493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b +Nonce = fe2d8ae8da94a6df563f89ce00 + +Count = 80 +Adata = 579a637e37a0974cd2fc3b735d9ed088e8e488ffe210f043e0f9d2079a015ad6 +Payload = e5653e512d8b0b70 +CT = 75d31f8d47bee5c4e2ba537355ae8ab25cc9ed3511ff5053 + +Count = 81 +Adata = 1583138aa307401dddc40804ac0f414d338fc3ffb2946f09aaaa7079426fc1ee +Payload = 2c4ba9ce52e01645 +CT = bcfd881238d5f8f1781a9e359804831f31a1efb1ae1cb71d + +Count = 82 +Adata = 78d3dda40e433bba7a330ca3e5bd5170f0895f2e3e438402344ced79fcb0c719 +Payload = 5eb2d054a0e58c62 +CT = ce04f188cad062d62dcc77c4e1fe2bafd477598977835f0c + +Count = 83 +Adata = dfc762466fa84c27326e0ee4320aa71103d1e9c8a5cf7d9fab5f27d79df94bd6 +Payload = bbbf7830d04ab907 +CT = 2b0959ecba7f57b308946723baf0dbf613359b6e040f9bd5 + +Count = 84 +Adata = 7e8ea82d1137c1e233522da12626e90a5f66a988e70664cb014c12790d2ab520 +Payload = 10c654c78a9e3c06 +CT = 8070751be0abd2b2003bd62ca51f74088bbbd33e54ac9dd4 + +Count = 85 +Adata = 873da112557935b3929f713d80744ed08b4b276b86331dbc386fba361726d565 +Payload = 668d32e322e1da3e +CT = f63b133f48d4348a67e65e7f2cdedf6ef8cc0ee7a6dcfb02 + +Count = 86 +Adata = cfba97919f703d864efc11eac5f260a5d920d780c52899e5d76f8fe66936ff82 +Payload = e39f6225e8eab6cc +CT = 732943f982df58780532f8c6639e5d6c7b755fcf516724e3 + +Count = 87 +Adata = 01abcfee196f9d74fcaa7b69ae24a275485c25af93cc2306d56e41e1eb7f5702 +Payload = 6021a00f6d0610a4 +CT = f09781d30733fe107fd7a33828413ebc252dd9d015773524 + +Count = 88 +Adata = ce1c31e7121c071d89afab5a9676c9e96cac3d89dcae83136bbb6f5ca8f81e5d +Payload = bbaf0ac4e77ee78d +CT = 2b192b188d4b0939d3d51368799325ad1c8233fa071bade0 + +Count = 89 +Adata = bb210ca5bc07e3c5b06f1d0084a5a72125f177d3e56c151221115ae020177739 +Payload = 98a2336549a23a76 +CT = 081412b92397d4c25d1ea568637f773174a7f920a51b1fe1 + +[Plen = 9] + +Key = b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a +Nonce = 274846196d78f0af2df5860231 + +Count = 90 +Adata = 69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8 +Payload = 615d724ae94a5daf8d +CT = f019ae51063239287d896e7127f17d13f98013b420219eb877 + +Count = 91 +Adata = 162d0033c9ea8d8334d485b29eef727302135a07a934eea5fee6041e9f1f47c1 +Payload = 0d9168eeab3b27ba69 +CT = 9cd5b4f54443433d997cc2cd61da9358b4045fef32f8192cbf + +Count = 92 +Adata = 3f4ab57efa32f51a4c00790280e77c0e55b85bbda4f854e242368e9a289b5a81 +Payload = 6287dcffdd5fb97885 +CT = f3c300e43227ddff75d280f0ffdd560fb8915978e3bd6205bb + +Count = 93 +Adata = 945d18134c148f164b39fd7c4aef0335045553f6ea690a3b1726418d86f0de00 +Payload = 6e5e01b3fd71d16b9c +CT = ff1adda81209b5ec6c7dbf90420a1ff2e24bd6303b80cfc199 + +Count = 94 +Adata = 23af12893431b07c2922ab623aed901c0eaaeb9a24efc55273e96aea4dab7038 +Payload = b51521e689b5247362 +CT = 2451fdfd66cd40f492d741f4329ae7cc77d42bf7e5f2ec5ab6 + +Count = 95 +Adata = b15a118b3132c20c31e6c9d09acdee0e15fcc59d6f18306442682512d22eb10f +Payload = 7f973617e710fb76fe +CT = eed3ea0c08689ff10ec9ffdcc2f36edac14613b1d85baf25a9 + +Count = 96 +Adata = dcfbeb6490f5fa7eaf917462473a6cec98bebf8f17493fe9b994119a6d5a5457 +Payload = 7e909b6727ac3fd02f +CT = efd4477cc8d45b57df5a61a28bb10265b26043d7a8dd357713 + +Count = 97 +Adata = 77e9317294f046f315a0d79e3423f29f7d9ebcd36d6eaa2a3fb2f4500309478c +Payload = a5075638932b5632f8 +CT = 34438a237c5332b508d321c371ae1fd01bdf3b6c75a597da6e + +Count = 98 +Adata = 3aa8f204eb127b547e13873ed0238018394e13686c8734e49e3e629deb352c77 +Payload = c10f15a0de78db8aa3 +CT = 504bc9bb3100bf0d539393d1635bc40ac62405a39155406c47 + +Count = 99 +Adata = 7f67e6f97c6c258f014d721a4edaaa0ddb3f9f09993276ab7b714ea9356c231d +Payload = 8294f830cfca42cfbe +CT = 13d0242b20b226484eff89641e1bd5ad6cc827441b17c45ecf + +[Plen = 10] + +Key = dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9 +Nonce = b3503ed4e277ed9769b20c10c0 + +Count = 100 +Adata = 9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385 +Payload = 2e3cf0af8c96c7b22719 +CT = e317df43ab46eb31be7e76f2730d771d56099a0c8d2703d7a24e + +Count = 101 +Adata = da77c6d5627a2aa34911bd1f7cc5f8aa68a2c6546adc96a186b9af8e5baac4cf +Payload = e081c43a07450ce0dfa2 +CT = 2daaebd62095206346c5bcc7a8260ef361dc39fdb776d041f0d4 + +Count = 102 +Adata = 134d2d9726400d09dd3521326f96fbef993ddc0c4088770057b0f8d70356456f +Payload = c381d2ae5e72fc82324a +CT = 0eaafd4279a2d001ab2d19f0cbb0899f221aac9762f2650f8058 + +Count = 103 +Adata = 0d065dfde1de1f21784c7869eb566c977f807cfbd53578f4616995b51d7dc045 +Payload = 737f4d00c54ddca80eec +CT = be5462ece29df02b978b3dc92a9bd26b9653e5917359c331fcff + +Count = 104 +Adata = 95c54d187f2415535451cbb9cb35869749b171f7043216ce6886dd77baeecf60 +Payload = 4e9e251ebbbbe5dbc8ff +CT = 83b50af29c6bc958519891dda72c27d272561e00f7041845d998 + +Count = 105 +Adata = 0f98039e6a9fe360373b48c7850ce113a0ff7b2ae5ce773dd4c67ca967cd691b +Payload = 0db72b281ab4046d15a6 +CT = c09c04c43d6428ee8cc1928ac628758ad58fc1b5a768d4722848 + +Count = 106 +Adata = ad840bc55654762e5eba0e4a9e7998992d990a06d70da1b1ca922ef193dab19a +Payload = 4f7b4f38ff1ba4df5a59 +CT = 825060d4d8cb885cc33ed11dad4dc8b265a53cf0bdd85c5f15f4 + +Count = 107 +Adata = 911e9876ea98e1bcf710d8fd05b5bf000ea317d926b41b6015998ee1462ab615 +Payload = 58ce55379ef24b72d6d6 +CT = 95e57adbb92267f14fb18eb659a5a7084be48d099467da4395df + +Count = 108 +Adata = 3f68a4fb4043bcf9b6d277c97e11365d949c705bd6679c6f0aaf52e62330ad79 +Payload = a219028a953ce1544835 +CT = 6f322d66b2eccdd7d1523b2b2583fd117cec47b1c84d3863159e + +Count = 109 +Adata = 02f32242cba6204319075ea8ce806a57845355ae73e6b875955df510096ebff9 +Payload = 83b0ee9a52252c456105 +CT = 4e9bc17675f500c6f8625456eb2b6a2d35c649a84051f843153c + +[Plen = 11] + +Key = 4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207 +Nonce = bdb1b82ba864893c2ee8f7426c + +Count = 110 +Adata = 9bcc5848e928ba0068f7a867e79e83a6f93593354a8bfcfc306aeeb9821c1da1 +Payload = 8015c0f07a7acd4b1cbdd2 +CT = 8e9f80c726980b3d42e43a6512a0481255b729a10f9edb5f07c60c + +Count = 111 +Adata = c2e75952ab49216f305e3776865791ce877cef8c0229ca97561787093fddf1d8 +Payload = c97b62a719720b44b7779c +CT = c7f122904590cd32e92e748c514444f00ffdb80a4bb7e9eb651946 + +Count = 112 +Adata = c76a3ff4e6d1f742dd845be2d74c1a9b08e418909b15077deb20373ef55caf91 +Payload = cb7c17ef62464ecc8008f6 +CT = c5f657d83ea488bade511edb609dfc1929ac1ba5753fc83bf945b7 + +Count = 113 +Adata = bdb69f99f9a144b9ad88c6cfd8ffb8304c201de9b2818552ce6379e6042c1951 +Payload = 893a690cc5221de597d0e8 +CT = 87b0293b99c0db93c9890053b74283296d0fca83b262915289163c + +Count = 114 +Adata = 01815f599d6ba0d1c09f6f673bb6cca4c2a7a74f4e985be4c0f37842c7bbc5a4 +Payload = 80f3e4245c3eab16ef8bf0 +CT = 8e79a41300dc6d60b1d21888a34955893059d66549795b3ac2105c + +Count = 115 +Adata = a9db62e9ab53c4a805c43838ce36b587d29b75b43fb34c17a22d3981120f3bc5 +Payload = 641c6914920a79943dca39 +CT = 6a962923cee8bfe26393d1377c4e2f20aaa872a9a0b1d1d7f56df0 + +Count = 116 +Adata = f0c2cc5a1b4c4cbe839338fa0d7a343514801302aef2403530605cf4f44d2811 +Payload = 2286a1eddd80737a724ca9 +CT = 2c0ce1da8162b50c2c15415545aa0c1dd11551891ae553d3a91908 + +Count = 117 +Adata = 9842922499ad4d487488b3731f48765efe0b4eb59e7b491ba5f6636f09ed564d +Payload = d8c63e7d7d332198249c0c +CT = d64c7e4a21d1e7ee7ac5e4d9e07ec5806360843676ef27d811b246 + +Count = 118 +Adata = 399b71ecb41f4590abda79045cdf6495f27daaa559c1b34f513b5c4ac105ec10 +Payload = 4b81804d777a59b6a107cf +CT = 450bc07a2b989fc0ff5e27483b8727c5753ede25e1fab0d86963be + +Count = 119 +Adata = 2c186c5c3463a4a8bad771feb71e2973c4f6dede2529827707bf4fa40672660f +Payload = dfc762466fa84c27326e0e +CT = d14d2271334a8a516c37e64b5c3c1dc577ee8fcf6ef3ebc0783430 + +[Plen = 12] + +Key = d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906 +Nonce = 0b5f69697eb1af24e8e6fcb605 + +Count = 120 +Adata = ea26ea68facdac3c75ba0cdf7b1ad703c9474af83b3fbfc58e548d776b2529b9 +Payload = a203aeb635e195bc33fd42fa +CT = 62666297a809c982b50722bd56bc555899345e0404b2938edf33168e + +Count = 121 +Adata = 0b32069fc7e676f229f1037d3026c93eef199913e426efd786b524ce1dbde543 +Payload = aac414fbad945a49ae178103 +CT = 6aa1d8da307c067728ede1449b15447c904b671824c2ca24c4fc7ad4 + +Count = 122 +Adata = 7a8658302e5181552292aa56e8209de63b5d86934167549b0d936202681757e1 +Payload = 7ee0ce371329192618e3cda0 +CT = be8502168ec145189e19ade7ea13850e99ef9300c65f5abc9419d13a + +Count = 123 +Adata = 4f05600950664d5190a2ebc29c9edb89c20079a4d3e6bc3b27d75e34e2fa3d02 +Payload = b0a1af969a95025385b251af +CT = 70c463b7077d5e6d034831e8486c93c31bbedc9e5ffa2f4154bceea9 + +Count = 124 +Adata = 4530e4dc6a4c3733b8ab7e77e384223cc1a8c179fb66818c08aca47e5c705d89 +Payload = 9f6c6d60110fd3782bdf49b0 +CT = 5f09a1418ce78f46ad2529f7f18b556e7da59fd2549dc57a17bf64f8 + +Count = 125 +Adata = f179353aef342f0f691caf1fcb811e3f6504e14d6d9381c5439b098ff978b01b +Payload = 90958d7f458d98c48cbb464c +CT = 50f0415ed865c4fa0a41260b30aad3a838680cbd313004685a5510c5 + +Count = 126 +Adata = f6df267e5cbc9d2a67b1c0fd762f891ee3b7c435884cb87d8228091b34aeddae +Payload = 9f7ae892e5662803408d4d06 +CT = 5f1f24b3788e743dc6772d411d57b89ed0c91251aed37a6ca68a50c7 + +Count = 127 +Adata = 4372e152b1afd99c7f87c8a51dbc3a5c14c49d04ea1c482a45dfbcda54972912 +Payload = 817074e351455f23cb67883d +CT = 4115b8c2ccad031d4d9de87ad79a3b0feea16ff5fbca16211ea6fdd9 + +Count = 128 +Adata = 82b6cd1c6618c42ba74e746075dc28700333578131ca6fde6971d2f0c6e31e6a +Payload = 1b7da3835e074fdf62f1eb3c +CT = db186fa2c3ef13e1e40b8b7b49f22737c4b2f9fa0a7e3dd4b067fbaa + +Count = 129 +Adata = a5422e53975e43168726677930f6d3e13281bdbd13c67c168340ed67e45d15b0 +Payload = 57473e7a105c806867379194 +CT = 9722f25b8db4dc56e1cdf1d3ef43a48dbea8c1547455ad0197af88a2 + +[Plen = 13] + +Key = e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df +Nonce = 55b59eb434dd1ba3723ee0dc72 + +Count = 130 +Adata = 9b1d85384cb6f47c0b13514a303d4e1d95af4c6442691f314a401135f07829ec +Payload = 8714eb9ecf8bdb13e919de40f9 +CT = ba6063824d314aa3cbab14b8c54c6520dac0f073856d9b9010b7857736 + +Count = 131 +Adata = fa17c693d0997140fbc521d39e042d8e08388106874207ca81c85f45c035d6e6 +Payload = a0837676e091213890dc6e0a34 +CT = 9df7fe6a622bb088b26ea4f20820a423dd30796b6016baff106aaef206 + +Count = 132 +Adata = 27663597b389b78e96c785ca2f5510c8963a5561d2b0b24c4dcdf8e58562c12c +Payload = b8a2ce7e051b8d094ec43f2a7f +CT = 85d6466287a11cb96c76f5d2436032bc79c4aef1f74da25e92b0aa7f8a + +Count = 133 +Adata = d8f1a83371487d611ce704e0a6731f97a933c43569690022fce33cb5aecdc0a7 +Payload = 9e4103ab1dfb77ae3494507332 +CT = a3358bb79f41e61e16269a8b0e658123d2e5bb324c7ead8897f8e32b0a + +Count = 134 +Adata = 05c57aab99f94b315cf8bdd2d6b54440c097fe33c62a96b98b1568cdee4ce62c +Payload = fb3e3d1b6394d2daebf121f8ac +CT = c64ab507e12e436ac943eb0090270758ab09f93fa3ba7d7a2aa8eac789 + +Count = 135 +Adata = 1c1b0933c508c6a8a20846ebd0d0377e24f4abc0c900d3a92bc409ba14ef1434 +Payload = 549ba26a299391538b56ce4bd7 +CT = 69ef2a76ab2900e3a9e404b3eb2293813f1bcb96564f772e9308e42b2d + +Count = 136 +Adata = 9f5cf9149f556124d6bb4e3e243cca1502c02682709392cc2ec7eb262fd4d479 +Payload = 287f31e69880823df7798c7970 +CT = 150bb9fa1a3a138dd5cb46814c81877380d5cf097c2fb5177750f8b53a + +Count = 137 +Adata = 1a49aaea6fc6fae01a57d2fc207ef9f623dfd0bc2cf736c4a70aaaa0af5dafd3 +Payload = 040d18b128ae4a1935f9509266 +CT = 397990adaa14dba9174b9a6a5acf42c75787edc62a180568c6ef56545d + +Count = 138 +Adata = f29a0b2c602ff2cacb587292db301182e6c76c5110b97ca8b706198f0e1dbc26 +Payload = 92441cbe8d70820870bb01ad63 +CT = af3094a20fca13b85209cb555f56d47a0631f2038103e3904b556ba7a5 + +Count = 139 +Adata = 01fcf5fef50e36175b0510874ea50a4d2005ad5e40e5889b61417700d827251e +Payload = f11d814df217de96333dee1cbf +CT = cc69095170ad4f26118f24e4835be15b7ae24edccd0b0934e3af513ed3 + +[Plen = 14] + +Key = 3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0 +Nonce = 61bf06b9fa5a450d094f3ddcb5 + +Count = 140 +Adata = 0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd +Payload = 959403e0771c21a416bd03f38983 +CT = 37a346bc4909965c5497838251826385a52c68914e9d1f63fd297ee6e7ed + +Count = 141 +Adata = 52f6a10a022e5ee57eda3fcf53dcf0d922e9a3785b39fad9498327744f2852e4 +Payload = 23fe445efa5bcb318cc85e2ad1ac +CT = 81c90102c44e7cc9cee2de5b09ad364b603de6afbc2d96d00510894ccbe7 + +Count = 142 +Adata = d236e3841b9556b32dbd02886724d053a9b8488c5ad1b466b06482a62b79ebb6 +Payload = 762fdc3e0c30c7ecf2ec8808bb79 +CT = d418996232257014b0c6087963781a4321c2ddbc35ce4864457d611219e9 + +Count = 143 +Adata = 0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e +Payload = b6813d5fe8afa68d646c197337a2 +CT = 14b67803d6ba117526469902efa3296e55efebb17fe145cdca9b31ea7bcc + +Count = 144 +Adata = 7f291aa463c4babc76b4a6faf2e27e9401586b1ac83e4b06a4090e94b3ef5fd4 +Payload = 4ce8b6578537215224eb9398c011 +CT = eedff30bbb2296aa66c113e9181059270a0510e7cc1b599705853af2144d + +Count = 145 +Adata = 06bca7ef6f91355d19f90bf25590a44a24e5a782f92bc693c031e6de1e948008 +Payload = 9ebf93643854ea5c97a4f38f50bd +CT = 3c88d63806415da4d58e73fe88bcb55847573bf21e946ce9bdc5f569e3ff + +Count = 146 +Adata = 5a44ff94f817c7c028a8f3db35a4d01364d2598432469f09ded86e5127d42d35 +Payload = da989cc7d375ed5fac4d7f938d74 +CT = 78afd99bed605aa7ee67ffe25575b8a61c5687ea02f0276824b8316b76f1 + +Count = 147 +Adata = 2a755e362373ef27a911c4d93ca07bc97135645442ad7ad6a8ef98146c71e9d7 +Payload = 6fbab5a0f98e21e4d15904af5948 +CT = cd8df0fcc79b961c937384de8149a07ee02791011129fcacffcfb1bf4145 + +Count = 148 +Adata = f7988873f45a5de314e5381d3f14d8f8c48c9b649bf3e745ed5dc882d507da58 +Payload = b610349e8b370a7c195598573637 +CT = 142771c2b522bd845b7f1826ee36d34204b1ce23f5f58a8eb7cf1fa8cfa7 + +Count = 149 +Adata = 95d2c8502e28ab3ee2cac52e975c3e7bccb1a93acc33d9c32786f66d6268d198 +Payload = 1d969fd81dab5ced3e6ee70be3bf +CT = bfa1da8423beeb157c44677a3bbe9c618bb88bbcefb008a5ea6bed4ff949 + +[Plen = 15] + +Key = fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a +Nonce = a5c1b146c82c34b2e6ebeceb58 + +Count = 150 +Adata = 5e60b02b26e2d5f752eb55ea5f50bb354a6f01b800cea5c815ff0030b8c7d475 +Payload = 54be71705e453177b53c92bbf2ab13 +CT = 788db949697b8cd9abbc74ed9aa40cd6852dc829469368491149d6bb140071 + +Count = 151 +Adata = 210c04632341fbfc185bfe3cbf6fe272bbe971104173bcb11419b35ab3aaf200 +Payload = 22197f9ad14591e7a6d5f8b18c969a +CT = 0e2ab7a3e67b2c49b8551ee7e4998556940dc5a7e44bf10234806d00a012b5 + +Count = 152 +Adata = d3a205dd017e79a67400a937a20ef049f4c40d73311731f03ab857a3f93bd458 +Payload = 096b2f530933c1273304a6ad423726 +CT = 2558e76a3e0d7c892d8440fb2a38390898f7dbde25b0b70d335df71a06987b + +Count = 153 +Adata = 0c9b3ba4faf5fc2f310ad1bab06c4ca13474b714feeffb6ad615c1b850bbd6a3 +Payload = d44fdfd9da3a63c1083afe574e91bf +CT = f87c17e0ed04de6f16ba1801269ea02fd10d1f21b6b963c05aeda8eb09e272 + +Count = 154 +Adata = d9bb71ad90152d5c1af358c8501fa89ebd4b17bf4ff43841528cccb79fd791b3 +Payload = 8d836acc13ed83c2b2c706415c9679 +CT = a1b0a2f524d33e6cac47e0173499664491d23d90ff55abca17e9d943b98c7f + +Count = 155 +Adata = 69dc21eb6f295b12ba493ee8fe6c40d78af946067ce772db316a3cbf00d3c521 +Payload = 2a68e3fe746f593c1b97cb637079c3 +CT = 065b2bc74351e49205172d351876dc9616886c6b2adc97db5a673846b6662c + +Count = 156 +Adata = 095eb52135dc6d9c1f56a2571c1389852482e7aa3edc245a3904a0449db24a70 +Payload = 39799b001ed2c334c269acb0f2328c +CT = 154a533929ec7e9adce94ae69a3d932441dcae1760db90379bd354fa99164e + +Count = 157 +Adata = efd7270e0396392fde8b0ddaab00544cbbd504f4d97d4e90d749d1946de90dcb +Payload = 42143a2b9e1d0b354df3264d08f7b6 +CT = 6e27f212a923b69b5373c01b60f8a9c7c7deb28bdcf84886ef843216b94449 + +Count = 158 +Adata = 8bc181ce2e66294e803a8dc3834958b5f173bc2123c0726e31f3fca25b622ed6 +Payload = a3dcf26327059a4245b79a38bb8db6 +CT = 8fef3a5a103b27ec5b377c6ed382a935061ae3cd892ba63c44b809d6d29421 + +Count = 159 +Adata = c39ec70c2c71633ae0dccc41477ac32e47638c885cf59f34ebd4a096d32f91f9 +Payload = 3d54883449ecca8f153436c25a0a01 +CT = 1167400d7ed277210bb4d09432051e3c9ae69a4c59ff8e251c2fe022d065a9 + +[Plen = 16] + +Key = ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62 +Nonce = 121642c4218b391c98e6269c8a + +Count = 160 +Adata = 718d13e47522ac4cdf3f828063980b6d452fcdcd6e1a1904bf87f548a5fd5a05 +Payload = d15f98f2c6d670f55c78a06648332bc9 +CT = cc17bf8794c843457d899391898ed22a6f9d28fcb64234e1cd793c4144f1da50 + +Count = 161 +Adata = a371ca29b92ed676bab5dfc4d78631bb6d9bb23a29f822907084a1f0fe17721f +Payload = 60d55a8d5ab591a51e87fdf6aaa2ad25 +CT = 7d9d7df808aba2153f76ce016b1f54c68b55bbe42d8c97504b97c34a5f16e6a6 + +Count = 162 +Adata = 01ec87920b42639d4ba22adb1fbe5138d2849db670a2960fd94a399c1532ed75 +Payload = cbf112e4fb85276c4e09649f3de225b2 +CT = d6b93591a99b14dc6ff85768fc5fdc51017d8706acd676ae99e93d5312a4113c + +Count = 163 +Adata = eebd2bbf1e9f6d817cd8062a6a9680e7f10464eefeb50b07cb46b14b9b3fcb2c +Payload = 865b89aa38ee1b5a3ce56620307e8937 +CT = 9b13aedf6af028ea1d1455d7f1c370d45982f0fe5d951a8c62c87894657301e4 + +Count = 164 +Adata = 72863362612f146699f6b2f6ec3688f2ca6cb1505af7a309c91c1933e34d516a +Payload = a8efc37d1b8b51f2a47b21dd14da383d +CT = b5a7e40849956242858a122ad567c1de5addfddbb59f4985947fb3a9ab56333e + +Count = 165 +Adata = 9c9efc6593f96207678db813608f2b8bc33ed1bef974ed77ed7b6e74b621b819 +Payload = d9b0eaaff786165f882f41a98dbc0c35 +CT = c4f8cddaa59825efa9de725e4c01f5d6b651053516673402a57538db1a9ce7e9 + +Count = 166 +Adata = dc482a051b58d8a3904d3af37c37b51983f634a504451bbba6f77d71337f8e78 +Payload = df49d972b6ebbbb18ee975ac635d847e +CT = c201fe07e4f58801af18465ba2e07d9d86d772b1a1991b7be6589bbccad36171 + +Count = 167 +Adata = 51ef065a43caa23faf750b02a41ad6ba701aeb8058f6d8738d6f6b005bec7f60 +Payload = 78318aa5cd16699b77bdcea2fc9d1d20 +CT = 6579add09f085a2b564cfd553d20e4c3569387a1a6bcc826e94012670820576e + +Count = 168 +Adata = 88e2a74d2920c89c6a101f5f06d0624a6d5eabd9bdb51395ee3983934c55c73d +Payload = 8e20d65d02dd9a64379f75b6d8328f2d +CT = 9368f12850c3a9d4166e4641198f76cee9c788b4aae9b2c6caf0c44aa9bd2ed0 + +Count = 169 +Adata = ada3ed7db2dabbfbc441ef68a5656e628d6d5bd6c1574369688497179a77601a +Payload = 97e8d8513af41b97801de98cc4269096 +CT = 8aa0ff2468ea2827a1ecda7b059b6975f1df0f01944641a1b04d753e6ab8d3cc + +[Plen = 17] + +Key = 7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d +Nonce = 98a32d7fe606583e2906420297 + +Count = 170 +Adata = 217d130408a738e6a833931e69f8696960c817407301560bbe5fbd92361488b4 +Payload = b0053d1f490809794250d856062d0aaa92 +CT = a6341ee3d60eb34a8a8bc2806d50dd57a3f628ee49a8c2005c7d07d354bf80994d + +Count = 171 +Adata = 4ae414bc888a42141d3060c71c2dbbffd425b6a952806982271a8e756b3c9e24 +Payload = 51eb190c6a9f46e8ec1628b090795470c0 +CT = 47da3af0f599fcdb24cd3266fb04838df13c1c5755a5a240c33b2b890a486aac8b + +Count = 172 +Adata = 7b7f78ae1a5ee96fdc49dacd71be1a6ac09a6a162d44dea0172886eca5674e46 +Payload = 25144e807e389bb0e45b6dc25558caf61a +CT = 33256d7ce13e21832c8077143e251d0b2b4cfca1c19abf447d7bc0898d61885144 + +Count = 173 +Adata = 03f31c6143b77f6ad44749e2256306b8bf82242f2821fad4075b09b388ba81ca +Payload = dbe1ee14abfe2ecf4edf6db206cf9886ce +CT = cdd0cde834f894fc860477646db24f7bff229cc7a390867a245dcb7c434f1db347 + +Count = 174 +Adata = 030390adb572f2bd2a6a4454fd68236cd1d465574328aa001d553375cc63f8a2 +Payload = db6df31f12bf552f81deff5fa2a373fc22 +CT = cd5cd0e38db9ef1c4905e589c9dea401135361b539f9fe0fb7842907c2326aef63 + +Count = 175 +Adata = 7294ae94358669f2ada4b64c125b248df7fe86c6715e3b6a7b9bb2bd99392c8a +Payload = ff2a97b49fcc6a50d4549c979d53ccc51f +CT = e91bb44800cad0631c8f8641f62e1b382e8ed10943929e7d7bf798b2ae8371aae5 + +Count = 176 +Adata = 4d1513478fc1fb0a18eb6d2a9324fefbd975ecd1b409025de826bc397462acc1 +Payload = 73ddfa0185200a890b7690a7e3986d8818 +CT = 65ecd9fd1a26b0bac3ad8a7188e5ba7529f92b9e49ab83f113f8949dc9e4a36e0d + +Count = 177 +Adata = b26a7ff61bfe94864249af7cc9b4a723627dd4463f5a22f0ca6063769522eab7 +Payload = 5c7604f9ac8fdf30ee5820e5aeb75b65d7 +CT = 4a4727053389650326833a33c5ca8c98e6d0e53223adff22a08e3dddf66fff23e3 + +Count = 178 +Adata = 960f9a85cfbfb6eab223a4139c72ce926a680ea8e8ecc3088cf123de659ad310 +Payload = d44fdfd9da3a63c1083afe574e91bf01c9 +CT = c27efc25453cd9f2c0e1e48125ec68fcf833f49a42521a7a2367f91bfcc2180b7c + +Count = 179 +Adata = 3718467effb5d5dc009aaefce84d8cb4fe8f80eb608f4c678f5d0de02ea11e59 +Payload = bb515dc227abb9acad8fefaa14771bb77b +CT = ad607e3eb8ad039f6554f57c7f0acc4a4ac08bd395c6807223311070659f550934 + +[Plen = 18] + +Key = 0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c +Nonce = f61ef1c8c10a863efeb4a1de86 + +Count = 180 +Adata = 67874c808600a27fcab34d6f69cc5c730831ad4589075dd82479823cb9b41dc3 +Payload = 6a26677836d65bd0d35a027d278b2534e7df +CT = d1c1f3c60603359c7d6a707f05ecb2296f8e52f2210b7a798ad5c778ee7cfd7fe6e0 + +Count = 181 +Adata = e0c27cddf919d3092d9a34766c89a5ae6dcf39fe954d1e6f1a70ddf96805def4 +Payload = 4021ff104ff1dbd91e46db249fd82198b0a1 +CT = fbc66bae7f24b595b076a926bdbfb68538f00923bb5a347af13df12f234fca5f03ef + +Count = 182 +Adata = 7ae9eca03f616ab39ebb3be26b848842b4aa584e5c8e5695065ad5af34951175 +Payload = 6a681f164efce199a787bccff223b8ae1a98 +CT = d18f8ba87e298fd509b7cecdd0442fb392c9d03ed7bffac83e890caceb6903d9cab5 + +Count = 183 +Adata = b47c9bc4eb01c74f5db2e6a293bef80db18c58cf06feef7ee0f8a7a9a51c22bb +Payload = 7861dac338ba3f8274dca04c8c6f92b6d44c +CT = c3864e7d086f51cedaecd24eae0805ab5c1d4dd8f30870025b2bd1e2a2511574d3e7 + +Count = 184 +Adata = f6afd661f218c7426b92ee53e65d14898cd0c78a7e594fcc6ac0e3fb5cab1c9c +Payload = a3f0473c620d2739d5ba4f7156f88d0fb669 +CT = 1817d38252d849757b8a3d73749f1a123e386046d17f337f3cb49884d94995edbdc9 + +Count = 185 +Adata = d3802911e341577046cfc61d9043b4af059fb4bef3c6a2ff46ccdcb05670af37 +Payload = 07c535d9456a6ff1e41321150d16dae3f7a3 +CT = bc22a16775bf01bd4a2353172f714dfe7ff25fdc77b43bca254d6459263cdfed8fbb + +Count = 186 +Adata = db60720db67a60ca286fe744d46173c231fbcc7deb4c9b0d87d52a2247e06b74 +Payload = 5ee220720a896249efdab2ce418318bb5ebf +CT = e505b4cc3a5c0c0541eac0cc63e48fa6d6eedd1a1d36c8164c55d55dbf0ff1e9517a + +Count = 187 +Adata = 57f70ba5493265b30491decc726354e2065e7971a2efd56db9cf0f79b1d76859 +Payload = 98e4eb0361c8bf40bcbe0539b0850e4c35ff +CT = 23037fbd511dd10c128e773b92e29951bdaeb476e2ca48fd52bec0539b00744a8a07 + +Count = 188 +Adata = 4a29b9ad548964942f87f28ba267ec0d0e8f72c73b3823ee57693dd63c2605c1 +Payload = 7f0745bea62479c0080ecec52e37c1e32d72 +CT = c4e0d10096f1178ca63ebcc70c5056fea523fad68c62b81d62f2d490ae74f5bb1465 + +Count = 189 +Adata = acbd2e9911b3218a230d9db5086d91dccac3fc93fc64b0f4a15d56954906b2b7 +Payload = e99ed2ac6c38e033061b5d85f3e77dd72518 +CT = 527946125ced8e7fa82b2f87d180eacaad4913b15d8000266c61ba5aec898eb35b52 + +[Plen = 19] + +Key = bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f +Nonce = 05b50c458adbba16c55fcc454d + +Count = 190 +Adata = 89ad6ae1e550975eaa916a62615e6b6a66366a17a7e06380a95ea5cdcc1d3302 +Payload = c1a994dc198f5676ea85801cd27cc8f47267ec +CT = 7c9b138177590edaafec4728c4663e77458ffbe3243faec177de4a2e4a293952073e43 + +Count = 191 +Adata = dfddb719d00398bf48a6cefd27736389e654a93b8595cd5ac446af1996e0f161 +Payload = 791e232bfb42fb18197adc1967da1a83f70168 +CT = c42ca4769594a3b45c131b2d71c0ec00c0e97f8422f736fc435687634d42254b22fd99 + +Count = 192 +Adata = 58ef310997dcaf067dd217274921504da6dbf0428a2b48a65fe8a02c616ac306 +Payload = 3d4127942459bb8682e662dfc862467582fa68 +CT = 8073a0c94a8fe32ac78fa5ebde78b0f6b5127f38a96e68ef7dbaef1b460cc0980eacd4 + +Count = 193 +Adata = 511e5d5e100b595f6b20e791830bca37e23f7b785e482a58405bffe7a632a5b8 +Payload = 0e71863c2962244c7d1a28fc755f0c73e5cbd6 +CT = b343016147b47ce03873efc86345faf0d223c15c5c702a82d468929227502e4e35796f + +Count = 194 +Adata = e48dfaa53b6807ea6f01d8dca67960b9f321f7851f324459a9bf61fe0be73abb +Payload = e0f1cd013e6aea4fa484fc3fa35d348b1a2399 +CT = 5dc34a5c50bcb2e3e1ed3b0bb547c2082dcb8e89188c0940182dd99a902d158c5b0810 + +Count = 195 +Adata = c12c0423fe36e4c88775dd00b4af267b85b7dd2a37a742a3156923c8917c97a3 +Payload = b1cc1946b4fc1dbd033254cdf536f61e9f9cd7 +CT = 0cfe9e1bda2a4511465b93f9e32c009da874c015849acbb7af1892790300bb84fb0558 + +Count = 196 +Adata = 4255f8af18df7237e0abe98421aec9634443561752d893aaffe76380e829ef32 +Payload = 87284658928208e3bddca83e3ceb13708d88d4 +CT = 3a1ac105fc54504ff8b56f0a2af1e5f3ba60c3e75aaf3077ac6dfb5454851ec3910de6 + +Count = 197 +Adata = ab83567833d2f3461b5fbecc0e366694bb5ea00933b2b3e792ec3aefe20325df +Payload = bdb79f931ef3035a33bdd1b032fd9de8f6b2ba +CT = 008518ce70255bf676d4168424e76b6bc15aade70f42e3e1f2b5bb58433bd11f5dea1f + +Count = 198 +Adata = bd1446ba3185d1c16551730947c22142142caa8cc1c540e89ab734ec297401bc +Payload = 1f9c3a8eb8bc59f3869e10f73883aa8f8990cb +CT = a2aebdd3d66a015fc3f7d7c32e995c0cbe78dc564f6248cefe5fc7cfb547c90a558925 + +Count = 199 +Adata = b87577755d2d9489194f6f7cfabf267dc3433a9c91954e81beb72c5e06870922 +Payload = 5f28809181f9a889894da8d6fe1fde6cce354a +CT = e21a07ccef2ff025cc246fe2e80528eff9dd5db52249d812f7f235afa0732e984e91b2 + +[Plen = 20] + +Key = 8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876 +Nonce = 8479bdfad28ebe781e9c01a3f6 + +Count = 200 +Adata = 7aebdfd955d6e8a19a701d387447a4bdd59a9382156ab0c0dcd37b89419d6eff +Payload = 7b125c3b9612a8b554913d0384f4795c90cd387c +CT = 6cc611d816b18c6847b348e46a4119465104254a04e2dfeeeac9c3255f6227704848d5b2 + +Count = 201 +Adata = d119f300fbd74e754a200ea2c3f9fabc1466d02078c84245db693eef3f5672a6 +Payload = 8b013f5782d5d1af8dbd451a4202866095dac975 +CT = 9cd572b40276f5729e9f30fdacb7e67a5413d44338d48329997c5981d678b5e24a6f01b0 + +Count = 202 +Adata = d6204303b86acf62d5ab860ca70161288ede56e3cf017c08dca56fd2d6f8f6fe +Payload = b2b1d82a5523b72ea366a680922ed3a4624536c4 +CT = a56595c9d58093f3b044d3677c9bb3bea38c2bf2a77e3ab68e0a73519591a33ed098b758 + +Count = 203 +Adata = 8557e22eb4529b43f16b1f8ae47c714ac8a2c827c1408a47704778b4c5b52601 +Payload = f8c4eb4285d3d7744da52775bb44ca436a3154f7 +CT = ef10a6a10570f3a95e87529255f1aa59abf849c1cff6c24251c2fb7b8604dfa10c60ef4a + +Count = 204 +Adata = 8c1a4187efbb3d38332f608f2c8bbe64247d9afa2281ced56c586ecb4ab7a85e +Payload = 6e7fe35fa39c937a0e6b3a8c072e218650f42b8d +CT = 79abaebc233fb7a71d494f6be99b419c913d36bb6c3c39f915d081d34559179869b32d81 + +Count = 205 +Adata = a41bb1f256228302cd0548ae2148ff42774d18c2d6d3e38b36bc4938da13bac3 +Payload = 917b467d841850fc6e648f1bc298a7f9f1ee38ca +CT = 86af0b9e04bb74217d46fafc2c2dc7e3302725fc9389a6a6a74c6eb0e1f87562469f2082 + +Count = 206 +Adata = b0b024e20c4f75a6dad54c21a9edbce846792e957878b1c8ed2d916c757e2b3c +Payload = 2b4314fe1a6bfa786b7cfc13fbee861b348efbf6 +CT = 3c97591d9ac8dea5785e89f4155be601f547e6c03bed3a2f5dfdbfcc0d7ac26c88d1962c + +Count = 207 +Adata = 42153925c46fc9d5d328312d62f59bb99fdc4ac479a3386d5f88fefd4b32f577 +Payload = e19fa7f83c79920cbff45c41a9dee8fc99e97396 +CT = f64bea1bbcdab6d1acd629a6476b88e658206ea035ea1d99be344fa1467ee91c73bbca67 + +Count = 208 +Adata = 37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711a08da6acd42299fe +Payload = 53e0475cf492b3d39dad600f5c58eb0bd0021554 +CT = 44340abf7431970e8e8f15e8b2ed8b1111cb08627936ec10a81b36768b606e9a38b2f4c5 + +Count = 209 +Adata = 4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a7977eda6de045878 +Payload = c119a383d9a3d4bff4270a1d22076b346db5f61c +CT = d6cdee605900f062e7057ffaccb20b2eac7ceb2a11575ae03ea8a57bbe4a67c060367b74 + +[Plen = 21] + +Key = c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2 +Nonce = 94ab51ce75db8b046d6ab92830 + +Count = 210 +Adata = 2a243246bfe5b5ab05f51bf5f401af52d5bbaa2549cf57a18e197597fe15dd8c +Payload = 73b09d18554471309141aa33b687f9248b50fe3154 +CT = b7e8264ca70fd2a4fb76f20a8ad5da3c37f5893fb12abeeaef1187f815ca481ed8ddd3dd37 + +Count = 211 +Adata = 0595306eb7441622a49800edee0134492d82320707fceba902af2e0c95fe634a +Payload = b64d00f3a4df754fa4ee6376922fb67ccce0c6209f +CT = 7215bba75694d6dbced93b4fae7d95647045b12e7accc2b55011dbe92ce7619e0ad48b4ccf + +Count = 212 +Adata = bd439dbefec589e120fb4f9825b315bf86523b85c61791cd4da4c8d474ba2714 +Payload = 2b11d1ac74ffe701ec733d32085b1054132726e622 +CT = ef496af886b444958644650b3409334caf8251e8c71e8b1f4d70d8f4c7df4f22847d36b394 + +Count = 213 +Adata = cfebe1cf82267394065bcecfada6709c6c35a3ac835644f560d4c9a8c1848364 +Payload = a88f22424643a523aa3d7d88f4364f1290f49dd0a2 +CT = 6cd79916b40806b7c00a25b1c8646c0a2c51eade47a85e76a9d07b7b361ca56d53c34cda50 + +Count = 214 +Adata = 7a37255b682766a0bfecf78e5162528885a339174c2a49325739d2bd8877e64f +Payload = c81427bc84c6a3cfefd4c4cb210fe82212977e1947 +CT = 0c4c9ce8768d005b85e39cf21d5dcb3aae320917a2fddb010e7508ad03ad287068ecee6020 + +Count = 215 +Adata = 619f2ae80070e278615466a3fd6c9acb7b510c5679bed7038889c77e78d8bd32 +Payload = 28c4d6de3e2ce51b849b135d9cfd3084f0e3155447 +CT = ec9c6d8acc67468feeac4b64a0af139c4c46625aa2ddea785e6c470c52c4fdf432fd78b66e + +Count = 216 +Adata = b2571e56f66a857daffbdc99370ceddd4a7bed3867d600cc797000a3b7b57a9d +Payload = 4c88151cafef75832bacef43a06e862349d56b67ee +CT = 88d0ae485da4d617419bb77a9c3ca53bf5701c690b91232cfbd7ffff252498b35274fb2995 + +Count = 217 +Adata = db409636e3e3bcd606a91aeb7592009896f9ad2c4cc6b7f578e6ad59c0f8fa22 +Payload = 572855e22ce89bc2bcf09cb15a1765d99973449d61 +CT = 9370eeb6dea33856d6c7c488664546c125d633938472b2c50e5e391ad104f9ee33b94f2872 + +Count = 218 +Adata = 62c89a835721207a182968c516dc8be45774ec846e8dcab9ab8611888f2a76a8 +Payload = 89ce46b3de3afaf2518d419b1a2ac24cabca269a96 +CT = 4d96fde72c7159663bba19a22678e154176f5194732d69c5d6db1b130102af3dae0690673b + +Count = 219 +Adata = 33f30ddd83002eea50fd4a8fae39d0980a04160a22ac88b755ac050f1d1f8639 +Payload = edf1682a626e9fbf3d57bb260e0876c6f92ba5b114 +CT = 29a9d37e90253c2b5760e31f325a55de458ed2bff1489903365970c2673c9fd457e1077aad + +[Plen = 22] + +Key = 9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4 +Nonce = af1a97d43151f5ea9c48ad36a3 + +Count = 220 +Adata = f5353fb6bfc8f09d556158132d6cbb97d9045eacdc71f782bcef62d258b1950a +Payload = 3cbb08f133270e4454bcaaa0f20f6d63c38b6572e766 +CT = 3966930a2ae8fdd8f40e7007f3fde0bd6eb48a46e6d26eef83da9f6384b1a2bda10790dadb3f + +Count = 221 +Adata = e3a1555ffe5f34bb43c4a2dae9019b19f1e44a45fb577d495d2a57097612448d +Payload = 946e86795c332031e2d1ee09d3d4a101fb6800d00911 +CT = 91b31d8245fcd3ad426334aed2262cdf5657efe408a5587bdd120a7d08cd3841cb117af444fb + +Count = 222 +Adata = 9c5d43c1a1269cde199509a1eff67cc83a1759b71c9e7a6ee99f76b98c6e23a6 +Payload = b76ce2ab0065ba1c0a754494991c8c452cb416f18ab1 +CT = b2b1795019aa4980aac79e3398ee019b818bf9c58b0545b32f81dcf03e2bcc2aaf62ad366e97 + +Count = 223 +Adata = b07452a7900a289b91b2771dfdd5108852536659aa259def7b41e38f80bd03ab +Payload = a3e0d8d0784155bfc45769c52711d4fa68e8bc390c20 +CT = a63d432b618ea62364e5b36226e35924c5d7530d0d94fea17d78533bc9e022dbfb460afdf499 + +Count = 224 +Adata = 6b30f55c3101540523a92380390f3f84632f42962061b2724cde78ac39809397 +Payload = 6e6a88abbb52a709b47365ad6aa8016fa9a03a9bd834 +CT = 6bb71350a29d549514c1bf0a6b5a8cb1049fd5afd98056defc6dcaeec80b1c639350ab6f1fde + +Count = 225 +Adata = 9fc62d14f8b7a6026509275cff80312ff1ade2b5d9c274cb72a506a571439fc1 +Payload = eba1810d537041821121aeff8e0914ac26a550072c8c +CT = ee7c1af64abfb21eb19374588ffb99728b9abf332d389d37b7251fb8c0ef2b37c36d51219d0f + +Count = 226 +Adata = 6b9389cc42113d639fd2b40cbc732ae0dc7c14513b88b36b45a6ea5a06fe4d2b +Payload = dfc6692cd2442e5ff1f918c8812a27f81d107d16a12f +CT = da1bf2d7cb8bddc3514bc26f80d8aa26b02f9222a09bd279d9da4437c8a2a252436508134c56 + +Count = 227 +Adata = db72d98d63fc10acff7dceec0e2691a80ecee50a0e957ad166c77952a50318bd +Payload = 9ad338cbfd1b52e6ae4178f05e00062274f8b0b25eae +CT = 9f0ea330e4d4a17a0ef3a2575ff28bfcd9c75f865f1a63943543bc1c5f5991ecc5964a288f79 + +Count = 228 +Adata = e98b710c47a4d12a73cd8aa2613fc2910c16f4195ea7f15650132493521d19be +Payload = 9f5a05db89e0e336da066ce81b79ad9be1d0ec4fb7b8 +CT = 9a879e20902f10aa7ab4b64f1a8b20454cef037bb60c0a49ee2b7ceddcbd28abb24b77d5edee + +Count = 229 +Adata = 527817316fc48b105f8ab178dd2db1fefa09c50461aa9d8bdf3c03482343bbf9 +Payload = 58f31e5770070a5d4031fb795dc2d298561d3559960d +CT = 5d2e85ac69c8f9c1e08321de5c305f46fb22da6d97b9b099a68cfa3572d974e03232e09f37fb + +[Plen = 23] + +Key = d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135 +Nonce = 3891e308b9f44c5b5a8b59004a + +Count = 230 +Adata = 0cda000ed754456a844c9ed61843deea9dadf5e723ea1448057712996d660f8c +Payload = 79ac1a6a9eca5e07ce635bfd666ef72b16f3f2e140d56c +CT = 1abcc9b1649deaa0bfa7dcd23508282d9c50ca7fee72486950608d7bcb39dcf03a2cab01587f61 + +Count = 231 +Adata = 3fb6ddb76809b8e6d703347664ef00a365955124c603900d5c8d4ff476138252 +Payload = 76d12e3c4c5d990bf563c60aa4999e52998d887f97477f +CT = 15c1fde7b60a2dac84a74125f7ff4154132eb0e139e05b1c4fb40e5c8bc37152a173d4bbb18c3e + +Count = 232 +Adata = d9fc295082e8f48569eb073ac1b9566246728fc62ccaab4a5667c472c98b2626 +Payload = a027c28fbe22111fd4c8a226cfe8531c16d7790d561eca +CT = c33711544475a5b8a50c25099c8e8c1a9c744193f8b9ee019c359008adae3070b5a543ead0effb + +Count = 233 +Adata = 7a459aadb48f1a528edae71fcf698b84ed64dc0e18cc23f27ab47eeabeaf833f +Payload = fa597e37c26c38694abdcf450f9edc529160fa0d651979 +CT = 9949adec383b8cce3b79486a5cf803541bc3c293cbbe5dbd099ab134756b90746762a92a4a9f7f + +Count = 234 +Adata = 484207909dec4c35929ebe82fcacf20d2af6d850bd69364ebac9557adeadfbd4 +Payload = 9e4c8aa9b58a8eabc5586892f5541000b43f17d9a051a0 +CT = fd5c59724fdd3a0cb49cefbda632cf063e9c2f470ef684fa4f6adfec85d055310107ba89198afa + +Count = 235 +Adata = 88b5448372548e6aab1b262630a28a471d285514703f1bdb10c695850e18fe6d +Payload = 7d9582cf9e3bb9ee34dce965f56b08e716589486b0641c +CT = 1e855114646c0d4945186e4aa60dd7e19cfbac181ec338915d23eb2e952afcc89fbddb567d9d75 + +Count = 236 +Adata = 0e71863c2962244c7d1a28fc755f0c73e5cbd630a8dbdeb38842d7795d830d2e +Payload = 5a387e7cc22491fc556fe6a0c060b4911d01f0c11f801e +CT = 3928ada73873255b24ab618f93066b9797a2c85fb1273aaad6c31828314e24198f005955ca8f5e + +Count = 237 +Adata = 2aa7a28da38c42fda2e578d9d6340cd8e80b9b32047c3db296d0640d517b0872 +Payload = 87946e910059cbaf48df63b220f397049c65ca10cd1920 +CT = e484bd4afa0e7f08391be49d7395480216c6f28e63be04e531ebbadccfe47182b41904bbfebcfe + +Count = 238 +Adata = 3382051c268891da04e6ca73adcead4029f6a1593be4acfe3968e7351a6a2fb5 +Payload = c62f67d208f1c8ffd5d57df9de15ef54f97fbc07d1630a +CT = a53fb409f2a67c58a411fad68d73305273dc84997fc42e7c582414154236c09ee704cf4a5de411 + +Count = 239 +Adata = c352828b1920e53bbb60f2ea6a5f15639659e6f3243405c26f6e48628d5519a9 +Payload = 697e73eaaf562d31bdbf7ce9e78c7426fe1c87e421def9 +CT = 0a6ea03155019996cc7bfbc6b4eaab2074bfbf7a8f79dd57c9990029c89d1b37988745fa5737a3 + +[Plen = 24] + +Key = 4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976 +Nonce = 00d772b07788536b688ff2b84a + +Count = 240 +Adata = 5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975 +Payload = 9cea3b061e5c402d48497ea4948d75b8af7746d4e570c848 +CT = f28ec535c2d834963c85814ec4173c0b8983dff8dc4a2d4e0f73bfb28ad42aa8f75f549a93594dd4 + +Count = 241 +Adata = 1ae8108f216defea65d9426da8f8746a3ae408e563d62203063d49bf7e0d6bdf +Payload = 2b223932fb2fd8433e4b1af9e8234a824569a141f6c96a69 +CT = 4546c70127abacf84a87e513b8b90331639d386dcff38f6f4de907a59c5e4d3f21e1348d7cdf92b6 + +Count = 242 +Adata = 460f08114b1015fe8b7a9b5dd1b9e6a3d28367c4bd15f29b13c02a8cb9a53968 +Payload = 4d57cbe4a7e780d4ed17267d5ebc91750c2f0209e0444bd2 +CT = 233335d77b63f46f99dbd9970e26d8c62adb9b25d97eaed4ff4239544e2f354d6c6837cd9c23b884 + +Count = 243 +Adata = 860f4428259d9c5b17698cc95363db6cfee603258582e3a3e8feb886599d4ac4 +Payload = fda8665f87c618646a89c7abdca275fd10c31453ad4b9c99 +CT = 93cc986c5b426cdf1e4538418c383c4e36378d7f9471799f3f6c6f7cc494201069344e2d6d41bd9b + +Count = 244 +Adata = 1b43c482f83780c21583f88e5afcf6938edd20f21b74d895161b60c27a6a42f0 +Payload = 98104fd3f3413ad1f57ef4912cb50097dca379a58c47b0d2 +CT = f674b1e02fc54e6a81b20b7b7c2f4924fa57e089b57d55d43787a15352cfceb028202c8730beaa7a + +Count = 245 +Adata = b082ccd964617c27a5607b7324faad237ee53acfc18c35502dbf7c1937a9dfcb +Payload = b46b343e64d2d70e0bd909dbb3f6bedf7e4adc74321be526 +CT = da0fca0db856a3b57f15f631e36cf76c58be45580b210020f3a0ca3da647eb31893e867956097983 + +Count = 246 +Adata = b8539ba93ef17254ec1d8d62e8f4eae4d41ee1e75345bf90c9cbb26c63bce501 +Payload = 8e12620bb575e6b167b085255b2b5631ff28e04cbef8826d +CT = e0769c3869f1920a137c7acf0bb11f82d9dc796087c2676be663fbbebbc251b9f1760afa49e89e71 + +Count = 247 +Adata = b6b09463b5ef5ead1f17f4021693a0d8452e98dcbb8e7590f9fde6394970a6f8 +Payload = 792aaa23b923d1b53173fe19853b9aa402a301d48529873e +CT = 174e541065a7a50e45bf01f3d5a1d317245798f8bc136238da90cd87e9d9ca5d85430a150e682752 + +Count = 248 +Adata = 390f6de14d5e1f2f78dbe757c00b89209d0cf8bc48cbbea035779f93de357905 +Payload = ddc5b4e48970ebd72869be6998e9103c014475e8ae6ea29c +CT = b3a14ad755f49f6c5ca54183c873598f27b0ecc49754479afc0cc4601afb61efa7059cfe49ec9dde + +Count = 249 +Adata = 1d75c9e7acb09932db332498d30f82e4009025cb1827047c59a8f97812b568a4 +Payload = d2b66096c475a77648c27235e6972ba8f18761330d3c6adf +CT = bcd29ea518f1d3cd3c0e8ddfb60d621bd773f81f34068fd9cf7474962c3602dcfcb50039f43e3d6f -- cgit v1.2.3 From f850f6bdf6a13ef91f6f97ce821968ff977ff4d7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 13 Sep 2018 12:45:48 +0200 Subject: crypto: Document AES_CCM and fix errors in User's Guide The sizes in the Algorithms chapter for aes_gcm was wrong or incomplete. --- lib/crypto/doc/src/algorithm_details.xml | 7 ++++--- lib/crypto/doc/src/crypto.xml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index 088f5e8e97..2d02422cb6 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -89,9 +89,10 @@ crypto:supports().

- Cipher and ModeKey length
[bytes]
IV length
[bytes]
AAD length
[bytes]
Block size
[bytes]
Supported with
OpenSSL versions
- aes_gcm 16 16 0-16 any1.0.1 - - chacha20_poly130532 1-16 any any1.1.0 - + Cipher and ModeKey length
[bytes]
IV length
[bytes]
AAD length
[bytes]
Tag length
[bytes]
Block size
[bytes]
Supported with
OpenSSL versions
+ aes_ccm 16,24,32 7-13 any even 4-16
default: 12
any1.1.0 -
+ aes_gcm 16,24,32 1- any 1-16
default: 16
any1.1.0 -
+ chacha20_poly130532 1-16 any 16 any1.1.0 -AEAD cipher key lengths
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index d5f5009297..214104c74a 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -420,7 +420,7 @@ block_encrypt(Type, Key, Ivec, PlainText) -> CipherText block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} - block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} + block_encrypt(aes_gcm | aes_ccm, Key, Ivec, {AAD, PlainText, TagLength}) -> {CipherText, CipherTag} Encrypt PlainText according to Type block cipher Type = block_cipher_with_iv() -- cgit v1.2.3 From 025bb085ab7b7305e5f464984d0714a94ad12bc9 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 14 Sep 2018 13:13:50 +0200 Subject: crypto: Fix no_aead test --- lib/crypto/test/crypto_SUITE.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 749a57dbac..ff9c5163a3 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -428,12 +428,18 @@ no_block(Config) when is_list(Config) -> no_aead() -> [{doc, "Test disabled aead ciphers"}]. no_aead(Config) when is_list(Config) -> - [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, _Info} | _] = - lazy_eval(proplists:get_value(aead, Config)), - EncryptArgs = [Type, Key, Nonce, {AAD, PlainText}], + EncArg4 = + case lazy_eval(proplists:get_value(aead, Config)) of + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, TagLen, _Info} | _] -> + {AAD, PlainText, TagLen}; + [{Type, Key, PlainText, Nonce, AAD, CipherText, CipherTag, _Info} | _] -> + {AAD, PlainText} + end, + EncryptArgs = [Type, Key, Nonce, EncArg4], DecryptArgs = [Type, Key, Nonce, {AAD, CipherText, CipherTag}], notsup(fun crypto:block_encrypt/4, EncryptArgs), notsup(fun crypto:block_decrypt/4, DecryptArgs). + %%-------------------------------------------------------------------- stream() -> [{doc, "Test stream ciphers"}]. -- cgit v1.2.3 From 9bfdada78366d20fbe3cc358df10911e475749a3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 17 Sep 2018 13:48:19 +0200 Subject: crypto: Disable bad tests They do not test what was intended. --- lib/crypto/test/crypto_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index ff9c5163a3..495c2adb55 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1419,8 +1419,8 @@ group_config(rsa = Type, Config) -> {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_sslv23_padding}]}, {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_x931_padding}]}, rsa_oaep(), - rsa_oaep_label(), - rsa_oaep256(), + %% rsa_oaep_label(), + %% rsa_oaep256(), no_padding() ], Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], -- cgit v1.2.3 From e23384bdb5653f3c304beafb3042fabe9f599e25 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 17 Sep 2018 11:55:24 +0200 Subject: crypto: Disable problematic RSA options in LibreSSL --- lib/crypto/c_src/crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 07ef60e395..3172059414 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -213,8 +213,10 @@ # define HAVE_ECB_IVEC_BUG #endif -#ifdef RSA_SSLV23_PADDING -# define HAVE_RSA_SSLV23_PADDING +#ifndef HAS_LIBRESSL +# ifdef RSA_SSLV23_PADDING +# define HAVE_RSA_SSLV23_PADDING +# endif #endif #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) -- cgit v1.2.3 From e8de0736005e91afd992e49f434e08c940eddfa0 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 14 Sep 2018 10:49:34 +0200 Subject: crypto: Use aead functions for CHACHA20_POLY1305 This previously implemented cipher is a block cipher despite using chacha. It also uses the EVP_CIPHER_CTX api which now unifies AES_GCM and AES_CCM into one pair of encrypt and decrypt functions. By integrating the existing chacha20_poly1305 code into aead_encrypt and aead_decrypt we could remove two C-functions and simplify both the C-code and the corresponding Erlang code in the CRYPTO application. --- lib/crypto/c_src/crypto.c | 164 ++++++++++------------------------------------ lib/crypto/src/crypto.erl | 19 ++---- 2 files changed, 40 insertions(+), 143 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 3172059414..b1f0183ac2 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -553,9 +553,6 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); #endif -static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); -static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); - static ERL_NIF_TERM chacha20_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); static ERL_NIF_TERM chacha20_stream_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -648,9 +645,6 @@ static ErlNifFunc nif_funcs[] = { {"aead_encrypt", 6, aead_encrypt}, {"aead_decrypt", 6, aead_decrypt}, - {"chacha20_poly1305_encrypt", 4, chacha20_poly1305_encrypt}, - {"chacha20_poly1305_decrypt", 5, chacha20_poly1305_decrypt}, - {"chacha20_stream_init", 2, chacha20_stream_init}, {"chacha20_stream_encrypt", 2, chacha20_stream_crypt}, {"chacha20_stream_decrypt", 2, chacha20_stream_crypt}, @@ -726,6 +720,9 @@ static ERL_NIF_TERM atom_aes_gcm; #ifdef HAVE_CCM static ERL_NIF_TERM atom_aes_ccm; #endif +#ifdef HAVE_CHACHA20_POLY1305 +static ERL_NIF_TERM atom_chacha20_poly1305; +#endif #ifdef HAVE_ECB_IVEC_BUG static ERL_NIF_TERM atom_aes_ecb; static ERL_NIF_TERM atom_des_ecb; @@ -1172,6 +1169,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #ifdef HAVE_CCM atom_aes_ccm = enif_make_atom(env, "aes_ccm"); #endif +#ifdef HAVE_CHACHA20_POLY1305 + atom_chacha20_poly1305 = enif_make_atom(env,"chacha20_poly1305"); +#endif #ifdef HAVE_ECB_IVEC_BUG atom_aes_ecb = enif_make_atom(env, "aes_ecb"); atom_des_ecb = enif_make_atom(env, "des_ecb"); @@ -2620,6 +2620,17 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar enif_make_badarg(env); } else +#endif +#if defined(HAVE_CHACHA20_POLY1305) + if ((type == atom_chacha20_poly1305) + && key.size == 32 + && (1 <= iv.size && iv.size <= 16) + && tag_len == 16 + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_AEAD_GET_TAG, + cipher = EVP_chacha20_poly1305(); + } else #endif enif_make_badarg(env); @@ -2627,11 +2638,6 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_set_ivlen, iv.size, NULL) != 1) goto out_err; -#if defined(HAVE_GCM) - if (type == atom_aes_gcm) { - if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; - } else -#endif #if defined(HAVE_CCM) if (type == atom_aes_ccm) { if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, tag_len, NULL) != 1) goto out_err; @@ -2639,14 +2645,14 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (EVP_EncryptUpdate(ctx, NULL, &len, NULL, in.size) != 1) goto out_err; } else #endif - goto out_err; + if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) goto out_err; if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; outp = enif_make_new_binary(env, in.size, &out); if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; - if (EVP_EncryptFinal_ex(ctx, outp, &len) != 1) goto out_err; + if (EVP_EncryptFinal_ex(ctx, outp/*+len*/, &len) != 1) goto out_err; tagp = enif_make_new_binary(env, tag_len, &out_tag); @@ -2673,7 +2679,7 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar ErlNifBinary key, iv, aad, in, tag; unsigned char *outp; ERL_NIF_TERM type, out; - int len, ctx_ctrl_set_ivlen; + int len, ctx_ctrl_set_ivlen, ctx_ctrl_set_tag; type = argv[0]; #if defined(HAVE_GCM_EVP_DECRYPT_BUG) @@ -2695,6 +2701,7 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if ((type == atom_aes_gcm) && (iv.size > 0)) { ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; + ctx_ctrl_set_tag = EVP_CTRL_GCM_SET_TAG; if (key.size == 16) cipher = EVP_aes_128_gcm(); else if (key.size == 24) cipher = EVP_aes_192_gcm(); else if (key.size == 32) cipher = EVP_aes_256_gcm(); @@ -2714,6 +2721,17 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar enif_make_badarg(env); } else +#endif +#if defined(HAVE_CHACHA20_POLY1305) + if ((type == atom_chacha20_poly1305) + && key.size == 32 + && (1 <= iv.size && iv.size <= 16) + && tag.size == 16 + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; + ctx_ctrl_set_tag = EVP_CTRL_AEAD_SET_TAG; + cipher = EVP_chacha20_poly1305(); + } else #endif enif_make_badarg(env); @@ -2740,9 +2758,9 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) goto out_err; if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) goto out_err; -#if defined(HAVE_GCM) +#if defined(HAVE_GCM) || defined(HAVE_CHACHA20_POLY1305) if (type == atom_aes_gcm) { - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1) goto out_err; + if (EVP_CIPHER_CTX_ctrl(ctx, ctx_ctrl_set_tag, tag.size, tag.data) != 1) goto out_err; if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) goto out_err; } #endif @@ -2807,120 +2825,6 @@ out_err: #endif /* HAVE_GCM_EVP_DECRYPT_BUG */ -static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key,Iv,AAD,In) */ -#if defined(HAVE_CHACHA20_POLY1305) - EVP_CIPHER_CTX *ctx; - const EVP_CIPHER *cipher = NULL; - ErlNifBinary key, iv, aad, in; - unsigned char *outp, *tagp; - ERL_NIF_TERM out, out_tag; - int len; - - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32 - || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16 - || !enif_inspect_iolist_as_binary(env, argv[2], &aad) - || !enif_inspect_iolist_as_binary(env, argv[3], &in)) { - return enif_make_badarg(env); - } - - cipher = EVP_chacha20_poly1305(); - - ctx = EVP_CIPHER_CTX_new(); - - if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - goto out_err; - - EVP_CIPHER_CTX_set_padding(ctx, 0); - - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1) - goto out_err; - if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) - goto out_err; - if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) - goto out_err; - - outp = enif_make_new_binary(env, in.size, &out); - - if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1) - goto out_err; - if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1) - goto out_err; - - tagp = enif_make_new_binary(env, 16, &out_tag); - - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, tagp) != 1) - goto out_err; - - EVP_CIPHER_CTX_free(ctx); - - CONSUME_REDS(env, in); - - return enif_make_tuple2(env, out, out_tag); - -out_err: - EVP_CIPHER_CTX_free(ctx); - return atom_error; -#else - return enif_raise_exception(env, atom_notsup); -#endif -} - -static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) -{/* (Key,Iv,AAD,In,Tag) */ -#if defined(HAVE_CHACHA20_POLY1305) - EVP_CIPHER_CTX *ctx; - const EVP_CIPHER *cipher = NULL; - ErlNifBinary key, iv, aad, in, tag; - unsigned char *outp; - ERL_NIF_TERM out; - int len; - - if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32 - || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16 - || !enif_inspect_iolist_as_binary(env, argv[2], &aad) - || !enif_inspect_iolist_as_binary(env, argv[3], &in) - || !enif_inspect_iolist_as_binary(env, argv[4], &tag) || tag.size != 16) { - return enif_make_badarg(env); - } - - cipher = EVP_chacha20_poly1305(); - - ctx = EVP_CIPHER_CTX_new(); - - if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) - goto out_err; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1) - goto out_err; - if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1) - goto out_err; - if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1) - goto out_err; - - outp = enif_make_new_binary(env, in.size, &out); - - if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1) - goto out_err; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag.size, tag.data) != 1) - goto out_err; - if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1) - goto out_err; - - EVP_CIPHER_CTX_free(ctx); - - CONSUME_REDS(env, in); - - return out; - -out_err: - EVP_CIPHER_CTX_free(ctx); - return atom_error; -#else - return enif_raise_exception(env, atom_notsup); -#endif -} - - static ERL_NIF_TERM chacha20_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Key, IV) */ #if defined(HAVE_CHACHA20) diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 960fe46c09..2db73c4af0 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -526,8 +526,9 @@ block_encrypt(Type, Key, Ivec, {AAD, PlainText}) when Type =:= aes_gcm; block_encrypt(Type, Key, Ivec, {AAD, PlainText, TagLength}) when Type =:= aes_gcm; Type =:= aes_ccm -> aead_encrypt(Type, Key, Ivec, AAD, PlainText, TagLength); -block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> - chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). +block_encrypt(chacha20_poly1305=Type, Key, Ivec, {AAD, PlainText}) -> + aead_encrypt(Type, Key, Ivec, AAD, PlainText, 16). + -spec block_decrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), Data::iodata()) -> binary(); (Type::aead_cipher(), Key::iodata(), Ivec::binary(), @@ -557,11 +558,9 @@ block_decrypt(des3_cfb, Key0, Ivec, Data) -> block_decrypt(aes_ige256, Key, Ivec, Data) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, false)); block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm; - Type =:= aes_ccm -> - aead_decrypt(Type, Key, Ivec, AAD, Data, Tag); -block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> - chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). - + Type =:= aes_ccm; + Type =:= chacha20_poly1305 -> + aead_decrypt(Type, Key, Ivec, AAD, Data, Tag). -spec block_encrypt(Type::block_cipher_without_iv(), Key::key(), PlainText::iodata()) -> binary(). @@ -1616,12 +1615,6 @@ aead_encrypt(Type=aes_gcm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, aead_encrypt(_Type, _Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. aead_decrypt(_Type, _Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. -%% -%% Chacha20/Ppoly1305 -%% -chacha20_poly1305_encrypt(_Key, _Ivec, _AAD, _In) -> ?nif_stub. -chacha20_poly1305_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. - %% %% AES - with 256 bit key in infinite garble extension mode (IGE) %% -- cgit v1.2.3 From e737809f0338179bdafa9c9210d5c04c99e5559f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 17 Sep 2018 10:34:03 +0200 Subject: crypto: Fix bad return/exception for unsupported cipher Accidently f11391139c4165e8541a52d45cd1525343a83927 merged by 0a218353e4360e36bac304b6a4e0effe78d95615 changed the return exception 'notsup' to 'badarg' for unsupported chipher names. This changes that back. --- lib/crypto/c_src/crypto.c | 116 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 57 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index b1f0183ac2..d40d285f86 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -2592,47 +2592,48 @@ static ERL_NIF_TERM aead_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar /* Use cipher_type some day. Must check block_encrypt|decrypt first */ #if defined(HAVE_GCM) - if ((type == atom_aes_gcm) - && (iv.size > 0) - && (1 <= tag_len && tag_len <= 16)) { - ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; - ctx_ctrl_get_tag = EVP_CTRL_GCM_GET_TAG; - if (key.size == 16) cipher = EVP_aes_128_gcm(); - else if (key.size == 24) cipher = EVP_aes_192_gcm(); - else if (key.size == 32) cipher = EVP_aes_256_gcm(); - else + if (type == atom_aes_gcm) { + if ((iv.size > 0) + && (1 <= tag_len && tag_len <= 16)) { + ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_GCM_GET_TAG; + if (key.size == 16) cipher = EVP_aes_128_gcm(); + else if (key.size == 24) cipher = EVP_aes_192_gcm(); + else if (key.size == 32) cipher = EVP_aes_256_gcm(); + else enif_make_badarg(env); + } else enif_make_badarg(env); - } else #endif #if defined(HAVE_CCM) - if ((type == atom_aes_ccm) - && (7 <= iv.size && iv.size <= 13) - && (4 <= tag_len && tag_len <= 16) - && ((tag_len & 1) == 0) - ) { - ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; - ctx_ctrl_get_tag = EVP_CTRL_CCM_GET_TAG; - if (key.size == 16) cipher = EVP_aes_128_ccm(); - else if (key.size == 24) cipher = EVP_aes_192_ccm(); - else if (key.size == 32) cipher = EVP_aes_256_ccm(); - else + if (type == atom_aes_ccm) { + if ((7 <= iv.size && iv.size <= 13) + && (4 <= tag_len && tag_len <= 16) + && ((tag_len & 1) == 0) + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_CCM_GET_TAG; + if (key.size == 16) cipher = EVP_aes_128_ccm(); + else if (key.size == 24) cipher = EVP_aes_192_ccm(); + else if (key.size == 32) cipher = EVP_aes_256_ccm(); + else enif_make_badarg(env); + } else enif_make_badarg(env); - } else #endif #if defined(HAVE_CHACHA20_POLY1305) - if ((type == atom_chacha20_poly1305) - && key.size == 32 - && (1 <= iv.size && iv.size <= 16) - && tag_len == 16 - ) { - ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; - ctx_ctrl_get_tag = EVP_CTRL_AEAD_GET_TAG, - cipher = EVP_chacha20_poly1305(); + if (type == atom_chacha20_poly1305) { + if ((key.size == 32) + && (1 <= iv.size && iv.size <= 16) + && (tag_len == 16) + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; + ctx_ctrl_get_tag = EVP_CTRL_AEAD_GET_TAG, + cipher = EVP_chacha20_poly1305(); + } else enif_make_badarg(env); } else #endif - enif_make_badarg(env); + return enif_raise_exception(env, atom_notsup); ctx = EVP_CIPHER_CTX_new(); if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) goto out_err; @@ -2698,42 +2699,43 @@ static ERL_NIF_TERM aead_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar /* Use cipher_type some day. Must check block_encrypt|decrypt first */ #if defined(HAVE_GCM) - if ((type == atom_aes_gcm) - && (iv.size > 0)) { - ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; - ctx_ctrl_set_tag = EVP_CTRL_GCM_SET_TAG; - if (key.size == 16) cipher = EVP_aes_128_gcm(); - else if (key.size == 24) cipher = EVP_aes_192_gcm(); - else if (key.size == 32) cipher = EVP_aes_256_gcm(); - else + if (type == atom_aes_gcm) { + if (iv.size > 0) { + ctx_ctrl_set_ivlen = EVP_CTRL_GCM_SET_IVLEN; + ctx_ctrl_set_tag = EVP_CTRL_GCM_SET_TAG; + if (key.size == 16) cipher = EVP_aes_128_gcm(); + else if (key.size == 24) cipher = EVP_aes_192_gcm(); + else if (key.size == 32) cipher = EVP_aes_256_gcm(); + else enif_make_badarg(env); + } else enif_make_badarg(env); - } else #endif #if defined(HAVE_CCM) - if ((type == atom_aes_ccm) - && (iv.size > 0)) { - ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; - if (key.size == 16) cipher = EVP_aes_128_ccm(); - else if (key.size == 24) cipher = EVP_aes_192_ccm(); - else if (key.size == 32) cipher = EVP_aes_256_ccm(); - else + if (type == atom_aes_ccm) { + if (iv.size > 0) { + ctx_ctrl_set_ivlen = EVP_CTRL_CCM_SET_IVLEN; + if (key.size == 16) cipher = EVP_aes_128_ccm(); + else if (key.size == 24) cipher = EVP_aes_192_ccm(); + else if (key.size == 32) cipher = EVP_aes_256_ccm(); + else enif_make_badarg(env); + } else enif_make_badarg(env); - } else #endif #if defined(HAVE_CHACHA20_POLY1305) - if ((type == atom_chacha20_poly1305) - && key.size == 32 - && (1 <= iv.size && iv.size <= 16) - && tag.size == 16 - ) { - ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; - ctx_ctrl_set_tag = EVP_CTRL_AEAD_SET_TAG; - cipher = EVP_chacha20_poly1305(); + if (type == atom_chacha20_poly1305) { + if ((key.size == 32) + && (1 <= iv.size && iv.size <= 16) + && tag.size == 16 + ) { + ctx_ctrl_set_ivlen = EVP_CTRL_AEAD_SET_IVLEN; + ctx_ctrl_set_tag = EVP_CTRL_AEAD_SET_TAG; + cipher = EVP_chacha20_poly1305(); + } else enif_make_badarg(env); } else #endif - enif_make_badarg(env); + return enif_raise_exception(env, atom_notsup); outp = enif_make_new_binary(env, in.size, &out); -- cgit v1.2.3 From 8c47a7657d03777a03a6838c7ec937b6347d07f8 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 18 Sep 2018 12:13:42 +0200 Subject: crypto: Add warnings in RefMan and User's Guide for experimental RSA opts --- lib/crypto/doc/src/algorithm_details.xml | 8 +++++++- lib/crypto/doc/src/crypto.xml | 14 ++++++++++++++ lib/crypto/src/crypto.erl | 19 +++++++++++++------ 3 files changed, 34 insertions(+), 7 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index 2d02422cb6..19a19b1ece 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -213,7 +213,13 @@ list with the public_keys tag in the return value of crypto:supports().

- + + +

The RSA options are experimental. +

+

The exact set of options and there syntax may be changed + without prior notice.

+
Option sign/verify encrypt/decrypt Supported with
OpenSSL versions
{rsa_mgf1_md,atom()} x x 1.0.1 diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index e6811a9a93..b7447cb9a3 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -284,6 +284,13 @@

Options for public key encrypt/decrypt. Only RSA is supported.

+ + +

The RSA options are experimental. +

+

The exact set of options and there syntax may be changed + without prior notice.

+
@@ -309,6 +316,13 @@

Options for sign and verify.

+ + +

The RSA options are experimental. +

+

The exact set of options and there syntax may be changed + without prior notice.

+
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 2db73c4af0..960fe46c09 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -526,9 +526,8 @@ block_encrypt(Type, Key, Ivec, {AAD, PlainText}) when Type =:= aes_gcm; block_encrypt(Type, Key, Ivec, {AAD, PlainText, TagLength}) when Type =:= aes_gcm; Type =:= aes_ccm -> aead_encrypt(Type, Key, Ivec, AAD, PlainText, TagLength); -block_encrypt(chacha20_poly1305=Type, Key, Ivec, {AAD, PlainText}) -> - aead_encrypt(Type, Key, Ivec, AAD, PlainText, 16). - +block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> + chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). -spec block_decrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), Data::iodata()) -> binary(); (Type::aead_cipher(), Key::iodata(), Ivec::binary(), @@ -558,9 +557,11 @@ block_decrypt(des3_cfb, Key0, Ivec, Data) -> block_decrypt(aes_ige256, Key, Ivec, Data) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, false)); block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm; - Type =:= aes_ccm; - Type =:= chacha20_poly1305 -> - aead_decrypt(Type, Key, Ivec, AAD, Data, Tag). + Type =:= aes_ccm -> + aead_decrypt(Type, Key, Ivec, AAD, Data, Tag); +block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> + chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). + -spec block_encrypt(Type::block_cipher_without_iv(), Key::key(), PlainText::iodata()) -> binary(). @@ -1615,6 +1616,12 @@ aead_encrypt(Type=aes_gcm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, aead_encrypt(_Type, _Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. aead_decrypt(_Type, _Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. +%% +%% Chacha20/Ppoly1305 +%% +chacha20_poly1305_encrypt(_Key, _Ivec, _AAD, _In) -> ?nif_stub. +chacha20_poly1305_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. + %% %% AES - with 256 bit key in infinite garble extension mode (IGE) %% -- cgit v1.2.3 From 3a23cabe452837a28feed3860f3c257ded5948cd Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 18 Sep 2018 16:22:57 +0200 Subject: crypto: Re-work the 'Description' section Links and contents needs update. --- lib/crypto/doc/src/crypto.xml | 179 +++++++++++++++++++++++++++++++++--------- 1 file changed, 144 insertions(+), 35 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index b7447cb9a3..651b647e1c 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -28,41 +28,150 @@

This module provides a set of cryptographic functions.

- - -

Hash functions - - Secure Hash Standard, - The MD5 Message Digest Algorithm (RFC 1321) and - The MD4 Message Digest Algorithm (RFC 1320) -

-
- -

Hmac functions - Keyed-Hashing for Message Authentication (RFC 2104)

-
- -

Cmac functions - The AES-CMAC Algorithm (RFC 4493)

-
- -

Block ciphers - DES and AES in - Block Cipher Modes - ECB, CBC, CFB, OFB, CTR and GCM

-
- -

GCM: Dworkin, M., - "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", - National Institute of Standards and Technology SP 800-38D, November 2007. -

-
- -

RSA encryption RFC 1321

-
- -

Digital signatures Digital Signature Standard (DSS) and Elliptic Curve Digital - Signature Algorithm (ECDSA)

-
- -

Secure Remote Password Protocol (SRP - RFC 2945)

-
-
+ + Hash functions + +

+ + SHA1, SHA2 + + + Secure Hash Standard [FIPS PUB 180-4] + + + SHA3 + + + SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions [FIPS PUB 202] + + + MD5 + + The MD5 Message Digest Algorithm [RFC 1321] + + MD4 + + The MD4 Message Digest Algorithm [RFC 1320] + + +

+
+ + MACs - Message Authentication Codes + +

+ + Hmac functions + + + Keyed-Hashing for Message Authentication [RFC 2104] + + + Cmac functions + + + The AES-CMAC Algorithm [RFC 4493] + + + POLY1305 + + + ChaCha20 and Poly1305 for IETF Protocols [RFC 7539] + + + +

+
+ + Symmetric Ciphers + +

+ + DES, 3DES and AES + + Block Cipher Techniques [NIST] + + Blowfish + + + Fast Software Encryption, Cambridge Security Workshop Proceedings (December 1993), Springer-Verlag, 1994, pp. 191-204. + + + Chacha20 + + + ChaCha20 and Poly1305 for IETF Protocols [RFC 7539] + + + Chacha20_poly1305 + + + ChaCha20 and Poly1305 for IETF Protocols [RFC 7539] + + + +

+
+ + Modes + +

+ + ECB, CBC, CFB, OFB and CTR + + + Recommendation for Block Cipher Modes of Operation: Methods and Techniques [NIST SP 800-38A] + + + GCM + + + Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC [NIST SP 800-38D] + + + CCM + + + Recommendation for Block Cipher Modes of Operation: + The CCM Mode for Authentication and Confidentiality [NIST SP 800-38C] + + + +

+
+ + Asymetric Ciphers - Public Key Techniques + +

+ + RSA + + + PKCS #1: RSA Cryptography Specifications [RFC 3447] + + + DSS + + + Digital Signature Standard (DSS) [FIPS 186-4] + + + ECDSA + + + Elliptic Curve Digital Signature Algorithm [ECDSA] + + + SRP + + + The SRP Authentication and Key Exchange System [RFC 2945] + + + +

+
+

The actual supported algorithms and features depends on their availability in the actual libcrypto used. -- cgit v1.2.3 From d04b53936d5e9f84a3066ecd466993671b1428bf Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Fri, 21 Sep 2018 12:23:25 +0200 Subject: Update copyright year --- lib/crypto/doc/src/algorithm_details.xml | 2 +- lib/crypto/doc/src/engine_keys.xml | 2 +- lib/crypto/doc/src/engine_load.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index 19a19b1ece..68ad264df7 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -4,7 +4,7 @@

- 20142017 + 20142018 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/engine_keys.xml b/lib/crypto/doc/src/engine_keys.xml index 4f7b0243fb..feeb353d1e 100644 --- a/lib/crypto/doc/src/engine_keys.xml +++ b/lib/crypto/doc/src/engine_keys.xml @@ -4,7 +4,7 @@
- 20172017 + 20172018 Ericsson AB. All Rights Reserved. diff --git a/lib/crypto/doc/src/engine_load.xml b/lib/crypto/doc/src/engine_load.xml index 3d0aa0c32a..5f7ccc784b 100644 --- a/lib/crypto/doc/src/engine_load.xml +++ b/lib/crypto/doc/src/engine_load.xml @@ -4,7 +4,7 @@
- 20172017 + 20172018 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From 299291fd3da85eff4a1f5d9a602d514c4ac9e6f6 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 20 Sep 2018 10:50:32 +0200 Subject: crypto: Fix accidental merge Commit 8c47a7657d03777a03a6838c7ec937b6347d07f8 accidently reverted the changes in lib/crypto/src/crypto.erl correctly introduced in e8de0736005e91afd992e49f434e08c940eddfa0 This fix re-introduces the correct changes. --- lib/crypto/src/crypto.erl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 960fe46c09..2db73c4af0 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -526,8 +526,9 @@ block_encrypt(Type, Key, Ivec, {AAD, PlainText}) when Type =:= aes_gcm; block_encrypt(Type, Key, Ivec, {AAD, PlainText, TagLength}) when Type =:= aes_gcm; Type =:= aes_ccm -> aead_encrypt(Type, Key, Ivec, AAD, PlainText, TagLength); -block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, PlainText}) -> - chacha20_poly1305_encrypt(Key, Ivec, AAD, PlainText). +block_encrypt(chacha20_poly1305=Type, Key, Ivec, {AAD, PlainText}) -> + aead_encrypt(Type, Key, Ivec, AAD, PlainText, 16). + -spec block_decrypt(Type::block_cipher_with_iv(), Key::key()|des3_key(), Ivec::binary(), Data::iodata()) -> binary(); (Type::aead_cipher(), Key::iodata(), Ivec::binary(), @@ -557,11 +558,9 @@ block_decrypt(des3_cfb, Key0, Ivec, Data) -> block_decrypt(aes_ige256, Key, Ivec, Data) -> notsup_to_error(aes_ige_crypt_nif(Key, Ivec, Data, false)); block_decrypt(Type, Key, Ivec, {AAD, Data, Tag}) when Type =:= aes_gcm; - Type =:= aes_ccm -> - aead_decrypt(Type, Key, Ivec, AAD, Data, Tag); -block_decrypt(chacha20_poly1305, Key, Ivec, {AAD, Data, Tag}) -> - chacha20_poly1305_decrypt(Key, Ivec, AAD, Data, Tag). - + Type =:= aes_ccm; + Type =:= chacha20_poly1305 -> + aead_decrypt(Type, Key, Ivec, AAD, Data, Tag). -spec block_encrypt(Type::block_cipher_without_iv(), Key::key(), PlainText::iodata()) -> binary(). @@ -1616,12 +1615,6 @@ aead_encrypt(Type=aes_gcm, Key, Ivec, AAD, In) -> aead_encrypt(Type, Key, Ivec, aead_encrypt(_Type, _Key, _Ivec, _AAD, _In, _TagLength) -> ?nif_stub. aead_decrypt(_Type, _Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. -%% -%% Chacha20/Ppoly1305 -%% -chacha20_poly1305_encrypt(_Key, _Ivec, _AAD, _In) -> ?nif_stub. -chacha20_poly1305_decrypt(_Key, _Ivec, _AAD, _In, _Tag) -> ?nif_stub. - %% %% AES - with 256 bit key in infinite garble extension mode (IGE) %% -- cgit v1.2.3 From fb7006280f8d5a45459e1fba066fe6f6131e8e86 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 24 Sep 2018 11:32:41 +0200 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 111 +++++++++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 112 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index 9207d09821..d81a8ddd87 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,117 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.3.3 + +
Fixed Bugs and Malfunctions + + +

+ The RSA options rsa_mgf1_md, rsa_oaep_md, + and rsa_oaep_label were always disabled. They will + now be enabled when a suitable cryptolib is used.

+

+ They are still experimental and may change without prior + notice.

+

+ Own Id: OTP-15212 Aux Id: ERL-675, PR1899, PR838

+
+ +

+ The ciphers aes_ige256 and blowfish_cbc had + naming issues in crypto:next_iv/2.

+

+ Own Id: OTP-15283

+
+ +

+ the RSA_SSLV23_PADDING is disabled if LibreSSL is + used as cryptlib. This is due to compilation problems.

+

+ This will be investigated further in the future.

+

+ Own Id: OTP-15303

+
+
+
+ + +
Improvements and New Features + + +

+ The supported named elliptic curves are now reported in + crypto:supports/0 in a new entry tagged by + 'curves'.

+

+ The function crypto:ec_curves/0 is kept for + compatibility.

+

+ Own Id: OTP-14717 Aux Id: OTP-15244

+
+ +

+ The typing in the CRYPTO and PUBLIC_KEY applications are + reworked and a few mistakes are corrected.

+

+ The documentation is now generated from the typing and + some clarifications are made.

+

+ A new chapter on Algorithm Details such as key sizes and + availability is added to the CRYPTO User's Guide.

+

+ Own Id: OTP-15134

+
+ +

+ Support for SHA3 both as a separate hash and in HMAC is + now available if OpenSSL 1.1.1 or higher is used as + cryptolib.

+

+ Available lengths are reported in the 'hashs' + entry in crypto:supports/0 as sha3_*.

+

+ Own Id: OTP-15153

+
+ +

+ The mac algorithm poly1305 and the cipher + algorithm chacha20 are now supported if OpenSSL + 1.1.1 or higher is used as cryptolib.

+

+ Own Id: OTP-15164 Aux Id: OTP-15209

+
+ +

+ The key exchange Edward curves x25519 and + x448 are now supported if OpenSSL 1.1.1 or higher + is used as cryptolib.

+

+ Own Id: OTP-15240 Aux Id: OTP-15133

+
+ +

+ The supported RSA options for sign/verify and + encrypt/decrypt are now reported in + crypto:supports/0 in a new entry tagged by + 'rsa_opts'.

+

+ The exakt set is still experimental and may change + without prior notice.

+

+ Own Id: OTP-15260

+
+ +

+ The cipher aes_ccm is added.

+

+ Own Id: OTP-15286

+
+
+
+ +
+
Crypto 4.3.2
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index d262492668..64d593f64a 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3.2 +CRYPTO_VSN = 4.3.3 -- cgit v1.2.3 From 21f07ba4f63c9e2df74f23b17088cd32de5c50f6 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 1 Oct 2018 12:22:01 +0200 Subject: crypto: Update RSA options to match specs and different OpenSSL versions - Put rsa_pkcs1_oaep_padding in supports/0 - #ifdef updates - Refine PKCS1_OAEP defines --- lib/crypto/c_src/crypto.c | 29 ++++++---- lib/crypto/doc/src/algorithm_details.xml | 92 +++++++++++++++++++++++--------- 2 files changed, 88 insertions(+), 33 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index d40d285f86..b2d8123f00 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -189,6 +189,10 @@ # define HAVE_GCM # define HAVE_CCM # define HAVE_CMAC +# if defined(RSA_PKCS1_OAEP_PADDING) +# define HAVE_RSA_OAEP_PADDING +# endif +# define HAVE_RSA_MGF1_MD # if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION(1,0,1,'d') # define HAVE_GCM_EVP_DECRYPT_BUG # endif @@ -1340,7 +1344,7 @@ static ERL_NIF_TERM algo_mac[3]; /* increase when extending the list */ static int algo_curve_cnt, algo_curve_fips_cnt; static ERL_NIF_TERM algo_curve[87]; /* increase when extending the list */ static int algo_rsa_opts_cnt, algo_rsa_opts_fips_cnt; -static ERL_NIF_TERM algo_rsa_opts[10]; /* increase when extending the list */ +static ERL_NIF_TERM algo_rsa_opts[11]; /* increase when extending the list */ static void init_algorithms_types(ErlNifEnv* env) { @@ -1562,7 +1566,12 @@ static void init_algorithms_types(ErlNifEnv* env) algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pkcs1_pss_padding"); algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pss_saltlen"); # endif +# ifdef HAVE_RSA_MGF1_MD algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_mgf1_md"); +# endif +# ifdef HAVE_RSA_OAEP_PADDING + algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_pkcs1_oaep_padding"); +# endif # ifdef HAVE_RSA_OAEP_MD algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_oaep_label"); algo_rsa_opts[algo_rsa_opts_cnt++] = enif_make_atom(env,"rsa_oaep_md"); @@ -4693,16 +4702,16 @@ printf("\r\n"); if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; -#ifdef HAVE_RSA_PKCS1_PSS_PADDING +# ifdef HAVE_RSA_PKCS1_PSS_PADDING if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { if (sig_opt.rsa_mgf1_md != NULL) { -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) +# ifdef HAVE_RSA_MGF1_MD if (EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; -#else +# else EVP_PKEY_CTX_free(ctx); EVP_PKEY_free(pkey); return atom_notsup; -#endif +# endif } if (sig_opt.rsa_pss_saltlen > -2 && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) @@ -4833,13 +4842,13 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; if (sig_opt.rsa_padding == RSA_PKCS1_PSS_PADDING) { if (sig_opt.rsa_mgf1_md != NULL) { -#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1) +# ifdef HAVE_RSA_MGF1_MD if (EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, sig_opt.rsa_mgf1_md) <= 0) goto badarg; -#else +# else EVP_PKEY_CTX_free(ctx); EVP_PKEY_free(pkey); return atom_notsup; -#endif +# endif } if (sig_opt.rsa_pss_saltlen > -2 && EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, sig_opt.rsa_pss_saltlen) <= 0) @@ -4932,8 +4941,10 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI ) { if (tpl_terms[1] == atom_rsa_pkcs1_padding) { opt->rsa_padding = RSA_PKCS1_PADDING; +#ifdef HAVE_RSA_OAEP_PADDING } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) { opt->rsa_padding = RSA_PKCS1_OAEP_PADDING; +#endif #ifdef HAVE_RSA_SSLV23_PADDING } else if (tpl_terms[1] == atom_rsa_sslv23_padding) { opt->rsa_padding = RSA_SSLV23_PADDING; @@ -4952,7 +4963,7 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI } opt->signature_md = opt_md; } else if (tpl_terms[0] == atom_rsa_mgf1_md && enif_is_atom(env, tpl_terms[1])) { -#ifndef HAVE_RSA_OAEP_MD +#ifndef HAVE_RSA_MGF1_MD if (tpl_terms[1] != atom_sha) return PKEY_NOTSUP; #endif diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index 68ad264df7..4d58d26970 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -63,9 +63,9 @@ aes_ige256163216 blowfish_cbc 4-56 8 8 - blowfish_cfb64 1- 8 any - blowfish_ecb1- 8 - blowfish_ofb641-8any + blowfish_cfb64 ≥1 8 any + blowfish_ecb≥1 8 + blowfish_ofb64≥18any des3_cbc
(=DES EDE3 CBC)
[8,8,8]88
des3_cfb
(=DES EDE3 CFB)
[8,8,8]8any
@@ -74,7 +74,7 @@ des_cfb88any des_ecb8 8 des_ede3
(=DES EDE3 CBC)
[8,8,8]88
- rc2_cbc1-88 + rc2_cbc≥188 Block cipher key lengths
@@ -90,9 +90,9 @@

Cipher and ModeKey length
[bytes]
IV length
[bytes]
AAD length
[bytes]
Tag length
[bytes]
Block size
[bytes]
Supported with
OpenSSL versions
- aes_ccm 16,24,32 7-13 any even 4-16
default: 12
any1.1.0 -
- aes_gcm 16,24,32 1- any 1-16
default: 16
any1.1.0 -
- chacha20_poly130532 1-16 any 16 any1.1.0 - + aes_ccm 16,24,32 7-13 any even 4-16
default: 12
any≥1.1.0
+ aes_gcm 16,24,32 ≥1 any 1-16
default: 16
any≥1.1.0
+ chacha20_poly130532 1-16 any 16 any≥1.1.0AEAD cipher key lengths
@@ -108,8 +108,8 @@

Cipher and ModeKey length
[bytes]
IV length
[bytes]
Supported with
OpenSSL versions
- aes_ctr16, 24, 32161.0.1 - - rc41- all + aes_ctr16, 24, 3216≥1.0.1 + rc4≥1 allStream cipher key lengths
@@ -141,9 +141,9 @@ aes_cfb8 161 blowfish_cbc 4-56 8 - blowfish_cfb64 1- 1 - blowfish_ecb1- 8 - blowfish_ofb641- 1 + blowfish_cfb64 ≥1 1 + blowfish_ecb≥1 8 + blowfish_ofb64≥1 1 des3_cbc
(=DES EDE3 CBC)
[8,8,8]8
des3_cfb
(=DES EDE3 CFB)
[8,8,8]1
@@ -152,7 +152,7 @@ des_cfb81 des_ecb81 - rc2_cbc1-8 + rc2_cbc≥18 CMAC cipher key lengths
@@ -195,7 +195,7 @@ SHA1shaall SHA2sha224, sha256, sha384, sha512all - SHA3sha3_224, sha3_256, sha3_384, sha3_5121.1.1 - + SHA3sha3_224, sha3_256, sha3_384, sha3_512≥1.1.1 MD4md4all MD5md5all RIPEMDripemd160all @@ -221,18 +221,62 @@ without prior notice.

- Option sign/verify encrypt/decrypt Supported with
OpenSSL versions
- {rsa_mgf1_md,atom()} x x 1.0.1 - {rsa_oaep_label, binary()} x - {rsa_oaep_md, atom()} x - {rsa_padding,rsa_pkcs1_pss_padding} x 1.0.0 - {rsa_pss_saltlen, -2..} x 1.0.0 - {rsa_padding,rsa_no_padding} x x - {rsa_padding,rsa_pkcs1_padding} x x - {rsa_padding,rsa_sslv23_padding} x - {rsa_padding,rsa_x931_padding} x + Option + sign/verify + public encrypt
private decrypt
+ private encrypt
public decrypt
+
+ {rsa_padding,rsa_x931_padding} + x + + x + + {rsa_padding,rsa_pkcs1_padding} + x + x + x + + {rsa_padding,rsa_pkcs1_pss_padding}
+ {rsa_pss_saltlen, -2..}
+ {rsa_mgf1_md, atom()} +
+ x (2)
+ x (2)
+ x (2)
+ + +
+ {rsa_padding,rsa_pkcs1_oaep_padding}
+ {rsa_mgf1_md, atom()}
+ {rsa_oaep_label, binary()}}
+ {rsa_oaep_md, atom()} +
+ + x (2)
+ x (2)
+ x (3)
+ x (3) +
+ +
+ {rsa_padding,rsa_no_padding} + x (1) + + + +
+

Notes:

+ + (1) OpenSSL ≤ 1.0.0 + (2) OpenSSL ≥ 1.0.1 + (3) OpenSSL ≥ 1.1.0 +
-- cgit v1.2.3 From 571490514ef6bff3a9643fd7d282cde7a874e7f6 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 9 Oct 2018 15:06:12 +0200 Subject: crypto: Update RSA tests after algorithms doc chapter --- lib/crypto/test/crypto_SUITE.erl | 171 +++++++++++++++++++++------------------ 1 file changed, 93 insertions(+), 78 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 495c2adb55..025c46aab0 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -495,14 +495,14 @@ sign_verify(Config) when is_list(Config) -> public_encrypt() -> [{doc, "Test public_encrypt/decrypt "}]. public_encrypt(Config) when is_list(Config) -> - Params = proplists:get_value(pub_priv_encrypt, Config), + Params = proplists:get_value(pub_pub_encrypt, Config, []), lists:foreach(fun do_public_encrypt/1, Params). %%-------------------------------------------------------------------- private_encrypt() -> [{doc, "Test private_encrypt/decrypt functions. "}]. private_encrypt(Config) when is_list(Config) -> - Params = proplists:get_value(pub_priv_encrypt, Config), + Params = proplists:get_value(pub_priv_encrypt, Config, []), lists:foreach(fun do_private_encrypt/1, Params). %%-------------------------------------------------------------------- @@ -943,30 +943,6 @@ negative_verify(Type, Hash, Msg, Signature, Public, Options) -> ok end. --define(PUB_PRIV_ENC_DEC_CATCH(Type,Padding), - CC:EE -> - ct:log("~p:~p in ~p:~p/~p, line ~p.~n" - "Type = ~p~nPadding = ~p", - [CC,EE,?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,?LINE,(Type),(Padding)]), - MaybeUnsupported = - case crypto:info_lib() of - [{<<"OpenSSL">>,_,_}] -> - is_list(Padding) andalso - lists:any(fun(P) -> lists:member(P,(Padding)) end, - [{rsa_padding, rsa_pkcs1_oaep_padding}, - {rsa_padding, rsa_sslv23_padding}, - {rsa_padding, rsa_x931_padding}]); - _ -> - false - end, - case CC of - error when MaybeUnsupported -> - ct:comment("Padding unsupported?",[]); - _ -> - ct:fail({?FUNCTION_NAME,CC,EE,(Type),(Padding)}) - end - ). - do_public_encrypt({Type, Public, Private, Msg, Padding}) -> try crypto:public_encrypt(Type, Msg, Public, Padding) @@ -980,10 +956,12 @@ do_public_encrypt({Type, Public, Private, Msg, Padding}) -> Other -> ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, Other}}) catch - ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + CC:EE -> + ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, {CC,EE}}}) end catch - ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + CC:EE -> + ct:fail({{crypto, public_encrypt, [Type, Msg, Public, Padding]}, {got, {CC,EE}}}) end. @@ -1000,10 +978,12 @@ do_private_encrypt({Type, Public, Private, Msg, Padding}) -> Other -> ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, Other}}) catch - ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + CC:EE -> + ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, {CC,EE}}}) end catch - ?PUB_PRIV_ENC_DEC_CATCH(Type, Padding) + CC:EE -> + ct:fail({{crypto, private_encrypt, [Type, Msg, Private, Padding]}, {got, {CC,EE}}}) end. do_generate_compute({srp = Type, UserPrivate, UserGenParams, UserComParams, @@ -1395,36 +1375,42 @@ group_config(sha3_384 = Type, Config) -> group_config(sha3_512 = Type, Config) -> {Msgs,Digests} = sha3_test_vectors(Type), [{hash, {Type, Msgs, Digests}}, {hmac, hmac_sha3(Type)} | Config]; -group_config(rsa = Type, Config) -> +group_config(rsa, Config) -> Msg = rsa_plain(), Public = rsa_public(), Private = rsa_private(), PublicS = rsa_public_stronger(), PrivateS = rsa_private_stronger(), - SignVerify = - case ?config(fips, Config) of - true -> - %% Use only the strong keys in FIPS mode - sign_verify_tests(Type, Msg, - PublicS, PrivateS, - PublicS, PrivateS); - false -> - sign_verify_tests(Type, Msg, - Public, Private, - PublicS, PrivateS) - end, MsgPubEnc = <<"7896345786348 Asldi">>, - PubPrivEnc = [{rsa, PublicS, PrivateS, MsgPubEnc, rsa_pkcs1_padding}, - {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_pkcs1_padding}]}, - {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_sslv23_padding}]}, - {rsa, PublicS, PrivateS, MsgPubEnc, [{rsa_padding, rsa_x931_padding}]}, - rsa_oaep(), - %% rsa_oaep_label(), - %% rsa_oaep256(), - no_padding() + SignVerify_OptsToTry = [[{rsa_padding, rsa_x931_padding}], + [{rsa_padding, rsa_pkcs1_padding}], + [{rsa_padding, rsa_pkcs1_pss_padding}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, -2}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, 5}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_mgf1_md,sha}], + [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_mgf1_md,sha}, {rsa_pss_saltlen, 5}] + ], + PrivEnc_OptsToTry = [rsa_pkcs1_padding, % Compatibility + [{rsa_pad, rsa_pkcs1_padding}], % Compatibility + [{rsa_padding, rsa_pkcs1_padding}], + [{rsa_padding,rsa_x931_padding}] + ], + PubEnc_OptsToTry = [rsa_pkcs1_padding, % Compatibility + [{rsa_pad, rsa_pkcs1_padding}], % Compatibility + [{rsa_padding, rsa_pkcs1_padding}], + [{rsa_padding,rsa_pkcs1_oaep_padding}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_oaep_label, <<"Hej hopp">>}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_oaep_md,sha}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_oaep_md,sha}, {rsa_oaep_label, <<"Hej hopp">>}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_mgf1_md,sha}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_mgf1_md,sha}, {rsa_oaep_label, <<"Hej hopp">>}], + [{rsa_padding,rsa_pkcs1_oaep_padding}, {rsa_mgf1_md,sha}, {rsa_oaep_md,sha}, {rsa_oaep_label, <<"Hej hopp">>}] ], - Generate = [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}], - [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc}, {generate, Generate} | Config]; + [{sign_verify, rsa_sign_verify_tests(Config, Msg, Public, Private, PublicS, PrivateS, SignVerify_OptsToTry)}, + {pub_priv_encrypt, gen_rsa_pub_priv_tests(PublicS, PrivateS, MsgPubEnc, PrivEnc_OptsToTry)}, + {pub_pub_encrypt, gen_rsa_pub_priv_tests(PublicS, PrivateS, MsgPubEnc, PubEnc_OptsToTry)}, + {generate, [{rsa, 1024, 3}, {rsa, 2048, 17}, {rsa, 3072, 65537}]} + | Config]; group_config(dss = Type, Config) -> Msg = dss_plain(), Public = dss_params() ++ [dss_public()], @@ -1553,40 +1539,74 @@ group_config(aes_cbc, Config) -> group_config(_, Config) -> Config. -sign_verify_tests(Type, Msg, Public, Private, PublicS, PrivateS) -> - gen_sign_verify_tests(Type, [md5, ripemd160, sha, sha224, sha256], Msg, Public, Private, - [undefined, - [{rsa_padding, rsa_pkcs1_pss_padding}], - [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, 0}], - [{rsa_padding, rsa_x931_padding}] - ]) ++ - gen_sign_verify_tests(Type, [sha384, sha512], Msg, PublicS, PrivateS, - [undefined, - [{rsa_padding, rsa_pkcs1_pss_padding}], - [{rsa_padding, rsa_pkcs1_pss_padding}, {rsa_pss_saltlen, 0}], - [{rsa_padding, rsa_x931_padding}] - ]). - -gen_sign_verify_tests(Type, Hashs, Msg, Public, Private, Opts) -> +rsa_sign_verify_tests(Config, Msg, Public, Private, PublicS, PrivateS, OptsToTry) -> + case ?config(fips, Config) of + true -> + %% Use only the strong keys in FIPS mode + rsa_sign_verify_tests(Msg, + PublicS, PrivateS, + PublicS, PrivateS, + OptsToTry); + false -> + rsa_sign_verify_tests(Msg, + Public, Private, + PublicS, PrivateS, + OptsToTry) + end. + +rsa_sign_verify_tests(Msg, Public, Private, PublicS, PrivateS, OptsToTry) -> + gen_rsa_sign_verify_tests([md5, ripemd160, sha, sha224, sha256], Msg, Public, Private, + [undefined | OptsToTry]) ++ + gen_rsa_sign_verify_tests([sha384, sha512], Msg, PublicS, PrivateS, + [undefined | OptsToTry]). + +gen_rsa_sign_verify_tests(Hashs, Msg, Public, Private, Opts) -> + SupOpts = proplists:get_value(rsa_opts, crypto:supports(), []), lists:foldr(fun(Hash, Acc0) -> case is_supported(Hash) of true -> lists:foldr(fun (undefined, Acc1) -> - [{Type, Hash, Public, Private, Msg} | Acc1]; + [{rsa, Hash, Public, Private, Msg} | Acc1]; ([{rsa_padding, rsa_x931_padding} | _], Acc1) when Hash =:= md5 orelse Hash =:= ripemd160 orelse Hash =:= sha224 -> Acc1; (Opt, Acc1) -> - [{Type, Hash, Public, Private, Msg, Opt} | Acc1] + case rsa_opt_is_supported(Opt, SupOpts) of + true -> + [{rsa, Hash, Public, Private, Msg, Opt} | Acc1]; + false -> + Acc1 + end end, Acc0, Opts); false -> Acc0 end end, [], Hashs). + +gen_rsa_pub_priv_tests(Public, Private, Msg, OptsToTry) -> + SupOpts = proplists:get_value(rsa_opts, crypto:supports(), []), + lists:foldr(fun(Opt, Acc) -> + case rsa_opt_is_supported(Opt, SupOpts) of + true -> + [{rsa, Public, Private, Msg, Opt} | Acc]; + false -> + Acc + end + end, [], OptsToTry). + + +rsa_opt_is_supported([_|_]=Opt, Sup) -> + lists:all(fun(O) -> rsa_opt_is_supported(O,Sup) end, Opt); +rsa_opt_is_supported({A,B}, Sup) -> + rsa_opt_is_supported(A,Sup) orelse rsa_opt_is_supported(B,Sup); +rsa_opt_is_supported(Opt, Sup) -> + lists:member(Opt, Sup). + + rfc_1321_msgs() -> [<<"">>, <<"a">>, @@ -2803,6 +2823,8 @@ ecdh() -> dh() -> {dh, 90970053988169282502023478715631717259407236400413906591937635666709823903223997309250405131675572047545403771567755831138144089197560332757755059848492919215391041119286178688014693040542889497092308638580104031455627238700168892909539193174537248629499995652186913900511641708112112482297874449292467498403, 2}. + + rsa_oaep() -> %% ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15crypt-vectors.txt Public = [hexstr2bin("010001"), @@ -2877,13 +2899,6 @@ cmac_nist(Config, aes_cbc256 = Type) -> read_rsp(Config, Type, ["CMACGenAES256.rsp", "CMACVerAES256.rsp"]). -no_padding() -> - Public = [_, Mod] = rsa_public_stronger(), - Private = rsa_private_stronger(), - MsgLen = erlang:byte_size(int_to_bin(Mod)), - Msg = list_to_binary(lists:duplicate(MsgLen, $X)), - {rsa, Public, Private, Msg, rsa_no_padding}. - int_to_bin(X) when X < 0 -> int_to_bin_neg(X, []); int_to_bin(X) -> int_to_bin_pos(X, []). @@ -3063,7 +3078,7 @@ parse_rsp(Type, file := File, alen := Alen, plen := Plen, - nlen := Nlen, + nlen := _Nlen, tlen := Tlen, key := Key, nonce := IV, -- cgit v1.2.3 From d53cb8e4f366669714c8c68a0fb481e8eaf849c9 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 22 Oct 2018 10:12:47 +0200 Subject: crypto: Disable engine tests on Darwin and Windows Does not work. --- lib/crypto/test/engine_SUITE.erl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index b083b30d70..0427923941 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -75,11 +75,18 @@ groups() -> init_per_suite(Config) -> - case crypto:info_lib() of - [{_,_, <<"OpenSSL 1.0.1s-freebsd 1 Mar 2016">>}] -> + case {os:type(), crypto:info_lib()} of + {_, [{_,_, <<"OpenSSL 1.0.1s-freebsd 1 Mar 2016">>}]} -> {skip, "Problem with engine on OpenSSL 1.0.1s-freebsd"}; - Res -> - ct:log("crypto:info_lib() -> ~p\n", [Res]), + + {{unix,darwin}, _} -> + {skip, "Engine unsupported on Darwin"}; + + {{win32,_}, _} -> + {skip, "Engine unsupported on Windows"}; + + {OS, Res} -> + ct:log("crypto:info_lib() -> ~p\nos:type() -> ~p", [Res,OS]), try crypto:start() of ok -> Config; -- cgit v1.2.3 From 93550a678b6459b6490b1a2341207021bd4e6cb2 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 22 Oct 2018 10:50:00 +0200 Subject: crypto: Fix tests failing if more than one test engine available This could happen in an Valgrind run: === Reason: no case clause matching ["otp_test_engine.so", "otp_test_engine.valgrind.so"] in function crypto:check_otp_test_engine/1 (crypto.erl, line 2026) in call from engine_SUITE:engine_load_all_methods/1 (engine_SUITE.erl, line 154) --- lib/crypto/src/crypto.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 2db73c4af0..c2ab88417e 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -2026,7 +2026,7 @@ check_otp_test_engine(LibDir) -> case filelib:wildcard("otp_test_engine*", LibDir) of [] -> {error, notexist}; - [LibName] -> + [LibName|_] -> % In case of Valgrind there could be more than one LibPath = filename:join(LibDir,LibName), case filelib:is_file(LibPath) of true -> -- cgit v1.2.3 From d8c407e2baede7654a580250a08f58d5f1662bcc Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 5 Nov 2018 16:51:05 +0100 Subject: crypto: Fix gcc 8 warning "division 'sizeof (...)' does not compute the number of array elements [-Wsizeof-pointer-div]" --- lib/crypto/c_src/crypto_callback.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c index 23d2bed057..0cc7dd609d 100644 --- a/lib/crypto/c_src/crypto_callback.c +++ b/lib/crypto/c_src/crypto_callback.c @@ -179,6 +179,10 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks) /* This is not really a NIF library, but we use ERL_NIF_INIT in order to * get access to the erl_nif API (on Windows). */ -ERL_NIF_INIT(dummy, (ErlNifFunc*)NULL , NULL, NULL, NULL, NULL) +static struct { + int dummy__; + ErlNifFunc funcv[0]; +} empty; +ERL_NIF_INIT(dummy, empty.funcv, NULL, NULL, NULL, NULL) #endif -- cgit v1.2.3 From 0727fa2e5c1ce8633096d4ad7c7f5f40e81d2264 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 9 Nov 2018 16:01:58 +0100 Subject: Parallel stress test strong_rand_bytes --- lib/crypto/test/crypto_SUITE.erl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 025c46aab0..6b7ed06797 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -38,6 +38,7 @@ all() -> mod_pow, exor, rand_uniform, + rand_threads, rand_plugin, rand_plugin_s ]. @@ -604,6 +605,25 @@ rand_uniform(Config) when is_list(Config) -> rand_uniform_aux_test(10), 10 = byte_size(crypto:strong_rand_bytes(10)). +%%-------------------------------------------------------------------- +rand_threads() -> + [{doc, "strong_rand_bytes in parallel threads"}]. +rand_threads(Config) when is_list(Config) -> + %% This will crash the emulator on at least one version of libcrypto + %% with buggy multithreading in RAND_bytes(). + %% The test needs to run at least a few minutes... + NofThreads = 4, + Fun = fun F() -> crypto:strong_rand_bytes(16), F() end, + PidRefs = [spawn_monitor(Fun) || _ <- lists:seq(1, NofThreads)], +%%% The test case takes too much time to run. +%%% Keep it around for reference by setting it down to just 10 seconds. +%%% receive after 10 * 60 * 1000 -> ok end, % 10 minutes + receive after 10 * 1000 -> ok end, % 10 seconds + spawn_link(fun () -> receive after 5000 -> exit(timeout) end end), + [exit(Pid, stop) || {Pid,_Ref} <- PidRefs], + [receive {'DOWN',Ref,_,_,stop} -> ok end || {_Pid,Ref} <- PidRefs], + ok. + %%-------------------------------------------------------------------- rand_plugin() -> [{doc, "crypto rand plugin testing (implicit state / process dictionary)"}]. -- cgit v1.2.3 From 1263a979ffa5ad629938771e510281f248241824 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 11 Jun 2018 11:08:43 +0200 Subject: crypto: Add ed25519 and ed448 sign/verify --- lib/crypto/c_src/crypto.c | 155 ++++++++++++++++++++++++++++++++++++++++------ lib/crypto/src/crypto.erl | 36 +++++++---- 2 files changed, 160 insertions(+), 31 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index b2d8123f00..ecb716c98c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -173,10 +173,13 @@ #endif // (test for >= 1.1.1pre8) -#if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) - 7) \ +#if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1) -7) \ && !defined(HAS_LIBRESSL) \ && defined(HAVE_EC) # define HAVE_ED_CURVE_DH +# if OPENSSL_VERSION_NUMBER >= (PACKED_OPENSSL_VERSION_PLAIN(1,1,1)) +# define HAVE_EDDSA +# endif #endif #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'c') @@ -632,10 +635,8 @@ static ErlNifFunc nif_funcs[] = { {"rsa_generate_key_nif", 2, rsa_generate_key_nif}, {"dh_generate_key_nif", 4, dh_generate_key_nif}, {"dh_compute_key_nif", 3, dh_compute_key_nif}, - {"evp_compute_key_nif", 3, evp_compute_key_nif}, {"evp_generate_key_nif", 1, evp_generate_key_nif}, - {"privkey_to_pubkey_nif", 2, privkey_to_pubkey_nif}, {"srp_value_B_nif", 5, srp_value_B_nif}, {"srp_user_secret_nif", 7, srp_user_secret_nif}, @@ -742,6 +743,12 @@ static ERL_NIF_TERM atom_x25519; static ERL_NIF_TERM atom_x448; #endif +static ERL_NIF_TERM atom_eddsa; +#ifdef HAVE_EDDSA +static ERL_NIF_TERM atom_ed25519; +static ERL_NIF_TERM atom_ed448; +#endif + static ERL_NIF_TERM atom_rsa_mgf1_md; static ERL_NIF_TERM atom_rsa_oaep_label; static ERL_NIF_TERM atom_rsa_oaep_md; @@ -1165,6 +1172,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) atom_ppbasis = enif_make_atom(env,"ppbasis"); atom_onbasis = enif_make_atom(env,"onbasis"); #endif + atom_aes_cfb8 = enif_make_atom(env, "aes_cfb8"); atom_aes_cfb128 = enif_make_atom(env, "aes_cfb128"); #ifdef HAVE_GCM @@ -1194,6 +1202,11 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) #ifdef HAVE_ED_CURVE_DH atom_x25519 = enif_make_atom(env,"x25519"); atom_x448 = enif_make_atom(env,"x448"); +#endif + atom_eddsa = enif_make_atom(env,"eddsa"); +#ifdef HAVE_EDDSA + atom_ed25519 = enif_make_atom(env,"ed25519"); + atom_ed448 = enif_make_atom(env,"ed448"); #endif atom_rsa_mgf1_md = enif_make_atom(env,"rsa_mgf1_md"); atom_rsa_oaep_label = enif_make_atom(env,"rsa_oaep_label"); @@ -1336,13 +1349,13 @@ static void unload(ErlNifEnv* env, void* priv_data) static int algo_hash_cnt, algo_hash_fips_cnt; static ERL_NIF_TERM algo_hash[12]; /* increase when extending the list */ static int algo_pubkey_cnt, algo_pubkey_fips_cnt; -static ERL_NIF_TERM algo_pubkey[11]; /* increase when extending the list */ +static ERL_NIF_TERM algo_pubkey[12]; /* increase when extending the list */ static int algo_cipher_cnt, algo_cipher_fips_cnt; static ERL_NIF_TERM algo_cipher[25]; /* increase when extending the list */ static int algo_mac_cnt, algo_mac_fips_cnt; static ERL_NIF_TERM algo_mac[3]; /* increase when extending the list */ static int algo_curve_cnt, algo_curve_fips_cnt; -static ERL_NIF_TERM algo_curve[87]; /* increase when extending the list */ +static ERL_NIF_TERM algo_curve[89]; /* increase when extending the list */ static int algo_rsa_opts_cnt, algo_rsa_opts_fips_cnt; static ERL_NIF_TERM algo_rsa_opts[11]; /* increase when extending the list */ @@ -1394,6 +1407,10 @@ static void init_algorithms_types(ErlNifEnv* env) #endif // Non-validated algorithms follow algo_pubkey_fips_cnt = algo_pubkey_cnt; + // Don't know if Edward curves are fips validated +#if defined(HAVE_EDDSA) + algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "eddsa"); +#endif algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env, "srp"); // Validated algorithms first @@ -1554,6 +1571,10 @@ static void init_algorithms_types(ErlNifEnv* env) #endif #endif //-- +#ifdef HAVE_EDDSA + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"ed25519"); + algo_curve[algo_curve_cnt++] = enif_make_atom(env,"ed448"); +#endif #ifdef HAVE_ED_CURVE_DH algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x25519"); algo_curve[algo_curve_cnt++] = enif_make_atom(env,"x448"); @@ -3215,6 +3236,36 @@ static int get_rsa_public_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa) return 1; } +#ifdef HAVE_EDDSA + static int get_eddsa_key(ErlNifEnv* env, int public, ERL_NIF_TERM key, EVP_PKEY **pkey) +{ + /* key=[K] */ + ERL_NIF_TERM head, tail, tail2, algo; + ErlNifBinary bin; + int type; + + if (!enif_get_list_cell(env, key, &head, &tail) + || !enif_inspect_binary(env, head, &bin) + || !enif_get_list_cell(env, tail, &algo, &tail2) + || !enif_is_empty_list(env, tail2)) { + return 0; + } + if (algo == atom_ed25519) type = EVP_PKEY_ED25519; + else if (algo == atom_ed448) type = EVP_PKEY_ED448; + else + return 0; + + if (public) + *pkey = EVP_PKEY_new_raw_public_key(type, NULL, bin.data, bin.size); + else + *pkey = EVP_PKEY_new_raw_private_key(type, NULL, bin.data, bin.size); + + if (!pkey) + return 0; + return 1; +} +#endif + static int get_dss_private_key(ErlNifEnv* env, ERL_NIF_TERM key, DSA *dsa) { /* key=[P,Q,G,KEY] */ @@ -4296,7 +4347,9 @@ static int get_pkey_digest_type(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_ *md = NULL; if (type == atom_none && algorithm == atom_rsa) return PKEY_OK; - +#ifdef HAVE_EDDSA + if (algorithm == atom_eddsa) return PKEY_OK; +#endif digp = get_digest_type(type); if (!digp) return PKEY_BADARG; if (!digp->md.p) return PKEY_NOTSUP; @@ -4545,6 +4598,14 @@ static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_ } #else return PKEY_NOTSUP; +#endif + } else if (algorithm == atom_eddsa) { +#if defined(HAVE_EDDSA) + if (!get_eddsa_key(env, 0, key, pkey)) { + return PKEY_BADARG; + } +#else + return PKEY_NOTSUP; #endif } else if (algorithm == atom_dss) { DSA *dsa = DSA_new(); @@ -4623,6 +4684,14 @@ static int get_pkey_public_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_T } #else return PKEY_NOTSUP; +#endif + } else if (algorithm == atom_eddsa) { +#if defined(HAVE_EDDSA) + if (!get_eddsa_key(env, 1, key, pkey)) { + return PKEY_BADARG; + } +#else + return PKEY_NOTSUP; #endif } else if (algorithm == atom_dss) { DSA *dsa = DSA_new(); @@ -4697,8 +4766,10 @@ printf("\r\n"); ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; - if (EVP_PKEY_sign_init(ctx) <= 0) goto badarg; - if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + if (argv[0] != atom_eddsa) { + if (EVP_PKEY_sign_init(ctx) <= 0) goto badarg; + if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + } if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; @@ -4720,14 +4791,39 @@ printf("\r\n"); #endif } - if (EVP_PKEY_sign(ctx, NULL, &siglen, tbs, tbslen) <= 0) goto badarg; - enif_alloc_binary(siglen, &sig_bin); + if (argv[0] == atom_eddsa) { +#ifdef HAVE_EDDSA + EVP_MD_CTX* mdctx = EVP_MD_CTX_new(); + if (!EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey)) { + if (mdctx) EVP_MD_CTX_free(mdctx); + goto badarg; + } - if (md != NULL) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); + if (!EVP_DigestSign(mdctx, NULL, &siglen, tbs, tbslen)) { + EVP_MD_CTX_free(mdctx); + goto badarg; + } + enif_alloc_binary(siglen, &sig_bin); + + if (!EVP_DigestSign(mdctx, sig_bin.data, &siglen, tbs, tbslen)) { + EVP_MD_CTX_free(mdctx); + goto badarg; + } +#else + goto badarg; +#endif } - i = EVP_PKEY_sign(ctx, sig_bin.data, &siglen, tbs, tbslen); + else + { + if (EVP_PKEY_sign(ctx, NULL, &siglen, tbs, tbslen) <= 0) goto badarg; + enif_alloc_binary(siglen, &sig_bin); + if (md != NULL) { + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); + } + i = EVP_PKEY_sign(ctx, sig_bin.data, &siglen, tbs, tbslen); + } + EVP_PKEY_CTX_free(ctx); #else /*printf("Old interface\r\n"); @@ -4835,8 +4931,11 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM */ ctx = EVP_PKEY_CTX_new(pkey, NULL); if (!ctx) goto badarg; - if (EVP_PKEY_verify_init(ctx) <= 0) goto badarg; - if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + + if (argv[0] != atom_eddsa) { + if (EVP_PKEY_verify_init(ctx) <= 0) goto badarg; + if (md != NULL && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) goto badarg; + } if (argv[0] == atom_rsa) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, sig_opt.rsa_padding) <= 0) goto badarg; @@ -4856,10 +4955,28 @@ static ERL_NIF_TERM pkey_verify_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM } } - if (md != NULL) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); - } - i = EVP_PKEY_verify(ctx, sig_bin.data, sig_bin.size, tbs, tbslen); + if (argv[0] == atom_eddsa) { +#ifdef HAVE_EDDSA + EVP_MD_CTX* mdctx = EVP_MD_CTX_create(); + + if (!EVP_DigestVerifyInit(mdctx, NULL, NULL, NULL, pkey)) { + if (mdctx) EVP_MD_CTX_destroy(mdctx); + goto badarg; + } + + i = EVP_DigestVerify(mdctx, sig_bin.data, sig_bin.size, tbs, tbslen); + EVP_MD_CTX_destroy(mdctx); +#else + goto badarg; +#endif + } + else + { + if (md != NULL) { + ERL_VALGRIND_ASSERT_MEM_DEFINED(tbs, EVP_MD_size(md)); + } + i = EVP_PKEY_verify(ctx, sig_bin.data, sig_bin.size, tbs, tbslen); + } EVP_PKEY_CTX_free(ctx); #else diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index c2ab88417e..af53a72e16 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -118,7 +118,11 @@ -type ecdsa_public() :: key_integer() . -type ecdsa_private() :: key_integer() . --type ecdsa_params() :: ec_named_curve() | edwards_curve() | ec_explicit_curve() . +-type ecdsa_params() :: ec_named_curve() | ec_explicit_curve() . + +-type eddsa_public() :: key_integer() . +-type eddsa_private() :: key_integer() . +-type eddsa_params() :: edwards_curve_ed() . -type srp_public() :: key_integer() . -type srp_private() :: key_integer() . @@ -135,7 +139,7 @@ -type ecdh_public() :: key_integer() . -type ecdh_private() :: key_integer() . --type ecdh_params() :: ec_named_curve() | edwards_curve() | ec_explicit_curve() . +-type ecdh_params() :: ec_named_curve() | edwards_curve_dh() | ec_explicit_curve() . %%% Curves @@ -247,8 +251,9 @@ | wtls9 . --type edwards_curve() :: x25519 - | x448 . +-type edwards_curve_dh() :: x25519 | x448 . + +-type edwards_curve_ed() :: ed25519 | ed448 . %%% -type block_cipher_with_iv() :: cbc_cipher() @@ -328,7 +333,7 @@ stop() -> ], PKs :: [rsa | dss | ecdsa | dh | ecdh | ec_gf2m], Macs :: [hmac | cmac | poly1305], - Curves :: [ec_named_curve() | edwards_curve()], + Curves :: [ec_named_curve() | edwards_curve_dh() | edwards_curve_ed()], RSAopts :: [rsa_sign_verify_opt() | rsa_opt()] . supports()-> {Hashs, PubKeys, Ciphers, Macs, Curves, RsaOpts} = algorithms(), @@ -777,7 +782,7 @@ rand_seed_nif(_Seed) -> ?nif_stub. %%% Sign/verify %%% %%%================================================================ --type pk_sign_verify_algs() :: rsa | dss | ecdsa . +-type pk_sign_verify_algs() :: rsa | dss | ecdsa | eddsa . -type pk_sign_verify_opts() :: [ rsa_sign_verify_opt() ] . @@ -801,7 +806,8 @@ rand_seed_nif(_Seed) -> ?nif_stub. Msg :: binary() | {digest,binary()}, Key :: rsa_private() | dss_private() - | [ecdsa_private()|ecdsa_params()] + | [ecdsa_private() | ecdsa_params()] + | [eddsa_private() | eddsa_params()] | engine_key_ref(), Signature :: binary() . @@ -820,6 +826,7 @@ sign(Algorithm, Type, Data, Key) -> Key :: rsa_private() | dss_private() | [ecdsa_private() | ecdsa_params()] + | [eddsa_private() | eddsa_params()] | engine_key_ref(), Options :: pk_sign_verify_opts(), Signature :: binary() . @@ -842,12 +849,14 @@ pkey_sign_nif(_Algorithm, _Type, _Digest, _Key, _Options) -> ?nif_stub. when Algorithm :: pk_sign_verify_algs(), DigestType :: rsa_digest_type() | dss_digest_type() - | ecdsa_digest_type(), + | ecdsa_digest_type() + | none, Msg :: binary() | {digest,binary()}, Signature :: binary(), - Key :: rsa_private() - | dss_private() - | [ecdsa_private() | ecdsa_params()] + Key :: rsa_public() + | dss_public() + | [ecdsa_public() | ecdsa_params()] + | [eddsa_public() | eddsa_params()] | engine_key_ref(), Result :: boolean(). @@ -865,6 +874,7 @@ verify(Algorithm, Type, Data, Signature, Key) -> Key :: rsa_public() | dss_public() | [ecdsa_public() | ecdsa_params()] + | [eddsa_public() | eddsa_params()] | engine_key_ref(), Options :: pk_sign_verify_opts(), Result :: boolean(). @@ -1762,7 +1772,9 @@ ec_key_generate(_Curve, _Key) -> ?nif_stub. ecdh_compute_key_nif(_Others, _Curve, _My) -> ?nif_stub. --spec ec_curves() -> [EllipticCurve] when EllipticCurve :: ec_named_curve() | edwards_curve() . +-spec ec_curves() -> [EllipticCurve] when EllipticCurve :: ec_named_curve() + | edwards_curve_dh() + | edwards_curve_ed() . ec_curves() -> crypto_ec_curves:curves(). -- cgit v1.2.3 From f2d14d46f0fd03f22bab628ebe8076e723f75c40 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 21 May 2018 16:28:19 +0200 Subject: crypto: Add eddsa test case (ed25519 and ed448) --- lib/crypto/test/crypto_SUITE.erl | 428 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 426 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 025c46aab0..e1dd3f2ace 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1,4 +1,4 @@ -%% +% %% %CopyrightBegin% %% %% Copyright Ericsson AB 1999-2018. All Rights Reserved. @@ -58,6 +58,8 @@ groups() -> {group, rsa}, {group, dss}, {group, ecdsa}, + {group, ed25519}, + {group, ed448}, {group, dh}, {group, ecdh}, {group, srp}, @@ -145,6 +147,12 @@ groups() -> {ecdsa, [], [sign_verify %% Does not work yet: ,public_encrypt, private_encrypt ]}, + {ed25519, [], [sign_verify + %% Does not work yet: ,public_encrypt, private_encrypt + ]}, + {ed448, [], [sign_verify + %% Does not work yet: ,public_encrypt, private_encrypt + ]}, {dh, [], [generate_compute, compute_bug]}, {ecdh, [], [generate_all_supported, compute, generate]}, @@ -572,7 +580,8 @@ generate_all_supported(_Config) -> ct:log("ERROR: Curve ~p exception ~p:~p~n~p", [C,Cls,Err,Stack]), {error,{C,{Cls,Err}}} end - || C <- crypto:ec_curves() + || C <- crypto:ec_curves(), + not lists:member(C, [ed25519, ed448]) ], OK = [C || {ok,C} <- Results], ct:log("Ok (len=~p): ~p", [length(OK), OK]), @@ -884,6 +893,29 @@ aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info} {got, Other1}}) end. +do_sign_verify({Type, undefined=Hash, Private, Public, Msg, Signature}) -> + case crypto:sign(eddsa, Hash, Msg, [Private,Type]) of + Signature -> + ct:log("OK crypto:sign(eddsa, ~p, Msg, [Private,~p])", [Hash,Type]), + case crypto:verify(eddsa, Hash, Msg, Signature, [Public,Type]) of + true -> + ct:log("OK crypto:verify(eddsa, ~p, Msg, Signature, [Public,~p])", [Hash,Type]), + negative_verify(eddsa, Hash, Msg, <<10,20>>, [Public,Type]); + false -> + ct:log("ERROR crypto:verify(eddsa, ~p, Msg= ~p, Signature= ~p, [Public= ~p,~p])", + [Hash,Msg,Signature,Public,Type]), + ct:fail({{crypto, verify, [eddsa, Hash, Msg, Signature, [Public,Type]]}}) + end; + ErrorSig -> + ct:log("ERROR crypto:sign(~p, ~p, ..., [Private= ~p,~p])", [eddsa,Hash,Private,Type]), + ct:log("ERROR crypto:verify(eddsa, ~p, Msg= ~p, [Public= ~p,~p])~n" + "ErrorSig = ~p~n" + "CorrectSig = ~p~n" + , + [Hash,Msg,Public,Type,ErrorSig,Signature]), + ct:fail({{crypto, sign, [Type, Hash, Msg, ErrorSig, [Private]]}}) + end; + do_sign_verify({Type, Hash, Public, Private, Msg}) -> Signature = crypto:sign(Type, Hash, Msg, Private), case crypto:verify(Type, Hash, Msg, Signature, Public) of @@ -1443,6 +1475,12 @@ group_config(ecdsa = Type, Config) -> MsgPubEnc = <<"7896345786348 Asldi">>, PubPrivEnc = [{ecdsa, Public, Private, MsgPubEnc, []}], [{sign_verify, SignVerify}, {pub_priv_encrypt, PubPrivEnc} | Config]; + +group_config(Type, Config) when Type == ed25519 ; Type == ed448 -> + TestVectors = eddsa(Type), + [{sign_verify,TestVectors} | Config]; + + group_config(srp, Config) -> GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()], [{generate_compute, GenerateCompute} | Config]; @@ -2702,6 +2740,392 @@ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPriv ServerPublic, ServerPrivate, {host, [Verifier, Generator, Prime, Version]}, {host, [Verifier, Prime, Version, Scrambler]}, SessionKey}. + +eddsa(ed25519) -> + %% https://tools.ietf.org/html/rfc8032#section-7.1 + %% {ALGORITHM, (SHA)}, SECRET KEY, PUBLIC KEY, MESSAGE, SIGNATURE} + [ + %% TEST 1 + {ed25519, undefined, + hexstr2bin("9d61b19deffd5a60ba844af492ec2cc4" + "4449c5697b326919703bac031cae7f60"), + hexstr2bin("d75a980182b10ab7d54bfed3c964073a" + "0ee172f3daa62325af021a68f707511a"), + hexstr2bin(""), + hexstr2bin("e5564300c360ac729086e2cc806e828a" + "84877f1eb8e5d974d873e06522490155" + "5fb8821590a33bacc61e39701cf9b46b" + "d25bf5f0595bbe24655141438e7a100b")}, + %% TEST 2 + {ed25519, undefined, + hexstr2bin("4ccd089b28ff96da9db6c346ec114e0f" + "5b8a319f35aba624da8cf6ed4fb8a6fb"), + hexstr2bin("3d4017c3e843895a92b70aa74d1b7ebc" + "9c982ccf2ec4968cc0cd55f12af4660c"), + hexstr2bin("72"), + hexstr2bin("92a009a9f0d4cab8720e820b5f642540" + "a2b27b5416503f8fb3762223ebdb69da" + "085ac1e43e15996e458f3613d0f11d8c" + "387b2eaeb4302aeeb00d291612bb0c00")}, + %% TEST 3 + {ed25519, undefined, + hexstr2bin("c5aa8df43f9f837bedb7442f31dcb7b1" + "66d38535076f094b85ce3a2e0b4458f7"), + hexstr2bin("fc51cd8e6218a1a38da47ed00230f058" + "0816ed13ba3303ac5deb911548908025"), + hexstr2bin("af82"), + hexstr2bin("6291d657deec24024827e69c3abe01a3" + "0ce548a284743a445e3680d7db5ac3ac" + "18ff9b538d16f290ae67f760984dc659" + "4a7c15e9716ed28dc027beceea1ec40a")}, + %% TEST 1024 + {ed25519, undefined, + hexstr2bin("f5e5767cf153319517630f226876b86c" + "8160cc583bc013744c6bf255f5cc0ee5"), + hexstr2bin("278117fc144c72340f67d0f2316e8386" + "ceffbf2b2428c9c51fef7c597f1d426e"), + hexstr2bin("08b8b2b733424243760fe426a4b54908" + "632110a66c2f6591eabd3345e3e4eb98" + "fa6e264bf09efe12ee50f8f54e9f77b1" + "e355f6c50544e23fb1433ddf73be84d8" + "79de7c0046dc4996d9e773f4bc9efe57" + "38829adb26c81b37c93a1b270b20329d" + "658675fc6ea534e0810a4432826bf58c" + "941efb65d57a338bbd2e26640f89ffbc" + "1a858efcb8550ee3a5e1998bd177e93a" + "7363c344fe6b199ee5d02e82d522c4fe" + "ba15452f80288a821a579116ec6dad2b" + "3b310da903401aa62100ab5d1a36553e" + "06203b33890cc9b832f79ef80560ccb9" + "a39ce767967ed628c6ad573cb116dbef" + "efd75499da96bd68a8a97b928a8bbc10" + "3b6621fcde2beca1231d206be6cd9ec7" + "aff6f6c94fcd7204ed3455c68c83f4a4" + "1da4af2b74ef5c53f1d8ac70bdcb7ed1" + "85ce81bd84359d44254d95629e9855a9" + "4a7c1958d1f8ada5d0532ed8a5aa3fb2" + "d17ba70eb6248e594e1a2297acbbb39d" + "502f1a8c6eb6f1ce22b3de1a1f40cc24" + "554119a831a9aad6079cad88425de6bd" + "e1a9187ebb6092cf67bf2b13fd65f270" + "88d78b7e883c8759d2c4f5c65adb7553" + "878ad575f9fad878e80a0c9ba63bcbcc" + "2732e69485bbc9c90bfbd62481d9089b" + "eccf80cfe2df16a2cf65bd92dd597b07" + "07e0917af48bbb75fed413d238f5555a" + "7a569d80c3414a8d0859dc65a46128ba" + "b27af87a71314f318c782b23ebfe808b" + "82b0ce26401d2e22f04d83d1255dc51a" + "ddd3b75a2b1ae0784504df543af8969b" + "e3ea7082ff7fc9888c144da2af58429e" + "c96031dbcad3dad9af0dcbaaaf268cb8" + "fcffead94f3c7ca495e056a9b47acdb7" + "51fb73e666c6c655ade8297297d07ad1" + "ba5e43f1bca32301651339e22904cc8c" + "42f58c30c04aafdb038dda0847dd988d" + "cda6f3bfd15c4b4c4525004aa06eeff8" + "ca61783aacec57fb3d1f92b0fe2fd1a8" + "5f6724517b65e614ad6808d6f6ee34df" + "f7310fdc82aebfd904b01e1dc54b2927" + "094b2db68d6f903b68401adebf5a7e08" + "d78ff4ef5d63653a65040cf9bfd4aca7" + "984a74d37145986780fc0b16ac451649" + "de6188a7dbdf191f64b5fc5e2ab47b57" + "f7f7276cd419c17a3ca8e1b939ae49e4" + "88acba6b965610b5480109c8b17b80e1" + "b7b750dfc7598d5d5011fd2dcc5600a3" + "2ef5b52a1ecc820e308aa342721aac09" + "43bf6686b64b2579376504ccc493d97e" + "6aed3fb0f9cd71a43dd497f01f17c0e2" + "cb3797aa2a2f256656168e6c496afc5f" + "b93246f6b1116398a346f1a641f3b041" + "e989f7914f90cc2c7fff357876e506b5" + "0d334ba77c225bc307ba537152f3f161" + "0e4eafe595f6d9d90d11faa933a15ef1" + "369546868a7f3a45a96768d40fd9d034" + "12c091c6315cf4fde7cb68606937380d" + "b2eaaa707b4c4185c32eddcdd306705e" + "4dc1ffc872eeee475a64dfac86aba41c" + "0618983f8741c5ef68d3a101e8a3b8ca" + "c60c905c15fc910840b94c00a0b9d0"), + hexstr2bin("0aab4c900501b3e24d7cdf4663326a3a" + "87df5e4843b2cbdb67cbf6e460fec350" + "aa5371b1508f9f4528ecea23c436d94b" + "5e8fcd4f681e30a6ac00a9704a188a03")}, + %% TEST SHA(abc) + {ed25519, undefined, + hexstr2bin("833fe62409237b9d62ec77587520911e" + "9a759cec1d19755b7da901b96dca3d42"), + hexstr2bin("ec172b93ad5e563bf4932c70e1245034" + "c35467ef2efd4d64ebf819683467e2bf"), + hexstr2bin("ddaf35a193617abacc417349ae204131" + "12e6fa4e89a97ea20a9eeee64b55d39a" + "2192992a274fc1a836ba3c23a3feebbd" + "454d4423643ce80e2a9ac94fa54ca49f"), + hexstr2bin("dc2a4459e7369633a52b1bf277839a00" + "201009a3efbf3ecb69bea2186c26b589" + "09351fc9ac90b3ecfdfbc7c66431e030" + "3dca179c138ac17ad9bef1177331a704")} + ]; + +eddsa(ed448) -> + %% https://tools.ietf.org/html/rfc8032#section-7.4 + [{ed448, undefined, + hexstr2bin("6c82a562cb808d10d632be89c8513ebf" + "6c929f34ddfa8c9f63c9960ef6e348a3" + "528c8a3fcc2f044e39a3fc5b94492f8f" + "032e7549a20098f95b"), + hexstr2bin("5fd7449b59b461fd2ce787ec616ad46a" + "1da1342485a70e1f8a0ea75d80e96778" + "edf124769b46c7061bd6783df1e50f6c" + "d1fa1abeafe8256180"), + hexstr2bin(""), + hexstr2bin("533a37f6bbe457251f023c0d88f976ae" + "2dfb504a843e34d2074fd823d41a591f" + "2b233f034f628281f2fd7a22ddd47d78" + "28c59bd0a21bfd3980ff0d2028d4b18a" + "9df63e006c5d1c2d345b925d8dc00b41" + "04852db99ac5c7cdda8530a113a0f4db" + "b61149f05a7363268c71d95808ff2e65" + "2600")}, + %% 1 octet + {ed448, undefined, + hexstr2bin("c4eab05d357007c632f3dbb48489924d" + "552b08fe0c353a0d4a1f00acda2c463a" + "fbea67c5e8d2877c5e3bc397a659949e" + "f8021e954e0a12274e"), + hexstr2bin("43ba28f430cdff456ae531545f7ecd0a" + "c834a55d9358c0372bfa0c6c6798c086" + "6aea01eb00742802b8438ea4cb82169c" + "235160627b4c3a9480"), + hexstr2bin("03"), + hexstr2bin("26b8f91727bd62897af15e41eb43c377" + "efb9c610d48f2335cb0bd0087810f435" + "2541b143c4b981b7e18f62de8ccdf633" + "fc1bf037ab7cd779805e0dbcc0aae1cb" + "cee1afb2e027df36bc04dcecbf154336" + "c19f0af7e0a6472905e799f1953d2a0f" + "f3348ab21aa4adafd1d234441cf807c0" + "3a00")}, + + %% %% 1 octet (with context) + %% {ed448, undefined, + %% hexstr2bin("c4eab05d357007c632f3dbb48489924d" + %% "552b08fe0c353a0d4a1f00acda2c463a" + %% "fbea67c5e8d2877c5e3bc397a659949e" + %% "f8021e954e0a12274e"), + %% hexstr2bin("43ba28f430cdff456ae531545f7ecd0a" + %% "c834a55d9358c0372bfa0c6c6798c086" + %% "6aea01eb00742802b8438ea4cb82169c" + %% "235160627b4c3a9480"), + %% hexstr2bin("03"), + %% hexstr2bin("666f6f"), % Context + %% hexstr2bin("d4f8f6131770dd46f40867d6fd5d5055" + %% "de43541f8c5e35abbcd001b32a89f7d2" + %% "151f7647f11d8ca2ae279fb842d60721" + %% "7fce6e042f6815ea000c85741de5c8da" + %% "1144a6a1aba7f96de42505d7a7298524" + %% "fda538fccbbb754f578c1cad10d54d0d" + %% "5428407e85dcbc98a49155c13764e66c" + %% "3c00")}, + + %% 11 octets + {ed448, undefined, + hexstr2bin("cd23d24f714274e744343237b93290f5" + "11f6425f98e64459ff203e8985083ffd" + "f60500553abc0e05cd02184bdb89c4cc" + "d67e187951267eb328"), + hexstr2bin("dcea9e78f35a1bf3499a831b10b86c90" + "aac01cd84b67a0109b55a36e9328b1e3" + "65fce161d71ce7131a543ea4cb5f7e9f" + "1d8b00696447001400"), + hexstr2bin("0c3e544074ec63b0265e0c"), + hexstr2bin("1f0a8888ce25e8d458a21130879b840a" + "9089d999aaba039eaf3e3afa090a09d3" + "89dba82c4ff2ae8ac5cdfb7c55e94d5d" + "961a29fe0109941e00b8dbdeea6d3b05" + "1068df7254c0cdc129cbe62db2dc957d" + "bb47b51fd3f213fb8698f064774250a5" + "028961c9bf8ffd973fe5d5c206492b14" + "0e00")}, + %% 12 octets + {ed448, undefined, + hexstr2bin("258cdd4ada32ed9c9ff54e63756ae582" + "fb8fab2ac721f2c8e676a72768513d93" + "9f63dddb55609133f29adf86ec9929dc" + "cb52c1c5fd2ff7e21b"), + hexstr2bin("3ba16da0c6f2cc1f30187740756f5e79" + "8d6bc5fc015d7c63cc9510ee3fd44adc" + "24d8e968b6e46e6f94d19b945361726b" + "d75e149ef09817f580"), + hexstr2bin("64a65f3cdedcdd66811e2915"), + hexstr2bin("7eeeab7c4e50fb799b418ee5e3197ff6" + "bf15d43a14c34389b59dd1a7b1b85b4a" + "e90438aca634bea45e3a2695f1270f07" + "fdcdf7c62b8efeaf00b45c2c96ba457e" + "b1a8bf075a3db28e5c24f6b923ed4ad7" + "47c3c9e03c7079efb87cb110d3a99861" + "e72003cbae6d6b8b827e4e6c143064ff" + "3c00")}, + %% 13 octets + {ed448, undefined, + hexstr2bin("7ef4e84544236752fbb56b8f31a23a10" + "e42814f5f55ca037cdcc11c64c9a3b29" + "49c1bb60700314611732a6c2fea98eeb" + "c0266a11a93970100e"), + hexstr2bin("b3da079b0aa493a5772029f0467baebe" + "e5a8112d9d3a22532361da294f7bb381" + "5c5dc59e176b4d9f381ca0938e13c6c0" + "7b174be65dfa578e80"), + hexstr2bin("64a65f3cdedcdd66811e2915e7"), + hexstr2bin("6a12066f55331b6c22acd5d5bfc5d712" + "28fbda80ae8dec26bdd306743c5027cb" + "4890810c162c027468675ecf645a8317" + "6c0d7323a2ccde2d80efe5a1268e8aca" + "1d6fbc194d3f77c44986eb4ab4177919" + "ad8bec33eb47bbb5fc6e28196fd1caf5" + "6b4e7e0ba5519234d047155ac727a105" + "3100")}, + %% 64 octets + {ed448, undefined, + hexstr2bin("d65df341ad13e008567688baedda8e9d" + "cdc17dc024974ea5b4227b6530e339bf" + "f21f99e68ca6968f3cca6dfe0fb9f4fa" + "b4fa135d5542ea3f01"), + hexstr2bin("df9705f58edbab802c7f8363cfe5560a" + "b1c6132c20a9f1dd163483a26f8ac53a" + "39d6808bf4a1dfbd261b099bb03b3fb5" + "0906cb28bd8a081f00"), + hexstr2bin("bd0f6a3747cd561bdddf4640a332461a" + "4a30a12a434cd0bf40d766d9c6d458e5" + "512204a30c17d1f50b5079631f64eb31" + "12182da3005835461113718d1a5ef944"), + hexstr2bin("554bc2480860b49eab8532d2a533b7d5" + "78ef473eeb58c98bb2d0e1ce488a98b1" + "8dfde9b9b90775e67f47d4a1c3482058" + "efc9f40d2ca033a0801b63d45b3b722e" + "f552bad3b4ccb667da350192b61c508c" + "f7b6b5adadc2c8d9a446ef003fb05cba" + "5f30e88e36ec2703b349ca229c267083" + "3900")}, + %% 256 octets + {ed448, undefined, + hexstr2bin("2ec5fe3c17045abdb136a5e6a913e32a" + "b75ae68b53d2fc149b77e504132d3756" + "9b7e766ba74a19bd6162343a21c8590a" + "a9cebca9014c636df5"), + hexstr2bin("79756f014dcfe2079f5dd9e718be4171" + "e2ef2486a08f25186f6bff43a9936b9b" + "fe12402b08ae65798a3d81e22e9ec80e" + "7690862ef3d4ed3a00"), + hexstr2bin("15777532b0bdd0d1389f636c5f6b9ba7" + "34c90af572877e2d272dd078aa1e567c" + "fa80e12928bb542330e8409f31745041" + "07ecd5efac61ae7504dabe2a602ede89" + "e5cca6257a7c77e27a702b3ae39fc769" + "fc54f2395ae6a1178cab4738e543072f" + "c1c177fe71e92e25bf03e4ecb72f47b6" + "4d0465aaea4c7fad372536c8ba516a60" + "39c3c2a39f0e4d832be432dfa9a706a6" + "e5c7e19f397964ca4258002f7c0541b5" + "90316dbc5622b6b2a6fe7a4abffd9610" + "5eca76ea7b98816af0748c10df048ce0" + "12d901015a51f189f3888145c03650aa" + "23ce894c3bd889e030d565071c59f409" + "a9981b51878fd6fc110624dcbcde0bf7" + "a69ccce38fabdf86f3bef6044819de11"), + hexstr2bin("c650ddbb0601c19ca11439e1640dd931" + "f43c518ea5bea70d3dcde5f4191fe53f" + "00cf966546b72bcc7d58be2b9badef28" + "743954e3a44a23f880e8d4f1cfce2d7a" + "61452d26da05896f0a50da66a239a8a1" + "88b6d825b3305ad77b73fbac0836ecc6" + "0987fd08527c1a8e80d5823e65cafe2a" + "3d00")}, + %% 1023 octets + {ed448, undefined, + hexstr2bin("872d093780f5d3730df7c212664b37b8" + "a0f24f56810daa8382cd4fa3f77634ec" + "44dc54f1c2ed9bea86fafb7632d8be19" + "9ea165f5ad55dd9ce8"), + hexstr2bin("a81b2e8a70a5ac94ffdbcc9badfc3feb" + "0801f258578bb114ad44ece1ec0e799d" + "a08effb81c5d685c0c56f64eecaef8cd" + "f11cc38737838cf400"), + hexstr2bin("6ddf802e1aae4986935f7f981ba3f035" + "1d6273c0a0c22c9c0e8339168e675412" + "a3debfaf435ed651558007db4384b650" + "fcc07e3b586a27a4f7a00ac8a6fec2cd" + "86ae4bf1570c41e6a40c931db27b2faa" + "15a8cedd52cff7362c4e6e23daec0fbc" + "3a79b6806e316efcc7b68119bf46bc76" + "a26067a53f296dafdbdc11c77f7777e9" + "72660cf4b6a9b369a6665f02e0cc9b6e" + "dfad136b4fabe723d2813db3136cfde9" + "b6d044322fee2947952e031b73ab5c60" + "3349b307bdc27bc6cb8b8bbd7bd32321" + "9b8033a581b59eadebb09b3c4f3d2277" + "d4f0343624acc817804728b25ab79717" + "2b4c5c21a22f9c7839d64300232eb66e" + "53f31c723fa37fe387c7d3e50bdf9813" + "a30e5bb12cf4cd930c40cfb4e1fc6225" + "92a49588794494d56d24ea4b40c89fc0" + "596cc9ebb961c8cb10adde976a5d602b" + "1c3f85b9b9a001ed3c6a4d3b1437f520" + "96cd1956d042a597d561a596ecd3d173" + "5a8d570ea0ec27225a2c4aaff26306d1" + "526c1af3ca6d9cf5a2c98f47e1c46db9" + "a33234cfd4d81f2c98538a09ebe76998" + "d0d8fd25997c7d255c6d66ece6fa56f1" + "1144950f027795e653008f4bd7ca2dee" + "85d8e90f3dc315130ce2a00375a318c7" + "c3d97be2c8ce5b6db41a6254ff264fa6" + "155baee3b0773c0f497c573f19bb4f42" + "40281f0b1f4f7be857a4e59d416c06b4" + "c50fa09e1810ddc6b1467baeac5a3668" + "d11b6ecaa901440016f389f80acc4db9" + "77025e7f5924388c7e340a732e554440" + "e76570f8dd71b7d640b3450d1fd5f041" + "0a18f9a3494f707c717b79b4bf75c984" + "00b096b21653b5d217cf3565c9597456" + "f70703497a078763829bc01bb1cbc8fa" + "04eadc9a6e3f6699587a9e75c94e5bab" + "0036e0b2e711392cff0047d0d6b05bd2" + "a588bc109718954259f1d86678a579a3" + "120f19cfb2963f177aeb70f2d4844826" + "262e51b80271272068ef5b3856fa8535" + "aa2a88b2d41f2a0e2fda7624c2850272" + "ac4a2f561f8f2f7a318bfd5caf969614" + "9e4ac824ad3460538fdc25421beec2cc" + "6818162d06bbed0c40a387192349db67" + "a118bada6cd5ab0140ee273204f628aa" + "d1c135f770279a651e24d8c14d75a605" + "9d76b96a6fd857def5e0b354b27ab937" + "a5815d16b5fae407ff18222c6d1ed263" + "be68c95f32d908bd895cd76207ae7264" + "87567f9a67dad79abec316f683b17f2d" + "02bf07e0ac8b5bc6162cf94697b3c27c" + "d1fea49b27f23ba2901871962506520c" + "392da8b6ad0d99f7013fbc06c2c17a56" + "9500c8a7696481c1cd33e9b14e40b82e" + "79a5f5db82571ba97bae3ad3e0479515" + "bb0e2b0f3bfcd1fd33034efc6245eddd" + "7ee2086ddae2600d8ca73e214e8c2b0b" + "db2b047c6a464a562ed77b73d2d841c4" + "b34973551257713b753632efba348169" + "abc90a68f42611a40126d7cb21b58695" + "568186f7e569d2ff0f9e745d0487dd2e" + "b997cafc5abf9dd102e62ff66cba87"), + hexstr2bin("e301345a41a39a4d72fff8df69c98075" + "a0cc082b802fc9b2b6bc503f926b65bd" + "df7f4c8f1cb49f6396afc8a70abe6d8a" + "ef0db478d4c6b2970076c6a0484fe76d" + "76b3a97625d79f1ce240e7c576750d29" + "5528286f719b413de9ada3e8eb78ed57" + "3603ce30d8bb761785dc30dbc320869e" + "1a00")} + ]. + ecdh() -> %% http://csrc.nist.gov/groups/STM/cavp/ Curves = crypto:ec_curves() ++ -- cgit v1.2.3 From f4885a2443b33db431669e5891d9004a481c60be Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 12 Nov 2018 13:24:37 +0100 Subject: crypto: Add Edward curves to the documentation --- lib/crypto/doc/src/algorithm_details.xml | 14 ++++++++++++++ lib/crypto/doc/src/crypto.xml | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index 4d58d26970..854bfbb4b1 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -302,6 +302,20 @@

+
+ EdDSA +

EdDSA is available with OpenSSL 1.1.1 or later if not disabled by configuration. + To dynamically check availability, check that the atom eddsa is present in the + list with the public_keys tag in the return value of + crypto:supports(). +

+

Support for the curves ed25519 and ed448 is implemented. + The actual supported named curves could be checked by examining the list with the + curves tag in the return value of + crypto:supports(). +

+
+
Diffie-Hellman

Diffie-Hellman computations are available with OpenSSL versions compatible with Erlang CRYPTO diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 651b647e1c..b33db0d6e4 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -268,7 +268,8 @@ Elliptic Curves - + +

Note that some curves are disabled if FIPS is enabled.

@@ -347,6 +348,14 @@ + + + + + + + + -- cgit v1.2.3 From 21c3fbcbbd2971d8a7af0212162045ab778ab0eb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 16 Nov 2018 16:16:17 +0100 Subject: crypto: Update test engine with fake rsa support We need to test the Engine interface not only for loading, key retrieval and hashing, so it is complemented with a fake rsa method to check sign/verify also. --- lib/crypto/c_src/otp_test_engine.c | 144 ++++++++++++++++++++++++++++++++++--- lib/crypto/test/engine_SUITE.erl | 117 +++++++++++++++++++++++++----- 2 files changed, 235 insertions(+), 26 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index 34c825059f..94c639f5af 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -35,7 +35,12 @@ #if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0) \ || defined(LIBRESSL_VERSION_NUMBER) -#define OLD +# define OLD +#endif + +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0) \ + && !defined(LIBRESSL_VERSION_NUMBER) +# define FAKE_RSA_IMPL #endif #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \ @@ -56,13 +61,38 @@ static const char *test_engine_id = "MD5"; static const char *test_engine_name = "MD5 test engine"; +#if defined(FAKE_RSA_IMPL) +/*-------- test of private/public keys and RSA in engine ---------*/ +static RSA_METHOD *test_rsa_method = NULL; + +/* Our on "RSA" implementation */ +static int test_rsa_sign(int dtype, const unsigned char *m, + unsigned int m_len, unsigned char *sigret, + unsigned int *siglen, const RSA *rsa); +static int test_rsa_verify(int dtype, const unsigned char *m, + unsigned int m_len, const unsigned char *sigret, + unsigned int siglen, const RSA *rsa); +static int test_rsa_free(RSA *rsa); +#endif /* if defined(FAKE_RSA_IMPL) */ + /* The callback that does the job of fetching keys on demand by the Engine */ EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data); +/*----------------------------------------------------------------*/ static int test_init(ENGINE *e) { printf("OTP Test Engine Initializatzion!\r\n"); +#if defined(FAKE_RSA_IMPL) + if ( !RSA_meth_set_finish(test_rsa_method, test_rsa_free) + || !RSA_meth_set_sign(test_rsa_method, test_rsa_sign) + || !RSA_meth_set_verify(test_rsa_method, test_rsa_verify) + ) { + fprintf(stderr, "Setup RSA_METHOD failed\r\n"); + return 0; + } +#endif /* if defined(FAKE_RSA_IMPL) */ + /* Load all digest and cipher algorithms. Needed for password protected private keys */ OpenSSL_add_all_ciphers(); OpenSSL_add_all_digests(); @@ -79,6 +109,19 @@ static void add_test_data(unsigned char *md, unsigned int len) } } +#if defined(FAKE_RSA_IMPL) +static int chk_test_data(const unsigned char *md, unsigned int len) +{ + unsigned int i; + + for (i=0; i ctrl_cmd_string, ctrl_cmd_string_optional, ensure_load, - {group, engine_stored_key} + {group, engine_stored_key}, + {group, engine_fakes_rsa} ]. groups() -> [{engine_stored_key, [], - [sign_verify_rsa, + [ + sign_verify_rsa, sign_verify_dsa, sign_verify_ecdsa, sign_verify_rsa_pwd, @@ -71,7 +73,10 @@ groups() -> get_pub_from_priv_key_rsa_pwd_bad_pwd, get_pub_from_priv_key_dsa, get_pub_from_priv_key_ecdsa - ]}]. + ]}, + {engine_fakes_rsa, [], [sign_verify_rsa_fake + ]} + ]. init_per_suite(Config) -> @@ -102,7 +107,20 @@ end_per_suite(_Config) -> %%-------------------------------------------------------------------- init_per_group(engine_stored_key, Config) -> - case load_storage_engine(Config) of + group_load_engine(Config, [engine_method_rsa]); +init_per_group(engine_fakes_rsa, Config) -> + case crypto:info_lib() of + [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer), LibVer >= 16#10100000 -> + group_load_engine(Config, []); + _ -> + {skip, "Too low OpenSSL cryptolib version"} + end; +init_per_group(_Group, Config0) -> + Config0. + + +group_load_engine(Config, ExcludeMthds) -> + case load_storage_engine(Config, ExcludeMthds) of {ok, E} -> KeyDir = key_dir(Config), [{storage_engine,E}, {storage_dir,KeyDir} | Config]; @@ -115,19 +133,19 @@ init_per_group(engine_stored_key, Config) -> Other -> ct:log("Engine load failed: ~p",[Other]), {fail, "Engine load failed"} - end; -init_per_group(_Group, Config0) -> - Config0. + end. -end_per_group(engine_stored_key, Config) -> + + + + +end_per_group(_, Config) -> case proplists:get_value(storage_engine, Config) of undefined -> ok; E -> ok = crypto:engine_unload(E) - end; -end_per_group(_, _) -> - ok. + end. %%-------------------------------------------------------------------- init_per_testcase(_Case, Config) -> @@ -421,6 +439,9 @@ bad_arguments(Config) when is_list(Config) -> try try crypto:engine_load(fail_engine, [], []) + of + X1 -> + ct:fail("1 Got ~p",[X1]) catch error:badarg -> ok @@ -432,6 +453,11 @@ bad_arguments(Config) when is_list(Config) -> {<<"ID">>, <<"MD5">>}, <<"LOAD">>], []) + of + {error,bad_engine_id} -> + throw(dynamic_engine_unsupported); + X2 -> + ct:fail("2 Got ~p",[X2]) catch error:badarg -> ok @@ -442,13 +468,20 @@ bad_arguments(Config) when is_list(Config) -> {'ID', <<"MD5">>}, <<"LOAD">>], []) + of + {error,bad_engine_id} -> % should have happend in the previous try...catch end! + throw(dynamic_engine_unsupported); + X3 -> + ct:fail("3 Got ~p",[X3]) catch error:badarg -> ok end catch error:notsup -> - {skip, "Engine not supported on this SSL version"} + {skip, "Engine not supported on this SSL version"}; + throw:dynamic_engine_unsupported -> + {skip, "Dynamic Engine not supported"} end end. @@ -650,6 +683,14 @@ sign_verify_rsa(Config) -> key_id => key_id(Config, "rsa_public_key.pem")}, sign_verify(rsa, sha, Priv, Pub). +sign_verify_rsa_fake(Config) -> + %% Use fake engine rsa implementation + Priv = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_private_key.pem")}, + Pub = #{engine => engine_ref(Config), + key_id => key_id(Config, "rsa_public_key.pem")}, + sign_verify_fake(rsa, sha256, Priv, Pub). + sign_verify_dsa(Config) -> Priv = #{engine => engine_ref(Config), key_id => key_id(Config, "dsa_private_key.pem")}, @@ -809,13 +850,18 @@ get_pub_from_priv_key_ecdsa(Config) -> %%%================================================================ %%% Help for engine_stored_pub_priv_keys* test cases %%% -load_storage_engine(_Config) -> +load_storage_engine(Config) -> + load_storage_engine(Config, []). + +load_storage_engine(_Config, ExcludeMthds) -> case crypto:get_test_engine() of {ok, Engine} -> try crypto:engine_load(<<"dynamic">>, [{<<"SO_PATH">>, Engine}, <<"LOAD">>], - []) + [], + crypto:engine_get_all_methods() -- ExcludeMthds + ) catch error:notsup -> {error, notsup} @@ -873,10 +919,47 @@ sign_verify(Alg, Sha, KeySign, KeyVerify) -> true -> PlainText = <<"Hej på dig">>, Signature = crypto:sign(Alg, Sha, PlainText, KeySign), - case crypto:verify(Alg, Sha, PlainText, Signature, KeyVerify) of - true -> ok; - _ -> {fail, "Sign-verify error"} + case is_fake(Signature) of + true -> + ct:pal("SIG ~p ~p size ~p~n~p",[Alg,Sha,size(Signature),Signature]), + {fail, "Faked RSA impl used!!"}; + false -> + case crypto:verify(Alg, Sha, PlainText, Signature, KeyVerify) of + true -> ok; + _ -> {fail, "Sign-verify error"} + end + end; + false -> + {skip, lists:concat([Alg," is not supported by cryptolib"])} + end. + + +%%% Use fake engine rsa implementation +sign_verify_fake(Alg, Sha, KeySign, KeyVerify) -> + case pubkey_alg_supported(Alg) of + true -> + PlainText = <<"Fake me!">>, + Signature = crypto:sign(Alg, Sha, PlainText, KeySign), + case is_fake(Signature) of + true -> + case crypto:verify(Alg, Sha, PlainText, Signature, KeyVerify) of + true -> ok; + _ -> {fail, "Sign-verify error"} + end; + false -> + ct:pal("SIG ~p ~p size ~p~n~p",[Alg,Sha,size(Signature),Signature]), + {fail, "Faked impl not used"} end; false -> {skip, lists:concat([Alg," is not supported by cryptolib"])} end. + + +is_fake(Sig) -> is_fake(Sig, 0). + +is_fake(<<>>, _) -> true; +is_fake(<>, B) -> is_fake(Rest, B+1); +is_fake(_, _) -> false. + + + -- cgit v1.2.3 From e5ac56c69ca67c2cf6b779bb07bbd922855bc29a Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 21 Nov 2018 15:17:23 +0100 Subject: crypto: Split function in otp_test_engine Safer with one function to fetch public key and another for private key. --- lib/crypto/c_src/otp_test_engine.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index 94c639f5af..2c8cce094e 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -75,8 +75,11 @@ static int test_rsa_verify(int dtype, const unsigned char *m, static int test_rsa_free(RSA *rsa); #endif /* if defined(FAKE_RSA_IMPL) */ -/* The callback that does the job of fetching keys on demand by the Engine */ -EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data); +/* The callbacks that does the job of fetching keys on demand by the Engine */ +EVP_PKEY* test_privkey_load(ENGINE *eng, const char *id, UI_METHOD *ui_method, void *callback_data); +EVP_PKEY* test_pubkey_load(ENGINE *eng, const char *id, UI_METHOD *ui_method, void *callback_data); + +EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data, int priv); /*----------------------------------------------------------------*/ @@ -269,24 +272,29 @@ IMPLEMENT_DYNAMIC_BIND_FN(bind_helper); */ int pem_passwd_cb_fun(char *buf, int size, int rwflag, void *password); -EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *callback_data) +EVP_PKEY* test_privkey_load(ENGINE *eng, const char *id, UI_METHOD *ui_method, void *callback_data) { + return test_key_load(eng, id, ui_method, callback_data, 1); +} + +EVP_PKEY* test_pubkey_load(ENGINE *eng, const char *id, UI_METHOD *ui_method, void *callback_data) { + return test_key_load(eng, id, ui_method, callback_data, 0); +} + +EVP_PKEY* test_key_load(ENGINE *eng, const char *id, UI_METHOD *ui_method, void *callback_data, int priv) { EVP_PKEY *pkey = NULL; FILE *f = fopen(id, "r"); if (!f) { - fprintf(stderr, "%s:%d fopen(%s) failed\r\n", __FILE__,__LINE__,id); - return NULL; + fprintf(stderr, "%s:%d fopen(%s) failed\r\n", __FILE__,__LINE__,id); + return NULL; } - /* First try to read as a private key. If that fails, try to read as a public key: */ - pkey = PEM_read_PrivateKey(f, NULL, pem_passwd_cb_fun, callback_data); - if (!pkey) { - /* ERR_print_errors_fp (stderr); */ - fclose(f); - f = fopen(id, "r"); - pkey = PEM_read_PUBKEY(f, NULL, NULL, NULL); - } + pkey = + priv + ? PEM_read_PrivateKey(f, NULL, pem_passwd_cb_fun, callback_data) + : PEM_read_PUBKEY(f, NULL, NULL, NULL); + fclose(f); if (!pkey) { -- cgit v1.2.3 From ece23c90df4d1844ede7cb524efb4df0fabb3f48 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 29 Oct 2018 17:09:43 +0100 Subject: crypto: Fix valgrind error for keys with passwords in Engines --- lib/crypto/c_src/crypto.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index ecb716c98c..3d16c776c0 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4524,7 +4524,7 @@ static int get_engine_and_key_id(ErlNifEnv *env, ERL_NIF_TERM key, char ** id, E static char *get_key_password(ErlNifEnv *env, ERL_NIF_TERM key) { ERL_NIF_TERM tmp_term; ErlNifBinary pwd_bin; - char *pwd; + char *pwd = NULL; if (enif_get_map_value(env, key, atom_password, &tmp_term) && enif_inspect_binary(env, tmp_term, &pwd_bin) && zero_terminate(pwd_bin, &pwd) @@ -4549,16 +4549,17 @@ static int get_pkey_private_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_ #ifdef HAS_ENGINE_SUPPORT /* Use key stored in engine */ ENGINE *e; - char *id; + char *id = NULL; char *password; if (!get_engine_and_key_id(env, key, &id, &e)) return PKEY_BADARG; password = get_key_password(env, key); *pkey = ENGINE_load_private_key(e, id, NULL, password); + if (password) enif_free(password); + enif_free(id); if (!*pkey) return PKEY_BADARG; - enif_free(id); #else return PKEY_BADARG; #endif @@ -4636,16 +4637,17 @@ static int get_pkey_public_key(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NIF_T #ifdef HAS_ENGINE_SUPPORT /* Use key stored in engine */ ENGINE *e; - char *id; + char *id = NULL; char *password; if (!get_engine_and_key_id(env, key, &id, &e)) return PKEY_BADARG; password = get_key_password(env, key); *pkey = ENGINE_load_public_key(e, id, NULL, password); + if (password) enif_free(password); + enif_free(id); if (!pkey) return PKEY_BADARG; - enif_free(id); #else return PKEY_BADARG; #endif -- cgit v1.2.3 From 34d377f0a557478de13b56934389144c338e367b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 15 Nov 2018 13:08:28 +0100 Subject: crypto: Fix valgrind errors in privkey_to_pubkey --- lib/crypto/c_src/crypto.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 3d16c776c0..b77e580391 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -5434,6 +5434,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI RSA_get0_key(rsa, &n, &e, &d); result[0] = bin_from_bn(env, e); // Exponent E result[1] = bin_from_bn(env, n); // Modulus N = p*q + RSA_free(rsa); EVP_PKEY_free(pkey); return enif_make_list_from_array(env, result, 2); } @@ -5448,6 +5449,7 @@ static ERL_NIF_TERM privkey_to_pubkey_nif(ErlNifEnv* env, int argc, const ERL_NI result[1] = bin_from_bn(env, q); result[2] = bin_from_bn(env, g); result[3] = bin_from_bn(env, pub_key); + DSA_free(dsa); EVP_PKEY_free(pkey); return enif_make_list_from_array(env, result, 4); } -- cgit v1.2.3 From 71deec5cbec7bd7dcf67f30f60f2acd49ae0d0bb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 19 Nov 2018 10:16:13 +0100 Subject: crypto: Add some crypto:engine_unload in engine test suite Got valgrind errors for error tests otherwise --- lib/crypto/test/engine_SUITE.erl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 42d8edf4d2..8a45fc9076 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -587,11 +587,11 @@ ctrl_cmd_string(Config) when is_list(Config) -> {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>) of ok -> + ok = crypto:engine_unload(E), ct:fail(fail_ctrl_cmd_should_fail); {error,ctrl_cmd_failed} -> - ok - end, - ok = crypto:engine_unload(E); + ok = crypto:engine_unload(E) + end; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end @@ -617,11 +617,12 @@ ctrl_cmd_string_optional(Config) when is_list(Config) -> {ok, E} -> case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>, true) of ok -> - ok; - _ -> + ok = crypto:engine_unload(E); + Err -> + ct:log("Error: ~p",[Err]), + ok = crypto:engine_unload(E), ct:fail(fail_ctrl_cmd_string) - end, - ok = crypto:engine_unload(E); + end; {error, bad_engine_id} -> {skip, "Dynamic Engine not supported"} end -- cgit v1.2.3 From a91182b550a3b83e67d5babb4b0675f7d9129364 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 19 Nov 2018 10:44:07 +0100 Subject: crypto: Fix valgrind errors in pkey_crypt_nif --- lib/crypto/c_src/crypto.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index b77e580391..7367a3824c 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -5122,6 +5122,15 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI return PKEY_OK; } +static size_t size_of_RSA(EVP_PKEY *pkey) { + size_t tmplen; + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + if (rsa == NULL) return 0; + tmplen = RSA_size(rsa); + RSA_free(rsa); + return tmplen; +} + static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {/* (Algorithm, Data, PublKey=[E,N]|[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Options, IsPrivate, IsEncrypt) */ int i; @@ -5219,9 +5228,8 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM #ifdef HAVE_RSA_SSLV23_PADDING if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { if (is_encrypt) { - RSA *rsa = EVP_PKEY_get1_RSA(pkey); - if (rsa == NULL) goto badarg; - tmplen = RSA_size(rsa); + tmplen = size_of_RSA(pkey); + if (tmplen == 0) goto badarg; if (!enif_alloc_binary(tmplen, &tmp_bin)) goto badarg; if (RSA_padding_add_SSLv23(tmp_bin.data, tmplen, in_bin.data, in_bin.size) <= 0) goto badarg; @@ -5241,7 +5249,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM if (crypt_opt.rsa_mgf1_md != NULL && EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, crypt_opt.rsa_mgf1_md) <= 0) goto badarg; if (crypt_opt.rsa_oaep_label.data != NULL && crypt_opt.rsa_oaep_label.size > 0) { - unsigned char *label_copy; + unsigned char *label_copy = NULL; label_copy = OPENSSL_malloc(crypt_opt.rsa_oaep_label.size); if (label_copy == NULL) goto badarg; memcpy((void *)(label_copy), (const void *)(crypt_opt.rsa_oaep_label.data), @@ -5353,14 +5361,11 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM if ((i > 0) && argv[0] == atom_rsa && !is_encrypt) { #ifdef HAVE_RSA_SSLV23_PADDING if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) { - RSA *rsa = EVP_PKEY_get1_RSA(pkey); unsigned char *p; - if (rsa == NULL) goto badarg; - tmplen = RSA_size(rsa); - if (!enif_alloc_binary(tmplen, &tmp_bin)) { - RSA_free(rsa); + tmplen = size_of_RSA(pkey); + if (tmplen == 0) goto badarg; + if (!enif_alloc_binary(tmplen, &tmp_bin)) goto badarg; - } p = out_bin.data; p++; i = RSA_padding_check_SSLv23(tmp_bin.data, tmplen, p, out_bin.size - 1, tmplen); @@ -5371,7 +5376,6 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM tmp_bin = in_bin; i = 1; } - RSA_free(rsa); } #endif } -- cgit v1.2.3 From 7cb434ca64c08269c1d4837e0133d1ef2e20bb6e Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 26 Nov 2018 11:36:46 +0100 Subject: crypto: Fix valgrind error in dh_generate/dh_compute --- lib/crypto/c_src/crypto.c | 71 +++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 30 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 7367a3824c..df607732bf 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -4234,9 +4234,9 @@ static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ { #ifdef HAVE_ED_CURVE_DH int type; - EVP_PKEY_CTX *ctx; + EVP_PKEY_CTX *ctx = NULL; ErlNifBinary peer_bin, my_bin, key_bin; - EVP_PKEY *peer_key, *my_key; + EVP_PKEY *peer_key = NULL, *my_key = NULL; size_t max_size; if (argv[0] == atom_x25519) type = EVP_PKEY_X25519; @@ -4244,41 +4244,43 @@ static ERL_NIF_TERM evp_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_ else return enif_make_badarg(env); if (!enif_inspect_binary(env, argv[1], &peer_bin) || - !enif_inspect_binary(env, argv[2], &my_bin)) { - return enif_make_badarg(env); - } + !enif_inspect_binary(env, argv[2], &my_bin)) + goto return_badarg; if (!(my_key = EVP_PKEY_new_raw_private_key(type, NULL, my_bin.data, my_bin.size)) || - !(ctx = EVP_PKEY_CTX_new(my_key, NULL))) { - return enif_make_badarg(env); - } + !(ctx = EVP_PKEY_CTX_new(my_key, NULL))) + goto return_badarg; - if (!EVP_PKEY_derive_init(ctx)) { - return enif_make_badarg(env); - } + if (!EVP_PKEY_derive_init(ctx)) + goto return_badarg; if (!(peer_key = EVP_PKEY_new_raw_public_key(type, NULL, peer_bin.data, peer_bin.size)) || - !EVP_PKEY_derive_set_peer(ctx, peer_key)) { - return enif_make_badarg(env); - } + !EVP_PKEY_derive_set_peer(ctx, peer_key)) + goto return_badarg; - if (!EVP_PKEY_derive(ctx, NULL, &max_size)) { - return enif_make_badarg(env); - } + if (!EVP_PKEY_derive(ctx, NULL, &max_size)) + goto return_badarg; if (!enif_alloc_binary(max_size, &key_bin) || - !EVP_PKEY_derive(ctx, key_bin.data, &key_bin.size)) { - return enif_make_badarg(env); - } + !EVP_PKEY_derive(ctx, key_bin.data, &key_bin.size)) + goto return_badarg; if (key_bin.size < max_size) { size_t actual_size = key_bin.size; - if (!enif_realloc_binary(&key_bin, actual_size)) { - return enif_make_badarg(env); - } + if (!enif_realloc_binary(&key_bin, actual_size)) + goto return_badarg; } + EVP_PKEY_free(my_key); + EVP_PKEY_free(peer_key); + EVP_PKEY_CTX_free(ctx); return enif_make_binary(env, &key_bin); + +return_badarg: + if (my_key) EVP_PKEY_free(my_key); + if (peer_key) EVP_PKEY_free(peer_key); + if (ctx) EVP_PKEY_CTX_free(ctx); + return enif_make_badarg(env); #else return atom_notsup; #endif @@ -4289,7 +4291,7 @@ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF { #ifdef HAVE_ED_CURVE_DH int type; - EVP_PKEY_CTX *ctx; + EVP_PKEY_CTX *ctx = NULL; EVP_PKEY *pkey = NULL; ERL_NIF_TERM ret_pub, ret_prv; size_t key_len; @@ -4300,22 +4302,30 @@ static ERL_NIF_TERM evp_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF if (!(ctx = EVP_PKEY_CTX_new_id(type, NULL))) return enif_make_badarg(env); - if (!EVP_PKEY_keygen_init(ctx)) return atom_error; - if (!EVP_PKEY_keygen(ctx, &pkey)) return atom_error; + if (!EVP_PKEY_keygen_init(ctx)) goto return_error; + if (!EVP_PKEY_keygen(ctx, &pkey)) goto return_error; - if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) return atom_error; + if (!EVP_PKEY_get_raw_public_key(pkey, NULL, &key_len)) goto return_error; if (!EVP_PKEY_get_raw_public_key(pkey, enif_make_new_binary(env, key_len, &ret_pub), &key_len)) - return atom_error; + goto return_error; - if (!EVP_PKEY_get_raw_private_key(pkey, NULL, &key_len)) return atom_error; + if (!EVP_PKEY_get_raw_private_key(pkey, NULL, &key_len)) goto return_error; if (!EVP_PKEY_get_raw_private_key(pkey, enif_make_new_binary(env, key_len, &ret_prv), &key_len)) - return atom_error; + goto return_error; + EVP_PKEY_free(pkey); + EVP_PKEY_CTX_free(ctx); return enif_make_tuple2(env, ret_pub, ret_prv); + +return_error: + if (pkey) EVP_PKEY_free(pkey); + if (ctx) EVP_PKEY_CTX_free(ctx); + return atom_error; + #else return atom_notsup; #endif @@ -4811,6 +4821,7 @@ printf("\r\n"); EVP_MD_CTX_free(mdctx); goto badarg; } + EVP_MD_CTX_free(mdctx); #else goto badarg; #endif -- cgit v1.2.3 From a277535507728c760210f9c5aaf0ba1ce9971ce4 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 29 Nov 2018 13:31:25 +0100 Subject: crypto: Engine valgrind fix Fixes memory leak when a command has wrong type. --- lib/crypto/src/crypto.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index af53a72e16..72cb9aabfd 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1224,7 +1224,11 @@ engine_load_1(Engine, PreCmds, PostCmds, EngineMethods) -> throw:Error -> %% The engine couldn't initialise, release the structural reference ok = engine_free_nif(Engine), - throw(Error) + throw(Error); + error:badarg -> + %% For example bad argument list, release the structural reference + ok = engine_free_nif(Engine), + error(badarg) end. engine_load_2(Engine, PostCmds, EngineMethods) -> -- cgit v1.2.3 From a2ca3bd78fc002dd1e6533c191e44092cc3aa949 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 10 Dec 2018 11:07:05 +0100 Subject: Prepare release --- lib/crypto/doc/src/notes.xml | 37 +++++++++++++++++++++++++++++++++++++ lib/crypto/vsn.mk | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index d81a8ddd87..0a3f68ade2 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,43 @@

This document describes the changes made to the Crypto application.

+
Crypto 4.4 + +
Fixed Bugs and Malfunctions + + +

+ Updated the RSA options part in the crypto application's + C-code, documentation and tests.

+

+ Own Id: OTP-15302

+
+
+
+ + +
Improvements and New Features + + +

+ Added ed25519 and ed448 sign/verify.

+

+ Requires OpenSSL 1.1.1 or higher as cryptolib under the + OTP application crypto.

+

+ Own Id: OTP-15419 Aux Id: OTP-15094

+
+ +

+ Fixed valgrind warnings.

+

+ Own Id: OTP-15467

+
+
+
+ +
+
Crypto 4.3.3
Fixed Bugs and Malfunctions diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 64d593f64a..6a91244715 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.3.3 +CRYPTO_VSN = 4.4 -- cgit v1.2.3