build: Remove tinydtls library
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 21 Feb 2017 17:11:21 +0000 (18:11 +0100)
committerRandeep Singh <randeep.s@samsung.com>
Thu, 23 Feb 2017 04:40:29 +0000 (04:40 +0000)
[Chul Lee]

Remove tinydtls library

[Philippe Coval]

Ported from 1.2-rel branch to master,
and removed presence is other SConscript.

Conflicts:
service/coap-http-proxy/unittests/SConscript
resource/csdk/SConscript
resource/csdk/connectivity/src/SConscript
resource/csdk/stack/test/SConscript
resource/csdk/security/src/doxmresource.c

Change-Id: I78f470af822587f2cd50eac6e9b1fb4ff5b87219
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16137
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16941
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashwini Kumar <k.ashwini@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
166 files changed:
NOTICE.md
build_common/android/SConscript
extlibs/tinydtls/0001-Add-TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256-cipher-su.patch [deleted file]
extlibs/tinydtls/0001-Added-anonymous-ecdh-cipher-suite-into-tinydtls.patch [deleted file]
extlibs/tinydtls/0001-Added-support-in-tinyDTLS-to-support-rehandshake.patch [deleted file]
extlibs/tinydtls/0001-Adding-autoconf-generated-files-in-tinydtls-repo.patch [deleted file]
extlibs/tinydtls/0001-Bug-Fix-in-earlier-rehandhsake-implementation.patch [deleted file]
extlibs/tinydtls/0001-Fix-the-wrong-implementation-about-the-anonymous-cip.patch [deleted file]
extlibs/tinydtls/0001-Fixed-issue-to-pass-PSK-identity-hint-to-application.patch [deleted file]
extlibs/tinydtls/0001-Updated-tinyDTLS-test-apps-to-use-identity-hint.patch [deleted file]
extlibs/tinydtls/0001-add-support-of-X.509-into-tinyDTLS-external-library.patch [deleted file]
extlibs/tinydtls/Android.mk [deleted file]
extlibs/tinydtls/LICENSE [deleted file]
extlibs/tinydtls/Makefile.in [deleted file]
extlibs/tinydtls/Makefile.tinydtls [deleted file]
extlibs/tinydtls/README [deleted file]
extlibs/tinydtls/README_Iotivity [deleted file]
extlibs/tinydtls/SConscript [deleted file]
extlibs/tinydtls/aes/Makefile.in [deleted file]
extlibs/tinydtls/aes/rijndael.c [deleted file]
extlibs/tinydtls/aes/rijndael.h [deleted file]
extlibs/tinydtls/alert.h [deleted file]
extlibs/tinydtls/ccm.c [deleted file]
extlibs/tinydtls/ccm.h [deleted file]
extlibs/tinydtls/configure.in [deleted file]
extlibs/tinydtls/crypto.c [deleted file]
extlibs/tinydtls/crypto.h [deleted file]
extlibs/tinydtls/debug.c [deleted file]
extlibs/tinydtls/debug.h [deleted file]
extlibs/tinydtls/doc/Doxyfile.in [deleted file]
extlibs/tinydtls/doc/DoxygenLayout.xml [deleted file]
extlibs/tinydtls/doc/Makefile.in [deleted file]
extlibs/tinydtls/dtls.c [deleted file]
extlibs/tinydtls/dtls.h [deleted file]
extlibs/tinydtls/dtls_config.h [deleted file]
extlibs/tinydtls/dtls_config.h.in [deleted file]
extlibs/tinydtls/dtls_hal.h [deleted file]
extlibs/tinydtls/dtls_time.c [deleted file]
extlibs/tinydtls/dtls_time.h [deleted file]
extlibs/tinydtls/ecc/LICENSE.txt [deleted file]
extlibs/tinydtls/ecc/Makefile.contiki [deleted file]
extlibs/tinydtls/ecc/Makefile.ecc [deleted file]
extlibs/tinydtls/ecc/Makefile.in [deleted file]
extlibs/tinydtls/ecc/README.md [deleted file]
extlibs/tinydtls/ecc/asm_arm.inc [deleted file]
extlibs/tinydtls/ecc/asm_avr.inc [deleted file]
extlibs/tinydtls/ecc/ecc.c [deleted file]
extlibs/tinydtls/ecc/ecc.h [deleted file]
extlibs/tinydtls/ecc/test/ecc_test/ecc_test.ino [deleted file]
extlibs/tinydtls/ecc/test/emk_rules.py [deleted file]
extlibs/tinydtls/ecc/test/test_ecdh.c [deleted file]
extlibs/tinydtls/ecc/test/test_ecdsa.c [deleted file]
extlibs/tinydtls/examples/contiki/Makefile.in [deleted file]
extlibs/tinydtls/examples/contiki/dtls-client.c [deleted file]
extlibs/tinydtls/examples/contiki/dtls-server.c [deleted file]
extlibs/tinydtls/global.h [deleted file]
extlibs/tinydtls/hmac.c [deleted file]
extlibs/tinydtls/hmac.h [deleted file]
extlibs/tinydtls/netq.c [deleted file]
extlibs/tinydtls/netq.h [deleted file]
extlibs/tinydtls/numeric.h [deleted file]
extlibs/tinydtls/peer.c [deleted file]
extlibs/tinydtls/peer.h [deleted file]
extlibs/tinydtls/platform-specific/Makefile.in [deleted file]
extlibs/tinydtls/platform-specific/config-cc2538dk.h [deleted file]
extlibs/tinydtls/platform-specific/config-econotag.h [deleted file]
extlibs/tinydtls/platform-specific/config-minimal-net.h [deleted file]
extlibs/tinydtls/platform-specific/config-sky.h [deleted file]
extlibs/tinydtls/platform-specific/config-wismote.h [deleted file]
extlibs/tinydtls/prng.h [deleted file]
extlibs/tinydtls/session.c [deleted file]
extlibs/tinydtls/session.h [deleted file]
extlibs/tinydtls/sha2/Makefile.in [deleted file]
extlibs/tinydtls/sha2/README [deleted file]
extlibs/tinydtls/sha2/sha2.c [deleted file]
extlibs/tinydtls/sha2/sha2.h [deleted file]
extlibs/tinydtls/sha2/sha2prog.c [deleted file]
extlibs/tinydtls/sha2/sha2speed.c [deleted file]
extlibs/tinydtls/sha2/sha2test.pl [deleted file]
extlibs/tinydtls/sha2/testvectors/vector001.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector001.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector002.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector002.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector003.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector003.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector004.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector004.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector005.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector005.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector006.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector006.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector007.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector007.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector008.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector008.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector009.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector009.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector010.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector010.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector011.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector011.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector012.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector012.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector013.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector013.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector014.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector014.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector015.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector015.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector016.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector016.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector017.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector017.info [deleted file]
extlibs/tinydtls/sha2/testvectors/vector018.dat [deleted file]
extlibs/tinydtls/sha2/testvectors/vector018.info [deleted file]
extlibs/tinydtls/state.h [deleted file]
extlibs/tinydtls/t_list.h [deleted file]
extlibs/tinydtls/tests/Makefile.in [deleted file]
extlibs/tinydtls/tests/cbc_aes128-test.c [deleted file]
extlibs/tinydtls/tests/cbc_aes128-testdata.c [deleted file]
extlibs/tinydtls/tests/ccm-test.c [deleted file]
extlibs/tinydtls/tests/ccm-testdata.c [deleted file]
extlibs/tinydtls/tests/dsrv-test.c [deleted file]
extlibs/tinydtls/tests/dtls-client.c [deleted file]
extlibs/tinydtls/tests/dtls-server.c [deleted file]
extlibs/tinydtls/tests/netq-test.c [deleted file]
extlibs/tinydtls/tests/pcap.c [deleted file]
extlibs/tinydtls/tests/prf-test.c [deleted file]
extlibs/tinydtls/tests/secure-server.c [deleted file]
extlibs/tinydtls/tinydtls.h [deleted file]
extlibs/tinydtls/tinydtls.h.in [deleted file]
extlibs/tinydtls/uthash.h [deleted file]
extlibs/tinydtls/utlist.h [deleted file]
gbsbuild.sh
java/jni/SConscript
resource/c_common/utlist.h [new file with mode: 0644]
resource/csdk/connectivity/build/android/jni/Android.mk
resource/csdk/connectivity/build/tizen/Makefile
resource/csdk/connectivity/build/tizen/gbsbuild.sh
resource/csdk/connectivity/build/tizen/packaging/com.oic.ca.spec
resource/csdk/connectivity/src/SConscript
resource/csdk/security/SConscript
resource/csdk/security/provisioning/SConscript
resource/csdk/security/provisioning/src/multipleownershiptransfermanager.c
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/oxmjustworks.c
resource/csdk/security/provisioning/src/oxmmanufacturercert.c
resource/csdk/security/provisioning/src/oxmpreconfpin.c
resource/csdk/security/provisioning/src/oxmrandompin.c
resource/csdk/security/provisioning/unittest/SConscript
resource/csdk/security/src/credresource.c
resource/csdk/security/src/directpairing.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/dpairingresource.c
resource/csdk/security/src/oxmpincommon.c
resource/csdk/security/tool/SConscript
resource/csdk/security/unittest/SConscript
resource/csdk/stack/SConscript
resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
resource/csdk/stack/samples/linux/secure/SConscript
resource/csdk/stack/samples/tizen/build/gbsbuild.sh
resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
resource/csdk/stack/test/SConscript
resource/unittests/SConscript
service/coap-http-proxy/unittests/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh

index 2afab02..29d9415 100644 (file)
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -25,13 +25,11 @@ which is open source software, written and copyright by Olaf Bergmann
 with a BSD and GPLv2 license. The original software is available from
   http://sourceforge.net/projects/libcoap/
 
-The DTLS protocol is provided by the tinyDTLS package,
-which is open source software, written and copyright by Olaf Bergmann
-with an MIT license. The tinyDTLS library relies on algorithms whose
-source is under a BSD license. The additional licenses can be viewed at
-  http://tinydtls.sourceforge.net/
+The TLS/DTLS protocol is provided by the mbedTLS package,
+which is open source software, written and copyright by ARM
+with an Apache 2.0 license.
 The original software is available from
-  http://sourceforge.net/projects/tinydtls/
+  https://github.com/ARMmbed/mbedtls
 
 This project relies on utilities in the Boost C++library which is open
 source software with a Boost Software License v1.0. The details of the
@@ -50,3 +48,8 @@ which is open source software, written and copyright by Dave Gamble
 with an MIT license. The original software is available from
   http://sourceforge.net/projects/cjson/
 
+The Linked List macro(utlist.h) is provided by the uthash package,
+which is open source software, written and copyright by Troy D. Hanson
+with an BSD license.
+The original software is available from
+  https://github.com/troydhanson/uthash
\ No newline at end of file
index f24c038..61c504d 100644 (file)
@@ -221,7 +221,6 @@ env.AppendUnique(LIBPATH = [src_dir + '/resource/csdk/connectivity/lib/android']
 env.AppendUnique(LIBS = ['log', 'coap'])
 
 if env.get('SECURED') == '1':
-       env.AppendUnique(LIBS = ['tinydtls'])
        env.SConscript('#extlibs/mbedtls/SConscript')
        env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
 
diff --git a/extlibs/tinydtls/0001-Add-TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256-cipher-su.patch b/extlibs/tinydtls/0001-Add-TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256-cipher-su.patch
deleted file mode 100644 (file)
index 5221174..0000000
+++ /dev/null
@@ -1,746 +0,0 @@
-From 947179cd0d3646359272cc0645e5049e2426f9e0 Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Thu, 6 Aug 2015 15:13:29 -0700
-Subject: [PATCH 1/1] Add TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 cipher suite
- in tinydtls
-
-[Patch #1] Initial upload
-[Patch #2] Add function to calculate the pre-master key of ECDHE_PSK cipher suite.
-[Patch #3] Update codes according to review comments
-[Patch #4] Modify code alignment.
-
-Change-Id: I70be3a8e9469cc1913373d820b4a3d4f4a6d6d0d
-Signed-off-by: leechul <chuls.lee@samsung.com>
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/crypto.c            |   41 +++-
- extlibs/tinydtls/crypto.h            |    9 +
- extlibs/tinydtls/dtls.c              |  401 ++++++++++++++++++++++++++++++++--
- extlibs/tinydtls/global.h            |    1 +
- extlibs/tinydtls/tests/dtls-client.c |    8 +-
- 5 files changed, 444 insertions(+), 16 deletions(-)
-
-diff --git a/extlibs/tinydtls/crypto.c b/extlibs/tinydtls/crypto.c
-index 3fbb993..deaf581 100644
---- a/extlibs/tinydtls/crypto.c
-+++ b/extlibs/tinydtls/crypto.c
-@@ -641,6 +641,41 @@ dtls_ecdsa_verify_sig(const unsigned char *pub_key_x,
- }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+int dtls_ecdhe_psk_pre_master_secret(unsigned char *psk, size_t psklen,
-+                                     unsigned char *ecc_priv_key,
-+                                     unsigned char *ecc_pub_key_x,
-+                                     unsigned char *ecc_pub_key_y,
-+                                     size_t ecc_key_size,
-+                                     unsigned char *result,
-+                                     size_t result_len)
-+{
-+  uint8_t eccPublicKey[64];
-+  uint8_t eccPrivateKey[32];
-+  unsigned char *p = result;
-+
-+  if (result_len < uECC_BYTES + psklen + (sizeof(uint16) * 2)) {
-+    return -1;
-+  }
-+
-+  dtls_int_to_uint16(p, uECC_BYTES);
-+  p += sizeof(uint16);
-+
-+  memcpy(eccPublicKey, ecc_pub_key_x, 32);
-+  memcpy(eccPublicKey + 32, ecc_pub_key_y, 32);
-+  memcpy(eccPrivateKey, ecc_priv_key, 32);
-+  uECC_shared_secret(eccPublicKey, eccPrivateKey, p);
-+  p += uECC_BYTES;
-+
-+  dtls_int_to_uint16(p, psklen);
-+  p += sizeof(uint16);
-+
-+  memcpy(p, psk, psklen);
-+
-+  return uECC_BYTES + psklen + (sizeof(uint16) * 2);
-+}
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-+
- int
- dtls_encrypt(const unsigned char *src, size_t length,
-            unsigned char *buf,
-@@ -665,7 +700,8 @@ dtls_encrypt(const unsigned char *src, size_t length,
-         memmove(buf, src, length);
-       ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la);
-   }
--  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256) {
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 ||
-+     cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256) {
-       ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-       if (ret < 0) {
-         /* cleanup everything in case the key has the wrong size */
-@@ -708,7 +744,8 @@ dtls_decrypt(const unsigned char *src, size_t length,
-       ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la);
-   }
--  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256) {
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 ||
-+     cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256) {
-       ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-       if (ret < 0) {
-         /* cleanup everything in case the key has the wrong size */
-diff --git a/extlibs/tinydtls/crypto.h b/extlibs/tinydtls/crypto.h
-index a81d306..f4cfc66 100644
---- a/extlibs/tinydtls/crypto.h
-+++ b/extlibs/tinydtls/crypto.h
-@@ -39,6 +39,7 @@
- #include "numeric.h"
- #include "hmac.h"
- #include "ccm.h"
-+#include "ecc/ecc.h"
- /* TLS_PSK_WITH_AES_128_CCM_8 */
- #define DTLS_MAC_KEY_LENGTH    0
-@@ -129,6 +130,13 @@ typedef struct {
-   dtls_compression_t compression;             /**< compression method */
-   dtls_cipher_t cipher;               /**< cipher type */
-   unsigned int do_client_auth:1;
-+
-+#ifdef DTLS_ECC && DTLS_PSK
-+  struct keyx_t {
-+    dtls_handshake_parameters_ecc_t ecc;
-+    dtls_handshake_parameters_psk_t psk;
-+  } keyx;
-+#else /* DTLS_ECC && DTLS_PSK */
-   union {
- #ifdef DTLS_ECC
-     dtls_handshake_parameters_ecc_t ecc;
-@@ -137,6 +145,7 @@ typedef struct {
-     dtls_handshake_parameters_psk_t psk;
- #endif /* DTLS_PSK */
-   } keyx;
-+#endif /* DTLS_ECC && DTLS_PSK */
- } dtls_handshake_parameters_t;
- /* The following macros provide access to the components of the
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index b5b8fd1..6104a08 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -506,6 +506,17 @@ static inline int is_tls_ecdh_anon_with_aes_128_cbc_sha_256(dtls_cipher_t cipher
- #endif
- }
-+/** returns true if the cipher matches TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 */
-+static inline int is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(dtls_cipher_t cipher)
-+{
-+#if defined(DTLS_ECC) && defined(DTLS_PSK)
-+  return cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256;
-+#else
-+  return 0;
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-+}
-+
-+
- /** returns true if the application is configured for psk */
- static inline int is_psk_supported(dtls_context_t *ctx)
-@@ -549,6 +560,17 @@ static inline int is_ecdh_anon_supported(dtls_context_t *ctx)
- #endif
- }
-+/** returns true if ecdhe_psk_with_aes_128_cbc_sha_256 is supported */
-+static inline int is_ecdhe_psk_supported(dtls_context_t *ctx)
-+{
-+#if defined(DTLS_ECC) && defined(DTLS_PSK)
-+    return is_psk_supported(ctx);
-+#else
-+    return 0;
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-+}
-+
-+
- /**
-  * Returns @c 1 if @p code is a cipher suite other than @c
-  * TLS_NULL_WITH_NULL_NULL that we recognize.
-@@ -563,14 +585,17 @@ known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-   int psk;
-   int ecdsa;
-   int ecdh_anon;
-+  int ecdhe_psk;
-   psk = is_psk_supported(ctx);
-   ecdsa = is_ecdsa_supported(ctx, is_client);
-   ecdh_anon = is_ecdh_anon_supported(ctx);
-+  ecdhe_psk = is_ecdhe_psk_supported(ctx);
-   return (psk && is_tls_psk_with_aes_128_ccm_8(code)) ||
-        (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code)) ||
--       (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha_256(code));
-+       (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha_256(code)) ||
-+       (ecdhe_psk && is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(code));
- }
- /**
-@@ -676,7 +701,11 @@ calculate_key_block(dtls_context_t *ctx,
-                   dtls_peer_t *peer,
-                   session_t *session,
-                   dtls_peer_type role) {
--  unsigned char *pre_master_secret;
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+  unsigned char pre_master_secret[MAX_KEYBLOCK_LENGTH + uECC_BYTES];
-+#else
-+  unsigned char pre_master_secret[MAX_KEYBLOCK_LENGTH];
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-   int pre_master_len = 0;
-   dtls_security_parameters_t *security = dtls_security_params_next(peer);
-   uint8 master_secret[DTLS_MASTER_SECRET_LENGTH];
-@@ -685,8 +714,6 @@ calculate_key_block(dtls_context_t *ctx,
-     return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-   }
--  pre_master_secret = security->key_block;
--
-   switch (handshake->cipher) {
- #ifdef DTLS_PSK
-   case TLS_PSK_WITH_AES_128_CCM_8: {
-@@ -733,6 +760,35 @@ calculate_key_block(dtls_context_t *ctx,
-     break;
-   }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+    case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256: {
-+      unsigned char psk[DTLS_PSK_MAX_KEY_LEN];
-+      int psklen;
-+
-+      psklen = CALL(ctx, get_psk_info, session, DTLS_PSK_KEY,
-+             handshake->keyx.psk.identity,
-+             handshake->keyx.psk.id_length,
-+             psk, DTLS_PSK_MAX_KEY_LEN);
-+      if (psklen < 0) {
-+        dtls_crit("no psk key for session available\n");
-+        return psklen;
-+      }
-+
-+      pre_master_len = dtls_ecdhe_psk_pre_master_secret(psk, psklen,
-+                           handshake->keyx.ecc.own_eph_priv,
-+                           handshake->keyx.ecc.other_eph_pub_x,
-+                           handshake->keyx.ecc.other_eph_pub_y,
-+                           sizeof(handshake->keyx.ecc.own_eph_priv),
-+                           pre_master_secret,
-+                           MAX_KEYBLOCK_LENGTH + uECC_BYTES);
-+
-+      if (pre_master_len < 0) {
-+        dtls_crit("the curve was too long, for the pre master secret\n");
-+        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+      }
-+      break;
-+    }
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC)  */
-   default:
-     dtls_crit("calculate_key_block: unknown cipher\n");
-     return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-@@ -1113,6 +1169,56 @@ check_client_keyexchange(dtls_context_t *ctx,
-     data += sizeof(handshake->keyx.ecc.other_eph_pub_y);
-   }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+  if (is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(handshake->cipher)) {
-+    int id_length;
-+
-+    if (length < DTLS_HS_LENGTH + DTLS_CKXEC_LENGTH) {
-+      dtls_debug("The client key exchange is too short\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+    }
-+    data += DTLS_HS_LENGTH;
-+
-+    //PSK hint
-+    id_length = dtls_uint16_to_int(data);
-+    data += sizeof(uint16);
-+
-+    if (DTLS_HS_LENGTH + DTLS_CKXPSK_LENGTH_MIN + DTLS_CKXEC_LENGTH + id_length != length) {
-+      dtls_debug("The identity has a wrong length\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+    }
-+
-+    if (id_length > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-+      dtls_warn("please use a smaller client identity\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+    }
-+
-+    handshake->keyx.psk.id_length = id_length;
-+    memcpy(handshake->keyx.psk.identity, data, id_length);
-+    data += id_length;
-+
-+    //ECDH public
-+    if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-+      dtls_alert("expected 65 bytes long public point\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+    }
-+    data += sizeof(uint8);
-+
-+    if (dtls_uint8_to_int(data) != 4) {
-+      dtls_alert("expected uncompressed public point\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+    }
-+    data += sizeof(uint8);
-+
-+    memcpy(handshake->keyx.ecc.other_eph_pub_x, data,
-+       sizeof(handshake->keyx.ecc.other_eph_pub_x));
-+    data += sizeof(handshake->keyx.ecc.other_eph_pub_x);
-+
-+    memcpy(handshake->keyx.ecc.other_eph_pub_y, data,
-+       sizeof(handshake->keyx.ecc.other_eph_pub_y));
-+    data += sizeof(handshake->keyx.ecc.other_eph_pub_y);
-+  }
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
- #ifdef DTLS_PSK
-   if (is_tls_psk_with_aes_128_ccm_8(handshake->cipher)) {
-     int id_length;
-@@ -1286,7 +1392,8 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-       p += data_len_array[i];
-       res += data_len_array[i];
-     }
--  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher)) {
-+  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher) ||
-+             is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(security->cipher)) {
-     unsigned char nonce[DTLS_CBC_IV_LENGTH];
-@@ -2116,6 +2223,80 @@ dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
- }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+static int dtls_send_server_key_exchange_ecdhe_psk(dtls_context_t *ctx, dtls_peer_t *peer,
-+                                const unsigned char *psk_hint, size_t psk_hint_len)
-+{
-+  /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-+   * 33 bytes long add space for that */
-+  uint8 buf[DTLS_SKEXEC_LENGTH + DTLS_SKEXECPSK_LENGTH_MAX + 2];
-+  uint8 *p;
-+  uint8 *ephemeral_pub_x;
-+  uint8 *ephemeral_pub_y;
-+  dtls_handshake_parameters_t *config = peer->handshake_params;
-+
-+  /* ServerKeyExchange
-+    * Please see Session 2, RFC 5489.
-+
-+         struct {
-+          select (KeyExchangeAlgorithm) {
-+              //other cases for rsa, diffie_hellman, etc.
-+              case ec_diffie_hellman_psk:  // NEW
-+                  opaque psk_identity_hint<0..2^16-1>;
-+                  ServerECDHParams params;
-+          };
-+      } ServerKeyExchange; */
-+  p = buf;
-+
-+  assert(psk_hint_len <= DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-+  if (psk_hint_len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-+    // should never happen
-+    dtls_warn("psk identity hint is too long\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+  }
-+
-+  // psk_identity_hint
-+  dtls_int_to_uint16(p, psk_hint_len);
-+  p += sizeof(uint16);
-+
-+  memcpy(p, psk_hint, psk_hint_len);
-+  p += psk_hint_len;
-+
-+  /* ServerECDHParams. */
-+  /* ECCurveType curve_type: named_curve */
-+  dtls_int_to_uint8(p, TLS_EC_CURVE_TYPE_NAMED_CURVE);
-+  p += sizeof(uint8);
-+
-+  /* NamedCurve namedcurve: secp256r1 */
-+  dtls_int_to_uint16(p, TLS_EXT_ELLIPTIC_CURVES_SECP256R1);
-+  p += sizeof(uint16);
-+
-+  dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-+  p += sizeof(uint8);
-+
-+  /* This should be an uncompressed point, but I do not have access to the spec. */
-+  dtls_int_to_uint8(p, 4);
-+  p += sizeof(uint8);
-+
-+  /* store the pointer to the x component of the pub key and make space */
-+  ephemeral_pub_x = p;
-+  p += DTLS_EC_KEY_SIZE;
-+
-+  /* store the pointer to the y component of the pub key and make space */
-+  ephemeral_pub_y = p;
-+  p += DTLS_EC_KEY_SIZE;
-+
-+  dtls_ecdsa_generate_key(config->keyx.ecc.own_eph_priv,
-+              ephemeral_pub_x, ephemeral_pub_y,
-+              DTLS_EC_KEY_SIZE);
-+
-+  assert(p - buf <= sizeof(buf));
-+
-+  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_KEY_EXCHANGE,
-+                               buf, p - buf);
-+}
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-+
- #ifdef DTLS_PSK
- static int
- dtls_send_server_key_exchange_psk(dtls_context_t *ctx, dtls_peer_t *peer,
-@@ -2207,6 +2388,7 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-   int res;
-   int ecdsa;
-   int ecdh_anon;
-+  int ecdhe_psk;
-   res = dtls_send_server_hello(ctx, peer);
-@@ -2217,6 +2399,7 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-   ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
-   ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
-+  ecdhe_psk = is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
- #ifdef DTLS_ECC
-   if(ecdh_anon) {
-@@ -2261,7 +2444,31 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-     }
-   }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+  else if(ecdhe_psk) {
-+    unsigned char psk_hint[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-+    int psk_len;
-+
-+    /* The identity hint is optional, therefore we ignore the result
-+     * and check psk only. */
-+    psk_len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_HINT,
-+             NULL, 0, psk_hint, DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-+    if (psk_len < 0) {
-+      dtls_debug("dtls_server_hello: cannot create ServerKeyExchange\n");
-+      return psk_len;
-+    }
-+
-+    if (psk_len > 0) {
-+      res = dtls_send_server_key_exchange_ecdhe_psk(ctx, peer, psk_hint, (size_t)psk_len);
-+
-+      if (res < 0) {
-+        dtls_debug("dtls_server_hello(with ECDHE): cannot prepare Server Key Exchange record\n");
-+        return res;
-+      }
-+    }
-+  }
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
- #ifdef DTLS_PSK
-   if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-     unsigned char psk_hint[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-@@ -2308,7 +2515,11 @@ dtls_send_ccs(dtls_context_t *ctx, dtls_peer_t *peer) {
- static int
- dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
- {
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+  uint8 buf[DTLS_CKXEC_LENGTH + 2 + DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-+#else
-   uint8 buf[DTLS_CKXEC_LENGTH];
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-   uint8 client_id[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-   uint8 *p;
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-@@ -2368,6 +2579,60 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-     break;
-   }
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+  case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256: {
-+      int psk_len;
-+      uint8 *ephemeral_pub_x;
-+      uint8 *ephemeral_pub_y;
-+
-+    /* Please see Session 2, RFC 5489.
-+         struct {
-+            select (KeyExchangeAlgorithm) {
-+                // other cases for rsa, diffie_hellman, etc.
-+                case ec_diffie_hellman_psk:
-+                    opaque psk_identity<0..2^16-1>;
-+                    ClientECDiffieHellmanPublic public;
-+            } exchange_keys;
-+        } ClientKeyExchange;
-+    */
-+
-+    psk_len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_IDENTITY,
-+               NULL, 0,
-+               client_id,
-+               sizeof(client_id));
-+    if (psk_len < 0) {
-+      dtls_crit("no psk identity set in kx\n");
-+      return psk_len;
-+    }
-+
-+    if (psk_len + sizeof(uint16) > DTLS_CKXEC_LENGTH) {
-+      dtls_warn("the psk identity is too long\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+    }
-+
-+    dtls_int_to_uint16(p, psk_len);
-+    p += sizeof(uint16);
-+
-+    memcpy(p, client_id, psk_len);
-+    p += psk_len;
-+
-+    dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-+    p += sizeof(uint8);
-+
-+    dtls_int_to_uint8(p, 4);
-+    p += sizeof(uint8);
-+
-+    ephemeral_pub_x = p;
-+    p += DTLS_EC_KEY_SIZE;
-+    ephemeral_pub_y = p;
-+    p += DTLS_EC_KEY_SIZE;
-+
-+    dtls_ecdsa_generate_key(peer->handshake_params->keyx.ecc.own_eph_priv,
-+                          ephemeral_pub_x, ephemeral_pub_y,
-+                          DTLS_EC_KEY_SIZE);
-+    break;
-+  }
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-   default:
-     dtls_crit("cipher not supported\n");
-     return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-@@ -2457,6 +2722,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-   int psk = 0;
-   int ecdsa = 0;
-   int ecdh_anon = 0;
-+  int ecdhe_psk = 0;
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-   dtls_tick_t now;
-@@ -2471,14 +2737,18 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-       case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-         ecdh_anon = is_ecdh_anon_supported(ctx);
-         break;
-+      case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256:
-+        ecdhe_psk = is_ecdhe_psk_supported(ctx);
-+        break;
-       default:
-         psk = is_psk_supported(ctx);
-         ecdsa = is_ecdsa_supported(ctx, 1);
-         ecdh_anon = is_ecdh_anon_supported(ctx);
-+        ecdhe_psk = is_ecdhe_psk_supported(ctx);
-         break;
-    }
--  cipher_size = 2 + (ecdsa ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0);
-+  cipher_size = 2 + (ecdsa ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0) + (ecdhe_psk ? 2 : 0);
-   extension_size = (ecdsa) ? (2 + 6 + 6 + 8 + 6) : 0;
-   if (cipher_size == 0) {
-@@ -2533,6 +2803,10 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-     dtls_int_to_uint16(p, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8);
-     p += sizeof(uint16);
-   }
-+  if (ecdhe_psk) {
-+      dtls_int_to_uint16(p, TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256);
-+      p += sizeof(uint16);
-+  }
-   /* compression method */
-   dtls_int_to_uint8(p, 1);
-@@ -2900,8 +3174,97 @@ check_server_key_exchange_ecdh(dtls_context_t *ctx,
-   return 0;
- }
--
- #endif /* DTLS_ECC */
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+check_server_key_exchange_ecdhe_psk(dtls_context_t *ctx,
-+                            dtls_peer_t *peer,
-+                            uint8 *data, size_t data_length)
-+{
-+  dtls_handshake_parameters_t *config = peer->handshake_params;
-+  uint16_t psk_len = 0;
-+
-+  /* ServerKeyExchange
-+    * Please see Session 2, RFC 5489.
-+
-+         struct {
-+          select (KeyExchangeAlgorithm) {
-+              //other cases for rsa, diffie_hellman, etc.
-+              case ec_diffie_hellman_psk:  // NEW
-+                  opaque psk_identity_hint<0..2^16-1>;
-+                  ServerECDHParams params;
-+          };
-+      } ServerKeyExchange; */
-+
-+  update_hs_hash(peer, data, data_length);
-+
-+  assert(is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(config->cipher));
-+
-+  data += DTLS_HS_LENGTH;
-+
-+  psk_len = dtls_uint16_to_int(data);
-+  data += sizeof(uint16);
-+
-+  if (psk_len != data_length - DTLS_HS_LENGTH - DTLS_SKEXEC_ECDH_ANON_LENGTH - sizeof(uint16)) {
-+    dtls_warn("the length of the server identity hint is worng\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-+  }
-+
-+  if (psk_len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-+    dtls_warn("please use a smaller server identity hint\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+  }
-+
-+  // store the psk_identity_hint in config->keyx.psk for later use
-+  config->keyx.psk.id_length = psk_len;
-+  memcpy(config->keyx.psk.identity, data, psk_len);
-+
-+  data += psk_len;
-+  data_length -= psk_len;
-+
-+  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXEC_ECDH_ANON_LENGTH) {
-+    dtls_alert("the packet length does not match the expected\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-+  }
-+
-+  if (dtls_uint8_to_int(data) != TLS_EC_CURVE_TYPE_NAMED_CURVE) {
-+    dtls_alert("Only named curves supported\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  if (dtls_uint16_to_int(data) != TLS_EXT_ELLIPTIC_CURVES_SECP256R1) {
-+    dtls_alert("secp256r1 supported\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint16);
-+  data_length -= sizeof(uint16);
-+
-+  if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-+    dtls_alert("expected 65 bytes long public point\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  if (dtls_uint8_to_int(data) != 4) {
-+    dtls_alert("expected uncompressed public point\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_x));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_x);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_x);
-+
-+  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-+
-+  return 0;
-+}
-+#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
- #ifdef DTLS_PSK
- static int
-@@ -3113,7 +3476,8 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-   if (security->cipher == TLS_NULL_WITH_NULL_NULL) {
-     /* no cipher suite selected */
-     return clen;
--  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher)) {
-+  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher) ||
-+             is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(security->cipher)) {
-     unsigned char nonce[DTLS_CBC_IV_LENGTH];
-@@ -3169,17 +3533,17 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-                      dtls_kb_remote_write_key(security, peer->role),
-                      dtls_kb_key_size(security, peer->role),
-                      A_DATA, A_DATA_LEN,
--                     security->cipher);
-+                     security->cipher);
-   }
-   if (clen < 0)
-     dtls_warn("decryption failed\n");
-   else {
- #ifndef NDEBUG
--      dtls_debug("decrypt_verify(): found %i bytes cleartext\n", clen);
-+    dtls_debug("decrypt_verify(): found %i bytes cleartext\n", clen);
- #endif
--      dtls_security_params_free_other(peer);
--      dtls_debug_dump("cleartext", *cleartext, clen);
-+    dtls_security_params_free_other(peer);
-+    dtls_debug_dump("cleartext", *cleartext, clen);
-   }
-   return clen;
-@@ -3282,7 +3646,8 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher))
-       peer->state = DTLS_STATE_WAIT_SERVERCERTIFICATE; //ecdsa
--    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher))
-+    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher) ||
-+        is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher))
-         peer->state = DTLS_STATE_WAIT_SERVERKEYEXCHANGE; //ecdh
-     else
-       peer->state = DTLS_STATE_WAIT_SERVERHELLODONE; //psk
-@@ -3329,6 +3694,16 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-       err = check_server_key_exchange_ecdh(ctx, peer, data, data_length);
-     }
- #endif /* DTLS_ECC */
-+
-+#if defined(DTLS_PSK) && defined(DTLS_ECC)
-+    if (is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher)) {
-+        if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-+          return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-+        }
-+      err = check_server_key_exchange_ecdhe_psk(ctx, peer, data, data_length);
-+    }
-+#endif defined(DTLS_PSK) && defined(DTLS_ECC)
-+
- #ifdef DTLS_PSK
-     if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-       if (state != DTLS_STATE_WAIT_SERVERHELLODONE) {
-diff --git a/extlibs/tinydtls/global.h b/extlibs/tinydtls/global.h
-index 169c726..8b3c518 100644
---- a/extlibs/tinydtls/global.h
-+++ b/extlibs/tinydtls/global.h
-@@ -75,6 +75,7 @@ typedef enum {
-   TLS_NULL_WITH_NULL_NULL = 0x0000,   /**< NULL cipher  */
-   TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 = 0xC018, /**< see RFC 4492 */
-   TLS_PSK_WITH_AES_128_CCM_8 = 0xC0A8, /**< see RFC 6655 */
-+  TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 = 0xC037, /**< see RFC 5489 */
-   TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xC0AE /**< see RFC 7251 */
- } dtls_cipher_t;
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index dfc822a..dfd34c8 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -311,7 +311,8 @@ usage( const char *program, const char *version) {
-           "\t-c num\t\tcipher suite (default: 1)\n"
-           "\t\t\t1: TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 \n"
-           "\t\t\t2: TLS_PSK_WITH_AES_128_CCM_8\n"
--          "\t\t\t3: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n",
-+          "\t\t\t3: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n"
-+          "\t\t\t4: TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256\n",
-          program, version, program, DEFAULT_PORT);
- }
-@@ -430,6 +431,11 @@ main(int argc, char **argv) {
-           selected_cipher = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ;
-           ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-       }
-+      else if( strcmp(optarg, "4") == 0)
-+      {
-+          selected_cipher = TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256;
-+          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-+      }
-       break;
-     default:
-       usage(argv[0], dtls_package_version());
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Added-anonymous-ecdh-cipher-suite-into-tinydtls.patch b/extlibs/tinydtls/0001-Added-anonymous-ecdh-cipher-suite-into-tinydtls.patch
deleted file mode 100644 (file)
index ba75317..0000000
+++ /dev/null
@@ -1,1164 +0,0 @@
-From bdfe0e312f9c2cd34df7bfff070dfe8a9e82d147 Mon Sep 17 00:00:00 2001
-From: leechul <chuls.lee@samsung.com>
-Date: Thu, 9 Apr 2015 16:25:43 +0900
-Subject: [PATCH 1/1] Added anonymous ecdh cipher suite into tinydtls
-
-Change-Id: I80fa2985587618ebe7debdacba45996614c4cf1b
-Signed-off-by: leechul <chuls.lee@samsung.com>
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/aes/rijndael.h      |    1 +
- extlibs/tinydtls/crypto.c            |  173 ++++++++++++++++---
- extlibs/tinydtls/crypto.h            |   15 +-
- extlibs/tinydtls/dtls.c              |  301 +++++++++++++++++++++++++---------
- extlibs/tinydtls/dtls.h              |   28 +++-
- extlibs/tinydtls/global.h            |    6 +
- extlibs/tinydtls/tests/dtls-client.c |   42 ++++-
- extlibs/tinydtls/tests/dtls-server.c |   21 ++-
- 8 files changed, 468 insertions(+), 119 deletions(-)
- mode change 100755 => 100644 extlibs/tinydtls/crypto.c
-
-diff --git a/extlibs/tinydtls/aes/rijndael.h b/extlibs/tinydtls/aes/rijndael.h
-index 60e9bef..712798b 100755
---- a/extlibs/tinydtls/aes/rijndael.h
-+++ b/extlibs/tinydtls/aes/rijndael.h
-@@ -30,6 +30,7 @@
- #include <stdint.h>
-+#define WITH_AES_DECRYPT 1
- #define AES_MAXKEYBITS        (256)
- #define AES_MAXKEYBYTES       (AES_MAXKEYBITS>>3)
- /* for 256-bit keys we need 14 rounds for a 128 we only need 10 round */
-diff --git a/extlibs/tinydtls/crypto.c b/extlibs/tinydtls/crypto.c
-old mode 100755
-new mode 100644
-index 0113342..0ea1546
---- a/extlibs/tinydtls/crypto.c
-+++ b/extlibs/tinydtls/crypto.c
-@@ -54,6 +54,8 @@
- #include "crypto.h"
- #include "ccm.h"
- #include "ecc/ecc.h"
-+#include "aes/rijndael.h"
-+#include "sha2/sha2.h"
- #include "prng.h"
- #include "netq.h"
-@@ -292,7 +294,7 @@ dtls_mac(dtls_hmac_context_t *hmac_ctx,
- }
- static size_t
--dtls_ccm_encrypt(aes128_ccm_t *ccm_ctx, const unsigned char *src, size_t srclen,
-+dtls_ccm_encrypt(aes128_t *ccm_ctx, const unsigned char *src, size_t srclen,
-                unsigned char *buf,
-                unsigned char *nounce,
-                const unsigned char *aad, size_t la) {
-@@ -309,7 +311,7 @@ dtls_ccm_encrypt(aes128_ccm_t *ccm_ctx, const unsigned char *src, size_t srclen,
- }
- static size_t
--dtls_ccm_decrypt(aes128_ccm_t *ccm_ctx, const unsigned char *src,
-+dtls_ccm_decrypt(aes128_t *ccm_ctx, const unsigned char *src,
-                size_t srclen, unsigned char *buf,
-                unsigned char *nounce,
-                const unsigned char *aad, size_t la) {
-@@ -325,6 +327,95 @@ dtls_ccm_decrypt(aes128_ccm_t *ccm_ctx, const unsigned char *src,
-   return len;
- }
-+static size_t
-+dtls_cbc_encrypt(aes128_t *aes_ctx,
-+                 const unsigned char *iv,
-+                 const unsigned char *src, size_t srclen,
-+                 unsigned char *buf) {
-+
-+    unsigned char cbc[DTLS_BLK_LENGTH];
-+    unsigned char tmp[DTLS_BLK_LENGTH];
-+    unsigned char *pos;
-+    dtls_hash_ctx shactx;
-+    int i, j;
-+    int blocks;
-+
-+    pos = buf;
-+
-+    dtls_hash_init(&shactx);
-+    dtls_hash_update(&shactx, src, srclen);
-+    dtls_hash_finalize(pos + srclen, &shactx);
-+
-+    memcpy(cbc, iv, DTLS_BLK_LENGTH);
-+    blocks = (srclen + SHA256_DIGEST_LENGTH) / DTLS_BLK_LENGTH;
-+
-+    for (i = 0; i < blocks; i++) {
-+        for (j = 0; j < DTLS_BLK_LENGTH; j++) {
-+            cbc[j] ^= pos[j];
-+        }
-+
-+        rijndael_encrypt(&aes_ctx->ctx, cbc, tmp);
-+        memcpy(cbc, tmp, DTLS_BLK_LENGTH);
-+        memcpy(pos, cbc, DTLS_BLK_LENGTH);
-+        pos += DTLS_BLK_LENGTH;
-+    }
-+
-+    dtls_debug_dump("Encrypted Data:", buf, srclen + SHA256_DIGEST_LENGTH);
-+
-+    return srclen + SHA256_DIGEST_LENGTH;
-+}
-+
-+
-+static size_t
-+dtls_cbc_decrypt(aes128_t *aes_ctx,
-+                 const unsigned char *iv,
-+                 const unsigned char *src, size_t srclen,
-+                 unsigned char *buf) {
-+
-+    unsigned char cbc[DTLS_BLK_LENGTH];
-+    unsigned char tmp[DTLS_BLK_LENGTH];
-+    unsigned char tmp2[DTLS_BLK_LENGTH];
-+    unsigned char msg_hash[SHA256_DIGEST_LENGTH];
-+    unsigned char *pos;
-+    dtls_hash_ctx shactx;
-+    int i, j;
-+    int blocks;
-+
-+    pos = buf;
-+    memcpy(pos, src, srclen);
-+
-+    memcpy(cbc, iv, DTLS_BLK_LENGTH);
-+    blocks = srclen / DTLS_BLK_LENGTH;
-+
-+    for (i = 0; i < blocks; i++)
-+    {
-+        memcpy(tmp, pos, DTLS_BLK_LENGTH);
-+        rijndael_decrypt(&aes_ctx->ctx, pos, tmp2);
-+        memcpy(pos, tmp2, DTLS_BLK_LENGTH);
-+
-+        for (j = 0; j < DTLS_BLK_LENGTH; j++) {
-+            pos[j] ^= cbc[j];
-+        }
-+
-+        memcpy(cbc, tmp, DTLS_BLK_LENGTH);
-+        pos += DTLS_BLK_LENGTH;
-+    }
-+
-+    dtls_hash_init(&shactx);
-+    dtls_hash_update(&shactx, buf, srclen - SHA256_DIGEST_LENGTH);
-+    dtls_hash_finalize(msg_hash, &shactx);
-+
-+    dtls_debug_dump("decrypted data:", buf, srclen);
-+
-+    if(memcmp(msg_hash, buf + (srclen - SHA256_DIGEST_LENGTH), SHA256_DIGEST_LENGTH) != 0)
-+    {
-+        dtls_warn("message is broken\n");
-+        return -1;
-+    }
-+
-+    return srclen - SHA256_DIGEST_LENGTH;
-+}
-+
- #ifdef DTLS_PSK
- int
- dtls_psk_pre_master_secret(unsigned char *key, size_t keylen,
-@@ -432,13 +523,10 @@ void
- dtls_ecdsa_create_sig_hash(const unsigned char *priv_key, size_t key_size,
-                          const unsigned char *sign_hash, size_t sign_hash_size,
-                          uint32_t point_r[9], uint32_t point_s[9]) {
--  int ret;
--
-   uint8_t privateKey[32];
-   uint8_t hashValue[32];
-   uint8_t sign[64];
--
-   uECC_sign(privateKey, hashValue, sign);
-   memcpy(point_r, sign, 32);
-   memcpy(point_s, sign + 32, 32);
-@@ -505,21 +593,37 @@ dtls_encrypt(const unsigned char *src, size_t length,
-            unsigned char *buf,
-            unsigned char *nounce,
-            unsigned char *key, size_t keylen,
--           const unsigned char *aad, size_t la)
-+           const unsigned char *aad, size_t la,
-+           const dtls_cipher_t cipher)
- {
--  int ret;
-+  int ret = 0;
-   struct dtls_cipher_context_t *ctx = dtls_cipher_context_get();
--  ret = rijndael_set_key_enc_only(&ctx->data.ctx, key, 8 * keylen);
--  if (ret < 0) {
--    /* cleanup everything in case the key has the wrong size */
--    dtls_warn("cannot set rijndael key\n");
--    goto error;
-+  if(cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ||
-+     cipher == TLS_PSK_WITH_AES_128_CCM_8) {
-+      ret = rijndael_set_key_enc_only(&ctx->data.ctx, key, 8 * keylen);
-+      if (ret < 0) {
-+        /* cleanup everything in case the key has the wrong size */
-+        dtls_warn("cannot set rijndael key\n");
-+        goto error;
-+      }
-+
-+      if (src != buf)
-+        memmove(buf, src, length);
-+      ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la);
-+  }
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA) {
-+      ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-+      if (ret < 0) {
-+        /* cleanup everything in case the key has the wrong size */
-+        dtls_warn("cannot set rijndael key\n");
-+        goto error;
-+      }
-+
-+      if (src != buf)
-+        memmove(buf, src, length);
-+      ret = dtls_cbc_encrypt(&ctx->data, nounce, src, length, buf);
-   }
--
--  if (src != buf)
--    memmove(buf, src, length);
--  ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la);
- error:
-   dtls_cipher_context_release();
-@@ -531,21 +635,38 @@ dtls_decrypt(const unsigned char *src, size_t length,
-            unsigned char *buf,
-            unsigned char *nounce,
-            unsigned char *key, size_t keylen,
--           const unsigned char *aad, size_t la)
-+           const unsigned char *aad, size_t la,
-+           const dtls_cipher_t cipher)
- {
--  int ret;
-+  int ret = 0;
-   struct dtls_cipher_context_t *ctx = dtls_cipher_context_get();
--  ret = rijndael_set_key_enc_only(&ctx->data.ctx, key, 8 * keylen);
--  if (ret < 0) {
--    /* cleanup everything in case the key has the wrong size */
--    dtls_warn("cannot set rijndael key\n");
--    goto error;
-+  if(cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ||
-+     cipher == TLS_PSK_WITH_AES_128_CCM_8) {
-+      ret = rijndael_set_key_enc_only(&ctx->data.ctx, key, 8 * keylen);
-+      if (ret < 0) {
-+        /* cleanup everything in case the key has the wrong size */
-+        dtls_warn("cannot set rijndael key\n");
-+        goto error;
-+      }
-+
-+      if (src != buf)
-+        memmove(buf, src, length);
-+      ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la);
-   }
--  if (src != buf)
--    memmove(buf, src, length);
--  ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la);
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA) {
-+      ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-+      if (ret < 0) {
-+        /* cleanup everything in case the key has the wrong size */
-+        dtls_warn("cannot set rijndael key\n");
-+        goto error;
-+      }
-+
-+      if (src != buf)
-+        memmove(buf, src, length);
-+      ret = dtls_cbc_decrypt(&ctx->data, nounce, src, length, buf);
-+    }
- error:
-   dtls_cipher_context_release();
-diff --git a/extlibs/tinydtls/crypto.h b/extlibs/tinydtls/crypto.h
-index 972a174..dd13ffa 100644
---- a/extlibs/tinydtls/crypto.h
-+++ b/extlibs/tinydtls/crypto.h
-@@ -69,11 +69,11 @@ typedef enum {
- /** Crypto context for TLS_PSK_WITH_AES_128_CCM_8 cipher suite. */
- typedef struct {
-   rijndael_ctx ctx;                  /**< AES-128 encryption context */
--} aes128_ccm_t;
-+} aes128_t;
- typedef struct dtls_cipher_context_t {
-   /** numeric identifier of this cipher suite in host byte order. */
--  aes128_ccm_t data;          /**< The crypto context */
-+  aes128_t data;              /**< The crypto context */
- } dtls_cipher_context_t;
- typedef struct {
-@@ -82,7 +82,8 @@ typedef struct {
-   uint8 other_eph_pub_y[32];
-   uint8 other_pub_x[32];
-   uint8 other_pub_y[32];
--} dtls_handshake_parameters_ecdsa_t;
-+} dtls_handshake_parameters_ecc_t;
-+
- /* This is the maximal supported length of the psk client identity and psk
-  * server identity hint */
-@@ -129,7 +130,7 @@ typedef struct {
-   unsigned int do_client_auth:1;
-   union {
- #ifdef DTLS_ECC
--    dtls_handshake_parameters_ecdsa_t ecdsa;
-+    dtls_handshake_parameters_ecc_t ecc;
- #endif /* DTLS_ECC */
- #ifdef DTLS_PSK
-     dtls_handshake_parameters_psk_t psk;
-@@ -265,7 +266,8 @@ int dtls_encrypt(const unsigned char *src, size_t length,
-                unsigned char *buf,
-                unsigned char *nounce,
-                unsigned char *key, size_t keylen,
--               const unsigned char *aad, size_t aad_length);
-+               const unsigned char *aad, size_t aad_length,
-+               const dtls_cipher_t cipher);
- /** 
-  * Decrypts the given buffer \p src of given \p length, writing the
-@@ -289,7 +291,8 @@ int dtls_decrypt(const unsigned char *src, size_t length,
-                unsigned char *buf,
-                unsigned char *nounce,
-                unsigned char *key, size_t keylen,
--               const unsigned char *a_data, size_t a_data_length);
-+               const unsigned char *a_data, size_t a_data_length,
-+               const dtls_cipher_t cipher);
- /* helper functions */
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index a87d7f1..f9a9a0b 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -79,6 +79,7 @@
- #define DTLS_SH_LENGTH (2 + DTLS_RANDOM_LENGTH + 1 + 2 + 1)
- #define DTLS_CE_LENGTH (3 + 3 + 27 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE)
- #define DTLS_SKEXEC_LENGTH (1 + 2 + 1 + 1 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE + 1 + 1 + 2 + 70)
-+#define DTLS_SKEXEC_ECDH_ANON_LENGTH (1 + 2 + 1 + 1 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE)
- #define DTLS_SKEXECPSK_LENGTH_MIN 2
- #define DTLS_SKEXECPSK_LENGTH_MAX 2 + DTLS_PSK_MAX_CLIENT_IDENTITY_LEN
- #define DTLS_CKXPSK_LENGTH_MIN 2
-@@ -167,6 +168,24 @@ dtls_init() {
-   peer_init();
- }
-+ void
-+ dtls_enables_anon_ecdh(dtls_context_t* ctx, dtls_cipher_enable_t is_enable)
-+{
-+    if(ctx)
-+    {
-+        ctx->is_anon_ecdh_eabled = is_enable;
-+    }
-+}
-+
-+void
-+dtls_select_cipher(dtls_context_t* ctx, const dtls_cipher_t cipher)
-+{
-+    if(ctx)
-+    {
-+        ctx->selected_cipher = cipher;
-+    }
-+}
-+
- /* Calls cb_alert() with given arguments if defined, otherwise an
-  * error message is logged and the result is -1. This is just an
-  * internal helper.
-@@ -477,6 +496,17 @@ static inline int is_tls_psk_with_aes_128_ccm_8(dtls_cipher_t cipher)
- #endif /* DTLS_PSK */
- }
-+/** returns true if the cipher matches TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
-+static inline int is_tls_ecdh_anon_with_aes_128_cbc_sha(dtls_cipher_t cipher)
-+{
-+#ifdef DTLS_ECC
-+    return cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+#else
-+    return 0;
-+#endif
-+}
-+
-+
- /** returns true if the application is configured for psk */
- static inline int is_psk_supported(dtls_context_t *ctx)
- {
-@@ -509,6 +539,16 @@ static inline int is_ecdsa_client_auth_supported(dtls_context_t *ctx)
- #endif /* DTLS_ECC */
- }
-+/** returns true if ecdh_anon_with_aes_128_cbc_sha is supported */
-+static inline int is_ecdh_anon_supported(dtls_context_t *ctx)
-+{
-+#ifdef DTLS_ECC
-+    return ctx &&  (ctx->is_anon_ecdh_eabled == DTLS_CIPHER_ENABLE);
-+#else
-+    return 0;
-+#endif
-+}
-+
- /**
-  * Returns @c 1 if @p code is a cipher suite other than @c
-  * TLS_NULL_WITH_NULL_NULL that we recognize.
-@@ -522,11 +562,15 @@ static int
- known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-   int psk;
-   int ecdsa;
-+  int ecdh_anon;
-   psk = is_psk_supported(ctx);
-   ecdsa = is_ecdsa_supported(ctx, is_client);
-+  ecdh_anon = is_ecdh_anon_supported(ctx);
-+
-   return (psk && is_tls_psk_with_aes_128_ccm_8(code)) ||
--       (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code));
-+       (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code)) ||
-+       (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha(code));
- }
- /**
-@@ -674,11 +718,12 @@ calculate_key_block(dtls_context_t *ctx,
-   }
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
--  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: {
--    pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecdsa.own_eph_priv,
--                                               handshake->keyx.ecdsa.other_eph_pub_x,
--                                               handshake->keyx.ecdsa.other_eph_pub_y,
--                                               sizeof(handshake->keyx.ecdsa.own_eph_priv),
-+  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-+  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA: {
-+    pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecc.own_eph_priv,
-+                                               handshake->keyx.ecc.other_eph_pub_x,
-+                                               handshake->keyx.ecc.other_eph_pub_y,
-+                                               sizeof(handshake->keyx.ecc.own_eph_priv),
-                                                pre_master_secret,
-                                                MAX_KEYBLOCK_LENGTH);
-     if (pre_master_len < 0) {
-@@ -1038,7 +1083,8 @@ check_client_keyexchange(dtls_context_t *ctx,
-                        uint8 *data, size_t length) {
- #ifdef DTLS_ECC
--  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher)) {
-+  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) ||
-+       is_tls_ecdh_anon_with_aes_128_cbc_sha(handshake->cipher) ) {
-     if (length < DTLS_HS_LENGTH + DTLS_CKXEC_LENGTH) {
-       dtls_debug("The client key exchange is too short\n");
-@@ -1058,13 +1104,13 @@ check_client_keyexchange(dtls_context_t *ctx,
-     }
-     data += sizeof(uint8);
--    memcpy(handshake->keyx.ecdsa.other_eph_pub_x, data,
--         sizeof(handshake->keyx.ecdsa.other_eph_pub_x));
--    data += sizeof(handshake->keyx.ecdsa.other_eph_pub_x);
-+    memcpy(handshake->keyx.ecc.other_eph_pub_x, data,
-+         sizeof(handshake->keyx.ecc.other_eph_pub_x));
-+    data += sizeof(handshake->keyx.ecc.other_eph_pub_x);
--    memcpy(handshake->keyx.ecdsa.other_eph_pub_y, data,
--         sizeof(handshake->keyx.ecdsa.other_eph_pub_y));
--    data += sizeof(handshake->keyx.ecdsa.other_eph_pub_y);
-+    memcpy(handshake->keyx.ecc.other_eph_pub_y, data,
-+         sizeof(handshake->keyx.ecc.other_eph_pub_y));
-+    data += sizeof(handshake->keyx.ecc.other_eph_pub_y);
-   }
- #endif /* DTLS_ECC */
- #ifdef DTLS_PSK
-@@ -1253,6 +1299,8 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-       dtls_debug("dtls_prepare_record(): encrypt using TLS_PSK_WITH_AES_128_CCM_8\n");
-     } else if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(security->cipher)) {
-       dtls_debug("dtls_prepare_record(): encrypt using TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n");
-+    } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha(security->cipher)) {
-+        dtls_debug("dtls_prepare_record() : encrypt using TLS_ECDH_anon_WITH_AES_128_CBC_SHA\n");
-     } else {
-       dtls_debug("dtls_prepare_record(): encrypt using unknown cipher\n");
-     }
-@@ -1332,9 +1380,10 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-     dtls_int_to_uint16(A_DATA + 11, res - 8); /* length */
-     
-     res = dtls_encrypt(start + 8, res - 8, start + 8, nonce,
--                     dtls_kb_local_write_key(security, peer->role),
--                     dtls_kb_key_size(security, peer->role),
--                     A_DATA, A_DATA_LEN);
-+               dtls_kb_local_write_key(security, peer->role),
-+               dtls_kb_key_size(security, peer->role),
-+               A_DATA, A_DATA_LEN,
-+               security->cipher);
-     if (res < 0)
-       return res;
-@@ -1753,8 +1802,8 @@ check_client_certificate_verify(dtls_context_t *ctx,
-   dtls_hash_finalize(sha256hash, &hs_hash);
--  ret = dtls_ecdsa_verify_sig_hash(config->keyx.ecdsa.other_pub_x, config->keyx.ecdsa.other_pub_y,
--                          sizeof(config->keyx.ecdsa.other_pub_x),
-+  ret = dtls_ecdsa_verify_sig_hash(config->keyx.ecc.other_pub_x, config->keyx.ecc.other_pub_y,
-+                          sizeof(config->keyx.ecc.other_pub_x),
-                           sha256hash, sizeof(sha256hash),
-                           result_r, result_s);
-@@ -1866,7 +1915,7 @@ dtls_send_server_hello(dtls_context_t *ctx, dtls_peer_t *peer)
- #ifdef DTLS_ECC
- static int
- dtls_send_certificate_ecdsa(dtls_context_t *ctx, dtls_peer_t *peer,
--                          const dtls_ecdsa_key_t *key)
-+                          const dtls_ecc_key_t *key)
- {
-   uint8 buf[DTLS_CE_LENGTH];
-   uint8 *p;
-@@ -1956,7 +2005,7 @@ dtls_add_ecdsa_signature_elem(uint8 *p, uint32_t *point_r, uint32_t *point_s)
- static int
- dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
--                                 const dtls_ecdsa_key_t *key)
-+                                 const dtls_ecc_key_t *key)
- {
-   /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-    * 33 bytes long add space for that */
-@@ -1967,9 +2016,11 @@ dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-   uint8 *ephemeral_pub_y;
-   uint32_t point_r[9];
-   uint32_t point_s[9];
-+  int ecdsa;
-   dtls_handshake_parameters_t *config = peer->handshake_params;
--  /* ServerKeyExchange 
-+  ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
-+  /* ServerKeyExchange
-    *
-    * Start message construction at beginning of buffer. */
-   p = buf;
-@@ -1998,18 +2049,20 @@ dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-   ephemeral_pub_y = p;
-   p += DTLS_EC_KEY_SIZE;
--  dtls_ecdsa_generate_key(config->keyx.ecdsa.own_eph_priv,
--                        ephemeral_pub_x, ephemeral_pub_y,
--                        DTLS_EC_KEY_SIZE);
-+  dtls_ecdsa_generate_key(config->keyx.ecc.own_eph_priv,
-+              ephemeral_pub_x, ephemeral_pub_y,
-+              DTLS_EC_KEY_SIZE);
--  /* sign the ephemeral and its paramaters */
--  dtls_ecdsa_create_sig(key->priv_key, DTLS_EC_KEY_SIZE,
--                     config->tmp.random.client, DTLS_RANDOM_LENGTH,
--                     config->tmp.random.server, DTLS_RANDOM_LENGTH,
--                     key_params, p - key_params,
--                     point_r, point_s);
-+  if(ecdsa) {
-+      /* sign the ephemeral and its paramaters */
-+           dtls_ecdsa_create_sig(key->priv_key, DTLS_EC_KEY_SIZE,
-+               config->tmp.random.client, DTLS_RANDOM_LENGTH,
-+               config->tmp.random.server, DTLS_RANDOM_LENGTH,
-+               key_params, p - key_params,
-+               point_r, point_s);
--  p = dtls_add_ecdsa_signature_elem(p, point_r, point_s);
-+      p = dtls_add_ecdsa_signature_elem(p, point_r, point_s);
-+  }
-   assert(p - buf <= sizeof(buf));
-@@ -2107,6 +2160,8 @@ static int
- dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
- {
-   int res;
-+  int ecdsa;
-+  int ecdh_anon;
-   res = dtls_send_server_hello(ctx, peer);
-@@ -2115,9 +2170,20 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-     return res;
-   }
-+  ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
-+  ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher);
-+
- #ifdef DTLS_ECC
--  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
--    const dtls_ecdsa_key_t *ecdsa_key;
-+  if(ecdh_anon) {
-+      res = dtls_send_server_key_exchange_ecdh(ctx, peer, NULL);
-+
-+      if (res < 0) {
-+        dtls_debug("dtls_server_hello(with ECDH): cannot prepare Server Key Exchange record\n");
-+        return res;
-+      }
-+  }
-+  else if (ecdsa) {
-+    const dtls_ecc_key_t *ecdsa_key;
-     res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-     if (res < 0) {
-@@ -2144,7 +2210,7 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-       res = dtls_send_server_certificate_request(ctx, peer);
-       if (res < 0) {
--        dtls_debug("dtls_server_hello: cannot prepare certificate Request record\n");
-+        dtls_debug("dtls_server_hello(with ECDSA): cannot prepare certificate Request record\n");
-         return res;
-       }
-     }
-@@ -2233,7 +2299,8 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-   }
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
--  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8: {
-+  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-+  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA: {
-     uint8 *ephemeral_pub_x;
-     uint8 *ephemeral_pub_y;
-@@ -2249,7 +2316,7 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-     ephemeral_pub_y = p;
-     p += DTLS_EC_KEY_SIZE;
--    dtls_ecdsa_generate_key(peer->handshake_params->keyx.ecdsa.own_eph_priv,
-+    dtls_ecdsa_generate_key(peer->handshake_params->keyx.ecc.own_eph_priv,
-                           ephemeral_pub_x, ephemeral_pub_y,
-                           DTLS_EC_KEY_SIZE);
-@@ -2270,7 +2337,7 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
- #ifdef DTLS_ECC
- static int
- dtls_send_certificate_verify_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
--                                 const dtls_ecdsa_key_t *key)
-+                                 const dtls_ecc_key_t *key)
- {
-   /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-    * 33 bytes long add space for that */
-@@ -2342,16 +2409,32 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-   uint8 *p = buf;
-   uint8_t cipher_size;
-   uint8_t extension_size;
--  int psk;
--  int ecdsa;
-+  int psk = 0;
-+  int ecdsa = 0;
-+  int ecdh_anon = 0;
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-   dtls_tick_t now;
--  psk = is_psk_supported(ctx);
--  ecdsa = is_ecdsa_supported(ctx, 1);
-+  switch(ctx->selected_cipher)
-+  {
-+      case TLS_PSK_WITH_AES_128_CCM_8:
-+        psk = is_psk_supported(ctx);
-+        break;
-+      case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-+        ecdsa = is_ecdsa_supported(ctx, 1);
-+        break;
-+      case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
-+        ecdh_anon = is_ecdh_anon_supported(ctx);
-+        break;
-+      default:
-+        psk = is_psk_supported(ctx);
-+        ecdsa = is_ecdsa_supported(ctx, 1);
-+        ecdh_anon = is_ecdh_anon_supported(ctx);
-+        break;
-+   }
--  cipher_size = 2 + ((ecdsa) ? 2 : 0) + ((psk) ? 2 : 0);
--  extension_size = (ecdsa) ? 2 + 6 + 6 + 8 + 6: 0;
-+  cipher_size = 2 + (ecdsa ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0);
-+  extension_size = (ecdsa) ? (2 + 6 + 6 + 8 + 6) : 0;
-   if (cipher_size == 0) {
-     dtls_crit("no cipher callbacks implemented\n");
-@@ -2393,14 +2476,18 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-   dtls_int_to_uint16(p, cipher_size - 2);
-   p += sizeof(uint16);
--  if (ecdsa) {
--    dtls_int_to_uint16(p, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8);
-+  if (ecdh_anon) {
-+    dtls_int_to_uint16(p, TLS_ECDH_anon_WITH_AES_128_CBC_SHA);
-     p += sizeof(uint16);
-   }
-   if (psk) {
-     dtls_int_to_uint16(p, TLS_PSK_WITH_AES_128_CCM_8);
-     p += sizeof(uint16);
-   }
-+  if (ecdsa) {
-+    dtls_int_to_uint16(p, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8);
-+    p += sizeof(uint16);
-+  }
-   /* compression method */
-   dtls_int_to_uint8(p, 1);
-@@ -2611,18 +2698,18 @@ check_server_certificate(dtls_context_t *ctx,
-   }
-   data += sizeof(cert_asn1_header);
--  memcpy(config->keyx.ecdsa.other_pub_x, data,
--       sizeof(config->keyx.ecdsa.other_pub_x));
--  data += sizeof(config->keyx.ecdsa.other_pub_x);
-+  memcpy(config->keyx.ecc.other_pub_x, data,
-+       sizeof(config->keyx.ecc.other_pub_x));
-+  data += sizeof(config->keyx.ecc.other_pub_x);
--  memcpy(config->keyx.ecdsa.other_pub_y, data,
--       sizeof(config->keyx.ecdsa.other_pub_y));
--  data += sizeof(config->keyx.ecdsa.other_pub_y);
-+  memcpy(config->keyx.ecc.other_pub_y, data,
-+       sizeof(config->keyx.ecc.other_pub_y));
-+  data += sizeof(config->keyx.ecc.other_pub_y);
-   err = CALL(ctx, verify_ecdsa_key, &peer->session,
--           config->keyx.ecdsa.other_pub_x,
--           config->keyx.ecdsa.other_pub_y,
--           sizeof(config->keyx.ecdsa.other_pub_x));
-+           config->keyx.ecc.other_pub_x,
-+           config->keyx.ecc.other_pub_y,
-+           sizeof(config->keyx.ecc.other_pub_x));
-   if (err < 0) {
-     dtls_warn("The certificate was not accepted\n");
-     return err;
-@@ -2682,13 +2769,13 @@ check_server_key_exchange_ecdsa(dtls_context_t *ctx,
-   data += sizeof(uint8);
-   data_length -= sizeof(uint8);
--  memcpy(config->keyx.ecdsa.other_eph_pub_x, data, sizeof(config->keyx.ecdsa.other_eph_pub_y));
--  data += sizeof(config->keyx.ecdsa.other_eph_pub_y);
--  data_length -= sizeof(config->keyx.ecdsa.other_eph_pub_y);
-+  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
--  memcpy(config->keyx.ecdsa.other_eph_pub_y, data, sizeof(config->keyx.ecdsa.other_eph_pub_y));
--  data += sizeof(config->keyx.ecdsa.other_eph_pub_y);
--  data_length -= sizeof(config->keyx.ecdsa.other_eph_pub_y);
-+  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-   ret = dtls_check_ecdsa_signature_elem(data, data_length, &result_r, &result_s);
-   if (ret < 0) {
-@@ -2697,8 +2784,8 @@ check_server_key_exchange_ecdsa(dtls_context_t *ctx,
-   data += ret;
-   data_length -= ret;
--  ret = dtls_ecdsa_verify_sig(config->keyx.ecdsa.other_pub_x, config->keyx.ecdsa.other_pub_y,
--                          sizeof(config->keyx.ecdsa.other_pub_x),
-+  ret = dtls_ecdsa_verify_sig(config->keyx.ecc.other_pub_x, config->keyx.ecc.other_pub_y,
-+                          sizeof(config->keyx.ecc.other_pub_x),
-                           config->tmp.random.client, DTLS_RANDOM_LENGTH,
-                           config->tmp.random.server, DTLS_RANDOM_LENGTH,
-                           key_params,
-@@ -2711,6 +2798,64 @@ check_server_key_exchange_ecdsa(dtls_context_t *ctx,
-   }
-   return 0;
- }
-+
-+static int
-+check_server_key_exchange_ecdh(dtls_context_t *ctx,
-+                              dtls_peer_t *peer,
-+                              uint8 *data, size_t data_length)
-+{
-+  dtls_handshake_parameters_t *config = peer->handshake_params;
-+
-+  update_hs_hash(peer, data, data_length);
-+
-+  assert(is_tls_ecdh_anon_with_aes_128_cbc_sha(config->cipher));
-+
-+  data += DTLS_HS_LENGTH;
-+
-+  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXEC_ECDH_ANON_LENGTH) {
-+    dtls_alert("the packet length does not match the expected\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-+  }
-+
-+  if (dtls_uint8_to_int(data) != TLS_EC_CURVE_TYPE_NAMED_CURVE) {
-+    dtls_alert("Only named curves supported\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  if (dtls_uint16_to_int(data) != TLS_EXT_ELLIPTIC_CURVES_SECP256R1) {
-+    dtls_alert("secp256r1 supported\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint16);
-+  data_length -= sizeof(uint16);
-+
-+  if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-+    dtls_alert("expected 65 bytes long public point\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  if (dtls_uint8_to_int(data) != 4) {
-+    dtls_alert("expected uncompressed public point\n");
-+    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-+  }
-+  data += sizeof(uint8);
-+  data_length -= sizeof(uint8);
-+
-+  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_x));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_x);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_x);
-+
-+  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-+  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-+  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-+
-+  return 0;
-+}
-+
- #endif /* DTLS_ECC */
- #ifdef DTLS_PSK
-@@ -2838,7 +2983,7 @@ check_server_hellodone(dtls_context_t *ctx,
- {
-   int res;
- #ifdef DTLS_ECC
--  const dtls_ecdsa_key_t *ecdsa_key;
-+  const dtls_ecc_key_t *ecdsa_key;
- #endif /* DTLS_ECC */
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-@@ -2848,7 +2993,7 @@ check_server_hellodone(dtls_context_t *ctx,
-   update_hs_hash(peer, data, data_length);
- #ifdef DTLS_ECC
--  if (handshake->do_client_auth) {
-+  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
-     res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-     if (res < 0) {
-@@ -2874,7 +3019,7 @@ check_server_hellodone(dtls_context_t *ctx,
-   }
- #ifdef DTLS_ECC
--  if (handshake->do_client_auth) {
-+  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
-     res = dtls_send_certificate_verify_ecdh(ctx, peer, ecdsa_key);
-@@ -2961,12 +3106,13 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-     clen = dtls_decrypt(*cleartext, clen, *cleartext, nonce,
-                      dtls_kb_remote_write_key(security, peer->role),
-                      dtls_kb_key_size(security, peer->role),
--                     A_DATA, A_DATA_LEN);
-+                     A_DATA, A_DATA_LEN,
-+               security->cipher);
-     if (clen < 0)
-       dtls_warn("decryption failed\n");
-     else {
- #ifndef NDEBUG
--      printf("decrypt_verify(): found %i bytes cleartext\n", clen);
-+      dtls_debug("decrypt_verify(): found %i bytes cleartext\n", clen);
- #endif
-       dtls_security_params_free_other(peer);
-       dtls_debug_dump("cleartext", *cleartext, clen);
-@@ -3071,9 +3217,11 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-       return err;
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher))
--      peer->state = DTLS_STATE_WAIT_SERVERCERTIFICATE;
-+      peer->state = DTLS_STATE_WAIT_SERVERCERTIFICATE; //ecdsa
-+    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher))
-+        peer->state = DTLS_STATE_WAIT_SERVERKEYEXCHANGE; //ecdh
-     else
--      peer->state = DTLS_STATE_WAIT_SERVERHELLODONE;
-+      peer->state = DTLS_STATE_WAIT_SERVERHELLODONE; //psk
-     /* update_hs_hash(peer, data, data_length); */
-     break;
-@@ -3109,6 +3257,13 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-       }
-       err = check_server_key_exchange_ecdsa(ctx, peer, data, data_length);
-     }
-+
-+    if (is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher)) {
-+      if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-+        return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-+      }
-+      err = check_server_key_exchange_ecdh(ctx, peer, data, data_length);
-+    }
- #endif /* DTLS_ECC */
- #ifdef DTLS_PSK
-     if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-@@ -3218,9 +3373,9 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
-       is_ecdsa_client_auth_supported(ctx))
--      peer->state = DTLS_STATE_WAIT_CERTIFICATEVERIFY;
-+      peer->state = DTLS_STATE_WAIT_CERTIFICATEVERIFY; //ecdsa
-     else
--      peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC;
-+      peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC; //psk || ecdh_anon
-     break;
- #ifdef DTLS_ECC
-@@ -3341,9 +3496,9 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
-       is_ecdsa_client_auth_supported(ctx))
--      peer->state = DTLS_STATE_WAIT_CLIENTCERTIFICATE;
-+      peer->state = DTLS_STATE_WAIT_CLIENTCERTIFICATE; //ecdhe
-     else
--      peer->state = DTLS_STATE_WAIT_CLIENTKEYEXCHANGE;
-+      peer->state = DTLS_STATE_WAIT_CLIENTKEYEXCHANGE; //psk, ecdh_anon
-     /* after sending the ServerHelloDone, we expect the
-      * ClientKeyExchange (possibly containing the PSK id),
-diff --git a/extlibs/tinydtls/dtls.h b/extlibs/tinydtls/dtls.h
-index 7ebde6b..4d82f72 100644
---- a/extlibs/tinydtls/dtls.h
-+++ b/extlibs/tinydtls/dtls.h
-@@ -60,12 +60,12 @@ typedef enum dtls_credentials_type_t {
-   DTLS_PSK_HINT, DTLS_PSK_IDENTITY, DTLS_PSK_KEY
- } dtls_credentials_type_t;
--typedef struct dtls_ecdsa_key_t {
-+typedef struct dtls_ecc_key_t {
-   dtls_ecdh_curve curve;
-   const unsigned char *priv_key;      /** < private key as bytes > */
-   const unsigned char *pub_key_x;     /** < x part of the public key for the given private key > */
-   const unsigned char *pub_key_y;     /** < y part of the public key for the given private key > */
--} dtls_ecdsa_key_t;
-+} dtls_ecc_key_t;
- /** Length of the secret that is used for generating Hello Verify cookies. */
- #define DTLS_COOKIE_SECRET_LENGTH 12
-@@ -183,7 +183,7 @@ typedef struct {
-    */
-   int (*get_ecdsa_key)(struct dtls_context_t *ctx, 
-                      const session_t *session,
--                     const dtls_ecdsa_key_t **result);
-+                     const dtls_ecc_key_t **result);
-   /**
-    * Called during handshake to check the peer's pubic key in this
-@@ -238,6 +238,10 @@ typedef struct dtls_context_t {
-   dtls_handler_t *h;          /**< callback handlers */
-+  dtls_cipher_enable_t is_anon_ecdh_eabled;    /**< enable/disable the TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
-+
-+  dtls_cipher_t selected_cipher; /**< selected ciper suite for handshake */
-+
-   unsigned char readbuf[DTLS_MAX_BUF];
- } dtls_context_t;
-@@ -263,6 +267,24 @@ static inline void dtls_set_handler(dtls_context_t *ctx, dtls_handler_t *h) {
-   ctx->h = h;
- }
-+ /**
-+  * @brief Enabling the TLS_ECDH_anon_WITH_AES_128_CBC_SHA
-+  *
-+  * @param ctx              The DTLS context to use.
-+  * @param is_enable    DTLS_CIPHER_ENABLE(1) or DTLS_CIPHER_DISABLE(0)
-+  */
-+void dtls_enables_anon_ecdh(dtls_context_t* ctx, dtls_cipher_enable_t is_enable);
-+
-+/**
-+ * @brief Select the cipher suite for handshake
-+ *
-+ * @param ctx              The DTLS context to use.
-+ * @param cipher         TLS_ECDH_anon_WITH_AES_128_CBC_SHA (0xC018)
-+ *                                  TLS_PSK_WITH_AES_128_CCM_8 (0xX0A8)
-+ *                                  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 (0xC0AE)
-+ */
-+void dtls_select_cipher(dtls_context_t* ctx, const dtls_cipher_t cipher);
-+
- /**
-  * Establishes a DTLS channel with the specified remote peer @p dst.
-  * This function returns @c 0 if that channel already exists, a value
-diff --git a/extlibs/tinydtls/global.h b/extlibs/tinydtls/global.h
-index f0977c8..441710f 100644
---- a/extlibs/tinydtls/global.h
-+++ b/extlibs/tinydtls/global.h
-@@ -73,10 +73,16 @@ typedef unsigned char uint48[6];
- /** Known cipher suites.*/
- typedef enum { 
-   TLS_NULL_WITH_NULL_NULL = 0x0000,   /**< NULL cipher  */
-+  TLS_ECDH_anon_WITH_AES_128_CBC_SHA = 0xC018, /**< see RFC 4492 */
-   TLS_PSK_WITH_AES_128_CCM_8 = 0xC0A8, /**< see RFC 6655 */
-   TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xC0AE /**< see RFC 7251 */
- } dtls_cipher_t;
-+typedef enum {
-+    DTLS_CIPHER_DISABLE = 0,
-+    DTLS_CIPHER_ENABLE = 1
-+} dtls_cipher_enable_t;
-+
- /** Known compression suites.*/
- typedef enum {
-   TLS_COMPRESSION_NULL = 0x0000               /* NULL compression */
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index 65b0275..3a3e4ca 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -147,8 +147,8 @@ get_psk_info(struct dtls_context_t *ctx UNUSED_PARAM,
- static int
- get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
--            const dtls_ecdsa_key_t **result) {
--  static const dtls_ecdsa_key_t ecdsa_key = {
-+            const dtls_ecc_key_t **result) {
-+  static const dtls_ecc_key_t ecdsa_key = {
-     .curve = DTLS_ECDH_CURVE_SECP256R1,
-     .priv_key = ecdsa_priv_key,
-     .pub_key_x = ecdsa_pub_key_x,
-@@ -294,9 +294,9 @@ usage( const char *program, const char *version) {
-   fprintf(stderr, "%s v%s -- DTLS client implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
- #ifdef DTLS_PSK
--        "usage: %s [-i file] [-s file] [-k file] [-o file] [-p port] [-v num] addr [port]\n"
-+        "usage: %s [-i file] [-s file] [-k file] [-o file] [-p port] [-v num] [-c num] addr [port]\n"
- #else /*  DTLS_PSK */
--        "usage: %s [-o file] [-p port] [-v num] addr [port]\n"
-+        "usage: %s [-o file] [-p port] [-v num] [-c num] addr [port]\n"
- #endif /* DTLS_PSK */
- #ifdef DTLS_PSK
-         "\t-i file\t\tread PSK Client identity from file\n"
-@@ -305,7 +305,11 @@ usage( const char *program, const char *version) {
- #endif /* DTLS_PSK */
-         "\t-o file\t\toutput received data to this file (use '-' for STDOUT)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
--        "\t-v num\t\tverbosity level (default: 3)\n",
-+        "\t-v num\t\tverbosity level (default: 3)\n"
-+          "\t-c num\t\tcipher suite (default: 1)\n"
-+          "\t\t\t1: TLS_ECDH_anon_WITH_AES_128_CBC_SHA \n"
-+          "\t\t\t2: TLS_PSK_WITH_AES_128_CCM_8\n"
-+          "\t\t\t3: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n",
-          program, version, program, DEFAULT_PORT);
- }
-@@ -334,6 +338,8 @@ main(int argc, char **argv) {
-   log_t log_level = DTLS_LOG_WARN;
-   int fd, result;
-   int on = 1;
-+  dtls_cipher_t selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+  dtls_cipher_enable_t ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-   int opt, res;
-   session_t dst;
-@@ -349,7 +355,7 @@ main(int argc, char **argv) {
-   memcpy(psk_key, PSK_DEFAULT_KEY, psk_key_length);
- #endif /* DTLS_PSK */
--  while ((opt = getopt(argc, argv, "p:o:v:" PSK_OPTIONS)) != -1) {
-+  while ((opt = getopt(argc, argv, "p:o:v:c:" PSK_OPTIONS)) != -1) {
-     switch (opt) {
- #ifdef DTLS_PSK
-     case 'i' : {
-@@ -399,6 +405,23 @@ main(int argc, char **argv) {
-     case 'v' :
-       log_level = strtol(optarg, NULL, 10);
-       break;
-+    case 'c':
-+      if( strcmp(optarg, "1") == 0)
-+      {
-+          selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+          ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-+      }
-+      else if( strcmp(optarg, "2") == 0)
-+      {
-+          selected_cipher = TLS_PSK_WITH_AES_128_CCM_8 ;
-+          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-+      }
-+      else if( strcmp(optarg, "3") == 0)
-+      {
-+          selected_cipher = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ;
-+          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-+      }
-+      break;
-     default:
-       usage(argv[0], dtls_package_version());
-       exit(1);
-@@ -464,6 +487,13 @@ main(int argc, char **argv) {
-     exit(-1);
-   }
-+
-+  /* select cipher suite */
-+  dtls_select_cipher(dtls_context, selected_cipher);
-+
-+  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha */
-+  dtls_enables_anon_ecdh(dtls_context, ecdh_anon_enalbe);
-+
-   dtls_set_handler(dtls_context, &cb);
-   dtls_connect(dtls_context, &dst);
-diff --git a/extlibs/tinydtls/tests/dtls-server.c b/extlibs/tinydtls/tests/dtls-server.c
-index ae1283e..d3da1a7 100644
---- a/extlibs/tinydtls/tests/dtls-server.c
-+++ b/extlibs/tinydtls/tests/dtls-server.c
-@@ -113,8 +113,8 @@ get_psk_info(struct dtls_context_t *ctx, const session_t *session,
- static int
- get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
--            const dtls_ecdsa_key_t **result) {
--  static const dtls_ecdsa_key_t ecdsa_key = {
-+            const dtls_ecc_key_t **result) {
-+  static const dtls_ecc_key_t ecdsa_key = {
-     .curve = DTLS_ECDH_CURVE_SECP256R1,
-     .priv_key = ecdsa_priv_key,
-     .pub_key_x = ecdsa_pub_key_x,
-@@ -249,10 +249,13 @@ usage(const char *program, const char *version) {
-   fprintf(stderr, "%s v%s -- DTLS server implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
--        "usage: %s [-A address] [-p port] [-v num]\n"
-+        "usage: %s [-A address] [-p port] [-v num] [-a enable|disable]\n"
-         "\t-A address\t\tlisten on specified address (default is ::)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
--        "\t-v num\t\tverbosity level (default: 3)\n",
-+        "\t-v num\t\tverbosity level (default: 3)\n"
-+        "\t-a enable|disable\t(default: disable)\n"
-+        "\t\t\t\tenable:enable TLS_ECDH_anon_with_AES_128_CBC_SHA\n"
-+        "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA\n",
-          program, version, program, DEFAULT_PORT);
- }
-@@ -277,6 +280,7 @@ main(int argc, char **argv) {
-   struct timeval timeout;
-   int fd, opt, result;
-   int on = 1;
-+  int ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-   struct sockaddr_in6 listen_addr;
-   memset(&listen_addr, 0, sizeof(struct sockaddr_in6));
-@@ -290,7 +294,7 @@ main(int argc, char **argv) {
-   listen_addr.sin6_port = htons(DEFAULT_PORT);
-   listen_addr.sin6_addr = in6addr_any;
--  while ((opt = getopt(argc, argv, "A:p:v:")) != -1) {
-+  while ((opt = getopt(argc, argv, "A:p:v:a:")) != -1) {
-     switch (opt) {
-     case 'A' :
-       if (resolve_address(optarg, (struct sockaddr *)&listen_addr) < 0) {
-@@ -304,6 +308,10 @@ main(int argc, char **argv) {
-     case 'v' :
-       log_level = strtol(optarg, NULL, 10);
-       break;
-+    case 'a':
-+      if( strcmp(optarg, "enable") == 0)
-+          ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-+      break;
-     default:
-       usage(argv[0], dtls_package_version());
-       exit(1);
-@@ -348,6 +356,9 @@ main(int argc, char **argv) {
-   the_context = dtls_new_context(&fd);
-+  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha */
-+  dtls_enables_anon_ecdh(the_context, ecdh_anon_enalbe);
-+
-   dtls_set_handler(the_context, &cb);
-   while (1) {
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Added-support-in-tinyDTLS-to-support-rehandshake.patch b/extlibs/tinydtls/0001-Added-support-in-tinyDTLS-to-support-rehandshake.patch
deleted file mode 100644 (file)
index fb9c71f..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-From c78aa91005b7b9542d595dc32d8c8fe020d2257d Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Wed, 21 Jan 2015 08:55:00 -0800
-Subject: [PATCH 1/1] Added support in tinyDTLS to support rehandshake
-
-As per RFC 6347 section 4.2.8, DTLS Server should support requests
-from clients who have silently abandoned the existing association
-and initiated a new handshake request by sending a ClientHello.
-Code is updated to detect this scenario and delete the old
-association when client successfully responds to HelloVerifyRequest.
-
-
-Change-Id: I6e256921215c1a22e9e5013499c4dfd98659f8cc
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/dtls.c |   74 +++++++++++++++++++++++++++++++++++++++++++----
- 1 file changed, 68 insertions(+), 6 deletions(-)
-
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index 779e701..111a65d 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -529,6 +529,37 @@ known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-        (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code));
- }
-+/**
-+ * This method detects if we already have a established DTLS session with
-+ * peer and the peer is attempting to perform a fresh handshake by sending
-+ * messages with epoch = 0. This is to handle situations mentioned in
-+ * RFC 6347 - section 4.2.8.
-+ *
-+ * @param msg  The packet received from Client
-+ * @param msglen Packet length
-+ * @param peer peer who is the sender for this packet
-+ * @return @c 1 if this is a rehandshake attempt by
-+ * client
-+ */
-+static int
-+hs_attempt_with_existing_peer(uint8_t *msg, size_t msglen,
-+    dtls_peer_t *peer)
-+{
-+    if ((peer) && (peer->state == DTLS_STATE_CONNECTED)) {
-+      if (msg[0] == DTLS_CT_HANDSHAKE) {
-+        uint16_t msg_epoch = dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->epoch);
-+        if (msg_epoch == 0) {
-+          dtls_handshake_header_t * hs_header = DTLS_HANDSHAKE_HEADER(msg + DTLS_RH_LENGTH);
-+          if (hs_header->msg_type == DTLS_HT_CLIENT_HELLO ||
-+              hs_header->msg_type == DTLS_HT_HELLO_REQUEST) {
-+            return 1;
-+          }
-+        }
-+      }
-+    }
-+    return 0;
-+}
-+
- /** Dump out the cipher keys and IVs used for the symetric cipher. */
- static void dtls_debug_keyblock(dtls_security_parameters_t *config)
- {
-@@ -1540,6 +1571,7 @@ static int
- dtls_verify_peer(dtls_context_t *ctx, 
-                dtls_peer_t *peer, 
-                session_t *session,
-+               const dtls_state_t state,
-                uint8 *data, size_t data_length)
- {
-   uint8 buf[DTLS_HV_LENGTH + DTLS_COOKIE_LENGTH];
-@@ -1595,9 +1627,11 @@ dtls_verify_peer(dtls_context_t *ctx,
-   /* TODO use the same record sequence number as in the ClientHello,
-      see 4.2.1. Denial-of-Service Countermeasures */
--  err = dtls_send_handshake_msg_hash(ctx, peer, session,
--                                   DTLS_HT_HELLO_VERIFY_REQUEST,
--                                   buf, p - buf, 0);
-+  err = dtls_send_handshake_msg_hash(ctx,
-+                   state == DTLS_STATE_CONNECTED ? peer : NULL,
-+                   session,
-+                   DTLS_HT_HELLO_VERIFY_REQUEST,
-+                   buf, p - buf, 0);
-   if (err < 0) {
-     dtls_warn("cannot send HelloVerify request\n");
-   }
-@@ -3209,7 +3243,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-   case DTLS_HT_CLIENT_HELLO:
--    if ((peer && state != DTLS_STATE_CONNECTED) ||
-+    if ((peer && state != DTLS_STATE_CONNECTED && state != DTLS_STATE_WAIT_CLIENTHELLO) ||
-       (!peer && state != DTLS_STATE_WAIT_CLIENTHELLO)) {
-       return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-     }
-@@ -3223,7 +3257,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-        Anything else will be rejected. Fragementation is not allowed
-        here as it would require peer state as well.
-     */
--    err = dtls_verify_peer(ctx, peer, session, data, data_length);
-+    err = dtls_verify_peer(ctx, peer, session, state, data, data_length);
-     if (err < 0) {
-       dtls_warn("error in dtls_verify_peer err: %i\n", err);
-       return err;
-@@ -3236,7 +3270,23 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     /* At this point, we have a good relationship with this peer. This
-      * state is left for re-negotiation of key material. */
-+     /* As per RFC 6347 - section 4.2.8 if this is an attempt to
-+      * rehandshake, we can delete the existing key material
-+      * as the client has demonstrated reachibility by completing
-+      * the cookie exchange */
-+    if (peer && state == DTLS_STATE_WAIT_CLIENTHELLO) {
-+       dtls_debug("removing the peer\n");
-+#ifndef WITH_CONTIKI
-+       HASH_DEL_PEER(ctx->peers, peer);
-+#else  /* WITH_CONTIKI */
-+       list_remove(ctx->peers, peer);
-+#endif /* WITH_CONTIKI */
-+
-+       dtls_free_peer(peer);
-+       peer = NULL;
-+    }
-     if (!peer) {
-+      dtls_debug("creating new peer\n");
-       dtls_security_parameters_t *security;
-       /* msg contains a Client Hello with a valid cookie, so we can
-@@ -3594,6 +3644,7 @@ dtls_handle_message(dtls_context_t *ctx,
-   int data_length;            /* length of decrypted payload 
-                                  (without MAC and padding) */
-   int err;
-+  int bypass_epoch_check = 0;
-   /* check if we have DTLS state for addr/port/ifindex */
-   peer = dtls_get_peer(ctx, session);
-@@ -3613,6 +3664,15 @@ dtls_handle_message(dtls_context_t *ctx,
-     if (peer) {
-       data_length = decrypt_verify(peer, msg, rlen, &data);
-       if (data_length < 0) {
-+        if (hs_attempt_with_existing_peer(msg, rlen, peer)) {
-+          data = msg + DTLS_RH_LENGTH;
-+          data_length = rlen - DTLS_RH_LENGTH;
-+          state = DTLS_STATE_WAIT_CLIENTHELLO;
-+          role = DTLS_SERVER;
-+          /* Bypass epoch check as the epoch for incoming msg is 0
-+             and expected epoch MAY be different */
-+          bypass_epoch_check = 1;
-+        } else {
-       int err =  dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-         dtls_info("decrypt_verify() failed\n");
-       if (peer->state < DTLS_STATE_CONNECTED) {
-@@ -3623,8 +3683,10 @@ dtls_handle_message(dtls_context_t *ctx,
-       }
-         return err;
-       }
-+    } else {
-       role = peer->role;
-       state = peer->state;
-+      }
-     } else {
-       /* is_record() ensures that msg contains at least a record header */
-       data = msg + DTLS_RH_LENGTH;
-@@ -3677,7 +3739,7 @@ dtls_handle_message(dtls_context_t *ctx,
-       /* Handshake messages other than Finish must use the current
-        * epoch, Finish has epoch + 1. */
--      if (peer) {
-+      if (peer && !bypass_epoch_check) {
-       uint16_t expected_epoch = dtls_security_params(peer)->epoch;
-       uint16_t msg_epoch = 
-         dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->epoch);
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Adding-autoconf-generated-files-in-tinydtls-repo.patch b/extlibs/tinydtls/0001-Adding-autoconf-generated-files-in-tinydtls-repo.patch
deleted file mode 100644 (file)
index 263ed58..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-From b44aa20e0ff2763468bf82ff4e996dec03e872bd Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Thu, 2 Apr 2015 15:21:40 -0700
-Subject: [PATCH 1/1] Adding autoconf generated files in tinydtls repo
-
-tinydtls build system uses autotools while Iotivity uses
-scons build system. Since tinydtls contains few source files
-and header files, it seems  convenient for Iotivity to use
-scons to build tinydtls library.
-This patch is to add autoconf generated files so that tinydtls
-can be build using scons script.
-
-Note: Since this change is a custom change and specifically
-for Iotivity, I do not intend to submit this patch for
-upstreaming.
-
-Change-Id: I4da593a8abccd731466a88d365dca536f608c94a
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/dtls_config.h |  171 ++++++++++++++++++++++++++++++++++++++++
- extlibs/tinydtls/tinydtls.h    |   45 +++++++++++
- 2 files changed, 216 insertions(+)
- create mode 100644 extlibs/tinydtls/dtls_config.h
- create mode 100644 extlibs/tinydtls/tinydtls.h
-
-diff --git a/extlibs/tinydtls/dtls_config.h b/extlibs/tinydtls/dtls_config.h
-new file mode 100644
-index 0000000..39df8c9
---- /dev/null
-+++ b/extlibs/tinydtls/dtls_config.h
-@@ -0,0 +1,171 @@
-+/* dtls_config.h.  Generated from dtls_config.h.in by configure.  */
-+/* tinydtls -- a very basic DTLS implementation
-+ *
-+ * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
-+ * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person
-+ * obtaining a copy of this software and associated documentation
-+ * files (the "Software"), to deal in the Software without
-+ * restriction, including without limitation the rights to use, copy,
-+ * modify, merge, publish, distribute, sublicense, and/or sell copies
-+ * of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+/**
-+ * @file dtls_config.h
-+ * @brief internal configuration for tinydtls library
-+ *
-+ * This file has been generated by configure from dtls_config.h.in.
-+ */
-+
-+/* dummy definitions for PACKAGE_NAME and PACKAGE_VERSION */
-+#define PACKAGE_NAME "tinydtls"
-+#define PACKAGE_STRING "tinydtls 0.8.1"
-+#define PACKAGE_VERSION "0.8.1"
-+
-+#ifdef CONTIKI
-+#include "contiki.h"
-+#include "contiki-lib.h"
-+#include "contiki-net.h"
-+
-+#include "contiki-conf.h"
-+
-+/* global constants for constrained devices running Contiki */
-+#ifndef DTLS_PEER_MAX
-+/** The maximum number DTLS peers (i.e. sessions). */
-+#  define DTLS_PEER_MAX 1
-+#endif
-+
-+#ifndef DTLS_HANDSHAKE_MAX
-+/** The maximum number of concurrent DTLS handshakes. */
-+#  define DTLS_HANDSHAKE_MAX 1
-+#endif
-+
-+#ifndef DTLS_SECURITY_MAX
-+/** The maximum number of concurrently used cipher keys */
-+#  define DTLS_SECURITY_MAX (DTLS_PEER_MAX + DTLS_HANDSHAKE_MAX)
-+#endif
-+
-+#ifndef DTLS_HASH_MAX
-+/** The maximum number of hash functions that can be used in parallel. */
-+#  define DTLS_HASH_MAX (3 * DTLS_PEER_MAX)
-+#endif
-+#endif /* CONTIKI */
-+
-+/* Define to 1 if you have the <assert.h> header file. */
-+#define HAVE_ASSERT_H 1
-+
-+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-+   to 0 otherwise. */
-+#define HAVE_MALLOC 1
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if you have the `memset' function. */
-+#define HAVE_MEMSET 1
-+
-+/* Define to 1 if you have the <stddef.h> header file. */
-+#define HAVE_STDDEF_H 1
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the `strdup' function. */
-+#define HAVE_STRDUP 1
-+
-+/* Define to 1 if you have the `strerror' function. */
-+#define HAVE_STRERROR 1
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+#define HAVE_STRINGS_H 1
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strnlen' function. */
-+#define HAVE_STRNLEN 1
-+
-+/* Define to 1 if you have the <time.h> header file. */
-+#define HAVE_TIME_H 1
-+
-+/* Define to 1 if you have the `vprintf' function. */
-+#define HAVE_VPRINTF 1
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+#define PACKAGE_BUGREPORT ""
-+
-+/* Define to the full name of this package. */
-+#define PACKAGE_NAME "tinydtls"
-+
-+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "tinydtls 0.8.1"
-+
-+/* Define to the one symbol short name of this package. */
-+#define PACKAGE_TARNAME "tinydtls"
-+
-+/* Define to the home page for this package. */
-+#define PACKAGE_URL ""
-+
-+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.8.1"
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define to `__inline__' or `__inline' if that's what the C compiler
-+   calls it, or to nothing if 'inline' is not supported under any name.  */
-+#ifndef __cplusplus
-+/* #undef inline */
-+#endif
-+
-+/* Define to rpl_malloc if the replacement function should be used. */
-+/* #undef malloc */
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+
-+/* #undef size_t */
-+
-+/************************************************************************/
-+/* Specific Contiki platforms                                           */
-+/************************************************************************/
-+
-+#ifdef CONTIKI
-+
-+#if CONTIKI_TARGET_ECONOTAG
-+#  include "platform-specific/config-econotag.h"
-+#endif /* CONTIKI_TARGET_ECONOTAG */
-+
-+#ifdef CONTIKI_TARGET_CC2538DK
-+#  include "platform-specific/config-cc2538dk.h"
-+#endif /* CONTIKI_TARGET_CC2538DK */
-+
-+#ifdef CONTIKI_TARGET_WISMOTE
-+#  include "platform-specific/config-wismote.h"
-+#endif /* CONTIKI_TARGET_WISMOTE */
-+
-+#ifdef CONTIKI_TARGET_SKY
-+#  include "platform-specific/config-sky.h"
-+#endif /* CONTIKI_TARGET_SKY */
-+
-+#ifdef CONTIKI_TARGET_MINIMAL_NET
-+#  include "platform-specific/config-minimal-net.h"
-+#endif /* CONTIKI_TARGET_MINIMAL_NET */
-+
-+#endif /* CONTIKI */
-diff --git a/extlibs/tinydtls/tinydtls.h b/extlibs/tinydtls/tinydtls.h
-new file mode 100644
-index 0000000..3fa228a
---- /dev/null
-+++ b/extlibs/tinydtls/tinydtls.h
-@@ -0,0 +1,45 @@
-+/* tinydtls.h.  Generated from tinydtls.h.in by configure.  */
-+/* tinydtls -- a very basic DTLS implementation
-+ *
-+ * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
-+ * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
-+ *
-+ * Permission is hereby granted, free of charge, to any person
-+ * obtaining a copy of this software and associated documentation
-+ * files (the "Software"), to deal in the Software without
-+ * restriction, including without limitation the rights to use, copy,
-+ * modify, merge, publish, distribute, sublicense, and/or sell copies
-+ * of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+/**
-+ * @file tinydtls.h
-+ * @brief public tinydtls API
-+ */
-+
-+#ifndef _DTLS_TINYDTLS_H_
-+#define _DTLS_TINYDTLS_H_
-+
-+/** Defined to 1 if tinydtls is built with support for ECC */
-+/* #undef DTLS_ECC */
-+
-+/** Defined to 1 if tinydtls is built with support for PSK */
-+#define DTLS_PSK 1
-+
-+/** Defined to 1 if tinydtls is built for Contiki OS */
-+/* #undef WITH_CONTIKI */
-+
-+#endif /* _DTLS_TINYDTLS_H_ */
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Bug-Fix-in-earlier-rehandhsake-implementation.patch b/extlibs/tinydtls/0001-Bug-Fix-in-earlier-rehandhsake-implementation.patch
deleted file mode 100644 (file)
index c52b679..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-From e25d93dec6d2907430f3680ad5fbdfedc1ee94d8 Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Sun, 15 Feb 2015 22:16:43 -0800
-Subject: [PATCH 1/1] Bug Fix in earlier rehandhsake implementation
-
-Identified a corner case in earlier rehandshake implementation where if
-no data transfer takes place between client and Server before re-handshake
-is issued, re-handshake process was failing. DTLS state machine does not
-update it's state at Server until the first data packet was received from
-client. Updated logic to detect for 're-handshake' situation when epoch
-mis-match happens. Also updated dtls-client test app to conveniently test
-the feature. Use 'client:rehandshake' command for testing.
-
-Change-Id: Idfaad7d477508603c35ad7948ca7c8f05e3228d0
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/dtls.c              |   44 ++++++++++++++++++----------------
- extlibs/tinydtls/tests/dtls-client.c |   27 +++++++++++++++++++++
- 2 files changed, 50 insertions(+), 21 deletions(-)
-
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index a87d7f1..a923386 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -1562,6 +1562,7 @@ static void dtls_destroy_peer(dtls_context_t *ctx, dtls_peer_t *peer, int unlink
-  * \param ctx     The DTLS context.
-  * \param peer    The remote party we are talking to, if any.
-  * \param session Transport address of the remote peer.
-+ * \param state   Current state of the connection.
-  * \param msg     The received datagram.
-  * \param msglen  Length of \p msg.
-  * \return \c 1 if msg is a Client Hello with a valid cookie, \c 0 or
-@@ -3644,7 +3645,6 @@ dtls_handle_message(dtls_context_t *ctx,
-   int data_length;            /* length of decrypted payload 
-                                  (without MAC and padding) */
-   int err;
--  int bypass_epoch_check = 0;
-   /* check if we have DTLS state for addr/port/ifindex */
-   peer = dtls_get_peer(ctx, session);
-@@ -3668,24 +3668,21 @@ dtls_handle_message(dtls_context_t *ctx,
-           data = msg + DTLS_RH_LENGTH;
-           data_length = rlen - DTLS_RH_LENGTH;
-           state = DTLS_STATE_WAIT_CLIENTHELLO;
--          role = DTLS_SERVER;
--          /* Bypass epoch check as the epoch for incoming msg is 0
--             and expected epoch MAY be different */
--          bypass_epoch_check = 1;
-+          role = DTLS_SERVER;       
-         } else {
--      int err =  dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
--        dtls_info("decrypt_verify() failed\n");
--      if (peer->state < DTLS_STATE_CONNECTED) {
--        dtls_alert_send_from_err(ctx, peer, &peer->session, err);
--        peer->state = DTLS_STATE_CLOSED;
--        /* dtls_stop_retransmission(ctx, peer); */
--        dtls_destroy_peer(ctx, peer, 1);
--      }
--        return err;
--      }
--    } else {
--      role = peer->role;
--      state = peer->state;
-+        int err =  dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-+          dtls_info("decrypt_verify() failed\n");
-+        if (peer->state < DTLS_STATE_CONNECTED) {
-+          dtls_alert_send_from_err(ctx, peer, &peer->session, err);
-+          peer->state = DTLS_STATE_CLOSED;
-+          /* dtls_stop_retransmission(ctx, peer); */
-+          dtls_destroy_peer(ctx, peer, 1);
-+        }
-+          return err;
-+        }
-+      } else {
-+        role = peer->role;
-+        state = peer->state;
-       }
-     } else {
-       /* is_record() ensures that msg contains at least a record header */
-@@ -3739,7 +3736,7 @@ dtls_handle_message(dtls_context_t *ctx,
-       /* Handshake messages other than Finish must use the current
-        * epoch, Finish has epoch + 1. */
--      if (peer && !bypass_epoch_check) {
-+      if (peer) {
-       uint16_t expected_epoch = dtls_security_params(peer)->epoch;
-       uint16_t msg_epoch = 
-         dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->epoch);
-@@ -3754,9 +3751,14 @@ dtls_handle_message(dtls_context_t *ctx,
-       }
-       if (expected_epoch != msg_epoch) {
--        dtls_warn("Wrong epoch, expected %i, got: %i\n",
-+          if (hs_attempt_with_existing_peer(msg, rlen, peer)) {
-+            state = DTLS_STATE_WAIT_CLIENTHELLO;
-+            role = DTLS_SERVER;
-+          } else {
-+          dtls_warn("Wrong epoch, expected %i, got: %i\n",
-                   expected_epoch, msg_epoch);
--        break;
-+          break;
-+        }
-       }
-       }
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index 306a380..05cb98f 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -44,6 +44,7 @@ typedef struct {
- static dtls_str output_file = { 0, NULL }; /* output file name */
- static dtls_context_t *dtls_context = NULL;
-+static dtls_context_t *orig_dtls_context = NULL;
- static const unsigned char ecdsa_priv_key[] = {
-@@ -235,6 +236,7 @@ dtls_handle_read(struct dtls_context_t *ctx) {
- static void dtls_handle_signal(int sig)
- {
-   dtls_free_context(dtls_context);
-+  dtls_free_context(orig_dtls_context);
-   signal(sig, SIG_DFL);
-   kill(getpid(), sig);
- }
-@@ -324,6 +326,12 @@ static dtls_handler_t cb = {
- #define DTLS_CLIENT_CMD_CLOSE "client:close"
- #define DTLS_CLIENT_CMD_RENEGOTIATE "client:renegotiate"
-+/* As per RFC 6347 section 4.2.8, DTLS Server should support requests
-+ * from clients who have silently abandoned the existing association
-+ * and initiated a new handshake request by sending a ClientHello.
-+ * Below command tests this feature.
-+ */
-+#define DTLS_CLIENT_CMD_REHANDSHAKE "client:rehandshake"
- int 
- main(int argc, char **argv) {
-   fd_set rfds, wfds;
-@@ -504,6 +512,24 @@ main(int argc, char **argv) {
-       printf("client: renegotiate connection\n");
-       dtls_renegotiate(dtls_context, &dst);
-       len = 0;
-+      } else if (len >= strlen(DTLS_CLIENT_CMD_REHANDSHAKE) &&
-+               !memcmp(buf, DTLS_CLIENT_CMD_REHANDSHAKE, strlen(DTLS_CLIENT_CMD_REHANDSHAKE))) {
-+      printf("client: rehandshake connection\n");
-+      if (orig_dtls_context == NULL) {
-+        /* Cache the current context. We cannot free the current context as it will notify 
-+         * the Server to close the connection (which we do not want).
-+         */
-+        orig_dtls_context = dtls_context;
-+        /* Now, Create a new context and attempt to initiate a handshake. */
-+        dtls_context = dtls_new_context(&fd);
-+        if (!dtls_context) {
-+          dtls_emerg("cannot create context\n");
-+          exit(-1);
-+          }
-+        dtls_set_handler(dtls_context, &cb);
-+        dtls_connect(dtls_context, &dst);
-+      }
-+      len = 0;
-       } else {
-       try_send(dtls_context, &dst);
-       }
-@@ -511,6 +537,7 @@ main(int argc, char **argv) {
-   }
-   
-   dtls_free_context(dtls_context);
-+  dtls_free_context(orig_dtls_context);
-   exit(0);
- }
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Fix-the-wrong-implementation-about-the-anonymous-cip.patch b/extlibs/tinydtls/0001-Fix-the-wrong-implementation-about-the-anonymous-cip.patch
deleted file mode 100644 (file)
index e2b8e65..0000000
+++ /dev/null
@@ -1,690 +0,0 @@
-From 1ee27820ccad59423711c83fb01ff58939511f3b Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Mon, 29 Jun 2015 22:26:21 -0700
-Subject: [PATCH 1/1] Fix the wrong implementation about the anonymous cipher
- suite of tinydtls. (NOTE : This patch has been modified
- based on RFC 5246)
-
-1. IV for CBC block operation
-   - Apply the random IV for CBC block operations according to section 6.2.3.2 of RFC 5246.
-
-2. MAC calculation
-   - Apply HMAC for DTLS MAC calculation according to section 6.2.3.1 of RFC 5246.
-
-3. CBC padding
-   - Apply PKCS#5 padding for CBC block cipher accroding to section 6.2.3.2 of RFC 5246.
-
-4. Change the cipher suite name TLS_ECDH_anon_WITH_AES_128_CBC_SHA
-   to TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256.
-
-5. Fix the minor bug in dtls sample.
-
-Change-Id: I8783caa6ac04fe2d46e242efe56e3205646b1038
-Signed-off-by: leechul <chuls.lee@samsung.com>
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/crypto.c                          |  100 +++++++++++++-----
- extlibs/tinydtls/crypto.h                          |    1 +
- extlibs/tinydtls/dtls.c                            |  111 +++++++++++++++-----
- extlibs/tinydtls/dtls.h                            |    6 +-
- extlibs/tinydtls/global.h                          |    2 +-
- extlibs/tinydtls/tests/dtls-client.c               |    8 +-
- extlibs/tinydtls/tests/dtls-server.c               |    8 +-
- resource/csdk/connectivity/api/cainterface.h       |    4 +-
- resource/csdk/connectivity/inc/caadapternetdtls.h  |    2 +-
- .../src/adapter_util/caadapternetdtls.c            |    2 +-
- .../provisioning/src/provisioningmanager.c         |    2 +-
- 11 files changed, 180 insertions(+), 66 deletions(-)
-
-diff --git a/extlibs/tinydtls/crypto.c b/extlibs/tinydtls/crypto.c
-index 5082535..3fbb993 100644
---- a/extlibs/tinydtls/crypto.c
-+++ b/extlibs/tinydtls/crypto.c
-@@ -58,6 +58,7 @@
- #include "sha2/sha2.h"
- #include "prng.h"
- #include "netq.h"
-+#include "hmac.h"
- #ifndef WITH_CONTIKI
- #include <pthread.h>
-@@ -329,6 +330,7 @@ dtls_ccm_decrypt(aes128_t *ccm_ctx, const unsigned char *src,
- static size_t
- dtls_cbc_encrypt(aes128_t *aes_ctx,
-+                 unsigned char *key, size_t keylen,
-                  const unsigned char *iv,
-                  const unsigned char *src, size_t srclen,
-                  unsigned char *buf) {
-@@ -336,18 +338,35 @@ dtls_cbc_encrypt(aes128_t *aes_ctx,
-     unsigned char cbc[DTLS_BLK_LENGTH];
-     unsigned char tmp[DTLS_BLK_LENGTH];
-     unsigned char *pos;
--    dtls_hash_ctx shactx;
-+    const unsigned char *dtls_hdr = NULL;
-     int i, j;
-     int blocks;
-+    dtls_hmac_context_t* hmac_ctx = NULL;
-+    int paddinglen = 0;
-     pos = buf;
--    dtls_hash_init(&shactx);
--    dtls_hash_update(&shactx, src, srclen);
--    dtls_hash_finalize(pos + srclen, &shactx);
-+    dtls_hdr = src - DTLS_CBC_IV_LENGTH - sizeof(dtls_record_header_t);
-+
-+    //Calculate MAC : Append the MAC code to end of content
-+    hmac_ctx = dtls_hmac_new(key, keylen);
-+    dtls_mac(hmac_ctx,
-+             dtls_hdr,
-+             src, srclen,
-+             buf + srclen);
-+    dtls_hmac_free(hmac_ctx);
-+    
-+    dtls_debug_dump("[MAC]",
-+                    buf + srclen,
-+                    DTLS_HMAC_DIGEST_SIZE);
-+
-+    paddinglen = DTLS_BLK_LENGTH - ((srclen + DTLS_HMAC_DIGEST_SIZE) % DTLS_BLK_LENGTH);
-+    
-+    //TLS padding
-+    memset(buf + (srclen + DTLS_HMAC_DIGEST_SIZE), paddinglen - 1, paddinglen);
-     memcpy(cbc, iv, DTLS_BLK_LENGTH);
--    blocks = (srclen + SHA256_DIGEST_LENGTH) / DTLS_BLK_LENGTH;
-+    blocks = (srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen) / DTLS_BLK_LENGTH;
-     for (i = 0; i < blocks; i++) {
-         for (j = 0; j < DTLS_BLK_LENGTH; j++) {
-@@ -360,14 +379,17 @@ dtls_cbc_encrypt(aes128_t *aes_ctx,
-         pos += DTLS_BLK_LENGTH;
-     }
--    dtls_debug_dump("Encrypted Data:", buf, srclen + SHA256_DIGEST_LENGTH);
--
--    return srclen + SHA256_DIGEST_LENGTH;
-+    dtls_debug_dump("[Encrypted Data]",
-+                    buf,
-+                    srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen);
-+    
-+    return srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen;
- }
- static size_t
- dtls_cbc_decrypt(aes128_t *aes_ctx,
-+                 unsigned char *key, size_t keylen,
-                  const unsigned char *iv,
-                  const unsigned char *src, size_t srclen,
-                  unsigned char *buf) {
-@@ -375,14 +397,17 @@ dtls_cbc_decrypt(aes128_t *aes_ctx,
-     unsigned char cbc[DTLS_BLK_LENGTH];
-     unsigned char tmp[DTLS_BLK_LENGTH];
-     unsigned char tmp2[DTLS_BLK_LENGTH];
--    unsigned char msg_hash[SHA256_DIGEST_LENGTH];
-+    unsigned char mac_buf[DTLS_HMAC_DIGEST_SIZE] = {0,};
-+    const unsigned char *dtls_hdr = NULL;
-     unsigned char *pos;
--    dtls_hash_ctx shactx;
-     int i, j;
-     int blocks;
-+    int depaddinglen = 0;
-+    dtls_hmac_context_t* hmac_ctx = NULL;
-     pos = buf;
--    memcpy(pos, src, srclen);
-+
-+    dtls_hdr = src - DTLS_CBC_IV_LENGTH - sizeof(dtls_record_header_t);
-     memcpy(cbc, iv, DTLS_BLK_LENGTH);
-     blocks = srclen / DTLS_BLK_LENGTH;
-@@ -401,19 +426,46 @@ dtls_cbc_decrypt(aes128_t *aes_ctx,
-         pos += DTLS_BLK_LENGTH;
-     }
--    dtls_hash_init(&shactx);
--    dtls_hash_update(&shactx, buf, srclen - SHA256_DIGEST_LENGTH);
--    dtls_hash_finalize(msg_hash, &shactx);
--
--    dtls_debug_dump("decrypted data:", buf, srclen);
-+    //de-padding
-+    depaddinglen = buf[srclen -1];
--    if(memcmp(msg_hash, buf + (srclen - SHA256_DIGEST_LENGTH), SHA256_DIGEST_LENGTH) != 0)
-+    //Calculate MAC
-+    hmac_ctx = dtls_hmac_new(key, keylen);
-+    if(!hmac_ctx) {
-+        return -1;
-+    }
-+    dtls_mac(hmac_ctx, dtls_hdr, buf,
-+             srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1,
-+             mac_buf);
-+    dtls_hmac_free(hmac_ctx);
-+
-+    dtls_debug_dump("[MAC]",
-+                    mac_buf,
-+                    DTLS_HMAC_DIGEST_SIZE);
-+    dtls_debug_dump("[Decrypted data]",
-+                    buf,
-+                    srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1);
-+
-+    //verify the MAC
-+    if(memcmp(mac_buf,
-+              buf + (srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1),
-+              DTLS_HMAC_DIGEST_SIZE) != 0)
-     {
--        dtls_warn("message is broken\n");
-+        dtls_crit("Failed to verification of MAC\n");
-         return -1;
-     }
--    return srclen - SHA256_DIGEST_LENGTH;
-+    //verify the padding bytes
-+    for (i =0; i < depaddinglen; i++)
-+    {
-+        if (buf[srclen - depaddinglen - 1 + i] != depaddinglen)
-+        {
-+            dtls_crit("Failed to verify padding bytes\n");
-+            return -1;
-+        }
-+    }
-+
-+    return srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1;
- }
- #ifdef DTLS_PSK
-@@ -523,8 +575,6 @@ void
- dtls_ecdsa_create_sig_hash(const unsigned char *priv_key, size_t key_size,
-                          const unsigned char *sign_hash, size_t sign_hash_size,
-                          uint32_t point_r[9], uint32_t point_s[9]) {
--  int ret;
--
-   uint8_t privateKey[32];
-   uint8_t hashValue[32];
-   uint8_t sign[64];
-@@ -615,7 +665,7 @@ dtls_encrypt(const unsigned char *src, size_t length,
-         memmove(buf, src, length);
-       ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la);
-   }
--  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA) {
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256) {
-       ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-       if (ret < 0) {
-         /* cleanup everything in case the key has the wrong size */
-@@ -625,7 +675,7 @@ dtls_encrypt(const unsigned char *src, size_t length,
-       if (src != buf)
-         memmove(buf, src, length);
--      ret = dtls_cbc_encrypt(&ctx->data, nounce, src, length, buf);
-+      ret = dtls_cbc_encrypt(&ctx->data, key, keylen, nounce, src, length, buf);
-   }
- error:
-@@ -658,7 +708,7 @@ dtls_decrypt(const unsigned char *src, size_t length,
-       ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la);
-   }
--  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA) {
-+  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256) {
-       ret = rijndael_set_key(&ctx->data.ctx, key, 8 * keylen);
-       if (ret < 0) {
-         /* cleanup everything in case the key has the wrong size */
-@@ -668,7 +718,7 @@ dtls_decrypt(const unsigned char *src, size_t length,
-       if (src != buf)
-         memmove(buf, src, length);
--      ret = dtls_cbc_decrypt(&ctx->data, nounce, src, length, buf);
-+      ret = dtls_cbc_decrypt(&ctx->data, key, keylen, nounce, src, length, buf);
-     }
- error:
-diff --git a/extlibs/tinydtls/crypto.h b/extlibs/tinydtls/crypto.h
-index dd13ffa..a81d306 100644
---- a/extlibs/tinydtls/crypto.h
-+++ b/extlibs/tinydtls/crypto.h
-@@ -46,6 +46,7 @@
- #define DTLS_BLK_LENGTH        16 /* AES-128 */
- #define DTLS_MAC_LENGTH        DTLS_HMAC_DIGEST_SIZE
- #define DTLS_IV_LENGTH         4  /* length of nonce_explicit */
-+#define DTLS_CBC_IV_LENGTH     16
- /** 
-  * Maximum size of the generated keyblock. Note that MAX_KEYBLOCK_LENGTH must 
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index 41e68a5..b5b8fd1 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -496,11 +496,11 @@ static inline int is_tls_psk_with_aes_128_ccm_8(dtls_cipher_t cipher)
- #endif /* DTLS_PSK */
- }
--/** returns true if the cipher matches TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
--static inline int is_tls_ecdh_anon_with_aes_128_cbc_sha(dtls_cipher_t cipher)
-+/** returns true if the cipher matches TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 */
-+static inline int is_tls_ecdh_anon_with_aes_128_cbc_sha_256(dtls_cipher_t cipher)
- {
- #ifdef DTLS_ECC
--    return cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+    return cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256;
- #else
-     return 0;
- #endif
-@@ -570,7 +570,7 @@ known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-   return (psk && is_tls_psk_with_aes_128_ccm_8(code)) ||
-        (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code)) ||
--       (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha(code));
-+       (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha_256(code));
- }
- /**
-@@ -719,7 +719,7 @@ calculate_key_block(dtls_context_t *ctx,
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
-   case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
--  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA: {
-+  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-     pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecc.own_eph_priv,
-                                                handshake->keyx.ecc.other_eph_pub_x,
-                                                handshake->keyx.ecc.other_eph_pub_y,
-@@ -1084,7 +1084,7 @@ check_client_keyexchange(dtls_context_t *ctx,
- #ifdef DTLS_ECC
-   if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) ||
--       is_tls_ecdh_anon_with_aes_128_cbc_sha(handshake->cipher) ) {
-+       is_tls_ecdh_anon_with_aes_128_cbc_sha_256(handshake->cipher) ) {
-     if (length < DTLS_HS_LENGTH + DTLS_CKXEC_LENGTH) {
-       dtls_debug("The client key exchange is too short\n");
-@@ -1286,6 +1286,51 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-       p += data_len_array[i];
-       res += data_len_array[i];
-     }
-+  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher)) {
-+
-+    unsigned char nonce[DTLS_CBC_IV_LENGTH];
-+
-+    /** Add IV into body of packet in case of AES CBC mode according to RFC 5246, Section 6.2.3.2
-+     *
-+     *    opaque IV[SecurityParameters.record_iv_length];
-+     *    block-ciphered struct {
-+     *        opaque content[TLSCompressed.length];
-+     *        opaque MAC[SecurityParameters.mac_length];
-+     *        uint8 padding[GenericBlockCipher.padding_length];
-+     *        uint8 padding_length;
-+     * };
-+     *
-+     */
-+
-+    res = 0;
-+    dtls_prng(nonce, DTLS_CBC_IV_LENGTH);
-+    memcpy(p , nonce, DTLS_CBC_IV_LENGTH);
-+    p += DTLS_CBC_IV_LENGTH;
-+    res += DTLS_CBC_IV_LENGTH;
-+
-+    for (i = 0; i < data_array_len; i++) {
-+        /* check the minimum that we need for packets that are not encrypted */
-+        if (*rlen < res + DTLS_RH_LENGTH + data_len_array[i]) {
-+            dtls_debug("dtls_prepare_record: send buffer too small\n");
-+            return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+        }
-+
-+        memcpy(p, data_array[i], data_len_array[i]);
-+        p += data_len_array[i];
-+        res += data_len_array[i];
-+     }
-+
-+     res = dtls_encrypt(start + DTLS_CBC_IV_LENGTH, res - DTLS_CBC_IV_LENGTH,
-+               start + DTLS_CBC_IV_LENGTH, nonce,
-+               dtls_kb_local_write_key(security, peer->role),
-+               dtls_kb_key_size(security, peer->role),
-+               NULL, 0,
-+               security->cipher);
-+     if (res < 0)
-+       return res;
-+
-+     res += DTLS_CBC_IV_LENGTH;
-+
-   } else { /* TLS_PSK_WITH_AES_128_CCM_8 or TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */   
-     /** 
-      * length of additional_data for the AEAD cipher which consists of
-@@ -1299,8 +1344,6 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-       dtls_debug("dtls_prepare_record(): encrypt using TLS_PSK_WITH_AES_128_CCM_8\n");
-     } else if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(security->cipher)) {
-       dtls_debug("dtls_prepare_record(): encrypt using TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n");
--    } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha(security->cipher)) {
--        dtls_debug("dtls_prepare_record() : encrypt using TLS_ECDH_anon_WITH_AES_128_CBC_SHA\n");
-     } else {
-       dtls_debug("dtls_prepare_record(): encrypt using unknown cipher\n");
-     }
-@@ -1363,7 +1406,7 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-     memset(nonce, 0, DTLS_CCM_BLOCKSIZE);
-     memcpy(nonce, dtls_kb_local_iv(security, peer->role),
--         dtls_kb_iv_size(security, peer->role));
-+        dtls_kb_iv_size(security, peer->role));
-     memcpy(nonce + dtls_kb_iv_size(security, peer->role), start, 8); /* epoch + seq_num */
-     dtls_debug_dump("nonce:", nonce, DTLS_CCM_BLOCKSIZE);
-@@ -1378,7 +1421,8 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-     memcpy(A_DATA, &DTLS_RECORD_HEADER(sendbuf)->epoch, 8); /* epoch and seq_num */
-     memcpy(A_DATA + 8,  &DTLS_RECORD_HEADER(sendbuf)->content_type, 3); /* type and version */
-     dtls_int_to_uint16(A_DATA + 11, res - 8); /* length */
--    
-+
-+
-     res = dtls_encrypt(start + 8, res - 8, start + 8, nonce,
-                dtls_kb_local_write_key(security, peer->role),
-                dtls_kb_key_size(security, peer->role),
-@@ -1388,7 +1432,7 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-     if (res < 0)
-       return res;
--    res += 8;                 /* increment res by size of nonce_explicit */
-+    res += 8; /* increment res by size of nonce_explicit */
-     dtls_debug_dump("message:", start, res);
-   }
-@@ -2172,7 +2216,7 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-   }
-   ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
--  ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher);
-+  ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
- #ifdef DTLS_ECC
-   if(ecdh_anon) {
-@@ -2301,7 +2345,7 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
-   case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
--  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA: {
-+  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-     uint8 *ephemeral_pub_x;
-     uint8 *ephemeral_pub_y;
-@@ -2424,7 +2468,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-       case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-         ecdsa = is_ecdsa_supported(ctx, 1);
-         break;
--      case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
-+      case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-         ecdh_anon = is_ecdh_anon_supported(ctx);
-         break;
-       default:
-@@ -2478,7 +2522,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-   p += sizeof(uint16);
-   if (ecdh_anon) {
--    dtls_int_to_uint16(p, TLS_ECDH_anon_WITH_AES_128_CBC_SHA);
-+    dtls_int_to_uint16(p, TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256);
-     p += sizeof(uint16);
-   }
-   if (psk) {
-@@ -2809,7 +2853,7 @@ check_server_key_exchange_ecdh(dtls_context_t *ctx,
-   update_hs_hash(peer, data, data_length);
--  assert(is_tls_ecdh_anon_with_aes_128_cbc_sha(config->cipher));
-+  assert(is_tls_ecdh_anon_with_aes_128_cbc_sha_256(config->cipher));
-   data += DTLS_HS_LENGTH;
-@@ -3069,6 +3113,23 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-   if (security->cipher == TLS_NULL_WITH_NULL_NULL) {
-     /* no cipher suite selected */
-     return clen;
-+  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher)) {
-+
-+    unsigned char nonce[DTLS_CBC_IV_LENGTH];
-+
-+    if (clen < (DTLS_CBC_IV_LENGTH + DTLS_HMAC_DIGEST_SIZE))          /* need at least IV and MAC */
-+      return -1;
-+
-+    memcpy(nonce, *cleartext , DTLS_CBC_IV_LENGTH);
-+    clen -= DTLS_CBC_IV_LENGTH;
-+    *cleartext += DTLS_CBC_IV_LENGTH ;
-+
-+    clen = dtls_decrypt(*cleartext, clen, *cleartext, nonce,
-+                     dtls_kb_remote_write_key(security, peer->role),
-+                     dtls_kb_key_size(security, peer->role),
-+                     NULL, 0,
-+                     security->cipher);
-+
-   } else { /* TLS_PSK_WITH_AES_128_CCM_8 or TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */
-     /** 
-      * length of additional_data for the AEAD cipher which consists of
-@@ -3083,7 +3144,7 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-     memset(nonce, 0, DTLS_CCM_BLOCKSIZE);
-     memcpy(nonce, dtls_kb_remote_iv(security, peer->role),
--         dtls_kb_iv_size(security, peer->role));
-+        dtls_kb_iv_size(security, peer->role));
-     /* read epoch and seq_num from message */
-     memcpy(nonce + dtls_kb_iv_size(security, peer->role), *cleartext, 8);
-@@ -3108,17 +3169,19 @@ decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-                      dtls_kb_remote_write_key(security, peer->role),
-                      dtls_kb_key_size(security, peer->role),
-                      A_DATA, A_DATA_LEN,
--               security->cipher);
--    if (clen < 0)
--      dtls_warn("decryption failed\n");
--    else {
-+                     security->cipher);
-+  }
-+
-+  if (clen < 0)
-+    dtls_warn("decryption failed\n");
-+  else {
- #ifndef NDEBUG
-       dtls_debug("decrypt_verify(): found %i bytes cleartext\n", clen);
- #endif
-       dtls_security_params_free_other(peer);
-       dtls_debug_dump("cleartext", *cleartext, clen);
--    }
-   }
-+
-   return clen;
- }
-@@ -3219,7 +3282,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher))
-       peer->state = DTLS_STATE_WAIT_SERVERCERTIFICATE; //ecdsa
--    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher))
-+    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher))
-         peer->state = DTLS_STATE_WAIT_SERVERKEYEXCHANGE; //ecdh
-     else
-       peer->state = DTLS_STATE_WAIT_SERVERHELLODONE; //psk
-@@ -3259,7 +3322,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-       err = check_server_key_exchange_ecdsa(ctx, peer, data, data_length);
-     }
--    if (is_tls_ecdh_anon_with_aes_128_cbc_sha(peer->handshake_params->cipher)) {
-+    if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher)) {
-       if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-         return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-       }
-diff --git a/extlibs/tinydtls/dtls.h b/extlibs/tinydtls/dtls.h
-index a2ab86e..7d2bc19 100644
---- a/extlibs/tinydtls/dtls.h
-+++ b/extlibs/tinydtls/dtls.h
-@@ -238,7 +238,7 @@ typedef struct dtls_context_t {
-   dtls_handler_t *h;          /**< callback handlers */
--  dtls_cipher_enable_t is_anon_ecdh_eabled;    /**< enable/disable the TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
-+  dtls_cipher_enable_t is_anon_ecdh_eabled;    /**< enable/disable the TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 */
-   dtls_cipher_t selected_cipher; /**< selected ciper suite for handshake */
-@@ -268,7 +268,7 @@ static inline void dtls_set_handler(dtls_context_t *ctx, dtls_handler_t *h) {
- }
-  /**
--  * @brief Enabling the TLS_ECDH_anon_WITH_AES_128_CBC_SHA
-+  * @brief Enabling the TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256
-   *
-   * @param ctx              The DTLS context to use.
-   * @param is_enable    DTLS_CIPHER_ENABLE(1) or DTLS_CIPHER_DISABLE(0)
-@@ -279,7 +279,7 @@ void dtls_enables_anon_ecdh(dtls_context_t* ctx, dtls_cipher_enable_t is_enable)
-  * @brief Select the cipher suite for handshake
-  *
-  * @param ctx              The DTLS context to use.
-- * @param cipher         TLS_ECDH_anon_WITH_AES_128_CBC_SHA (0xC018)
-+ * @param cipher         TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 (0xC018)
-  *                                  TLS_PSK_WITH_AES_128_CCM_8 (0xX0A8)
-  *                                  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 (0xC0AE)
-  */
-diff --git a/extlibs/tinydtls/global.h b/extlibs/tinydtls/global.h
-index 441710f..169c726 100644
---- a/extlibs/tinydtls/global.h
-+++ b/extlibs/tinydtls/global.h
-@@ -73,7 +73,7 @@ typedef unsigned char uint48[6];
- /** Known cipher suites.*/
- typedef enum { 
-   TLS_NULL_WITH_NULL_NULL = 0x0000,   /**< NULL cipher  */
--  TLS_ECDH_anon_WITH_AES_128_CBC_SHA = 0xC018, /**< see RFC 4492 */
-+  TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 = 0xC018, /**< see RFC 4492 */
-   TLS_PSK_WITH_AES_128_CCM_8 = 0xC0A8, /**< see RFC 6655 */
-   TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xC0AE /**< see RFC 7251 */
- } dtls_cipher_t;
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index 35521e9..dfc822a 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -309,7 +309,7 @@ usage( const char *program, const char *version) {
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-           "\t-c num\t\tcipher suite (default: 1)\n"
--          "\t\t\t1: TLS_ECDH_anon_WITH_AES_128_CBC_SHA \n"
-+          "\t\t\t1: TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 \n"
-           "\t\t\t2: TLS_PSK_WITH_AES_128_CCM_8\n"
-           "\t\t\t3: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n",
-          program, version, program, DEFAULT_PORT);
-@@ -347,7 +347,7 @@ main(int argc, char **argv) {
-   log_t log_level = DTLS_LOG_WARN;
-   int fd, result;
-   int on = 1;
--  dtls_cipher_t selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+  dtls_cipher_t selected_cipher = TLS_NULL_WITH_NULL_NULL;
-   dtls_cipher_enable_t ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-   int opt, res;
-   session_t dst;
-@@ -417,7 +417,7 @@ main(int argc, char **argv) {
-     case 'c':
-       if( strcmp(optarg, "1") == 0)
-       {
--          selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA;
-+          selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256;
-           ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-       }
-       else if( strcmp(optarg, "2") == 0)
-@@ -500,7 +500,7 @@ main(int argc, char **argv) {
-   /* select cipher suite */
-   dtls_select_cipher(dtls_context, selected_cipher);
--  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha */
-+  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha_256 */
-   dtls_enables_anon_ecdh(dtls_context, ecdh_anon_enalbe);
-   dtls_set_handler(dtls_context, &cb);
-diff --git a/extlibs/tinydtls/tests/dtls-server.c b/extlibs/tinydtls/tests/dtls-server.c
-index d3da1a7..5893084 100644
---- a/extlibs/tinydtls/tests/dtls-server.c
-+++ b/extlibs/tinydtls/tests/dtls-server.c
-@@ -254,8 +254,8 @@ usage(const char *program, const char *version) {
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-         "\t-a enable|disable\t(default: disable)\n"
--        "\t\t\t\tenable:enable TLS_ECDH_anon_with_AES_128_CBC_SHA\n"
--        "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA\n",
-+        "\t\t\t\tenable:enable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n"
-+        "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n",
-          program, version, program, DEFAULT_PORT);
- }
-@@ -280,7 +280,7 @@ main(int argc, char **argv) {
-   struct timeval timeout;
-   int fd, opt, result;
-   int on = 1;
--  int ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-+  dtls_cipher_enable_t ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-   struct sockaddr_in6 listen_addr;
-   memset(&listen_addr, 0, sizeof(struct sockaddr_in6));
-@@ -356,7 +356,7 @@ main(int argc, char **argv) {
-   the_context = dtls_new_context(&fd);
--  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha */
-+  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha_256 */
-   dtls_enables_anon_ecdh(the_context, ecdh_anon_enalbe);
-   dtls_set_handler(the_context, &cb);
-diff --git a/resource/csdk/connectivity/api/cainterface.h b/resource/csdk/connectivity/api/cainterface.h
-index 760df09..2f10fd5 100644
---- a/resource/csdk/connectivity/api/cainterface.h
-+++ b/resource/csdk/connectivity/api/cainterface.h
-@@ -290,7 +290,7 @@ CAResult_t CAHandleRequestResponse();
-  * Select the cipher suite for dtls handshake
-  *
-  * @param[IN] cipher  cipher suite (Note : Make sure endianness)
-- *                               0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA
-+ *                               0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256
-  *                               0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8
-  *                               0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
-  *
-@@ -301,7 +301,7 @@ CAResult_t CAHandleRequestResponse();
- CAResult_t CASelectCipherSuite(const uint16_t cipher);
- /**
-- * Enable TLS_ECDH_anon_WITH_AES_128_CBC_SHA cipher suite in dtls
-+ * Enable TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 cipher suite in dtls
-  *
-  * @param[IN] enable  TRUE/FALSE enables/disables anonymous cipher suite
-  *
-diff --git a/resource/csdk/connectivity/inc/caadapternetdtls.h b/resource/csdk/connectivity/inc/caadapternetdtls.h
-index f9f99d8..274321e 100644
---- a/resource/csdk/connectivity/inc/caadapternetdtls.h
-+++ b/resource/csdk/connectivity/inc/caadapternetdtls.h
-@@ -160,7 +160,7 @@ void CADTLSSetCredentialsCallback(CAGetDTLSCredentialsHandler credCallback);
-  * Select the cipher suite for dtls handshake
-  *
-  * @param[in] cipher    cipher suite
-- *                             0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA
-+ *                             0xC018 : TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256
-  *                             0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8
-  *                             0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
-  *
-diff --git a/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c b/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
-index 8f01c06..6fd83e8 100644
---- a/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
-+++ b/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
-@@ -598,7 +598,7 @@ CAResult_t CADtlsEnableAnonECDHCipherSuite(const bool enable)
-     dtls_enables_anon_ecdh(g_caDtlsContext->dtlsContext,
-         enable == true ? DTLS_CIPHER_ENABLE : DTLS_CIPHER_DISABLE);
-     ca_mutex_unlock(g_dtlsContextMutex);
--    OIC_LOG_V(DEBUG, NET_DTLS_TAG, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA  is %s",
-+    OIC_LOG_V(DEBUG, NET_DTLS_TAG, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256  is %s",
-         enable ? "enabled" : "disabled");
-     OIC_LOG(DEBUG, NET_DTLS_TAG, "OUT CADtlsEnablesAnonEcdh");
-diff --git a/resource/csdk/security/provisioning/src/provisioningmanager.c b/resource/csdk/security/provisioning/src/provisioningmanager.c
-index defe4e6..301614d 100644
---- a/resource/csdk/security/provisioning/src/provisioningmanager.c
-+++ b/resource/csdk/security/provisioning/src/provisioningmanager.c
-@@ -1031,7 +1031,7 @@ static SPResult updateOperationMode(unsigned short timeout, SPTargetDeviceInfo_t
-  */
- static SPResult initiateDtlsHandshake(const SPTargetDeviceInfo_t *deviceInfo)
- {
--    CAResult_t caresult = CASelectCipherSuite(TLS_ECDH_anon_WITH_AES_128_CBC_SHA);
-+    CAResult_t caresult = CASelectCipherSuite(TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256);
-     if (CA_STATUS_OK != caresult)
-     {
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Fixed-issue-to-pass-PSK-identity-hint-to-application.patch b/extlibs/tinydtls/0001-Fixed-issue-to-pass-PSK-identity-hint-to-application.patch
deleted file mode 100644 (file)
index 343c891..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From 116451f8fab0df90e87d394d1fa1ac9e739c7dbe Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Tue, 20 Jan 2015 15:57:40 -0800
-Subject: [PATCH 1/1] Fixed issue to pass PSK identity hint to application in
- callback
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In cases (with PSK ciphersuite) where Server is sending
-'PSK Identity Hint’ inside ServerKeyExchange message, DTLS library
-is not passing the â€˜identity hint’ inside â€˜desc’ argument in
-get_psk_info(DTLS_PSK_KEY, desc) callback. Instead, â€˜desc’ contains
-the identity of the client itself. The reason for this is that the
-code inside dtls_send_client_key_exchange() method
-overwrites the â€˜identity hint’ received earlier.
-
-Change-Id: Ibf447e3a6b33284118908a52aed4cf636038ab23
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/dtls.c |   17 +++++++----------
- 1 file changed, 7 insertions(+), 10 deletions(-)
-
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index 92222eb..9090f22 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -2164,6 +2164,7 @@ static int
- dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
- {
-   uint8 buf[DTLS_CKXEC_LENGTH];
-+  uint8 client_id[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-   uint8 *p;
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-@@ -2175,28 +2176,24 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-     int len;
-     len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_IDENTITY,
--             handshake->keyx.psk.identity, handshake->keyx.psk.id_length,
--             buf + sizeof(uint16),
--             min(sizeof(buf) - sizeof(uint16),
--                 sizeof(handshake->keyx.psk.identity)));
-+               NULL, 0,
-+               client_id,
-+               sizeof(client_id));
-     if (len < 0) {
-       dtls_crit("no psk identity set in kx\n");
-       return len;
-     }
-     if (len + sizeof(uint16) > DTLS_CKXEC_LENGTH) {
--      memset(&handshake->keyx.psk, 0, sizeof(dtls_handshake_parameters_psk_t));
-       dtls_warn("the psk identity is too long\n");
-       return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-     }
--    handshake->keyx.psk.id_length = (unsigned int)len;
--    memcpy(handshake->keyx.psk.identity, p + sizeof(uint16), len);
--    dtls_int_to_uint16(p, handshake->keyx.psk.id_length);
-+    dtls_int_to_uint16(p, len);
-     p += sizeof(uint16);
--    memcpy(p, handshake->keyx.psk.identity, handshake->keyx.psk.id_length);
--    p += handshake->keyx.psk.id_length;
-+    memcpy(p, client_id, len);
-+    p += len;
-     break;
-   }
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-Updated-tinyDTLS-test-apps-to-use-identity-hint.patch b/extlibs/tinydtls/0001-Updated-tinyDTLS-test-apps-to-use-identity-hint.patch
deleted file mode 100644 (file)
index 4470e1a..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-From 6b26519bea04167b9cf68069bf641af4651c87e0 Mon Sep 17 00:00:00 2001
-From: Sachin Agrawal <sachin.agrawal@intel.com>
-Date: Thu, 26 Feb 2015 09:28:06 -0800
-Subject: [PATCH 1/1] Updated tinyDTLS test apps to use identity hint
-
-dtls-server test is updated to pass 'psk hint' to tinyDTLS library so that
-it can send ServerKeyExchange packet. Similarly, dtls-client test
-is updated to retrieve PSK specific for the server whose identity was
-received via 'psk hint' packet.
-
-Change-Id: Ifba720f1505ed6afbf56dfc179d98790176ce0b0
-Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
----
- extlibs/tinydtls/tests/dtls-client.c |   45 ++++++++++++++++++++++------------
- extlibs/tinydtls/tests/dtls-server.c |   43 +++++++++++++++++++++-----------
- 2 files changed, 59 insertions(+), 29 deletions(-)
-
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index 96ed0fa..65b0275 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -22,9 +22,10 @@
- #define DEFAULT_PORT 20220
--#define PSK_DEFAULT_IDENTITY "Client_identity"
-+#define PSK_CLIENT_IDENTITY  "Client_identity"
-+#define PSK_SERVER_IDENTITY  "Server_identity"
- #define PSK_DEFAULT_KEY      "secretPSK"
--#define PSK_OPTIONS          "i:k:"
-+#define PSK_OPTIONS          "i:s:k:"
- #ifdef __GNUC__
- #define UNUSED_PARAM __attribute__((unused))
-@@ -93,8 +94,10 @@ read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
- /* The PSK information for DTLS */
- #define PSK_ID_MAXLEN 256
- #define PSK_MAXLEN 256
--static unsigned char psk_id[PSK_ID_MAXLEN];
--static size_t psk_id_length = 0;
-+static unsigned char psk_client_id[PSK_ID_MAXLEN];
-+static size_t psk_client_id_length = 0;
-+static unsigned char psk_server_id[PSK_ID_MAXLEN];
-+static size_t psk_server_id_length = 0;
- static unsigned char psk_key[PSK_MAXLEN];
- static size_t psk_key_length = 0;
-@@ -114,15 +117,15 @@ get_psk_info(struct dtls_context_t *ctx UNUSED_PARAM,
-       dtls_debug("got psk_identity_hint: '%.*s'\n", id_len, id);
-     }
--    if (result_length < psk_id_length) {
-+    if (result_length < psk_client_id_length) {
-       dtls_warn("cannot set psk_identity -- buffer too small\n");
-       return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-     }
--    memcpy(result, psk_id, psk_id_length);
--    return psk_id_length;
-+    memcpy(result, psk_client_id, psk_client_id_length);
-+    return psk_client_id_length;
-   case DTLS_PSK_KEY:
--    if (id_len != psk_id_length || memcmp(psk_id, id, id_len) != 0) {
-+    if (id_len != psk_server_id_length || memcmp(psk_server_id, id, id_len) != 0) {
-       dtls_warn("PSK for unknown id requested, exiting\n");
-       return dtls_alert_fatal_create(DTLS_ALERT_ILLEGAL_PARAMETER);
-     } else if (result_length < psk_key_length) {
-@@ -291,12 +294,13 @@ usage( const char *program, const char *version) {
-   fprintf(stderr, "%s v%s -- DTLS client implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
- #ifdef DTLS_PSK
--        "usage: %s [-i file] [-k file] [-o file] [-p port] [-v num] addr [port]\n"
-+        "usage: %s [-i file] [-s file] [-k file] [-o file] [-p port] [-v num] addr [port]\n"
- #else /*  DTLS_PSK */
-         "usage: %s [-o file] [-p port] [-v num] addr [port]\n"
- #endif /* DTLS_PSK */
- #ifdef DTLS_PSK
--        "\t-i file\t\tread PSK identity from file\n"
-+        "\t-i file\t\tread PSK Client identity from file\n"
-+        "\t-s file\t\tread PSK Server identity from file\n"
-         "\t-k file\t\tread pre-shared key from file\n"
- #endif /* DTLS_PSK */
-         "\t-o file\t\toutput received data to this file (use '-' for STDOUT)\n"
-@@ -337,9 +341,11 @@ main(int argc, char **argv) {
-   snprintf(port_str, sizeof(port_str), "%d", port);
- #ifdef DTLS_PSK
--  psk_id_length = strlen(PSK_DEFAULT_IDENTITY);
-+  psk_client_id_length = strlen(PSK_CLIENT_IDENTITY);
-+  psk_server_id_length = strlen(PSK_SERVER_IDENTITY);
-   psk_key_length = strlen(PSK_DEFAULT_KEY);
--  memcpy(psk_id, PSK_DEFAULT_IDENTITY, psk_id_length);
-+  memcpy(psk_client_id, PSK_CLIENT_IDENTITY, psk_client_id_length);
-+  memcpy(psk_server_id, PSK_SERVER_IDENTITY, psk_server_id_length);
-   memcpy(psk_key, PSK_DEFAULT_KEY, psk_key_length);
- #endif /* DTLS_PSK */
-@@ -347,11 +353,20 @@ main(int argc, char **argv) {
-     switch (opt) {
- #ifdef DTLS_PSK
-     case 'i' : {
--      ssize_t result = read_from_file(optarg, psk_id, PSK_ID_MAXLEN);
-+      ssize_t result = read_from_file(optarg, psk_client_id, PSK_ID_MAXLEN);
-       if (result < 0) {
--      dtls_warn("cannot read PSK identity\n");
-+      dtls_warn("cannot read Client PSK identity\n");
-       } else {
--      psk_id_length = result;
-+      psk_client_id_length = result;
-+      }
-+      break;
-+    }
-+    case 's' : {
-+      ssize_t result = read_from_file(optarg, psk_server_id, PSK_ID_MAXLEN);
-+      if (result < 0) {
-+      dtls_warn("cannot read Server PSK identity\n");
-+      } else {
-+      psk_server_id_length = result;
-       }
-       break;
-     }
-diff --git a/extlibs/tinydtls/tests/dtls-server.c b/extlibs/tinydtls/tests/dtls-server.c
-index 3f030b1..ae1283e 100644
---- a/extlibs/tinydtls/tests/dtls-server.c
-+++ b/extlibs/tinydtls/tests/dtls-server.c
-@@ -47,6 +47,9 @@ handle_sigint(int signum) {
- #endif
- #ifdef DTLS_PSK
-+
-+#define PSK_SERVER_HINT  "Server_identity"
-+
- /* This function is the "key store" for tinyDTLS. It is called to
-  * retrieve a key for the given identity within this particular
-  * session. */
-@@ -70,23 +73,35 @@ get_psk_info(struct dtls_context_t *ctx, const session_t *session,
-       (unsigned char *)"", 1 }
-   };
--  if (type != DTLS_PSK_KEY) {
--    return 0;
--  }
-+  switch (type) {
-+  case DTLS_PSK_HINT:
-+    if (result_length < strlen(PSK_SERVER_HINT)) {
-+      dtls_warn("cannot set psk_hint -- buffer too small\n");
-+      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+    }
--  if (id) {
--    int i;
--    for (i = 0; i < sizeof(psk)/sizeof(struct keymap_t); i++) {
--      if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) {
--      if (result_length < psk[i].key_length) {
--        dtls_warn("buffer too small for PSK");
--        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
--      }
--
--      memcpy(result, psk[i].key, psk[i].key_length);
--      return psk[i].key_length;
-+    memcpy(result, PSK_SERVER_HINT, strlen(PSK_SERVER_HINT));
-+    return strlen(PSK_SERVER_HINT);
-+
-+  case DTLS_PSK_KEY:
-+    if (id) {
-+      int i;
-+      for (i = 0; i < sizeof(psk)/sizeof(struct keymap_t); i++) {
-+        if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) {
-+        if (result_length < psk[i].key_length) {
-+          dtls_warn("buffer too small for PSK");
-+          return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-+        }
-+
-+        memcpy(result, psk[i].key, psk[i].key_length);
-+        return psk[i].key_length;
-+        }
-       }
-     }
-+    break;
-+
-+  default:
-+    dtls_warn("unsupported request type: %d\n", type);
-   }
-   return dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
--- 
-1.7.9.5
-
diff --git a/extlibs/tinydtls/0001-add-support-of-X.509-into-tinyDTLS-external-library.patch b/extlibs/tinydtls/0001-add-support-of-X.509-into-tinyDTLS-external-library.patch
deleted file mode 100644 (file)
index 6baafd8..0000000
+++ /dev/null
@@ -1,1960 +0,0 @@
-From 3a354d276c3375fd0ef20f5ced8f6c4d8c39c419 Mon Sep 17 00:00:00 2001
-From: Oleksii Udod <o.udod@samsung.com>
-Date: Wed, 12 Aug 2015 17:20:21 +0300
-Subject: [PATCH 1/1] add support of X.509 into tinyDTLS external library
-
-Change-Id: I560506e0c0828674969829c9e900ae08bacaeef1
-Signed-off-by: Oleksii Udod <o.udod@samsung.com>
----
- extlibs/tinydtls/SConscript          |   5 +-
- extlibs/tinydtls/configure.in        |   6 +
- extlibs/tinydtls/crypto.c            |   2 +-
- extlibs/tinydtls/crypto.h            |   4 +-
- extlibs/tinydtls/dtls.c              | 257 ++++++++++++++++++++-----
- extlibs/tinydtls/dtls.h              | 108 ++++++++++-
- extlibs/tinydtls/dtls_config.h       |  51 +++++
- extlibs/tinydtls/dtls_config.h.in    |   3 +
- extlibs/tinydtls/global.h            |   7 +-
- extlibs/tinydtls/netq.h              |   2 +-
- extlibs/tinydtls/tests/Makefile.in   |   4 +-
- extlibs/tinydtls/tests/dtls-client.c | 336 ++++++++++++++++++++++++++++++--
- extlibs/tinydtls/tests/dtls-server.c | 358 +++++++++++++++++++++++++++++++++--
- extlibs/tinydtls/tinydtls.h          |   3 +
- extlibs/tinydtls/tinydtls.h.in       |   3 +
- 15 files changed, 1065 insertions(+), 84 deletions(-)
-
-diff --git a/extlibs/tinydtls/SConscript b/extlibs/tinydtls/SConscript
-index 4c6b4e1..7ca5ae2 100644
---- a/extlibs/tinydtls/SConscript
-+++ b/extlibs/tinydtls/SConscript
-@@ -31,7 +31,6 @@ if(target_os) == 'arduino':
-       env.Replace(CFLAGS = env.get('CXXFLAGS'))
- root_dir = './'
--
- tinydtls_src_path = root_dir
- env.AppendUnique(CPPPATH = [root_dir])
-@@ -62,7 +61,7 @@ tinydtls_src = [
- env.AppendUnique(TINYDTLS_SRC = tinydtls_src)
- if not env.get('RELEASE'):
--      if(target_os) not in ['arduino']:
-+      if(target_os) not in ['android', 'arduino']:
-               env.AppendUnique(TINYDTLS_SRC = ['debug.c'])
-       else:
-               env.AppendUnique(CPPDEFINES = ['NDEBUG'])
-@@ -71,6 +70,7 @@ else:
- env.AppendUnique(CPPDEFINES = ['DTLSV12',  'WITH_SHA256', 'DTLS_CHECK_CONTENTTYPE'])
-+
- libtinydtls = env.StaticLibrary('libtinydtls', env.get('TINYDTLS_SRC'), OBJPREFIX='libtinydtls_')
- ######################################################################
-@@ -94,6 +94,7 @@ if not env.get('RELEASE'):
-       samples_env.PrependUnique(LIBS = ['tinydtls'])
-       Alias("samples", [dtlsserver, dtlsclient])
-+
-       samples_env.AppendTarget('samples')
- env.InstallTarget(libtinydtls, 'libtinydtls');
-diff --git a/extlibs/tinydtls/configure.in b/extlibs/tinydtls/configure.in
-index 70b9a54..c3ebbf3 100644
---- a/extlibs/tinydtls/configure.in
-+++ b/extlibs/tinydtls/configure.in
-@@ -69,6 +69,12 @@ AC_ARG_WITH(psk,
-   [AC_DEFINE(DTLS_PSK, 1, [Define to 1 if building with PSK support])
-    DTLS_PSK=1])
-+AC_ARG_WITH(x509,
-+  [AS_HELP_STRING([--with-x509],[use dtls as transport protocol])],
-+  [AC_DEFINE(DTLS_X509, 1, [Define to 1 if building with X.509 support])
-+   DTLS_X509=1],
-+  [])
-+
- CPPFLAGS="${CPPFLAGS} -DDTLSv12 -DWITH_SHA256"
- OPT_OBJS="${OPT_OBJS} sha2/sha2.o"
-diff --git a/extlibs/tinydtls/crypto.c b/extlibs/tinydtls/crypto.c
-index deaf581..7433432 100644
---- a/extlibs/tinydtls/crypto.c
-+++ b/extlibs/tinydtls/crypto.c
-@@ -493,7 +493,7 @@ dtls_psk_pre_master_secret(unsigned char *key, size_t keylen,
- }
- #endif /* DTLS_PSK */
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- int dtls_ec_key_from_uint32_asn1(const uint32_t *key, size_t key_size,
-                                unsigned char *buf) {
-diff --git a/extlibs/tinydtls/crypto.h b/extlibs/tinydtls/crypto.h
-index f4cfc66..cade1b2 100644
---- a/extlibs/tinydtls/crypto.h
-+++ b/extlibs/tinydtls/crypto.h
-@@ -131,14 +131,14 @@ typedef struct {
-   dtls_cipher_t cipher;               /**< cipher type */
-   unsigned int do_client_auth:1;
--#ifdef DTLS_ECC && DTLS_PSK
-+#if defined(DTLS_ECC) && defined(DTLS_PSK)
-   struct keyx_t {
-     dtls_handshake_parameters_ecc_t ecc;
-     dtls_handshake_parameters_psk_t psk;
-   } keyx;
- #else /* DTLS_ECC && DTLS_PSK */
-   union {
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-     dtls_handshake_parameters_ecc_t ecc;
- #endif /* DTLS_ECC */
- #ifdef DTLS_PSK
-diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
-index 6104a08..f1e2486 100644
---- a/extlibs/tinydtls/dtls.c
-+++ b/extlibs/tinydtls/dtls.c
-@@ -479,7 +479,7 @@ static uint8 compression_methods[] = {
- /** returns true if the cipher matches TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */
- static inline int is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(dtls_cipher_t cipher)
- {
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   return cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
- #else
-   return 0;
-@@ -532,13 +532,24 @@ static inline int is_psk_supported(dtls_context_t *ctx)
- static inline int is_ecdsa_supported(dtls_context_t *ctx, int is_client)
- {
- #ifdef DTLS_ECC
--  return ctx && ctx->h && ((!is_client && ctx->h->get_ecdsa_key) || 
-+  return ctx && ctx->h && ((!is_client && ctx->h->get_ecdsa_key) ||
-                          (is_client && ctx->h->verify_ecdsa_key));
- #else
-   return 0;
- #endif /* DTLS_ECC */
- }
-+/** returns true if the application is configured for x509 */
-+static inline int is_x509_supported(dtls_context_t *ctx, int is_client)
-+{
-+#ifdef DTLS_X509
-+  return ctx && ctx->h && ((!is_client && ctx->h->get_x509_cert) ||
-+               (is_client && ctx->h->verify_x509_cert));
-+#else
-+  return 0;
-+#endif /* DTLS_X509 */
-+}
-+
- /** Returns true if the application is configured for ecdhe_ecdsa with
-   * client authentication */
- static inline int is_ecdsa_client_auth_supported(dtls_context_t *ctx)
-@@ -550,6 +561,17 @@ static inline int is_ecdsa_client_auth_supported(dtls_context_t *ctx)
- #endif /* DTLS_ECC */
- }
-+/** Returns true if the application is configured for x509 with
-+  * client authentication */
-+static inline int is_x509_client_auth_supported(dtls_context_t *ctx)
-+{
-+#ifdef DTLS_X509
-+  return ctx && ctx->h && ctx->h->get_x509_cert && ctx->h->verify_x509_cert;
-+#else
-+  return 0;
-+#endif /* DTLS_X509 */
-+}
-+
- /** returns true if ecdh_anon_with_aes_128_cbc_sha is supported */
- static inline int is_ecdh_anon_supported(dtls_context_t *ctx)
- {
-@@ -586,16 +608,19 @@ known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-   int ecdsa;
-   int ecdh_anon;
-   int ecdhe_psk;
-+  int x509;
-   psk = is_psk_supported(ctx);
-   ecdsa = is_ecdsa_supported(ctx, is_client);
-   ecdh_anon = is_ecdh_anon_supported(ctx);
-   ecdhe_psk = is_ecdhe_psk_supported(ctx);
-+  x509 = is_x509_supported(ctx, is_client);
-   return (psk && is_tls_psk_with_aes_128_ccm_8(code)) ||
-        (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code)) ||
-        (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha_256(code)) ||
--       (ecdhe_psk && is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(code));
-+       (ecdhe_psk && is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(code)) ||
-+     (x509 && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code));
- }
- /**
-@@ -744,7 +769,7 @@ calculate_key_block(dtls_context_t *ctx,
-     break;
-   }
- #endif /* DTLS_PSK */
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-   case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-     pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecc.own_eph_priv,
-@@ -870,8 +895,13 @@ static int verify_ext_cert_type(uint8 *data, size_t data_length) {
-     cert_type = dtls_uint8_to_int(data);
-     data += sizeof(uint8);
-+
-     if (cert_type == TLS_CERT_TYPE_RAW_PUBLIC_KEY)
--      return 0;
-+        return 0;
-+#ifdef DTLS_X509
-+    if (cert_type == TLS_CERT_TYPE_X509)
-+        return 0;
-+#endif
-   }
-   dtls_warn("no supported certificate type found\n");
-@@ -962,7 +992,12 @@ dtls_check_tls_extension(dtls_peer_t *peer,
-         if (verify_ext_cert_type(data, j))
-             goto error;
-         } else {
-+#ifndef DTLS_X509
-         if (dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY)
-+#else
-+        if ((dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY) &&
-+            (dtls_uint8_to_int(data) != TLS_CERT_TYPE_X509))
-+#endif
-           goto error;
-         }
-         break;
-@@ -972,7 +1007,12 @@ dtls_check_tls_extension(dtls_peer_t *peer,
-         if (verify_ext_cert_type(data, j))
-             goto error;
-         } else {
-+#ifndef DTLS_X509
-         if (dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY)
-+#else
-+        if ((dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY) &&
-+            (dtls_uint8_to_int(data) != TLS_CERT_TYPE_X509))
-+#endif
-           goto error;
-         }
-         break;
-@@ -1138,7 +1178,7 @@ check_client_keyexchange(dtls_context_t *ctx,
-                        dtls_handshake_parameters_t *handshake,
-                        uint8 *data, size_t length) {
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) ||
-        is_tls_ecdh_anon_with_aes_128_cbc_sha_256(handshake->cipher) ) {
-@@ -1529,7 +1569,6 @@ dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-     memcpy(A_DATA + 8,  &DTLS_RECORD_HEADER(sendbuf)->content_type, 3); /* type and version */
-     dtls_int_to_uint16(A_DATA + 11, res - 8); /* length */
--
-     res = dtls_encrypt(start + 8, res - 8, start + 8, nonce,
-                dtls_kb_local_write_key(security, peer->role),
-                dtls_kb_key_size(security, peer->role),
-@@ -1841,7 +1880,7 @@ dtls_verify_peer(dtls_context_t *ctx,
- #undef mycookie
- }
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- static int
- dtls_check_ecdsa_signature_elem(uint8 *data, size_t data_length,
-                               unsigned char **result_r,
-@@ -2025,8 +2064,13 @@ dtls_send_server_hello(dtls_context_t *ctx, dtls_peer_t *peer)
-     /* length of this extension type */
-     dtls_int_to_uint16(p, 1);
-     p += sizeof(uint16);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-+    else
-+#endif /* DTLS_X509 */
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
--    dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-     p += sizeof(uint8);
-     /* client certificate type extension */
-@@ -2037,7 +2081,13 @@ dtls_send_server_hello(dtls_context_t *ctx, dtls_peer_t *peer)
-     dtls_int_to_uint16(p, 1);
-     p += sizeof(uint16);
--    dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-+    else
-+#endif /* DTLS_X509 */
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+
-     p += sizeof(uint8);
-     /* ec_point_formats */
-@@ -2072,7 +2122,7 @@ dtls_send_certificate_ecdsa(dtls_context_t *ctx, dtls_peer_t *peer,
-   uint8 buf[DTLS_CE_LENGTH];
-   uint8 *p;
--  /* Certificate 
-+  /* Certificate
-    *
-    * Start message construction at beginning of buffer. */
-   p = buf;
-@@ -2097,7 +2147,46 @@ dtls_send_certificate_ecdsa(dtls_context_t *ctx, dtls_peer_t *peer,
-   return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE,
-                                buf, p - buf);
- }
-+#endif /* DTLS_ECC */
-+
-+#ifdef DTLS_X509
-+static int
-+dtls_send_certificate_x509(dtls_context_t *ctx, dtls_peer_t *peer)
-+{
-+  uint8 buf[DTLS_MAX_CERT_SIZE];
-+  uint8 *p;
-+  int ret;
-+  unsigned char *cert;
-+  size_t cert_size;
-+
-+  dtls_info("\n dtls_send_certificate_ecdsa\n");
-+  ret = CALL(ctx, get_x509_cert, &peer->session,
-+          (const unsigned char **)&cert, &cert_size);
-+
-+  if (ret < 0) {
-+    dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-+    return ret;
-+  }
-+
-+  /* Certificate
-+   *
-+   * Start message construction at beginning of buffer. */
-+  p = buf;
-+
-+  dtls_int_to_uint24(p, cert_size); /* certificates length */
-+  p += sizeof(uint24);
-+
-+  memcpy(p, cert, cert_size);
-+  p += cert_size;
-+
-+  assert(p - buf <= sizeof(buf));
-+
-+  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE,
-+                               buf, p - buf);
-+}
-+#endif /* DTLS_X509 */
-+#if defined(DTLS_X509) || defined(DTLS_ECC)
- static uint8 *
- dtls_add_ecdsa_signature_elem(uint8 *p, uint32_t *point_r, uint32_t *point_s)
- {
-@@ -2204,7 +2293,6 @@ dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-   dtls_ecdsa_generate_key(config->keyx.ecc.own_eph_priv,
-               ephemeral_pub_x, ephemeral_pub_y,
-               DTLS_EC_KEY_SIZE);
--
-   if(ecdsa) {
-       /* sign the ephemeral and its paramaters */
-            dtls_ecdsa_create_sig(key->priv_key, DTLS_EC_KEY_SIZE,
-@@ -2221,7 +2309,7 @@ dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-   return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_KEY_EXCHANGE,
-                                buf, p - buf);
- }
--#endif /* DTLS_ECC */
-+#endif /* defined(DTLS_X509) || defined(DTLS_ECC) */
- #if defined(DTLS_PSK) && defined(DTLS_ECC)
- static int dtls_send_server_key_exchange_ecdhe_psk(dtls_context_t *ctx, dtls_peer_t *peer,
-@@ -2327,7 +2415,7 @@ dtls_send_server_key_exchange_psk(dtls_context_t *ctx, dtls_peer_t *peer,
- }
- #endif /* DTLS_PSK */
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- static int
- dtls_send_server_certificate_request(dtls_context_t *ctx, dtls_peer_t *peer)
- {
-@@ -2401,7 +2489,7 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-   ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
-   ecdhe_psk = is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   if(ecdh_anon) {
-       res = dtls_send_server_key_exchange_ecdh(ctx, peer, NULL);
-@@ -2413,13 +2501,24 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-   else if (ecdsa) {
-     const dtls_ecc_key_t *ecdsa_key;
--    res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      res = CALL(ctx, get_x509_key, &peer->session, &ecdsa_key);
-+    else
-+#endif /* DTLS_X509 */
-+      res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-+
-     if (res < 0) {
--      dtls_crit("no ecdsa certificate to send in certificate\n");
-+        dtls_debug("no ecdsa key to send\n");
-       return res;
-     }
--    res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      res = dtls_send_certificate_x509(ctx, peer);
-+    else
-+#endif /* DTLS_X509 */
-+      res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-     if (res < 0) {
-       dtls_debug("dtls_server_hello: cannot prepare Certificate record\n");
-@@ -2434,9 +2533,8 @@ dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
--      is_ecdsa_client_auth_supported(ctx)) {
-+      (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx)))) {
-       res = dtls_send_server_certificate_request(ctx, peer);
--
-       if (res < 0) {
-         dtls_debug("dtls_server_hello(with ECDSA): cannot prepare certificate Request record\n");
-         return res;
-@@ -2554,7 +2652,7 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-     break;
-   }
- #endif /* DTLS_PSK */
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-   case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-     uint8 *ephemeral_pub_x;
-@@ -2644,7 +2742,7 @@ dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-                                buf, p - buf);
- }
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- static int
- dtls_send_certificate_verify_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-                                  const dtls_ecc_key_t *key)
-@@ -2723,6 +2821,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-   int ecdsa = 0;
-   int ecdh_anon = 0;
-   int ecdhe_psk = 0;
-+  int x509 = 0;
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-   dtls_tick_t now;
-@@ -2733,6 +2832,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-         break;
-       case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-         ecdsa = is_ecdsa_supported(ctx, 1);
-+        x509 = is_x509_supported(ctx, 1);
-         break;
-       case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-         ecdh_anon = is_ecdh_anon_supported(ctx);
-@@ -2745,11 +2845,12 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-         ecdsa = is_ecdsa_supported(ctx, 1);
-         ecdh_anon = is_ecdh_anon_supported(ctx);
-         ecdhe_psk = is_ecdhe_psk_supported(ctx);
-+        x509 = is_x509_supported(ctx, 1);
-         break;
-    }
--  cipher_size = 2 + (ecdsa ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0) + (ecdhe_psk ? 2 : 0);
--  extension_size = (ecdsa) ? (2 + 6 + 6 + 8 + 6) : 0;
-+  cipher_size = 2 + ((ecdsa || x509) ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0) + (ecdhe_psk ? 2 : 0);
-+  extension_size = (ecdsa || x509) ? (2 + 6 + 6 + 8 + 6) : 0;
-   if (cipher_size == 0) {
-     dtls_crit("no cipher callbacks implemented\n");
-@@ -2799,7 +2900,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-     dtls_int_to_uint16(p, TLS_PSK_WITH_AES_128_CCM_8);
-     p += sizeof(uint16);
-   }
--  if (ecdsa) {
-+  if (ecdsa || x509) {
-     dtls_int_to_uint16(p, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8);
-     p += sizeof(uint16);
-   }
-@@ -2821,7 +2922,7 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-     p += sizeof(uint16);
-   }
--  if (ecdsa) {
-+  if (ecdsa || x509) {
-     /* client certificate type extension */
-     dtls_int_to_uint16(p, TLS_EXT_CLIENT_CERTIFICATE_TYPE);
-     p += sizeof(uint16);
-@@ -2834,7 +2935,13 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-     dtls_int_to_uint8(p, 1);
-     p += sizeof(uint8);
--    dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-+    else
-+#endif /* DTLS_X509 */
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+
-     p += sizeof(uint8);
-     /* client certificate type extension */
-@@ -2849,7 +2956,13 @@ dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-     dtls_int_to_uint8(p, 1);
-     p += sizeof(uint8);
--    dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-+    else
-+#endif /* DTLS_X509 */
-+      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-+
-     p += sizeof(uint8);
-     /* elliptic_curves */
-@@ -2985,8 +3098,9 @@ check_server_hello_verify_request(dtls_context_t *ctx,
- }
- #ifdef DTLS_ECC
-+
- static int
--check_server_certificate(dtls_context_t *ctx, 
-+check_peer_certificate(dtls_context_t *ctx,
-                        dtls_peer_t *peer,
-                        uint8 *data, size_t data_length)
- {
-@@ -3036,7 +3150,41 @@ check_server_certificate(dtls_context_t *ctx,
-   return 0;
- }
-+#endif /* DTLS_ECC */
-+
-+#ifdef DTLS_X509
-+static int
-+check_peer_certificate_x509(dtls_context_t *ctx,
-+                       dtls_peer_t *peer,
-+                       uint8 *data, size_t data_length)
-+{
-+  int ret;
-+  dtls_handshake_parameters_t *config = peer->handshake_params;
-+  int cert_length;
-+
-+  dtls_info("\n check_peer_certificate_x509\n");
-+  update_hs_hash(peer, data, data_length);
-+
-+  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(config->cipher));
-+
-+  data += DTLS_HS_LENGTH;
-+
-+  cert_length = dtls_uint24_to_int(data);
-+  data += sizeof(uint24);
-+
-+  ret = CALL(ctx, verify_x509_cert, &peer->session, data, cert_length,
-+          config->keyx.ecc.other_pub_x, sizeof(config->keyx.ecc.other_pub_x),
-+          config->keyx.ecc.other_pub_y, sizeof(config->keyx.ecc.other_pub_y));
-+  if (ret < 0) {
-+    dtls_warn("The certificate was not accepted\n");
-+    return ret;
-+  }
-+
-+  return 0;
-+}
-+#endif /* DTLS_X509 */
-+#if defined(DTLS_X509) || defined(DTLS_ECC)
- static int
- check_server_key_exchange_ecdsa(dtls_context_t *ctx,
-                               dtls_peer_t *peer,
-@@ -3385,13 +3533,17 @@ check_certificate_request(dtls_context_t *ctx,
- }
- static int
--check_server_hellodone(dtls_context_t *ctx, 
-+check_server_hellodone(dtls_context_t *ctx,
-                     dtls_peer_t *peer,
-                     uint8 *data, size_t data_length)
- {
--  int res;
-+  int res = 0;
- #ifdef DTLS_ECC
-   const dtls_ecc_key_t *ecdsa_key;
-+#ifdef DTLS_X509
-+  unsigned char *cert;
-+  size_t cert_size;
-+#endif /* DTLS_X509 */
- #endif /* DTLS_ECC */
-   dtls_handshake_parameters_t *handshake = peer->handshake_params;
-@@ -3400,16 +3552,25 @@ check_server_hellodone(dtls_context_t *ctx,
-   update_hs_hash(peer, data, data_length);
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
--
--    res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      res = CALL(ctx, get_x509_key, &peer->session, &ecdsa_key);
-+    else
-+#endif /* DTLS_X509 */
-+      res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-     if (res < 0) {
--      dtls_crit("no ecdsa certificate to send in certificate\n");
-+      dtls_crit("no ecdsa key to use\n");
-       return res;
-     }
--    res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      res = dtls_send_certificate_x509(ctx, peer);
-+    else
-+#endif /* DTLS_X509 */
-+      res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-     if (res < 0) {
-       dtls_debug("dtls_server_hello: cannot prepare Certificate record\n");
-@@ -3428,7 +3589,6 @@ check_server_hellodone(dtls_context_t *ctx,
- #ifdef DTLS_ECC
-   if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
--
-     res = dtls_send_certificate_verify_ecdh(ctx, peer, ecdsa_key);
-     if (res < 0) {
-@@ -3655,16 +3815,21 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     break;
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   case DTLS_HT_CERTIFICATE:
-     if ((role == DTLS_CLIENT && state != DTLS_STATE_WAIT_SERVERCERTIFICATE) ||
-         (role == DTLS_SERVER && state != DTLS_STATE_WAIT_CLIENTCERTIFICATE)) {
-       return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-     }
--    err = check_server_certificate(ctx, peer, data, data_length);
-+#ifdef DTLS_X509
-+    if (CALL(ctx, is_x509_active) == 0)
-+      err = check_peer_certificate_x509(ctx, peer, data, data_length);
-+    else
-+#endif /* DTLS_X509 */
-+      err = check_peer_certificate(ctx, peer, data, data_length);
-     if (err < 0) {
--      dtls_warn("error in check_server_certificate err: %i\n", err);
-+      dtls_warn("error in check_peer_certificate err: %i\n", err);
-       return err;
-     }
-     if (role == DTLS_CLIENT) {
-@@ -3679,7 +3844,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-   case DTLS_HT_SERVER_KEY_EXCHANGE:
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-       if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-         return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-@@ -3811,13 +3976,13 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-     update_hs_hash(peer, data, data_length);
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
--      is_ecdsa_client_auth_supported(ctx))
-+            (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx))))
-       peer->state = DTLS_STATE_WAIT_CERTIFICATEVERIFY; //ecdsa
-     else
-       peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC; //psk || ecdh_anon
-     break;
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
-   case DTLS_HT_CERTIFICATE_VERIFY:
-     if (state != DTLS_STATE_WAIT_CERTIFICATEVERIFY) {
-@@ -3934,7 +4099,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-       return err;
-     }
-     if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
--      is_ecdsa_client_auth_supported(ctx))
-+            (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx))))
-       peer->state = DTLS_STATE_WAIT_CLIENTCERTIFICATE; //ecdhe
-     else
-       peer->state = DTLS_STATE_WAIT_CLIENTKEYEXCHANGE; //psk, ecdh_anon
-@@ -4261,7 +4426,7 @@ dtls_handle_message(dtls_context_t *ctx,
-           data = msg + DTLS_RH_LENGTH;
-           data_length = rlen - DTLS_RH_LENGTH;
-           state = DTLS_STATE_WAIT_CLIENTHELLO;
--          role = DTLS_SERVER;       
-+          role = DTLS_SERVER;
-         } else {
-         int err =  dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-           dtls_info("decrypt_verify() failed\n");
-@@ -4506,7 +4671,7 @@ dtls_connect_peer(dtls_context_t *ctx, dtls_peer_t *peer) {
-   res = dtls_send_client_hello(ctx, peer, NULL, 0);
-   if (res < 0)
-     dtls_warn("cannot send ClientHello\n");
--  else 
-+  else
-     peer->state = DTLS_STATE_CLIENTHELLO;
-   return res;
-diff --git a/extlibs/tinydtls/dtls.h b/extlibs/tinydtls/dtls.h
-index 7d2bc19..c5a86df 100644
---- a/extlibs/tinydtls/dtls.h
-+++ b/extlibs/tinydtls/dtls.h
-@@ -56,6 +56,10 @@
- #define DTLS_VERSION 0xfefd   /* DTLS v1.2 */
- #endif
-+#ifdef DTLS_X509
-+#define DTLS_MAX_CERT_SIZE       1400
-+#endif
-+
- typedef enum dtls_credentials_type_t {
-   DTLS_PSK_HINT, DTLS_PSK_IDENTITY, DTLS_PSK_KEY
- } dtls_credentials_type_t;
-@@ -181,10 +185,11 @@ typedef struct {
-    *                session.
-    * @return @c 0 if result is set, or less than zero on error.
-    */
--  int (*get_ecdsa_key)(struct dtls_context_t *ctx, 
-+  int (*get_ecdsa_key)(struct dtls_context_t *ctx,
-                      const session_t *session,
-                      const dtls_ecc_key_t **result);
-+
-   /**
-    * Called during handshake to check the peer's pubic key in this
-    * session. If the public key matches the session and should be
-@@ -211,12 +216,111 @@ typedef struct {
-    *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_UNKNOWN);
-    *   return dtls_alert_fatal_create(DTLS_ALERT_UNKNOWN_CA);
-    */
--  int (*verify_ecdsa_key)(struct dtls_context_t *ctx, 
-+  int (*verify_ecdsa_key)(struct dtls_context_t *ctx,
-                         const session_t *session,
-                         const unsigned char *other_pub_x,
-                         const unsigned char *other_pub_y,
-                         size_t key_size);
- #endif /* DTLS_ECC */
-+#ifdef DTLS_X509
-+  /**
-+   * Called during handshake to get the server's or client's ecdsa
-+   * key used to authenticate this server or client in this
-+   * session. If found, the key must be stored in @p result and
-+   * the return value must be @c 0. If not found, @p result is
-+   * undefined and the return value must be less than zero.
-+   *
-+   * If ECDSA should not be supported, set this pointer to NULL.
-+   *
-+   * Implement this if you want to provide your own certificate to
-+   * the other peer. This is mandatory for a server providing X.509
-+   * support and optional for a client. A client doing DTLS client
-+   * authentication has to implementing this callback.
-+   *
-+   * @param ctx     The current dtls context.
-+   * @param session The session where the key will be used.
-+   * @param result  Must be set to the key object to used for the given
-+   *                session.
-+   * @return @c 0 if result is set, or less than zero on error.
-+   */
-+  int (*get_x509_key)(struct dtls_context_t *ctx,
-+               const session_t *session,
-+               const dtls_ecc_key_t **result);
-+  /**
-+   * Called during handshake to get the server's or client's
-+   * certificate used to authenticate this server or client in this
-+   * session. If found, the certificate must be stored in @p cert and
-+   * the return value must be @c 0. If not found, @p cert is
-+   * undefined and the return value must be less than zero.
-+   *
-+   * If X.509 should not be supported, set this pointer to NULL.
-+   *
-+   * Implement this if you want to provide your own certificate to
-+   * the other peer. This is mandatory for a server providing X.509
-+   * support and optional for a client. A client doing DTLS client
-+   * authentication has to implementing this callback.
-+   *
-+   * @param ctx       The current dtls context.
-+   * @param session   The session where the certificate will be used.
-+   * @param cert      Must be set to the certificate object to used for
-+   *                  the given session.
-+   * @param cert_size Size of certificate in bytes.
-+   * @return @c 0 if result is set, or less than zero on error.
-+   */
-+  int (*get_x509_cert)(struct dtls_context_t *ctx,
-+                      const session_t *session,
-+                      const unsigned char **cert,
-+                      size_t *cert_size);
-+
-+  /**
-+   * Called during handshake to check the peer's certificate in this
-+   * session. If the certificate matches the session and is valid the
-+   * return value must be @c 0. If not valid, the return value must be
-+   * less than zero.
-+   *
-+   * If X.509 should not be supported, set this pointer to NULL.
-+   *
-+   * Implement this if you want to verify the other peers certificate.
-+   * This is mandatory for a DTLS client doing based X.509
-+   * authentication. A server implementing this will request the
-+   * client to do DTLS client authentication.
-+   *
-+   * @param ctx       The current dtls context.
-+   * @param session   The session where the key will be used.
-+   * @param cert      Peer's certificate to check.
-+   * @param cert_size Size of certificate in bytes.
-+   * @param x         Allocated memory to store peer's public key part x.
-+   * @param x_size    Size of allocated memory to store peer's public key part x.
-+   * @param y         Allocated memory to store peer's public key part y.
-+   * @param y_size    Size of allocated memory to store peer's public key part y.
-+   * @return @c 0 if public key matches, or less than zero on error.
-+   * error codes:
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_BAD_CERTIFICATE);
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_UNSUPPORTED_CERTIFICATE);
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_REVOKED);
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_EXPIRED);
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_UNKNOWN);
-+   *   return dtls_alert_fatal_create(DTLS_ALERT_UNKNOWN_CA);
-+   */
-+  int (*verify_x509_cert)(struct dtls_context_t *ctx,
-+                         const session_t *session,
-+                         const unsigned char *cert,
-+                         size_t cert_size,
-+               unsigned char *x,
-+                         size_t x_size,
-+               unsigned char *y,
-+                         size_t y_size);
-+
-+  /**
-+   * Called during handshake to check if certificate format should be X.509
-+   *
-+   * If X.509 should not be supported, set this pointer to NULL.
-+   *
-+   * @param ctx       The current dtls context.
-+   * @return @c 0 if certificate format should be X.509, or less than zero on error.
-+   */
-+  int (*is_x509_active)(struct dtls_context_t *ctx);
-+#endif /* DTLS_X509 */
- } dtls_handler_t;
- /** Holds global information of the DTLS engine. */
-diff --git a/extlibs/tinydtls/dtls_config.h b/extlibs/tinydtls/dtls_config.h
-index 39df8c9..c6c4e39 100644
---- a/extlibs/tinydtls/dtls_config.h
-+++ b/extlibs/tinydtls/dtls_config.h
-@@ -66,9 +66,27 @@
- #endif
- #endif /* CONTIKI */
-+/* Define if building universal (internal helper macro) */
-+/* #undef AC_APPLE_UNIVERSAL_BUILD */
-+
-+/* Define to 1 if building with X.509 support */
-+#define DTLS_X509 1
-+
-+/* Define to 1 if you have the <arpa/inet.h> header file. */
-+#define HAVE_ARPA_INET_H 1
-+
- /* Define to 1 if you have the <assert.h> header file. */
- #define HAVE_ASSERT_H 1
-+/* Define to 1 if you have the <fcntl.h> header file. */
-+#define HAVE_FCNTL_H 1
-+
-+/* Define to 1 if you have the `fls' function. */
-+/* #undef HAVE_FLS */
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+#define HAVE_INTTYPES_H 1
-+
- /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-    to 0 otherwise. */
- #define HAVE_MALLOC 1
-@@ -79,6 +97,21 @@
- /* Define to 1 if you have the `memset' function. */
- #define HAVE_MEMSET 1
-+/* Define to 1 if you have the <netdb.h> header file. */
-+#define HAVE_NETDB_H 1
-+
-+/* Define to 1 if you have the <netinet/in.h> header file. */
-+#define HAVE_NETINET_IN_H 1
-+
-+/* Define to 1 if you have the `select' function. */
-+#define HAVE_SELECT 1
-+
-+/* Define to 1 if struct sockaddr_in6 has a member sin6_len. */
-+/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
-+
-+/* Define to 1 if you have the `socket' function. */
-+#define HAVE_SOCKET 1
-+
- /* Define to 1 if you have the <stddef.h> header file. */
- #define HAVE_STDDEF_H 1
-@@ -103,9 +136,27 @@
- /* Define to 1 if you have the `strnlen' function. */
- #define HAVE_STRNLEN 1
-+/* Define to 1 if you have the <sys/param.h> header file. */
-+#define HAVE_SYS_PARAM_H 1
-+
-+/* Define to 1 if you have the <sys/socket.h> header file. */
-+#define HAVE_SYS_SOCKET_H 1
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/time.h> header file. */
-+#define HAVE_SYS_TIME_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
- /* Define to 1 if you have the <time.h> header file. */
- #define HAVE_TIME_H 1
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
- /* Define to 1 if you have the `vprintf' function. */
- #define HAVE_VPRINTF 1
-diff --git a/extlibs/tinydtls/dtls_config.h.in b/extlibs/tinydtls/dtls_config.h.in
-index a29077c..adc8dc5 100644
---- a/extlibs/tinydtls/dtls_config.h.in
-+++ b/extlibs/tinydtls/dtls_config.h.in
-@@ -68,6 +68,9 @@
- /* Define if building universal (internal helper macro) */
- #undef AC_APPLE_UNIVERSAL_BUILD
-+/* Define to 1 if building with X.509 support */
-+#undef DTLS_X509
-+
- /* Define to 1 if you have the <arpa/inet.h> header file. */
- #undef HAVE_ARPA_INET_H
-diff --git a/extlibs/tinydtls/global.h b/extlibs/tinydtls/global.h
-index 8b3c518..048bacd 100644
---- a/extlibs/tinydtls/global.h
-+++ b/extlibs/tinydtls/global.h
-@@ -55,7 +55,7 @@ typedef unsigned char uint48[6];
-     When Peers are sending bigger messages this causes problems. Californium
-     with ECDSA needs at least 220 */
- #ifdef WITH_CONTIKI
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- #define DTLS_MAX_BUF 200
- #else /* DTLS_ECC */
- #define DTLS_MAX_BUF 100
-@@ -96,7 +96,10 @@ typedef enum {
- #define TLS_EXT_SERVER_CERTIFICATE_TYPE       20 /* see RFC 7250 */
- #define TLS_EXT_ENCRYPT_THEN_MAC      22 /* see RFC 7366 */
--#define TLS_CERT_TYPE_RAW_PUBLIC_KEY  2 /* see RFC 7250 */
-+/* see http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#tls-extensiontype-values-3 */
-+#define TLS_CERT_TYPE_X509              0 /* see RFC 6091 */
-+#define TLS_CERT_TYPE_RAW_PUBLIC_KEY    2 /* see RFC 7250 */
-+
- #define TLS_EXT_ELLIPTIC_CURVES_SECP256R1     23 /* see RFC 4492 */
-diff --git a/extlibs/tinydtls/netq.h b/extlibs/tinydtls/netq.h
-index a771b23..fea7511 100644
---- a/extlibs/tinydtls/netq.h
-+++ b/extlibs/tinydtls/netq.h
-@@ -23,7 +23,7 @@
-  */
- #ifndef NETQ_MAXCNT
--#ifdef DTLS_ECC
-+#if defined(DTLS_ECC) || defined(DTLS_X509)
- #define NETQ_MAXCNT 5 /**< maximum number of elements in netq structure */
- #elif defined(DTLS_PSK)
- #define NETQ_MAXCNT 3 /**< maximum number of elements in netq structure */
-diff --git a/extlibs/tinydtls/tests/Makefile.in b/extlibs/tinydtls/tests/Makefile.in
-index 3a50695..a2d8ca4 100644
---- a/extlibs/tinydtls/tests/Makefile.in
-+++ b/extlibs/tinydtls/tests/Makefile.in
-@@ -41,9 +41,9 @@ SOURCES:= dtls-server.c ccm-test.c prf-test.c \
- OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
- PROGRAMS:= $(patsubst %.c, %, $(SOURCES))
- HEADERS:=
--CFLAGS:=-Wall @CFLAGS@ 
-+CFLAGS:=-Wall @CFLAGS@
- CPPFLAGS:=-I$(top_srcdir) @CPPFLAGS@
--LDFLAGS:=-L$(top_builddir) 
-+LDFLAGS:=-L$(top_builddir)
- LDLIBS:=-ltinydtls @LIBS@
- DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
- FILES:=Makefile.in $(SOURCES) ccm-testdata.c #cbc_aes128-testdata.c
-diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
-index dfd34c8..2c4eff9 100644
---- a/extlibs/tinydtls/tests/dtls-client.c
-+++ b/extlibs/tinydtls/tests/dtls-client.c
-@@ -16,9 +16,34 @@
- #include <netdb.h>
- #include <signal.h>
--#include "global.h" 
--#include "debug.h" 
--#include "dtls.h" 
-+#include "global.h"
-+#include "debug.h"
-+#include "dtls.h"
-+
-+/**
-+ * @struct byte_array
-+ *
-+ * General purpose byte array structure.
-+ *
-+ * Contains pointer to array of bytes and it's length.
-+ */
-+
-+typedef struct
-+{
-+    uint8_t *data;    /**< Pointer to the byte array */
-+    size_t len;      /**< Data size */
-+} byte_array;
-+
-+
-+/**@def BYTE_ARRAY_INITIALIZER
-+ *
-+ * Initializes of existing byte array pointer to \a NULL.
-+ */
-+#undef BYTE_ARRAY_INITIALIZER
-+#define BYTE_ARRAY_INITIALIZER {NULL, 0}
-+
-+#define DTLS_PRIVATE_KEY_SIZE        (32)
-+#define DTLS_PUBLIC_KEY_SIZE         (64)
- #define DEFAULT_PORT 20220
-@@ -26,6 +51,7 @@
- #define PSK_SERVER_IDENTITY  "Server_identity"
- #define PSK_DEFAULT_KEY      "secretPSK"
- #define PSK_OPTIONS          "i:s:k:"
-+#define X509_OPTIONS         "x:r:u:"
- #ifdef __GNUC__
- #define UNUSED_PARAM __attribute__((unused))
-@@ -46,7 +72,105 @@ static dtls_str output_file = { 0, NULL }; /* output file name */
- static dtls_context_t *dtls_context = NULL;
- static dtls_context_t *orig_dtls_context = NULL;
-+#ifdef DTLS_X509
-+#define CLIENT_CRT_LEN 293
-+static const unsigned char g_client_certificate[CLIENT_CRT_LEN] = {
-+        0x00, 0x01, 0x22,
-+        0x30, 0x82, 0x01, 0x1e, 0x30, 0x81, 0xc4, 0xa0,
-+        0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x38,
-+        0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
-+        0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x30, 0x17,
-+        0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
-+        0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
-+        0x20, 0x49, 0x53, 0x53, 0x55, 0x45, 0x52, 0x30,
-+        0x1e, 0x17, 0x0d, 0x31, 0x33, 0x30, 0x31, 0x30,
-+        0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
-+        0x17, 0x0d, 0x34, 0x39, 0x30, 0x31, 0x30, 0x31,
-+        0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30,
-+        0x17, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55,
-+        0x04, 0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61,
-+        0x6c, 0x20, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54,
-+        0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
-+        0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
-+        0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
-+        0x42, 0x00, 0x04, 0xe3, 0xd1, 0x67, 0x1e, 0xdc,
-+        0x46, 0xf4, 0x19, 0x50, 0x15, 0x2e, 0x3a, 0x2f,
-+        0xd8, 0x68, 0x6b, 0x37, 0x32, 0x84, 0x9e, 0x83,
-+        0x81, 0xbf, 0x25, 0x5d, 0xbb, 0x18, 0x07, 0x3c,
-+        0xbd, 0xf3, 0xab, 0xd3, 0xbf, 0x53, 0x59, 0xc9,
-+        0x1e, 0xce, 0x5b, 0x39, 0x6a, 0xe5, 0x60, 0xf3,
-+        0x70, 0xdb, 0x66, 0xb6, 0x80, 0xcb, 0x65, 0x0b,
-+        0x35, 0x2a, 0x62, 0x44, 0x89, 0x63, 0x64, 0x6f,
-+        0x6f, 0xbd, 0xf0, 0x30, 0x0c, 0x06, 0x08, 0x2a,
-+        0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05,
-+        0x00, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20,
-+        0x60, 0xdc, 0x45, 0x77, 0x7d, 0xcb, 0xc3, 0xb4,
-+        0xba, 0x60, 0x5a, 0x2e, 0xe5, 0x4e, 0x19, 0x8b,
-+        0x48, 0x8a, 0x87, 0xd4, 0x66, 0xb4, 0x1a, 0x86,
-+        0x23, 0x67, 0xb8, 0xb6, 0x50, 0xfe, 0x4d, 0xde,
-+        0x02, 0x20, 0x60, 0x68, 0x46, 0xff, 0x74, 0x11,
-+        0xfb, 0x36, 0x13, 0xf4, 0xa7, 0x3d, 0xb7, 0x35,
-+        0x79, 0x23, 0x29, 0x14, 0x6a, 0x28, 0x09, 0xff,
-+        0x8c, 0x19, 0x26, 0xe3, 0x41, 0xc8, 0xe4, 0x13,
-+        0xbc, 0x8e};
-+//default client's key pair
-+static const unsigned char x509_priv_key[] = {
-+        0xf9, 0x42, 0xb4, 0x16, 0x89, 0x10, 0xf4, 0x07,
-+        0x99, 0xb2, 0xe2, 0x9a, 0xed, 0xd4, 0x39, 0xb8,
-+        0xca, 0xd4, 0x9d, 0x76, 0x11, 0x43, 0x3a, 0xac,
-+        0x14, 0xba, 0x17, 0x9d, 0x3e, 0xbb, 0xbf, 0xbc};
-+
-+static const unsigned char x509_pub_key_x[] = {
-+        0xe3, 0xd1, 0x67, 0x1e, 0xdc, 0x46, 0xf4, 0x19,
-+        0x50, 0x15, 0x2e, 0x3a, 0x2f, 0xd8, 0x68, 0x6b,
-+        0x37, 0x32, 0x84, 0x9e, 0x83, 0x81, 0xbf, 0x25,
-+        0x5d, 0xbb, 0x18, 0x07, 0x3c, 0xbd, 0xf3, 0xab};
-+
-+static const unsigned char x509_pub_key_y[] = {
-+        0xd3, 0xbf, 0x53, 0x59, 0xc9, 0x1e, 0xce, 0x5b,
-+        0x39, 0x6a, 0xe5, 0x60, 0xf3, 0x70, 0xdb, 0x66,
-+        0xb6, 0x80, 0xcb, 0x65, 0x0b, 0x35, 0x2a, 0x62,
-+        0x44, 0x89, 0x63, 0x64, 0x6f, 0x6f, 0xbd, 0xf0};
-+
-+//default CA pub key
-+static const unsigned char x509_ca_pub_x[] = {
-+        0x57, 0x94, 0x7f, 0x98, 0x7a, 0x02, 0x67, 0x09,
-+        0x25, 0xc1, 0xcb, 0x5a, 0xf5, 0x46, 0xfb, 0xad,
-+        0xf7, 0x68, 0x94, 0x8c, 0xa7, 0xe3, 0xf0, 0x5b,
-+        0xc3, 0x6b, 0x5c, 0x9b, 0xd3, 0x7d, 0x74, 0x12
-+};
-+static const unsigned char x509_ca_pub_y[] = {
-+        0xce, 0x68, 0xbc, 0x55, 0xf5, 0xf8, 0x1b, 0x3d,
-+        0xef, 0xed, 0x1f, 0x2b, 0xd2, 0x69, 0x5d, 0xcf,
-+        0x79, 0x16, 0xa6, 0xbd, 0x97, 0x96, 0x27, 0x60,
-+        0x5d, 0xd1, 0xb7, 0x93, 0xa2, 0x4a, 0x62, 0x4d
-+};
-+
-+//default server's key pair
-+static const unsigned char serv_pub_key_x[] = {
-+        0x07, 0x88, 0x10, 0xdc, 0x62, 0xd7, 0xe6, 0x9b,
-+        0x7c, 0xad, 0x6e, 0x78, 0xb0, 0x5f, 0x9a, 0x00,
-+        0x11, 0x74, 0x2c, 0x8b, 0xaf, 0x09, 0x65, 0x7c,
-+        0x86, 0x8e, 0x55, 0xcb, 0x39, 0x55, 0x72, 0xc6};
-+
-+static const unsigned char serv_pub_key_y[] = {
-+        0x65, 0x71, 0xcd, 0x03, 0xdc, 0x2a, 0x4f, 0x46,
-+        0x5b, 0x14, 0xc8, 0x27, 0x74, 0xab, 0xf4, 0x1f,
-+        0xc1, 0x35, 0x0d, 0x42, 0xbc, 0xc2, 0x9f, 0xb5,
-+        0xc1, 0x79, 0xb6, 0x8b, 0xca, 0xdb, 0xff, 0x82};
-+
-+
-+static unsigned char x509_client_cert[DTLS_MAX_CERT_SIZE];
-+static size_t x509_client_cert_len = 0;
-+static unsigned char x509_client_priv[DTLS_PRIVATE_KEY_SIZE+1];
-+static size_t x509_client_priv_is_set = 0;
-+static unsigned char x509_ca_pub[DTLS_PUBLIC_KEY_SIZE+1];
-+static size_t x509_ca_pub_is_set = 0;
-+
-+static int x509_info_from_file = 0;
-+#endif /*DTLS_X509*/
-+#ifdef DTLS_ECC
- static const unsigned char ecdsa_priv_key[] = {
-                       0x41, 0xC1, 0xCB, 0x6B, 0x51, 0x24, 0x7A, 0x14,
-                       0x43, 0x21, 0x43, 0x5B, 0x7A, 0x80, 0xE7, 0x14,
-@@ -65,7 +189,8 @@ static const unsigned char ecdsa_pub_key_y[] = {
-                       0xE9, 0x3F, 0x98, 0x72, 0x09, 0xDA, 0xED, 0x0B,
-                       0x4F, 0xAB, 0xC3, 0x6F, 0xC7, 0x72, 0xF8, 0x29};
--#ifdef DTLS_PSK
-+#endif /*DTLS_ECC*/
-+#if defined(DTLS_PSK) || defined(DTLS_X509)
- ssize_t
- read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
-   FILE *f;
-@@ -87,11 +212,11 @@ read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
-     result += bytes_read;
-     max_buf_len -= bytes_read;
-   }
--
-   fclose(f);
-   return result;
- }
--
-+#endif /*DTLS_PSK||DTLS_X509*/
-+#ifdef DTLS_PSK
- /* The PSK information for DTLS */
- #define PSK_ID_MAXLEN 256
- #define PSK_MAXLEN 256
-@@ -149,13 +274,14 @@ static int
- get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecc_key_t **result) {
-+    (void)ctx;
-+    (void)session;
-   static const dtls_ecc_key_t ecdsa_key = {
-     .curve = DTLS_ECDH_CURVE_SECP256R1,
-     .priv_key = ecdsa_priv_key,
-     .pub_key_x = ecdsa_pub_key_x,
-     .pub_key_y = ecdsa_pub_key_y
-   };
--
-   *result = &ecdsa_key;
-   return 0;
- }
-@@ -166,10 +292,115 @@ verify_ecdsa_key(struct dtls_context_t *ctx,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-+  (void)ctx;
-+  (void)session;
-+  (void)other_pub_x;
-+  (void)other_pub_y;
-+  (void)key_size;
-   return 0;
- }
-+
- #endif /* DTLS_ECC */
-+#ifdef DTLS_X509
-+static int
-+get_x509_key(struct dtls_context_t *ctx,
-+          const session_t *session,
-+          const dtls_ecc_key_t **result) {
-+    (void)ctx;
-+    (void)session;
-+  static dtls_ecc_key_t ecdsa_key = {
-+    .curve = DTLS_ECDH_CURVE_SECP256R1,
-+    .priv_key = x509_priv_key,
-+    .pub_key_x = x509_pub_key_x,
-+    .pub_key_y = x509_pub_key_y
-+  };
-+  if (x509_info_from_file)
-+      ecdsa_key.priv_key = x509_client_priv;
-+  *result = &ecdsa_key;
-+  return 0;
-+}
-+
-+static int
-+get_x509_cert(struct dtls_context_t *ctx,
-+        const session_t *session,
-+        const unsigned char **cert,
-+        size_t *cert_size)
-+{
-+    (void)ctx;
-+    (void)session;
-+    if (x509_info_from_file)
-+    {
-+        *cert = x509_client_cert;
-+        *cert_size = x509_client_cert_len;
-+    }
-+    else
-+    {
-+        *cert = g_client_certificate;
-+        *cert_size = CLIENT_CRT_LEN;
-+    }
-+
-+    return 0;
-+}
-+
-+int check_certificate(byte_array cert_der_code, byte_array ca_public_key)
-+{
-+    (void)cert_der_code;
-+    (void)ca_public_key;
-+    return 0;
-+}
-+
-+static int verify_x509_cert(struct dtls_context_t *ctx, const session_t *session,
-+                                  const unsigned char *cert, size_t cert_size,
-+                                  unsigned char *x,
-+                                  size_t x_size,
-+                                  unsigned char *y,
-+                                  size_t y_size)
-+{
-+    int ret;
-+    const unsigned char *ca_pub_x;
-+    const unsigned char *ca_pub_y;
-+    byte_array cert_der_code = BYTE_ARRAY_INITIALIZER;
-+    byte_array ca_public_key = BYTE_ARRAY_INITIALIZER;
-+    unsigned char ca_pub_key[DTLS_PUBLIC_KEY_SIZE];
-+    (void)ctx;
-+    (void)session;
-+
-+    if (x509_info_from_file)
-+    {
-+        ca_pub_x = x509_ca_pub;
-+        ca_pub_y = x509_ca_pub + DTLS_PUBLIC_KEY_SIZE/2;
-+    }
-+    else
-+    {
-+        ca_pub_x = x509_ca_pub_x;
-+        ca_pub_y = x509_ca_pub_y;
-+    }
-+
-+    cert_der_code.data = (uint8_t *)cert;
-+    cert_der_code.len = cert_size;
-+
-+    ca_public_key.len = DTLS_PUBLIC_KEY_SIZE;
-+    ca_public_key.data = ca_pub_key;
-+    memcpy(ca_public_key.data, ca_pub_x, DTLS_PUBLIC_KEY_SIZE/2);
-+    memcpy(ca_public_key.data + DTLS_PUBLIC_KEY_SIZE/2, ca_pub_y, DTLS_PUBLIC_KEY_SIZE/2);
-+
-+    memcpy(x, serv_pub_key_x, x_size);
-+    memcpy(y, serv_pub_key_y, y_size);
-+
-+    ret = (int) check_certificate(cert_der_code, ca_public_key);
-+
-+    return -ret;
-+}
-+
-+static int is_x509_active(struct dtls_context_t *ctx)
-+{
-+    (void)ctx;
-+    return 0;
-+}
-+
-+#endif /* DTLS_X509 */
-+
- static void
- try_send(struct dtls_context_t *ctx, session_t *dst) {
-   int res;
-@@ -190,6 +421,8 @@ static int
- read_from_peer(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *data, size_t len) {
-   size_t i;
-+  (void)ctx;
-+  (void)session;
-   for (i = 0; i < len; i++)
-     printf("%c", data[i]);
-   return 0;
-@@ -295,16 +528,24 @@ usage( const char *program, const char *version) {
-   fprintf(stderr, "%s v%s -- DTLS client implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
-+        "usage: %s"
- #ifdef DTLS_PSK
--        "usage: %s [-i file] [-s file] [-k file] [-o file] [-p port] [-v num] [-c num] addr [port]\n"
--#else /*  DTLS_PSK */
--        "usage: %s [-o file] [-p port] [-v num] [-c num] addr [port]\n"
-+          " [-i file] [-s file] [-k file]"
- #endif /* DTLS_PSK */
-+#ifdef DTLS_X509
-+          " [-x file] [-r file] [-u file]"
-+#endif /* DTLS_X509 */
-+          " [-o file] [-p port] [-v num] [-c num] addr [port]\n"
- #ifdef DTLS_PSK
-         "\t-i file\t\tread PSK Client identity from file\n"
-         "\t-s file\t\tread PSK Server identity from file\n"
-         "\t-k file\t\tread pre-shared key from file\n"
- #endif /* DTLS_PSK */
-+#ifdef DTLS_X509
-+          "\t-x file\tread Client certificate from file\n"
-+          "\t-r file\tread Client private key from file\n"
-+          "\t-u file\tread CA public key from file\n"
-+#endif /* DTLS_X509 */
-         "\t-o file\t\toutput received data to this file (use '-' for STDOUT)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-@@ -325,8 +566,15 @@ static dtls_handler_t cb = {
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
-   .get_ecdsa_key = get_ecdsa_key,
--  .verify_ecdsa_key = verify_ecdsa_key
-+  .verify_ecdsa_key = verify_ecdsa_key,
- #endif /* DTLS_ECC */
-+#ifdef DTLS_X509
-+  .get_x509_key = get_x509_key,
-+  .verify_x509_cert = verify_x509_cert,
-+  .get_x509_cert = get_x509_cert,
-+  .is_x509_active = is_x509_active,
-+#endif /* DTLS_X509 */
-+
- };
- #define DTLS_CLIENT_CMD_CLOSE "client:close"
-@@ -365,7 +613,7 @@ main(int argc, char **argv) {
-   memcpy(psk_key, PSK_DEFAULT_KEY, psk_key_length);
- #endif /* DTLS_PSK */
--  while ((opt = getopt(argc, argv, "p:o:v:c:" PSK_OPTIONS)) != -1) {
-+  while ((opt = getopt(argc, argv, "p:o:v:c:" PSK_OPTIONS X509_OPTIONS)) != -1) {
-     switch (opt) {
- #ifdef DTLS_PSK
-     case 'i' : {
-@@ -396,6 +644,47 @@ main(int argc, char **argv) {
-       break;
-     }
- #endif /* DTLS_PSK */
-+#ifdef DTLS_X509
-+    case 'x' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_client_cert, DTLS_MAX_CERT_SIZE);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read Client certificate. Using default\n");
-+      }
-+      else
-+      {
-+          x509_client_cert_len = result;
-+      }
-+      break;
-+    }
-+    case 'r' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_client_priv, DTLS_PRIVATE_KEY_SIZE+1);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read Client private key. Using default\n");
-+      }
-+      else
-+      {
-+          x509_client_priv_is_set = result;
-+      }
-+      break;
-+    }
-+    case 'u' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_ca_pub, DTLS_PUBLIC_KEY_SIZE+1);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read CA public key. Using default\n");
-+      }
-+      else
-+      {
-+          x509_ca_pub_is_set = result;
-+      }
-+      break;
-+    }
-+#endif /* DTLS_X509 */
-     case 'p' :
-       strncpy(port_str, optarg, NI_MAXSERV-1);
-       port_str[NI_MAXSERV - 1] = '\0';
-@@ -403,7 +692,7 @@ main(int argc, char **argv) {
-     case 'o' :
-       output_file.length = strlen(optarg);
-       output_file.s = (unsigned char *)malloc(output_file.length + 1);
--      
-+
-       if (!output_file.s) {
-       dtls_crit("cannot set output file: insufficient memory\n");
-       exit(-1);
-@@ -444,12 +733,29 @@ main(int argc, char **argv) {
-   }
-   dtls_set_log_level(log_level);
--  
-+
-   if (argc <= optind) {
-     usage(argv[0], dtls_package_version());
-     exit(1);
-   }
--  
-+
-+#ifdef DTLS_X509
-+  if (x509_client_cert_len && x509_client_priv_is_set && x509_ca_pub_is_set)
-+  {
-+      x509_info_from_file = 1;
-+  }
-+  else if(!(x509_client_cert_len || x509_client_priv_is_set || x509_ca_pub_is_set))
-+  {
-+      x509_info_from_file = 0;
-+  }
-+  else
-+  {
-+      fprintf(stderr,"please set -x, -r, -u options simultaneously");
-+      usage(argv[0], dtls_package_version());
-+      exit(1);
-+  }
-+#endif /* DTLS_X509 */
-+
-   memset(&dst, 0, sizeof(session_t));
-   /* resolve destination address where server should be sent */
-   res = resolve_address(argv[optind++], &dst.addr.sa);
-diff --git a/extlibs/tinydtls/tests/dtls-server.c b/extlibs/tinydtls/tests/dtls-server.c
-index 5893084..a3ede4d 100644
---- a/extlibs/tinydtls/tests/dtls-server.c
-+++ b/extlibs/tinydtls/tests/dtls-server.c
-@@ -14,12 +14,138 @@
- #include <netdb.h>
- #include <signal.h>
--#include "tinydtls.h" 
--#include "dtls.h" 
--#include "debug.h" 
-+#include "tinydtls.h"
-+#include "dtls.h"
-+#include "debug.h"
-+
-+#ifdef DTLS_X509
-+#define DTLS_PRIVATE_KEY_SIZE        (32)
-+#define DTLS_PUBLIC_KEY_SIZE         (64)
-+#endif
- #define DEFAULT_PORT 20220
-+/**
-+ * @struct byte_array
-+ *
-+ * General purpose byte array structure.
-+ *
-+ * Contains pointer to array of bytes and it's length.
-+ */
-+
-+typedef struct
-+{
-+    uint8_t *data;    /**< Pointer to the byte array */
-+    size_t len;      /**< Data size */
-+} byte_array;
-+
-+
-+/**@def BYTE_ARRAY_INITIALIZER
-+ *
-+ * Initializes of existing byte array pointer to \a NULL.
-+ */
-+#undef BYTE_ARRAY_INITIALIZER
-+#define BYTE_ARRAY_INITIALIZER {NULL, 0}
-+
-+#ifdef DTLS_X509
-+#define X509_OPTIONS         "x:r:u:"
-+#define SERVER_CRT_LEN 295
-+static const unsigned char g_server_certificate[SERVER_CRT_LEN] = {
-+        0x00, 0x01, 0x24,
-+        0x30, 0x82, 0x01, 0x20, 0x30, 0x81, 0xc4, 0xa0,
-+        0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x37,
-+        0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
-+        0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x30, 0x17,
-+        0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
-+        0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
-+        0x20, 0x49, 0x53, 0x53, 0x55, 0x45, 0x52, 0x30,
-+        0x1e, 0x17, 0x0d, 0x31, 0x33, 0x30, 0x31, 0x30,
-+        0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
-+        0x17, 0x0d, 0x34, 0x39, 0x30, 0x31, 0x30, 0x31,
-+        0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30,
-+        0x17, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55,
-+        0x04, 0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61,
-+        0x6c, 0x20, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52,
-+        0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
-+        0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
-+        0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
-+        0x42, 0x00, 0x04, 0x07, 0x88, 0x10, 0xdc, 0x62,
-+        0xd7, 0xe6, 0x9b, 0x7c, 0xad, 0x6e, 0x78, 0xb0,
-+        0x5f, 0x9a, 0x00, 0x11, 0x74, 0x2c, 0x8b, 0xaf,
-+        0x09, 0x65, 0x7c, 0x86, 0x8e, 0x55, 0xcb, 0x39,
-+        0x55, 0x72, 0xc6, 0x65, 0x71, 0xcd, 0x03, 0xdc,
-+        0x2a, 0x4f, 0x46, 0x5b, 0x14, 0xc8, 0x27, 0x74,
-+        0xab, 0xf4, 0x1f, 0xc1, 0x35, 0x0d, 0x42, 0xbc,
-+        0xc2, 0x9f, 0xb5, 0xc1, 0x79, 0xb6, 0x8b, 0xca,
-+        0xdb, 0xff, 0x82, 0x30, 0x0c, 0x06, 0x08, 0x2a,
-+        0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05,
-+        0x00, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,
-+        0x00, 0xb1, 0x81, 0x81, 0x92, 0x0e, 0x76, 0x7c,
-+        0xeb, 0xf5, 0x37, 0xde, 0x27, 0xc4, 0x01, 0xc8,
-+        0x96, 0xc3, 0xe5, 0x9f, 0x47, 0x7e, 0x25, 0x92,
-+        0xa4, 0xba, 0x22, 0x25, 0xa3, 0x81, 0x19, 0xcf,
-+        0x0d, 0x02, 0x21, 0x00, 0xca, 0x92, 0xbe, 0x79,
-+        0xc7, 0x82, 0x84, 0x64, 0xc4, 0xc4, 0xf4, 0x3d,
-+        0x69, 0x79, 0x68, 0xc0, 0xf1, 0xba, 0xaf, 0x6c,
-+        0xbb, 0xdd, 0x54, 0x7d, 0x07, 0xe7, 0x53, 0x3b,
-+        0xc3, 0x1b, 0x87, 0x04};
-+
-+//default server's key pair
-+static const unsigned char x509_priv_key[] = {
-+        0xaa, 0xa3, 0x46, 0xf1, 0x3c, 0x56, 0x5d, 0x08,
-+        0x5e, 0x59, 0xba, 0x7f, 0xd2, 0x21, 0x62, 0xc6,
-+        0xcc, 0x5d, 0xfa, 0x3f, 0xb5, 0x25, 0xa9, 0x89,
-+        0x4f, 0x32, 0xe8, 0x2a, 0xe0, 0xee, 0x9b, 0x4c};
-+
-+static const unsigned char x509_pub_key_x[] = {
-+        0x07, 0x88, 0x10, 0xdc, 0x62, 0xd7, 0xe6, 0x9b,
-+        0x7c, 0xad, 0x6e, 0x78, 0xb0, 0x5f, 0x9a, 0x00,
-+        0x11, 0x74, 0x2c, 0x8b, 0xaf, 0x09, 0x65, 0x7c,
-+        0x86, 0x8e, 0x55, 0xcb, 0x39, 0x55, 0x72, 0xc6};
-+
-+static const unsigned char x509_pub_key_y[] = {
-+        0x65, 0x71, 0xcd, 0x03, 0xdc, 0x2a, 0x4f, 0x46,
-+        0x5b, 0x14, 0xc8, 0x27, 0x74, 0xab, 0xf4, 0x1f,
-+        0xc1, 0x35, 0x0d, 0x42, 0xbc, 0xc2, 0x9f, 0xb5,
-+        0xc1, 0x79, 0xb6, 0x8b, 0xca, 0xdb, 0xff, 0x82};
-+
-+//default CA pub key
-+static const unsigned char x509_ca_pub_x[] = {
-+        0x57, 0x94, 0x7f, 0x98, 0x7a, 0x02, 0x67, 0x09,
-+        0x25, 0xc1, 0xcb, 0x5a, 0xf5, 0x46, 0xfb, 0xad,
-+        0xf7, 0x68, 0x94, 0x8c, 0xa7, 0xe3, 0xf0, 0x5b,
-+        0xc3, 0x6b, 0x5c, 0x9b, 0xd3, 0x7d, 0x74, 0x12
-+};
-+
-+static const unsigned char x509_ca_pub_y[] = {
-+        0xce, 0x68, 0xbc, 0x55, 0xf5, 0xf8, 0x1b, 0x3d,
-+        0xef, 0xed, 0x1f, 0x2b, 0xd2, 0x69, 0x5d, 0xcf,
-+        0x79, 0x16, 0xa6, 0xbd, 0x97, 0x96, 0x27, 0x60,
-+        0x5d, 0xd1, 0xb7, 0x93, 0xa2, 0x4a, 0x62, 0x4d
-+};
-+
-+static const unsigned char client_pub_key_x[] = {
-+        0xe3, 0xd1, 0x67, 0x1e, 0xdc, 0x46, 0xf4, 0x19,
-+        0x50, 0x15, 0x2e, 0x3a, 0x2f, 0xd8, 0x68, 0x6b,
-+        0x37, 0x32, 0x84, 0x9e, 0x83, 0x81, 0xbf, 0x25,
-+        0x5d, 0xbb, 0x18, 0x07, 0x3c, 0xbd, 0xf3, 0xab};
-+
-+static const unsigned char client_pub_key_y[] = {
-+        0xd3, 0xbf, 0x53, 0x59, 0xc9, 0x1e, 0xce, 0x5b,
-+        0x39, 0x6a, 0xe5, 0x60, 0xf3, 0x70, 0xdb, 0x66,
-+        0xb6, 0x80, 0xcb, 0x65, 0x0b, 0x35, 0x2a, 0x62,
-+        0x44, 0x89, 0x63, 0x64, 0x6f, 0x6f, 0xbd, 0xf0};
-+
-+static unsigned char x509_server_cert[DTLS_MAX_CERT_SIZE];
-+static size_t x509_server_cert_len = 0;
-+static unsigned char x509_server_priv[DTLS_PRIVATE_KEY_SIZE+1];
-+static size_t x509_server_priv_is_set = 0;
-+static unsigned char x509_ca_pub[DTLS_PUBLIC_KEY_SIZE+1];
-+static size_t x509_ca_pub_is_set = 0;
-+
-+static int x509_info_from_file = 0;
-+#endif /*DTLS_X509*/
-+#ifdef DTLS_ECC
- static const unsigned char ecdsa_priv_key[] = {
-                       0xD9, 0xE2, 0x70, 0x7A, 0x72, 0xDA, 0x6A, 0x05,
-                       0x04, 0x99, 0x5C, 0x86, 0xED, 0xDB, 0xE3, 0xEF,
-@@ -37,7 +163,7 @@ static const unsigned char ecdsa_pub_key_y[] = {
-                       0x1D, 0xDC, 0xF4, 0xF4, 0x2E, 0x2F, 0x26, 0x31,
-                       0xD0, 0x43, 0xB1, 0xFB, 0x03, 0xE2, 0x2F, 0x4D,
-                       0x17, 0xDE, 0x43, 0xF9, 0xF9, 0xAD, 0xEE, 0x70};
--
-+#endif /*DTLS_ECC*/
- #if 0
- /* SIGINT handler: set quit to 1 for graceful termination */
- void
-@@ -46,6 +172,34 @@ handle_sigint(int signum) {
- }
- #endif
-+#ifdef DTLS_X509
-+ssize_t
-+read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
-+  FILE *f;
-+  ssize_t result = 0;
-+
-+  f = fopen(arg, "r");
-+  if (f == NULL)
-+    return -1;
-+
-+  while (!feof(f)) {
-+    size_t bytes_read;
-+    bytes_read = fread(buf, 1, max_buf_len, f);
-+    if (ferror(f)) {
-+      result = -1;
-+      break;
-+    }
-+
-+    buf += bytes_read;
-+    result += bytes_read;
-+    max_buf_len -= bytes_read;
-+  }
-+
-+  fclose(f);
-+  return result;
-+}
-+#endif /*DTLS_X509*/
-+
- #ifdef DTLS_PSK
- #define PSK_SERVER_HINT  "Server_identity"
-@@ -59,6 +213,8 @@ get_psk_info(struct dtls_context_t *ctx, const session_t *session,
-            const unsigned char *id, size_t id_len,
-            unsigned char *result, size_t result_length) {
-+  (void)ctx;
-+  (void)session;
-   struct keymap_t {
-     unsigned char *id;
-     size_t id_length;
-@@ -86,7 +242,7 @@ get_psk_info(struct dtls_context_t *ctx, const session_t *session,
-   case DTLS_PSK_KEY:
-     if (id) {
-       int i;
--      for (i = 0; i < sizeof(psk)/sizeof(struct keymap_t); i++) {
-+      for (i = 0; i < (int)(sizeof(psk)/sizeof(struct keymap_t)); i++) {
-         if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) {
-         if (result_length < psk[i].key_length) {
-           dtls_warn("buffer too small for PSK");
-@@ -114,6 +270,8 @@ static int
- get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecc_key_t **result) {
-+    (void)ctx;
-+    (void)session;
-   static const dtls_ecc_key_t ecdsa_key = {
-     .curve = DTLS_ECDH_CURVE_SECP256R1,
-     .priv_key = ecdsa_priv_key,
-@@ -131,15 +289,120 @@ verify_ecdsa_key(struct dtls_context_t *ctx,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-+  (void)ctx;
-+  (void)session;
-+  (void)other_pub_x;
-+  (void)other_pub_y;
-+  (void)key_size;
-   return 0;
- }
- #endif /* DTLS_ECC */
-+#ifdef DTLS_X509
-+static int
-+get_x509_key(struct dtls_context_t *ctx,
-+          const session_t *session,
-+          const dtls_ecc_key_t **result) {
-+    (void)ctx;
-+    (void)session;
-+  static dtls_ecc_key_t ecdsa_key = {
-+    .curve = DTLS_ECDH_CURVE_SECP256R1,
-+    .priv_key = x509_priv_key,
-+    .pub_key_x = x509_pub_key_x,
-+    .pub_key_y = x509_pub_key_y
-+  };
-+  if (x509_info_from_file)
-+      ecdsa_key.priv_key = x509_server_priv;
-+
-+  *result = &ecdsa_key;
-+  return 0;
-+}
-+
-+static int
-+get_x509_cert(struct dtls_context_t *ctx,
-+              const session_t *session,
-+              const unsigned char **cert,
-+              size_t *cert_size)
-+{
-+    (void)ctx;
-+    (void)session;
-+    if (x509_info_from_file)
-+    {
-+        *cert = x509_server_cert;
-+        *cert_size = x509_server_cert_len;
-+    }
-+    else
-+    {
-+        *cert = g_server_certificate;
-+        *cert_size = SERVER_CRT_LEN;
-+    }
-+
-+    return 0;
-+}
-+
-+static int check_certificate(byte_array cert_der_code, byte_array ca_public_key)
-+{
-+    (void)cert_der_code;
-+    (void)ca_public_key;
-+    return 0;
-+}
-+
-+static int verify_x509_cert(struct dtls_context_t *ctx, const session_t *session,
-+                                  const unsigned char *cert, size_t cert_size,
-+                                  unsigned char *x,
-+                                  size_t x_size,
-+                                  unsigned char *y,
-+                                  size_t y_size)
-+{
-+    int ret;
-+    const unsigned char *ca_pub_x;
-+    const unsigned char *ca_pub_y;
-+    byte_array cert_der_code = BYTE_ARRAY_INITIALIZER;
-+    byte_array ca_public_key = BYTE_ARRAY_INITIALIZER;
-+    unsigned char ca_pub_key[DTLS_PUBLIC_KEY_SIZE];
-+    (void)ctx;
-+    (void)session;
-+
-+    if (x509_info_from_file)
-+    {
-+        ca_pub_x = x509_ca_pub;
-+        ca_pub_y = x509_ca_pub + DTLS_PUBLIC_KEY_SIZE/2;
-+    }
-+    else
-+    {
-+        ca_pub_x = x509_ca_pub_x;
-+        ca_pub_y = x509_ca_pub_y;
-+    }
-+
-+    cert_der_code.data = (uint8_t *)cert;
-+    cert_der_code.len = cert_size;
-+
-+    ca_public_key.len = DTLS_PUBLIC_KEY_SIZE;
-+    ca_public_key.data = ca_pub_key;
-+    memcpy(ca_public_key.data, ca_pub_x, DTLS_PUBLIC_KEY_SIZE/2);
-+    memcpy(ca_public_key.data + DTLS_PUBLIC_KEY_SIZE/2, ca_pub_y, DTLS_PUBLIC_KEY_SIZE/2);
-+
-+    memcpy(x, client_pub_key_x, x_size);
-+    memcpy(y, client_pub_key_y, y_size);
-+
-+    ret = (int) check_certificate(cert_der_code, ca_public_key);
-+
-+  return -ret;
-+}
-+
-+static int is_x509_active(struct dtls_context_t *ctx)
-+{
-+    (void)ctx;
-+    return 0;
-+}
-+#endif /* DTLS_X509 */
-+
-+
- #define DTLS_SERVER_CMD_CLOSE "server:close"
- #define DTLS_SERVER_CMD_RENEGOTIATE "server:renegotiate"
- static int
--read_from_peer(struct dtls_context_t *ctx, 
-+read_from_peer(struct dtls_context_t *ctx,
-              session_t *session, uint8 *data, size_t len) {
-   size_t i;
-   for (i = 0; i < len; i++)
-@@ -190,7 +453,7 @@ dtls_handle_read(struct dtls_context_t *ctx) {
-   } else {
-     dtls_debug("got %d bytes from port %d\n", len, 
-            ntohs(session.addr.sin6.sin6_port));
--    if (sizeof(buf) < len) {
-+    if ((int)(sizeof(buf)) < len) {
-       dtls_warn("packet was truncated (%d bytes lost)\n", len - sizeof(buf));
-     }
-   }
-@@ -250,13 +513,21 @@ usage(const char *program, const char *version) {
-   fprintf(stderr, "%s v%s -- DTLS server implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
-         "usage: %s [-A address] [-p port] [-v num] [-a enable|disable]\n"
-+#ifdef DTLS_X509
-+      " [-x file] [-r file] [-u file]"
-+#endif /* DTLS_X509 */
-         "\t-A address\t\tlisten on specified address (default is ::)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-         "\t-a enable|disable\t(default: disable)\n"
-         "\t\t\t\tenable:enable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n"
--        "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n",
--         program, version, program, DEFAULT_PORT);
-+        "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n"
-+#ifdef DTLS_X509
-+      "\t-x file\tread Server certificate from file\n"
-+      "\t-r file\tread Server private key from file\n"
-+      "\t-u file\tread CA public key from file\n"
-+#endif /* DTLS_X509 */
-+      ,program, version, program, DEFAULT_PORT);
- }
- static dtls_handler_t cb = {
-@@ -268,11 +539,18 @@ static dtls_handler_t cb = {
- #endif /* DTLS_PSK */
- #ifdef DTLS_ECC
-   .get_ecdsa_key = get_ecdsa_key,
--  .verify_ecdsa_key = verify_ecdsa_key
-+  .verify_ecdsa_key = verify_ecdsa_key,
- #endif /* DTLS_ECC */
-+#ifdef DTLS_X509
-+  .get_x509_key = get_x509_key,
-+  .verify_x509_cert = verify_x509_cert,
-+  .get_x509_cert = get_x509_cert,
-+  .is_x509_active = is_x509_active,
-+#endif
-+
- };
--int 
-+int
- main(int argc, char **argv) {
-   dtls_context_t *the_context = NULL;
-   log_t log_level = DTLS_LOG_WARN;
-@@ -312,6 +590,47 @@ main(int argc, char **argv) {
-       if( strcmp(optarg, "enable") == 0)
-           ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-       break;
-+#ifdef DTLS_X509
-+    case 'x' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_server_cert, DTLS_MAX_CERT_SIZE);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read Server certificate. Using default\n");
-+      }
-+      else
-+      {
-+          x509_server_cert_len = result;
-+      }
-+      break;
-+    }
-+    case 'r' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_server_priv, DTLS_PRIVATE_KEY_SIZE+1);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read Server private key. Using default\n");
-+      }
-+      else
-+      {
-+          x509_server_priv_is_set = result;
-+      }
-+      break;
-+    }
-+    case 'u' :
-+    {
-+      ssize_t result = read_from_file(optarg, x509_ca_pub, DTLS_PUBLIC_KEY_SIZE+1);
-+      if (result < 0)
-+      {
-+          dtls_warn("Cannot read CA public key. Using default\n");
-+      }
-+      else
-+      {
-+          x509_ca_pub_is_set = result;
-+      }
-+      break;
-+    }
-+#endif /* DTLS_X509 */
-     default:
-       usage(argv[0], dtls_package_version());
-       exit(1);
-@@ -320,6 +639,23 @@ main(int argc, char **argv) {
-   dtls_set_log_level(log_level);
-+#ifdef DTLS_X509
-+  if (x509_server_cert_len && x509_server_priv_is_set && x509_ca_pub_is_set)
-+  {
-+      x509_info_from_file = 1;
-+  }
-+  else if(!(x509_server_cert_len || x509_server_priv_is_set || x509_ca_pub_is_set))
-+  {
-+      x509_info_from_file = 0;
-+  }
-+  else
-+  {
-+      fprintf(stderr,"please set -x, -r, -u options simultaneously");
-+      usage(argv[0], dtls_package_version());
-+      exit(1);
-+  }
-+#endif /* DTLS_X509 */
-+
-   /* init socket and set it to non-blocking */
-   fd = socket(listen_addr.sin6_family, SOCK_DGRAM, 0);
-diff --git a/extlibs/tinydtls/tinydtls.h b/extlibs/tinydtls/tinydtls.h
-index b1b8cdf..dd27c55 100644
---- a/extlibs/tinydtls/tinydtls.h
-+++ b/extlibs/tinydtls/tinydtls.h
-@@ -42,4 +42,7 @@
- /** Defined to 1 if tinydtls is built for Contiki OS */
- /* #undef WITH_CONTIKI */
-+/** Define to 1 if building with X.509 support */
-+#define DTLS_X509 1
-+
- #endif /* _DTLS_TINYDTLS_H_ */
-diff --git a/extlibs/tinydtls/tinydtls.h.in b/extlibs/tinydtls/tinydtls.h.in
-index a2e6685..10a8d9a 100644
---- a/extlibs/tinydtls/tinydtls.h.in
-+++ b/extlibs/tinydtls/tinydtls.h.in
-@@ -41,4 +41,7 @@
- /** Defined to 1 if tinydtls is built for Contiki OS */
- #undef WITH_CONTIKI
-+/** Define to 1 if building with X.509 support */
-+#undef DTLS_X509
-+
- #endif /* _DTLS_TINYDTLS_H_ */
--- 
-1.9.1
-
diff --git a/extlibs/tinydtls/Android.mk b/extlibs/tinydtls/Android.mk
deleted file mode 100644 (file)
index a507a51..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-APP_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_PATH = $(APP_PATH)
-LOCAL_MODULE := TinyDtls
-LOCAL_SRC_FILES := dtls.c crypto.c ccm.c hmac.c netq.c peer.c dtls_time.c session.c
-#LOCAL_SRC_FILES += debug.c
-LOCAL_SRC_FILES += aes/rijndael.c
-LOCAL_SRC_FILES += ecc/ecc.c
-LOCAL_SRC_FILES += sha2/sha2.c
-
-LOCAL_C_INCLUDES := $(APP_PATH) $(APP_PATH)/aes $(APP_PATH)/ecc $(APP_PATH)/sha2
-
-#LOCAL_CFLAGS := -DWITH_OICSTACK -fPIC
-LOCAL_CFLAGS += -DDTLSv12 -DWITH_SHA256 -DDTLS_CHECK_CONTENTTYPE -DHAVE_SYS_TIME_H -DNDEBUG
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/extlibs/tinydtls/LICENSE b/extlibs/tinydtls/LICENSE
deleted file mode 100644 (file)
index 2588fe2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/extlibs/tinydtls/Makefile.in b/extlibs/tinydtls/Makefile.in
deleted file mode 100644 (file)
index 9a52e4c..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-# Makefile for tinydtls
-#
-# Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-ETAGS = @ETAGS@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-libdir = @libdir@
-includedir = @includedir@/@PACKAGE_NAME@
-package = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
-
-install := cp
-
-# files and flags
-SOURCES:= dtls.c crypto.c ccm.c hmac.c netq.c peer.c dtls_time.c session.c
-ifneq ("@NDEBUG@", "1")
-SOURCES += debug.c
-endif
-SUB_OBJECTS:=aes/rijndael.o @OPT_OBJS@
-OBJECTS:= $(patsubst %.c, %.o, $(SOURCES)) $(SUB_OBJECTS)
-HEADERS:=dtls.h hmac.h debug.h dtls_config.h uthash.h numeric.h crypto.h global.h ccm.h \
- netq.h t_list.h alert.h utlist.h prng.h peer.h state.h dtls_time.h session.h \
- tinydtls.h
-CFLAGS:=-Wall -pedantic -std=c99 @CFLAGS@
-CPPFLAGS:=@CPPFLAGS@ -DDTLS_CHECK_CONTENTTYPE
-SUBDIRS:=tests doc platform-specific sha2 aes ecc
-DISTSUBDIRS:=$(SUBDIRS) examples/contiki
-DISTDIR=$(top_builddir)/$(package)
-FILES:=Makefile.in configure configure.in dtls_config.h.in tinydtls.h.in \
-  Makefile.tinydtls $(SOURCES) $(HEADERS)
-LIB:=libtinydtls.a
-LDFLAGS:=@LIBS@
-ARFLAGS:=cru
-doc:=doc
-
-.PHONY: all dirs clean install dist distclean .gitignore doc TAGS
-
-ifneq ("@WITH_CONTIKI@", "1")
-.SUFFIXES:
-.SUFFIXES:      .c .o
-
-all:   $(LIB) dirs
-
-check: 
-       echo DISTDIR: $(DISTDIR)
-       echo top_builddir: $(top_builddir)
-       $(MAKE) -C tests check
-
-dirs:  $(SUBDIRS)
-       for dir in $^; do \
-               $(MAKE) -C $$dir ; \
-       done
-
-$(SUB_OBJECTS)::
-       $(MAKE) -C $(@D) $(@F)
-
-$(LIB):        $(OBJECTS)
-       $(AR) $(ARFLAGS) $@ $^ 
-       ranlib $@
-
-clean:
-       @rm -f $(PROGRAM) main.o $(LIB) $(OBJECTS)
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir clean ; \
-       done
-else  # WITH_CONTIKI
-all:
-       $(MAKE) -C examples/contiki $@
-endif # WITH_CONTIKI
-
-doc:   
-       $(MAKE) -C doc
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ $(DISTDIR).tar.gz
-
-dist:  $(FILES) $(DISTSUBDIRS)
-       test -d $(DISTDIR) || mkdir $(DISTDIR)
-       cp $(FILES) $(DISTDIR)
-       for dir in $(DISTSUBDIRS); do \
-               $(MAKE) -C $$dir dist; \
-       done
-       tar czf $(package).tar.gz $(DISTDIR)
-
-install:       $(LIB) $(HEADERS) $(SUBDIRS)
-       test -d $(libdir) || mkdir -p $(libdir)
-       test -d $(includedir) || mkdir -p $(includedir)
-       $(install) $(LIB) $(libdir)/
-       $(install) $(HEADERS) $(includedir)/
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir install="$(install)" includedir=$(includedir) install; \
-       done
-
-TAGS:  
-       $(ETAGS) -o $@.new $(SOURCES) 
-       $(ETAGS) -a -o $@.new $(HEADERS) 
-       mv $@.new $@
-
-# files that should be ignored by git
-GITIGNOREDS:= core \*~ \*.[oa] \*.gz \*.cap \*.pcap Makefile \
- autom4te.cache/ config.h config.log config.status configure \
- doc/Doxyfile doc/doxygen.out doc/html/ $(LIB) tests/ccm-test \
- tests/dtls-client tests/dtls-server tests/prf-test $(package) \
- $(DISTDIR)/ TAGS \*.patch .gitignore ecc/testecc ecc/testfield \
- \*.d \*.hex \*.elf \*.map obj_\* tinydtls.h dtls_config.h \
- $(addprefix \*., $(notdir $(wildcard ../../platform/*))) \
- .project
-
-.gitignore:
-       echo $(GITIGNOREDS) | sed 's/ /\n/g' > $@
-
diff --git a/extlibs/tinydtls/Makefile.tinydtls b/extlibs/tinydtls/Makefile.tinydtls
deleted file mode 100644 (file)
index 88affc4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This is a -*- Makefile -*-
-
-ifeq ($(TARGET), redbee-econotag)
-CFLAGS += -DSHA2_USE_INTTYPES_H=1 -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN
-endif
-
-ifeq ($(TARGET), wismote)
-CFLAGS += -DSHA2_USE_INTTYPES_H=1 -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN
-endif
-
-ifeq ($(TARGET), exp5438)
-CFLAGS += -DSHA2_USE_INTTYPES_H=1 -DLITTLE_ENDIAN=3412 -DBYTE_ORDER=LITTLE_ENDIAN
-endif
-
-ifeq ($(TARGET), native)
-CFLAGS += -DSHA2_USE_INTTYPES_H=1
-endif
-
-ifeq ($(TARGET), minimal-net)
-CFLAGS += -DSHA2_USE_INTTYPES_H=1
-endif
-
-CFLAGS += -DDTLSv12 -DWITH_SHA256 
-tinydtls_src = dtls.c crypto.c hmac.c rijndael.c sha2.c ccm.c netq.c ecc.c dtls_time.c peer.c session.c
-
-# This adds support for TLS_PSK_WITH_AES_128_CCM_8
-CFLAGS += -DDTLS_PSK
-
-# This adds support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
-CFLAGS += -DDTLS_ECC
-tinydtls_src += ecc.c
-
-# This activates debugging support
-# CFLAGS += -DNDEBUG
-tinydtls_src += debug.c
-
diff --git a/extlibs/tinydtls/README b/extlibs/tinydtls/README
deleted file mode 100644 (file)
index 4f8fe55..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-CONTENTS
-
-This library contains functions and structures that can help
-constructing a single-threaded UDP server with DTLS support in
-C99. The following components are available:
-
-* dtls
-  Basic support for DTLS with pre-shared key mode.
-
-* tests
-  The subdirectory tests contains test programs that show how each
-  component is used.
-
-BUILDING
-
-When using the code from the git repository at sourceforge, invoke
-'autoreconf' to re-create the configure script. To build for Contiki,
-place tinydtls into Contiki's apps directory and call
-  ./configure --with-contiki.
-
-After configuration, invoke make to build the library and associated
-test programs. To add tinydtls as Contiki application, drop it into
-the apps directory and add the following line to your Makefile:
-
-  APPS += tinydtls/aes tinydtls/sha2 tinydtls/ecc tinydtls
-
diff --git a/extlibs/tinydtls/README_Iotivity b/extlibs/tinydtls/README_Iotivity
deleted file mode 100644 (file)
index 3d18404..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-SUPPORTED CIPHER-SUITES
-  TLS_PSK_WITH_AES_128_CCM_8(0xC0A8)
-  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8(0xC0AE)
-  TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256(0xC037)
-  TLS_ECDH_anon_WITH_AES_128_CBC_SHA256(0xC018)
-
-TEST APPLICATIONS
-These applications can be build from Iotivity's root directory using below commands:
-scons extlibs/tinydtls/dtls-client SECURED=1 RELEASE=0
-scons extlibs/tinydtls/dtls-server SECURED=1 RELEASE=0
-
-
-INTER-OPERABILITY TESTING
-tinyDTLS's cipher-suite implementations can be verified for compatibility against other
-SSL libraries.
-Use below commands to perform compatibility testing against mBed SSL library.
-./ssl_server2 debug_level=5 dtls=1 psk=73656372657450534b psk_identity=Client_identity \
-    force_version=dtls1_2 force_ciphersuite=TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256
-./dtls-client -v 6 -c 4 localhost 4433
-
-./ssl_client2 debug_level=5 dtls=1 psk=73656372657450534b psk_identity=Client_identity \
-    force_version=dtls1_2 force_ciphersuite=TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256
-./dtls-server -v 6 localhost -p 4433
-
-Above commands can also be tested with TLS-PSK-WITH-AES-128-CCM-8 cipher suite.
-
diff --git a/extlibs/tinydtls/SConscript b/extlibs/tinydtls/SConscript
deleted file mode 100644 (file)
index 41e480e..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# *****************************************************************
-#
-#  Copyright 2015 Samsung Electronics 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.
-#
-# *****************************************************************/
-##
-# Tinydtls build script
-##
-
-Import('env')
-
-print "Reading Tinydtls folder script"
-
-target_os = env.get('TARGET_OS')
-
-if(target_os) == 'arduino':
-       env.Replace(CFLAGS = env.get('CXXFLAGS'))
-
-root_dir = './'
-tinydtls_src_path = root_dir
-
-dtls_env = env.Clone()
-
-dtls_env.PrependUnique(CPPPATH = [root_dir])
-dtls_env.AppendUnique(CPPPATH = [root_dir+'aes/'])
-dtls_env.AppendUnique(CPPPATH = [root_dir+'ecc/'])
-dtls_env.AppendUnique(CPPPATH = [root_dir+'sha2/'])
-
-######################################################################
-# Source files and Target(s)
-######################################################################
-tinydtls_src = [
-                'dtls.c',
-                'crypto.c',
-                'ccm.c',
-                'hmac.c',
-                'netq.c',
-                'peer.c',
-                'dtls_time.c',
-                'session.c',
-                'aes/rijndael.c',
-                'ecc/ecc.c',
-                'sha2/sha2.c',
-        ]
-
-if not dtls_env.get('RELEASE'):
-       if(target_os) not in ['arduino']:
-               tinydtls_src += ['debug.c']
-       else:
-               dtls_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
-else:
-       dtls_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
-
-dtls_env.AppendUnique(CPPDEFINES = ['DTLSV12',  'WITH_SHA256', 'DTLS_CHECK_CONTENTTYPE', 'SHA2_USE_INTTYPES_H'])
-env.AppendUnique(CPPDEFINES = ['SHA2_USE_INTTYPES_H'])
-
-libtinydtls = dtls_env.StaticLibrary('tinydtls', tinydtls_src, OBJPREFIX='libtinydtls_')
-
-######################################################################
-# Generate tinydtls samples
-#
-# Note:
-# Currently there is a bug in debug.h/debug.c which fails compilation
-# of tinydtls samples in release mode. This bug is being tracked in
-# IOT-395
-######################################################################
-if not env.get('RELEASE'):
-       samples_env = dtls_env.Clone()
-
-       if target_os not in ['arduino', 'windows']:
-               samples_env.AppendUnique(CPPDEFINES = ['_GNU_SOURCE'])
-
-       dtlsserver = samples_env.Program('dtls-server', ['tests/dtls-server.c'])
-       dtlsclient = samples_env.Program('dtls-client', ['tests/dtls-client.c'])
-
-       samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-       samples_env.PrependUnique(LIBS = ['tinydtls'])
-
-       Alias("samples", [dtlsserver, dtlsclient])
-
-       samples_env.AppendTarget('samples')
-
-dtls_env.InstallTarget(libtinydtls, 'tinydtls');
-
diff --git a/extlibs/tinydtls/aes/Makefile.in b/extlibs/tinydtls/aes/Makefile.in
deleted file mode 100644 (file)
index 4cf29d4..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# Makefile for tinydtls
-#
-# Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-top_srcdir:= @top_srcdir@
-
-SOURCES:= rijndael.c
-HEADERS:= rijndael.h
-OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
-CPPFLAGS=@CPPFLAGS@
-CFLAGS=-Wall -std=c99 -pedantic @CFLAGS@
-LDLIBS=@LIBS@
-FILES:=Makefile.in $(SOURCES) $(HEADERS) 
-DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-
-.PHONY: all dirs clean install dist distclean .gitignore doc
-
-.SUFFIXES:
-.SUFFIXES:      .c .o
-
-all:
-
-check: 
-       echo DISTDIR: $(DISTDIR)
-       echo top_builddir: $(top_builddir)
-
-clean:
-       @rm -f $(PROGRAMS) main.o $(LIB) $(OBJECTS)
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir clean ; \
-       done
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ $(DISTDIR).tar.gz
-
-dist:  $(FILES)
-       test -d $(DISTDIR)/aes || mkdir $(DISTDIR)/aes
-       cp -p $(FILES) $(DISTDIR)/aes
-
-install:       $(HEADERS)
-       test -d $(includedir)/aes || mkdir -p $(includedir)/aes
-       $(install) $(HEADERS) $(includedir)/aes
-
-.gitignore:
-       echo "core\n*~\n*.[oa]\n*.gz\n*.cap\n$(PROGRAM)\n$(DISTDIR)\n.gitignore" >$@
diff --git a/extlibs/tinydtls/aes/rijndael.c b/extlibs/tinydtls/aes/rijndael.c
deleted file mode 100644 (file)
index 33001a8..0000000
+++ /dev/null
@@ -1,1287 +0,0 @@
-/*     $OpenBSD: rijndael.c,v 1.19 2008/06/09 07:49:45 djm Exp $ */
-
-/**
- * rijndael-alg-fst.c
- *
- * @version 3.0 (December 2000)
- *
- * Optimised ANSI C code for the Rijndael cipher (now AES)
- *
- * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
- * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
- * @author Paulo Barreto <paulo.barreto@terra.com.br>
- *
- * This code is hereby placed in the public domain.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* #include <sys/param.h> */
-/* #include <sys/systm.h> */
-
-#include "rijndael.h"
-
-#ifdef ARDUINO_AVR_MEGA2560
-       #include <pgmspace.h>
-#else
-       #define PROGMEM
-       #define pgm_read_dword *
-#endif
-
-#undef FULL_UNROLL
-
-/*
-Te0[x] = S [x].[02, 01, 01, 03];
-Te1[x] = S [x].[03, 02, 01, 01];
-Te2[x] = S [x].[01, 03, 02, 01];
-Te3[x] = S [x].[01, 01, 03, 02];
-Te4[x] = S [x].[01, 01, 01, 01];
-
-Td0[x] = Si[x].[0e, 09, 0d, 0b];
-Td1[x] = Si[x].[0b, 0e, 09, 0d];
-Td2[x] = Si[x].[0d, 0b, 0e, 09];
-Td3[x] = Si[x].[09, 0d, 0b, 0e];
-Td4[x] = Si[x].[01, 01, 01, 01];
-*/
-
-PROGMEM static const aes_u32 Te0[256] = {
-    0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
-    0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
-    0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU,
-    0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU,
-    0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U,
-    0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU,
-    0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU,
-    0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU,
-    0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU,
-    0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU,
-    0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U,
-    0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU,
-    0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU,
-    0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U,
-    0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU,
-    0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU,
-    0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU,
-    0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU,
-    0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU,
-    0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U,
-    0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU,
-    0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU,
-    0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU,
-    0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU,
-    0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U,
-    0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U,
-    0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U,
-    0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U,
-    0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU,
-    0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U,
-    0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U,
-    0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU,
-    0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU,
-    0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U,
-    0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U,
-    0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U,
-    0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU,
-    0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U,
-    0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU,
-    0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U,
-    0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU,
-    0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U,
-    0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U,
-    0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU,
-    0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U,
-    0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U,
-    0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U,
-    0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U,
-    0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U,
-    0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U,
-    0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U,
-    0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U,
-    0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU,
-    0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U,
-    0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U,
-    0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U,
-    0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U,
-    0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U,
-    0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U,
-    0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU,
-    0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U,
-    0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U,
-    0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U,
-    0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU,
-};
-PROGMEM static const aes_u32 Te1[256] = {
-    0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU,
-    0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U,
-    0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU,
-    0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U,
-    0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU,
-    0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U,
-    0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU,
-    0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U,
-    0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U,
-    0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU,
-    0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U,
-    0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U,
-    0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U,
-    0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU,
-    0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U,
-    0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U,
-    0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU,
-    0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U,
-    0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U,
-    0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U,
-    0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU,
-    0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU,
-    0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U,
-    0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU,
-    0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU,
-    0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U,
-    0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU,
-    0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U,
-    0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU,
-    0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U,
-    0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U,
-    0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U,
-    0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU,
-    0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U,
-    0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU,
-    0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U,
-    0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU,
-    0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U,
-    0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U,
-    0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU,
-    0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU,
-    0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU,
-    0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U,
-    0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U,
-    0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU,
-    0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U,
-    0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU,
-    0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U,
-    0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU,
-    0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U,
-    0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU,
-    0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU,
-    0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U,
-    0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU,
-    0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U,
-    0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU,
-    0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U,
-    0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U,
-    0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U,
-    0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU,
-    0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU,
-    0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U,
-    0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU,
-    0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U,
-};
-PROGMEM static const aes_u32 Te2[256] = {
-    0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU,
-    0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U,
-    0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU,
-    0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U,
-    0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU,
-    0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U,
-    0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU,
-    0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U,
-    0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U,
-    0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU,
-    0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U,
-    0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U,
-    0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U,
-    0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU,
-    0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U,
-    0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U,
-    0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU,
-    0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U,
-    0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U,
-    0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U,
-    0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU,
-    0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU,
-    0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U,
-    0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU,
-    0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU,
-    0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U,
-    0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU,
-    0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U,
-    0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU,
-    0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U,
-    0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U,
-    0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U,
-    0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU,
-    0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U,
-    0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU,
-    0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U,
-    0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU,
-    0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U,
-    0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U,
-    0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU,
-    0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU,
-    0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU,
-    0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U,
-    0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U,
-    0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU,
-    0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U,
-    0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU,
-    0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U,
-    0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU,
-    0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U,
-    0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU,
-    0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU,
-    0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U,
-    0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU,
-    0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U,
-    0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU,
-    0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U,
-    0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U,
-    0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U,
-    0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU,
-    0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU,
-    0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U,
-    0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU,
-    0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U,
-};
-PROGMEM static const aes_u32 Te3[256] = {
-    0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U,
-    0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U,
-    0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U,
-    0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU,
-    0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU,
-    0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU,
-    0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U,
-    0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU,
-    0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU,
-    0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U,
-    0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U,
-    0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU,
-    0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU,
-    0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU,
-    0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU,
-    0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU,
-    0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U,
-    0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU,
-    0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU,
-    0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U,
-    0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U,
-    0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U,
-    0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U,
-    0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U,
-    0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU,
-    0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U,
-    0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU,
-    0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU,
-    0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U,
-    0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U,
-    0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U,
-    0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU,
-    0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U,
-    0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU,
-    0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU,
-    0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U,
-    0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U,
-    0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU,
-    0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U,
-    0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU,
-    0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U,
-    0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U,
-    0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U,
-    0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U,
-    0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU,
-    0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U,
-    0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU,
-    0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U,
-    0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU,
-    0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U,
-    0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU,
-    0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU,
-    0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU,
-    0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU,
-    0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U,
-    0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U,
-    0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U,
-    0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U,
-    0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U,
-    0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U,
-    0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU,
-    0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U,
-    0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU,
-    0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU,
-};
-PROGMEM static const aes_u32 Te4[256] = {
-    0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU,
-    0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U,
-    0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU,
-    0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U,
-    0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU,
-    0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U,
-    0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU,
-    0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U,
-    0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U,
-    0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU,
-    0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U,
-    0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U,
-    0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U,
-    0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU,
-    0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U,
-    0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U,
-    0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU,
-    0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U,
-    0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U,
-    0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U,
-    0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU,
-    0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU,
-    0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U,
-    0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU,
-    0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU,
-    0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U,
-    0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU,
-    0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U,
-    0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU,
-    0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U,
-    0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U,
-    0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U,
-    0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU,
-    0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U,
-    0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU,
-    0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U,
-    0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU,
-    0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U,
-    0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U,
-    0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU,
-    0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU,
-    0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU,
-    0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U,
-    0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U,
-    0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU,
-    0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U,
-    0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU,
-    0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U,
-    0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU,
-    0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U,
-    0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU,
-    0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU,
-    0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U,
-    0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU,
-    0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U,
-    0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU,
-    0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U,
-    0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U,
-    0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U,
-    0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU,
-    0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU,
-    0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U,
-    0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU,
-    0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U,
-};
-
-#ifdef WITH_AES_DECRYPT
-
-PROGMEM static const aes_u32 Td0[256] = {
-    0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
-    0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
-    0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U,
-    0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU,
-    0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U,
-    0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U,
-    0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU,
-    0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U,
-    0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU,
-    0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U,
-    0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U,
-    0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U,
-    0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U,
-    0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU,
-    0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U,
-    0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU,
-    0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U,
-    0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU,
-    0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U,
-    0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U,
-    0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U,
-    0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU,
-    0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U,
-    0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU,
-    0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U,
-    0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU,
-    0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U,
-    0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU,
-    0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU,
-    0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U,
-    0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU,
-    0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U,
-    0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU,
-    0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U,
-    0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U,
-    0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U,
-    0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU,
-    0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U,
-    0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U,
-    0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU,
-    0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U,
-    0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U,
-    0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U,
-    0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U,
-    0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U,
-    0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU,
-    0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U,
-    0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U,
-    0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U,
-    0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U,
-    0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U,
-    0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU,
-    0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU,
-    0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU,
-    0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU,
-    0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U,
-    0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U,
-    0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU,
-    0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU,
-    0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U,
-    0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU,
-    0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U,
-    0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U,
-    0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U,
-};
-PROGMEM static const aes_u32 Td1[256] = {
-    0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU,
-    0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U,
-    0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU,
-    0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U,
-    0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U,
-    0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U,
-    0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U,
-    0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U,
-    0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U,
-    0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU,
-    0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU,
-    0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU,
-    0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U,
-    0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU,
-    0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U,
-    0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U,
-    0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U,
-    0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU,
-    0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU,
-    0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U,
-    0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU,
-    0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U,
-    0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU,
-    0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU,
-    0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U,
-    0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U,
-    0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U,
-    0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU,
-    0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U,
-    0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU,
-    0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U,
-    0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U,
-    0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U,
-    0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU,
-    0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U,
-    0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U,
-    0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U,
-    0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U,
-    0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U,
-    0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U,
-    0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU,
-    0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU,
-    0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U,
-    0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU,
-    0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U,
-    0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU,
-    0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU,
-    0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U,
-    0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU,
-    0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U,
-    0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U,
-    0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U,
-    0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U,
-    0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U,
-    0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U,
-    0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U,
-    0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU,
-    0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U,
-    0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U,
-    0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU,
-    0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U,
-    0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U,
-    0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U,
-    0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U,
-};
-PROGMEM static const aes_u32 Td2[256] = {
-    0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U,
-    0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U,
-    0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U,
-    0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U,
-    0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU,
-    0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U,
-    0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U,
-    0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U,
-    0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U,
-    0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU,
-    0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U,
-    0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U,
-    0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU,
-    0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U,
-    0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U,
-    0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U,
-    0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U,
-    0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U,
-    0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U,
-    0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU,
-    0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U,
-    0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U,
-    0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U,
-    0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U,
-    0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U,
-    0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU,
-    0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU,
-    0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U,
-    0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU,
-    0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U,
-    0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU,
-    0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU,
-    0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU,
-    0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU,
-    0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U,
-    0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U,
-    0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U,
-    0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U,
-    0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U,
-    0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U,
-    0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U,
-    0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU,
-    0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU,
-    0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U,
-    0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U,
-    0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU,
-    0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU,
-    0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U,
-    0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U,
-    0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U,
-    0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U,
-    0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U,
-    0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U,
-    0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U,
-    0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU,
-    0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U,
-    0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U,
-    0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U,
-    0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U,
-    0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U,
-    0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U,
-    0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU,
-    0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U,
-    0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U,
-};
-PROGMEM static const aes_u32 Td3[256] = {
-    0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU,
-    0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU,
-    0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U,
-    0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U,
-    0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU,
-    0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU,
-    0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U,
-    0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU,
-    0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U,
-    0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU,
-    0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U,
-    0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U,
-    0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U,
-    0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U,
-    0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U,
-    0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU,
-    0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU,
-    0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U,
-    0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U,
-    0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU,
-    0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU,
-    0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U,
-    0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U,
-    0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U,
-    0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U,
-    0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU,
-    0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U,
-    0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U,
-    0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU,
-    0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU,
-    0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U,
-    0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U,
-    0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U,
-    0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU,
-    0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U,
-    0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U,
-    0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U,
-    0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U,
-    0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U,
-    0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U,
-    0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U,
-    0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU,
-    0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U,
-    0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U,
-    0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU,
-    0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU,
-    0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U,
-    0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU,
-    0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U,
-    0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U,
-    0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U,
-    0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U,
-    0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U,
-    0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U,
-    0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU,
-    0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU,
-    0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU,
-    0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU,
-    0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U,
-    0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U,
-    0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U,
-    0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU,
-    0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U,
-    0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U,
-};
-PROGMEM static const aes_u32 Td4[256] = {
-    0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U,
-    0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U,
-    0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU,
-    0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU,
-    0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U,
-    0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U,
-    0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U,
-    0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU,
-    0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U,
-    0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU,
-    0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU,
-    0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU,
-    0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U,
-    0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U,
-    0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U,
-    0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U,
-    0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U,
-    0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U,
-    0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU,
-    0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U,
-    0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U,
-    0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU,
-    0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U,
-    0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U,
-    0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U,
-    0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU,
-    0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U,
-    0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U,
-    0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU,
-    0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U,
-    0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U,
-    0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU,
-    0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U,
-    0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU,
-    0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU,
-    0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U,
-    0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U,
-    0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U,
-    0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U,
-    0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU,
-    0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U,
-    0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U,
-    0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU,
-    0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU,
-    0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU,
-    0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U,
-    0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU,
-    0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U,
-    0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U,
-    0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U,
-    0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U,
-    0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU,
-    0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U,
-    0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU,
-    0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU,
-    0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU,
-    0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU,
-    0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U,
-    0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU,
-    0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U,
-    0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU,
-    0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U,
-    0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U,
-    0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU,
-};
-
-#endif /* WITH_AES_DECRYPT */
-
-PROGMEM static const aes_u32 rcon[] = {
-       0x01000000, 0x02000000, 0x04000000, 0x08000000,
-       0x10000000, 0x20000000, 0x40000000, 0x80000000,
-       0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
-};
-
-#define GETU32(pt) (((aes_u32)(pt)[0] << 24) ^ ((aes_u32)(pt)[1] << 16) ^ ((aes_u32)(pt)[2] <<  8) ^ ((aes_u32)(pt)[3]))
-#define PUTU32(ct, st) { (ct)[0] = (aes_u8)((st) >> 24); (ct)[1] = (aes_u8)((st) >> 16); (ct)[2] = (aes_u8)((st) >>  8); (ct)[3] = (aes_u8)(st); }
-
-/**
- * Expand the cipher key into the encryption key schedule.
- *
- * @return     the number of rounds for the given cipher key size.
- */
-int
-rijndaelKeySetupEnc(aes_u32 rk[/*4*(Nr + 1)*/], const aes_u8 cipherKey[], int keyBits)
-{
-       int i = 0;
-       aes_u32 temp;
-
-       rk[0] = GETU32(cipherKey     );
-       rk[1] = GETU32(cipherKey +  4);
-       rk[2] = GETU32(cipherKey +  8);
-       rk[3] = GETU32(cipherKey + 12);
-       if (keyBits == 128) {
-               for (;;) {
-                       temp  = rk[3];
-                       rk[4] = rk[0] ^
-                               (pgm_read_dword(&Te4[(temp >> 16) &0xff ]) & 0xff000000) ^
-                               (pgm_read_dword(&Te4[(temp >>  8) & 0xff]) & 0x00ff0000) ^
-                               (pgm_read_dword(&Te4[(temp      ) & 0xff]) & 0x0000ff00) ^
-                               (pgm_read_dword(&Te4[(temp >> 24)       ]) & 0x000000ff) ^
-                               (pgm_read_dword(&rcon[i]));
-                       rk[5] = rk[1] ^ rk[4];
-                       rk[6] = rk[2] ^ rk[5];
-                       rk[7] = rk[3] ^ rk[6];
-                       if (++i == 10) {
-                               return 10;
-                       }
-                       rk += 4;
-               }
-       }
-       rk[4] = GETU32(cipherKey + 16);
-       rk[5] = GETU32(cipherKey + 20);
-       if (keyBits == 192) {
-               for (;;) {
-                       temp = rk[ 5];
-                       rk[ 6] = rk[ 0] ^
-                               (pgm_read_dword(&Te4[(temp >> 16) & 0xff]) & 0xff000000) ^
-                               (pgm_read_dword(&Te4[(temp >>  8) & 0xff]) & 0x00ff0000) ^
-                               (pgm_read_dword(&Te4[(temp      ) & 0xff]) & 0x0000ff00) ^
-                               (pgm_read_dword(&Te4[(temp >> 24)       ]) & 0x000000ff) ^
-                               (pgm_read_dword(&rcon[i]));
-                       rk[ 7] = rk[ 1] ^ rk[ 6];
-                       rk[ 8] = rk[ 2] ^ rk[ 7];
-                       rk[ 9] = rk[ 3] ^ rk[ 8];
-                       if (++i == 8) {
-                               return 12;
-                       }
-                       rk[10] = rk[ 4] ^ rk[ 9];
-                       rk[11] = rk[ 5] ^ rk[10];
-                       rk += 6;
-               }
-       }
-       rk[6] = GETU32(cipherKey + 24);
-       rk[7] = GETU32(cipherKey + 28);
-       if (keyBits == 256) {
-               for (;;) {
-                       temp = rk[ 7];
-                       rk[ 8] = rk[ 0] ^
-                               (pgm_read_dword(&Te4[(temp >> 16) & 0xff]) & 0xff000000) ^
-                               (pgm_read_dword(&Te4[(temp >>  8) & 0xff]) & 0x00ff0000) ^
-                               (pgm_read_dword(&Te4[(temp      ) & 0xff]) & 0x0000ff00) ^
-                               (pgm_read_dword(&Te4[(temp >> 24)       ]) & 0x000000ff) ^
-                               (pgm_read_dword(&rcon[i]));
-                       rk[ 9] = rk[ 1] ^ rk[ 8];
-                       rk[10] = rk[ 2] ^ rk[ 9];
-                       rk[11] = rk[ 3] ^ rk[10];
-                       if (++i == 7) {
-                               return 14;
-                       }
-                       temp = rk[11];
-                       rk[12] = rk[ 4] ^
-                               (pgm_read_dword(&Te4[(temp >> 24)       ]) & 0xff000000) ^
-                               (pgm_read_dword(&Te4[(temp >> 16) & 0xff]) & 0x00ff0000) ^
-                               (pgm_read_dword(&Te4[(temp >>  8) & 0xff]) & 0x0000ff00) ^
-                               (pgm_read_dword(&Te4[(temp      ) & 0xff]) & 0x000000ff);
-                       rk[13] = rk[ 5] ^ rk[12];
-                       rk[14] = rk[ 6] ^ rk[13];
-                       rk[15] = rk[ 7] ^ rk[14];
-                       rk += 8;
-               }
-       }
-       return 0;
-}
-
-#ifdef WITH_AES_DECRYPT
-/**
- * Expand the cipher key into the decryption key schedule.
- *
- * @return     the number of rounds for the given cipher key size.
- */
-int
-rijndaelKeySetupDec(aes_u32 rk[/*4*(Nr + 1)*/], const aes_u8 cipherKey[], int keyBits)
-{
-       int Nr, i, j;
-       aes_u32 temp;
-
-       /* expand the cipher key: */
-       Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits);
-
-       /* invert the order of the round keys: */
-       for (i = 0, j = 4*Nr; i < j; i += 4, j -= 4) {
-               temp = rk[i    ]; rk[i    ] = rk[j    ]; rk[j    ] = temp;
-               temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp;
-               temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp;
-               temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp;
-       }
-       /* apply the inverse MixColumn transform to all round keys but the first and the last: */
-       for (i = 1; i < Nr; i++) {
-               rk += 4;
-               rk[0] =
-                       pgm_read_dword(&Td0[pgm_read_dword(&Te4[(rk[0] >> 24)       ]) & 0xff]) ^
-                       pgm_read_dword(&Td1[pgm_read_dword(&Te4[(rk[0] >> 16) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td2[pgm_read_dword(&Te4[(rk[0] >>  8) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td3[pgm_read_dword(&Te4[(rk[0]      ) & 0xff]) & 0xff]);
-               rk[1] =
-                       pgm_read_dword(&Td0[pgm_read_dword(&Te4[(rk[1] >> 24)       ]) & 0xff]) ^
-                       pgm_read_dword(&Td1[pgm_read_dword(&Te4[(rk[1] >> 16) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td2[pgm_read_dword(&Te4[(rk[1] >>  8) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td3[pgm_read_dword(&Te4[(rk[1]      ) & 0xff]) & 0xff]);
-               rk[2] =
-                       pgm_read_dword(&Td0[pgm_read_dword(&Te4[(rk[2] >> 24)       ]) & 0xff]) ^
-                       pgm_read_dword(&Td1[pgm_read_dword(&Te4[(rk[2] >> 16) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td2[pgm_read_dword(&Te4[(rk[2] >>  8) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td3[pgm_read_dword(&Te4[(rk[2]      ) & 0xff]) & 0xff]);
-               rk[3] =
-                       pgm_read_dword(&Td0[pgm_read_dword(&Te4[(rk[3] >> 24)       ]) & 0xff]) ^
-                       pgm_read_dword(&Td1[pgm_read_dword(&Te4[(rk[3] >> 16) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td2[pgm_read_dword(&Te4[(rk[3] >>  8) & 0xff]) & 0xff]) ^
-                       pgm_read_dword(&Td3[pgm_read_dword(&Te4[(rk[3]      ) & 0xff]) & 0xff]);
-       }
-       return Nr;
-}
-#endif
-
-void
-rijndaelEncrypt(const aes_u32 rk[/*4*(Nr + 1)*/], int Nr, const aes_u8 pt[16],
-    aes_u8 ct[16])
-{
-       aes_u32 s0, s1, s2, s3, t0, t1, t2, t3;
-#ifndef FULL_UNROLL
-    int r;
-#endif /* ?FULL_UNROLL */
-
-    /*
-        * map byte array block to cipher state
-        * and add initial round key:
-        */
-       s0 = GETU32(pt     ) ^ rk[0];
-       s1 = GETU32(pt +  4) ^ rk[1];
-       s2 = GETU32(pt +  8) ^ rk[2];
-       s3 = GETU32(pt + 12) ^ rk[3];
-#ifdef FULL_UNROLL
-    /* round 1: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[ 4];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[ 5];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[ 6];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[ 7];
-       /* round 2: */
-       s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[ 8];
-       s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[ 9];
-       s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[10];
-       s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[11];
-    /* round 3: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[12];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[13];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[14];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[15];
-       /* round 4: */
-       s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[16];
-       s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[17];
-       s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[18];
-       s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[19];
-    /* round 5: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[20];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[21];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[22];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[23];
-       /* round 6: */
-       s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[24];
-       s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[25];
-       s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[26];
-       s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[27];
-    /* round 7: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[28];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[29];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[30];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[31];
-       /* round 8: */
-       s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[32];
-       s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[33];
-       s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[34];
-       s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[35];
-    /* round 9: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[36];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[37];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[38];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[39];
-    if (Nr > 10) {
-       /* round 10: */
-       s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[40];
-       s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[41];
-       s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[42];
-       s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[43];
-       /* round 11: */
-       t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[44];
-       t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[45];
-       t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[46];
-       t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[47];
-       if (Nr > 12) {
-           /* round 12: */
-           s0 = pgm_read_dword(&Te0[t0 >> 24]) ^ pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t3 & 0xff]) ^ rk[48];
-           s1 = pgm_read_dword(&Te0[t1 >> 24]) ^ pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t0 & 0xff]) ^ rk[49];
-           s2 = pgm_read_dword(&Te0[t2 >> 24]) ^ pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t1 & 0xff]) ^ rk[50];
-           s3 = pgm_read_dword(&Te0[t3 >> 24]) ^ pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[t2 & 0xff]) ^ rk[51];
-           /* round 13: */
-           t0 = pgm_read_dword(&Te0[s0 >> 24]) ^ pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s3 & 0xff]) ^ rk[52];
-           t1 = pgm_read_dword(&Te0[s1 >> 24]) ^ pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s0 & 0xff]) ^ rk[53];
-           t2 = pgm_read_dword(&Te0[s2 >> 24]) ^ pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s1 & 0xff]) ^ rk[54];
-           t3 = pgm_read_dword(&Te0[s3 >> 24]) ^ pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Te3[s2 & 0xff]) ^ rk[55];
-       }
-    }
-    rk += Nr << 2;
-#else  /* !FULL_UNROLL */
-    /*
-        * Nr - 1 full rounds:
-        */
-    r = Nr >> 1;
-    for (;;) {
-       t0 =
-           pgm_read_dword(&Te0[(s0 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(s1 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(s2 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(s3      ) & 0xff]) ^
-           rk[4];
-       t1 =
-           pgm_read_dword(&Te0[(s1 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(s2 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(s3 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(s0      ) & 0xff]) ^
-           rk[5];
-       t2 =
-           pgm_read_dword(&Te0[(s2 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(s3 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(s0 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(s1      ) & 0xff]) ^
-           rk[6];
-       t3 =
-           pgm_read_dword(&Te0[(s3 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(s0 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(s1 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(s2      ) & 0xff]) ^
-           rk[7];
-
-       rk += 8;
-       if (--r == 0) {
-           break;
-       }
-
-       s0 =
-           pgm_read_dword(&Te0[(t0 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(t1 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(t2 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(t3      ) & 0xff]) ^
-           rk[0];
-       s1 =
-           pgm_read_dword(&Te0[(t1 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(t2 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(t3 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(t0      ) & 0xff]) ^
-           rk[1];
-       s2 =
-           pgm_read_dword(&Te0[(t2 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(t3 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(t0 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(t1      ) & 0xff]) ^
-           rk[2];
-       s3 =
-           pgm_read_dword(&Te0[(t3 >> 24)       ]) ^
-           pgm_read_dword(&Te1[(t0 >> 16) & 0xff]) ^
-           pgm_read_dword(&Te2[(t1 >>  8) & 0xff]) ^
-           pgm_read_dword(&Te3[(t2      ) & 0xff]) ^
-           rk[3];
-    }
-#endif /* ?FULL_UNROLL */
-    /*
-        * apply last round and
-        * map cipher state to byte array block:
-        */
-       s0 =
-               (pgm_read_dword(&Te4[(t0 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Te4[(t1 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Te4[(t2 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Te4[(t3      ) & 0xff]) & 0x000000ff) ^
-               rk[0];
-       PUTU32(ct     , s0);
-       s1 =
-               (pgm_read_dword(&Te4[(t1 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Te4[(t2 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Te4[(t3 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Te4[(t0      ) & 0xff]) & 0x000000ff) ^
-               rk[1];
-       PUTU32(ct +  4, s1);
-       s2 =
-               (pgm_read_dword(&Te4[(t2 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Te4[(t3 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Te4[(t0 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Te4[(t1      ) & 0xff]) & 0x000000ff) ^
-               rk[2];
-       PUTU32(ct +  8, s2);
-       s3 =
-               (pgm_read_dword(&Te4[(t3 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Te4[(t0 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Te4[(t1 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Te4[(t2      ) & 0xff]) & 0x000000ff) ^
-               rk[3];
-       PUTU32(ct + 12, s3);
-}
-
-#ifdef WITH_AES_DECRYPT
-static void
-rijndaelDecrypt(const aes_u32 rk[/*4*(Nr + 1)*/], int Nr, const aes_u8 ct[16],
-    aes_u8 pt[16])
-{
-       aes_u32 s0, s1, s2, s3, t0, t1, t2, t3;
-#ifndef FULL_UNROLL
-    int r;
-#endif /* ?FULL_UNROLL */
-
-    /*
-        * map byte array block to cipher state
-        * and add initial round key:
-        */
-    s0 = GETU32(ct     ) ^ rk[0];
-    s1 = GETU32(ct +  4) ^ rk[1];
-    s2 = GETU32(ct +  8) ^ rk[2];
-    s3 = GETU32(ct + 12) ^ rk[3];
-#ifdef FULL_UNROLL
-    /* round 1: */
-    t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[ 4];
-    t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[ 5];
-    t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[ 6];
-    t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[ 7];
-    /* round 2: */
-    s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[ 8];
-    s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[ 9];
-    s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[10];
-    s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[11];
-    /* round 3: */
-    t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[12];
-    t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[13];
-    t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[14];
-    t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[15];
-    /* round 4: */
-    s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[16];
-    s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[17];
-    s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[18];
-    s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[19];
-    /* round 5: */
-    t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[20];
-    t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[21];
-    t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[22];
-    t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[23];
-    /* round 6: */
-    s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[24];
-    s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[25];
-    s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[26];
-    s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[27];
-    /* round 7: */
-    t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[28];
-    t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[29];
-    t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[30];
-    t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[31];
-    /* round 8: */
-    s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[32];
-    s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[33];
-    s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[34];
-    s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[35];
-    /* round 9: */
-    t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[36];
-    t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[37];
-    t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[38];
-    t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[39];
-    if (Nr > 10) {
-       /* round 10: */
-       s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[40];
-       s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[41];
-       s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[42];
-       s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[43];
-       /* round 11: */
-       t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[44];
-       t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[45];
-       t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[46];
-       t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[47];
-       if (Nr > 12) {
-           /* round 12: */
-           s0 = pgm_read_dword(&Td0[t0 >> 24]) ^ pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t1 & 0xff]) ^ rk[48];
-           s1 = pgm_read_dword(&Td0[t1 >> 24]) ^ pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t2 & 0xff]) ^ rk[49];
-           s2 = pgm_read_dword(&Td0[t2 >> 24]) ^ pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t3 & 0xff]) ^ rk[50];
-           s3 = pgm_read_dword(&Td0[t3 >> 24]) ^ pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[t0 & 0xff]) ^ rk[51];
-           /* round 13: */
-           t0 = pgm_read_dword(&Td0[s0 >> 24]) ^ pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s1 & 0xff]) ^ rk[52];
-           t1 = pgm_read_dword(&Td0[s1 >> 24]) ^ pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s2 & 0xff]) ^ rk[53];
-           t2 = pgm_read_dword(&Td0[s2 >> 24]) ^ pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s3 & 0xff]) ^ rk[54];
-           t3 = pgm_read_dword(&Td0[s3 >> 24]) ^ pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^ pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^ pgm_read_dword(&Td3[s0 & 0xff]) ^ rk[55];
-       }
-    }
-       rk += Nr << 2;
-#else  /* !FULL_UNROLL */
-    /*
-     * Nr - 1 full rounds:
-     */
-    r = Nr >> 1;
-    for (;;) {
-       t0 =
-           pgm_read_dword(&Td0[(s0 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(s3 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(s2 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(s1      ) & 0xff]) ^
-           rk[4];
-       t1 =
-           pgm_read_dword(&Td0[(s1 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(s0 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(s3 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(s2      ) & 0xff]) ^
-           rk[5];
-       t2 =
-           pgm_read_dword(&Td0[(s2 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(s1 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(s0 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(s3      ) & 0xff]) ^
-           rk[6];
-       t3 =
-           pgm_read_dword(&Td0[(s3 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(s2 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(s1 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(s0      ) & 0xff]) ^
-           rk[7];
-
-       rk += 8;
-       if (--r == 0) {
-           break;
-       }
-
-       s0 =
-           pgm_read_dword(&Td0[(t0 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(t3 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(t2 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(t1      ) & 0xff]) ^
-           rk[0];
-       s1 =
-           pgm_read_dword(&Td0[(t1 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(t0 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(t3 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(t2      ) & 0xff]) ^
-           rk[1];
-       s2 =
-           pgm_read_dword(&Td0[(t2 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(t1 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(t0 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(t3      ) & 0xff]) ^
-           rk[2];
-       s3 =
-           pgm_read_dword(&Td0[(t3 >> 24)       ]) ^
-           pgm_read_dword(&Td1[(t2 >> 16) & 0xff]) ^
-           pgm_read_dword(&Td2[(t1 >>  8) & 0xff]) ^
-           pgm_read_dword(&Td3[(t0      ) & 0xff]) ^
-           rk[3];
-    }
-#endif /* ?FULL_UNROLL */
-    /*
-        * apply last round and
-        * map cipher state to byte array block:
-        */
-       s0 =
-               (pgm_read_dword(&Td4[(t0 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Td4[(t3 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Td4[(t2 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Td4[(t1      ) & 0xff]) & 0x000000ff) ^
-               rk[0];
-       PUTU32(pt     , s0);
-       s1 =
-               (pgm_read_dword(&Td4[(t1 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Td4[(t0 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Td4[(t3 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Td4[(t2      ) & 0xff]) & 0x000000ff) ^
-               rk[1];
-       PUTU32(pt +  4, s1);
-       s2 =
-               (pgm_read_dword(&Td4[(t2 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Td4[(t1 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Td4[(t0 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Td4[(t3      ) & 0xff]) & 0x000000ff) ^
-               rk[2];
-       PUTU32(pt +  8, s2);
-       s3 =
-               (pgm_read_dword(&Td4[(t3 >> 24)       ]) & 0xff000000) ^
-               (pgm_read_dword(&Td4[(t2 >> 16) & 0xff]) & 0x00ff0000) ^
-               (pgm_read_dword(&Td4[(t1 >>  8) & 0xff]) & 0x0000ff00) ^
-               (pgm_read_dword(&Td4[(t0      ) & 0xff]) & 0x000000ff) ^
-               rk[3];
-       PUTU32(pt + 12, s3);
-}
-#endif
-
-/* setup key context for encryption only */
-int
-rijndael_set_key_enc_only(rijndael_ctx *ctx, const u_char *key, int bits)
-{
-       int rounds;
-
-       rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
-       if (rounds == 0)
-               return -1;
-
-       ctx->Nr = rounds;
-#ifdef WITH_AES_DECRYPT
-       ctx->enc_only = 1;
-#endif
-
-       return 0;
-}
-
-#ifdef WITH_AES_DECRYPT
-/* setup key context for both encryption and decryption */
-int
-rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)
-{
-       int rounds;
-
-       rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
-       if (rounds == 0)
-               return -1;
-       if (rijndaelKeySetupDec(ctx->dk, key, bits) != rounds)
-               return -1;
-
-       ctx->Nr = rounds;
-       ctx->enc_only = 0;
-
-       return 0;
-}
-
-void
-rijndael_decrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
-{
-       rijndaelDecrypt(ctx->dk, ctx->Nr, src, dst);
-}
-#endif
-
-void
-rijndael_encrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
-{
-       rijndaelEncrypt(ctx->ek, ctx->Nr, src, dst);
-}
diff --git a/extlibs/tinydtls/aes/rijndael.h b/extlibs/tinydtls/aes/rijndael.h
deleted file mode 100644 (file)
index 712798b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*     $OpenBSD: rijndael.h,v 1.13 2008/06/09 07:49:45 djm Exp $ */
-
-/**
- * rijndael-alg-fst.h
- *
- * @version 3.0 (December 2000)
- *
- * Optimised ANSI C code for the Rijndael cipher (now AES)
- *
- * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
- * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
- * @author Paulo Barreto <paulo.barreto@terra.com.br>
- *
- * This code is hereby placed in the public domain.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef __RIJNDAEL_H
-#define __RIJNDAEL_H
-
-#include <stdint.h>
-
-#define WITH_AES_DECRYPT 1
-#define AES_MAXKEYBITS (256)
-#define AES_MAXKEYBYTES        (AES_MAXKEYBITS>>3)
-/* for 256-bit keys we need 14 rounds for a 128 we only need 10 round */
-#define AES_MAXROUNDS  14
-
-/* bergmann: to avoid conflicts with typedefs from certain Contiki platforms,
- * the following type names have been prefixed with "aes_": */
-typedef unsigned char  u_char;
-typedef uint8_t                aes_u8;
-typedef uint16_t       aes_u16;
-typedef uint32_t       aes_u32;
-
-/*  The structure for key information */
-typedef struct {
-#ifdef WITH_AES_DECRYPT
-       int     enc_only;               /* context contains only encrypt schedule */
-#endif
-       int     Nr;                     /* key-length-dependent number of rounds */
-       aes_u32 ek[4*(AES_MAXROUNDS + 1)];      /* encrypt key schedule */
-#ifdef WITH_AES_DECRYPT
-       aes_u32 dk[4*(AES_MAXROUNDS + 1)];      /* decrypt key schedule */
-#endif
-} rijndael_ctx;
-
-int     rijndael_set_key(rijndael_ctx *, const u_char *, int);
-int     rijndael_set_key_enc_only(rijndael_ctx *, const u_char *, int);
-void    rijndael_decrypt(rijndael_ctx *, const u_char *, u_char *);
-void    rijndael_encrypt(rijndael_ctx *, const u_char *, u_char *);
-
-int    rijndaelKeySetupEnc(aes_u32 rk[/*4*(Nr + 1)*/], const aes_u8 cipherKey[], int keyBits);
-int    rijndaelKeySetupDec(aes_u32 rk[/*4*(Nr + 1)*/], const aes_u8 cipherKey[], int keyBits);
-void   rijndaelEncrypt(const aes_u32 rk[/*4*(Nr + 1)*/], int Nr, const aes_u8 pt[16], aes_u8 ct[16]);
-
-#endif /* __RIJNDAEL_H */
diff --git a/extlibs/tinydtls/alert.h b/extlibs/tinydtls/alert.h
deleted file mode 100644 (file)
index a589dd7..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* alert.h -- DTLS alert protocol
- *
- * Copyright (C) 2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file alert.h
- * @brief DTLS alert protocol
- */
-
-#ifndef _DTLS_ALERT_H_
-#define _DTLS_ALERT_H_
-
-typedef enum {
-  DTLS_ALERT_LEVEL_WARNING=1,
-  DTLS_ALERT_LEVEL_FATAL=2
-} dtls_alert_level_t;
-
-typedef enum {
-  DTLS_ALERT_CLOSE_NOTIFY = 0,                 /* close_notify */
-  DTLS_ALERT_UNEXPECTED_MESSAGE = 10,          /* unexpected_message */
-  DTLS_ALERT_BAD_RECORD_MAC = 20,              /* bad_record_mac */
-  DTLS_ALERT_RECORD_OVERFLOW = 22,             /* record_overflow */
-  DTLS_ALERT_DECOMPRESSION_FAILURE = 30,       /* decompression_failure */
-  DTLS_ALERT_HANDSHAKE_FAILURE = 40,           /* handshake_failure */
-  DTLS_ALERT_BAD_CERTIFICATE = 42,             /* bad_certificate */
-  DTLS_ALERT_UNSUPPORTED_CERTIFICATE = 43,     /* unsupported_certificate */
-  DTLS_ALERT_CERTIFICATE_REVOKED = 44,         /* certificate_revoked */
-  DTLS_ALERT_CERTIFICATE_EXPIRED = 45,         /* certificate_expired */
-  DTLS_ALERT_CERTIFICATE_UNKNOWN = 46,         /* certificate_unknown */
-  DTLS_ALERT_ILLEGAL_PARAMETER = 47,           /* illegal_parameter */
-  DTLS_ALERT_UNKNOWN_CA = 48,                  /* unknown_ca */
-  DTLS_ALERT_ACCESS_DENIED = 49,               /* access_denied */
-  DTLS_ALERT_DECODE_ERROR = 50,                        /* decode_error */
-  DTLS_ALERT_DECRYPT_ERROR = 51,               /* decrypt_error */
-  DTLS_ALERT_PROTOCOL_VERSION = 70,            /* protocol_version */
-  DTLS_ALERT_INSUFFICIENT_SECURITY = 71,       /* insufficient_security */
-  DTLS_ALERT_INTERNAL_ERROR = 80,              /* internal_error */
-  DTLS_ALERT_USER_CANCELED = 90,               /* user_canceled */
-  DTLS_ALERT_NO_RENEGOTIATION = 100,           /* no_renegotiation */
-  DTLS_ALERT_UNSUPPORTED_EXTENSION = 110       /* unsupported_extension */
-} dtls_alert_t;
-
-#define DTLS_EVENT_CONNECT        0x01DC /**< initiated handshake */
-#define DTLS_EVENT_CONNECTED      0x01DE /**< handshake or re-negotiation
-                                         * has finished */
-#define DTLS_EVENT_RENEGOTIATE    0x01DF /**< re-negotiation has started */
-
-INLINE_API int
-dtls_alert_create(dtls_alert_level_t level, dtls_alert_t desc)
-{
-  return -((level << 8) | desc);
-}
-
-INLINE_API int
-dtls_alert_fatal_create(dtls_alert_t desc)
-{
-  return dtls_alert_create(DTLS_ALERT_LEVEL_FATAL, desc);
-}
-
-#endif /* _DTLS_ALERT_H_ */
diff --git a/extlibs/tinydtls/ccm.c b/extlibs/tinydtls/ccm.c
deleted file mode 100644 (file)
index 1366145..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <string.h>
-
-#include "dtls_config.h"
-#include "global.h"
-#include "numeric.h"
-#include "ccm.h"
-
-#ifdef HAVE_ASSERT_H
-# include <assert.h>
-#endif
-
-#define CCM_FLAGS(A,M,L) (((A > 0) << 6) | (((M - 2)/2) << 3) | (L - 1))
-
-#define MASK_L(_L) ((1 << 8 * _L) - 1)
-
-#define SET_COUNTER(A,L,cnt,C) {                                       \
-    int i;                                                             \
-    memset((A) + DTLS_CCM_BLOCKSIZE - (L), 0, (L));                    \
-    (C) = (cnt) & MASK_L(L);                                           \
-    for (i = DTLS_CCM_BLOCKSIZE - 1; (C) && (i > (L)); --i, (C) >>= 8) \
-      (A)[i] |= (C) & 0xFF;                                            \
-  }
-
-INLINE_API void 
-block0(size_t M,       /* number of auth bytes */
-       size_t L,       /* number of bytes to encode message length */
-       size_t la,      /* l(a) octets additional authenticated data */
-       size_t lm,      /* l(m) message length */
-       unsigned char nonce[DTLS_CCM_BLOCKSIZE],
-       unsigned char *result) {
-  int i;
-
-  result[0] = CCM_FLAGS(la, M, L);
-
-  /* copy the nonce */
-  memcpy(result + 1, nonce, DTLS_CCM_BLOCKSIZE - L);
-  
-  for (i=0; i < L; i++) {
-    result[15-i] = lm & 0xff;
-    lm >>= 8;
-  }
-}
-
-/** 
- * Creates the CBC-MAC for the additional authentication data that
- * is sent in cleartext. 
- *
- * \param ctx  The crypto context for the AES encryption.
- * \param msg  The message starting with the additional authentication data.
- * \param la   The number of additional authentication bytes in \p msg.
- * \param B    The input buffer for crypto operations. When this function
- *             is called, \p B must be initialized with \c B0 (the first
- *             authentication block.
- * \param X    The output buffer where the result of the CBC calculation
- *             is placed.
- * \return     The result is written to \p X.
- */
-static void
-add_auth_data(rijndael_ctx *ctx, const unsigned char *msg, size_t la,
-             unsigned char B[DTLS_CCM_BLOCKSIZE], 
-             unsigned char X[DTLS_CCM_BLOCKSIZE]) {
-  size_t i,j; 
-
-  rijndael_encrypt(ctx, B, X);
-
-  memset(B, 0, DTLS_CCM_BLOCKSIZE);
-
-  if (!la)
-    return;
-
-#ifndef WITH_CONTIKI
-    if (la < 0xFF00) {         /* 2^16 - 2^8 */
-      j = 2;
-      dtls_int_to_uint16(B, la);
-  } else if (la <= UINT32_MAX) {
-      j = 6;
-      dtls_int_to_uint16(B, 0xFFFE);
-      dtls_int_to_uint32(B+2, la);
-    } else {
-      j = 10;
-      dtls_int_to_uint16(B, 0xFFFF);
-      dtls_int_to_uint64(B+2, la);
-    }
-#else /* WITH_CONTIKI */
-  /* With Contiki, we are building for small devices and thus
-   * anticipate that the number of additional authentication bytes
-   * will not exceed 65280 bytes (0xFF00) and we can skip the
-   * workarounds required for j=6 and j=10 on devices with a word size
-   * of 32 bits or 64 bits, respectively.
-   */
-
-  assert(la < 0xFF00);
-  j = 2;
-  dtls_int_to_uint16(B, la);
-#endif /* WITH_CONTIKI */
-
-    i = min(DTLS_CCM_BLOCKSIZE - j, la);
-    memcpy(B + j, msg, i);
-    la -= i;
-    msg += i;
-    
-    memxor(B, X, DTLS_CCM_BLOCKSIZE);
-  
-  rijndael_encrypt(ctx, B, X);
-  
-  while (la > DTLS_CCM_BLOCKSIZE) {
-    for (i = 0; i < DTLS_CCM_BLOCKSIZE; ++i)
-      B[i] = X[i] ^ *msg++;
-    la -= DTLS_CCM_BLOCKSIZE;
-
-    rijndael_encrypt(ctx, B, X);
-  }
-  
-  if (la) {
-    memset(B, 0, DTLS_CCM_BLOCKSIZE);
-    memcpy(B, msg, la);
-    memxor(B, X, DTLS_CCM_BLOCKSIZE);
-
-    rijndael_encrypt(ctx, B, X);  
-  } 
-}
-
-INLINE_API void
-encrypt(rijndael_ctx *ctx, size_t L, unsigned long counter,
-       unsigned char *msg, size_t len,
-       unsigned char A[DTLS_CCM_BLOCKSIZE],
-       unsigned char S[DTLS_CCM_BLOCKSIZE]) {
-
-  static unsigned long counter_tmp;
-
-  SET_COUNTER(A, L, counter, counter_tmp);    
-  rijndael_encrypt(ctx, A, S);
-  memxor(msg, S, len);
-}
-
-INLINE_API void
-mac(rijndael_ctx *ctx, 
-    unsigned char *msg, size_t len,
-    unsigned char B[DTLS_CCM_BLOCKSIZE],
-    unsigned char X[DTLS_CCM_BLOCKSIZE]) {
-  size_t i;
-
-  for (i = 0; i < len; ++i)
-    B[i] = X[i] ^ msg[i];
-
-  rijndael_encrypt(ctx, B, X);
-
-}
-
-long int
-dtls_ccm_encrypt_message(rijndael_ctx *ctx, size_t M, size_t L, 
-                        unsigned char nonce[DTLS_CCM_BLOCKSIZE], 
-                        unsigned char *msg, size_t lm, 
-                        const unsigned char *aad, size_t la) {
-  size_t i, len;
-  unsigned long counter_tmp;
-  unsigned long counter = 1; /* \bug does not work correctly on ia32 when
-                                    lm >= 2^16 */
-  unsigned char A[DTLS_CCM_BLOCKSIZE]; /* A_i blocks for encryption input */
-  unsigned char B[DTLS_CCM_BLOCKSIZE]; /* B_i blocks for CBC-MAC input */
-  unsigned char S[DTLS_CCM_BLOCKSIZE]; /* S_i = encrypted A_i blocks */
-  unsigned char X[DTLS_CCM_BLOCKSIZE]; /* X_i = encrypted B_i blocks */
-
-  len = lm;                    /* save original length */
-  /* create the initial authentication block B0 */
-  block0(M, L, la, lm, nonce, B);
-  add_auth_data(ctx, aad, la, B, X);
-
-  /* initialize block template */
-  A[0] = L-1;
-
-  /* copy the nonce */
-  memcpy(A + 1, nonce, DTLS_CCM_BLOCKSIZE - L);
-  
-  while (lm >= DTLS_CCM_BLOCKSIZE) {
-    /* calculate MAC */
-    mac(ctx, msg, DTLS_CCM_BLOCKSIZE, B, X);
-
-    /* encrypt */
-    encrypt(ctx, L, counter, msg, DTLS_CCM_BLOCKSIZE, A, S);
-
-    /* update local pointers */
-    lm -= DTLS_CCM_BLOCKSIZE;
-    msg += DTLS_CCM_BLOCKSIZE;
-    counter++;
-  }
-
-  if (lm) {
-    /* Calculate MAC. The remainder of B must be padded with zeroes, so
-     * B is constructed to contain X ^ msg for the first lm bytes (done in
-     * mac() and X ^ 0 for the remaining DTLS_CCM_BLOCKSIZE - lm bytes
-     * (i.e., we can use memcpy() here).
-     */
-    memcpy(B + lm, X + lm, DTLS_CCM_BLOCKSIZE - lm);
-    mac(ctx, msg, lm, B, X);
-
-    /* encrypt */
-    encrypt(ctx, L, counter, msg, lm, A, S);
-
-    /* update local pointers */
-    msg += lm;
-  }
-  
-  /* calculate S_0 */  
-  SET_COUNTER(A, L, 0, counter_tmp);
-  rijndael_encrypt(ctx, A, S);
-
-  for (i = 0; i < M; ++i)
-    *msg++ = X[i] ^ S[i];
-
-  return len + M;
-}
-
-long int
-dtls_ccm_decrypt_message(rijndael_ctx *ctx, size_t M, size_t L,
-                        unsigned char nonce[DTLS_CCM_BLOCKSIZE], 
-                        unsigned char *msg, size_t lm, 
-                        const unsigned char *aad, size_t la) {
-  
-  size_t len;
-  unsigned long counter_tmp;
-  unsigned long counter = 1; /* \bug does not work correctly on ia32 when
-                                    lm >= 2^16 */
-  unsigned char A[DTLS_CCM_BLOCKSIZE]; /* A_i blocks for encryption input */
-  unsigned char B[DTLS_CCM_BLOCKSIZE]; /* B_i blocks for CBC-MAC input */
-  unsigned char S[DTLS_CCM_BLOCKSIZE]; /* S_i = encrypted A_i blocks */
-  unsigned char X[DTLS_CCM_BLOCKSIZE]; /* X_i = encrypted B_i blocks */
-
-  if (lm < M)
-    goto error;
-
-  len = lm;          /* save original length */
-  lm -= M;           /* detract MAC size*/
-
-  /* create the initial authentication block B0 */
-  block0(M, L, la, lm, nonce, B);
-  add_auth_data(ctx, aad, la, B, X);
-
-  /* initialize block template */
-  A[0] = L-1;
-
-  /* copy the nonce */
-  memcpy(A + 1, nonce, DTLS_CCM_BLOCKSIZE - L);
-  
-  while (lm >= DTLS_CCM_BLOCKSIZE) {
-    /* decrypt */
-    encrypt(ctx, L, counter, msg, DTLS_CCM_BLOCKSIZE, A, S);
-    
-    /* calculate MAC */
-    mac(ctx, msg, DTLS_CCM_BLOCKSIZE, B, X);
-
-    /* update local pointers */
-    lm -= DTLS_CCM_BLOCKSIZE;
-    msg += DTLS_CCM_BLOCKSIZE;
-    counter++;
-  }
-
-  if (lm) {
-    /* decrypt */
-    encrypt(ctx, L, counter, msg, lm, A, S);
-
-    /* Calculate MAC. Note that msg ends in the MAC so we must
-     * construct B to contain X ^ msg for the first lm bytes (done in
-     * mac() and X ^ 0 for the remaining DTLS_CCM_BLOCKSIZE - lm bytes
-     * (i.e., we can use memcpy() here).
-     */
-    memcpy(B + lm, X + lm, DTLS_CCM_BLOCKSIZE - lm);
-    mac(ctx, msg, lm, B, X); 
-
-    /* update local pointers */
-    msg += lm;
-  }
-  
-  /* calculate S_0 */  
-  SET_COUNTER(A, L, 0, counter_tmp);
-  rijndael_encrypt(ctx, A, S);
-
-  memxor(msg, S, M);
-
-  /* return length if MAC is valid, otherwise continue with error handling */
-  if (equals(X, msg, M))
-    return len - M;
-  
- error:
-  return -1;
-}
diff --git a/extlibs/tinydtls/ccm.h b/extlibs/tinydtls/ccm.h
deleted file mode 100644 (file)
index c3949d2..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_CCM_H_
-#define _DTLS_CCM_H_
-
-#include "aes/rijndael.h"
-
-/* implementation of Counter Mode CBC-MAC, RFC 3610 */
-
-#define DTLS_CCM_BLOCKSIZE  16 /**< size of hmac blocks */
-#define DTLS_CCM_MAX        16 /**< max number of bytes in digest */
-#define DTLS_CCM_NONCE_SIZE 12 /**< size of nonce */
-
-/** 
- * Authenticates and encrypts a message using AES in CCM mode. Please
- * see also RFC 3610 for the meaning of \p M, \p L, \p lm and \p la.
- * 
- * \param ctx The initialized rijndael_ctx object to be used for AES operations.
- * \param M   The number of authentication octets.
- * \param L   The number of bytes used to encode the message length.
- * \param N   The nonce value to use. You must provide \c DTLS_CCM_BLOCKSIZE 
- *            nonce octets, although only the first \c 16 - \p L are used.
- * \param msg The message to encrypt. The first \p la octets are additional
- *            authentication data that will be cleartext. Note that the 
- *            encryption operation modifies the contents of \p msg and adds 
- *            \p M bytes MAC. Therefore, the buffer must be at least
- *            \p lm + \p M bytes large.
- * \param lm  The actual length of \p msg.
- * \param aad A pointer to the additional authentication data (can be \c NULL if
- *            \p la is zero).
- * \param la  The number of additional authentication octets (may be zero).
- * \return FIXME
- */
-long int
-dtls_ccm_encrypt_message(rijndael_ctx *ctx, size_t M, size_t L, 
-                        unsigned char nonce[DTLS_CCM_BLOCKSIZE], 
-                        unsigned char *msg, size_t lm, 
-                        const unsigned char *aad, size_t la);
-
-long int
-dtls_ccm_decrypt_message(rijndael_ctx *ctx, size_t M, size_t L, 
-                        unsigned char nonce[DTLS_CCM_BLOCKSIZE], 
-                        unsigned char *msg, size_t lm, 
-                        const unsigned char *aad, size_t la);
-
-#endif /* _DTLS_CCM_H_ */
diff --git a/extlibs/tinydtls/configure.in b/extlibs/tinydtls/configure.in
deleted file mode 100644 (file)
index b341497..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-#
-# Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-AC_PREREQ([2.65])
-AC_INIT([tinydtls], [0.8.1])
-AC_CONFIG_SRCDIR([dtls.c])
-dnl AC_CONFIG_HEADERS([config.h])
-
-AC_ARG_WITH(contiki,
-  [AS_HELP_STRING([--with-contiki],[build libtinydtls for the Contiki OS])],
-  [AC_DEFINE(WITH_CONTIKI,1,[Define to 1 if building for Contiki.])
-   WITH_CONTIKI=1],
-  [])
-
-AC_PATH_PROG(DOXYGEN, doxygen, [:])
-AC_PATH_PROG(ETAGS, etags, [/bin/false])
-
-if test "${with_contiki}" != "yes" ; then
-# Checks for programs.
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_PROG_RANLIB
-
-AC_C_BIGENDIAN
-
-# Checks for libraries.
-AC_SEARCH_LIBS([gethostbyname], [nsl])
-AC_SEARCH_LIBS([socket], [socket])
-fi
-
-AC_ARG_WITH(debug,
-  [AS_HELP_STRING([--without-debug],[disable all debug output and assertions])],
-  [CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-   NDEBUG=1], 
-  [])
-
-AC_ARG_WITH(ecc,
-  [AS_HELP_STRING([--without-ecc],[disable support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8])],
-  [],
-  [AC_DEFINE(DTLS_ECC, 1, [Define to 1 if building with ECC support.])
-   OPT_OBJS="${OPT_OBJS} ecc/ecc.o"
-   DTLS_ECC=1])
-
-AC_ARG_WITH(psk,
-  [AS_HELP_STRING([--without-psk],[disable support for TLS_PSK_WITH_AES_128_CCM_8])],
-  [],
-  [AC_DEFINE(DTLS_PSK, 1, [Define to 1 if building with PSK support])
-   DTLS_PSK=1])
-
-AC_ARG_WITH(x509,
-  [AS_HELP_STRING([--with-x509],[use dtls as transport protocol])],
-  [AC_DEFINE(DTLS_X509, 1, [Define to 1 if building with X.509 support])
-   DTLS_X509=1],
-  [])
-
-AC_ARG_WITH(hal,
-  [AS_HELP_STRING([--with-hal],[use a hardware abstraction layer for crypto functions])],
-  [AC_DEFINE(DTLS_CRYPTO_HAL, 1, [Define to 1 if building with Hardware Abstraction Layer])
-   DTLS_CRYPTO_HAL=1],
-  [])
-
-CPPFLAGS="${CPPFLAGS} -DDTLSv12 -DWITH_SHA256"
-OPT_OBJS="${OPT_OBJS} sha2/sha2.o"
-
-AC_SUBST(OPT_OBJS)
-AC_SUBST(NDEBUG)
-AC_SUBST(WITH_CONTIKI)
-AC_SUBST(DTLS_ECC)
-AC_SUBST(DTLS_PSK)
-
-if test "${with_contiki}" = "yes" ; then
-  AC_MSG_NOTICE([skipping header checks for Contiki])
-else
-  # Checks for header files.
-  AC_CHECK_HEADERS([assert.h arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/param.h sys/socket.h unistd.h])
-
-  AC_CHECK_HEADERS([sys/time.h time.h])
-  AC_CHECK_HEADERS([sys/types.h sys/stat.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_INLINE
-AC_TYPE_SIZE_T
-
-AC_CHECK_MEMBER([struct sockaddr_in6.sin6_len],
-               [AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_LEN, [1], 
-                  [Define to 1 if struct sockaddr_in6 has a member sin6_len.])], [], 
-               [#include <netinet/in.h>])
-
-# Checks for library functions.
-AC_FUNC_MALLOC
-AC_CHECK_FUNCS([memset select socket strdup strerror strnlen fls vprintf])
-fi
-
-AC_CONFIG_HEADERS([dtls_config.h tinydtls.h])
-
-AC_CONFIG_FILES([Makefile
-                 doc/Makefile
-                 doc/Doxyfile
-                 tests/Makefile
-                 examples/contiki/Makefile
-                 platform-specific/Makefile
-                sha2/Makefile
-                aes/Makefile
-                ecc/Makefile])
-AC_OUTPUT
diff --git a/extlibs/tinydtls/crypto.c b/extlibs/tinydtls/crypto.c
deleted file mode 100644 (file)
index f1e8542..0000000
+++ /dev/null
@@ -1,801 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- *
- * Modified source code for micro-ecc porting,
- *
- * Following functions are removed:
- *   - dtls_ec_key_to_uint32
- *   - dtls_ec_key_from_uint32
- * Following functions are modified:
- *   - dtls_ecdh_pre_master_secret
- *   - dtls_ecdsa_generate_key
- *   - dtls_ecdsa_create_sig_hash
- *   - dtls_ecdsa_verify_sig_hash
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <stdio.h>
-
-#include "tinydtls.h"
-#include "dtls_config.h"
-
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#else
-#define assert(x)
-#endif
-
-#include "global.h"
-#include "debug.h"
-#include "numeric.h"
-#include "dtls.h"
-#include "crypto.h"
-#include "ccm.h"
-#include "ecc/ecc.h"
-#include "aes/rijndael.h"
-#include "sha2/sha2.h"
-#include "prng.h"
-#include "netq.h"
-#include "hmac.h"
-
-#if !defined(WITH_CONTIKI) && !defined(_WIN32)
-#include <pthread.h>
-#endif
-
-#define HMAC_UPDATE_SEED(Context,Seed,Length)          \
-  if (Seed) dtls_hmac_update(Context, (Seed), (Length))
-
-static struct dtls_cipher_context_t cipher_context;
-#if !defined(WITH_CONTIKI) && !defined(_WIN32)
-static pthread_mutex_t cipher_context_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-static struct dtls_cipher_context_t *dtls_cipher_context_get(void)
-{
-#if !defined(WITH_CONTIKI) && !defined(_WIN32)
-  pthread_mutex_lock(&cipher_context_mutex);
-#endif
-  return &cipher_context;
-}
-
-static void dtls_cipher_context_release(void)
-{
-#if !defined(WITH_CONTIKI) && !defined(_WIN32)
-  pthread_mutex_unlock(&cipher_context_mutex);
-#endif
-}
-
-#ifndef WITH_CONTIKI
-void crypto_init()
-{
-}
-
-static dtls_handshake_parameters_t *dtls_handshake_malloc() {
-  return malloc(sizeof(dtls_handshake_parameters_t));
-}
-
-static void dtls_handshake_dealloc(dtls_handshake_parameters_t *handshake) {
-  free(handshake);
-}
-
-static dtls_security_parameters_t *dtls_security_malloc() {
-  return malloc(sizeof(dtls_security_parameters_t));
-}
-
-static void dtls_security_dealloc(dtls_security_parameters_t *security) {
-  free(security);
-}
-#else /* WITH_CONTIKI */
-
-#include "memb.h"
-MEMB(handshake_storage, dtls_handshake_parameters_t, DTLS_HANDSHAKE_MAX);
-MEMB(security_storage, dtls_security_parameters_t, DTLS_SECURITY_MAX);
-
-void crypto_init() {
-  memb_init(&handshake_storage);
-  memb_init(&security_storage);
-}
-
-static dtls_handshake_parameters_t *dtls_handshake_malloc() {
-  return memb_alloc(&handshake_storage);
-}
-
-static void dtls_handshake_dealloc(dtls_handshake_parameters_t *handshake) {
-  memb_free(&handshake_storage, handshake);
-}
-
-static dtls_security_parameters_t *dtls_security_malloc() {
-  return memb_alloc(&security_storage);
-}
-
-static void dtls_security_dealloc(dtls_security_parameters_t *security) {
-  memb_free(&security_storage, security);
-}
-#endif /* WITH_CONTIKI */
-
-dtls_handshake_parameters_t *dtls_handshake_new()
-{
-  dtls_handshake_parameters_t *handshake;
-
-  handshake = dtls_handshake_malloc();
-  if (!handshake) {
-    dtls_crit("can not allocate a handshake struct\n");
-    return NULL;
-  }
-
-  memset(handshake, 0, sizeof(*handshake));
-
-  if (handshake) {
-    /* initialize the handshake hash wrt. the hard-coded DTLS version */
-    dtls_debug("DTLSv12: initialize HASH_SHA256\n");
-    /* TLS 1.2:  PRF(secret, label, seed) = P_<hash>(secret, label + seed) */
-    /* FIXME: we use the default SHA256 here, might need to support other
-              hash functions as well */
-    dtls_hash_init(&handshake->hs_state.hs_hash);
-  }
-  return handshake;
-}
-
-void dtls_handshake_free(dtls_handshake_parameters_t *handshake)
-{
-  if (!handshake)
-    return;
-
-  netq_delete_all(handshake->reorder_queue);
-  dtls_handshake_dealloc(handshake);
-}
-
-dtls_security_parameters_t *dtls_security_new()
-{
-  dtls_security_parameters_t *security;
-
-  security = dtls_security_malloc();
-  if (!security) {
-    dtls_crit("can not allocate a security struct\n");
-    return NULL;
-  }
-
-  memset(security, 0, sizeof(*security));
-
-  if (security) {
-    security->cipher = TLS_NULL_WITH_NULL_NULL;
-    security->compression = TLS_COMPRESSION_NULL;
-  }
-  return security;
-}
-
-void dtls_security_free(dtls_security_parameters_t *security)
-{
-  if (!security)
-    return;
-
-  dtls_security_dealloc(security);
-}
-
-size_t
-dtls_p_hash(dtls_hashfunc_t h,
-           const unsigned char *key, size_t keylen,
-           const unsigned char *label, size_t labellen,
-           const unsigned char *random1, size_t random1len,
-           const unsigned char *random2, size_t random2len,
-           unsigned char *buf, size_t buflen) {
-  dtls_hmac_context_t *hmac_a, *hmac_p;
-
-  unsigned char A[DTLS_HMAC_DIGEST_SIZE];
-  unsigned char tmp[DTLS_HMAC_DIGEST_SIZE];
-  size_t dlen;                 /* digest length */
-  size_t len = 0;                      /* result length */
-
-  hmac_a = dtls_hmac_new(key, keylen);
-  if (!hmac_a)
-    return 0;
-
-  /* calculate A(1) from A(0) == seed */
-  HMAC_UPDATE_SEED(hmac_a, label, labellen);
-  HMAC_UPDATE_SEED(hmac_a, random1, random1len);
-  HMAC_UPDATE_SEED(hmac_a, random2, random2len);
-
-  dlen = dtls_hmac_finalize(hmac_a, A);
-
-  hmac_p = dtls_hmac_new(key, keylen);
-  if (!hmac_p)
-    goto error;
-
-  while (len + dlen < buflen) {
-
-    /* FIXME: rewrite loop to avoid superflous call to dtls_hmac_init() */
-    dtls_hmac_init(hmac_p, key, keylen);
-    dtls_hmac_update(hmac_p, A, dlen);
-
-    HMAC_UPDATE_SEED(hmac_p, label, labellen);
-    HMAC_UPDATE_SEED(hmac_p, random1, random1len);
-    HMAC_UPDATE_SEED(hmac_p, random2, random2len);
-
-    len += dtls_hmac_finalize(hmac_p, tmp);
-    memcpy(buf, tmp, dlen);
-    buf += dlen;
-
-    /* calculate A(i+1) */
-    dtls_hmac_init(hmac_a, key, keylen);
-    dtls_hmac_update(hmac_a, A, dlen);
-    dtls_hmac_finalize(hmac_a, A);
-  }
-
-  dtls_hmac_init(hmac_p, key, keylen);
-  dtls_hmac_update(hmac_p, A, dlen);
-
-  HMAC_UPDATE_SEED(hmac_p, label, labellen);
-  HMAC_UPDATE_SEED(hmac_p, random1, random1len);
-  HMAC_UPDATE_SEED(hmac_p, random2, random2len);
-
-  dtls_hmac_finalize(hmac_p, tmp);
-  memcpy(buf, tmp, buflen - len);
-
- error:
-  dtls_hmac_free(hmac_a);
-  dtls_hmac_free(hmac_p);
-
-  return buflen;
-}
-
-size_t
-dtls_prf(const unsigned char *key, size_t keylen,
-        const unsigned char *label, size_t labellen,
-        const unsigned char *random1, size_t random1len,
-        const unsigned char *random2, size_t random2len,
-        unsigned char *buf, size_t buflen) {
-
-  /* Clear the result buffer */
-  memset(buf, 0, buflen);
-  return dtls_p_hash(HASH_SHA256,
-                    key, keylen,
-                    label, labellen,
-                    random1, random1len,
-                    random2, random2len,
-                    buf, buflen);
-}
-
-void
-dtls_mac(dtls_hmac_context_t *hmac_ctx,
-        const unsigned char *record,
-        const unsigned char *packet, size_t length,
-        unsigned char *buf) {
-  uint16 L;
-  dtls_int_to_uint16(L, length);
-
-  assert(hmac_ctx);
-  dtls_hmac_update(hmac_ctx, record +3, sizeof(uint16) + sizeof(uint48));
-  dtls_hmac_update(hmac_ctx, record, sizeof(uint8) + sizeof(uint16));
-  dtls_hmac_update(hmac_ctx, L, sizeof(uint16));
-  dtls_hmac_update(hmac_ctx, packet, length);
-
-  dtls_hmac_finalize(hmac_ctx, buf);
-}
-
-static size_t
-dtls_ccm_encrypt(aes128_t *ccm_ctx, const unsigned char *src, size_t srclen,
-                unsigned char *buf,
-                unsigned char *nounce,
-                const unsigned char *aad, size_t la) {
-  long int len;
-
-  assert(ccm_ctx);
-
-  len = dtls_ccm_encrypt_message(&ccm_ctx->ctx, 8 /* M */,
-                                max(2, 15 - DTLS_CCM_NONCE_SIZE),
-                                nounce,
-                                buf, srclen,
-                                aad, la);
-  return len;
-}
-
-static size_t
-dtls_ccm_decrypt(aes128_t *ccm_ctx, const unsigned char *src,
-                size_t srclen, unsigned char *buf,
-                unsigned char *nounce,
-                const unsigned char *aad, size_t la) {
-  long int len;
-
-  assert(ccm_ctx);
-
-  len = dtls_ccm_decrypt_message(&ccm_ctx->ctx, 8 /* M */,
-                                max(2, 15 - DTLS_CCM_NONCE_SIZE),
-                                nounce,
-                                buf, srclen,
-                                aad, la);
-  return len;
-}
-
-static size_t
-dtls_cbc_encrypt(aes128_t *aes_ctx,
-                 unsigned char *mac_key, size_t mac_keylen,
-                 const unsigned char *iv,
-                 const unsigned char *src, size_t srclen,
-                 unsigned char *buf) {
-
-    unsigned char cbc[DTLS_BLK_LENGTH];
-    unsigned char tmp[DTLS_BLK_LENGTH];
-    unsigned char *pos;
-    const unsigned char *dtls_hdr = NULL;
-    int i, j;
-    int blocks;
-    dtls_hmac_context_t* hmac_ctx = NULL;
-    int paddinglen = 0;
-
-    pos = buf;
-
-    dtls_hdr = src - DTLS_CBC_IV_LENGTH - sizeof(dtls_record_header_t);
-
-    //Calculate MAC : Append the MAC code to end of content
-    hmac_ctx = dtls_hmac_new(mac_key, mac_keylen);
-    dtls_mac(hmac_ctx,
-             dtls_hdr,
-             src, srclen,
-             buf + srclen);
-    dtls_hmac_free(hmac_ctx);
-    
-    dtls_debug_dump("[MAC]",
-                    buf + srclen,
-                    DTLS_HMAC_DIGEST_SIZE);
-
-    paddinglen = DTLS_BLK_LENGTH - ((srclen + DTLS_HMAC_DIGEST_SIZE) % DTLS_BLK_LENGTH);
-    
-    //TLS padding
-    memset(buf + (srclen + DTLS_HMAC_DIGEST_SIZE), paddinglen - 1, paddinglen);
-
-    memcpy(cbc, iv, DTLS_BLK_LENGTH);
-    blocks = (srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen) / DTLS_BLK_LENGTH;
-
-    for (i = 0; i < blocks; i++) {
-        for (j = 0; j < DTLS_BLK_LENGTH; j++) {
-            cbc[j] ^= pos[j];
-        }
-
-        rijndael_encrypt(&aes_ctx->ctx, cbc, tmp);
-        memcpy(cbc, tmp, DTLS_BLK_LENGTH);
-        memcpy(pos, cbc, DTLS_BLK_LENGTH);
-        pos += DTLS_BLK_LENGTH;
-    }
-
-    dtls_debug_dump("[Encrypted Data]",
-                    buf,
-                    srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen);
-    
-    return srclen + DTLS_HMAC_DIGEST_SIZE + paddinglen;
-}
-
-
-static size_t
-dtls_cbc_decrypt(aes128_t *aes_ctx,
-                 unsigned char *mac_key, size_t mac_keylen,
-                 const unsigned char *iv,
-                 const unsigned char *src, size_t srclen,
-                 unsigned char *buf) {
-
-    unsigned char cbc[DTLS_BLK_LENGTH];
-    unsigned char tmp[DTLS_BLK_LENGTH];
-    unsigned char tmp2[DTLS_BLK_LENGTH];
-    unsigned char mac_buf[DTLS_HMAC_DIGEST_SIZE] = {0,};
-    const unsigned char *dtls_hdr = NULL;
-    unsigned char *pos;
-    int i, j;
-    int blocks;
-    int depaddinglen = 0;
-    uint8_t wrongpadding_flag = 0;
-    dtls_hmac_context_t* hmac_ctx = NULL;
-
-    pos = buf;
-
-    dtls_hdr = src - DTLS_CBC_IV_LENGTH - sizeof(dtls_record_header_t);
-
-    memcpy(cbc, iv, DTLS_BLK_LENGTH);
-    blocks = srclen / DTLS_BLK_LENGTH;
-
-    for (i = 0; i < blocks; i++)
-    {
-        memcpy(tmp, pos, DTLS_BLK_LENGTH);
-        rijndael_decrypt(&aes_ctx->ctx, pos, tmp2);
-        memcpy(pos, tmp2, DTLS_BLK_LENGTH);
-
-        for (j = 0; j < DTLS_BLK_LENGTH; j++) {
-            pos[j] ^= cbc[j];
-        }
-
-        memcpy(cbc, tmp, DTLS_BLK_LENGTH);
-        pos += DTLS_BLK_LENGTH;
-    }
-
-    //de-padding
-    depaddinglen = buf[srclen -1];
-
-    /**
-     * message validation check in case of wrong key.
-     * In case of wrong padding legnth was detected
-     * set depadding length to zero in order to resist the padding oracle attack
-     * and prevent invalid memory access.
-     */
-    if(srclen <= DTLS_HMAC_DIGEST_SIZE + depaddinglen + 1) {
-        depaddinglen = 0;
-        wrongpadding_flag = 1;
-    }
-
-    //Calculate MAC
-    hmac_ctx = dtls_hmac_new(mac_key, mac_keylen);
-    if(!hmac_ctx) {
-        return -1;
-    }
-    dtls_mac(hmac_ctx, dtls_hdr, buf,
-             srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1,
-             mac_buf);
-    dtls_hmac_free(hmac_ctx);
-
-    dtls_debug_dump("[MAC]",
-                    mac_buf,
-                    DTLS_HMAC_DIGEST_SIZE);
-    dtls_debug_dump("[Decrypted data]",
-                    buf,
-                    srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1);
-
-    //verify the MAC
-    if(memcmp(mac_buf,
-              buf + (srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1),
-              DTLS_HMAC_DIGEST_SIZE) != 0 || wrongpadding_flag)
-    {
-        dtls_crit("Failed to verification of MAC\n");
-        return -1;
-    }
-
-    //verify the padding bytes
-    for (i =0; i < depaddinglen; i++)
-    {
-        if (buf[srclen - depaddinglen - 1 + i] != depaddinglen)
-        {
-            dtls_crit("Failed to verify padding bytes\n");
-            return -1;
-        }
-    }
-
-    return srclen - DTLS_HMAC_DIGEST_SIZE - depaddinglen - 1;
-}
-
-#ifdef DTLS_PSK
-int
-dtls_psk_pre_master_secret(unsigned char *key, size_t keylen,
-                          unsigned char *result, size_t result_len) {
-  unsigned char *p = result;
-
-  if (result_len < (2 * (sizeof(uint16) + keylen))) {
-    return -1;
-  }
-
-  dtls_int_to_uint16(p, keylen);
-  p += sizeof(uint16);
-
-  memset(p, 0, keylen);
-  p += keylen;
-
-  memcpy(p, result, sizeof(uint16));
-  p += sizeof(uint16);
-
-  memcpy(p, key, keylen);
-
-  return 2 * (sizeof(uint16) + keylen);
-}
-#endif /* DTLS_PSK */
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-
-int dtls_ec_key_from_uint32_asn1(const uint32_t *key, size_t key_size,
-                                unsigned char *buf) {
-  int i;
-  unsigned char *buf_orig = buf;
-  int first = 1;
-
-  for (i = (key_size / sizeof(uint32_t)) - 1; i >= 0 ; i--) {
-    if (key[i] == 0)
-      continue;
-    /* the first bit has to be set to zero, to indicate a poritive integer */
-    if (first && key[i] & 0x80000000) {
-      *buf = 0;
-      buf++;
-      dtls_int_to_uint32(buf, key[i]);
-      buf += 4;
-    } else if (first && !(key[i] & 0xFF800000)) {
-      buf[0] = (key[i] >> 16) & 0xff;
-      buf[1] = (key[i] >> 8) & 0xff;
-      buf[2] = key[i] & 0xff;
-      buf += 3;
-    } else if (first && !(key[i] & 0xFFFF8000)) {
-      buf[0] = (key[i] >> 8) & 0xff;
-      buf[1] = key[i] & 0xff;
-      buf += 2;
-    } else if (first && !(key[i] & 0xFFFFFF80)) {
-      buf[0] = key[i] & 0xff;
-      buf += 1;
-    } else {
-      dtls_int_to_uint32(buf, key[i]);
-      buf += 4;
-    }
-    first = 0;
-  }
-  return buf - buf_orig;
-}
-
-int dtls_ecdh_pre_master_secret(unsigned char *priv_key,
-                                  unsigned char *pub_key_x,
-                                   unsigned char *pub_key_y,
-                                   size_t key_size,
-                                   unsigned char *result,
-                                   size_t result_len) {
-
-  uint8_t publicKey[64];
-  uint8_t privateKey[32];
-
-  if (result_len < key_size) {
-    return -1;
-  }
-
-
-  memcpy(publicKey, pub_key_x, 32);
-  memcpy(publicKey + 32, pub_key_y, 32);
-  memcpy(privateKey, priv_key, 32);
-  uECC_shared_secret(publicKey, privateKey, result);
-
-  return key_size;
-}
-
-void
-dtls_ecdsa_generate_key(unsigned char *priv_key,
-                       unsigned char *pub_key_x,
-                       unsigned char *pub_key_y,
-                       size_t key_size) {
-
-  uint8_t publicKey[64];
-  uint8_t privateKey[32];
-
-  uECC_make_key(publicKey, privateKey);
-  memcpy(pub_key_x, publicKey, 32);
-  memcpy(pub_key_y, publicKey + 32, 32);
-  memcpy(priv_key, privateKey, 32);
-
-}
-
-/* rfc4492#section-5.4 */
-void
-dtls_ecdsa_create_sig_hash(const unsigned char *priv_key, size_t key_size,
-                           const unsigned char *sign_hash, size_t sign_hash_size,
-                           uint32_t point_r[9], uint32_t point_s[9])
-{
-    uint8_t sign[64];
-
-    // Check the buffers
-    if (priv_key == NULL || key_size < 32)
-        return;
-    if (sign_hash == NULL || sign_hash_size < 32)
-        return;
-
-    uECC_sign(priv_key, sign_hash, sign);
-
-    int i;
-    for (i = 0; i < 32; i++)
-    {
-        ((uint8_t *) point_r)[i] = sign[31 - i];
-        ((uint8_t *) point_s)[i] = sign[63 - i];
-    }
-}
-
-void
-dtls_ecdsa_create_sig(const unsigned char *priv_key, size_t key_size,
-                     const unsigned char *client_random, size_t client_random_size,
-                     const unsigned char *server_random, size_t server_random_size,
-                     const unsigned char *keyx_params, size_t keyx_params_size,
-                     uint32_t point_r[9], uint32_t point_s[9]) {
-  dtls_hash_ctx data;
-  unsigned char sha256hash[DTLS_HMAC_DIGEST_SIZE];
-
-  dtls_hash_init(&data);
-  dtls_hash_update(&data, client_random, client_random_size);
-  dtls_hash_update(&data, server_random, server_random_size);
-  dtls_hash_update(&data, keyx_params, keyx_params_size);
-  dtls_hash_finalize(sha256hash, &data);
-
-  dtls_ecdsa_create_sig_hash(priv_key, key_size, sha256hash,
-                            sizeof(sha256hash), point_r, point_s);
-}
-
-/* rfc4492#section-5.4 */
-int
-dtls_ecdsa_verify_sig_hash(const unsigned char *pub_key_x,
-                           const unsigned char *pub_key_y, size_t key_size,
-                           const unsigned char *sign_hash, size_t sign_hash_size,
-                           unsigned char *result_r, unsigned char *result_s)
-{
-    uint8_t publicKey[64];
-    uint8_t sign[64];
-
-    // Check the buffers
-    if (pub_key_x == NULL || pub_key_y == NULL || key_size < 32)
-        return 0;
-    if (sign_hash == NULL || sign_hash_size < 32)
-        return 0;
-    if (result_r == NULL || result_s == NULL)
-        return 0;
-
-    // Copy the public key into a single buffer
-    memcpy(publicKey, pub_key_x, 32);
-    memcpy(publicKey + 32, pub_key_y, 32);
-
-    // Copy the signature into a single buffer
-    memcpy(sign, result_r, 32);
-    memcpy(sign + 32, result_s, 32);
-
-    return uECC_verify(publicKey, sign_hash, sign);
-}
-
-int
-dtls_ecdsa_verify_sig(const unsigned char *pub_key_x,
-                     const unsigned char *pub_key_y, size_t key_size,
-                     const unsigned char *client_random, size_t client_random_size,
-                     const unsigned char *server_random, size_t server_random_size,
-                     const unsigned char *keyx_params, size_t keyx_params_size,
-                     unsigned char *result_r, unsigned char *result_s) {
-  dtls_hash_ctx data;
-  unsigned char sha256hash[DTLS_HMAC_DIGEST_SIZE];
-
-  dtls_hash_init(&data);
-  dtls_hash_update(&data, client_random, client_random_size);
-  dtls_hash_update(&data, server_random, server_random_size);
-  dtls_hash_update(&data, keyx_params, keyx_params_size);
-  dtls_hash_finalize(sha256hash, &data);
-
-  return dtls_ecdsa_verify_sig_hash(pub_key_x, pub_key_y, key_size, sha256hash,
-                                   sizeof(sha256hash), result_r, result_s);
-}
-#endif /* DTLS_ECC */
-
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-int dtls_ecdhe_psk_pre_master_secret(unsigned char *psk, size_t psklen,
-                                     unsigned char *ecc_priv_key,
-                                     unsigned char *ecc_pub_key_x,
-                                     unsigned char *ecc_pub_key_y,
-                                     size_t ecc_key_size,
-                                     unsigned char *result,
-                                     size_t result_len)
-{
-  uint8_t eccPublicKey[64];
-  uint8_t eccPrivateKey[32];
-  unsigned char *p = result;
-
-  if (result_len < uECC_BYTES + psklen + (sizeof(uint16) * 2)) {
-    return -1;
-  }
-
-  dtls_int_to_uint16(p, uECC_BYTES);
-  p += sizeof(uint16);
-
-  memcpy(eccPublicKey, ecc_pub_key_x, 32);
-  memcpy(eccPublicKey + 32, ecc_pub_key_y, 32);
-  memcpy(eccPrivateKey, ecc_priv_key, 32);
-  uECC_shared_secret(eccPublicKey, eccPrivateKey, p);
-  p += uECC_BYTES;
-
-  dtls_int_to_uint16(p, psklen);
-  p += sizeof(uint16);
-
-  memcpy(p, psk, psklen);
-
-  return uECC_BYTES + psklen + (sizeof(uint16) * 2);
-}
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-
-int
-dtls_encrypt(const unsigned char *src, size_t length,
-            unsigned char *buf,
-            unsigned char *nounce,
-            unsigned char *write_key, size_t write_keylen,
-            unsigned char *mac_key, size_t mac_keylen,
-            const unsigned char *aad, size_t la,
-            const dtls_cipher_t cipher)
-{
-  int ret = 0;
-  struct dtls_cipher_context_t *ctx = dtls_cipher_context_get();
-
-  if(cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ||
-     cipher == TLS_PSK_WITH_AES_128_CCM_8) {
-      ret = rijndael_set_key_enc_only(&ctx->data.ctx, write_key, 8 * write_keylen);
-      if (ret < 0) {
-        /* cleanup everything in case the key has the wrong size */
-        dtls_warn("cannot set rijndael key\n");
-        goto error;
-      }
-
-      if (src != buf)
-        memmove(buf, src, length);
-      ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la);
-  }
-  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 ||
-     cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256) {
-      ret = rijndael_set_key(&ctx->data.ctx, write_key, 8 * write_keylen);
-      if (ret < 0) {
-        /* cleanup everything in case the key has the wrong size */
-        dtls_warn("cannot set rijndael key\n");
-        goto error;
-      }
-
-      if (src != buf)
-        memmove(buf, src, length);
-      ret = dtls_cbc_encrypt(&ctx->data, mac_key, mac_keylen, nounce, src, length, buf);
-  }
-
-error:
-  dtls_cipher_context_release();
-  return ret;
-}
-
-int
-dtls_decrypt(const unsigned char *src, size_t length,
-            unsigned char *buf,
-            unsigned char *nounce,
-            unsigned char *read_key, size_t read_keylen,
-            unsigned char *mac_key, size_t mac_keylen,
-            const unsigned char *aad, size_t la,
-            const dtls_cipher_t cipher)
-{
-  int ret = 0;
-  struct dtls_cipher_context_t *ctx = dtls_cipher_context_get();
-
-  if(cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ||
-     cipher == TLS_PSK_WITH_AES_128_CCM_8) {
-      ret = rijndael_set_key_enc_only(&ctx->data.ctx, read_key, 8 * read_keylen);
-      if (ret < 0) {
-        /* cleanup everything in case the key has the wrong size */
-        dtls_warn("cannot set rijndael key\n");
-        goto error;
-      }
-
-      if (src != buf)
-        memmove(buf, src, length);
-      ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la);
-  }
-
-  if(cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 ||
-     cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256) {
-      ret = rijndael_set_key(&ctx->data.ctx, read_key, 8 * read_keylen);
-      if (ret < 0) {
-        /* cleanup everything in case the key has the wrong size */
-        dtls_warn("cannot set rijndael key\n");
-        goto error;
-      }
-
-      if (src != buf)
-        memmove(buf, src, length);
-      ret = dtls_cbc_decrypt(&ctx->data, mac_key, mac_keylen, nounce, src, length, buf);
-    }
-
-error:
-  dtls_cipher_context_release();
-  return ret;
-}
-
diff --git a/extlibs/tinydtls/crypto.h b/extlibs/tinydtls/crypto.h
deleted file mode 100644 (file)
index 8acf787..0000000
+++ /dev/null
@@ -1,437 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_CRYPTO_H_
-#define _DTLS_CRYPTO_H_
-
-#include <stdlib.h>            /* for rand() and srand() */
-#include <stdint.h>
-
-#include "t_list.h"
-
-#include "aes/rijndael.h"
-
-#include "global.h"
-#include "state.h"
-#include "numeric.h"
-#include "hmac.h"
-#include "ccm.h"
-#include "ecc/ecc.h"
-
-/* TLS_PSK_WITH_AES_128_CCM_8 */
-#define DTLS_CCM_MAC_KEY_LENGTH        0       /* MAC Key length for AES-CCM cipher suites */
-#define DTLS_CBC_MAC_KEY_LENGTH       32       /* MAC Key length for AES-CBC Cipher suites */
-#define DTLS_KEY_LENGTH        16 /* AES-128 */
-#define DTLS_BLK_LENGTH        16 /* AES-128 */
-#define DTLS_MAC_LENGTH        DTLS_HMAC_DIGEST_SIZE
-#define DTLS_CCM_IV_LENGTH     4  /* length of nonce_explicit */
-#define DTLS_CBC_IV_LENGTH     16
-
-/** 
- * Maximum size of the generated keyblock. Note that MAX_KEYBLOCK_LENGTH must 
- * be large enough to hold the pre_master_secret, i.e. twice the length of the 
- * pre-shared key + 1.
- */
-#define CCM_KB_LENGTH  \
-    (2 * DTLS_KEY_LENGTH + 2 * DTLS_CCM_IV_LENGTH)
-
-#define CBC_KB_LENGTH  \
-    (2 * DTLS_CBC_MAC_KEY_LENGTH + 2 * DTLS_KEY_LENGTH )
-
-#define MAX_KEYBLOCK_LENGTH  \
-    ((CCM_KB_LENGTH) > (CBC_KB_LENGTH) ? (CCM_KB_LENGTH) : (CBC_KB_LENGTH) )
-
-/** Length of DTLS master_secret */
-#define DTLS_MASTER_SECRET_LENGTH 48
-#define DTLS_RANDOM_LENGTH 32
-
-typedef enum { AES128=0 
-} dtls_crypto_alg;
-
-typedef enum {
-  DTLS_ECDH_CURVE_SECP256R1
-} dtls_ecdh_curve;
-
-/** Crypto context for TLS_PSK_WITH_AES_128_CCM_8 cipher suite. */
-typedef struct {
-  rijndael_ctx ctx;                   /**< AES-128 encryption context */
-} aes128_t;
-
-typedef struct dtls_cipher_context_t {
-  /** numeric identifier of this cipher suite in host byte order. */
-  aes128_t data;               /**< The crypto context */
-} dtls_cipher_context_t;
-
-typedef struct {
-  uint8 own_eph_priv[32];
-  uint8 other_eph_pub_x[32];
-  uint8 other_eph_pub_y[32];
-  uint8 other_pub_x[32];
-  uint8 other_pub_y[32];
-} dtls_handshake_parameters_ecc_t;
-
-
-/* This is the maximal supported length of the psk client identity and psk
- * server identity hint */
-#define DTLS_PSK_MAX_CLIENT_IDENTITY_LEN   32
-
-/* This is the maximal supported length of the pre-shared key. */
-#define DTLS_PSK_MAX_KEY_LEN 32
-
-typedef struct {
-  uint16_t id_length;
-  unsigned char identity[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-} dtls_handshake_parameters_psk_t;
-
-typedef struct {
-  dtls_compression_t compression;      /**< compression method */
-
-  dtls_cipher_t cipher;                /**< cipher type */
-  uint16_t epoch;           /**< counter for cipher state changes*/
-  uint64_t rseq;            /**< sequence number of last record sent */
-
-  /** 
-   * The key block generated from PRF applied to client and server
-   * random bytes. The actual size is given by the selected cipher and
-   * can be calculated using dtls_kb_size(). Use \c dtls_kb_ macros to
-   * access the components of the key block.
-   */
-  uint8 key_block[MAX_KEYBLOCK_LENGTH];
-} dtls_security_parameters_t;
-
-typedef struct {
-  union {
-    struct random_t {
-      uint8 client[DTLS_RANDOM_LENGTH];        /**< client random gmt and bytes */
-      uint8 server[DTLS_RANDOM_LENGTH];        /**< server random gmt and bytes */
-    } random;
-    /** the session's master secret */
-    uint8 master_secret[DTLS_MASTER_SECRET_LENGTH];
-  } tmp;
-  LIST_STRUCT(reorder_queue);  /**< the packets to reorder */
-  dtls_hs_state_t hs_state;  /**< handshake protocol status */
-
-  dtls_compression_t compression;              /**< compression method */
-  dtls_cipher_t cipher;                /**< cipher type */
-  unsigned int do_client_auth:1;
-
-#if defined(DTLS_ECC) && defined(DTLS_PSK)
-  struct keyx_t {
-    dtls_handshake_parameters_ecc_t ecc;
-    dtls_handshake_parameters_psk_t psk;
-  } keyx;
-#else /* DTLS_ECC && DTLS_PSK */
-  union {
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-    dtls_handshake_parameters_ecc_t ecc;
-#endif /* DTLS_ECC */
-#ifdef DTLS_PSK
-    dtls_handshake_parameters_psk_t psk;
-#endif /* DTLS_PSK */
-  } keyx;
-#endif /* DTLS_ECC && DTLS_PSK */
-} dtls_handshake_parameters_t;
-
-/* The following macros provide access to the components of the
- * key_block in the security parameters. */
-
-INLINE_API int dtls_kb_mac_secret_size(dtls_cipher_t cipher)
-{
-    switch(cipher)
-    {
-        case TLS_NULL_WITH_NULL_NULL:
-
-            return 0;
-            break;
-
-        case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-        case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256:
-
-            return DTLS_CBC_MAC_KEY_LENGTH;
-            break;
-
-        case TLS_PSK_WITH_AES_128_CCM_8:
-        case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-
-            return DTLS_CCM_MAC_KEY_LENGTH;
-            break;
-    }
-
-    return -1;
-}
-
-
-INLINE_API int dtls_kb_iv_size(dtls_cipher_t cipher)
-{
-    switch(cipher)
-    {
-        case TLS_NULL_WITH_NULL_NULL:
-        case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-        case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256:
-
-            return 0;
-            break;
-
-        case TLS_PSK_WITH_AES_128_CCM_8:
-        case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-
-            return DTLS_CCM_IV_LENGTH;
-            break;
-    }
-
-    return -1;
-}
-
-
-
-
-#define dtls_kb_client_mac_secret(Param, Role) ((Param)->key_block)
-#define dtls_kb_server_mac_secret(Param, Role)                         \
-  (dtls_kb_client_mac_secret(Param, Role) + dtls_kb_mac_secret_size((Param)->cipher))
-#define dtls_kb_remote_mac_secret(Param, Role)                         \
-  ((Role) == DTLS_SERVER                                               \
-   ? dtls_kb_client_mac_secret(Param, Role)                            \
-   : dtls_kb_server_mac_secret(Param, Role))
-#define dtls_kb_local_mac_secret(Param, Role)                          \
-  ((Role) == DTLS_CLIENT                                               \
-   ? dtls_kb_client_mac_secret(Param, Role)                            \
-   : dtls_kb_server_mac_secret(Param, Role))
-#define dtls_kb_client_write_key(Param, Role)                          \
-  (dtls_kb_server_mac_secret(Param, Role) + dtls_kb_mac_secret_size((Param)->cipher))
-#define dtls_kb_server_write_key(Param, Role)                          \
-  (dtls_kb_client_write_key(Param, Role) + DTLS_KEY_LENGTH)
-#define dtls_kb_remote_write_key(Param, Role)                          \
-  ((Role) == DTLS_SERVER                                               \
-   ? dtls_kb_client_write_key(Param, Role)                             \
-   : dtls_kb_server_write_key(Param, Role))
-#define dtls_kb_local_write_key(Param, Role)                           \
-  ((Role) == DTLS_CLIENT                                               \
-   ? dtls_kb_client_write_key(Param, Role)                             \
-   : dtls_kb_server_write_key(Param, Role))
-#define dtls_kb_key_size(Param, Role) DTLS_KEY_LENGTH
-#define dtls_kb_client_iv(Param, Role)                                 \
-  (dtls_kb_server_write_key(Param, Role) + DTLS_KEY_LENGTH)
-#define dtls_kb_server_iv(Param, Role)                                 \
-  (dtls_kb_client_iv(Param, Role) + dtls_kb_iv_size((Param)->cipher))
-#define dtls_kb_remote_iv(Param, Role)                                 \
-  ((Role) == DTLS_SERVER                                               \
-   ? dtls_kb_client_iv(Param, Role)                                    \
-   : dtls_kb_server_iv(Param, Role))
-#define dtls_kb_local_iv(Param, Role)                                  \
-  ((Role) == DTLS_CLIENT                                               \
-   ? dtls_kb_client_iv(Param, Role)                                    \
-   : dtls_kb_server_iv(Param, Role))
-
-#define dtls_kb_size(Param, Role)                                      \
-  (2 * (dtls_kb_mac_secret_size((Param)->cipher) +                     \
-       dtls_kb_key_size(Param, Role) + dtls_kb_iv_size((Param)->cipher)))
-
-/* just for consistency */
-#define dtls_kb_digest_size(Param, Role) DTLS_MAC_LENGTH
-
-/** 
- * Expands the secret and key to a block of DTLS_HMAC_MAX 
- * size according to the algorithm specified in section 5 of
- * RFC 4346.
- *
- * \param h       Identifier of the hash function to use.
- * \param key     The secret.
- * \param keylen  Length of \p key.
- * \param seed    The seed. 
- * \param seedlen Length of \p seed.
- * \param buf     Output buffer where the result is XORed into
- *                The buffe must be capable to hold at least
- *                \p buflen bytes.
- * \return The actual number of bytes written to \p buf or 0
- * on error.
- */
-size_t dtls_p_hash(dtls_hashfunc_t h, 
-                  const unsigned char *key, size_t keylen,
-                  const unsigned char *label, size_t labellen,
-                  const unsigned char *random1, size_t random1len,
-                  const unsigned char *random2, size_t random2len,
-                  unsigned char *buf, size_t buflen);
-
-/**
- * This function implements the TLS PRF for DTLS_VERSION. For version
- * 1.0, the PRF is P_MD5 ^ P_SHA1 while version 1.2 uses
- * P_SHA256. Currently, the actual PRF is selected at compile time.
- */
-size_t dtls_prf(const unsigned char *key, size_t keylen,
-               const unsigned char *label, size_t labellen,
-               const unsigned char *random1, size_t random1len,
-               const unsigned char *random2, size_t random2len,
-               unsigned char *buf, size_t buflen);
-
-/**
- * Calculates MAC for record + cleartext packet and places the result
- * in \p buf. The given \p hmac_ctx must be initialized with the HMAC
- * function to use and the proper secret. As the DTLS mac calculation
- * requires data from the record header, \p record must point to a
- * buffer of at least \c sizeof(dtls_record_header_t) bytes. Usually,
- * the remaining packet will be encrypted, therefore, the cleartext
- * is passed separately in \p packet.
- * 
- * \param hmac_ctx  The HMAC context to use for MAC calculation.
- * \param record    The record header.
- * \param packet    Cleartext payload to apply the MAC to.
- * \param length    Size of \p packet.
- * \param buf       A result buffer that is large enough to hold
- *                  the generated digest.
- */
-void dtls_mac(dtls_hmac_context_t *hmac_ctx, 
-             const unsigned char *record,
-             const unsigned char *packet, size_t length,
-             unsigned char *buf);
-
-/** 
- * Encrypts the specified \p src of given \p length, writing the
- * result to \p buf. The cipher implementation may add more data to
- * the result buffer such as an initialization vector or padding
- * (e.g. for block cipers in CBC mode). The caller therefore must
- * ensure that \p buf provides sufficient storage to hold the result.
- * Usually this means ( 2 + \p length / blocksize ) * blocksize.  The
- * function returns a value less than zero on error or otherwise the
- * number of bytes written.
- *
- * \param ctx    The cipher context to use.
- * \param src    The data to encrypt.
- * \param length The actual size of of \p src.
- * \param buf    The result buffer. \p src and \p buf must not 
- *               overlap.
- * \param aad    additional data for AEAD ciphers
- * \param aad_length actual size of @p aad
- * \return The number of encrypted bytes on success, less than zero
- *         otherwise. 
- */
-int dtls_encrypt(const unsigned char *src, size_t length,
-                unsigned char *buf,
-                unsigned char *nounce,
-                unsigned char *write_key, size_t write_keylen,
-                unsigned char *mac_key, size_t mac_keylen,
-                const unsigned char *aad, size_t aad_length,
-                const dtls_cipher_t cipher);
-
-/** 
- * Decrypts the given buffer \p src of given \p length, writing the
- * result to \p buf. The function returns \c -1 in case of an error,
- * or the number of bytes written. Note that for block ciphers, \p
- * length must be a multiple of the cipher's block size. A return
- * value between \c 0 and the actual length indicates that only \c n-1
- * block have been processed. Unlike dtls_encrypt(), the source
- * and destination of dtls_decrypt() may overlap. 
- * 
- * \param ctx     The cipher context to use.
- * \param src     The buffer to decrypt.
- * \param length  The length of the input buffer. 
- * \param buf     The result buffer.
- * \param aad     additional authentication data for AEAD ciphers
- * \param aad_length actual size of @p aad
- * \return Less than zero on error, the number of decrypted bytes 
- *         otherwise.
- */
-int dtls_decrypt(const unsigned char *src, size_t length,
-                unsigned char *buf,
-                unsigned char *nounce,
-                unsigned char *read_key, size_t read_keylen,
-                unsigned char *mac_key, size_t mac_keylen,
-                const unsigned char *a_data, size_t a_data_length,
-                const dtls_cipher_t cipher);
-
-/* helper functions */
-
-/** 
- * Generates pre_master_sercet from given PSK and fills the result
- * according to the "plain PSK" case in section 2 of RFC 4279.
- * Diffie-Hellman and RSA key exchange are currently not supported.
- *
- * @param key    The shared key.
- * @param keylen Length of @p key in bytes.
- * @param result The derived pre master secret.
- * @return The actual length of @p result.
- */
-int dtls_psk_pre_master_secret(unsigned char *key, size_t keylen,
-                              unsigned char *result, size_t result_len);
-
-#define DTLS_EC_KEY_SIZE 32
-
-int dtls_ecdh_pre_master_secret(unsigned char *priv_key,
-                               unsigned char *pub_key_x,
-                                unsigned char *pub_key_y,
-                                size_t key_size,
-                                unsigned char *result,
-                                size_t result_len);
-
-void dtls_ecdsa_generate_key(unsigned char *priv_key,
-                            unsigned char *pub_key_x,
-                            unsigned char *pub_key_y,
-                            size_t key_size);
-
-void dtls_ecdsa_create_sig_hash(const unsigned char *priv_key, size_t key_size,
-                               const unsigned char *sign_hash, size_t sign_hash_size,
-                               uint32_t point_r[9], uint32_t point_s[9]);
-
-void dtls_ecdsa_create_sig(const unsigned char *priv_key, size_t key_size,
-                          const unsigned char *client_random, size_t client_random_size,
-                          const unsigned char *server_random, size_t server_random_size,
-                          const unsigned char *keyx_params, size_t keyx_params_size,
-                          uint32_t point_r[9], uint32_t point_s[9]);
-
-int dtls_ecdsa_verify_sig_hash(const unsigned char *pub_key_x,
-                              const unsigned char *pub_key_y, size_t key_size,
-                              const unsigned char *sign_hash, size_t sign_hash_size,
-                              unsigned char *result_r, unsigned char *result_s);
-
-int dtls_ecdsa_verify_sig(const unsigned char *pub_key_x,
-                         const unsigned char *pub_key_y, size_t key_size,
-                         const unsigned char *client_random, size_t client_random_size,
-                         const unsigned char *server_random, size_t server_random_size,
-                         const unsigned char *keyx_params, size_t keyx_params_size,
-                         unsigned char *result_r, unsigned char *result_s);
-
-int dtls_ecdhe_psk_pre_master_secret(unsigned char *psk, size_t psklen,
-                               unsigned char *ecc_priv_key,
-                               unsigned char *ecc_pub_key_x,
-                               unsigned char *ecc_pub_key_y,
-                               size_t ecc_key_size,
-                               unsigned char *result,
-                               size_t result_len);
-
-int dtls_ec_key_from_uint32_asn1(const uint32_t *key, size_t key_size,
-                                unsigned char *buf);
-
-
-dtls_handshake_parameters_t *dtls_handshake_new();
-
-void dtls_handshake_free(dtls_handshake_parameters_t *handshake);
-
-dtls_security_parameters_t *dtls_security_new();
-
-void dtls_security_free(dtls_security_parameters_t *security);
-void crypto_init();
-
-#endif /* _DTLS_CRYPTO_H_ */
-
diff --git a/extlibs/tinydtls/debug.c b/extlibs/tinydtls/debug.c
deleted file mode 100644 (file)
index 5b458bc..0000000
+++ /dev/null
@@ -1,439 +0,0 @@
-/* debug.c -- debug utilities
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "tinydtls.h"
-#include "dtls_config.h"
-
-#if defined(HAVE_ASSERT_H) && !defined(assert)
-#include <assert.h>
-#endif
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
-
-#include "global.h"
-#include "debug.h"
-
-static int maxlog = DTLS_LOG_WARN;     /* default maximum log level */
-
-const char *dtls_package_name() {
-  return PACKAGE_NAME;
-}
-
-const char *dtls_package_version() {
-  return PACKAGE_VERSION;
-}
-
-log_t 
-dtls_get_log_level() {
-  return maxlog;
-}
-
-void
-dtls_set_log_level(log_t level) {
-  maxlog = level;
-}
-
-/* this array has the same order as the type log_t */
-#ifdef __ANDROID__
-static android_LogPriority loglevels_android[] = {
-  ANDROID_LOG_FATAL,
-  ANDROID_LOG_ERROR,
-  ANDROID_LOG_ERROR,
-  ANDROID_LOG_WARN,
-  ANDROID_LOG_INFO,
-  ANDROID_LOG_INFO,
-  ANDROID_LOG_DEBUG
-};
-#else
-static char *loglevels[] = {
-  "EMRG", "ALRT", "CRIT", "WARN", "NOTE", "INFO", "DEBG" 
-};
-#endif
-
-#ifdef HAVE_TIME_H
-
-INLINE_API size_t
-print_timestamp(char *s, size_t len, time_t t) {
-  struct tm *tmp;
-  tmp = localtime(&t);
-  return strftime(s, len, "%b %d %H:%M:%S", tmp);
-}
-
-#else /* alternative implementation: just print the timestamp */
-
-INLINE_API size_t
-print_timestamp(char *s, size_t len, clock_time_t t) {
-#ifdef HAVE_SNPRINTF
-  return snprintf(s, len, "%u.%03u", 
-                 (unsigned int)(t / CLOCK_SECOND), 
-                 (unsigned int)(t % CLOCK_SECOND));
-#else /* HAVE_SNPRINTF */
-  /* @todo do manual conversion of timestamp */
-  return 0;
-#endif /* HAVE_SNPRINTF */
-}
-
-#endif /* HAVE_TIME_H */
-
-/** 
- * A length-safe strlen() fake. 
- * 
- * @param s      The string to count characters != 0.
- * @param maxlen The maximum length of @p s.
- * 
- * @return The length of @p s.
- */
-INLINE_API size_t
-dtls_strnlen(const char *s, size_t maxlen) {
-  size_t n = 0;
-  while(*s++ && n < maxlen)
-    ++n;
-  return n;
-}
-
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
-static size_t
-dsrv_print_addr(const session_t *addr, char *buf, size_t len) {
-#if defined(HAVE_ARPA_INET_H) || defined(_WIN32)
-  const void *addrptr = NULL;
-#if defined(__ANDROID__) || defined(_WIN32)
-  unsigned short int port;
-#else
-  in_port_t port;
-#endif
-  char *p = buf;
-
-  switch (addr->addr.sa.sa_family) {
-  case AF_INET: 
-    if (len < INET_ADDRSTRLEN)
-      return 0;
-  
-    addrptr = &addr->addr.sin.sin_addr;
-    port = ntohs(addr->addr.sin.sin_port);
-    break;
-  case AF_INET6:
-    if (len < INET6_ADDRSTRLEN + 2)
-      return 0;
-
-    *p++ = '[';
-
-    addrptr = &addr->addr.sin6.sin6_addr;
-    port = ntohs(addr->addr.sin6.sin6_port);
-
-    break;
-  default:
-    memcpy(buf, "(unknown address type)", min(22, len));
-    return min(22, len);
-  }
-
-  if (inet_ntop(addr->addr.sa.sa_family, addrptr, p, len) == 0) {
-    perror("dsrv_print_addr");
-    return 0;
-  }
-
-  p += dtls_strnlen(p, len);
-
-  if (addr->addr.sa.sa_family == AF_INET6) {
-    if (p < buf + len) {
-      *p++ = ']';
-    } else 
-      return 0;
-  }
-
-  p += snprintf(p, buf + len - p + 1, ":%d", port);
-
-  return p - buf;
-#else /* HAVE_ARPA_INET_H */
-# if WITH_CONTIKI
-  char *p = buf;
-#  ifdef UIP_CONF_IPV6
-  uint8_t i;
-  const char hex[] = "0123456789ABCDEF";
-
-  if (len < 41)
-    return 0;
-
-  *p++ = '[';
-
-  for (i=0; i < 16; i += 2) {
-    if (i) {
-      *p++ = ':';
-    }
-    *p++ = hex[(addr->addr.u8[i] & 0xf0) >> 4];
-    *p++ = hex[(addr->addr.u8[i] & 0x0f)];
-    *p++ = hex[(addr->addr.u8[i+1] & 0xf0) >> 4];
-    *p++ = hex[(addr->addr.u8[i+1] & 0x0f)];
-  }
-  *p++ = ']';
-#  else /* UIP_CONF_IPV6 */
-#   warning "IPv4 network addresses will not be included in debug output"
-
-  if (len < 21)
-    return 0;
-#  endif /* UIP_CONF_IPV6 */
-  if (buf + len - p < 6)
-    return 0;
-
-  p += sprintf(p, ":%d", uip_htons(addr->port));
-
-  return p - buf;
-# else /* WITH_CONTIKI */
-  /* TODO: output addresses manually */
-#   warning "inet_ntop() not available, network addresses will not be included in debug output"
-# endif /* WITH_CONTIKI */
-  return 0;
-#endif
-}
-
-#ifdef __ANDROID__
-void
-dsrv_log(log_t level, char *format, ...) {
-  va_list ap;
-
-  if (maxlog < level)
-    return;
-
-  va_start(ap, format);
-  __android_log_vprint(loglevels_android[level], PACKAGE_NAME, format, ap);
-  va_end(ap);
-}
-#elif !defined (WITH_CONTIKI)
-void 
-dsrv_log(log_t level, char *format, ...) {
-  static char timebuf[32];
-  va_list ap;
-  FILE *log_fd;
-
-  if (maxlog < level)
-    return;
-
-  log_fd = level <= DTLS_LOG_CRIT ? stderr : stdout;
-
-  if (print_timestamp(timebuf,sizeof(timebuf), time(NULL)))
-    fprintf(log_fd, "%s ", timebuf);
-
-  if (level <= DTLS_LOG_DEBUG) 
-    fprintf(log_fd, "%s ", loglevels[level]);
-
-  va_start(ap, format);
-  vfprintf(log_fd, format, ap);
-  va_end(ap);
-  fflush(log_fd);
-}
-#elif defined (HAVE_VPRINTF) /* WITH_CONTIKI */
-void 
-dsrv_log(log_t level, char *format, ...) {
-  static char timebuf[32];
-  va_list ap;
-
-  if (maxlog < level)
-    return;
-
-  if (print_timestamp(timebuf,sizeof(timebuf), clock_time()))
-    PRINTF("%s ", timebuf);
-
-  if (level <= DTLS_LOG_DEBUG) 
-    PRINTF("%s ", loglevels[level]);
-
-  va_start(ap, format);
-  vprintf(format, ap);
-  va_end(ap);
-}
-#endif /* WITH_CONTIKI */
-
-#ifndef NDEBUG
-/** dumps packets in usual hexdump format */
-void hexdump(const unsigned char *packet, int length) {
-  int n = 0;
-
-  while (length--) { 
-    if (n % 16 == 0)
-      printf("%08X ",n);
-
-    printf("%02X ", *packet++);
-    
-    n++;
-    if (n % 8 == 0) {
-      if (n % 16 == 0)
-       printf("\n");
-      else
-       printf(" ");
-    }
-  }
-}
-
-/** dump as narrow string of hex digits */
-void dump(unsigned char *buf, size_t len) {
-  while (len--) 
-    printf("%02x", *buf++);
-}
-
-void dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr)
-{
-  char addrbuf[73];
-  int len;
-
-  len = dsrv_print_addr(addr, addrbuf, sizeof(addrbuf));
-  if (!len)
-    return;
-  dsrv_log(level, "%s: %s\n", name, addrbuf);
-}
-
-#ifdef __ANDROID__
-void
-dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int extend) {
-  char *hex_dump_text;
-  char *p;
-  int ret;
-  int size;
-
-  if (maxlog < level)
-    return;
-
-  size = length * 3 + strlen(name) + 22;
-  hex_dump_text = malloc(size);
-  if (!hex_dump_text)
-    return;
-
-  p = hex_dump_text;
-
-  ret = snprintf(p, size, "%s: (%zu bytes): ", name, length);
-  if (ret >= size)
-    goto print;
-  p += ret;
-  size -= ret;
-  while (length--) {
-    ret = snprintf(p, size, "%02X ", *buf++);
-    if (ret >= size)
-      goto print;
-    p += ret;
-    size -= ret;
-  }
-print:
-  __android_log_print(loglevels_android[level], PACKAGE_NAME, "%s\n", hex_dump_text);
-  free(hex_dump_text);
-}
-#elif !defined (WITH_CONTIKI)
-void 
-dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int extend) {
-  static char timebuf[32];
-  FILE *log_fd;
-  int n = 0;
-
-  if (maxlog < level)
-    return;
-
-  log_fd = level <= DTLS_LOG_CRIT ? stderr : stdout;
-
-  if (print_timestamp(timebuf, sizeof(timebuf), time(NULL)))
-    fprintf(log_fd, "%s ", timebuf);
-
-  if (level <= DTLS_LOG_DEBUG) 
-    fprintf(log_fd, "%s ", loglevels[level]);
-
-  if (extend) {
-    fprintf(log_fd, "%s: (%zu bytes):\n", name, length);
-
-    while (length--) {
-      if (n % 16 == 0)
-       fprintf(log_fd, "%08X ", n);
-
-      fprintf(log_fd, "%02X ", *buf++);
-
-      n++;
-      if (n % 8 == 0) {
-       if (n % 16 == 0)
-         fprintf(log_fd, "\n");
-       else
-         fprintf(log_fd, " ");
-      }
-    }
-  } else {
-    fprintf(log_fd, "%s: (%zu bytes): ", name, length);
-    while (length--) 
-      fprintf(log_fd, "%02X", *buf++);
-  }
-  fprintf(log_fd, "\n");
-
-  fflush(log_fd);
-}
-#else /* WITH_CONTIKI */
-void 
-dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int extend) {
-  static char timebuf[32];
-  int n = 0;
-
-  if (maxlog < level)
-    return;
-
-  if (print_timestamp(timebuf,sizeof(timebuf), clock_time()))
-    PRINTF("%s ", timebuf);
-
-  if (level >= 0 && level <= DTLS_LOG_DEBUG) 
-    PRINTF("%s ", loglevels[level]);
-
-  if (extend) {
-    PRINTF("%s: (%zu bytes):\n", name, length);
-
-    while (length--) {
-      if (n % 16 == 0)
-       PRINTF("%08X ", n);
-
-      PRINTF("%02X ", *buf++);
-
-      n++;
-      if (n % 8 == 0) {
-       if (n % 16 == 0)
-         PRINTF("\n");
-       else
-         PRINTF(" ");
-      }
-    }
-  } else {
-    PRINTF("%s: (%zu bytes): ", name, length);
-    while (length--) 
-      PRINTF("%02X", *buf++);
-  }
-  PRINTF("\n");
-}
-#endif /* WITH_CONTIKI */
-
-#endif /* NDEBUG */
diff --git a/extlibs/tinydtls/debug.h b/extlibs/tinydtls/debug.h
deleted file mode 100644 (file)
index b5c8199..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/* debug.h -- debug utilities
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_DEBUG_H_
-#define _DTLS_DEBUG_H_
-
-#include <stdlib.h>
-
-#include "dtls_config.h"
-#include "global.h"
-#include "session.h"
-
-#ifdef WITH_CONTIKI
-# ifndef DEBUG
-#  define DEBUG DEBUG_PRINT
-# endif /* DEBUG */
-#include "net/ip/uip-debug.h"
-
-#ifdef CONTIKI_TARGET_MBXXX
-extern char __Stack_Init, _estack;
-
-INLINE_API void check_stack() {
-  const char *p = &__Stack_Init;
-  while (p < &_estack && *p == 0x38) {
-    p++;
-  }
-
-  PRINTF("Stack: %d bytes used (%d free)\n", &_estack - p, p - &__Stack_Init);
-}
-#else /* CONTIKI_TARGET_MBXXX */
-INLINE_API void check_stack() {
-}
-#endif /* CONTIKI_TARGET_MBXXX */
-#else /* WITH_CONTKI */
-#define PRINTF(...)
-
-INLINE_API void check_stack() {
-}
-#endif
-
-/** Pre-defined log levels akin to what is used in \b syslog. */
-typedef enum { DTLS_LOG_EMERG=0, DTLS_LOG_ALERT, DTLS_LOG_CRIT, DTLS_LOG_WARN, 
-       DTLS_LOG_NOTICE, DTLS_LOG_INFO, DTLS_LOG_DEBUG
-} log_t;
-
-/** Returns a zero-terminated string with the name of this library. */
-const char *dtls_package_name();
-
-/** Returns a zero-terminated string with the library version. */
-const char *dtls_package_version();
-
-#ifndef NDEBUG
-/** Returns the current log level. */
-log_t dtls_get_log_level();
-
-/** Sets the log level to the specified value. */
-void dtls_set_log_level(log_t level);
-
-/** 
- * Writes the given text to \c stdout. The text is output only when \p
- * level is below or equal to the log level that set by
- * set_log_level(). */
-#ifdef HAVE_VPRINTF
-void dsrv_log(log_t level, char *format, ...);
-#else
-#define dsrv_log(level, format, ...) PRINTF(format, ##__VA_ARGS__)
-#endif
-
-/** dumps packets in usual hexdump format */
-void hexdump(const unsigned char *packet, int length);
-
-/** dump as narrow string of hex digits */
-void dump(unsigned char *buf, size_t len);
-
-void dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int extend);
-
-void dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr);
-
-#else /* NDEBUG */
-
-INLINE_API log_t dtls_get_log_level()
-{
-  return DTLS_LOG_EMERG;
-}
-
-INLINE_API void dtls_set_log_level(log_t level)
-{}
-
-INLINE_API void dsrv_log(log_t level, char *format, ...)
-{}
-
-INLINE_API void hexdump(const unsigned char *packet, int length)
-{}
-
-INLINE_API void dump(unsigned char *buf, size_t len)
-{}
-
-INLINE_API void
-dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, size_t length, int extend)
-{}
-
-INLINE_API void
-dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr)
-{}
-
-#endif /* NDEBUG */
-
-/* A set of convenience macros for common log levels. */
-#define dtls_emerg(...) dsrv_log(DTLS_LOG_EMERG, __VA_ARGS__)
-#define dtls_alert(...) dsrv_log(DTLS_LOG_ALERT, __VA_ARGS__)
-#define dtls_crit(...) dsrv_log(DTLS_LOG_CRIT, __VA_ARGS__)
-#define dtls_warn(...) dsrv_log(DTLS_LOG_WARN, __VA_ARGS__)
-#define dtls_notice(...) dsrv_log(DTLS_LOG_NOTICE, __VA_ARGS__)
-#define dtls_info(...) dsrv_log(DTLS_LOG_INFO, __VA_ARGS__)
-#define dtls_debug(...) dsrv_log(DTLS_LOG_DEBUG, __VA_ARGS__)
-#define dtls_debug_hexdump(name, buf, length) dtls_dsrv_hexdump_log(DTLS_LOG_DEBUG, name, buf, length, 1)
-#define dtls_debug_dump(name, buf, length) dtls_dsrv_hexdump_log(DTLS_LOG_DEBUG, name, buf, length, 0)
-
-#endif /* _DTLS_DEBUG_H_ */
diff --git a/extlibs/tinydtls/doc/Doxyfile.in b/extlibs/tinydtls/doc/Doxyfile.in
deleted file mode 100644 (file)
index 9f7ffdf..0000000
+++ /dev/null
@@ -1,1551 +0,0 @@
-# Doxyfile 1.6.3
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = @PACKAGE_NAME@
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it parses.
-# With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this tag.
-# The format is ext=language, where ext is a file extension, and language is one of
-# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
-# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
-# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
-# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
-# doxygen. The layout file controls the global structure of the generated output files
-# in an output format independent way. The create the layout file that represents
-# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
-# file name after the option, if omitted DoxygenLayout.xml will be used as the name
-# of the layout file.
-
-LAYOUT_FILE            =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = ..
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        =
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
-# are set, an additional index file will be generated that can be used as input for
-# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
-# HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
-# For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-#  plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES       = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             = DSRV_NO_DTLS DSRV_NO_PROTOCOL_DEMUX
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS         = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME           = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
diff --git a/extlibs/tinydtls/doc/DoxygenLayout.xml b/extlibs/tinydtls/doc/DoxygenLayout.xml
deleted file mode 100644 (file)
index 1c8525c..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-<doxygenlayout version="1.0">
-  <!-- Navigation index tabs for HTML output -->
-  <navindex>
-    <tab type="mainpage" visible="yes" title=""/>
-    <tab type="pages" visible="yes" title=""/>
-    <tab type="modules" visible="yes" title=""/>
-    <tab type="namespaces" visible="yes" title="">
-      <tab type="namespaces" visible="yes" title=""/>
-      <tab type="namespacemembers" visible="yes" title=""/>
-    </tab>
-    <tab type="classes" visible="yes" title="">
-      <tab type="classes" visible="yes" title=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
-      <tab type="hierarchy" visible="yes" title=""/>
-      <tab type="classmembers" visible="yes" title=""/>
-    </tab>
-    <tab type="files" visible="yes" title="">
-      <tab type="files" visible="yes" title=""/>
-      <tab type="globals" visible="yes" title=""/>
-    </tab>
-    <tab type="dirs" visible="yes" title=""/>
-    <tab type="examples" visible="yes" title=""/>  
-  </navindex>
-
-  <!-- Layout definition for a class page -->
-  <class>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <inheritancegraph visible="$CLASS_GRAPH"/>
-    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
-    <allmemberslink visible="yes"/>
-    <memberdecl>
-      <nestedclasses visible="yes" title=""/>
-      <publictypes title=""/>
-      <publicslots title=""/>
-      <signals title=""/>
-      <publicmethods title=""/>
-      <publicstaticmethods title=""/>
-      <publicattributes title=""/>
-      <publicstaticattributes title=""/>
-      <protectedtypes title=""/>
-      <protectedslots title=""/>
-      <protectedmethods title=""/>
-      <protectedstaticmethods title=""/>
-      <protectedattributes title=""/>
-      <protectedstaticattributes title=""/>
-      <packagetypes title=""/>
-      <packagemethods title=""/>
-      <packagestaticmethods title=""/>
-      <packageattributes title=""/>
-      <packagestaticattributes title=""/>
-      <properties title=""/>
-      <events title=""/>
-      <privatetypes title=""/>
-      <privateslots title=""/>
-      <privatemethods title=""/>
-      <privatestaticmethods title=""/>
-      <privateattributes title=""/>
-      <privatestaticattributes title=""/>
-      <friends title=""/>
-      <related title="" subtitle=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <constructors title=""/>
-      <functions title=""/>
-      <related title=""/>
-      <variables title=""/>
-      <properties title=""/>
-      <events title=""/>
-    </memberdef>
-    <usedfiles visible="$SHOW_USED_FILES"/>
-    <authorsection visible="yes"/>
-  </class>
-
-  <!-- Layout definition for a namespace page -->
-  <namespace>
-    <briefdescription visible="yes"/>
-    <memberdecl>
-      <nestednamespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </namespace>
-
-  <!-- Layout definition for a file page -->
-  <file>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <includegraph visible="$INCLUDE_GRAPH"/>
-    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
-    <sourcelink visible="yes"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection/>
-  </file>
-
-  <!-- Layout definition for a group page -->
-  <group>
-    <briefdescription visible="yes"/>
-    <groupgraph visible="$GROUP_GRAPHS"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <dirs visible="yes" title=""/>
-      <nestedgroups visible="yes" title=""/>
-      <files visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <pagedocs/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </group>
-
-  <!-- Layout definition for a directory page -->
-  <directory>
-    <briefdescription visible="yes"/>
-    <directorygraph visible="yes"/>
-    <memberdecl>
-      <dirs visible="yes"/>
-      <files visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-  </directory>
-</doxygenlayout>
diff --git a/extlibs/tinydtls/doc/Makefile.in b/extlibs/tinydtls/doc/Makefile.in
deleted file mode 100644 (file)
index a07101e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-PACKAGE_TARNAME:=@PACKAGE_TARNAME@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-DOXYGEN= @DOXYGEN@
-
-top_builddir = @top_builddir@
-prefix = @prefix@
-datarootdir = @datarootdir@
-docdir = @docdir@
-htmldir = @htmldir@
-
-DISTDIR?=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-FILES:=Makefile.in Doxyfile.in html
-
-doc:   Doxyfile
-       $(DOXYGEN) $< >./doxygen.out 2>&1 
-
-clean:
-       @rm -rf html
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ 
-
-dist:  doc
-       test -d $(DISTDIR)/doc || mkdir $(DISTDIR)/doc
-       cp -r $(FILES) $(DISTDIR)/doc
-
-install:       $(doc) html
-       test -d $(htmldir) || mkdir -p $(htmldir)
-       cp -r html/* $(htmldir)
diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c
deleted file mode 100644 (file)
index 5f2e400..0000000
+++ /dev/null
@@ -1,4982 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012,2014 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "tinydtls.h"
-#include "dtls_config.h"
-#include "dtls_time.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#ifndef WITH_CONTIKI
-#include <stdlib.h>
-#include "uthash.h"
-#endif /* WITH_CONTIKI */
-
-#include "debug.h"
-#include "numeric.h"
-#include "netq.h"
-#include "dtls.h"
-
-#include "alert.h"
-#include "session.h"
-#include "prng.h"
-
-#ifdef WITH_SHA256
-#  include "sha2/sha2.h"
-#endif
-
-#define dtls_set_version(H,V) dtls_int_to_uint16((H)->version, (V))
-#define dtls_set_content_type(H,V) ((H)->content_type = (V) & 0xff)
-#define dtls_set_length(H,V)  ((H)->length = (V))
-
-#define dtls_get_content_type(H) ((H)->content_type & 0xff)
-#define dtls_get_version(H) dtls_uint16_to_int((H)->version)
-#define dtls_get_epoch(H) dtls_uint16_to_int((H)->epoch)
-#define dtls_get_sequence_number(H) dtls_uint48_to_ulong((H)->sequence_number)
-#define dtls_get_fragment_length(H) dtls_uint24_to_int((H)->fragment_length)
-
-#ifndef WITH_CONTIKI
-#define HASH_FIND_PEER(head,sess,out)          \
-  HASH_FIND(hh,head,sess,sizeof(session_t),out)
-#define HASH_ADD_PEER(head,sess,add)           \
-  HASH_ADD(hh,head,sess,sizeof(session_t),add)
-#define HASH_DEL_PEER(head,delptr)             \
-  HASH_DELETE(hh,head,delptr)
-#endif /* WITH_CONTIKI */
-
-#define DTLS_RH_LENGTH sizeof(dtls_record_header_t)
-#define DTLS_HS_LENGTH sizeof(dtls_handshake_header_t)
-#define DTLS_CH_LENGTH sizeof(dtls_client_hello_t) /* no variable length fields! */
-#define DTLS_COOKIE_LENGTH_MAX 32
-#define DTLS_CH_LENGTH_MAX sizeof(dtls_client_hello_t) + DTLS_COOKIE_LENGTH_MAX + 12 + 26
-#define DTLS_HV_LENGTH sizeof(dtls_hello_verify_t)
-#define DTLS_SH_LENGTH (2 + DTLS_RANDOM_LENGTH + 1 + 2 + 1)
-#define DTLS_CE_LENGTH (3 + 3 + 27 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE)
-#define DTLS_SKEXEC_LENGTH (1 + 2 + 1 + 1 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE + 1 + 1 + 2 + 70)
-#define DTLS_SKEXEC_ECDH_ANON_LENGTH (1 + 2 + 1 + 1 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE)
-#define DTLS_SKEXECPSK_LENGTH_MIN 2
-#define DTLS_SKEXECPSK_LENGTH_MAX 2 + DTLS_PSK_MAX_CLIENT_IDENTITY_LEN
-#define DTLS_CKXPSK_LENGTH_MIN 2
-#define DTLS_CKXEC_LENGTH (1 + 1 + DTLS_EC_KEY_SIZE + DTLS_EC_KEY_SIZE)
-#define DTLS_CV_LENGTH (1 + 1 + 2 + 1 + 1 + 1 + 1 + DTLS_EC_KEY_SIZE + 1 + 1 + DTLS_EC_KEY_SIZE)
-#define DTLS_FIN_LENGTH 12
-
-#define HS_HDR_LENGTH  DTLS_RH_LENGTH + DTLS_HS_LENGTH
-#define HV_HDR_LENGTH  HS_HDR_LENGTH + DTLS_HV_LENGTH
-
-#define HIGH(V) (((V) >> 8) & 0xff)
-#define LOW(V)  ((V) & 0xff)
-
-#define DTLS_RECORD_HEADER(M) ((dtls_record_header_t *)(M))
-#define DTLS_HANDSHAKE_HEADER(M) ((dtls_handshake_header_t *)(M))
-
-#define HANDSHAKE(M) ((dtls_handshake_header_t *)((M) + DTLS_RH_LENGTH))
-#define CLIENTHELLO(M) ((dtls_client_hello_t *)((M) + HS_HDR_LENGTH))
-
-/* The length check here should work because dtls_*_to_int() works on
- * unsigned char. Otherwise, broken messages could cause severe
- * trouble. Note that this macro jumps out of the current program flow
- * when the message is too short. Beware!
- */
-#define SKIP_VAR_FIELD(P,L,T) {                                                \
-    if (L < dtls_ ## T ## _to_int(P) + sizeof(T))                      \
-      goto error;                                                      \
-    L -= dtls_ ## T ## _to_int(P) + sizeof(T);                         \
-    P += dtls_ ## T ## _to_int(P) + sizeof(T);                         \
-  }
-
-/* some constants for the PRF */
-#define PRF_LABEL(Label) prf_label_##Label
-#define PRF_LABEL_SIZE(Label) (sizeof(PRF_LABEL(Label)) - 1)
-
-static const unsigned char prf_label_master[] = "master secret";
-static const unsigned char prf_label_key[] = "key expansion";
-static const unsigned char prf_label_client[] = "client";
-static const unsigned char prf_label_server[] = "server";
-static const unsigned char prf_label_finished[] = " finished";
-
-/* first part of Raw public key, the is the start of the Subject Public Key */
-static const unsigned char cert_asn1_header[] = {
-  0x30, 0x59, /* SEQUENCE, length 89 bytes */
-    0x30, 0x13, /* SEQUENCE, length 19 bytes */
-      0x06, 0x07, /* OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1) */
-        0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01,
-      0x06, 0x08, /* OBJECT IDENTIFIER prime256v1 (1 2 840 10045 3 1 7) */
-        0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07,
-      0x03, 0x42, 0x00, /* BIT STRING, length 66 bytes, 0 bits unused */
-         0x04 /* uncompressed, followed by the r und s values of the public key */
-};
-
-#ifdef WITH_CONTIKI
-PROCESS(dtls_retransmit_process, "DTLS retransmit process");
-
-static dtls_context_t the_dtls_context;
-
-INLINE_API dtls_context_t *
-malloc_context() {
-  return &the_dtls_context;
-}
-
-INLINE_API void
-free_context(dtls_context_t *context) {
-}
-
-#else /* WITH_CONTIKI */
-
-INLINE_API dtls_context_t *
-malloc_context() {
-  return (dtls_context_t *)malloc(sizeof(dtls_context_t));
-}
-
-INLINE_API void
-free_context(dtls_context_t *context) {
-  free(context);
-}
-#endif
-
-void
-dtls_init() {
-  dtls_clock_init();
-  crypto_init();
-  netq_init();
-  peer_init();
-}
-
- void
- dtls_enables_anon_ecdh(dtls_context_t* ctx, dtls_cipher_enable_t is_enable)
-{
-    if(ctx)
-    {
-        ctx->is_anon_ecdh_eabled = is_enable;
-    }
-}
-
-void
-dtls_select_cipher(dtls_context_t* ctx, const dtls_cipher_t cipher)
-{
-    if(ctx)
-    {
-        ctx->selected_cipher = cipher;
-    }
-}
-
-/* Calls cb_alert() with given arguments if defined, otherwise an
- * error message is logged and the result is -1. This is just an
- * internal helper.
- */
-#define CALL(Context, which, ...)                                      \
-  ((Context)->h && (Context)->h->which                                 \
-   ? (Context)->h->which((Context), ##__VA_ARGS__)                     \
-   : -1)
-
-static int
-dtls_send_multi(dtls_context_t *ctx, dtls_peer_t *peer,
-               dtls_security_parameters_t *security , session_t *session,
-               unsigned char type, uint8 *buf_array[],
-               size_t buf_len_array[], size_t buf_array_len);
-
-/** 
- * Sends the fragment of length \p buflen given in \p buf to the
- * specified \p peer. The data will be MAC-protected and encrypted
- * according to the selected cipher and split into one or more DTLS
- * records of the specified \p type. This function returns the number
- * of bytes that were sent, or \c -1 if an error occurred.
- *
- * \param ctx    The DTLS context to use.
- * \param peer   The remote peer.
- * \param type   The content type of the record. 
- * \param buf    The data to send.
- * \param buflen The actual length of \p buf.
- * \return Less than zero on error, the number of bytes written otherwise.
- */
-static int
-dtls_send(dtls_context_t *ctx, dtls_peer_t *peer, unsigned char type,
-         uint8 *buf, size_t buflen) {
-  return dtls_send_multi(ctx, peer, dtls_security_params(peer), &peer->session,
-                        type, &buf, &buflen, 1);
-}
-
-/**
- * Stops ongoing retransmissions of handshake messages for @p peer.
- */
-static void dtls_stop_retransmission(dtls_context_t *context, dtls_peer_t *peer);
-
-/**
- * Starts retransmissions of handshake messages for @p peer.
- */
-static void dtls_start_retransmission(dtls_context_t *context, dtls_peer_t *peer);
-
-/**
- * Clears retransmissions of handshake messages for @p peer.
- */
-static void dtls_clear_retransmission(dtls_context_t *context, dtls_peer_t *peer);
-
-dtls_peer_t *
-dtls_get_peer(const dtls_context_t *ctx, const session_t *session) {
-  dtls_peer_t *p = NULL;
-
-#ifndef WITH_CONTIKI
-  HASH_FIND_PEER(ctx->peers, session, p);
-#else /* WITH_CONTIKI */
-  for (p = list_head(ctx->peers); p; p = list_item_next(p))
-    if (dtls_session_equals(&p->session, session))
-      return p;
-#endif /* WITH_CONTIKI */
-  
-  return p;
-}
-
-static void
-dtls_add_peer(dtls_context_t *ctx, dtls_peer_t *peer) {
-#ifndef WITH_CONTIKI
-  HASH_ADD_PEER(ctx->peers, session, peer);
-#else /* WITH_CONTIKI */
-  list_add(ctx->peers, peer);
-#endif /* WITH_CONTIKI */
-}
-
-int
-dtls_write(struct dtls_context_t *ctx, 
-          session_t *dst, uint8 *buf, size_t len) {
-  
-  dtls_peer_t *peer = dtls_get_peer(ctx, dst);
-
-  /* Check if peer connection already exists */
-  if (!peer) { /* no ==> create one */
-    int res;
-
-    /* dtls_connect() returns a value greater than zero if a new
-     * connection attempt is made, 0 for session reuse. */
-    res = dtls_connect(ctx, dst);
-
-    return (res >= 0) ? 0 : res;
-  } else { /* a session exists, check if it is in state connected */
-    
-    if (peer->state != DTLS_STATE_CONNECTED) {
-      return 0;
-    } else {
-      return dtls_send(ctx, peer, DTLS_CT_APPLICATION_DATA, buf, len);
-    }
-  }
-}
-
-static int
-dtls_get_cookie(uint8 *msg, size_t msglen, uint8 **cookie) {
-  /* To access the cookie, we have to determine the session id's
-   * length and skip the whole thing. */
-  if (msglen < DTLS_HS_LENGTH + DTLS_CH_LENGTH + sizeof(uint8))
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-
-  if (dtls_uint16_to_int(msg + DTLS_HS_LENGTH) != DTLS_VERSION)
-    return dtls_alert_fatal_create(DTLS_ALERT_PROTOCOL_VERSION);
-
-  msglen -= DTLS_HS_LENGTH + DTLS_CH_LENGTH;
-  msg += DTLS_HS_LENGTH + DTLS_CH_LENGTH;
-
-  SKIP_VAR_FIELD(msg, msglen, uint8); /* skip session id */
-
-  if (msglen < (*msg & 0xff) + sizeof(uint8))
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  
-  *cookie = msg + sizeof(uint8);
-  return dtls_uint8_to_int(msg);
-
- error:
-  return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-}
-
-static int
-dtls_create_cookie(dtls_context_t *ctx, 
-                  session_t *session,
-                  uint8 *msg, size_t msglen,
-                  uint8 *cookie, int *clen) {
-  unsigned char buf[DTLS_HMAC_MAX];
-  int len;
-  size_t e;
-
-  /* create cookie with HMAC-SHA256 over:
-   * - SECRET
-   * - session parameters (only IP address?)
-   * - client version 
-   * - random gmt and bytes
-   * - session id
-   * - cipher_suites 
-   * - compression method
-   */
-
-  /* We use our own buffer as hmac_context instead of a dynamic buffer
-   * created by dtls_hmac_new() to separate storage space for cookie
-   * creation from storage that is used in real sessions. Note that
-   * the buffer size must fit with the default hash algorithm (see
-   * implementation of dtls_hmac_context_new()). */
-
-  dtls_hmac_context_t hmac_context;
-  dtls_hmac_init(&hmac_context, ctx->cookie_secret, DTLS_COOKIE_SECRET_LENGTH);
-
-  dtls_hmac_update(&hmac_context, 
-                  (unsigned char *)&session->addr, session->size);
-
-  /* feed in the beginning of the Client Hello up to and including the
-     session id */
-  e = sizeof(dtls_client_hello_t);
-  e += (*(msg + DTLS_HS_LENGTH + e) & 0xff) + sizeof(uint8);
-  if (e + DTLS_HS_LENGTH > msglen)
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-
-  dtls_hmac_update(&hmac_context, msg + DTLS_HS_LENGTH, e);
-  
-  /* skip cookie bytes and length byte */
-  e += *(uint8 *)(msg + DTLS_HS_LENGTH + e) & 0xff;
-  e += sizeof(uint8);
-  if (e + DTLS_HS_LENGTH > msglen)
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-
-  dtls_hmac_update(&hmac_context, 
-                  msg + DTLS_HS_LENGTH + e,
-                  dtls_get_fragment_length(DTLS_HANDSHAKE_HEADER(msg)) - e);
-
-  len = dtls_hmac_finalize(&hmac_context, buf);
-
-  if (len < *clen) {
-    memset(cookie + len, 0, *clen - len);
-    *clen = len;
-  }
-  
-  memcpy(cookie, buf, *clen);
-  return 0;
-}
-
-#ifdef DTLS_CHECK_CONTENTTYPE
-/* used to check if a received datagram contains a DTLS message */
-static char const content_types[] = { 
-  DTLS_CT_CHANGE_CIPHER_SPEC,
-  DTLS_CT_ALERT,
-  DTLS_CT_HANDSHAKE,
-  DTLS_CT_APPLICATION_DATA,
-  0                            /* end marker */
-};
-#endif
-
-/**
- * Checks if \p msg points to a valid DTLS record. If
- * 
- */
-static unsigned int
-is_record(uint8 *msg, size_t msglen) {
-  unsigned int rlen = 0;
-
-  if (msglen >= DTLS_RH_LENGTH /* FIXME allow empty records? */
-#ifdef DTLS_CHECK_CONTENTTYPE
-      && strchr(content_types, msg[0])
-#endif
-      && msg[1] == HIGH(DTLS_VERSION)
-      && msg[2] == LOW(DTLS_VERSION)) 
-    {
-      rlen = DTLS_RH_LENGTH + 
-       dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->length);
-      
-      /* we do not accept wrong length field in record header */
-      if (rlen > msglen)       
-       rlen = 0;
-  } 
-  
-  return rlen;
-}
-
-/**
- * Initializes \p buf as record header. The caller must ensure that \p
- * buf is capable of holding at least \c sizeof(dtls_record_header_t)
- * bytes. Increments sequence number counter of \p security.
- * \return pointer to the next byte after the written header.
- * The length will be set to 0 and has to be changed before sending.
- */ 
-INLINE_API uint8 *
-dtls_set_record_header(uint8 type, dtls_security_parameters_t *security,
-                      uint8 *buf) {
-  
-  dtls_int_to_uint8(buf, type);
-  buf += sizeof(uint8);
-
-  dtls_int_to_uint16(buf, DTLS_VERSION);
-  buf += sizeof(uint16);
-
-  if (security) {
-    dtls_int_to_uint16(buf, security->epoch);
-    buf += sizeof(uint16);
-
-    dtls_int_to_uint48(buf, security->rseq);
-    buf += sizeof(uint48);
-
-    /* increment record sequence counter by 1 */
-    security->rseq++;
-  } else {
-    memset(buf, 0, sizeof(uint16) + sizeof(uint48));
-    buf += sizeof(uint16) + sizeof(uint48);
-  }
-
-  memset(buf, 0, sizeof(uint16));
-  return buf + sizeof(uint16);
-}
-
-/**
- * Initializes \p buf as handshake header. The caller must ensure that \p
- * buf is capable of holding at least \c sizeof(dtls_handshake_header_t)
- * bytes. Increments message sequence number counter of \p peer.
- * \return pointer to the next byte after \p buf
- */ 
-INLINE_API uint8 *
-dtls_set_handshake_header(uint8 type, dtls_peer_t *peer, 
-                         int length, 
-                         int frag_offset, int frag_length, 
-                         uint8 *buf) {
-  
-  dtls_int_to_uint8(buf, type);
-  buf += sizeof(uint8);
-
-  dtls_int_to_uint24(buf, length);
-  buf += sizeof(uint24);
-
-  if (peer && peer->handshake_params) {
-    /* and copy the result to buf */
-    dtls_int_to_uint16(buf, peer->handshake_params->hs_state.mseq_s);
-
-    /* increment handshake message sequence counter by 1 */
-    peer->handshake_params->hs_state.mseq_s++;
-  } else {
-    memset(buf, 0, sizeof(uint16));    
-  }
-  buf += sizeof(uint16);
-  
-  dtls_int_to_uint24(buf, frag_offset);
-  buf += sizeof(uint24);
-
-  dtls_int_to_uint24(buf, frag_length);
-  buf += sizeof(uint24);
-  
-  return buf;
-}
-
-/** only one compression method is currently defined */
-static uint8 compression_methods[] = {
-  TLS_COMPRESSION_NULL
-};
-
-/** returns true if the cipher matches TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */
-INLINE_API int is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(dtls_cipher_t cipher)
-{
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  return cipher == TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
-#else
-  return 0;
-#endif /* DTLS_ECC */
-}
-
-/** returns true if the cipher matches TLS_PSK_WITH_AES_128_CCM_8 */
-INLINE_API int is_tls_psk_with_aes_128_ccm_8(dtls_cipher_t cipher)
-{
-#ifdef DTLS_PSK
-  return cipher == TLS_PSK_WITH_AES_128_CCM_8;
-#else
-  return 0;
-#endif /* DTLS_PSK */
-}
-
-/** returns true if the cipher matches TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 */
-INLINE_API int is_tls_ecdh_anon_with_aes_128_cbc_sha_256(dtls_cipher_t cipher)
-{
-#ifdef DTLS_ECC
-    return cipher == TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256;
-#else
-    return 0;
-#endif
-}
-
-/** returns true if the cipher matches TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 */
-INLINE_API int is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(dtls_cipher_t cipher)
-{
-#if defined(DTLS_ECC) && defined(DTLS_PSK)
-  return cipher == TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256;
-#else
-  return 0;
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-}
-
-
-
-/** returns true if the application is configured for psk */
-INLINE_API int is_psk_supported(dtls_context_t *ctx)
-{
-#ifdef DTLS_PSK
-  return ctx && ctx->h && ctx->h->get_psk_info;
-#else
-  return 0;
-#endif /* DTLS_PSK */
-}
-
-/** returns true if the application is configured for ecdhe_ecdsa */
-INLINE_API int is_ecdsa_supported(dtls_context_t *ctx, int is_client)
-{
-#ifdef DTLS_ECC
-  return ctx && ctx->h && ((!is_client && ctx->h->get_ecdsa_key) ||
-                          (is_client && ctx->h->verify_ecdsa_key));
-#else
-  return 0;
-#endif /* DTLS_ECC */
-}
-
-/** returns true if the application is configured for x509 */
-INLINE_API int is_x509_supported(dtls_context_t *ctx, int is_client)
-{
-#ifdef DTLS_X509
-  return ctx && ctx->h && ((!is_client && ctx->h->get_x509_cert) ||
-               (is_client && ctx->h->verify_x509_cert));
-#else
-  return 0;
-#endif /* DTLS_X509 */
-}
-
-/** Returns true if the application is configured for ecdhe_ecdsa with
-  * client authentication */
-INLINE_API int is_ecdsa_client_auth_supported(dtls_context_t *ctx)
-{
-#ifdef DTLS_ECC
-  return ctx && ctx->h && ctx->h->get_ecdsa_key && ctx->h->verify_ecdsa_key;
-#else
-  return 0;
-#endif /* DTLS_ECC */
-}
-
-/** Returns true if the application is configured for x509 with
-  * client authentication */
-INLINE_API int is_x509_client_auth_supported(dtls_context_t *ctx)
-{
-#ifdef DTLS_X509
-  return ctx && ctx->h && ctx->h->get_x509_cert && ctx->h->verify_x509_cert;
-#else
-  return 0;
-#endif /* DTLS_X509 */
-}
-
-/** returns true if ecdh_anon_with_aes_128_cbc_sha is supported */
-INLINE_API int is_ecdh_anon_supported(dtls_context_t *ctx)
-{
-#ifdef DTLS_ECC
-    return ctx &&  (ctx->is_anon_ecdh_eabled == DTLS_CIPHER_ENABLE);
-#else
-    return 0;
-#endif
-}
-
-/** returns true if ecdhe_psk_with_aes_128_cbc_sha_256 is supported */
-INLINE_API int is_ecdhe_psk_supported(dtls_context_t *ctx)
-{
-#if defined(DTLS_ECC) && defined(DTLS_PSK)
-    return is_psk_supported(ctx);
-#else
-    return 0;
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-}
-
-
-/**
- * Returns @c 1 if @p code is a cipher suite other than @c
- * TLS_NULL_WITH_NULL_NULL that we recognize.
- *
- * @param ctx   The current DTLS context
- * @param code The cipher suite identifier to check
- * @param is_client 1 for a dtls client, 0 for server
- * @return @c 1 iff @p code is recognized,
- */ 
-static int
-known_cipher(dtls_context_t *ctx, dtls_cipher_t code, int is_client) {
-  int psk;
-  int ecdsa;
-  int ecdh_anon;
-  int ecdhe_psk;
-  int x509;
-
-  psk = is_psk_supported(ctx);
-  ecdsa = is_ecdsa_supported(ctx, is_client);
-  ecdh_anon = is_ecdh_anon_supported(ctx);
-  ecdhe_psk = is_ecdhe_psk_supported(ctx);
-  x509 = is_x509_supported(ctx, is_client);
-
-  return (psk && is_tls_psk_with_aes_128_ccm_8(code)) ||
-        (ecdsa && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code)) ||
-        (ecdh_anon && is_tls_ecdh_anon_with_aes_128_cbc_sha_256(code)) ||
-        (ecdhe_psk && is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(code)) ||
-     (x509 && is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(code));
-}
-
-/**
- * This method detects if we already have a established DTLS session with
- * peer and the peer is attempting to perform a fresh handshake by sending
- * messages with epoch = 0. This is to handle situations mentioned in
- * RFC 6347 - section 4.2.8.
- *
- * @param msg  The packet received from Client
- * @param msglen Packet length
- * @param peer peer who is the sender for this packet
- * @return @c 1 if this is a rehandshake attempt by
- * client
- */
-static int
-hs_attempt_with_existing_peer(uint8_t *msg, size_t msglen,
-    dtls_peer_t *peer)
-{
-    if ((peer) && (peer->state == DTLS_STATE_CONNECTED)) {
-      if (msg[0] == DTLS_CT_HANDSHAKE) {
-        uint16_t msg_epoch = dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->epoch);
-        if (msg_epoch == 0) {
-          dtls_handshake_header_t * hs_header = DTLS_HANDSHAKE_HEADER(msg + DTLS_RH_LENGTH);
-          if (hs_header->msg_type == DTLS_HT_CLIENT_HELLO ||
-              hs_header->msg_type == DTLS_HT_HELLO_REQUEST) {
-            return 1;
-          }
-        }
-      }
-    }
-    return 0;
-}
-
-/** Dump out the cipher keys and IVs used for the symetric cipher. */
-static void dtls_debug_keyblock(dtls_security_parameters_t *config)
-{
-  dtls_debug("key_block (%d bytes):\n", dtls_kb_size(config, peer->role));
-  dtls_debug_dump("  client_MAC_secret",
-                 dtls_kb_client_mac_secret(config, peer->role),
-                 dtls_kb_mac_secret_size(config->cipher));
-
-  dtls_debug_dump("  server_MAC_secret",
-                 dtls_kb_server_mac_secret(config, peer->role),
-                 dtls_kb_mac_secret_size(config->cipher));
-
-  dtls_debug_dump("  client_write_key",
-                 dtls_kb_client_write_key(config, peer->role),
-                 dtls_kb_key_size(config, peer->role));
-
-  dtls_debug_dump("  server_write_key",
-                 dtls_kb_server_write_key(config, peer->role),
-                 dtls_kb_key_size(config, peer->role));
-
-  dtls_debug_dump("  client_IV",
-                 dtls_kb_client_iv(config, peer->role),
-                 dtls_kb_iv_size(config->cipher));
-
-  dtls_debug_dump("  server_IV",
-                 dtls_kb_server_iv(config, peer->role),
-                 dtls_kb_iv_size(config->cipher));
-}
-
-/** returns the name of the goven handshake type number.
-  * see IANA for a full list of types:
-  * https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-7
-  */
-static char *dtls_handshake_type_to_name(int type)
-{
-  switch (type) {
-  case DTLS_HT_HELLO_REQUEST:
-    return "hello_request";
-  case DTLS_HT_CLIENT_HELLO:
-    return "client_hello";
-  case DTLS_HT_SERVER_HELLO:
-    return "server_hello";
-  case DTLS_HT_HELLO_VERIFY_REQUEST:
-    return "hello_verify_request";
-  case DTLS_HT_CERTIFICATE:
-    return "certificate";
-  case DTLS_HT_SERVER_KEY_EXCHANGE:
-    return "server_key_exchange";
-  case DTLS_HT_CERTIFICATE_REQUEST:
-    return "certificate_request";
-  case DTLS_HT_SERVER_HELLO_DONE:
-    return "server_hello_done";
-  case DTLS_HT_CERTIFICATE_VERIFY:
-    return "certificate_verify";
-  case DTLS_HT_CLIENT_KEY_EXCHANGE:
-    return "client_key_exchange";
-  case DTLS_HT_FINISHED:
-    return "finished";
-  default:
-    return "unknown";
-  }
-}
-
-/**
- * Calculate the pre master secret and after that calculate the master-secret.
- */
-static int
-calculate_key_block(dtls_context_t *ctx, 
-                   dtls_handshake_parameters_t *handshake,
-                   dtls_peer_t *peer,
-                   session_t *session,
-                   dtls_peer_type role) {
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-  unsigned char pre_master_secret[MAX_KEYBLOCK_LENGTH + uECC_BYTES];
-#else
-  unsigned char pre_master_secret[MAX_KEYBLOCK_LENGTH];
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-  int pre_master_len = 0;
-  dtls_security_parameters_t *security = dtls_security_params_next(peer);
-  uint8 master_secret[DTLS_MASTER_SECRET_LENGTH];
-
-  if (!security) {
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  switch (handshake->cipher) {
-#ifdef DTLS_PSK
-  case TLS_PSK_WITH_AES_128_CCM_8: {
-    unsigned char psk[DTLS_PSK_MAX_KEY_LEN];
-    int len;
-
-    len = CALL(ctx, get_psk_info, session, DTLS_PSK_KEY,
-              handshake->keyx.psk.identity,
-              handshake->keyx.psk.id_length,
-              psk, DTLS_PSK_MAX_KEY_LEN);
-    if (len < 0) {
-      dtls_crit("no psk key for session available\n");
-      return len;
-    }
-  /* Temporarily use the key_block storage space for the pre master secret. */
-    pre_master_len = dtls_psk_pre_master_secret(psk, len,
-                                               pre_master_secret,
-                                               MAX_KEYBLOCK_LENGTH);
-
-    dtls_debug_hexdump("psk", psk, len);
-
-    memset(psk, 0, DTLS_PSK_MAX_KEY_LEN);
-    if (pre_master_len < 0) {
-      dtls_crit("the psk was too long, for the pre master secret\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    break;
-  }
-#endif /* DTLS_PSK */
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-    pre_master_len = dtls_ecdh_pre_master_secret(handshake->keyx.ecc.own_eph_priv,
-                                                handshake->keyx.ecc.other_eph_pub_x,
-                                                handshake->keyx.ecc.other_eph_pub_y,
-                                                sizeof(handshake->keyx.ecc.own_eph_priv),
-                                                pre_master_secret,
-                                                MAX_KEYBLOCK_LENGTH);
-    if (pre_master_len < 0) {
-      dtls_crit("the curve was too long, for the pre master secret\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-    break;
-  }
-#endif /* DTLS_ECC */
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-    case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256: {
-      unsigned char psk[DTLS_PSK_MAX_KEY_LEN];
-      int psklen;
-
-      psklen = CALL(ctx, get_psk_info, session, DTLS_PSK_KEY,
-             handshake->keyx.psk.identity,
-             handshake->keyx.psk.id_length,
-             psk, DTLS_PSK_MAX_KEY_LEN);
-      if (psklen < 0) {
-        dtls_crit("no psk key for session available\n");
-        return psklen;
-      }
-
-      pre_master_len = dtls_ecdhe_psk_pre_master_secret(psk, psklen,
-                           handshake->keyx.ecc.own_eph_priv,
-                           handshake->keyx.ecc.other_eph_pub_x,
-                           handshake->keyx.ecc.other_eph_pub_y,
-                           sizeof(handshake->keyx.ecc.own_eph_priv),
-                           pre_master_secret,
-                           MAX_KEYBLOCK_LENGTH + uECC_BYTES);
-
-      if (pre_master_len < 0) {
-        dtls_crit("the curve was too long, for the pre master secret\n");
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-      }
-      break;
-    }
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC)  */
-  default:
-    dtls_crit("calculate_key_block: unknown cipher\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  dtls_debug_dump("client_random", handshake->tmp.random.client, DTLS_RANDOM_LENGTH);
-  dtls_debug_dump("server_random", handshake->tmp.random.server, DTLS_RANDOM_LENGTH);
-  dtls_debug_dump("pre_master_secret", pre_master_secret, pre_master_len);
-
-  dtls_prf(pre_master_secret, pre_master_len,
-          PRF_LABEL(master), PRF_LABEL_SIZE(master),
-          handshake->tmp.random.client, DTLS_RANDOM_LENGTH,
-          handshake->tmp.random.server, DTLS_RANDOM_LENGTH,
-          master_secret,
-          DTLS_MASTER_SECRET_LENGTH);
-
-  dtls_debug_dump("master_secret", master_secret, DTLS_MASTER_SECRET_LENGTH);
-
-  /* create key_block from master_secret
-   * key_block = PRF(master_secret,
-                    "key expansion" + tmp.random.server + tmp.random.client) */
-  security->cipher = handshake->cipher;
-  security->compression = handshake->compression;
-  security->rseq = 0;
-
-  dtls_prf(master_secret,
-          DTLS_MASTER_SECRET_LENGTH,
-          PRF_LABEL(key), PRF_LABEL_SIZE(key),
-          handshake->tmp.random.server, DTLS_RANDOM_LENGTH,
-          handshake->tmp.random.client, DTLS_RANDOM_LENGTH,
-          security->key_block,
-          dtls_kb_size(security, role));
-
-  memcpy(handshake->tmp.master_secret, master_secret, DTLS_MASTER_SECRET_LENGTH);
-  dtls_debug_keyblock(security);
-
-
-  return 0;
-}
-
-/* TODO: add a generic method which iterates over a list and searches for a specific key */
-static int verify_ext_eliptic_curves(uint8 *data, size_t data_length) {
-  int i, curve_name;
-
-  /* length of curve list */
-  i = dtls_uint16_to_int(data);
-  data += sizeof(uint16);
-  if (i + sizeof(uint16) != data_length) {
-    dtls_warn("the list of the supported elliptic curves should be tls extension length - 2\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  for (i = data_length - sizeof(uint16); i > 0; i -= sizeof(uint16)) {
-    /* check if this curve is supported */
-    curve_name = dtls_uint16_to_int(data);
-    data += sizeof(uint16);
-
-    if (curve_name == TLS_EXT_ELLIPTIC_CURVES_SECP256R1)
-      return 0;
-  }
-
-  dtls_warn("no supported elliptic curve found\n");
-  return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-}
-
-static int verify_ext_cert_type(uint8 *data, size_t data_length) {
-  int i, cert_type;
-
-  /* length of cert type list */
-  i = dtls_uint8_to_int(data);
-  data += sizeof(uint8);
-  if (i + sizeof(uint8) != data_length) {
-    dtls_warn("the list of the supported certificate types should be tls extension length - 1\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  for (i = data_length - sizeof(uint8); i > 0; i -= sizeof(uint8)) {
-    /* check if this cert type is supported */
-    cert_type = dtls_uint8_to_int(data);
-    data += sizeof(uint8);
-
-
-    if (cert_type == TLS_CERT_TYPE_RAW_PUBLIC_KEY)
-        return 0;
-#ifdef DTLS_X509
-    if (cert_type == TLS_CERT_TYPE_X509)
-        return 0;
-#endif
-  }
-
-  dtls_warn("no supported certificate type found\n");
-  return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-}
-
-static int verify_ext_ec_point_formats(uint8 *data, size_t data_length) {
-  int i, cert_type;
-
-  /* length of ec_point_formats list */
-  i = dtls_uint8_to_int(data);
-  data += sizeof(uint8);
-  if (i + sizeof(uint8) != data_length) {
-    dtls_warn("the list of the supported ec_point_formats should be tls extension length - 1\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  for (i = data_length - sizeof(uint8); i > 0; i -= sizeof(uint8)) {
-    /* check if this ec_point_format is supported */
-    cert_type = dtls_uint8_to_int(data);
-    data += sizeof(uint8);
-
-    if (cert_type == TLS_EXT_EC_POINT_FORMATS_UNCOMPRESSED)
-      return 0;
-  }
-
-  dtls_warn("no supported ec_point_format found\n");
-  return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-}
-
-/*
- * Check for some TLS Extensions used by the ECDHE_ECDSA cipher.
- */
-static int
-dtls_check_tls_extension(dtls_peer_t *peer,
-                        uint8 *data, size_t data_length, int client_hello)
-{
-  uint16_t i, j;
-  int ext_elliptic_curve = 0;
-  int ext_client_cert_type = 0;
-  int ext_server_cert_type = 0;
-  int ext_ec_point_formats = 0;
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-
-  if (data_length < sizeof(uint16)) { 
-    /* no tls extensions specified */
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher)) {
-      goto error;
-    }
-    return 0;
-  }
-
-  /* get the length of the tls extension list */
-  j = dtls_uint16_to_int(data);
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  if (data_length < j)
-    goto error;
-
-  /* check for TLS extensions needed for this cipher */
-  while (data_length) {
-    if (data_length < sizeof(uint16) * 2)
-      goto error;
-
-    /* get the tls extension type */
-    i = dtls_uint16_to_int(data);
-    data += sizeof(uint16);
-    data_length -= sizeof(uint16);
-
-    /* get the length of the tls extension */
-    j = dtls_uint16_to_int(data);
-    data += sizeof(uint16);
-    data_length -= sizeof(uint16);
-
-    if (data_length < j)
-      goto error;
-
-    switch (i) {
-      case TLS_EXT_ELLIPTIC_CURVES:
-        ext_elliptic_curve = 1;
-        if (verify_ext_eliptic_curves(data, j))
-          goto error;
-        break;
-      case TLS_EXT_CLIENT_CERTIFICATE_TYPE:
-        ext_client_cert_type = 1;
-        if (client_hello) {
-         if (verify_ext_cert_type(data, j))
-            goto error;
-        } else {
-#ifndef DTLS_X509
-         if (dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY)
-#else
-         if ((dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY) &&
-             (dtls_uint8_to_int(data) != TLS_CERT_TYPE_X509))
-#endif
-           goto error;
-        }
-        break;
-      case TLS_EXT_SERVER_CERTIFICATE_TYPE:
-        ext_server_cert_type = 1;
-        if (client_hello) {
-         if (verify_ext_cert_type(data, j))
-            goto error;
-        } else {
-#ifndef DTLS_X509
-         if (dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY)
-#else
-         if ((dtls_uint8_to_int(data) != TLS_CERT_TYPE_RAW_PUBLIC_KEY) &&
-             (dtls_uint8_to_int(data) != TLS_CERT_TYPE_X509))
-#endif
-           goto error;
-        }
-        break;
-      case TLS_EXT_EC_POINT_FORMATS:
-        ext_ec_point_formats = 1;
-        if (verify_ext_ec_point_formats(data, j))
-          goto error;
-        break;
-      case TLS_EXT_ENCRYPT_THEN_MAC:
-       /* As only AEAD cipher suites are currently available, this
-        * extension can be skipped. 
-        */
-       dtls_info("skipped encrypt-then-mac extension\n");
-       break;
-      default:
-        dtls_warn("unsupported tls extension: %i\n", i);
-        break;
-    }
-    data += j;
-    data_length -= j;
-  }
-  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && client_hello) {
-    if (!ext_elliptic_curve || !ext_client_cert_type || !ext_server_cert_type
-       || !ext_ec_point_formats) {
-      dtls_warn("not all required tls extensions found in client hello\n");
-      goto error;
-    }
-  } else if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && !client_hello) {
-    if (!ext_client_cert_type || !ext_server_cert_type) {
-      dtls_warn("not all required tls extensions found in server hello\n");
-      goto error;
-    }
-  }
-  return 0;
-
-error:
-  if (client_hello && peer->state == DTLS_STATE_CONNECTED) {
-    return dtls_alert_create(DTLS_ALERT_LEVEL_WARNING, DTLS_ALERT_NO_RENEGOTIATION);
-  } else {
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-}
-
-/**
- * Parses the ClientHello from the client and updates the internal handshake
- * parameters with the new data for the given \p peer. When the ClientHello
- * handshake message in \p data does not contain a cipher suite or
- * compression method, it is copied from the the current security parameters.
- *
- * \param ctx   The current DTLS context.
- * \param peer  The remote peer whose security parameters are about to change.
- * \param data  The handshake message with a ClientHello. 
- * \param data_length The actual size of \p data.
- * \return \c -Something if an error occurred, \c 0 on success.
- */
-static int
-dtls_update_parameters(dtls_context_t *ctx, 
-                      dtls_peer_t *peer,
-                      uint8 *data, size_t data_length) {
-  int i;
-  unsigned int j;
-  int ok;
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  dtls_security_parameters_t *security = dtls_security_params(peer);
-
-  assert(config);
-  assert(data_length > DTLS_HS_LENGTH + DTLS_CH_LENGTH);
-
-  /* skip the handshake header and client version information */
-  data += DTLS_HS_LENGTH + sizeof(uint16);
-  data_length -= DTLS_HS_LENGTH + sizeof(uint16);
-
-  /* store client random in config */
-  memcpy(config->tmp.random.client, data, DTLS_RANDOM_LENGTH);
-  data += DTLS_RANDOM_LENGTH;
-  data_length -= DTLS_RANDOM_LENGTH;
-
-  /* Caution: SKIP_VAR_FIELD may jump to error: */
-  SKIP_VAR_FIELD(data, data_length, uint8);    /* skip session id */
-  SKIP_VAR_FIELD(data, data_length, uint8);    /* skip cookie */
-
-  i = dtls_uint16_to_int(data);
-  if (data_length < i + sizeof(uint16)) {
-    /* Looks like we do not have a cipher nor compression. This is ok
-     * for renegotiation, but not for the initial handshake. */
-
-    if (!security || security->cipher == TLS_NULL_WITH_NULL_NULL)
-      goto error;
-
-    config->cipher = security->cipher;
-    config->compression = security->compression;
-
-    return 0;
-  }
-
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16) + i;
-
-  ok = 0;
-  while (i && !ok) {
-    config->cipher = dtls_uint16_to_int(data);
-    ok = known_cipher(ctx, config->cipher, 0);
-    i -= sizeof(uint16);
-    data += sizeof(uint16);
-  }
-
-  /* skip remaining ciphers */
-  data += i;
-
-  if (!ok) {
-    /* reset config cipher to a well-defined value */
-    config->cipher = TLS_NULL_WITH_NULL_NULL;
-    dtls_warn("No matching cipher found\n");
-    goto error;
-  }
-
-  if (data_length < sizeof(uint8)) { 
-    /* no compression specified, take the current compression method */
-    if (security)
-      config->compression = security->compression;
-    else
-      config->compression = TLS_COMPRESSION_NULL;
-    return 0;
-  }
-
-  i = dtls_uint8_to_int(data);
-  if (data_length < i + sizeof(uint8))
-    goto error;
-
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8) + i;
-
-  ok = 0;
-  while (i && !ok) {
-    for (j = 0; j < sizeof(compression_methods) / sizeof(uint8); ++j)
-      if (dtls_uint8_to_int(data) == compression_methods[j]) {
-       config->compression = compression_methods[j];
-       ok = 1;
-      }
-    i -= sizeof(uint8);
-    data += sizeof(uint8);    
-  }
-
-  if (!ok) {
-    /* reset config cipher to a well-defined value */
-    goto error;
-  }
-  
-  return dtls_check_tls_extension(peer, data, data_length, 1);
-error:
-  if (peer->state == DTLS_STATE_CONNECTED) {
-    return dtls_alert_create(DTLS_ALERT_LEVEL_WARNING, DTLS_ALERT_NO_RENEGOTIATION);
-  } else {
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-}
-
-/**
- * Parse the ClientKeyExchange and update the internal handshake state with
- * the new data.
- */
-INLINE_API int
-check_client_keyexchange(dtls_context_t *ctx, 
-                        dtls_handshake_parameters_t *handshake,
-                        uint8 *data, size_t length) {
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) ||
-       is_tls_ecdh_anon_with_aes_128_cbc_sha_256(handshake->cipher) ) {
-
-    if (length < DTLS_HS_LENGTH + DTLS_CKXEC_LENGTH) {
-      dtls_debug("The client key exchange is too short\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += DTLS_HS_LENGTH;
-
-    if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-      dtls_alert("expected 65 bytes long public point\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += sizeof(uint8);
-
-    if (dtls_uint8_to_int(data) != 4) {
-      dtls_alert("expected uncompressed public point\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += sizeof(uint8);
-
-    memcpy(handshake->keyx.ecc.other_eph_pub_x, data,
-          sizeof(handshake->keyx.ecc.other_eph_pub_x));
-    data += sizeof(handshake->keyx.ecc.other_eph_pub_x);
-
-    memcpy(handshake->keyx.ecc.other_eph_pub_y, data,
-          sizeof(handshake->keyx.ecc.other_eph_pub_y));
-    data += sizeof(handshake->keyx.ecc.other_eph_pub_y);
-  }
-#endif /* DTLS_ECC */
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-  if (is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(handshake->cipher)) {
-    int id_length;
-
-    if (length < DTLS_HS_LENGTH + DTLS_CKXEC_LENGTH) {
-      dtls_debug("The client key exchange is too short\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += DTLS_HS_LENGTH;
-
-    //PSK hint
-    id_length = dtls_uint16_to_int(data);
-    data += sizeof(uint16);
-
-    if (DTLS_HS_LENGTH + DTLS_CKXPSK_LENGTH_MIN + DTLS_CKXEC_LENGTH + id_length != length) {
-      dtls_debug("The identity has a wrong length\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-
-    if (id_length > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-      dtls_warn("please use a smaller client identity\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    handshake->keyx.psk.id_length = id_length;
-    memcpy(handshake->keyx.psk.identity, data, id_length);
-    data += id_length;
-
-    //ECDH public
-    if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-      dtls_alert("expected 65 bytes long public point\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += sizeof(uint8);
-
-    if (dtls_uint8_to_int(data) != 4) {
-      dtls_alert("expected uncompressed public point\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += sizeof(uint8);
-
-    memcpy(handshake->keyx.ecc.other_eph_pub_x, data,
-       sizeof(handshake->keyx.ecc.other_eph_pub_x));
-    data += sizeof(handshake->keyx.ecc.other_eph_pub_x);
-
-    memcpy(handshake->keyx.ecc.other_eph_pub_y, data,
-       sizeof(handshake->keyx.ecc.other_eph_pub_y));
-    data += sizeof(handshake->keyx.ecc.other_eph_pub_y);
-  }
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-#ifdef DTLS_PSK
-  if (is_tls_psk_with_aes_128_ccm_8(handshake->cipher)) {
-    int id_length;
-
-    if (length < DTLS_HS_LENGTH + DTLS_CKXPSK_LENGTH_MIN) {
-      dtls_debug("The client key exchange is too short\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-    data += DTLS_HS_LENGTH;
-
-    id_length = dtls_uint16_to_int(data);
-    data += sizeof(uint16);
-
-    if (DTLS_HS_LENGTH + DTLS_CKXPSK_LENGTH_MIN + id_length != length) {
-      dtls_debug("The identity has a wrong length\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-
-    if (id_length > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-      dtls_warn("please use a smaller client identity\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    handshake->keyx.psk.id_length = id_length;
-    memcpy(handshake->keyx.psk.identity, data, id_length);
-  }
-#endif /* DTLS_PSK */
-  return 0;
-}
-
-INLINE_API void
-update_hs_hash(dtls_peer_t *peer, uint8 *data, size_t length) {
-  dtls_debug_dump("add MAC data", data, length);
-  dtls_hash_update(&peer->handshake_params->hs_state.hs_hash, data, length);
-}
-
-static void
-copy_hs_hash(dtls_peer_t *peer, dtls_hash_ctx *hs_hash) {
-  memcpy(hs_hash, &peer->handshake_params->hs_state.hs_hash,
-        sizeof(peer->handshake_params->hs_state.hs_hash));
-}
-
-INLINE_API size_t
-finalize_hs_hash(dtls_peer_t *peer, uint8 *buf) {
-  return dtls_hash_finalize(buf, &peer->handshake_params->hs_state.hs_hash);
-}
-
-INLINE_API void
-clear_hs_hash(dtls_peer_t *peer) {
-  assert(peer);
-  dtls_debug("clear MAC\n");
-  dtls_hash_init(&peer->handshake_params->hs_state.hs_hash);
-}
-
-/** 
- * Checks if \p record + \p data contain a Finished message with valid
- * verify_data. 
- *
- * \param ctx    The current DTLS context.
- * \param peer   The remote peer of the security association.
- * \param data   The cleartext payload of the message.
- * \param data_length Actual length of \p data.
- * \return \c 0 if the Finished message is valid, \c negative number otherwise.
- */
-static int
-check_finished(dtls_context_t *ctx, dtls_peer_t *peer,
-              uint8 *data, size_t data_length) {
-  size_t digest_length, label_size;
-  const unsigned char *label;
-  unsigned char buf[DTLS_HMAC_MAX];
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_FIN_LENGTH)
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-
-  /* Use a union here to ensure that sufficient stack space is
-   * reserved. As statebuf and verify_data are not used at the same
-   * time, we can re-use the storage safely.
-   */
-  union {
-    unsigned char statebuf[DTLS_HASH_CTX_SIZE];
-    unsigned char verify_data[DTLS_FIN_LENGTH];
-  } b;
-
-  /* temporarily store hash status for roll-back after finalize */
-  memcpy(b.statebuf, &peer->handshake_params->hs_state.hs_hash, DTLS_HASH_CTX_SIZE);
-
-  digest_length = finalize_hs_hash(peer, buf);
-  /* clear_hash(); */
-
-  /* restore hash status */
-  memcpy(&peer->handshake_params->hs_state.hs_hash, b.statebuf, DTLS_HASH_CTX_SIZE);
-
-  if (peer->role == DTLS_CLIENT) {
-    label = PRF_LABEL(server);
-    label_size = PRF_LABEL_SIZE(server);
-  } else { /* server */
-    label = PRF_LABEL(client);
-    label_size = PRF_LABEL_SIZE(client);
-  }
-
-  dtls_prf(peer->handshake_params->tmp.master_secret,
-          DTLS_MASTER_SECRET_LENGTH,
-          label, label_size,
-          PRF_LABEL(finished), PRF_LABEL_SIZE(finished),
-          buf, digest_length,
-          b.verify_data, sizeof(b.verify_data));
-
-  dtls_debug_dump("d:", data + DTLS_HS_LENGTH, sizeof(b.verify_data));
-  dtls_debug_dump("v:", b.verify_data, sizeof(b.verify_data));
-
-  /* compare verify data and create DTLS alert code when they differ */
-  return equals(data + DTLS_HS_LENGTH, b.verify_data, sizeof(b.verify_data))
-    ? 0
-    : dtls_alert_create(DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_HANDSHAKE_FAILURE);
-}
-
-/**
- * Prepares the payload given in \p data for sending with
- * dtls_send(). The \p data is encrypted and compressed according to
- * the current security parameters of \p peer.  The result of this
- * operation is put into \p sendbuf with a prepended record header of
- * type \p type ready for sending. As some cipher suites add a MAC
- * before encryption, \p data must be large enough to hold this data
- * as well (usually \c dtls_kb_digest_size(CURRENT_CONFIG(peer)).
- *
- * \param peer    The remote peer the packet will be sent to.
- * \param security  The encryption paramater used to encrypt
- * \param type    The content type of this record.
- * \param data_array Array with payloads in correct order.
- * \param data_len_array sizes of the payloads in correct order.
- * \param data_array_len The number of payloads given.
- * \param sendbuf The output buffer where the encrypted record
- *                will be placed.
- * \param rlen    This parameter must be initialized with the 
- *                maximum size of \p sendbuf and will be updated
- *                to hold the actual size of the stored packet
- *                on success. On error, the value of \p rlen is
- *                undefined. 
- * \return Less than zero on error, or greater than zero success.
- */
-static int
-dtls_prepare_record(dtls_peer_t *peer, dtls_security_parameters_t *security,
-                   unsigned char type,
-                   uint8 *data_array[], size_t data_len_array[],
-                   size_t data_array_len,
-                   uint8 *sendbuf, size_t *rlen) {
-  uint8 *p, *start;
-  int res;
-  unsigned int i;
-  
-  if (*rlen < DTLS_RH_LENGTH) {
-    dtls_alert("The sendbuf (%zu bytes) is too small\n", *rlen);
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  p = dtls_set_record_header(type, security, sendbuf);
-  start = p;
-
-  if (!security || security->cipher == TLS_NULL_WITH_NULL_NULL) {
-    /* no cipher suite */
-
-    res = 0;
-    for (i = 0; i < data_array_len; i++) {
-      /* check the minimum that we need for packets that are not encrypted */
-      if (*rlen < res + DTLS_RH_LENGTH + data_len_array[i]) {
-        dtls_debug("dtls_prepare_record: send buffer too small\n");
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-      }
-
-      memcpy(p, data_array[i], data_len_array[i]);
-      p += data_len_array[i];
-      res += data_len_array[i];
-    }
-  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher) ||
-             is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(security->cipher)) {
-
-    unsigned char nonce[DTLS_CBC_IV_LENGTH];
-
-    /** Add IV into body of packet in case of AES CBC mode according to RFC 5246, Section 6.2.3.2
-     *
-     *    opaque IV[SecurityParameters.record_iv_length];
-     *    block-ciphered struct {
-     *        opaque content[TLSCompressed.length];
-     *        opaque MAC[SecurityParameters.mac_length];
-     *        uint8 padding[GenericBlockCipher.padding_length];
-     *        uint8 padding_length;
-     * };
-     *
-     */
-
-    res = 0;
-    dtls_prng(nonce, DTLS_CBC_IV_LENGTH);
-    memcpy(p , nonce, DTLS_CBC_IV_LENGTH);
-    p += DTLS_CBC_IV_LENGTH;
-    res += DTLS_CBC_IV_LENGTH;
-
-    for (i = 0; i < data_array_len; i++) {
-        /* check the minimum that we need for packets that are not encrypted */
-        if (*rlen < res + DTLS_RH_LENGTH + data_len_array[i]) {
-            dtls_debug("dtls_prepare_record: send buffer too small\n");
-            return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-        }
-
-        memcpy(p, data_array[i], data_len_array[i]);
-        p += data_len_array[i];
-        res += data_len_array[i];
-     }
-
-     res = dtls_encrypt(start + DTLS_CBC_IV_LENGTH, res - DTLS_CBC_IV_LENGTH,
-               start + DTLS_CBC_IV_LENGTH, nonce,
-               dtls_kb_local_write_key(security, peer->role),
-               dtls_kb_key_size(security, peer->role),
-               dtls_kb_local_mac_secret(security, peer->role),
-               dtls_kb_mac_secret_size(security->cipher),
-               NULL, 0,
-               security->cipher);
-     if (res < 0)
-       return res;
-
-     res += DTLS_CBC_IV_LENGTH;
-
-  } else { /* TLS_PSK_WITH_AES_128_CCM_8 or TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */   
-    /** 
-     * length of additional_data for the AEAD cipher which consists of
-     * seq_num(2+6) + type(1) + version(2) + length(2)
-     */
-#define A_DATA_LEN 13
-    unsigned char nonce[DTLS_CCM_BLOCKSIZE];
-    unsigned char A_DATA[A_DATA_LEN];
-
-    if (is_tls_psk_with_aes_128_ccm_8(security->cipher)) {
-      dtls_debug("dtls_prepare_record(): encrypt using TLS_PSK_WITH_AES_128_CCM_8\n");
-    } else if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(security->cipher)) {
-      dtls_debug("dtls_prepare_record(): encrypt using TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n");
-    } else {
-      dtls_debug("dtls_prepare_record(): encrypt using unknown cipher\n");
-    }
-
-    /* set nonce       
-       from RFC 6655:
-       The "nonce" input to the AEAD algorithm is exactly that of [RFC5288]:
-       the "nonce" SHALL be 12 bytes long and is constructed as follows:
-       (this is an example of a "partially explicit" nonce; see Section
-       3.2.1 in [RFC5116]).
-
-                       struct {
-             opaque salt[4];
-             opaque nonce_explicit[8];
-                       } CCMNonce;
-
-         [...]
-
-        In DTLS, the 64-bit seq_num is the 16-bit epoch concatenated with the
-        48-bit seq_num.
-
-        When the nonce_explicit is equal to the sequence number, the CCMNonce
-        will have the structure of the CCMNonceExample given below.
-
-                   struct {
-                    uint32 client_write_IV; // low order 32-bits
-                    uint64 seq_num;         // TLS sequence number
-                   } CCMClientNonce.
-
-
-                   struct {
-                    uint32 server_write_IV; // low order 32-bits
-                    uint64 seq_num; // TLS sequence number
-                   } CCMServerNonce.
-
-
-                   struct {
-                    case client:
-                      CCMClientNonce;
-                    case server:
-                      CCMServerNonce:
-                   } CCMNonceExample;
-    */
-
-    memcpy(p, &DTLS_RECORD_HEADER(sendbuf)->epoch, 8);
-    p += 8;
-    res = 8;
-
-    for (i = 0; i < data_array_len; i++) {
-      /* check the minimum that we need for packets that are not encrypted */
-      if (*rlen < res + DTLS_RH_LENGTH + data_len_array[i]) {
-        dtls_debug("dtls_prepare_record: send buffer too small\n");
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-      }
-
-      memcpy(p, data_array[i], data_len_array[i]);
-      p += data_len_array[i];
-      res += data_len_array[i];
-    }
-
-    memset(nonce, 0, DTLS_CCM_BLOCKSIZE);
-    memcpy(nonce, dtls_kb_local_iv(security, peer->role),
-        dtls_kb_iv_size(security->cipher));
-    memcpy(nonce + dtls_kb_iv_size(security->cipher), start, 8); /* epoch + seq_num */
-
-    dtls_debug_dump("nonce:", nonce, DTLS_CCM_BLOCKSIZE);
-    dtls_debug_dump("key:", dtls_kb_local_write_key(security, peer->role),
-                   dtls_kb_key_size(security, peer->role));
-    
-    /* re-use N to create additional data according to RFC 5246, Section 6.2.3.3:
-     * 
-     * additional_data = seq_num + TLSCompressed.type +
-     *                   TLSCompressed.version + TLSCompressed.length;
-     */
-    memcpy(A_DATA, &DTLS_RECORD_HEADER(sendbuf)->epoch, 8); /* epoch and seq_num */
-    memcpy(A_DATA + 8,  &DTLS_RECORD_HEADER(sendbuf)->content_type, 3); /* type and version */
-    dtls_int_to_uint16(A_DATA + 11, res - 8); /* length */
-
-    res = dtls_encrypt(start + 8, res - 8, start + 8, nonce,
-               dtls_kb_local_write_key(security, peer->role),
-               dtls_kb_key_size(security, peer->role),
-               dtls_kb_local_mac_secret(security, peer->role),
-               dtls_kb_mac_secret_size(security->cipher),
-               A_DATA, A_DATA_LEN,
-               security->cipher);
-
-    if (res < 0)
-      return res;
-
-    res += 8; /* increment res by size of nonce_explicit */
-    dtls_debug_dump("message:", start, res);
-  }
-
-  /* fix length of fragment in sendbuf */
-  dtls_int_to_uint16(sendbuf + 11, res);
-  
-  *rlen = DTLS_RH_LENGTH + res;
-  return 0;
-}
-
-static int
-dtls_send_handshake_msg_hash(dtls_context_t *ctx,
-                            dtls_peer_t *peer,
-                            session_t *session,
-                            uint8 header_type,
-                            uint8 *data, size_t data_length,
-                            int add_hash)
-{
-  uint8 buf[DTLS_HS_LENGTH];
-  uint8 *data_array[2];
-  size_t data_len_array[2];
-  int i = 0;
-  dtls_security_parameters_t *security = peer ? dtls_security_params(peer) : NULL;
-
-  dtls_set_handshake_header(header_type, peer, data_length, 0,
-                           data_length, buf);
-
-  if (add_hash) {
-    update_hs_hash(peer, buf, sizeof(buf));
-  }
-  data_array[i] = buf;
-  data_len_array[i] = sizeof(buf);
-  i++;
-
-  if (data != NULL) {
-    if (add_hash) {
-      update_hs_hash(peer, data, data_length);
-    }
-    data_array[i] = data;
-    data_len_array[i] = data_length;
-    i++;
-  }
-  dtls_debug("send handshake packet of type: %s (%i)\n",
-            dtls_handshake_type_to_name(header_type), header_type);
-  return dtls_send_multi(ctx, peer, security, session, DTLS_CT_HANDSHAKE,
-                        data_array, data_len_array, i);
-}
-
-static int
-dtls_send_handshake_msg(dtls_context_t *ctx,
-                       dtls_peer_t *peer,
-                       uint8 header_type,
-                       uint8 *data, size_t data_length)
-{
-  return dtls_send_handshake_msg_hash(ctx, peer, &peer->session,
-                                     header_type, data, data_length, 1);
-}
-
-/** 
- * Returns true if the message @p Data is a handshake message that
- * must be included in the calculation of verify_data in the Finished
- * message.
- * 
- * @param Type The message type. Only handshake messages but the initial 
- * Client Hello and Hello Verify Request are included in the hash,
- * @param Data The PDU to examine.
- * @param Length The length of @p Data.
- * 
- * @return @c 1 if @p Data must be included in hash, @c 0 otherwise.
- *
- * @hideinitializer
- */
-#define MUST_HASH(Type, Data, Length)                                  \
-  ((Type) == DTLS_CT_HANDSHAKE &&                                      \
-   ((Data) != NULL) && ((Length) > 0)  &&                              \
-   ((Data)[0] != DTLS_HT_HELLO_VERIFY_REQUEST) &&                      \
-   ((Data)[0] != DTLS_HT_CLIENT_HELLO ||                               \
-    ((Length) >= HS_HDR_LENGTH &&                                      \
-     (dtls_uint16_to_int(DTLS_RECORD_HEADER(Data)->epoch > 0) ||       \
-      (dtls_uint16_to_int(HANDSHAKE(Data)->message_seq) > 0)))))
-
-/**
- * Sends the data passed in @p buf as a DTLS record of type @p type to
- * the given peer. The data will be encrypted and compressed according
- * to the security parameters for @p peer.
- *
- * @param ctx    The DTLS context in effect.
- * @param peer   The remote party where the packet is sent.
- * @param type   The content type of this record.
- * @param buf    The data to send.
- * @param buflen The number of bytes to send from @p buf.
- * @return Less than zero in case of an error or the number of
- *   bytes that have been sent otherwise.
- */
-static int
-dtls_send_multi(dtls_context_t *ctx, dtls_peer_t *peer,
-               dtls_security_parameters_t *security , session_t *session,
-               unsigned char type, uint8 *buf_array[],
-               size_t buf_len_array[], size_t buf_array_len)
-{
-  /* We cannot use ctx->sendbuf here as it is reserved for collecting
-   * the input for this function, i.e. buf == ctx->sendbuf.
-   *
-   * TODO: check if we can use the receive buf here. This would mean
-   * that we might not be able to handle multiple records stuffed in
-   * one UDP datagram */
-  unsigned char sendbuf[DTLS_MAX_BUF];
-  size_t len = sizeof(sendbuf);
-  int res;
-  unsigned int i;
-  size_t overall_len = 0;
-
-  res = dtls_prepare_record(peer, security, type, buf_array, buf_len_array, buf_array_len, sendbuf, &len);
-
-  if (res < 0)
-    return res;
-
-  /* if (peer && MUST_HASH(peer, type, buf, buflen)) */
-  /*   update_hs_hash(peer, buf, buflen); */
-
-  dtls_debug_hexdump("send header", sendbuf, sizeof(dtls_record_header_t));
-  for (i = 0; i < buf_array_len; i++) {
-    dtls_debug_hexdump("send unencrypted", buf_array[i], buf_len_array[i]);
-    overall_len += buf_len_array[i];
-  }
-
-  if ((type == DTLS_CT_HANDSHAKE && buf_array[0][0] != DTLS_HT_HELLO_VERIFY_REQUEST) ||
-      type == DTLS_CT_CHANGE_CIPHER_SPEC) {
-    /* copy handshake messages other than HelloVerify into retransmit buffer */
-    netq_t *n = netq_node_new(overall_len);
-    if (n) {
-      dtls_tick_t now;
-      dtls_ticks(&now);
-      n->t = now + 2 * CLOCK_SECOND;
-      n->retransmit_cnt = 0;
-      n->timeout = 2 * CLOCK_SECOND;
-      n->peer = peer;
-      n->epoch = (security) ? security->epoch : 0;
-      n->type = type;
-      n->length = 0;
-      for (i = 0; i < buf_array_len; i++) {
-        memcpy(n->data + n->length, buf_array[i], buf_len_array[i]);
-        n->length += buf_len_array[i];
-      }
-
-      if (!netq_insert_node(ctx->sendqueue, n)) {
-       dtls_warn("cannot add packet to retransmit buffer\n");
-       netq_node_free(n);
-#ifdef WITH_CONTIKI
-      } else {
-       /* must set timer within the context of the retransmit process */
-       PROCESS_CONTEXT_BEGIN(&dtls_retransmit_process);
-       etimer_set(&ctx->retransmit_timer, n->timeout);
-       PROCESS_CONTEXT_END(&dtls_retransmit_process);
-#else /* WITH_CONTIKI */
-       dtls_debug("copied to sendqueue\n");
-#endif /* WITH_CONTIKI */
-      }
-    } else 
-      dtls_warn("retransmit buffer full\n");
-  }
-
-  /* FIXME: copy to peer's sendqueue (after fragmentation if
-   * necessary) and initialize retransmit timer */
-  res = CALL(ctx, write, session, sendbuf, len);
-
-  /* Guess number of bytes application data actually sent:
-   * dtls_prepare_record() tells us in len the number of bytes to
-   * send, res will contain the bytes actually sent. */
-  return res <= 0 ? res : overall_len - (len - res);
-}
-
-INLINE_API int
-dtls_send_alert(dtls_context_t *ctx, dtls_peer_t *peer, dtls_alert_level_t level,
-               dtls_alert_t description) {
-  uint8_t msg[] = { level, description };
-
-  dtls_send(ctx, peer, DTLS_CT_ALERT, msg, sizeof(msg));
-  return 0;
-}
-
-int 
-dtls_close(dtls_context_t *ctx, const session_t *remote) {
-  int res = -1;
-  dtls_peer_t *peer;
-
-  peer = dtls_get_peer(ctx, remote);
-
-  if (peer) {
-    res = dtls_send_alert(ctx, peer, DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_CLOSE_NOTIFY);
-    /* indicate tear down */
-    peer->state = DTLS_STATE_CLOSING;
-  }
-  return res;
-}
-
-static void dtls_destroy_peer(dtls_context_t *ctx, dtls_peer_t *peer, int unlink)
-{
-  if (peer->state != DTLS_STATE_CLOSED && peer->state != DTLS_STATE_CLOSING)
-    dtls_close(ctx, &peer->session);
-  if (unlink) {
-#ifndef WITH_CONTIKI
-    HASH_DEL_PEER(ctx->peers, peer);
-#else /* WITH_CONTIKI */
-    list_remove(ctx->peers, peer);
-#endif /* WITH_CONTIKI */
-
-    dtls_dsrv_log_addr(DTLS_LOG_DEBUG, "removed peer", &peer->session);
-  }
-  dtls_free_peer(peer);
-}
-
-/**
- * Checks a received Client Hello message for a valid cookie. When the
- * Client Hello contains no cookie, the function fails and a Hello
- * Verify Request is sent to the peer (using the write callback function
- * registered with \p ctx). The return value is \c -1 on error, \c 0 when
- * undecided, and \c 1 if the Client Hello was good. 
- * 
- * \param ctx     The DTLS context.
- * \param peer    The remote party we are talking to, if any.
- * \param session Transport address of the remote peer.
- * \param state   Current state of the connection.
- * \param msg     The received datagram.
- * \param msglen  Length of \p msg.
- * \return \c 1 if msg is a Client Hello with a valid cookie, \c 0 or
- * \c -1 otherwise.
- */
-static int
-dtls_verify_peer(dtls_context_t *ctx, 
-                dtls_peer_t *peer, 
-                session_t *session,
-                const dtls_state_t state,
-                uint8 *data, size_t data_length)
-{
-  uint8 buf[DTLS_HV_LENGTH + DTLS_COOKIE_LENGTH];
-  uint8 *p = buf;
-  int len = DTLS_COOKIE_LENGTH;
-  uint8 *cookie = NULL;
-  int err;
-#undef mycookie
-#define mycookie (buf + DTLS_HV_LENGTH)
-
-  /* Store cookie where we can reuse it for the HelloVerify request. */
-  err = dtls_create_cookie(ctx, session, data, data_length, mycookie, &len);
-  if (err < 0)
-    return err;
-
-  dtls_debug_dump("create cookie", mycookie, len);
-
-  assert(len == DTLS_COOKIE_LENGTH);
-    
-  /* Perform cookie check. */
-  len = dtls_get_cookie(data, data_length, &cookie);
-  if (len < 0) {
-    dtls_warn("error while fetching the cookie, err: %i\n", err);
-    return err;
-  }
-
-  dtls_debug_dump("compare with cookie", cookie, len);
-
-  /* check if cookies match */
-  if (len == DTLS_COOKIE_LENGTH && memcmp(cookie, mycookie, len) == 0) {
-    dtls_debug("found matching cookie\n");
-    return 0;
-  }
-
-  if (len > 0) {
-    dtls_debug_dump("invalid cookie", cookie, len);
-  } else {
-    dtls_debug("cookie len is 0!\n");
-  }
-
-  /* ClientHello did not contain any valid cookie, hence we send a
-   * HelloVerify request. */
-
-  dtls_int_to_uint16(p, DTLS_VERSION);
-  p += sizeof(uint16);
-
-  dtls_int_to_uint8(p, DTLS_COOKIE_LENGTH);
-  p += sizeof(uint8);
-
-  assert(p == mycookie);
-
-  p += DTLS_COOKIE_LENGTH;
-
-  /* TODO use the same record sequence number as in the ClientHello,
-     see 4.2.1. Denial-of-Service Countermeasures */
-  err = dtls_send_handshake_msg_hash(ctx,
-                    state == DTLS_STATE_CONNECTED ? peer : NULL,
-                    session,
-                    DTLS_HT_HELLO_VERIFY_REQUEST,
-                    buf, p - buf, 0);
-  if (err < 0) {
-    dtls_warn("cannot send HelloVerify request\n");
-  }
-  return err; /* HelloVerify is sent, now we cannot do anything but wait */
-
-#undef mycookie
-}
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-static int
-dtls_check_ecdsa_signature_elem(uint8 *data, size_t data_length,
-                               unsigned char **result_r,
-                               unsigned char **result_s)
-{
-  int i;
-  uint8 *data_orig = data;
-
-  if (dtls_uint8_to_int(data) != TLS_EXT_SIG_HASH_ALGO_SHA256) {
-    dtls_alert("only sha256 is supported in certificate verify\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint8_to_int(data) != TLS_EXT_SIG_HASH_ALGO_ECDSA) {
-    dtls_alert("only ecdsa signature is supported in client verify\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (data_length < dtls_uint16_to_int(data)) {
-    dtls_alert("signature length wrong\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  if (dtls_uint8_to_int(data) != 0x30) {
-    dtls_alert("wrong ASN.1 struct, expected SEQUENCE\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (data_length < dtls_uint8_to_int(data)) {
-    dtls_alert("signature length wrong\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint8_to_int(data) != 0x02) {
-    dtls_alert("wrong ASN.1 struct, expected Integer\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  i = dtls_uint8_to_int(data);
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  /* Sometimes these values have a leeding 0 byte */
-  *result_r = data + i - DTLS_EC_KEY_SIZE;
-
-  data += i;
-  data_length -= i;
-
-  if (dtls_uint8_to_int(data) != 0x02) {
-    dtls_alert("wrong ASN.1 struct, expected Integer\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  i = dtls_uint8_to_int(data);
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  /* Sometimes these values have a leeding 0 byte */
-  *result_s = data + i - DTLS_EC_KEY_SIZE;
-
-  data += i;
-  data_length -= i;
-
-  return data - data_orig;
-}
-
-static int
-check_client_certificate_verify(dtls_context_t *ctx, 
-                               dtls_peer_t *peer,
-                               uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  int ret;
-  unsigned char *result_r;
-  unsigned char *result_s;
-  dtls_hash_ctx hs_hash;
-  unsigned char sha256hash[DTLS_HMAC_DIGEST_SIZE];
-
-  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_CV_LENGTH) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  ret = dtls_check_ecdsa_signature_elem(data, data_length, &result_r, &result_s);
-  if (ret < 0) {
-    return ret;
-  }
-  data += ret;
-  data_length -= ret;
-
-  copy_hs_hash(peer, &hs_hash);
-
-  dtls_hash_finalize(sha256hash, &hs_hash);
-
-  ret = dtls_ecdsa_verify_sig_hash(config->keyx.ecc.other_pub_x, config->keyx.ecc.other_pub_y,
-                                   sizeof(config->keyx.ecc.other_pub_x),
-                                   sha256hash, sizeof(sha256hash),
-                                   result_r, result_s);
-
-  if (ret <= 0) {
-    dtls_alert("wrong signature err: %i\n", ret);
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  return 0;
-}
-#endif /* DTLS_ECC */
-
-static int
-dtls_send_server_hello(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-  /* Ensure that the largest message to create fits in our source
-   * buffer. (The size of the destination buffer is checked by the
-   * encoding function, so we do not need to guess.) */
-  uint8 buf[DTLS_SH_LENGTH + 2 + 5 + 5 + 8 + 6];
-  uint8 *p;
-  int ecdsa;
-  uint8 extension_size;
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-  dtls_tick_t now;
-
-  ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher);
-
-  extension_size = (ecdsa) ? 2 + 5 + 5 + 6 : 0;
-
-  /* Handshake header */
-  p = buf;
-
-  /* ServerHello */
-  dtls_int_to_uint16(p, DTLS_VERSION);
-  p += sizeof(uint16);
-
-  /* Set server random: First 4 bytes are the server's Unix timestamp,
-   * followed by 28 bytes of generate random data. */
-  dtls_ticks(&now);
-  dtls_int_to_uint32(handshake->tmp.random.server, now / CLOCK_SECOND);
-  dtls_prng(handshake->tmp.random.server + 4, 28);
-
-  memcpy(p, handshake->tmp.random.server, DTLS_RANDOM_LENGTH);
-  p += DTLS_RANDOM_LENGTH;
-
-  *p++ = 0;                    /* no session id */
-
-  if (handshake->cipher != TLS_NULL_WITH_NULL_NULL) {
-    /* selected cipher suite */
-    dtls_int_to_uint16(p, handshake->cipher);
-    p += sizeof(uint16);
-
-    /* selected compression method */
-    *p++ = compression_methods[handshake->compression];
-  }
-
-  if (extension_size) {
-    /* length of the extensions */
-    dtls_int_to_uint16(p, extension_size - 2);
-    p += sizeof(uint16);
-  }
-
-  if (ecdsa) {
-    /* client certificate type extension */
-    dtls_int_to_uint16(p, TLS_EXT_CLIENT_CERTIFICATE_TYPE);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 1);
-    p += sizeof(uint16);
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-    else
-#endif /* DTLS_X509 */
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-
-    p += sizeof(uint8);
-
-    /* client certificate type extension */
-    dtls_int_to_uint16(p, TLS_EXT_SERVER_CERTIFICATE_TYPE);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 1);
-    p += sizeof(uint16);
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-    else
-#endif /* DTLS_X509 */
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-
-    p += sizeof(uint8);
-
-    /* ec_point_formats */
-    dtls_int_to_uint16(p, TLS_EXT_EC_POINT_FORMATS);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 2);
-    p += sizeof(uint16);
-
-    /* number of supported formats */
-    dtls_int_to_uint8(p, 1);
-    p += sizeof(uint8);
-
-    dtls_int_to_uint8(p, TLS_EXT_EC_POINT_FORMATS_UNCOMPRESSED);
-    p += sizeof(uint8);
-  }
-
-  assert(p - buf <= sizeof(buf));
-
-  /* TODO use the same record sequence number as in the ClientHello,
-     see 4.2.1. Denial-of-Service Countermeasures */
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_HELLO,
-                                buf, p - buf);
-}
-
-#ifdef DTLS_ECC
-#define DTLS_EC_SUBJECTPUBLICKEY_SIZE (2 * DTLS_EC_KEY_SIZE + sizeof(cert_asn1_header))
-
-static int
-dtls_send_certificate_ecdsa(dtls_context_t *ctx, dtls_peer_t *peer,
-                           const dtls_ecc_key_t *key)
-{
-  uint8 buf[DTLS_CE_LENGTH];
-  uint8 *p;
-
-  /* Certificate
-   *
-   * Start message construction at beginning of buffer. */
-  p = buf;
-
-  /* length of this certificate */
-  dtls_int_to_uint24(p, DTLS_EC_SUBJECTPUBLICKEY_SIZE);
-  p += sizeof(uint24);
-
-  memcpy(p, &cert_asn1_header, sizeof(cert_asn1_header));
-  p += sizeof(cert_asn1_header);
-
-  memcpy(p, key->pub_key_x, DTLS_EC_KEY_SIZE);
-  p += DTLS_EC_KEY_SIZE;
-
-  memcpy(p, key->pub_key_y, DTLS_EC_KEY_SIZE);
-  p += DTLS_EC_KEY_SIZE;
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE,
-                                buf, p - buf);
-}
-#endif /* DTLS_ECC */
-
-#ifdef DTLS_X509
-static int
-dtls_send_certificate_x509(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-  uint8 buf[DTLS_MAX_CERT_SIZE];
-  uint8 *p;
-  int ret;
-  unsigned char *cert;
-  size_t cert_size;
-
-  dtls_info("\n dtls_send_certificate_ecdsa\n");
-  ret = CALL(ctx, get_x509_cert, &peer->session,
-          (const unsigned char **)&cert, &cert_size);
-
-  if (ret < 0) {
-    dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    return ret;
-  }
-
-  /* Certificate
-   *
-   * Start message construction at beginning of buffer. */
-  p = buf;
-
-  dtls_int_to_uint24(p, cert_size); /* certificates length */
-  p += sizeof(uint24);
-
-  memcpy(p, cert, cert_size);
-  p += cert_size;
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE,
-                                buf, p - buf);
-}
-#endif /* DTLS_X509 */
-
-#if defined(DTLS_X509) || defined(DTLS_ECC)
-static uint8 *
-dtls_add_ecdsa_signature_elem(uint8 *p, uint32_t *point_r, uint32_t *point_s)
-{
-  int len_r;
-  int len_s;
-
-#define R_KEY_OFFSET (1 + 1 + 2 + 1 + 1 + 1 + 1)
-#define S_KEY_OFFSET(len_s) (R_KEY_OFFSET + (len_s) + 1 + 1)
-  /* store the pointer to the r component of the signature and make space */
-  len_r = dtls_ec_key_from_uint32_asn1(point_r, DTLS_EC_KEY_SIZE, p + R_KEY_OFFSET);
-  len_s = dtls_ec_key_from_uint32_asn1(point_s, DTLS_EC_KEY_SIZE, p + S_KEY_OFFSET(len_r));
-
-#undef R_KEY_OFFSET
-#undef S_KEY_OFFSET
-
-  /* sha256 */
-  dtls_int_to_uint8(p, TLS_EXT_SIG_HASH_ALGO_SHA256);
-  p += sizeof(uint8);
-
-  /* ecdsa */
-  dtls_int_to_uint8(p, TLS_EXT_SIG_HASH_ALGO_ECDSA);
-  p += sizeof(uint8);
-
-  /* length of signature */
-  dtls_int_to_uint16(p, len_r + len_s + 2 + 2 + 2);
-  p += sizeof(uint16);
-
-  /* ASN.1 SEQUENCE */
-  dtls_int_to_uint8(p, 0x30);
-  p += sizeof(uint8);
-
-  dtls_int_to_uint8(p, len_r + len_s + 2 + 2);
-  p += sizeof(uint8);
-
-  /* ASN.1 Integer r */
-  dtls_int_to_uint8(p, 0x02);
-  p += sizeof(uint8);
-
-  dtls_int_to_uint8(p, len_r);
-  p += sizeof(uint8);
-
-  /* the pint r was added here */
-  p += len_r;
-
-  /* ASN.1 Integer s */
-  dtls_int_to_uint8(p, 0x02);
-  p += sizeof(uint8);
-
-  dtls_int_to_uint8(p, len_s);
-  p += sizeof(uint8);
-
-  /* the pint s was added here */
-  p += len_s;
-
-  return p;
-}
-
-static int
-dtls_send_server_key_exchange_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-                                  const dtls_ecc_key_t *key)
-{
-  /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-   * 33 bytes long add space for that */
-  uint8 buf[DTLS_SKEXEC_LENGTH + 2];
-  uint8 *p;
-  uint8 *key_params;
-  uint8 *ephemeral_pub_x;
-  uint8 *ephemeral_pub_y;
-  uint32_t point_r[9];
-  uint32_t point_s[9];
-  int ecdsa;
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-
-  ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
-  /* ServerKeyExchange
-   *
-   * Start message construction at beginning of buffer. */
-  p = buf;
-
-  key_params = p;
-  /* ECCurveType curve_type: named_curve */
-  dtls_int_to_uint8(p, 3);
-  p += sizeof(uint8);
-
-  /* NamedCurve namedcurve: secp256r1 */
-  dtls_int_to_uint16(p, TLS_EXT_ELLIPTIC_CURVES_SECP256R1);
-  p += sizeof(uint16);
-
-  dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-  p += sizeof(uint8);
-
-  /* This should be an uncompressed point, but I do not have access to the spec. */
-  dtls_int_to_uint8(p, 4);
-  p += sizeof(uint8);
-
-  /* store the pointer to the x component of the pub key and make space */
-  ephemeral_pub_x = p;
-  p += DTLS_EC_KEY_SIZE;
-
-  /* store the pointer to the y component of the pub key and make space */
-  ephemeral_pub_y = p;
-  p += DTLS_EC_KEY_SIZE;
-
-  dtls_ecdsa_generate_key(config->keyx.ecc.own_eph_priv,
-              ephemeral_pub_x, ephemeral_pub_y,
-              DTLS_EC_KEY_SIZE);
-  if(ecdsa) {
-      /* sign the ephemeral and its paramaters */
-           dtls_ecdsa_create_sig(key->priv_key, DTLS_EC_KEY_SIZE,
-               config->tmp.random.client, DTLS_RANDOM_LENGTH,
-               config->tmp.random.server, DTLS_RANDOM_LENGTH,
-               key_params, p - key_params,
-               point_r, point_s);
-
-      p = dtls_add_ecdsa_signature_elem(p, point_r, point_s);
-  }
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_KEY_EXCHANGE,
-                                buf, p - buf);
-}
-#endif /* defined(DTLS_X509) || defined(DTLS_ECC) */
-
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-static int dtls_send_server_key_exchange_ecdhe_psk(dtls_context_t *ctx, dtls_peer_t *peer,
-                                 const unsigned char *psk_hint, size_t psk_hint_len)
-{
-  /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-   * 33 bytes long add space for that */
-  uint8 buf[DTLS_SKEXEC_LENGTH + DTLS_SKEXECPSK_LENGTH_MAX + 2];
-  uint8 *p;
-  uint8 *ephemeral_pub_x;
-  uint8 *ephemeral_pub_y;
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-
-  /* ServerKeyExchange
-    * Please see Session 2, RFC 5489.
-
-         struct {
-          select (KeyExchangeAlgorithm) {
-              //other cases for rsa, diffie_hellman, etc.
-              case ec_diffie_hellman_psk:  // NEW
-                  opaque psk_identity_hint<0..2^16-1>;
-                  ServerECDHParams params;
-          };
-      } ServerKeyExchange; */
-  p = buf;
-
-  assert(psk_hint_len <= DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-  if (psk_hint_len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-    // should never happen
-    dtls_warn("psk identity hint is too long\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  // psk_identity_hint
-  dtls_int_to_uint16(p, psk_hint_len);
-  p += sizeof(uint16);
-
-  memcpy(p, psk_hint, psk_hint_len);
-  p += psk_hint_len;
-
-  /* ServerECDHParams. */
-  /* ECCurveType curve_type: named_curve */
-  dtls_int_to_uint8(p, TLS_EC_CURVE_TYPE_NAMED_CURVE);
-  p += sizeof(uint8);
-
-  /* NamedCurve namedcurve: secp256r1 */
-  dtls_int_to_uint16(p, TLS_EXT_ELLIPTIC_CURVES_SECP256R1);
-  p += sizeof(uint16);
-
-  dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-  p += sizeof(uint8);
-
-  /* This should be an uncompressed point, but I do not have access to the spec. */
-  dtls_int_to_uint8(p, 4);
-  p += sizeof(uint8);
-
-  /* store the pointer to the x component of the pub key and make space */
-  ephemeral_pub_x = p;
-  p += DTLS_EC_KEY_SIZE;
-
-  /* store the pointer to the y component of the pub key and make space */
-  ephemeral_pub_y = p;
-  p += DTLS_EC_KEY_SIZE;
-
-  dtls_ecdsa_generate_key(config->keyx.ecc.own_eph_priv,
-              ephemeral_pub_x, ephemeral_pub_y,
-              DTLS_EC_KEY_SIZE);
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_KEY_EXCHANGE,
-                                buf, p - buf);
-}
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-
-#ifdef DTLS_PSK
-static int
-dtls_send_server_key_exchange_psk(dtls_context_t *ctx, dtls_peer_t *peer,
-                                 const unsigned char *psk_hint, size_t len)
-{
-  uint8 buf[DTLS_SKEXECPSK_LENGTH_MAX];
-  uint8 *p;
-
-  p = buf;
-
-  assert(len <= DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-  if (len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-    /* should never happen */
-    dtls_warn("psk identity hint is too long\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  dtls_int_to_uint16(p, len);
-  p += sizeof(uint16);
-
-  memcpy(p, psk_hint, len);
-  p += len;
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_KEY_EXCHANGE,
-                                buf, p - buf);
-}
-#endif /* DTLS_PSK */
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-static int
-dtls_send_server_certificate_request(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-  uint8 buf[8];
-  uint8 *p;
-
-  /* ServerHelloDone 
-   *
-   * Start message construction at beginning of buffer. */
-  p = buf;
-
-  /* certificate_types */
-  dtls_int_to_uint8(p, 1);
-  p += sizeof(uint8);
-
-  /* ecdsa_sign */
-  dtls_int_to_uint8(p, TLS_CLIENT_CERTIFICATE_TYPE_ECDSA_SIGN);
-  p += sizeof(uint8);
-
-  /* supported_signature_algorithms */
-  dtls_int_to_uint16(p, 2);
-  p += sizeof(uint16);
-
-  /* sha256 */
-  dtls_int_to_uint8(p, TLS_EXT_SIG_HASH_ALGO_SHA256);
-  p += sizeof(uint8);
-
-  /* ecdsa */
-  dtls_int_to_uint8(p, TLS_EXT_SIG_HASH_ALGO_ECDSA);
-  p += sizeof(uint8);
-
-  /* certificate_authoritiess */
-  dtls_int_to_uint16(p, 0);
-  p += sizeof(uint16);
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE_REQUEST,
-                                buf, p - buf);
-}
-#endif /* DTLS_ECC */
-
-static int
-dtls_send_server_hello_done(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-
-  /* ServerHelloDone 
-   *
-   * Start message construction at beginning of buffer. */
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_SERVER_HELLO_DONE,
-                                NULL, 0);
-}
-
-static int
-dtls_send_server_hello_msgs(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-  int res;
-  int ecdsa;
-  int ecdh_anon;
-  int ecdhe_psk;
-
-  res = dtls_send_server_hello(ctx, peer);
-
-  if (res < 0) {
-    dtls_debug("dtls_server_hello: cannot prepare ServerHello record\n");
-    return res;
-  }
-
-  ecdsa = is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher);
-  ecdh_anon = is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
-  ecdhe_psk = is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher);
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  if(ecdh_anon) {
-      res = dtls_send_server_key_exchange_ecdh(ctx, peer, NULL);
-
-      if (res < 0) {
-        dtls_debug("dtls_server_hello(with ECDH): cannot prepare Server Key Exchange record\n");
-        return res;
-      }
-  }
-  else if (ecdsa) {
-    const dtls_ecc_key_t *ecdsa_key;
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      res = CALL(ctx, get_x509_key, &peer->session, &ecdsa_key);
-    else
-#endif /* DTLS_X509 */
-      res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-
-    if (res < 0) {
-        dtls_debug("no ecdsa key to send\n");
-      return res;
-    }
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      res = dtls_send_certificate_x509(ctx, peer);
-    else
-#endif /* DTLS_X509 */
-      res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-
-    if (res < 0) {
-      dtls_debug("dtls_server_hello: cannot prepare Certificate record\n");
-      return res;
-    }
-
-    res = dtls_send_server_key_exchange_ecdh(ctx, peer, ecdsa_key);
-
-    if (res < 0) {
-      dtls_debug("dtls_server_hello: cannot prepare Server Key Exchange record\n");
-      return res;
-    }
-
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
-       (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx)))) {
-      res = dtls_send_server_certificate_request(ctx, peer);
-      if (res < 0) {
-        dtls_debug("dtls_server_hello(with ECDSA): cannot prepare certificate Request record\n");
-        return res;
-      }
-    }
-  }
-#endif /* DTLS_ECC */
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-  else if(ecdhe_psk) {
-    unsigned char psk_hint[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-    int psk_len;
-
-    /* The identity hint is optional, therefore we ignore the result
-     * and check psk only. */
-    psk_len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_HINT,
-              NULL, 0, psk_hint, DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-
-    if (psk_len < 0) {
-      dtls_debug("dtls_server_hello: cannot create ServerKeyExchange\n");
-      return psk_len;
-    }
-
-    if (psk_len > 0) {
-      res = dtls_send_server_key_exchange_ecdhe_psk(ctx, peer, psk_hint, (size_t)psk_len);
-
-      if (res < 0) {
-        dtls_debug("dtls_server_hello(with ECDHE): cannot prepare Server Key Exchange record\n");
-        return res;
-      }
-    }
-  }
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-#ifdef DTLS_PSK
-  if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-    unsigned char psk_hint[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-    int len;
-
-    /* The identity hint is optional, therefore we ignore the result
-     * and check psk only. */
-    len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_HINT,
-              NULL, 0, psk_hint, DTLS_PSK_MAX_CLIENT_IDENTITY_LEN);
-
-    if (len < 0) {
-      dtls_debug("dtls_server_hello: cannot create ServerKeyExchange\n");
-      return len;
-    }
-
-    if (len > 0) {
-      res = dtls_send_server_key_exchange_psk(ctx, peer, psk_hint, (size_t)len);
-
-      if (res < 0) {
-       dtls_debug("dtls_server_key_exchange_psk: cannot send server key exchange record\n");
-       return res;
-      }
-    }
-  }
-#endif /* DTLS_PSK */
-
-  res = dtls_send_server_hello_done(ctx, peer);
-
-  if (res < 0) {
-    dtls_debug("dtls_server_hello: cannot prepare ServerHelloDone record\n");
-    return res;
-  }
-  return 0;
-}
-
-INLINE_API int 
-dtls_send_ccs(dtls_context_t *ctx, dtls_peer_t *peer) {
-  uint8 buf[1] = {1};
-
-  return dtls_send(ctx, peer, DTLS_CT_CHANGE_CIPHER_SPEC, buf, 1);
-}
-
-    
-static int
-dtls_send_client_key_exchange(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-  uint8 buf[DTLS_CKXEC_LENGTH + 2 + DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-#else
-  uint8 buf[DTLS_CKXEC_LENGTH];
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-  uint8 client_id[DTLS_PSK_MAX_CLIENT_IDENTITY_LEN];
-  uint8 *p;
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-
-  p = buf;
-
-  switch (handshake->cipher) {
-#ifdef DTLS_PSK
-  case TLS_PSK_WITH_AES_128_CCM_8: {
-    int len;
-
-    len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_IDENTITY,
-               NULL, 0,
-               client_id,
-               sizeof(client_id));
-    if (len < 0) {
-      dtls_crit("no psk identity set in kx\n");
-      return len;
-    }
-
-    if (len + sizeof(uint16) > DTLS_CKXEC_LENGTH) {
-      dtls_warn("the psk identity is too long\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    dtls_int_to_uint16(p, len);
-    p += sizeof(uint16);
-
-    memcpy(p, client_id, len);
-    p += len;
-
-    break;
-  }
-#endif /* DTLS_PSK */
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-  case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256: {
-    uint8 *ephemeral_pub_x;
-    uint8 *ephemeral_pub_y;
-
-    dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-    p += sizeof(uint8);
-
-    /* This should be an uncompressed point, but I do not have access to the spec. */
-    dtls_int_to_uint8(p, 4);
-    p += sizeof(uint8);
-
-    ephemeral_pub_x = p;
-    p += DTLS_EC_KEY_SIZE;
-    ephemeral_pub_y = p;
-    p += DTLS_EC_KEY_SIZE;
-
-    dtls_ecdsa_generate_key(peer->handshake_params->keyx.ecc.own_eph_priv,
-                           ephemeral_pub_x, ephemeral_pub_y,
-                           DTLS_EC_KEY_SIZE);
-
-    break;
-  }
-#endif /* DTLS_ECC */
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-  case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256: {
-      int psk_len;
-      uint8 *ephemeral_pub_x;
-      uint8 *ephemeral_pub_y;
-
-    /* Please see Session 2, RFC 5489.
-         struct {
-            select (KeyExchangeAlgorithm) {
-                // other cases for rsa, diffie_hellman, etc.
-                case ec_diffie_hellman_psk:
-                    opaque psk_identity<0..2^16-1>;
-                    ClientECDiffieHellmanPublic public;
-            } exchange_keys;
-        } ClientKeyExchange;
-    */
-
-    psk_len = CALL(ctx, get_psk_info, &peer->session, DTLS_PSK_IDENTITY,
-               NULL, 0,
-               client_id,
-               sizeof(client_id));
-    if (psk_len < 0) {
-      dtls_crit("no psk identity set in kx\n");
-      return psk_len;
-    }
-
-    if (psk_len + sizeof(uint16) > DTLS_CKXEC_LENGTH) {
-      dtls_warn("the psk identity is too long\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    dtls_int_to_uint16(p, psk_len);
-    p += sizeof(uint16);
-
-    memcpy(p, client_id, psk_len);
-    p += psk_len;
-
-    dtls_int_to_uint8(p, 1 + 2 * DTLS_EC_KEY_SIZE);
-    p += sizeof(uint8);
-
-    dtls_int_to_uint8(p, 4);
-    p += sizeof(uint8);
-
-    ephemeral_pub_x = p;
-    p += DTLS_EC_KEY_SIZE;
-    ephemeral_pub_y = p;
-    p += DTLS_EC_KEY_SIZE;
-
-    dtls_ecdsa_generate_key(peer->handshake_params->keyx.ecc.own_eph_priv,
-                           ephemeral_pub_x, ephemeral_pub_y,
-                           DTLS_EC_KEY_SIZE);
-    break;
-  }
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-  default:
-    dtls_crit("cipher not supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CLIENT_KEY_EXCHANGE,
-                                buf, p - buf);
-}
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-static int
-dtls_send_certificate_verify_ecdh(dtls_context_t *ctx, dtls_peer_t *peer,
-                                  const dtls_ecc_key_t *key)
-{
-  /* The ASN.1 Integer representation of an 32 byte unsigned int could be
-   * 33 bytes long add space for that */
-  uint8 buf[DTLS_CV_LENGTH + 2];
-  uint8 *p;
-  uint32_t point_r[9];
-  uint32_t point_s[9];
-  dtls_hash_ctx hs_hash;
-  unsigned char sha256hash[DTLS_HMAC_DIGEST_SIZE];
-
-  /* ServerKeyExchange 
-   *
-   * Start message construction at beginning of buffer. */
-  p = buf;
-
-  copy_hs_hash(peer, &hs_hash);
-
-  dtls_hash_finalize(sha256hash, &hs_hash);
-
-  /* sign the ephemeral and its paramaters */
-  dtls_ecdsa_create_sig_hash(key->priv_key, DTLS_EC_KEY_SIZE,
-                            sha256hash, sizeof(sha256hash),
-                            point_r, point_s);
-
-  p = dtls_add_ecdsa_signature_elem(p, point_r, point_s);
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_CERTIFICATE_VERIFY,
-                                buf, p - buf);
-}
-#endif /* DTLS_ECC */
-
-static int
-dtls_send_finished(dtls_context_t *ctx, dtls_peer_t *peer,
-                  const unsigned char *label, size_t labellen)
-{
-  int length;
-  uint8 hash[DTLS_HMAC_MAX];
-  uint8 buf[DTLS_FIN_LENGTH];
-  dtls_hash_ctx hs_hash;
-  uint8 *p = buf;
-
-  copy_hs_hash(peer, &hs_hash);
-
-  length = dtls_hash_finalize(hash, &hs_hash);
-
-  dtls_prf(peer->handshake_params->tmp.master_secret,
-          DTLS_MASTER_SECRET_LENGTH,
-          label, labellen,
-          PRF_LABEL(finished), PRF_LABEL_SIZE(finished), 
-          hash, length,
-          p, DTLS_FIN_LENGTH);
-
-  dtls_debug_dump("server finished MAC", p, DTLS_FIN_LENGTH);
-
-  p += DTLS_FIN_LENGTH;
-
-  assert(p - buf <= sizeof(buf));
-
-  return dtls_send_handshake_msg(ctx, peer, DTLS_HT_FINISHED,
-                                buf, p - buf);
-}
-
-static int
-dtls_send_client_hello(dtls_context_t *ctx, dtls_peer_t *peer,
-                       uint8 cookie[], size_t cookie_length) {
-  uint8 buf[DTLS_CH_LENGTH_MAX];
-  uint8 *p = buf;
-  uint8_t cipher_size = 0;
-  uint8_t extension_size = 0;
-  int psk = 0;
-  int ecdsa = 0;
-  int ecdh_anon = 0;
-  int ecdhe_psk = 0;
-  int x509 = 0;
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-  dtls_tick_t now;
-
-  switch(ctx->selected_cipher)
-  {
-      case TLS_PSK_WITH_AES_128_CCM_8:
-        psk = is_psk_supported(ctx);
-        break;
-      case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
-        ecdsa = is_ecdsa_supported(ctx, 1);
-        x509 = is_x509_supported(ctx, 1);
-        break;
-      case TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256:
-        ecdh_anon = is_ecdh_anon_supported(ctx);
-        break;
-      case TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256:
-        ecdhe_psk = is_ecdhe_psk_supported(ctx);
-        break;
-      default:
-        psk = is_psk_supported(ctx);
-        ecdsa = is_ecdsa_supported(ctx, 1);
-        ecdh_anon = is_ecdh_anon_supported(ctx);
-        ecdhe_psk = is_ecdhe_psk_supported(ctx);
-        x509 = is_x509_supported(ctx, 1);
-        break;
-   }
-
-  cipher_size = 2 + ((ecdsa || x509) ? 2 : 0) + (psk ? 2 : 0) + (ecdh_anon ? 2 : 0) + (ecdhe_psk ? 2 : 0);
-
-  /* Is extension needed? */
-  extension_size = (ecdsa || x509 || ecdhe_psk || ecdh_anon) ? 2 : 0;
-  /* Supported EC and Supported Point Formats */
-  extension_size += (ecdsa || x509 || ecdhe_psk | ecdh_anon) ? ( 8 + 6) : 0;
-  /* Supported Client and Server Cert Types */
-  extension_size += (ecdsa || x509) ? ( 6 + 6) : 0;
-
-  if (cipher_size == 0) {
-    dtls_crit("no cipher callbacks implemented\n");
-  }
-
-  dtls_int_to_uint16(p, DTLS_VERSION);
-  p += sizeof(uint16);
-
-  if (cookie_length > DTLS_COOKIE_LENGTH_MAX) {
-    dtls_warn("the cookie is too long\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  if (cookie_length == 0) {
-    /* Set client random: First 4 bytes are the client's Unix timestamp,
-     * followed by 28 bytes of generate random data. */
-    dtls_ticks(&now);
-    dtls_int_to_uint32(handshake->tmp.random.client, now / CLOCK_SECOND);
-    dtls_prng(handshake->tmp.random.client + sizeof(uint32),
-         DTLS_RANDOM_LENGTH - sizeof(uint32));
-  }
-  /* we must use the same Client Random as for the previous request */
-  memcpy(p, handshake->tmp.random.client, DTLS_RANDOM_LENGTH);
-  p += DTLS_RANDOM_LENGTH;
-
-  /* session id (length 0) */
-  dtls_int_to_uint8(p, 0);
-  p += sizeof(uint8);
-
-  /* cookie */
-  dtls_int_to_uint8(p, cookie_length);
-  p += sizeof(uint8);
-  if (cookie_length != 0) {
-    memcpy(p, cookie, cookie_length);
-    p += cookie_length;
-  }
-
-  /* add known cipher(s) */
-  dtls_int_to_uint16(p, cipher_size - 2);
-  p += sizeof(uint16);
-
-  if (ecdh_anon) {
-    dtls_int_to_uint16(p, TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256);
-    p += sizeof(uint16);
-  }
-  if (psk) {
-    dtls_int_to_uint16(p, TLS_PSK_WITH_AES_128_CCM_8);
-    p += sizeof(uint16);
-  }
-  if (ecdsa || x509) {
-    dtls_int_to_uint16(p, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8);
-    p += sizeof(uint16);
-  }
-  if (ecdhe_psk) {
-      dtls_int_to_uint16(p, TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256);
-      p += sizeof(uint16);
-  }
-
-  /* compression method */
-  dtls_int_to_uint8(p, 1);
-  p += sizeof(uint8);
-
-  dtls_int_to_uint8(p, TLS_COMPRESSION_NULL);
-  p += sizeof(uint8);
-
-  if (extension_size) {
-    /* length of the extensions */
-    dtls_int_to_uint16(p, extension_size - 2);
-    p += sizeof(uint16);
-  }
-
-  if (ecdsa || x509) {
-    /* client certificate type extension */
-    dtls_int_to_uint16(p, TLS_EXT_CLIENT_CERTIFICATE_TYPE);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 2);
-    p += sizeof(uint16);
-
-    /* length of the list */
-    dtls_int_to_uint8(p, 1);
-    p += sizeof(uint8);
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-    else
-#endif /* DTLS_X509 */
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-
-    p += sizeof(uint8);
-
-    /* server certificate type extension */
-    dtls_int_to_uint16(p, TLS_EXT_SERVER_CERTIFICATE_TYPE);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 2);
-    p += sizeof(uint16);
-
-    /* length of the list */
-    dtls_int_to_uint8(p, 1);
-    p += sizeof(uint8);
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_X509);
-    else
-#endif /* DTLS_X509 */
-      dtls_int_to_uint8(p, TLS_CERT_TYPE_RAW_PUBLIC_KEY);
-
-    p += sizeof(uint8);
-  }
-
-  if (ecdsa || x509 || ecdhe_psk || ecdh_anon ) {
-    /* elliptic_curves */
-    dtls_int_to_uint16(p, TLS_EXT_ELLIPTIC_CURVES);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 4);
-    p += sizeof(uint16);
-
-    /* length of the list */
-    dtls_int_to_uint16(p, 2);
-    p += sizeof(uint16);
-
-    dtls_int_to_uint16(p, TLS_EXT_ELLIPTIC_CURVES_SECP256R1);
-    p += sizeof(uint16);
-
-    /* ec_point_formats */
-    dtls_int_to_uint16(p, TLS_EXT_EC_POINT_FORMATS);
-    p += sizeof(uint16);
-
-    /* length of this extension type */
-    dtls_int_to_uint16(p, 2);
-    p += sizeof(uint16);
-
-    /* number of supported formats */
-    dtls_int_to_uint8(p, 1);
-    p += sizeof(uint8);
-
-    dtls_int_to_uint8(p, TLS_EXT_EC_POINT_FORMATS_UNCOMPRESSED);
-    p += sizeof(uint8);
-  }
-
-  assert(p - buf <= sizeof(buf));
-
-  if (cookie_length != 0)
-    clear_hs_hash(peer);
-
-  return dtls_send_handshake_msg_hash(ctx, peer, &peer->session,
-                                     DTLS_HT_CLIENT_HELLO,
-                                     buf, p - buf, cookie_length != 0);
-}
-
-static int
-check_server_hello(dtls_context_t *ctx, 
-                     dtls_peer_t *peer,
-                     uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-
-  /* This function is called when we expect a ServerHello (i.e. we
-   * have sent a ClientHello).  We might instead receive a HelloVerify
-   * request containing a cookie. If so, we must repeat the
-   * ClientHello with the given Cookie.
-   */
-  if (data_length < DTLS_HS_LENGTH + DTLS_HS_LENGTH)
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-
-  update_hs_hash(peer, data, data_length);
-
-  /* FIXME: check data_length before accessing fields */
-
-  /* Get the server's random data and store selected cipher suite
-   * and compression method (like dtls_update_parameters().
-   * Then calculate master secret and wait for ServerHelloDone. When received,
-   * send ClientKeyExchange (?) and ChangeCipherSpec + ClientFinished. */
-    
-  /* check server version */
-  data += DTLS_HS_LENGTH;
-  data_length -= DTLS_HS_LENGTH;
-    
-  if (dtls_uint16_to_int(data) != DTLS_VERSION) {
-    dtls_alert("unknown DTLS version\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_PROTOCOL_VERSION);
-  }
-
-  data += sizeof(uint16);            /* skip version field */
-  data_length -= sizeof(uint16);
-
-  /* store server random data */
-  memcpy(handshake->tmp.random.server, data, DTLS_RANDOM_LENGTH);
-  /* skip server random */
-  data += DTLS_RANDOM_LENGTH;
-  data_length -= DTLS_RANDOM_LENGTH;
-
-  SKIP_VAR_FIELD(data, data_length, uint8); /* skip session id */
-    
-  /* Check cipher suite. As we offer all we have, it is sufficient
-   * to check if the cipher suite selected by the server is in our
-   * list of known cipher suites. Subsets are not supported. */
-  handshake->cipher = dtls_uint16_to_int(data);
-  if (!known_cipher(ctx, handshake->cipher, 1)) {
-    dtls_alert("unsupported cipher 0x%02x 0x%02x\n",
-            data[0], data[1]);
-    return dtls_alert_fatal_create(DTLS_ALERT_INSUFFICIENT_SECURITY);
-  }
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  /* Check if NULL compression was selected. We do not know any other. */
-  if (dtls_uint8_to_int(data) != TLS_COMPRESSION_NULL) {
-    dtls_alert("unsupported compression method 0x%02x\n", data[0]);
-    return dtls_alert_fatal_create(DTLS_ALERT_INSUFFICIENT_SECURITY);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  return dtls_check_tls_extension(peer, data, data_length, 0);
-
-error:
-  return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-}
-
-static int
-check_server_hello_verify_request(dtls_context_t *ctx,
-                                 dtls_peer_t *peer,
-                                 uint8 *data, size_t data_length)
-{
-  dtls_hello_verify_t *hv;
-  int res;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_HV_LENGTH)
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-
-  hv = (dtls_hello_verify_t *)(data + DTLS_HS_LENGTH);
-
-  res = dtls_send_client_hello(ctx, peer, hv->cookie, hv->cookie_length);
-
-  if (res < 0)
-    dtls_warn("cannot send ClientHello\n");
-
-  return res;
-}
-
-#ifdef DTLS_ECC
-
-static int
-check_peer_certificate(dtls_context_t *ctx,
-                        dtls_peer_t *peer,
-                        uint8 *data, size_t data_length)
-{
-  int err;
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (dtls_uint24_to_int(data) != DTLS_EC_SUBJECTPUBLICKEY_SIZE) {
-    dtls_alert("expect length of %d bytes for certificate\n",
-              DTLS_EC_SUBJECTPUBLICKEY_SIZE);
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint24);
-
-  if (memcmp(data, cert_asn1_header, sizeof(cert_asn1_header))) {
-    dtls_alert("got an unexpected Subject public key format\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(cert_asn1_header);
-
-  memcpy(config->keyx.ecc.other_pub_x, data,
-        sizeof(config->keyx.ecc.other_pub_x));
-  data += sizeof(config->keyx.ecc.other_pub_x);
-
-  memcpy(config->keyx.ecc.other_pub_y, data,
-        sizeof(config->keyx.ecc.other_pub_y));
-  data += sizeof(config->keyx.ecc.other_pub_y);
-
-  err = CALL(ctx, verify_ecdsa_key, &peer->session,
-            config->keyx.ecc.other_pub_x,
-            config->keyx.ecc.other_pub_y,
-            sizeof(config->keyx.ecc.other_pub_x));
-  if (err < 0) {
-    dtls_warn("The certificate was not accepted\n");
-    return err;
-  }
-
-  return 0;
-}
-#endif /* DTLS_ECC */
-
-#ifdef DTLS_X509
-static int
-check_peer_certificate_x509(dtls_context_t *ctx,
-                        dtls_peer_t *peer,
-                        uint8 *data, size_t data_length)
-{
-  int ret;
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  int cert_length;
-
-  dtls_info("\n check_peer_certificate_x509\n");
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  cert_length = dtls_uint24_to_int(data);
-  data += sizeof(uint24);
-
-  ret = CALL(ctx, verify_x509_cert, &peer->session, data, cert_length,
-          config->keyx.ecc.other_pub_x, sizeof(config->keyx.ecc.other_pub_x),
-          config->keyx.ecc.other_pub_y, sizeof(config->keyx.ecc.other_pub_y));
-  if (ret < 0) {
-    dtls_warn("The certificate was not accepted\n");
-    return ret;
-  }
-
-  return 0;
-}
-#endif /* DTLS_X509 */
-
-#if defined(DTLS_X509) || defined(DTLS_ECC)
-static int
-check_server_key_exchange_ecdsa(dtls_context_t *ctx,
-                               dtls_peer_t *peer,
-                               uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  int ret;
-  unsigned char *result_r;
-  unsigned char *result_s;
-  unsigned char *key_params;
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXEC_LENGTH) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  key_params = data;
-
-  if (dtls_uint8_to_int(data) != TLS_EC_CURVE_TYPE_NAMED_CURVE) {
-    dtls_alert("Only named curves supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint16_to_int(data) != TLS_EXT_ELLIPTIC_CURVES_SECP256R1) {
-    dtls_alert("secp256r1 supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-    dtls_alert("expected 65 bytes long public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint8_to_int(data) != 4) {
-    dtls_alert("expected uncompressed public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-
-  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-
-  ret = dtls_check_ecdsa_signature_elem(data, data_length, &result_r, &result_s);
-  if (ret < 0) {
-    return ret;
-  }
-  data += ret;
-  data_length -= ret;
-
-  ret = dtls_ecdsa_verify_sig(config->keyx.ecc.other_pub_x, config->keyx.ecc.other_pub_y,
-                              sizeof(config->keyx.ecc.other_pub_x),
-                              config->tmp.random.client, DTLS_RANDOM_LENGTH,
-                              config->tmp.random.server, DTLS_RANDOM_LENGTH,
-                              key_params,
-                              1 + 2 + 1 + 1 + (2 * DTLS_EC_KEY_SIZE),
-                              result_r, result_s);
-
-  if (ret <= 0) {
-    dtls_alert("wrong signature\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  return 0;
-}
-
-static int
-check_server_key_exchange_ecdh(dtls_context_t *ctx,
-                               dtls_peer_t *peer,
-                               uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdh_anon_with_aes_128_cbc_sha_256(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXEC_ECDH_ANON_LENGTH) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  if (dtls_uint8_to_int(data) != TLS_EC_CURVE_TYPE_NAMED_CURVE) {
-    dtls_alert("Only named curves supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint16_to_int(data) != TLS_EXT_ELLIPTIC_CURVES_SECP256R1) {
-    dtls_alert("secp256r1 supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-    dtls_alert("expected 65 bytes long public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint8_to_int(data) != 4) {
-    dtls_alert("expected uncompressed public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_x));
-  data += sizeof(config->keyx.ecc.other_eph_pub_x);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_x);
-
-  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-
-  return 0;
-}
-#endif /* DTLS_ECC */
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-check_server_key_exchange_ecdhe_psk(dtls_context_t *ctx,
-                             dtls_peer_t *peer,
-                             uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  uint16_t psk_len = 0;
-
-  /* ServerKeyExchange
-    * Please see Session 2, RFC 5489.
-
-         struct {
-          select (KeyExchangeAlgorithm) {
-              //other cases for rsa, diffie_hellman, etc.
-              case ec_diffie_hellman_psk:  // NEW
-                  opaque psk_identity_hint<0..2^16-1>;
-                  ServerECDHParams params;
-          };
-      } ServerKeyExchange; */
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  psk_len = dtls_uint16_to_int(data);
-  data += sizeof(uint16);
-
-  if (psk_len != data_length - DTLS_HS_LENGTH - DTLS_SKEXEC_ECDH_ANON_LENGTH - sizeof(uint16)) {
-    dtls_warn("the length of the server identity hint is worng\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  if (psk_len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-    dtls_warn("please use a smaller server identity hint\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  // store the psk_identity_hint in config->keyx.psk for later use
-  config->keyx.psk.id_length = psk_len;
-  memcpy(config->keyx.psk.identity, data, psk_len);
-
-  data += psk_len;
-  data_length -= psk_len;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXEC_ECDH_ANON_LENGTH) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  if (dtls_uint8_to_int(data) != TLS_EC_CURVE_TYPE_NAMED_CURVE) {
-    dtls_alert("Only named curves supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint16_to_int(data) != TLS_EXT_ELLIPTIC_CURVES_SECP256R1) {
-    dtls_alert("secp256r1 supported\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint16);
-  data_length -= sizeof(uint16);
-
-  if (dtls_uint8_to_int(data) != 1 + 2 * DTLS_EC_KEY_SIZE) {
-    dtls_alert("expected 65 bytes long public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  if (dtls_uint8_to_int(data) != 4) {
-    dtls_alert("expected uncompressed public point\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  data += sizeof(uint8);
-  data_length -= sizeof(uint8);
-
-  memcpy(config->keyx.ecc.other_eph_pub_x, data, sizeof(config->keyx.ecc.other_eph_pub_x));
-  data += sizeof(config->keyx.ecc.other_eph_pub_x);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_x);
-
-  memcpy(config->keyx.ecc.other_eph_pub_y, data, sizeof(config->keyx.ecc.other_eph_pub_y));
-  data += sizeof(config->keyx.ecc.other_eph_pub_y);
-  data_length -= sizeof(config->keyx.ecc.other_eph_pub_y);
-
-  return 0;
-}
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-
-#ifdef DTLS_PSK
-static int
-check_server_key_exchange_psk(dtls_context_t *ctx,
-                             dtls_peer_t *peer,
-                             uint8 *data, size_t data_length)
-{
-  dtls_handshake_parameters_t *config = peer->handshake_params;
-  uint16_t len;
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_psk_with_aes_128_ccm_8(config->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (data_length < DTLS_HS_LENGTH + DTLS_SKEXECPSK_LENGTH_MIN) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  len = dtls_uint16_to_int(data);
-  data += sizeof(uint16);
-
-  if (len != data_length - DTLS_HS_LENGTH - sizeof(uint16)) {
-    dtls_warn("the length of the server identity hint is worng\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  if (len > DTLS_PSK_MAX_CLIENT_IDENTITY_LEN) {
-    dtls_warn("please use a smaller server identity hint\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-  }
-
-  /* store the psk_identity_hint in config->keyx.psk for later use */
-  config->keyx.psk.id_length = len;
-  memcpy(config->keyx.psk.identity, data, len);
-  return 0;
-}
-#endif /* DTLS_PSK */
-
-static int
-check_certificate_request(dtls_context_t *ctx, 
-                         dtls_peer_t *peer,
-                         uint8 *data, size_t data_length)
-{
-  unsigned int i;
-  int auth_alg;
-  int sig_alg;
-  int hash_alg;
-
-  update_hs_hash(peer, data, data_length);
-
-  assert(is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher));
-
-  data += DTLS_HS_LENGTH;
-
-  if (data_length < DTLS_HS_LENGTH + 5) {
-    dtls_alert("the packet length does not match the expected\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  i = dtls_uint8_to_int(data);
-  data += sizeof(uint8);
-  if (i + 1 > data_length) {
-    dtls_alert("the cerfificate types are too long\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  auth_alg = 0;
-  for (; i > 0 ; i -= sizeof(uint8)) {
-    if (dtls_uint8_to_int(data) == TLS_CLIENT_CERTIFICATE_TYPE_ECDSA_SIGN
-       && auth_alg == 0)
-      auth_alg = dtls_uint8_to_int(data);
-    data += sizeof(uint8);
-  }
-
-  if (auth_alg != TLS_CLIENT_CERTIFICATE_TYPE_ECDSA_SIGN) {
-    dtls_alert("the request authentication algorithm is not supproted\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  i = dtls_uint16_to_int(data);
-  data += sizeof(uint16);
-  if (i + 1 > data_length) {
-    dtls_alert("the signature and hash algorithm list is too long\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-
-  hash_alg = 0;
-  sig_alg = 0;
-  for (; i > 0 ; i -= sizeof(uint16)) {
-    int current_hash_alg;
-    int current_sig_alg;
-
-    current_hash_alg = dtls_uint8_to_int(data);
-    data += sizeof(uint8);
-    current_sig_alg = dtls_uint8_to_int(data);
-    data += sizeof(uint8);
-
-    if (current_hash_alg == TLS_EXT_SIG_HASH_ALGO_SHA256 && hash_alg == 0 && 
-        current_sig_alg == TLS_EXT_SIG_HASH_ALGO_ECDSA && sig_alg == 0) {
-      hash_alg = current_hash_alg;
-      sig_alg = current_sig_alg;
-    }
-  }
-
-  if (hash_alg != TLS_EXT_SIG_HASH_ALGO_SHA256 ||
-      sig_alg != TLS_EXT_SIG_HASH_ALGO_ECDSA) {
-    dtls_alert("no supported hash and signature algorithem\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-  }
-
-  /* common names are ignored */
-
-  peer->handshake_params->do_client_auth = 1;
-  return 0;
-}
-
-static int
-check_server_hellodone(dtls_context_t *ctx,
-                     dtls_peer_t *peer,
-                     uint8 *data, size_t data_length)
-{
-  int res = 0;
-#ifdef DTLS_ECC
-  const dtls_ecc_key_t *ecdsa_key;
-#ifdef DTLS_X509
-  unsigned char *cert;
-  size_t cert_size;
-#endif /* DTLS_X509 */
-#endif /* DTLS_ECC */
-
-  dtls_handshake_parameters_t *handshake = peer->handshake_params;
-
-  /* calculate master key, send CCS */
-
-  update_hs_hash(peer, data, data_length);
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      res = CALL(ctx, get_x509_key, &peer->session, &ecdsa_key);
-    else
-#endif /* DTLS_X509 */
-      res = CALL(ctx, get_ecdsa_key, &peer->session, &ecdsa_key);
-    if (res < 0) {
-      dtls_crit("no ecdsa key to use\n");
-      return res;
-    }
-
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      res = dtls_send_certificate_x509(ctx, peer);
-    else
-#endif /* DTLS_X509 */
-      res = dtls_send_certificate_ecdsa(ctx, peer, ecdsa_key);
-
-    if (res < 0) {
-      dtls_debug("dtls_server_hello: cannot prepare Certificate record\n");
-      return res;
-    }
-  }
-#endif /* DTLS_ECC */
-
-  /* send ClientKeyExchange */
-  res = dtls_send_client_key_exchange(ctx, peer);
-
-  if (res < 0) {
-    dtls_debug("cannot send KeyExchange message\n");
-    return res;
-  }
-
-#ifdef DTLS_ECC
-  if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(handshake->cipher) && handshake->do_client_auth) {
-    res = dtls_send_certificate_verify_ecdh(ctx, peer, ecdsa_key);
-
-    if (res < 0) {
-      dtls_debug("dtls_server_hello: cannot prepare Certificate record\n");
-      return res;
-    }
-  }
-#endif /* DTLS_ECC */
-
-  res = calculate_key_block(ctx, handshake, peer,
-                           &peer->session, peer->role);
-  if (res < 0) {
-    return res;
-  }
-
-  res = dtls_send_ccs(ctx, peer);
-  if (res < 0) {
-    dtls_debug("cannot send CCS message\n");
-    return res;
-  }
-
-  /* and switch cipher suite */
-  dtls_security_params_switch(peer);
-
-  /* Client Finished */
-  return dtls_send_finished(ctx, peer, PRF_LABEL(client), PRF_LABEL_SIZE(client));
-}
-
-static int
-decrypt_verify(dtls_peer_t *peer, uint8 *packet, size_t length,
-              uint8 **cleartext)
-{
-  dtls_record_header_t *header = DTLS_RECORD_HEADER(packet);
-  dtls_security_parameters_t *security = dtls_security_params_epoch(peer, dtls_get_epoch(header));
-  int clen;
-  
-  *cleartext = (uint8 *)packet + sizeof(dtls_record_header_t);
-  clen = length - sizeof(dtls_record_header_t);
-
-  if (!security) {
-    dtls_alert("No security context for epoch: %i\n", dtls_get_epoch(header));
-    return -1;
-  }
-
-  if (security->cipher == TLS_NULL_WITH_NULL_NULL) {
-    /* no cipher suite selected */
-    return clen;
-  } else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(security->cipher) ||
-             is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(security->cipher)) {
-
-    unsigned char nonce[DTLS_CBC_IV_LENGTH];
-
-    if (clen < (DTLS_CBC_IV_LENGTH + DTLS_HMAC_DIGEST_SIZE))           /* need at least IV and MAC */
-      return -1;
-
-    memcpy(nonce, *cleartext , DTLS_CBC_IV_LENGTH);
-    clen -= DTLS_CBC_IV_LENGTH;
-    *cleartext += DTLS_CBC_IV_LENGTH ;
-
-    clen = dtls_decrypt(*cleartext, clen, *cleartext, nonce,
-                      dtls_kb_remote_write_key(security, peer->role),
-                      dtls_kb_key_size(security, peer->role),
-                       dtls_kb_remote_mac_secret(security, peer->role),
-                       dtls_kb_mac_secret_size(security->cipher),
-                      NULL, 0,
-                      security->cipher);
-
-  } else { /* TLS_PSK_WITH_AES_128_CCM_8 or TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */
-    /** 
-     * length of additional_data for the AEAD cipher which consists of
-     * seq_num(2+6) + type(1) + version(2) + length(2)
-     */
-#define A_DATA_LEN 13
-    unsigned char nonce[DTLS_CCM_BLOCKSIZE];
-    unsigned char A_DATA[A_DATA_LEN];
-
-    if (clen < 16)             /* need at least IV and MAC */
-      return -1;
-
-    memset(nonce, 0, DTLS_CCM_BLOCKSIZE);
-    memcpy(nonce, dtls_kb_remote_iv(security, peer->role),
-        dtls_kb_iv_size(security->cipher));
-
-    /* read epoch and seq_num from message */
-    memcpy(nonce + dtls_kb_iv_size(security->cipher), *cleartext, 8);
-    *cleartext += 8;
-    clen -= 8;
-
-    dtls_debug_dump("nonce", nonce, DTLS_CCM_BLOCKSIZE);
-    dtls_debug_dump("key", dtls_kb_remote_write_key(security, peer->role),
-                   dtls_kb_key_size(security, peer->role));
-    dtls_debug_dump("ciphertext", *cleartext, clen);
-
-    /* re-use N to create additional data according to RFC 5246, Section 6.2.3.3:
-     * 
-     * additional_data = seq_num + TLSCompressed.type +
-     *                   TLSCompressed.version + TLSCompressed.length;
-     */
-    memcpy(A_DATA, &DTLS_RECORD_HEADER(packet)->epoch, 8); /* epoch and seq_num */
-    memcpy(A_DATA + 8,  &DTLS_RECORD_HEADER(packet)->content_type, 3); /* type and version */
-    dtls_int_to_uint16(A_DATA + 11, clen - 8); /* length without nonce_explicit */
-
-    clen = dtls_decrypt(*cleartext, clen, *cleartext, nonce,
-                      dtls_kb_remote_write_key(security, peer->role),
-                      dtls_kb_key_size(security, peer->role),
-                       dtls_kb_remote_mac_secret(security, peer->role),
-                       dtls_kb_mac_secret_size(security->cipher),
-                      A_DATA, A_DATA_LEN,
-                      security->cipher);
-  }
-
-  if (clen < 0)
-    dtls_warn("decryption failed\n");
-  else {
-#ifndef NDEBUG
-    dtls_debug("decrypt_verify(): found %i bytes cleartext\n", clen);
-#endif
-    dtls_security_params_free_other(peer);
-    dtls_debug_dump("cleartext", *cleartext, clen);
-  }
-
-  return clen;
-}
-
-static int
-dtls_send_hello_request(dtls_context_t *ctx, dtls_peer_t *peer)
-{
-  return dtls_send_handshake_msg_hash(ctx, peer, &peer->session,
-                                     DTLS_HT_HELLO_REQUEST,
-                                     NULL, 0, 0);
-}
-
-int
-dtls_renegotiate(dtls_context_t *ctx, const session_t *dst)
-{
-  dtls_peer_t *peer = NULL;
-  int err;
-
-  peer = dtls_get_peer(ctx, dst);
-
-  if (!peer) {
-    return -1;
-  }
-  if (peer->state != DTLS_STATE_CONNECTED)
-    return -1;
-
-  peer->handshake_params = dtls_handshake_new();
-  if (!peer->handshake_params)
-    return -1;
-
-  peer->handshake_params->hs_state.mseq_r = 0;
-  peer->handshake_params->hs_state.mseq_s = 0;
-
-  if (peer->role == DTLS_CLIENT) {
-    /* send ClientHello with empty Cookie */
-    err = dtls_send_client_hello(ctx, peer, NULL, 0);
-    if (err < 0)
-      dtls_warn("cannot send ClientHello\n");
-    else
-      peer->state = DTLS_STATE_CLIENTHELLO;
-    return err;
-  } else if (peer->role == DTLS_SERVER) {
-    return dtls_send_hello_request(ctx, peer);
-  }
-
-  return -1;
-}
-
-static int
-handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-                const dtls_peer_type role, const dtls_state_t state,
-                uint8 *data, size_t data_length) {
-
-  int err = 0;
-
-  /* This will clear the retransmission buffer if we get an expected
-   * handshake message. We have to make sure that no handshake message
-   * should get expected when we still should retransmit something, when
-   * we do everything accordingly to the DTLS 1.2 standard this should
-   * not be a problem. */
-  if (peer) {
-    dtls_handshake_header_t *hs_header = DTLS_HANDSHAKE_HEADER(data);
-    if (state == DTLS_STATE_WAIT_CHANGECIPHERSPEC && hs_header->msg_type ==  DTLS_HT_FINISHED) {
-      return 0;
-    }
-    dtls_clear_retransmission(ctx, peer);
-  }
-
-  /* The following switch construct handles the given message with
-   * respect to the current internal state for this peer. In case of
-   * error, it is left with return 0. */
-
-  dtls_debug("handle handshake packet of type: %s (%i)\n",
-            dtls_handshake_type_to_name(data[0]), data[0]);
-  switch (data[0]) {
-
-  /************************************************************************
-   * Client states
-   ************************************************************************/
-  case DTLS_HT_HELLO_VERIFY_REQUEST:
-
-    if (state != DTLS_STATE_CLIENTHELLO) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_server_hello_verify_request(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_server_hello_verify_request err: %i\n", err);
-      return err;
-    }
-
-    break;
-  case DTLS_HT_SERVER_HELLO:
-
-    if (state != DTLS_STATE_CLIENTHELLO) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_server_hello(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_server_hello err: %i\n", err);
-      return err;
-    }
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher))
-      peer->state = DTLS_STATE_WAIT_SERVERCERTIFICATE; //ecdsa
-    else if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher) ||
-        is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher))
-        peer->state = DTLS_STATE_WAIT_SERVERKEYEXCHANGE; //ecdh
-    else
-      peer->state = DTLS_STATE_WAIT_SERVERHELLODONE; //psk
-    /* update_hs_hash(peer, data, data_length); */
-
-    break;
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  case DTLS_HT_CERTIFICATE:
-
-    if ((role == DTLS_CLIENT && state != DTLS_STATE_WAIT_SERVERCERTIFICATE) ||
-        (role == DTLS_SERVER && state != DTLS_STATE_WAIT_CLIENTCERTIFICATE)) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-#ifdef DTLS_X509
-    if (CALL(ctx, is_x509_active) == 0)
-      err = check_peer_certificate_x509(ctx, peer, data, data_length);
-    else
-#endif /* DTLS_X509 */
-      err = check_peer_certificate(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_peer_certificate err: %i\n", err);
-      return err;
-    }
-    if (role == DTLS_CLIENT) {
-      peer->state = DTLS_STATE_WAIT_SERVERKEYEXCHANGE;
-    } else if (role == DTLS_SERVER){
-      peer->state = DTLS_STATE_WAIT_CLIENTKEYEXCHANGE;
-    }
-    /* update_hs_hash(peer, data, data_length); */
-
-    break;
-#endif /* DTLS_ECC */
-
-  case DTLS_HT_SERVER_KEY_EXCHANGE:
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-      if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-        return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-      }
-      err = check_server_key_exchange_ecdsa(ctx, peer, data, data_length);
-    }
-
-    if (is_tls_ecdh_anon_with_aes_128_cbc_sha_256(peer->handshake_params->cipher)) {
-      if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-        return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-      }
-      err = check_server_key_exchange_ecdh(ctx, peer, data, data_length);
-    }
-#endif /* DTLS_ECC */
-
-#if defined(DTLS_PSK) && defined(DTLS_ECC)
-    if (is_tls_ecdhe_psk_with_aes_128_cbc_sha_256(peer->handshake_params->cipher)) {
-        if (state != DTLS_STATE_WAIT_SERVERKEYEXCHANGE) {
-          return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-        }
-      err = check_server_key_exchange_ecdhe_psk(ctx, peer, data, data_length);
-    }
-#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */
-
-#ifdef DTLS_PSK
-    if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {
-      if (state != DTLS_STATE_WAIT_SERVERHELLODONE) {
-        return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-      }
-      err = check_server_key_exchange_psk(ctx, peer, data, data_length);
-    }
-#endif /* DTLS_PSK */
-
-    if (err < 0) {
-      dtls_warn("error in check_server_key_exchange err: %i\n", err);
-      return err;
-    }
-    peer->state = DTLS_STATE_WAIT_SERVERHELLODONE;
-    /* update_hs_hash(peer, data, data_length); */
-
-    break;
-
-  case DTLS_HT_SERVER_HELLO_DONE:
-
-    if (state != DTLS_STATE_WAIT_SERVERHELLODONE) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_server_hellodone(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_server_hellodone err: %i\n", err);
-      return err;
-    }
-    peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC;
-    /* update_hs_hash(peer, data, data_length); */
-
-    break;
-
-  case DTLS_HT_CERTIFICATE_REQUEST:
-
-    if (state != DTLS_STATE_WAIT_SERVERHELLODONE) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_certificate_request(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_certificate_request err: %i\n", err);
-      return err;
-    }
-
-    break;
-
-  case DTLS_HT_FINISHED:
-    /* expect a Finished message from server */
-
-    if (state != DTLS_STATE_WAIT_FINISHED) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_finished(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_finished err: %i\n", err);
-      return err;
-    }
-    if (role == DTLS_SERVER) {
-      /* send ServerFinished */
-      update_hs_hash(peer, data, data_length);
-
-      /* send change cipher spec message and switch to new configuration */
-      err = dtls_send_ccs(ctx, peer);
-      if (err < 0) {
-        dtls_warn("cannot send CCS message\n");
-        return err;
-      }
-
-      dtls_security_params_switch(peer);
-
-      err = dtls_send_finished(ctx, peer, PRF_LABEL(server), PRF_LABEL_SIZE(server));
-      if (err < 0) {
-        dtls_warn("sending server Finished failed\n");
-        return err;
-      }
-    }
-    dtls_handshake_free(peer->handshake_params);
-    peer->handshake_params = NULL;
-    dtls_debug("Handshake complete\n");
-    check_stack();
-    peer->state = DTLS_STATE_CONNECTED;
-
-    /* return here to not increase the message receive counter */
-    return err;
-
-  /************************************************************************
-   * Server states
-   ************************************************************************/
-
-  case DTLS_HT_CLIENT_KEY_EXCHANGE:
-    /* handle ClientHello, update msg and msglen and goto next if not finished */
-
-    if (state != DTLS_STATE_WAIT_CLIENTKEYEXCHANGE) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_client_keyexchange(ctx, peer->handshake_params, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_client_keyexchange err: %i\n", err);
-      return err;
-    }
-    update_hs_hash(peer, data, data_length);
-
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
-            (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx))))
-      peer->state = DTLS_STATE_WAIT_CERTIFICATEVERIFY; //ecdsa
-    else
-      peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC; //psk || ecdh_anon
-    break;
-
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-  case DTLS_HT_CERTIFICATE_VERIFY:
-
-    if (state != DTLS_STATE_WAIT_CERTIFICATEVERIFY) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    err = check_client_certificate_verify(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in check_client_certificate_verify err: %i\n", err);
-      return err;
-    }
-
-    update_hs_hash(peer, data, data_length);
-    peer->state = DTLS_STATE_WAIT_CHANGECIPHERSPEC;
-    break;
-#endif /* DTLS_ECC */
-
-  case DTLS_HT_CLIENT_HELLO:
-
-    if ((peer && state != DTLS_STATE_CONNECTED && state != DTLS_STATE_WAIT_CLIENTHELLO) ||
-       (!peer && state != DTLS_STATE_WAIT_CLIENTHELLO)) {
-      return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-    }
-
-    /* When no DTLS state exists for this peer, we only allow a
-       Client Hello message with
-
-       a) a valid cookie, or
-       b) no cookie.
-
-       Anything else will be rejected. Fragementation is not allowed
-       here as it would require peer state as well.
-    */
-    err = dtls_verify_peer(ctx, peer, session, state, data, data_length);
-    if (err < 0) {
-      dtls_warn("error in dtls_verify_peer err: %i\n", err);
-      return err;
-    }
-
-    if (err > 0) {
-      dtls_debug("server hello verify was sent\n");
-      break;
-    }
-
-    /* At this point, we have a good relationship with this peer. This
-     * state is left for re-negotiation of key material. */
-     /* As per RFC 6347 - section 4.2.8 if this is an attempt to
-      * rehandshake, we can delete the existing key material
-      * as the client has demonstrated reachibility by completing
-      * the cookie exchange */
-    if (peer && state == DTLS_STATE_WAIT_CLIENTHELLO) {
-       dtls_debug("removing the peer\n");
-#ifndef WITH_CONTIKI
-       HASH_DEL_PEER(ctx->peers, peer);
-#else  /* WITH_CONTIKI */
-       list_remove(ctx->peers, peer);
-#endif /* WITH_CONTIKI */
-
-       dtls_free_peer(peer);
-       peer = NULL;
-    }
-    if (!peer) {
-      dtls_debug("creating new peer\n");
-      dtls_security_parameters_t *security;
-
-      /* msg contains a Client Hello with a valid cookie, so we can
-       * safely create the server state machine and continue with
-       * the handshake. */
-      peer = dtls_new_peer(session);
-      if (!peer) {
-        dtls_alert("cannot create peer\n");
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-      }
-      peer->role = DTLS_SERVER;
-
-      /* Initialize record sequence number to 1 for new peers. The first
-       * record with sequence number 0 is a stateless Hello Verify Request.
-       */
-      security = dtls_security_params(peer);
-      security->rseq = 1;
-      dtls_add_peer(ctx, peer);
-    }
-    if (peer && !peer->handshake_params) {
-      dtls_handshake_header_t *hs_header = DTLS_HANDSHAKE_HEADER(data);
-
-      peer->handshake_params = dtls_handshake_new();
-      if (!peer->handshake_params)
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-
-      LIST_STRUCT_INIT(peer->handshake_params, reorder_queue);
-      peer->handshake_params->hs_state.mseq_r = dtls_uint16_to_int(hs_header->message_seq);
-      peer->handshake_params->hs_state.mseq_s = 1;
-    }
-
-    clear_hs_hash(peer);
-
-    /* First negotiation step: check for PSK
-     *
-     * Note that we already have checked that msg is a Handshake
-     * message containing a ClientHello. dtls_get_cipher() therefore
-     * does not check again.
-     */
-    err = dtls_update_parameters(ctx, peer, data, data_length);
-    if (err < 0) {
-      dtls_warn("error updating security parameters\n");
-      return err;
-    }
-
-    /* update finish MAC */
-    update_hs_hash(peer, data, data_length);
-
-    err = dtls_send_server_hello_msgs(ctx, peer);
-    if (err < 0) {
-      return err;
-    }
-    if (is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher) &&
-            (is_ecdsa_client_auth_supported(ctx) || (is_x509_client_auth_supported(ctx))))
-      peer->state = DTLS_STATE_WAIT_CLIENTCERTIFICATE; //ecdhe
-    else
-      peer->state = DTLS_STATE_WAIT_CLIENTKEYEXCHANGE; //psk, ecdh_anon
-
-    /* after sending the ServerHelloDone, we expect the
-     * ClientKeyExchange (possibly containing the PSK id),
-     * followed by a ChangeCipherSpec and an encrypted Finished.
-     */
-
-    break;
-
-  case DTLS_HT_HELLO_REQUEST:
-
-    if (state != DTLS_STATE_CONNECTED) {
-      /* we should just ignore such packets when in handshake */
-      return 0;
-    }
-
-    if (peer && !peer->handshake_params) {
-      peer->handshake_params = dtls_handshake_new();
-      if (!peer->handshake_params)
-        return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-
-      LIST_STRUCT_INIT(peer->handshake_params, reorder_queue);
-      peer->handshake_params->hs_state.mseq_r = 0;
-      peer->handshake_params->hs_state.mseq_s = 0;
-    }
-
-    /* send ClientHello with empty Cookie */
-    err = dtls_send_client_hello(ctx, peer, NULL, 0);
-    if (err < 0) {
-      dtls_warn("cannot send ClientHello\n");
-      return err;
-    }
-    peer->state = DTLS_STATE_CLIENTHELLO;
-    break;
-
-  default:
-    dtls_crit("unhandled message %d\n", data[0]);
-    return dtls_alert_fatal_create(DTLS_ALERT_UNEXPECTED_MESSAGE);
-  }
-
-  if (peer && peer->handshake_params && err >= 0) {
-    peer->handshake_params->hs_state.mseq_r++;
-  }
-
-  return err;
-}
-      
-static int
-handle_handshake(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session,
-                const dtls_peer_type role, const dtls_state_t state,
-                uint8 *data, size_t data_length)
-{
-  dtls_handshake_header_t *hs_header;
-  int res;
-
-  if (data_length < DTLS_HS_LENGTH) {
-    dtls_warn("handshake message too short\n");
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-  }
-  hs_header = DTLS_HANDSHAKE_HEADER(data);
-
-  dtls_debug("received handshake packet of type: %s (%i)\n",
-            dtls_handshake_type_to_name(hs_header->msg_type), hs_header->msg_type);
-
-  if (!peer || !peer->handshake_params) {
-    /* This is the initial ClientHello */
-    if (hs_header->msg_type != DTLS_HT_CLIENT_HELLO && !peer) {
-      dtls_warn("If there is no peer only ClientHello is allowed\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_HANDSHAKE_FAILURE);
-    }
-
-    /* This is a ClientHello or Hello Request send when doing TLS renegotiation */
-    if (hs_header->msg_type == DTLS_HT_CLIENT_HELLO ||
-       hs_header->msg_type == DTLS_HT_HELLO_REQUEST) {
-      return handle_handshake_msg(ctx, peer, session, role, state, data,
-                                 data_length);
-    } else {
-      dtls_warn("ignore unexpected handshake message\n");
-      return 0;
-    }
-  }
-  /* This is a ClientHello send when doing retransmission */
-  if (peer && hs_header->msg_type == DTLS_HT_CLIENT_HELLO &&
-              dtls_uint16_to_int(hs_header->message_seq) == 0) {
-     res = dtls_verify_peer(ctx, peer, session, state, data, data_length);
-     if (res < 0) {
-       dtls_warn("error in dtls_verify_peer err: %i\n", res);
-     }
-     if (res > 0) {
-       dtls_debug("server hello verify was sent\n");
-     }
-     return res;
-  }
-
-  if (dtls_uint16_to_int(hs_header->message_seq) < peer->handshake_params->hs_state.mseq_r) {
-    dtls_warn("The message sequence number is too small, expected %i, got: %i\n",
-             peer->handshake_params->hs_state.mseq_r, dtls_uint16_to_int(hs_header->message_seq));
-    return 0;
-  } else if (dtls_uint16_to_int(hs_header->message_seq) > peer->handshake_params->hs_state.mseq_r) {
-    /* A packet in between is missing, buffer this packet. */
-    netq_t *n;
-
-    /* TODO: only add packet that are not too new. */
-    if (data_length > DTLS_MAX_BUF) {
-      dtls_warn("the packet is too big to buffer for reoder\n");
-      return 0;
-    }
-
-    netq_t *node = netq_head(peer->handshake_params->reorder_queue);
-    while (node) {
-      dtls_handshake_header_t *node_header = DTLS_HANDSHAKE_HEADER(node->data);
-      if (dtls_uint16_to_int(node_header->message_seq) == dtls_uint16_to_int(hs_header->message_seq)) {
-        dtls_warn("a packet with this sequence number is already stored\n");
-        return 0;
-      }
-      node = netq_next(node);
-    }
-
-    n = netq_node_new(data_length);
-    if (!n) {
-      dtls_warn("no space in reoder buffer\n");
-      return 0;
-    }
-
-    n->peer = peer;
-    n->length = data_length;
-    memcpy(n->data, data, data_length);
-
-    if (!netq_insert_node(peer->handshake_params->reorder_queue, n)) {
-      dtls_warn("cannot add packet to reoder buffer\n");
-      netq_node_free(n);
-    }
-    dtls_info("Added packet for reordering\n");
-    return 0;
-  } else if (dtls_uint16_to_int(hs_header->message_seq) == peer->handshake_params->hs_state.mseq_r) {
-    /* Found the expected packet, use this and all the buffered packet */
-    int next = 1;
-
-    res = handle_handshake_msg(ctx, peer, session, role, state, data, data_length);
-    if (res < 0)
-      return res;
-
-    /* We do not know in which order the packet are in the list just search the list for every packet. */
-    while (next && peer->handshake_params) {
-      next = 0;
-      netq_t *node = netq_head(peer->handshake_params->reorder_queue);
-      while (node) {
-        dtls_handshake_header_t *node_header = DTLS_HANDSHAKE_HEADER(node->data);
-
-        if (dtls_uint16_to_int(node_header->message_seq) == peer->handshake_params->hs_state.mseq_r) {
-          netq_remove(peer->handshake_params->reorder_queue, node);
-          next = 1;
-          res = handle_handshake_msg(ctx, peer, session, role, peer->state, node->data, node->length);
-          if (res < 0) {
-            return res;
-          }
-
-          break;
-        } else {
-          node = netq_next(node);
-        }
-      }
-    }
-    return res;
-  }
-  assert(0);
-  return 0;
-}
-
-static int
-handle_ccs(dtls_context_t *ctx, dtls_peer_t *peer, 
-          uint8 *record_header, uint8 *data, size_t data_length)
-{
-  int err;
-  dtls_handshake_parameters_t *handshake;
-
-  /* A CCS message is handled after a KeyExchange message was
-   * received from the client. When security parameters have been
-   * updated successfully and a ChangeCipherSpec message was sent
-   * by ourself, the security context is switched and the record
-   * sequence number is reset. */
-  
-  if (!peer || peer->state != DTLS_STATE_WAIT_CHANGECIPHERSPEC) {
-    dtls_warn("expected ChangeCipherSpec during handshake\n");
-    return 0;
-  }
-
-  if (data_length < 1 || data[0] != 1)
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-
-  handshake = peer->handshake_params;
-  /* Just change the cipher when we are on the same epoch */
-  if (peer->role == DTLS_SERVER) {
-    err = calculate_key_block(ctx, handshake, peer,
-                             &peer->session, peer->role);
-    if (err < 0) {
-      return err;
-    }
-  }
-  
-  peer->state = DTLS_STATE_WAIT_FINISHED;
-
-  return 0;
-}  
-
-/** 
- * Handles incoming Alert messages. This function returns \c 1 if the
- * connection should be closed and the peer is to be invalidated.
- */
-static int
-handle_alert(dtls_context_t *ctx, dtls_peer_t *peer, 
-            uint8 *record_header, uint8 *data, size_t data_length) {
-  int free_peer = 0;           /* indicates whether to free peer */
-
-  if (data_length < 2)
-    return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
-
-  dtls_info("** Alert: level %d, description %d\n", data[0], data[1]);
-
-  if (!peer) {
-    dtls_warn("got an alert for an unknown peer, we probably already removed it, ignore it\n");
-    return 0;
-  }
-
-  /* The peer object is invalidated for FATAL alerts and close
-   * notifies. This is done in two steps.: First, remove the object
-   * from our list of peers. After that, the event handler callback is
-   * invoked with the still existing peer object. Finally, the storage
-   * used by peer is released.
-   */
-  if (data[0] == DTLS_ALERT_LEVEL_FATAL || data[1] == DTLS_ALERT_CLOSE_NOTIFY) {
-    dtls_alert("%d invalidate peer\n", data[1]);
-    
-#ifndef WITH_CONTIKI
-    HASH_DEL_PEER(ctx->peers, peer);
-#else /* WITH_CONTIKI */
-    list_remove(ctx->peers, peer);
-
-#ifndef NDEBUG
-    PRINTF("removed peer [");
-    PRINT6ADDR(&peer->session.addr);
-    PRINTF("]:%d\n", uip_ntohs(peer->session.port));
-#endif
-#endif /* WITH_CONTIKI */
-
-    free_peer = 1;
-
-  }
-
-  (void)CALL(ctx, event, &peer->session, 
-            (dtls_alert_level_t)data[0], (unsigned short)data[1]);
-  switch (data[1]) {
-  case DTLS_ALERT_CLOSE_NOTIFY:
-    /* If state is DTLS_STATE_CLOSING, we have already sent a
-     * close_notify so, do not send that again. */
-    if (peer->state != DTLS_STATE_CLOSING) {
-      peer->state = DTLS_STATE_CLOSING;
-      dtls_send_alert(ctx, peer, DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_CLOSE_NOTIFY);
-    } else
-      peer->state = DTLS_STATE_CLOSED;
-    break;
-  default:
-    ;
-  }
-  
-  if (free_peer) {
-    dtls_clear_retransmission(ctx, peer);
-    dtls_destroy_peer(ctx, peer, 0);
-  }
-
-  return free_peer;
-}
-
-static int dtls_alert_send_from_err(dtls_context_t *ctx, dtls_peer_t *peer,
-                                   session_t *session, int err)
-{
-  int level;
-  int desc;
-
-  if (err < -(1 << 8) && err > -(3 << 8)) {
-    level = ((-err) & 0xff00) >> 8;
-    desc = (-err) & 0xff;
-    if (!peer) {
-      peer = dtls_get_peer(ctx, session);
-    }
-    if (peer) {
-      peer->state = DTLS_STATE_CLOSING;
-      return dtls_send_alert(ctx, peer, level, desc);
-    }
-  } else if (err == -1) {
-    if (!peer) {
-      peer = dtls_get_peer(ctx, session);
-    }
-    if (peer) {
-      peer->state = DTLS_STATE_CLOSING;
-      return dtls_send_alert(ctx, peer, DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_INTERNAL_ERROR);
-    }
-  }
-  return -1;
-}
-
-/** 
- * Handles incoming data as DTLS message from given peer.
- */
-int
-dtls_handle_message(dtls_context_t *ctx, 
-                   session_t *session,
-                   uint8 *msg, int msglen) {
-  dtls_peer_t *peer = NULL;
-  unsigned int rlen;           /* record length */
-  uint8 *data;                         /* (decrypted) payload */
-  int data_length;             /* length of decrypted payload 
-                                  (without MAC and padding) */
-  int err;
-
-  /* check if we have DTLS state for addr/port/ifindex */
-  peer = dtls_get_peer(ctx, session);
-
-  if (!peer) {
-    dtls_debug("dtls_handle_message: PEER NOT FOUND\n");
-    dtls_dsrv_log_addr(DTLS_LOG_DEBUG, "peer addr", session);
-  } else {
-    dtls_debug("dtls_handle_message: FOUND PEER\n");
-  }
-
-  while ((rlen = is_record(msg,msglen))) {
-    dtls_peer_type role;
-    dtls_state_t state;
-
-    dtls_debug("got packet %d (%d bytes)\n", msg[0], rlen);
-    if (peer) {
-      data_length = decrypt_verify(peer, msg, rlen, &data);
-      if (data_length < 0) {
-        if (hs_attempt_with_existing_peer(msg, rlen, peer)) {
-          data = msg + DTLS_RH_LENGTH;
-          data_length = rlen - DTLS_RH_LENGTH;
-          state = DTLS_STATE_WAIT_CLIENTHELLO;
-          role = DTLS_SERVER;
-        } else {
-         if (DTLS_CT_HANDSHAKE == msg[0] && DTLS_STATE_WAIT_FINISHED == peer->state) {
-           int err =  dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-           dtls_info("decrypt_verify() failed\n");
-
-           dtls_alert_send_from_err(ctx, peer, &peer->session, err);
-
-           (void)CALL(ctx, event, &peer->session,
-                   DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_HANDSHAKE_FAILURE);
-           peer->state = DTLS_STATE_CLOSED;
-                 /* dtls_clear_retransmission(ctx, peer); */
-           dtls_destroy_peer(ctx, peer, 1);
-           return err;
-         } else {
-           data = msg + DTLS_RH_LENGTH;
-           data_length = rlen - DTLS_RH_LENGTH;
-           role = peer->role;
-           state = peer->state;
-         }
-       }
-      } else {
-       role = peer->role;
-       state = peer->state;
-      }
-    } else {
-      /* is_record() ensures that msg contains at least a record header */
-      data = msg + DTLS_RH_LENGTH;
-      data_length = rlen - DTLS_RH_LENGTH;
-      state = DTLS_STATE_WAIT_CLIENTHELLO;
-      role = DTLS_SERVER;
-    }
-
-    dtls_debug_hexdump("receive header", msg, sizeof(dtls_record_header_t));
-    dtls_debug_hexdump("receive unencrypted", data, data_length);
-
-    /* Handle received record according to the first byte of the
-     * message, i.e. the subprotocol. We currently do not support
-     * combining multiple fragments of one type into a single
-     * record. */
-
-    switch (msg[0]) {
-
-    case DTLS_CT_CHANGE_CIPHER_SPEC:
-      err = handle_ccs(ctx, peer, msg, data, data_length);
-      if (err < 0) {
-       dtls_warn("error while handling ChangeCipherSpec message\n");
-       dtls_alert_send_from_err(ctx, peer, session, err);
-        if (peer) {
-         (void)CALL(ctx, event, &peer->session,
-                DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_HANDSHAKE_FAILURE);
-
-         /* invalidate peer */
-         dtls_clear_retransmission(ctx, peer);
-         dtls_destroy_peer(ctx, peer, 1);
-         peer = NULL;
-        }
-       return err;
-      }
-      break;
-
-    case DTLS_CT_ALERT:
-      if (peer) {
-        dtls_clear_retransmission(ctx, peer);
-      }
-      err = handle_alert(ctx, peer, msg, data, data_length);
-      if (err < 0 || err == 1) {
-         dtls_warn("received alert, peer has been invalidated\n");
-         /* handle alert has invalidated peer */
-         peer = NULL;
-         return err < 0 ?err:-1;
-      }
-      break;
-
-    case DTLS_CT_HANDSHAKE:
-
-      /* Handshake messages other than Finish must use the current
-       * epoch, Finish has epoch + 1. */
-
-      if (peer) {
-
-             /* Handle the client's last flight retransmission when the server's
-              * Finished message is lost. This avoids deadlock. */
-       if (DTLS_SERVER == role && DTLS_STATE_CONNECTED == state) {
-         dtls_start_retransmission(ctx, peer);
-         break;
-       }
-       uint16_t expected_epoch = dtls_security_params(peer)->epoch;
-       uint16_t msg_epoch = 
-         dtls_uint16_to_int(DTLS_RECORD_HEADER(msg)->epoch);
-
-       /* The new security parameters must be used for all messages
-        * that are sent after the ChangeCipherSpec message. This
-        * means that the client's Finished message uses epoch + 1
-        * while the server is still in the old epoch.
-        */
-       if (role == DTLS_SERVER && state == DTLS_STATE_WAIT_FINISHED) {
-         expected_epoch++;
-       }
-
-       if (expected_epoch != msg_epoch) {
-          if (hs_attempt_with_existing_peer(msg, rlen, peer)) {
-            state = DTLS_STATE_WAIT_CLIENTHELLO;
-            role = DTLS_SERVER;
-          } else {
-           dtls_warn("Wrong epoch, expected %i, got: %i\n",
-                   expected_epoch, msg_epoch);
-           break;
-         }
-       }
-      }
-
-      err = handle_handshake(ctx, peer, session, role, state, data, data_length);
-      if (err < 0) {
-       dtls_warn("error while handling handshake packet\n");
-       dtls_alert_send_from_err(ctx, peer, session, err);
-
-      if (peer) {
-        (void)CALL(ctx, event, &peer->session,
-              DTLS_ALERT_LEVEL_FATAL, DTLS_ALERT_HANDSHAKE_FAILURE);
-        dtls_clear_retransmission(ctx, peer);
-        dtls_destroy_peer(ctx, peer, 1);
-      }
-
-       return err;
-      }
-      if (peer && peer->state == DTLS_STATE_CONNECTED) {
-       /* stop retransmissions */
-       dtls_stop_retransmission(ctx, peer);
-       CALL(ctx, event, &peer->session, 0, DTLS_EVENT_CONNECTED);
-      }
-      break;
-
-    case DTLS_CT_APPLICATION_DATA:
-      dtls_info("** application data:\n");
-      if (!peer) {
-        dtls_warn("no peer available, send an alert\n");
-        // TODO: should we send a alert here?
-        return -1;
-      }
-      dtls_clear_retransmission(ctx, peer);
-      CALL(ctx, read, &peer->session, data, data_length);
-      break;
-    default:
-      dtls_info("dropped unknown message of type %d\n",msg[0]);
-    }
-
-    /* advance msg by length of ciphertext */
-    msg += rlen;
-    msglen -= rlen;
-  }
-
-  return 0;
-}
-
-dtls_context_t *
-dtls_new_context(void *app_data) {
-  dtls_context_t *c;
-  dtls_tick_t now;
-#if defined(_WIN32)
-  unsigned int randValue;
-  errno_t err;
-#endif
-#if !defined(WITH_CONTIKI) && !defined(_WIN32)
-  FILE *urandom = fopen("/dev/urandom", "r");
-  unsigned char buf[sizeof(unsigned long)];
-#endif /* WITH_CONTIKI */
-
-  dtls_ticks(&now);
-#ifdef WITH_CONTIKI
-  /* FIXME: need something better to init PRNG here */
-  dtls_prng_init(now);
-#elif defined(_WIN32)
-  err = rand_s(&randValue);
-  if (err != 0)
-  {
-    dtls_emerg("cannot initialize PRNG\n");
-    return NULL;
-  }
-  dtls_prng_init(randValue);
-#else /* WITH_CONTIKI */
-  if (!urandom) {
-    dtls_emerg("cannot initialize PRNG\n");
-    return NULL;
-  }
-
-  if (fread(buf, 1, sizeof(buf), urandom) != sizeof(buf)) {
-    dtls_emerg("cannot initialize PRNG\n");
-    fclose(urandom);
-    return NULL;
-  }
-
-  fclose(urandom);
-  dtls_prng_init((unsigned long)*buf);
-#endif /* WITH_CONTIKI */
-
-  c = malloc_context();
-  if (!c)
-    goto error;
-
-  memset(c, 0, sizeof(dtls_context_t));
-  c->app = app_data;
-  
-  LIST_STRUCT_INIT(c, sendqueue);
-
-#ifdef WITH_CONTIKI
-  LIST_STRUCT_INIT(c, peers);
-  /* LIST_STRUCT_INIT(c, key_store); */
-  
-  process_start(&dtls_retransmit_process, (char *)c);
-  PROCESS_CONTEXT_BEGIN(&dtls_retransmit_process);
-  /* the retransmit timer must be initialized to some large value */
-  etimer_set(&c->retransmit_timer, 0xFFFF);
-  PROCESS_CONTEXT_END(&coap_retransmit_process);
-#endif /* WITH_CONTIKI */
-
-  if (dtls_prng(c->cookie_secret, DTLS_COOKIE_SECRET_LENGTH))
-    c->cookie_secret_age = now;
-  else 
-    goto error;
-  
-  return c;
-
- error:
-  dtls_alert("cannot create DTLS context\n");
-  if (c)
-    dtls_free_context(c);
-  return NULL;
-}
-
-void
-dtls_free_context(dtls_context_t *ctx) {
-  dtls_peer_t *p;
-
-  if (!ctx) {
-    return;
-  }
-
-#ifndef WITH_CONTIKI
-  dtls_peer_t *tmp;
-
-  if (ctx->peers) {
-    HASH_ITER(hh, ctx->peers, p, tmp) {
-      dtls_clear_retransmission(ctx, p);
-      dtls_destroy_peer(ctx, p, 1);
-    }
-  }
-#else /* WITH_CONTIKI */
-  for (p = list_head(ctx->peers); p; p = list_item_next(p))
-    dtls_destroy_peer(ctx, p, 1);
-#endif /* WITH_CONTIKI */
-
-  free_context(ctx);
-}
-
-int
-dtls_connect_peer(dtls_context_t *ctx, dtls_peer_t *peer) {
-  int res;
-
-  assert(peer);
-  if (!peer)
-    return -1;
-
-  /* check if the same peer is already in our list */
-  if (peer == dtls_get_peer(ctx, &peer->session)) {
-    dtls_debug("found peer, try to re-connect\n");
-    return dtls_renegotiate(ctx, &peer->session);
-  }
-    
-  /* set local peer role to client, remote is server */
-  peer->role = DTLS_CLIENT;
-
-  dtls_add_peer(ctx, peer);
-
-  /* send ClientHello with empty Cookie */
-  peer->handshake_params = dtls_handshake_new();
-      if (!peer->handshake_params)
-        return -1;
-
-  peer->handshake_params->hs_state.mseq_r = 0;
-  peer->handshake_params->hs_state.mseq_s = 0;
-  LIST_STRUCT_INIT(peer->handshake_params, reorder_queue);
-  res = dtls_send_client_hello(ctx, peer, NULL, 0);
-  if (res < 0)
-    dtls_warn("cannot send ClientHello\n");
-  else
-    peer->state = DTLS_STATE_CLIENTHELLO;
-
-  return res;
-}
-
-int
-dtls_connect(dtls_context_t *ctx, const session_t *dst) {
-  dtls_peer_t *peer;
-  int res;
-
-  peer = dtls_get_peer(ctx, dst);
-  
-  if (!peer)
-    peer = dtls_new_peer(dst);
-
-  if (!peer) {
-    dtls_crit("cannot create new peer\n");
-    return -1;
-  }
-
-  res = dtls_connect_peer(ctx, peer);
-
-  /* Invoke event callback to indicate connection attempt or
-   * re-negotiation. */
-  if (res > 0) {
-    CALL(ctx, event, &peer->session, 0, DTLS_EVENT_CONNECT);
-  } else if (res == 0) {
-    CALL(ctx, event, &peer->session, 0, DTLS_EVENT_RENEGOTIATE);
-  }
-  
-  return res;
-}
-
-static void
-dtls_retransmit(dtls_context_t *context, netq_t *node) {
-  if (!context || !node)
-    return;
-
-  /* re-initialize timeout when maximum number of retransmissions are not reached yet */
-  if (node->retransmit_cnt < DTLS_DEFAULT_MAX_RETRANSMIT) {
-      unsigned char sendbuf[DTLS_MAX_BUF];
-      size_t len = sizeof(sendbuf);
-      int err;
-      unsigned char *data = node->data;
-      size_t length = node->length;
-      dtls_tick_t now;
-      dtls_security_parameters_t *security = dtls_security_params_epoch(node->peer, node->epoch);
-
-      dtls_ticks(&now);
-      node->retransmit_cnt++;
-      if (node->t == 1) {
-        node->t = 0;
-      } else {
-        node->t = now + (node->timeout << node->retransmit_cnt);
-      }
-      netq_insert_node(context->sendqueue, node);
-      
-      if (node->type == DTLS_CT_HANDSHAKE) {
-       dtls_handshake_header_t *hs_header = DTLS_HANDSHAKE_HEADER(data);
-
-       dtls_debug("** retransmit handshake packet of type: %s (%i)\n",
-                  dtls_handshake_type_to_name(hs_header->msg_type), hs_header->msg_type);
-      } else {
-       dtls_debug("** retransmit packet\n");
-      }
-      
-      err = dtls_prepare_record(node->peer, security, node->type, &data, &length,
-                               1, sendbuf, &len);
-      if (err < 0) {
-       dtls_warn("can not retransmit packet, err: %i\n", err);
-       return;
-      }
-      dtls_debug_hexdump("retransmit header", sendbuf,
-                        sizeof(dtls_record_header_t));
-      dtls_debug_hexdump("retransmit unencrypted", node->data, node->length);
-
-      (void)CALL(context, write, &node->peer->session, sendbuf, len);
-      return;
-  }
-
-  /* no more retransmissions, remove node from system */
-  
-  dtls_debug("** removed transaction\n");
-
-  /* And finally delete the node */
-  netq_node_free(node);
-}
-
-static void
-dtls_stop_retransmission(dtls_context_t *context, dtls_peer_t *peer) {
-  netq_t *node;
-  node = list_head(context->sendqueue); 
-
-  while (node) {
-    if (dtls_session_equals(&node->peer->session, &peer->session)) {
-      node->t = 0;
-    }
-    node = list_item_next(node);
-  }
-}
-
-static void
-dtls_start_retransmission(dtls_context_t *context, dtls_peer_t *peer) {
-  netq_t *node;
-  node = list_head(context->sendqueue);
-
-  while (node) {
-    if (dtls_session_equals(&node->peer->session, &peer->session)) {
-      node->retransmit_cnt = 0;
-      node->t = 1;
-    }
-    node = list_item_next(node);
-  }
-}
-
-static void
-dtls_clear_retransmission(dtls_context_t *context, dtls_peer_t *peer) {
-  netq_t *node;
-  node = list_head(context->sendqueue);
-
-  while (node) {
-    if (dtls_session_equals(&node->peer->session, &peer->session)) {
-      netq_t *tmp = node;
-      node = list_item_next(node);
-      list_remove(context->sendqueue, tmp);
-      netq_node_free(tmp);
-    } else {
-      node = list_item_next(node);
-    }
-  }
-}
-
-void
-dtls_check_retransmit(dtls_context_t *context, clock_time_t *next) {
-  dtls_tick_t now;
-  netq_t *node = netq_head(context->sendqueue);
-
-  dtls_ticks(&now);
-
-  while (node) {
-    if (node->t && node->t <= now){
-      netq_pop_first(context->sendqueue);
-      dtls_retransmit(context, node);
-      node = netq_head(context->sendqueue);
-    } else {
-      node = list_item_next(node);
-    }
-  }
-}
-
-size_t
-dtls_prf_with_current_keyblock(dtls_context_t *ctx, session_t *session,
-                               const uint8_t* label, const uint32_t labellen,
-                               const uint8_t* random1, const uint32_t random1len,
-                               const uint8_t* random2, const uint32_t random2len,
-                               uint8_t* buf, const uint32_t buflen) {
-  dtls_peer_t *peer = NULL;
-  dtls_security_parameters_t *security = NULL;
-  size_t keysize = 0;
-
-  if(!ctx || !session || !label || !buf || labellen == 0 || buflen == 0) {
-    dtls_warn("dtls_prf_with_current_keyblock(): invalid parameter\n");
-    return 0;
-  }
-
-  peer = dtls_get_peer(ctx, session);
-  if (!peer) {
-    dtls_warn("dtls_prf_with_current_keyblock(): cannot find peer\n");
-    return 0;
-  }
-
-  security = dtls_security_params(peer);
-  if (!security) {
-    dtls_crit("dtls_prf_with_current_keyblock(): peer has empty security parameters\n");
-    return 0;
-  }
-
-  /* note that keysize should never be zero as bad things will happen */
-  keysize = dtls_kb_size(security, peer->role);
-  assert(keysize > 0);
-
-  return dtls_prf(security->key_block, keysize,
-                 label, labellen,
-                 random1, random1len,
-                 random2, random2len,
-                 buf, buflen);
-}
-
-#ifdef WITH_CONTIKI
-/*---------------------------------------------------------------------------*/
-/* message retransmission */
-/*---------------------------------------------------------------------------*/
-PROCESS_THREAD(dtls_retransmit_process, ev, data)
-{
-  clock_time_t now;
-  netq_t *node;
-
-  PROCESS_BEGIN();
-
-  dtls_debug("Started DTLS retransmit process\r\n");
-
-  while(1) {
-    PROCESS_YIELD();
-    if (ev == PROCESS_EVENT_TIMER) {
-      if (etimer_expired(&the_dtls_context.retransmit_timer)) {
-       
-       node = list_head(the_dtls_context.sendqueue);
-       
-       now = clock_time();
-       if (node && node->t <= now) {
-         dtls_retransmit(&the_dtls_context, list_pop(the_dtls_context.sendqueue));
-         node = list_head(the_dtls_context.sendqueue);
-       }
-
-       /* need to set timer to some value even if no nextpdu is available */
-       if (node) {
-         etimer_set(&the_dtls_context.retransmit_timer, 
-                    node->t <= now ? 1 : node->t - now);
-       } else {
-         etimer_set(&the_dtls_context.retransmit_timer, 0xFFFF);
-       }
-      } 
-    }
-  }
-  
-  PROCESS_END();
-}
-#endif /* WITH_CONTIKI */
diff --git a/extlibs/tinydtls/dtls.h b/extlibs/tinydtls/dtls.h
deleted file mode 100644 (file)
index 471943f..0000000
+++ /dev/null
@@ -1,909 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file dtls.h
- * @brief High level DTLS API and visible structures. 
- */
-
-#ifndef _DTLS_DTLS_H_
-#define _DTLS_DTLS_H_
-
-#include <stdint.h>
-
-#include "t_list.h"
-#include "state.h"
-#include "peer.h"
-
-#ifndef WITH_CONTIKI
-#include "uthash.h"
-#include "t_list.h"
-#endif /* WITH_CONTIKI */
-
-#include "alert.h"
-#include "crypto.h"
-#include "hmac.h"
-
-#include "global.h"
-#include "dtls_time.h"
-
-#ifndef DTLSv12
-#define DTLS_VERSION 0xfeff    /* DTLS v1.1 */
-#else
-#define DTLS_VERSION 0xfefd    /* DTLS v1.2 */
-#endif
-
-#ifdef DTLS_X509
-#define DTLS_MAX_CERT_SIZE       1400
-#endif
-
-typedef enum dtls_credentials_type_t {
-  DTLS_PSK_HINT, DTLS_PSK_IDENTITY, DTLS_PSK_KEY
-} dtls_credentials_type_t;
-
-typedef struct dtls_ecc_key_t {
-  dtls_ecdh_curve curve;
-  const unsigned char *priv_key;       /** < private key as bytes > */
-  const unsigned char *pub_key_x;      /** < x part of the public key for the given private key > */
-  const unsigned char *pub_key_y;      /** < y part of the public key for the given private key > */
-} dtls_ecc_key_t;
-
-/** Length of the secret that is used for generating Hello Verify cookies. */
-#define DTLS_COOKIE_SECRET_LENGTH 12
-
-struct dtls_context_t;
-
-/**
- * This structure contains callback functions used by tinydtls to
- * communicate with the application. At least the write function must
- * be provided. It is called by the DTLS state machine to send packets
- * over the network. The read function is invoked to deliver decrypted
- * and verfified application data. The third callback is an event
- * handler function that is called when alert messages are encountered
- * or events generated by the library have occured.
- */ 
-typedef struct {
-  /** 
-   * Called from dtls_handle_message() to send DTLS packets over the
-   * network. The callback function must use the network interface
-   * denoted by session->ifindex to send the data.
-   *
-   * @param ctx  The current DTLS context.
-   * @param session The session object, including the address of the
-   *              remote peer where the data shall be sent.
-   * @param buf  The data to send.
-   * @param len  The actual length of @p buf.
-   * @return The callback function must return the number of bytes 
-   *         that were sent, or a value less than zero to indicate an 
-   *         error.
-   */
-  int (*write)(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *buf, size_t len);
-
-  /** 
-   * Called from dtls_handle_message() deliver application data that was 
-   * received on the given session. The data is delivered only after
-   * decryption and verification have succeeded. 
-   *
-   * @param ctx  The current DTLS context.
-   * @param session The session object, including the address of the
-   *              data's origin. 
-   * @param buf  The received data packet.
-   * @param len  The actual length of @p buf.
-   * @return ignored
-   */
-  int (*read)(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *buf, size_t len);
-
-  /**
-   * The event handler is called when a message from the alert
-   * protocol is received or the state of the DTLS session changes.
-   *
-   * @param ctx     The current dtls context.
-   * @param session The session object that was affected.
-   * @param level   The alert level or @c 0 when an event ocurred that 
-   *                is not an alert. 
-   * @param code    Values less than @c 256 indicate alerts, while
-   *                @c 256 or greater indicate internal DTLS session changes.
-   * @return ignored
-   */
-  int (*event)(struct dtls_context_t *ctx, session_t *session, 
-               dtls_alert_level_t level, unsigned short code);
-
-#ifdef DTLS_PSK
-  /**
-   * Called during handshake to get information related to the
-   * psk key exchange. The type of information requested is
-   * indicated by @p type which will be one of DTLS_PSK_HINT,
-   * DTLS_PSK_IDENTITY, or DTLS_PSK_KEY. The called function
-   * must store the requested item in the buffer @p result of
-   * size @p result_length. On success, the function must return
-   * the actual number of bytes written to @p result, of a
-   * value less than zero on error. The parameter @p desc may
-   * contain additional request information (e.g. the psk_identity
-   * for which a key is requested when @p type == @c DTLS_PSK_KEY.
-   *
-   * @param ctx     The current dtls context.
-   * @param session The session where the key will be used.
-   * @param type    The type of the requested information.
-   * @param desc    Additional request information
-   * @param desc_len The actual length of desc.
-   * @param result  Must be filled with the requested information.
-   * @param result_length  Maximum size of @p result.
-   * @return The number of bytes written to @p result or a value
-   *         less than zero on error.
-   */
-  int (*get_psk_info)(struct dtls_context_t *ctx,
-                     const session_t *session,
-                     dtls_credentials_type_t type,
-                     const unsigned char *desc, size_t desc_len,
-                     unsigned char *result, size_t result_length);
-
-#endif /* DTLS_PSK */
-
-#ifdef DTLS_ECC
-  /**
-   * Called during handshake to get the server's or client's ecdsa
-   * key used to authenticate this server or client in this 
-   * session. If found, the key must be stored in @p result and 
-   * the return value must be @c 0. If not found, @p result is 
-   * undefined and the return value must be less than zero.
-   *
-   * If ECDSA should not be supported, set this pointer to NULL.
-   *
-   * Implement this if you want to provide your own certificate to 
-   * the other peer. This is mandatory for a server providing ECDSA
-   * support and optional for a client. A client doing DTLS client
-   * authentication has to implementing this callback.
-   *
-   * @param ctx     The current dtls context.
-   * @param session The session where the key will be used.
-   * @param result  Must be set to the key object to used for the given
-   *                session.
-   * @return @c 0 if result is set, or less than zero on error.
-   */
-  int (*get_ecdsa_key)(struct dtls_context_t *ctx,
-                      const session_t *session,
-                      const dtls_ecc_key_t **result);
-
-
-  /**
-   * Called during handshake to check the peer's pubic key in this
-   * session. If the public key matches the session and should be
-   * considered valid the return value must be @c 0. If not valid,
-   * the return value must be less than zero.
-   *
-   * If ECDSA should not be supported, set this pointer to NULL.
-   *
-   * Implement this if you want to verify the other peers public key.
-   * This is mandatory for a DTLS client doing based ECDSA
-   * authentication. A server implementing this will request the
-   * client to do DTLS client authentication.
-   *
-   * @param ctx          The current dtls context.
-   * @param session      The session where the key will be used.
-   * @param other_pub_x  x component of the public key.
-   * @param other_pub_y  y component of the public key.
-   * @return @c 0 if public key matches, or less than zero on error.
-   * error codes:
-   *   return dtls_alert_fatal_create(DTLS_ALERT_BAD_CERTIFICATE);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_UNSUPPORTED_CERTIFICATE);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_REVOKED);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_EXPIRED);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_UNKNOWN);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_UNKNOWN_CA);
-   */
-  int (*verify_ecdsa_key)(struct dtls_context_t *ctx,
-                         const session_t *session,
-                         const unsigned char *other_pub_x,
-                         const unsigned char *other_pub_y,
-                         size_t key_size);
-#endif /* DTLS_ECC */
-#ifdef DTLS_X509
-  /**
-   * Called during handshake to get the server's or client's ecdsa
-   * key used to authenticate this server or client in this
-   * session. If found, the key must be stored in @p result and
-   * the return value must be @c 0. If not found, @p result is
-   * undefined and the return value must be less than zero.
-   *
-   * If ECDSA should not be supported, set this pointer to NULL.
-   *
-   * Implement this if you want to provide your own certificate to
-   * the other peer. This is mandatory for a server providing X.509
-   * support and optional for a client. A client doing DTLS client
-   * authentication has to implementing this callback.
-   *
-   * @param ctx     The current dtls context.
-   * @param session The session where the key will be used.
-   * @param result  Must be set to the key object to used for the given
-   *                session.
-   * @return @c 0 if result is set, or less than zero on error.
-   */
-  int (*get_x509_key)(struct dtls_context_t *ctx,
-               const session_t *session,
-               const dtls_ecc_key_t **result);
-  /**
-   * Called during handshake to get the server's or client's
-   * certificate used to authenticate this server or client in this
-   * session. If found, the certificate must be stored in @p cert and
-   * the return value must be @c 0. If not found, @p cert is
-   * undefined and the return value must be less than zero.
-   *
-   * If X.509 should not be supported, set this pointer to NULL.
-   *
-   * Implement this if you want to provide your own certificate to
-   * the other peer. This is mandatory for a server providing X.509
-   * support and optional for a client. A client doing DTLS client
-   * authentication has to implementing this callback.
-   *
-   * @param ctx       The current dtls context.
-   * @param session   The session where the certificate will be used.
-   * @param cert      Must be set to the certificate object to used for
-   *                  the given session.
-   * @param cert_size Size of certificate in bytes.
-   * @return @c 0 if result is set, or less than zero on error.
-   */
-  int (*get_x509_cert)(struct dtls_context_t *ctx,
-                       const session_t *session,
-                       const unsigned char **cert,
-                       size_t *cert_size);
-
-  /**
-   * Called during handshake to check the peer's certificate in this
-   * session. If the certificate matches the session and is valid the
-   * return value must be @c 0. If not valid, the return value must be
-   * less than zero.
-   *
-   * If X.509 should not be supported, set this pointer to NULL.
-   *
-   * Implement this if you want to verify the other peers certificate.
-   * This is mandatory for a DTLS client doing based X.509
-   * authentication. A server implementing this will request the
-   * client to do DTLS client authentication.
-   *
-   * @param ctx       The current dtls context.
-   * @param session   The session where the key will be used.
-   * @param cert      Peer's certificate to check.
-   * @param cert_size Size of certificate in bytes.
-   * @param x         Allocated memory to store peer's public key part x.
-   * @param x_size    Size of allocated memory to store peer's public key part x.
-   * @param y         Allocated memory to store peer's public key part y.
-   * @param y_size    Size of allocated memory to store peer's public key part y.
-   * @return @c 0 if public key matches, or less than zero on error.
-   * error codes:
-   *   return dtls_alert_fatal_create(DTLS_ALERT_BAD_CERTIFICATE);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_UNSUPPORTED_CERTIFICATE);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_REVOKED);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_EXPIRED);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_CERTIFICATE_UNKNOWN);
-   *   return dtls_alert_fatal_create(DTLS_ALERT_UNKNOWN_CA);
-   */
-  int (*verify_x509_cert)(struct dtls_context_t *ctx,
-                          const session_t *session,
-                          const unsigned char *cert,
-                          size_t cert_size,
-               unsigned char *x,
-                          size_t x_size,
-               unsigned char *y,
-                          size_t y_size);
-
-  /**
-   * Called during handshake to check if certificate format should be X.509
-   *
-   * If X.509 should not be supported, set this pointer to NULL.
-   *
-   * @param ctx       The current dtls context.
-   * @return @c 0 if certificate format should be X.509, or less than zero on error.
-   */
-  int (*is_x509_active)(struct dtls_context_t *ctx);
-#endif /* DTLS_X509 */
-
-} dtls_handler_t;
-
-/** Holds global information of the DTLS engine. */
-typedef struct dtls_context_t {
-  unsigned char cookie_secret[DTLS_COOKIE_SECRET_LENGTH];
-  clock_time_t cookie_secret_age; /**< the time the secret has been generated */
-
-#ifndef WITH_CONTIKI
-  dtls_peer_t *peers;          /**< peer hash map */
-#else /* WITH_CONTIKI */
-  LIST_STRUCT(peers);
-
-  struct etimer retransmit_timer; /**< fires when the next packet must be sent */
-#endif /* WITH_CONTIKI */
-
-  LIST_STRUCT(sendqueue);      /**< the packets to send */
-
-  void *app;                   /**< application-specific data */
-
-  dtls_handler_t *h;           /**< callback handlers */
-
-  dtls_cipher_enable_t is_anon_ecdh_eabled;    /**< enable/disable the TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 */
-
-  dtls_cipher_t selected_cipher; /**< selected ciper suite for handshake */
-
-  unsigned char readbuf[DTLS_MAX_BUF];
-} dtls_context_t;
-
-/** 
- * This function initializes the tinyDTLS memory management and must
- * be called first.
- */
-void dtls_init();
-
-/** 
- * Creates a new context object. The storage allocated for the new
- * object must be released with dtls_free_context(). */
-dtls_context_t *dtls_new_context(void *app_data);
-
-/** Releases any storage that has been allocated for \p ctx. */
-void dtls_free_context(dtls_context_t *ctx);
-
-#define dtls_set_app_data(CTX,DATA) ((CTX)->app = (DATA))
-#define dtls_get_app_data(CTX) ((CTX)->app)
-
-/** Sets the callback handler object for @p ctx to @p h. */
-INLINE_API void dtls_set_handler(dtls_context_t *ctx, dtls_handler_t *h) {
-  ctx->h = h;
-}
-
- /**
-  * @brief Enabling the TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256
-  *
-  * @param ctx              The DTLS context to use.
-  * @param is_enable    DTLS_CIPHER_ENABLE(1) or DTLS_CIPHER_DISABLE(0)
-  */
-void dtls_enables_anon_ecdh(dtls_context_t* ctx, dtls_cipher_enable_t is_enable);
-
-/**
- * @brief Select the cipher suite for handshake
- *
- * @param ctx              The DTLS context to use.
- * @param cipher         TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 (0xC018)
- *                                  TLS_PSK_WITH_AES_128_CCM_8 (0xX0A8)
- *                                  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 (0xC0AE)
- */
-void dtls_select_cipher(dtls_context_t* ctx, const dtls_cipher_t cipher);
-
-/**
- * Establishes a DTLS channel with the specified remote peer @p dst.
- * This function returns @c 0 if that channel already exists, a value
- * greater than zero when a new ClientHello message was sent, and
- * a value less than zero on error.
- *
- * @param ctx    The DTLS context to use.
- * @param dst    The remote party to connect to.
- * @return A value less than zero on error, greater or equal otherwise.
- */
-int dtls_connect(dtls_context_t *ctx, const session_t *dst);
-
-/**
- * Establishes a DTLS channel with the specified remote peer.
- * This function returns @c 0 if that channel already exists, a value
- * greater than zero when a new ClientHello message was sent, and
- * a value less than zero on error.
- *
- * @param ctx    The DTLS context to use.
- * @param peer   The peer object that describes the session.
- * @return A value less than zero on error, greater or equal otherwise.
- */
-int dtls_connect_peer(dtls_context_t *ctx, dtls_peer_t *peer);
-
-/**
- * Closes the DTLS connection associated with @p remote. This function
- * returns zero on success, and a value less than zero on error.
- */
-int dtls_close(dtls_context_t *ctx, const session_t *remote);
-
-int dtls_renegotiate(dtls_context_t *ctx, const session_t *dst);
-
-/** 
- * Writes the application data given in @p buf to the peer specified
- * by @p session. 
- * 
- * @param ctx      The DTLS context to use.
- * @param session  The remote transport address and local interface.
- * @param buf      The data to write.
- * @param len      The actual length of @p data.
- * 
- * @return The number of bytes written or @c -1 on error.
- */
-int dtls_write(struct dtls_context_t *ctx, session_t *session, 
-              uint8 *buf, size_t len);
-
-/**
- * Checks sendqueue of given DTLS context object for any outstanding
- * packets to be transmitted. 
- *
- * @param context The DTLS context object to use.
- * @param next    If not NULL, @p next is filled with the timestamp
- *  of the next scheduled retransmission, or @c 0 when no packets are
- *  waiting.
- */
-void dtls_check_retransmit(dtls_context_t *context, clock_time_t *next);
-
-#define DTLS_COOKIE_LENGTH 16
-
-#define DTLS_CT_CHANGE_CIPHER_SPEC 20
-#define DTLS_CT_ALERT              21
-#define DTLS_CT_HANDSHAKE          22
-#define DTLS_CT_APPLICATION_DATA   23
-
-#if defined(_MSC_VER)
-#define PACKED_STRUCT_START __pragma(pack(push,1)); typedef struct
-#define PACKED_STRUCT_END   __pragma(pack(pop))
-#else
-#define PACKED_STRUCT_START typedef struct __attribute__((__packed__))
-#define PACKED_STRUCT_END
-#endif
-
-/** Generic header structure of the DTLS record layer. */
-PACKED_STRUCT_START {
-  uint8 content_type;          /**< content type of the included message */
-  uint16 version;              /**< Protocol version */
-  uint16 epoch;                        /**< counter for cipher state changes */
-  uint48 sequence_number;       /**< sequence number */
-  uint16 length;               /**< length of the following fragment */
-  /* fragment */
-} dtls_record_header_t;
-PACKED_STRUCT_END;
-
-/* Handshake types */
-
-#define DTLS_HT_HELLO_REQUEST        0
-#define DTLS_HT_CLIENT_HELLO         1
-#define DTLS_HT_SERVER_HELLO         2
-#define DTLS_HT_HELLO_VERIFY_REQUEST 3
-#define DTLS_HT_CERTIFICATE         11
-#define DTLS_HT_SERVER_KEY_EXCHANGE 12
-#define DTLS_HT_CERTIFICATE_REQUEST 13
-#define DTLS_HT_SERVER_HELLO_DONE   14
-#define DTLS_HT_CERTIFICATE_VERIFY  15
-#define DTLS_HT_CLIENT_KEY_EXCHANGE 16
-#define DTLS_HT_FINISHED            20
-
-/** Header structure for the DTLS handshake protocol. */
-PACKED_STRUCT_START {
-  uint8 msg_type; /**< Type of handshake message  (one of DTLS_HT_) */
-  uint24 length;  /**< length of this message */
-  uint16 message_seq;  /**< Message sequence number */
-  uint24 fragment_offset;      /**< Fragment offset. */
-  uint24 fragment_length;      /**< Fragment length. */
-  /* body */
-} dtls_handshake_header_t;
-PACKED_STRUCT_END;
-
-/** Structure of the Client Hello message. */
-PACKED_STRUCT_START {
-  uint16 version;        /**< Client version */
-  uint32 gmt_random;     /**< GMT time of the random byte creation */
-  unsigned char random[28];    /**< Client random bytes */
-  /* session id (up to 32 bytes) */
-  /* cookie (up to 32 bytes) */
-  /* cipher suite (2 to 2^16 -1 bytes) */
-  /* compression method */
-} dtls_client_hello_t;
-PACKED_STRUCT_END;
-
-/** Structure of the Hello Verify Request. */
-PACKED_STRUCT_START {
-  uint16 version;              /**< Server version */
-  uint8 cookie_length; /**< Length of the included cookie */
-  uint8 cookie[];              /**< up to 32 bytes making up the cookie */
-} dtls_hello_verify_t;  
-PACKED_STRUCT_END;
-
-#if 0
-/** 
- * Checks a received DTLS record for consistency and eventually decrypt,
- * verify, decompress and reassemble the contained fragment for 
- * delivery to high-lever clients. 
- * 
- * \param state The DTLS record state for the current session. 
- * \param 
- */
-int dtls_record_read(dtls_state_t *state, uint8 *msg, int msglen);
-#endif
-
-/** 
- * Handles incoming data as DTLS message from given peer.
- *
- * @param ctx     The dtls context to use.
- * @param session The current session
- * @param msg     The received data
- * @param msglen  The actual length of @p msg.
- * @return A value less than zero on error, zero on success.
- */
-int dtls_handle_message(dtls_context_t *ctx, session_t *session,
-                       uint8 *msg, int msglen);
-
-/**
- * Check if @p session is associated with a peer object in @p context.
- * This function returns a pointer to the peer if found, NULL otherwise.
- *
- * @param context  The DTLS context to search.
- * @param session  The remote address and local interface
- * @return A pointer to the peer associated with @p session or NULL if
- *  none exists.
- */
-dtls_peer_t *dtls_get_peer(const dtls_context_t *context,
-                          const session_t *session);
-
-/**
-* Invokes the DTLS PRF using the current key block for @p session as
-* key and @p label + @p random1 + @p random2 as its input. This function
-* writes upto @p buflen bytes into the given output buffer @p buf.
-*
-* @param ctx The dtls context to use.
-* @param session The session whose key shall be used.
-* @param label A PRF label.
-* @param labellen Actual length of @p label.
-* @param random1 Random seed.
-* @param random1len Actual length of @p random1 (may be zero).
-* @param random2 Random seed.
-* @param random2len Actual length of @p random2 (may be zero).
-* @param buf Output buffer for generated random data.
-* @param buflen Maximum size of @p buf.
-*
-* @return The actual number of bytes written to @p buf or @c 0 on error.
-*/
-size_t dtls_prf_with_current_keyblock(dtls_context_t *ctx, session_t *session,
-                                      const uint8_t* label, const uint32_t labellen,
-                                      const uint8_t* random1, const uint32_t random1len,
-                                      const uint8_t* random2, const uint32_t random2len,
-                                      uint8_t* buf, const uint32_t buflen);
-
-
-#endif /* _DTLS_DTLS_H_ */
-
-/**
- * @mainpage 
- *
- * @author Olaf Bergmann, TZI Uni Bremen
- *
- * This library provides a very simple datagram server with DTLS
- * support. It is designed to support session multiplexing in
- * single-threaded applications and thus targets specifically on
- * embedded systems.
- *
- * @section license License
- *
- * This software is under the <a 
- * href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.
- * 
- * @subsection uthash UTHash
- *
- * This library uses <a href="http://uthash.sourceforge.net/">uthash</a> to manage
- * its peers (not used for Contiki). @b uthash uses the <b>BSD revised license</b>, see
- * <a href="http://uthash.sourceforge.net/license.html">http://uthash.sourceforge.net/license.html</a>.
- *
- * @subsection sha256 Aaron D. Gifford's SHA256 Implementation
- *
- * tinyDTLS provides HMAC-SHA256 with BSD-licensed code from Aaron D. Gifford, 
- * see <a href="http://www.aarongifford.com/">www.aarongifford.com</a>.
- *
- * @subsection aes Rijndael Implementation From OpenBSD
- *
- * The AES implementation is taken from rijndael.{c,h} contained in the crypto 
- * sub-system of the OpenBSD operating system. It is copyright by Vincent Rijmen, *
- * Antoon Bosselaers and Paulo Barreto. See <a 
- * href="http://www.openbsd.org/cgi-bin/cvsweb/src/sys/crypto/rijndael.c">rijndael.c</a> 
- * for License info.
- *
- * @section download Getting the Files
- *
- * You can get the sources either from the <a 
- * href="http://sourceforge.net/projects/tinydtls/files">downloads</a> section or 
- * through git from the <a 
- * href="http://sourceforge.net/projects/tinydtls/develop">project develop page</a>.
- *
- * @section config Configuration
- *
- * Use @c configure to set up everything for a successful build. For Contiki, use the
- * option @c --with-contiki.
- *
- * @section build Building
- *
- * After configuration, just type 
- * @code
-make
- * @endcode
- * optionally followed by
- * @code
-make install
- * @endcode
- * The Contiki version is integrated with the Contiki build system, hence you do not
- * need to invoke @c make explicitely. Just add @c tinydtls to the variable @c APPS
- * in your @c Makefile.
- *
- * @addtogroup dtls_usage DTLS Usage
- *
- * @section dtls_server_example DTLS Server Example
- *
- * This section shows how to use the DTLS library functions to setup a 
- * simple secure UDP echo server. The application is responsible for the
- * entire network communication and thus will look like a usual UDP
- * server with socket creation and binding and a typical select-loop as
- * shown below. The minimum configuration required for DTLS is the 
- * creation of the dtls_context_t using dtls_new_context(), and a callback
- * for sending data. Received packets are read by the application and
- * passed to dtls_handle_message() as shown in @ref dtls_read_cb. 
- * For any useful communication to happen, read and write call backs 
- * and a key management function should be registered as well. 
- * 
- * @code 
- dtls_context_t *the_context = NULL;
- int fd, result;
-
- static dtls_handler_t cb = {
-   .write = send_to_peer,
-   .read  = read_from_peer,
-   .event = NULL,
-   .get_psk_key = get_psk_key
- };
-
- fd = socket(...);
- if (fd < 0 || bind(fd, ...) < 0)
-   exit(-1);
-
- the_context = dtls_new_context(&fd);
- dtls_set_handler(the_context, &cb);
-
- while (1) {
-   ...initialize fd_set rfds and timeout ...
-   result = select(fd+1, &rfds, NULL, 0, NULL);
-    
-   if (FD_ISSET(fd, &rfds))
-     dtls_handle_read(the_context);
- }
-
- dtls_free_context(the_context);
- * @endcode
- * 
- * @subsection dtls_read_cb The Read Callback
- *
- * The DTLS library expects received raw data to be passed to
- * dtls_handle_message(). The application is responsible for
- * filling a session_t structure with the address data of the
- * remote peer as illustrated by the following example:
- * 
- * @code
-int dtls_handle_read(struct dtls_context_t *ctx) {
-  int *fd;
-  session_t session;
-  static uint8 buf[DTLS_MAX_BUF];
-  int len;
-
-  fd = dtls_get_app_data(ctx);
-
-  assert(fd);
-
-  session.size = sizeof(session.addr);
-  len = recvfrom(*fd, buf, sizeof(buf), 0, &session.addr.sa, &session.size);
-  
-  return len < 0 ? len : dtls_handle_message(ctx, &session, buf, len);
-}    
- * @endcode 
- * 
- * Once a new DTLS session was established and DTLS ApplicationData has been
- * received, the DTLS server invokes the read callback with the MAC-verified 
- * cleartext data as its argument. A read callback for a simple echo server
- * could look like this:
- * @code
-int read_from_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) {
-  return dtls_write(ctx, session, data, len);
-}
- * @endcode 
- * 
- * @subsection dtls_send_cb The Send Callback
- * 
- * The callback function send_to_peer() is called whenever data must be
- * sent over the network. Here, the sendto() system call is used to
- * transmit data within the given session. The socket descriptor required
- * by sendto() has been registered as application data when the DTLS context
- * was created with dtls_new_context().
- * Note that it is on the application to buffer the data when it cannot be
- * sent at the time this callback is invoked. The following example thus
- * is incomplete as it would have to deal with EAGAIN somehow.
- * @code
-int send_to_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) {
-  int fd = *(int *)dtls_get_app_data(ctx);
-  return sendto(fd, data, len, MSG_DONTWAIT, &session->addr.sa, session->size);
-}
- * @endcode
- * 
- * @subsection dtls_get_psk_info The Key Storage
- *
- * When a new DTLS session is created, the library must ask the application
- * for keying material. To do so, it invokes the registered call-back function
- * get_psk_info() with the current context and session information as parameter.
- * When the call-back function is invoked with the parameter @p type set to 
- * @c DTLS_PSK_IDENTITY, the result parameter @p result must be filled with
- * the psk_identity_hint in case of a server, or the actual psk_identity in 
- * case of a client. When @p type is @c DTLS_PSK_KEY, the result parameter
- * must be filled with a key for the given identity @p id. The function must
- * return the number of bytes written to @p result which must not exceed
- * @p result_length.
- * In case of an error, the function must return a negative value that 
- * corresponds to a valid error code defined in alert.h.
- * 
- * @code
-int get_psk_info(struct dtls_context_t *ctx UNUSED_PARAM,
-           const session_t *session UNUSED_PARAM,
-           dtls_credentials_type_t type,
-           const unsigned char *id, size_t id_len,
-           unsigned char *result, size_t result_length) {
-
-  switch (type) {
-  case DTLS_PSK_IDENTITY:
-    if (result_length < psk_id_length) {
-      dtls_warn("cannot set psk_identity -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_id, psk_id_length);
-    return psk_id_length;
-  case DTLS_PSK_KEY:
-    if (id_len != psk_id_length || memcmp(psk_id, id, id_len) != 0) {
-      dtls_warn("PSK for unknown id requested, exiting\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_ILLEGAL_PARAMETER);
-    } else if (result_length < psk_key_length) {
-      dtls_warn("cannot set psk -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_key, psk_key_length);
-    return psk_key_length;
-  default:
-    dtls_warn("unsupported request type: %d\n", type);
-  }
-
-  return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-}
- * @endcode
- * 
- * @subsection dtls_events The Event Notifier
- *
- * Applications that want to be notified whenever the status of a DTLS session
- * has changed can register an event handling function with the field @c event
- * in the dtls_handler_t structure (see \ref dtls_server_example). The call-back
- * function is called for alert messages and internal state changes. For alert
- * messages, the argument @p level will be set to a value greater than zero, and
- * @p code will indicate the notification code. For internal events, @p level
- * is @c 0, and @p code a value greater than @c 255. 
- *
- * Internal events are DTLS_EVENT_CONNECTED, @c DTLS_EVENT_CONNECT, and
- * @c DTLS_EVENT_RENEGOTIATE.
- *
- * @code
-int handle_event(struct dtls_context_t *ctx, session_t *session, 
-                 dtls_alert_level_t level, unsigned short code) {
-  ... do something with event ...
-  return 0;
-}
- * @endcode
- *
- * @section dtls_client_example DTLS Client Example
- *
- * A DTLS client is constructed like a server but needs to actively setup
- * a new session by calling dtls_connect() at some point. As this function
- * usually returns before the new DTLS channel is established, the application
- * must register an event handler and wait for @c DTLS_EVENT_CONNECT before
- * it can send data over the DTLS channel.
- *
- */
-
-/**
- * @addtogroup contiki Contiki
- *
- * To use tinyDTLS as Contiki application, place the source code in the directory 
- * @c apps/tinydtls in the Contiki source tree and invoke configure with the option
- * @c --with-contiki. This will define WITH_CONTIKI in tinydtls.h and include 
- * @c Makefile.contiki in the main Makefile. To cross-compile for another platform
- * you will need to set your host and build system accordingly. For example,
- * when configuring for ARM, you would invoke
- * @code
-./configure --with-contiki --build=x86_64-linux-gnu --host=arm-none-eabi 
- * @endcode
- * on an x86_64 linux host.
- *
- * Then, create a Contiki project with @c APPS += tinydtls in its Makefile. A sample
- * server could look like this (with read_from_peer() and get_psk_key() as shown above).
- *
- * @code
-#include "contiki.h"
-
-#include "tinydtls.h"
-#include "dtls.h"
-
-#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define UIP_UDP_BUF  ((struct uip_udp_hdr *)&uip_buf[UIP_LLIPH_LEN])
-
-int send_to_peer(struct dtls_context_t *, session_t *, uint8 *, size_t);
-
-static struct uip_udp_conn *server_conn;
-static dtls_context_t *dtls_context;
-
-static dtls_handler_t cb = {
-  .write = send_to_peer,
-  .read  = read_from_peer,
-  .event = NULL,
-  .get_psk_key = get_psk_key
-};
-
-PROCESS(server_process, "DTLS server process");
-AUTOSTART_PROCESSES(&server_process);
-
-PROCESS_THREAD(server_process, ev, data)
-{
-  PROCESS_BEGIN();
-
-  dtls_init();
-
-  server_conn = udp_new(NULL, 0, NULL);
-  udp_bind(server_conn, UIP_HTONS(5684));
-
-  dtls_context = dtls_new_context(server_conn);
-  if (!dtls_context) {
-    dtls_emerg("cannot create context\n");
-    PROCESS_EXIT();
-  }
-
-  dtls_set_handler(dtls_context, &cb);
-
-  while(1) {
-    PROCESS_WAIT_EVENT();
-    if(ev == tcpip_event && uip_newdata()) {
-      session_t session;
-
-      uip_ipaddr_copy(&session.addr, &UIP_IP_BUF->srcipaddr);
-      session.port = UIP_UDP_BUF->srcport;
-      session.size = sizeof(session.addr) + sizeof(session.port);
-    
-      dtls_handle_message(ctx, &session, uip_appdata, uip_datalen());
-    }
-  }
-
-  PROCESS_END();
-}
-
-int send_to_peer(struct dtls_context_t *ctx, session_t *session, uint8 *data, size_t len) {
-  struct uip_udp_conn *conn = (struct uip_udp_conn *)dtls_get_app_data(ctx);
-
-  uip_ipaddr_copy(&conn->ripaddr, &session->addr);
-  conn->rport = session->port;
-
-  uip_udp_packet_send(conn, data, len);
-
-  memset(&conn->ripaddr, 0, sizeof(server_conn->ripaddr));
-  memset(&conn->rport, 0, sizeof(conn->rport));
-
-  return len;
-}
- * @endcode
- */
diff --git a/extlibs/tinydtls/dtls_config.h b/extlibs/tinydtls/dtls_config.h
deleted file mode 100644 (file)
index 5e0103a..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/* dtls_config.h.  Generated from dtls_config.h.in by configure.  */
-/* tinydtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file dtls_config.h
- * @brief internal configuration for tinydtls library
- *
- * This file has been generated by configure from dtls_config.h.in.
- */
-
-/* dummy definitions for PACKAGE_NAME and PACKAGE_VERSION */
-#define PACKAGE_NAME "tinydtls"
-#define PACKAGE_STRING "tinydtls 0.8.1"
-#define PACKAGE_VERSION "0.8.1"
-
-#ifdef CONTIKI
-#include "contiki.h"
-#include "contiki-lib.h"
-#include "contiki-net.h"
-
-#include "contiki-conf.h"
-
-/* global constants for constrained devices running Contiki */
-#ifndef DTLS_PEER_MAX
-/** The maximum number DTLS peers (i.e. sessions). */
-#  define DTLS_PEER_MAX 1
-#endif
-
-#ifndef DTLS_HANDSHAKE_MAX
-/** The maximum number of concurrent DTLS handshakes. */
-#  define DTLS_HANDSHAKE_MAX 1
-#endif
-
-#ifndef DTLS_SECURITY_MAX
-/** The maximum number of concurrently used cipher keys */
-#  define DTLS_SECURITY_MAX (DTLS_PEER_MAX + DTLS_HANDSHAKE_MAX)
-#endif
-
-#ifndef DTLS_HASH_MAX
-/** The maximum number of hash functions that can be used in parallel. */
-#  define DTLS_HASH_MAX (3 * DTLS_PEER_MAX)
-#endif
-#endif /* CONTIKI */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define to 1 if building with X.509 support */
-#define DTLS_X509 1
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#ifndef _WIN32
-#define HAVE_ARPA_INET_H 1
-#endif
-
-/* Define to 1 if you have the <assert.h> header file. */
-#define HAVE_ASSERT_H 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `fls' function. */
-/* #undef HAVE_FLS */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset' function. */
-#define HAVE_MEMSET 1
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#ifndef _WIN32
-#define HAVE_NETDB_H 1
-#endif
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#ifndef _WIN32
-#define HAVE_NETINET_IN_H 1
-#endif
-
-/* Define to 1 if you have the `select' function. */
-#define HAVE_SELECT 1
-
-/* Define to 1 if struct sockaddr_in6 has a member sin6_len. */
-/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
-
-/* Define to 1 if you have the `socket' function. */
-#define HAVE_SOCKET 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strnlen' function. */
-#define HAVE_STRNLEN 1
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#ifndef _WIN32
-#define HAVE_SYS_SOCKET_H 1
-#endif
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#ifndef _WIN32
-#define HAVE_SYS_TIME_H 1
-#endif
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `vprintf' function. */
-#define HAVE_VPRINTF 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "tinydtls"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "tinydtls 0.8.1"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "tinydtls"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.8.1"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-
-/* #undef size_t */
-#if defined(_MSC_VER) && (_MSC_VER < 1900)
-#define ssize_t SSIZE_T
-#define snprintf vs12_snprintf
-#endif
-#if defined(_WIN32)
-#define MSG_DONTWAIT 0
-#define HAVE_WINSOCK2_H 1
-#define HAVE_WS2TCPIP_H 1
-#endif
-
-/************************************************************************/
-/* Specific Contiki platforms                                           */
-/************************************************************************/
-
-#ifdef CONTIKI
-
-#if CONTIKI_TARGET_ECONOTAG
-#  include "platform-specific/config-econotag.h"
-#endif /* CONTIKI_TARGET_ECONOTAG */
-
-#ifdef CONTIKI_TARGET_CC2538DK
-#  include "platform-specific/config-cc2538dk.h"
-#endif /* CONTIKI_TARGET_CC2538DK */
-
-#ifdef CONTIKI_TARGET_WISMOTE
-#  include "platform-specific/config-wismote.h"
-#endif /* CONTIKI_TARGET_WISMOTE */
-
-#ifdef CONTIKI_TARGET_SKY
-#  include "platform-specific/config-sky.h"
-#endif /* CONTIKI_TARGET_SKY */
-
-#ifdef CONTIKI_TARGET_MINIMAL_NET
-#  include "platform-specific/config-minimal-net.h"
-#endif /* CONTIKI_TARGET_MINIMAL_NET */
-
-#endif /* CONTIKI */
diff --git a/extlibs/tinydtls/dtls_config.h.in b/extlibs/tinydtls/dtls_config.h.in
deleted file mode 100644 (file)
index adc8dc5..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/* tinydtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file dtls_config.h
- * @brief internal configuration for tinydtls library
- *
- * This file has been generated by configure from dtls_config.h.in.
- */
-
-/* dummy definitions for PACKAGE_NAME and PACKAGE_VERSION */
-#define PACKAGE_NAME "tinydtls"
-#define PACKAGE_STRING PACKAGE_NAME
-#define PACKAGE_VERSION PACKAGE_VERSION
-
-#ifdef CONTIKI
-#include "contiki.h"
-#include "contiki-lib.h"
-#include "contiki-net.h"
-
-#include "contiki-conf.h"
-
-/* global constants for constrained devices running Contiki */
-#ifndef DTLS_PEER_MAX
-/** The maximum number DTLS peers (i.e. sessions). */
-#  define DTLS_PEER_MAX 1
-#endif
-
-#ifndef DTLS_HANDSHAKE_MAX
-/** The maximum number of concurrent DTLS handshakes. */
-#  define DTLS_HANDSHAKE_MAX 1
-#endif
-
-#ifndef DTLS_SECURITY_MAX
-/** The maximum number of concurrently used cipher keys */
-#  define DTLS_SECURITY_MAX (DTLS_PEER_MAX + DTLS_HANDSHAKE_MAX)
-#endif
-
-#ifndef DTLS_HASH_MAX
-/** The maximum number of hash functions that can be used in parallel. */
-#  define DTLS_HASH_MAX (3 * DTLS_PEER_MAX)
-#endif
-#endif /* CONTIKI */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define to 1 if building with X.509 support */
-#undef DTLS_X509
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fls' function. */
-#undef HAVE_FLS
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if struct sockaddr_in6 has a member sin6_len. */
-#undef HAVE_SOCKADDR_IN6_SIN6_LEN
-
-/* Define to 1 if you have the `socket' function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strnlen' function. */
-#undef HAVE_STRNLEN
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-
-#undef size_t
-
-/************************************************************************/
-/* Specific Contiki platforms                                           */
-/************************************************************************/
-
-#ifdef CONTIKI
-
-#if CONTIKI_TARGET_ECONOTAG
-#  include "platform-specific/config-econotag.h"
-#endif /* CONTIKI_TARGET_ECONOTAG */
-
-#ifdef CONTIKI_TARGET_CC2538DK
-#  include "platform-specific/config-cc2538dk.h"
-#endif /* CONTIKI_TARGET_CC2538DK */
-
-#ifdef CONTIKI_TARGET_WISMOTE
-#  include "platform-specific/config-wismote.h"
-#endif /* CONTIKI_TARGET_WISMOTE */
-
-#ifdef CONTIKI_TARGET_SKY
-#  include "platform-specific/config-sky.h"
-#endif /* CONTIKI_TARGET_SKY */
-
-#ifdef CONTIKI_TARGET_MINIMAL_NET
-#  include "platform-specific/config-minimal-net.h"
-#endif /* CONTIKI_TARGET_MINIMAL_NET */
-
-#endif /* CONTIKI */
diff --git a/extlibs/tinydtls/dtls_hal.h b/extlibs/tinydtls/dtls_hal.h
deleted file mode 100644 (file)
index c2ea91f..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/* 
-Copyright (c) 2015 Atmel Corporation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3.  Neither the name of Atmel nor the names of its contributors may be used to 
-endorse or promote products derived from this software without specific 
-prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file dtls_hal.h
- * @brief DTLS Hardware Abstraction Layer API and visible structures. 
- */
-
-#ifndef _DTLS_DTLS_HAL_H_
-#define _DTLS_DTLS_HAL_H_
-
-#include <stdint.h>
-#include <stdbool.h>
-
-// Define return values for HAL
-#define HAL_SUCCESS (1)
-#define HAL_FAILURE (0)
-#define ENC_KEY_SIZE (32)
-
-/**
- * This structure contains callback functions used by tinydtls to
- * provide a hardware abstraction layer for secure storage . 
- */
-typedef struct {
-
-  /**
-   * Call this function during application initialization to create HAL related resources.
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_init)(struct dtls_context_t *ctx);
-
-  /**
-   * Call this function during application shut down to clean up any HAL related resources.
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_finish)(struct dtls_context_t *ctx);
-
-  /**
-   * Call this function to store unsecured data on hardware.
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_location_handle  The handle to the hardware location to store p_data.
-   * @param[in] p_data  The data to store.
-   * @param[in] data_size  The size of the data to store.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_write_mem)(struct dtls_context_t *ctx,
-                       const uint8_t* p_location,
-                       const uint8_t* p_data,
-                       size_t data_size);
-
-  /**
-   * Call this function to read data from unsecured storage from hardware.
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_location_handle  The handle to the hardware location to read p_data.
-   * @param[in] p_data  The data to read.
-   * @param[inout] data_size  IN: The size of the buffer to receive data.  OUT: The actual number of bytes read.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_read_mem)(struct dtls_context_t *ctx,
-                      const uint8_t* p_location,
-                      uint8_t* p_data,
-                      size_t* dataSize);
-
-  /**
-   * Call this function to store sensitive data in secure hardware.
-   * Data will be securely stored and encrypted on the wire
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_location_handle  The handle to the hardware location to store p_data.
-   * @param[in] p_data  The data to store securely.
-   * @param[in] data_size  The size of the data to store securely.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_write_mem_enc)(struct dtls_context_t *ctx,
-                           const uint8_t* p_location,
-                           const uint8_t* p_data,
-                           size_t data_size);
-
-  /**
-   * Call this function to read sensitive data from secure hardware.
-   * Data will be read from secure storage and encrypted on the wire
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_location_handle  The handle to the hardware location to read p_data.
-   * @param[in] p_data  The data to read securely.
-   * @param[inout] data_size  IN: The size of the buffer to receive data.  OUT: The actual number of bytes read.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_read_mem_enc)(struct dtls_context_t *ctx,
-                          const uint8_t* p_location,
-                          uint8_t* p_data,
-                          size_t* dataSize);
-
-  /**
-   * Call this function to generate a unique encryption key that will be used for secure storage.
-   * This encryption key should be stored as a platform resource
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[out] p_enc_key_out  The internally generated unique encryption key that will be used for secure storage.
-   *    This key needs to be stored on the platform.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_init_enckey)(struct dtls_context_t *ctx,
-                         uint8_t p_enc_key_out[ENC_KEY_SIZE]);
-
-  /**
-   * Call this function to set a unique encryption key that will be used for secure storage.
-   * This encryption key should be stored as a platform resource
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_enc_key_in  The encryption key that will be used for secure storage.
-   *    This key needs to be stored on the platform.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_set_enckey)(struct dtls_context_t *ctx,
-                        const uint8_t p_enc_key_in[ENC_KEY_SIZE]);
-
-  /**
-   * This function is called internally from HAL_read_mem_enc and HAL_write_mem_enc.
-   * The platform must implement this function to return the encryption key that was
-   *   returned by HAL_init_enckey or HAL_set_enckey.
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[out] p_enc_key_out  The encryption key that is used for secure storage.
-   *    Retrieve from platform in this function.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_get_enckey)(struct dtls_context_t *ctx,
-                        uint8_t p_enc_key_out[ENC_KEY_SIZE]);
-
-  /**
-   * Call this function to use the hardware to calculate a SHA256
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_msg  The message to calculate the SHA256.
-   * @param[in] msg_size  The size of the message to hash.
-   * @param[out] p_hash  The hash of p_msg.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_sha2_calc)(struct dtls_context_t *ctx,
-                       uint8_t *p_msg,
-                       size_t msg_size,
-                       uint8_t p_hash[SHA256_DIGEST_LENGTH]);
-
-  /**
-   * Call this function to use the hardware key derivation function (KDF)
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] p_seed  The seed used to produce the key.
-   * @param[in] seed_size  The size of the message to hash.
-   * @param[out] p_keyout  The key produced by the KDF.
-   * @param[in] key_size  The size of the key to be returned.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_kdf_calc)(struct dtls_context_t *ctx,
-                      const uint8_t* p_seed,
-                      const size_t seed_size,
-                      uint8_t* p_keyout,
-                      const size_t key_size);
-
-  /**
-   * Call this function to retrieve the specified certificate from hardware
-   *
-   * @param[in] ctx  The current DTLS context.
-   * @param[in] cert_id  An index into the certificate to returned.
-   * @param[inout] cert  The certificate to be returned.
-   * @param[inout] cert_size  The size of the certificate.
-   * @return HAL_SUCCESS or HAL_FAILURE
-   */
-  int (*HAL_get_x509_cert)(struct dtls_context_t *ctx,
-                           uint32_t cert_ref,
-                           uint8_t **cert,
-                           size_t *cert_size);
-
-} dtls_hal_handler_t;
-
-
-#endif /* _DTLS_DTLS_HAL_H_ */
-
diff --git a/extlibs/tinydtls/dtls_time.c b/extlibs/tinydtls/dtls_time.c
deleted file mode 100644 (file)
index 39a1c8d..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file dtls_time.c
- * @brief Clock Handling
- */
-
-#include "tinydtls.h"
-#include "dtls_config.h"
-#include "dtls_time.h"
-
-#ifdef WITH_CONTIKI
-clock_time_t dtls_clock_offset;
-
-void
-dtls_clock_init(void) {
-  clock_init();
-  dtls_clock_offset = clock_time();
-}
-
-void
-dtls_ticks(dtls_tick_t *t) {
-  *t = clock_time();
-}
-
-#else /* WITH_CONTIKI */
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-time_t dtls_clock_offset;
-
-void
-dtls_clock_init(void) {
-#ifdef _WIN32
-  /* Use clock offset in milliseconds */
-  dtls_clock_offset = GetTickCount64();
-#else
-#ifdef HAVE_TIME_H
-  /* Use clock offset in seconds */
-  dtls_clock_offset = time(NULL);
-#else
-#  ifdef __GNUC__
-  /* Issue a warning when using gcc. Other prepropressors do 
-   *  not seem to have a similar feature. */ 
-#   warning "cannot initialize clock"
-#  endif
-  dtls_clock_offset = 0;
-#endif
-#endif
-}
-
-void dtls_ticks(dtls_tick_t *t) {
-#ifdef _WIN32
-  *t = ((GetTickCount64() - dtls_clock_offset) * DTLS_TICKS_PER_SECOND / 1000);
-#else
-#ifdef HAVE_SYS_TIME_H
-  struct timeval tv;
-  gettimeofday(&tv, NULL);
-  *t = (tv.tv_sec - dtls_clock_offset) * DTLS_TICKS_PER_SECOND 
-    + (tv.tv_usec * DTLS_TICKS_PER_SECOND / 1000000);
-#else
-#error "clock not implemented"
-#endif
-#endif
-}
-
-#endif /* WITH_CONTIKI */
-
-
diff --git a/extlibs/tinydtls/dtls_time.h b/extlibs/tinydtls/dtls_time.h
deleted file mode 100644 (file)
index 6541b1c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file dtls_time.h
- * @brief Clock Handling
- */
-
-#ifndef _DTLS_DTLS_TIME_H_
-#define _DTLS_DTLS_TIME_H_
-
-#include <stdint.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include "tinydtls.h"
-
-/**
- * @defgroup clock Clock Handling
- * Default implementation of internal clock. You should redefine this if
- * you do not have time() and gettimeofday().
- * @{
- */
-
-#ifdef WITH_CONTIKI
-#include "clock.h"
-#else /* WITH_CONTIKI */
-#include <time.h>
-
-#ifndef CLOCK_SECOND
-# define CLOCK_SECOND 1000
-#endif
-
-typedef uint32_t clock_time_t;
-#endif /* WITH_CONTIKI */
-
-typedef clock_time_t dtls_tick_t;
-
-#ifndef DTLS_TICKS_PER_SECOND
-#define DTLS_TICKS_PER_SECOND CLOCK_SECOND
-#endif /* DTLS_TICKS_PER_SECOND */
-
-void dtls_clock_init(void);
-void dtls_ticks(dtls_tick_t *t);
-
-/** @} */
-
-#endif /* _DTLS_DTLS_TIME_H_ */
diff --git a/extlibs/tinydtls/ecc/LICENSE.txt b/extlibs/tinydtls/ecc/LICENSE.txt
deleted file mode 100644 (file)
index ab099ae..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2014, Kenneth MacKay
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/extlibs/tinydtls/ecc/Makefile.contiki b/extlibs/tinydtls/ecc/Makefile.contiki
deleted file mode 100755 (executable)
index 7787d2d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CONTIKI=../../..
-
-APPS += ecc
-
-CFLAGS += -DTEST_INCLUDE
-
-include $(CONTIKI)/Makefile.include
diff --git a/extlibs/tinydtls/ecc/Makefile.ecc b/extlibs/tinydtls/ecc/Makefile.ecc
deleted file mode 100755 (executable)
index 382e48f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This is a -*- Makefile -*-
-
-ecc_src = ecc.c test_helper.c
diff --git a/extlibs/tinydtls/ecc/Makefile.in b/extlibs/tinydtls/ecc/Makefile.in
deleted file mode 100644 (file)
index 2a38603..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-# Makefile for tinydtls
-#
-# Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
-# Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-top_srcdir:= @top_srcdir@
-
-
-ECC_SOURCES:= ecc.c test/test_ecdh.c test/test_ecdsa.c
-ECC_HEADERS:= ecc.h
-FILES:=Makefile.in Makefile.contiki $(ECC_SOURCES) $(ECC_HEADERS)
-DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-
-ifeq ("@WITH_CONTIKI@", "1")
-include Makefile.contiki
-else
-ECC_OBJECTS:= $(patsubst %.c, %.o, $(ECC_SOURCES)) ecc_test.o
-PROGRAMS:= test_ecdh test_ecdsa
-CPPFLAGS=@CPPFLAGS@
-CFLAGS=-Wall -std=c99 @CFLAGS@ -DTEST_INCLUDE
-LDLIBS=@LIBS@
-
-.PHONY: all dirs clean install distclean .gitignore doc
-
-.SUFFIXES:
-.SUFFIXES:      .c .o
-
-all: $(PROGRAMS)
-
-ecc_test.o:    ecc.c ecc.h
-       $(CC) $(CFLAGS) $(CPPFLAGS)  -c -o $@ $<
-
-test_ecdh: ecc.c test/test_ecdh.c
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o test_ecdh ecc.c test/test_ecdh.c
-
-test_ecdsa:ecc.c test/test_ecdsa.c
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o test_ecdsa ecc.c test/test_ecdsa.c
-
-check:
-       echo DISTDIR: $(DISTDIR)
-       echo top_builddir: $(top_builddir)
-
-clean:
-       @rm -f $(PROGRAMS) main.o $(LIB) $(OBJECTS)
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir clean ; \
-       done
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ $(DISTDIR).tar.gz
-endif # WITH_CONTIKI
-
-dist:  $(FILES)
-       test -d $(DISTDIR)/ecc || mkdir $(DISTDIR)/ecc
-       cp -p $(FILES) $(DISTDIR)/ecc
-
-install:       $(HEADERS)
-       test -d $(includedir)/ecc || mkdir -p $(includedir)/ecc
-       $(install) $(HEADERS) $(includedir)/ecc
-
-.gitignore:
-       echo "core\n*~\n*.[oa]\n*.gz\n*.cap\n$(PROGRAM)\n$(DISTDIR)\n.gitignore" >$@
diff --git a/extlibs/tinydtls/ecc/README.md b/extlibs/tinydtls/ecc/README.md
deleted file mode 100644 (file)
index 24f1231..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-micro-ecc
-==========
-
-A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors.
-
-The old version of micro-ecc can be found in the "old" branch.
-
-Features
---------
-
- * Resistant to known side-channel attacks.
- * Written in C, with optional GCC inline assembly for AVR, ARM and Thumb platforms.
- * Supports 8, 32, and 64-bit architectures.
- * Small code size.
- * No dynamic memory allocation.
- * Support for 4 standard curves: secp160r1, secp192r1, secp256r1, and secp256k1.
- * BSD 2-clause license.
-
-Usage Notes
------------
-### Point Representation ###
-Compressed points are represented in the standard format as defined in http://www.secg.org/collateral/sec1_final.pdf; uncompressed points are represented in standard format, but without the `0x04` prefix. `uECC_make_key()`, `uECC_shared_secret()`, `uECC_sign()`, and `uECC_verify()` only handle uncompressed points; you can use `uECC_compress()` and `uECC_decompress()` to convert between compressed and uncompressed point representations.
-
-Private keys are represented in the standard format.
-
-### Using the Code ###
-
-I recommend just copying (or symlink) uECC.h, uECC.c, and the appropriate asm\_&lt;arch&gt;\_.inc (if any) into your project. Then just `#include "uECC.h"` to use the micro-ecc functions.
-
-For use with Arduino, you can just create a symlink to the `uECC` directory in your Arduino `libraries` directory. You can then use uECC just like any other Arduino library (uECC should show up in the **Sketch**=>**Import Library** submenu).
-
-See uECC.h for documentation for each function.
-
-### Compilation Notes ###
-
- * Should compile with any C/C++ compiler that supports stdint.h (this includes Visual Studio 2013).
- * If you want to change the defaults for `uECC_CURVE` and `uECC_ASM`, you must change them in your Makefile or similar so that uECC.c is compiled with the desired values (ie, compile uECC.c with `-DuECC_CURVE=uECC_secp256r1` or whatever).
- * When compiling for a Thumb-1 platform with inline assembly enabled (ie, `uECC_ASM` is defined to `uECC_asm_small` or `uECC_asm_fast`), you must use the `-fomit-frame-pointer` GCC option (this is enabled by default when compiling with `-O1` or higher).
- * When compiling for an ARM/Thumb-2 platform with fast inline assembly enabled (ie, `uECC_ASM` is defined to `uECC_asm_fast`), you must use the `-fomit-frame-pointer` GCC option (this is enabled by default when compiling with `-O1` or higher).
- * When compiling for AVR with inline assembly enabled, you must have optimizations enabled (compile with `-O1` or higher).
- * When building for Windows, you will need to link in the `advapi32.lib` system library.
-
-ARM Performance
----------------
-
-All tests were built using gcc 4.8.2 with `-O3`, and were run on a Raspberry Pi B+. `uECC_ASM` was defined to `uECC_asm_fast` and `ECC_SQUARE_FUNC` was defined to `1` in all cases. All times are in milliseconds.
-
-<table>
-       <tr>
-               <th></th>
-               <th>secp160r1</th>
-               <th>secp192r1</th>
-               <th>secp256r1</th>
-               <th>secp256k1</th>
-       </tr>
-       <tr>
-               <td><em>ECDH:</em></td>
-               <td>2.3</td>
-               <td>2.7</td>
-               <td>7.9</td>
-               <td>6.5</td>
-       </tr>
-       <tr>
-               <td><em>ECDSA sign:</em></td>
-               <td>2.8</td>
-               <td>3.1</td>
-               <td>8.6</td>
-               <td>7.2</td>
-       </tr>
-       <tr>
-               <td><em>ECDSA verify:</em></td>
-               <td>2.7</td>
-               <td>3.2</td>
-               <td>9.2</td>
-               <td>7.0</td>
-       </tr>
-</table>
-
-AVR Performance
----------------
-
-All tests were built using avr-gcc 4.8.1 with `-Os`, and were run on a 16 MHz ATmega256RFR2. Code size refers to the space used by micro-ecc code and data.
-
-#### ECDH (fast) ####
-
-In these tests, `uECC_ASM` was defined to `uECC_asm_fast` and `ECC_SQUARE_FUNC` was defined to `1` in all cases.
-
-<table>
-       <tr>
-               <th></th>
-               <th>secp160r1</th>
-               <th>secp192r1</th>
-               <th>secp256r1</th>
-               <th>secp256k1</th>
-       </tr>
-       <tr>
-               <td><em>ECDH time (ms):</em></td>
-               <td>470</td>
-               <td>810</td>
-               <td>2220</td>
-               <td>1615</td>
-       </tr>
-       <tr>
-               <td><em>Code size (bytes):</em></td>
-               <td>10768</td>
-               <td>13112</td>
-               <td>20886</td>
-               <td>21126</td>
-       </tr>
-</table>
-
-#### ECDH (small) ####
-
-In these tests, `uECC_ASM` was defined to `uECC_asm_small` and `ECC_SQUARE_FUNC` was defined to `0` in all cases.
-
-<table>
-       <tr>
-               <th></th>
-               <th>secp160r1</th>
-               <th>secp192r1</th>
-               <th>secp256r1</th>
-               <th>secp256k1</th>
-       </tr>
-       <tr>
-               <td><em>ECDH time (ms):</em></td>
-               <td>1250</td>
-               <td>1810</td>
-               <td>4790</td>
-               <td>4700</td>
-       </tr>
-       <tr>
-               <td><em>Code size (bytes):</em></td>
-               <td>3244</td>
-               <td>3400</td>
-               <td>5274</td>
-               <td>3426</td>
-       </tr>
-</table>
-
-#### ECDSA (fast) ####
-
-In these tests, `uECC_ASM` was defined to `uECC_asm_fast` and `ECC_SQUARE_FUNC` was defined to `1` in all cases.
-
-<table>
-       <tr>
-               <th></th>
-               <th>secp160r1</th>
-               <th>secp192r1</th>
-               <th>secp256r1</th>
-               <th>secp256k1</th>
-       </tr>
-       <tr>
-               <td><em>ECDSA sign time (ms):</em></td>
-               <td>555</td>
-               <td>902</td>
-               <td>2386</td>
-               <td>1773</td>
-       </tr>
-       <tr>
-               <td><em>ECDSA verify time (ms):</em></td>
-               <td>590</td>
-               <td>990</td>
-               <td>2650</td>
-               <td>1800</td>
-       </tr>
-       <tr>
-               <td><em>Code size (bytes):</em></td>
-               <td>13246</td>
-               <td>14798</td>
-               <td>22594</td>
-               <td>22826</td>
-       </tr>
-</table>
-
-#### ECDSA (small) ####
-
-In these tests, `uECC_ASM` was defined to `uECC_asm_small` and `ECC_SQUARE_FUNC` was defined to `0` in all cases.
-
-<table>
-       <tr>
-               <th></th>
-               <th>secp160r1</th>
-               <th>secp192r1</th>
-               <th>secp256r1</th>
-               <th>secp256k1</th>
-       </tr>
-       <tr>
-               <td><em>ECDSA sign time (ms):</em></td>
-               <td>1359</td>
-               <td>1931</td>
-               <td>4998</td>
-               <td>4904</td>
-       </tr>
-       <tr>
-               <td><em>ECDSA verify time (ms):</em></td>
-               <td>1515</td>
-               <td>2160</td>
-               <td>5700</td>
-               <td>5220</td>
-       </tr>
-       <tr>
-               <td><em>Code size (bytes):</em></td>
-               <td>5690</td>
-               <td>5054</td>
-               <td>6980</td>
-               <td>5080</td>
-       </tr>
-</table>
diff --git a/extlibs/tinydtls/ecc/asm_arm.inc b/extlibs/tinydtls/ecc/asm_arm.inc
deleted file mode 100755 (executable)
index f181b17..0000000
+++ /dev/null
@@ -1,1905 +0,0 @@
-#define DEC_5 4
-#define DEC_6 5
-#define DEC_8 7
-
-#define DEC(N) uECC_CONCAT(DEC_, N)
-
-#define REPEAT_1(stuff) stuff
-#define REPEAT_2(stuff) REPEAT_1(stuff) stuff
-#define REPEAT_3(stuff) REPEAT_2(stuff) stuff
-#define REPEAT_4(stuff) REPEAT_3(stuff) stuff
-#define REPEAT_5(stuff) REPEAT_4(stuff) stuff
-#define REPEAT_6(stuff) REPEAT_5(stuff) stuff
-#define REPEAT_7(stuff) REPEAT_6(stuff) stuff
-#define REPEAT_8(stuff) REPEAT_7(stuff) stuff
-
-#define REPEAT(N, stuff) uECC_CONCAT(REPEAT_, N)(stuff)
-
-#define STR2(thing) #thing
-#define STR(thing) STR2(thing)
-
-#if (uECC_ASM == uECC_asm_fast)
-
-static uint32_t vli_add(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    uint32_t l_carry = 0;
-    uint32_t l_left;
-    uint32_t l_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "ldmia %[lptr]!, {%[left]} \n\t"  /* Load left word. */
-        "ldmia %[rptr]!, {%[right]} \n\t" /* Load right word. */
-        "adds %[left], %[right] \n\t"     /* Add first word. */
-        "stmia %[dptr]!, {%[left]} \n\t"  /* Store result word. */
-        
-        /* Now we just do the remaining words with the carry bit (using ADC) */
-        REPEAT(DEC(uECC_WORDS), "ldmia %[lptr]!, {%[left]} \n\t"
-            "ldmia %[rptr]!, {%[right]} \n\t"
-            "adcs %[left], %[right] \n\t"
-            "stmia %[dptr]!, {%[left]} \n\t")
-        
-        "adcs %[carry], %[carry] \n\t" /* Store carry bit in l_carry. */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-    #if (uECC_PLATFORM == uECC_arm_thumb)
-        : [dptr] "+l" (p_result), [lptr] "+l" (p_left), [rptr] "+l" (p_right),
-          [carry] "+l" (l_carry), [left] "=l" (l_left), [right] "=l" (l_right)
-    #else
-        : [dptr] "+r" (p_result), [lptr] "+r" (p_left), [rptr] "+r" (p_right),
-          [carry] "+r" (l_carry), [left] "=r" (l_left), [right] "=r" (l_right)
-    #endif
-        :
-        : "cc", "memory"
-    );
-    return l_carry;
-}
-#define asm_add 1
-
-static uint32_t vli_sub(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    uint32_t l_carry = 0;
-    uint32_t l_left;
-    uint32_t l_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "ldmia %[lptr]!, {%[left]} \n\t"  /* Load left word. */
-        "ldmia %[rptr]!, {%[right]} \n\t" /* Load right word. */
-        "subs %[left], %[right] \n\t"     /* Subtract. */
-        "stmia %[dptr]!, {%[left]} \n\t"  /* Store result word. */
-        
-        /* Now we just do the remaining words with the carry bit (using SBC) */
-        REPEAT(DEC(uECC_WORDS), "ldmia %[lptr]!, {%[left]} \n\t"
-            "ldmia %[rptr]!, {%[right]} \n\t"
-            "sbcs %[left], %[right] \n\t"
-            "stmia %[dptr]!, {%[left]} \n\t")
-            
-        "adcs %[carry], %[carry] \n\t" /* Store carry bit in l_carry. */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-    #if (uECC_PLATFORM == uECC_arm_thumb)
-        : [dptr] "+l" (p_result), [lptr] "+l" (p_left), [rptr] "+l" (p_right),
-          [carry] "+l" (l_carry), [left] "=l" (l_left), [right] "=l" (l_right)
-    #else
-        : [dptr] "+r" (p_result), [lptr] "+r" (p_left), [rptr] "+r" (p_right),
-          [carry] "+r" (l_carry), [left] "=r" (l_left), [right] "=r" (l_right)
-    #endif
-        :
-        : "cc", "memory"
-    );
-    return !l_carry; // note that on ARM, carry flag set means "no borrow" when subtracting (for some reason...)
-}
-#define asm_sub 1
-
-#if (uECC_PLATFORM != uECC_arm_thumb)
-#if (uECC_WORDS == 5)
-static void vli_mult(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    register uint32_t *r2 __asm__("r2") = p_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "add r0, 12 \n\t"
-        "add r2, 12 \n\t"
-        "ldmia r1!, {r3,r4} \n\t"
-        "ldmia r2!, {r6,r7} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adc r10, r14 \n\t"
-        "stmia r0!, {r9, r10} \n\t"
-
-        "sub r0, 28 \n\t"
-        "sub r2, 20 \n\t"
-        "ldmia r2!, {r6,r7,r8} \n\t"
-        "ldmia r1!, {r5} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r4, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r3, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "ldmia r1!, {r4} \n\t"
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r5, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r3, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r4, r6 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "ldr r9, [r0] \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, #0 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "ldmia r2!, {r6} \n\t"
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r5, r6 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r3, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r4, r7 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "ldr r10, [r0] \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "ldmia r2!, {r7} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r5, r7 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r6 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r4, r8 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "ldr r11, [r0] \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r14} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "umull r14, r9, r4, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adc r11, r9 \n\t"
-        "stmia r0!, {r10, r11} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1), "+r" (r2)
-        :
-        : "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#endif /* (uECC_WORDS == 5) */
-
-#if (uECC_WORDS == 6)
-static void vli_mult(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    register uint32_t *r2 __asm__("r2") = p_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "add r0, 12 \n\t"
-        "add r2, 12 \n\t"
-        "ldmia r1!, {r3,r4,r5} \n\t"
-        "ldmia r2!, {r6,r7,r8} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r4, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "umull r9, r10, r5, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adc r12, r10 \n\t"
-        "stmia r0!, {r11, r12} \n\t"
-
-        "sub r0, 36 \n\t"
-        "sub r2, 24 \n\t"
-        "ldmia r2!, {r6,r7,r8} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r4, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r3, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "ldmia r1!, {r4} \n\t"
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r5, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r3, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r4, r6 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "ldr r9, [r0] \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, #0 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "ldmia r1!, {r5} \n\t"
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r3, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r4, r7 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r5, r6 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "ldr r10, [r0] \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "ldmia r2!, {r6} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r3, r6 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r4, r8 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r5, r7 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "ldr r11, [r0] \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r14} \n\t"
-
-        "ldmia r2!, {r7} \n\t"
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "ldr r12, [r0] \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, #0 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r2!, {r8} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r3, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r4, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r4, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r5, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "umull r10, r11, r5, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adc r14, r11 \n\t"
-        "stmia r0!, {r12, r14} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1), "+r" (r2)
-        :
-        : "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#endif /* (uECC_WORDS == 6) */
-
-#if (uECC_WORDS == 8)
-static void vli_mult(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    register uint32_t *r2 __asm__("r2") = p_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "add r0, 24 \n\t"
-        "add r2, 24 \n\t"
-        "ldmia r1!, {r3,r4} \n\t"
-        "ldmia r2!, {r6,r7} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adc r10, r14 \n\t"
-        "stmia r0!, {r9, r10} \n\t"
-
-        "sub r0, 28 \n\t"
-        "sub r2, 20 \n\t"
-        "ldmia r2!, {r6,r7,r8} \n\t"
-        "ldmia r1!, {r5} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r4, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r3, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "ldmia r1!, {r4} \n\t"
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r5, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r3, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r4, r6 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "ldr r9, [r0] \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, #0 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "ldmia r2!, {r6} \n\t"
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r5, r6 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r3, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r4, r7 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "ldr r10, [r0] \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "ldmia r2!, {r7} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r5, r7 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r6 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r4, r8 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "ldr r11, [r0] \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r14} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "umull r14, r9, r4, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adc r11, r9 \n\t"
-        "stmia r0!, {r10, r11} \n\t"
-
-        "sub r0, 52 \n\t"
-        "sub r1, 20 \n\t"
-        "sub r2, 32 \n\t"
-        "ldmia r1!, {r3,r4,r5} \n\t"
-        "ldmia r2!, {r6,r7,r8} \n\t"
-
-        "umull r11, r12, r3, r6 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r9, r3, r7 \n\t"
-        "adds r12, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r11, r14, r4, r6 \n\t"
-        "adds r12, r11 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r3, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r5, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r4, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r5, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r3, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "ldmia r1!, {r4} \n\t"
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r5, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r3, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r4, r6 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "ldr r9, [r0] \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, #0 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "ldmia r1!, {r5} \n\t"
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r3, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r4, r7 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r5, r6 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "ldr r10, [r0] \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r4, r8 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r5, r7 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r6 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "ldr r11, [r0] \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r14} \n\t"
-
-        "ldmia r1!, {r4} \n\t"
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r5, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r3, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "ldr r12, [r0] \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, #0 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "ldmia r2!, {r6} \n\t"
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r5, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r3, r8 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r4, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "ldmia r2!, {r7} \n\t"
-        "mov r14, #0 \n\t"
-        "umull r9, r10, r5, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r3, r6 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "umull r9, r10, r4, r8 \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r14, #0 \n\t"
-        "ldr r9, [r0] \n\t"
-        "adds r11, r9 \n\t"
-        "adcs r12, #0 \n\t"
-        "adc r14, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "ldmia r2!, {r8} \n\t"
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r5, r8 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r3, r7 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "umull r10, r11, r4, r6 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "ldr r10, [r0] \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r14, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "ldmia r2!, {r6} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r5, r6 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r8 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r4, r7 \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "ldr r11, [r0] \n\t"
-        "adds r14, r11 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r14} \n\t"
-
-        "ldmia r2!, {r7} \n\t"
-        "mov r11, #0 \n\t"
-        "umull r12, r14, r5, r7 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r3, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "umull r12, r14, r4, r8 \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, r14 \n\t"
-        "adc r11, #0 \n\t"
-        "ldr r12, [r0] \n\t"
-        "adds r9, r12 \n\t"
-        "adcs r10, #0 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r14, r9, r3, r7 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r14, r9, r4, r6 \n\t"
-        "adds r10, r14 \n\t"
-        "adcs r11, r9 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r10} \n\t"
-
-        "umull r9, r10, r4, r7 \n\t"
-        "adds r11, r9 \n\t"
-        "adc r12, r10 \n\t"
-        "stmia r0!, {r11, r12} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1), "+r" (r2)
-        :
-        : "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#endif /* (uECC_WORDS == 8) */
-
-#if (uECC_WORDS == 5)
-static void vli_square(uint32_t *p_result, uint32_t *p_left)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "ldmia r1!, {r2,r3,r4,r5,r6} \n\t"
-
-        "umull r11, r12, r2, r2 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r2, r3 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r2, r4 \n\t"
-        "adds r11, r11 \n\t"
-        "adcs r12, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r3 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r2, r5 \n\t"
-        "umull r1, r14, r3, r4 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r2, r6 \n\t"
-        "umull r1, r14, r3, r5 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "umull r1, r14, r4, r4 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r3, r6 \n\t"
-        "umull r1, r14, r4, r5 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r8, #0 \n\t"
-        "umull r1, r10, r4, r6 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "umull r1, r10, r5, r5 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r1, r10, r5, r6 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "adds r12, r1 \n\t"
-        "adcs r8, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "umull r1, r10, r6, r6 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r10 \n\t"
-        "stmia r0!, {r8, r11} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1)
-        :
-        : "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_square 1
-#endif /* (uECC_WORDS == 5) */
-
-#if (uECC_WORDS == 6)
-static void vli_square(uint32_t *p_result, uint32_t *p_left)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "ldmia r1!, {r2,r3,r4,r5,r6,r7} \n\t"
-
-        "umull r11, r12, r2, r2 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r2, r3 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r2, r4 \n\t"
-        "adds r11, r11 \n\t"
-        "adcs r12, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r3 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r2, r5 \n\t"
-        "umull r1, r14, r3, r4 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r2, r6 \n\t"
-        "umull r1, r14, r3, r5 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "umull r1, r14, r4, r4 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r2, r7 \n\t"
-        "umull r1, r14, r3, r6 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "umull r1, r14, r4, r5 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r3, r7 \n\t"
-        "umull r1, r14, r4, r6 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "umull r1, r14, r5, r5 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r9, r14 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r4, r7 \n\t"
-        "umull r1, r14, r5, r6 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r14 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r8, #0 \n\t"
-        "umull r1, r10, r5, r7 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "umull r1, r10, r6, r6 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r1, r10, r6, r7 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "adds r12, r1 \n\t"
-        "adcs r8, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "umull r1, r10, r7, r7 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r10 \n\t"
-        "stmia r0!, {r8, r11} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1)
-        :
-        : "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_square 1
-#endif /* (uECC_WORDS == 6) */
-
-#if (uECC_WORDS == 8)
-static void vli_square(uint32_t *p_result, uint32_t *p_left)
-{
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "ldmia r1!, {r2, r3} \n\t"
-        "add r1, 16 \n\t"
-        "ldmia r1!, {r5, r6} \n\t"
-        "add r0, 24 \n\t"
-
-        "umull r8, r9, r2, r5 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "umull r12, r10, r2, r6 \n\t"
-        "adds r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r9} \n\t"
-
-        "umull r8, r9, r3, r6 \n\t"
-        "adds r10, r8 \n\t"
-        "adc r11, r9, #0 \n\t"
-        "stmia r0!, {r10, r11} \n\t"
-
-        "sub r0, 40 \n\t"
-        "sub r1, 32 \n\t"
-        "ldmia r1!, {r2,r3,r4,r5,r6,r7} \n\t"
-
-        "umull r11, r12, r2, r2 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r9, #0 \n\t"
-        "umull r10, r11, r2, r3 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11, #0 \n\t"
-        "adc r9, #0 \n\t"
-        "adds r12, r10 \n\t"
-        "adcs r8, r11 \n\t"
-        "adc r9, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r11, r12, r2, r4 \n\t"
-        "adds r11, r11 \n\t"
-        "adcs r12, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "umull r11, r12, r3, r3 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r2, r5 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r3, r4 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r2, r6 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r3, r5 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r4, r4 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r2, r7 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r3, r6 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r4, r5 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "ldmia r1!, {r2} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r3, r7 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r4, r6 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r8, r14 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r5, r5 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r3, r2 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r4, r7 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r5, r6 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r8, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "ldmia r1!, {r3} \n\t"
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r4, r2 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r5, r7 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r8, r14 \n\t"
-        "adcs r9, #0 \n\t"
-        "adc r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r6, r6 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r4, r3 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r5, r2 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r6, r7 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "ldr r14, [r0] \n\t"
-        "adds r8, r14 \n\t"
-        "adcs r11, #0 \n\t"
-        "adc r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r10, #0 \n\t"
-        "umull r8, r9, r5, r3 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r6, r2 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r9, r9 \n\t"
-        "adc r10, r10 \n\t"
-        "mov r14, r9 \n\t"
-        "umlal r8, r9, r7, r7 \n\t"
-        "cmp r14, r9 \n\t"
-        "it hi \n\t"
-        "adchi r10, #0 \n\t"
-        "adds r8, r11 \n\t"
-        "adcs r9, r12 \n\t"
-        "adc r10, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r12, #0 \n\t"
-        "umull r8, r11, r6, r3 \n\t"
-        "mov r14, r11 \n\t"
-        "umlal r8, r11, r7, r2 \n\t"
-        "cmp r14, r11 \n\t"
-        "it hi \n\t"
-        "adchi r12, #0 \n\t"
-        "adds r8, r8 \n\t"
-        "adcs r11, r11 \n\t"
-        "adc r12, r12 \n\t"
-        "adds r8, r9 \n\t"
-        "adcs r11, r10 \n\t"
-        "adc r12, #0 \n\t"
-        "stmia r0!, {r8} \n\t"
-
-        "mov r8, #0 \n\t"
-        "umull r1, r10, r7, r3 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "umull r1, r10, r2, r2 \n\t"
-        "adds r11, r1 \n\t"
-        "adcs r12, r10 \n\t"
-        "adc r8, #0 \n\t"
-        "stmia r0!, {r11} \n\t"
-
-        "mov r11, #0 \n\t"
-        "umull r1, r10, r2, r3 \n\t"
-        "adds r1, r1 \n\t"
-        "adcs r10, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "adds r12, r1 \n\t"
-        "adcs r8, r10 \n\t"
-        "adc r11, #0 \n\t"
-        "stmia r0!, {r12} \n\t"
-
-        "umull r1, r10, r3, r3 \n\t"
-        "adds r8, r1 \n\t"
-        "adcs r11, r10 \n\t"
-        "stmia r0!, {r8, r11} \n\t"
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : "+r" (r0), "+r" (r1)
-        :
-        : "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r14", "cc", "memory"
-    );
-}
-#define asm_square 1
-#endif /* (uECC_WORDS == 8) */
-
-#endif /* (uECC_PLATFORM != uECC_arm_thumb) */
-
-#endif /* (uECC_ASM == uECC_asm_fast) */
-
-#if !asm_add
-static uint32_t vli_add(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    uint32_t l_counter = uECC_WORDS;
-    uint32_t l_carry = 0; /* carry = 0 initially */
-    uint32_t l_left;
-    uint32_t l_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "1: \n\t"
-        "ldmia %[lptr]!, {%[left]} \n\t"  /* Load left word. */
-        "ldmia %[rptr]!, {%[right]} \n\t" /* Load right word. */
-        "lsrs %[carry], #1 \n\t"          /* Set up carry flag (l_carry = 0 after this). */
-        "adcs %[left], %[right] \n\t"     /* Add with carry. */
-        "adcs %[carry], %[carry] \n\t"    /* Store carry bit in l_carry. */
-        "stmia %[dptr]!, {%[left]} \n\t"  /* Store result word. */
-        "subs %[ctr], #1 \n\t"            /* Decrement index. */
-        "bne 1b \n\t"                     /* Loop until index == 0. */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-    #if (uECC_PLATFORM == uECC_arm_thumb)
-        : [dptr] "+l" (p_result), [lptr] "+l" (p_left), [rptr] "+l" (p_right),
-          [ctr] "+l" (l_counter), [carry] "+l" (l_carry), [left] "=l" (l_left), [right] "=l" (l_right)
-    #else
-        : [dptr] "+r" (p_result), [lptr] "+r" (p_left), [rptr] "+r" (p_right),
-          [ctr] "+r" (l_counter), [carry] "+r" (l_carry), [left] "=r" (l_left), [right] "=r" (l_right)
-    #endif
-        :
-        : "cc", "memory"
-    );
-    return l_carry;
-}
-#define asm_add 1
-#endif
-
-#if !asm_sub
-static uint32_t vli_sub(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-    uint32_t l_counter = uECC_WORDS;
-    uint32_t l_carry = 1; /* carry = 1 initially (means don't borrow) */
-    uint32_t l_left;
-    uint32_t l_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "1: \n\t"
-        "ldmia %[lptr]!, {%[left]} \n\t"  /* Load left word. */
-        "ldmia %[rptr]!, {%[right]} \n\t" /* Load right word. */
-        "lsrs %[carry], #1 \n\t"          /* Set up carry flag (l_carry = 0 after this). */
-        "sbcs %[left], %[right] \n\t"     /* Subtract with borrow. */
-        "adcs %[carry], %[carry] \n\t"    /* Store carry bit in l_carry. */
-        "stmia %[dptr]!, {%[left]} \n\t"  /* Store result word. */
-        "subs %[ctr], #1 \n\t"            /* Decrement index. */
-        "bne 1b \n\t"                     /* Loop until index == 0. */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-    #if (uECC_PLATFORM == uECC_arm_thumb)
-        : [dptr] "+l" (p_result), [lptr] "+l" (p_left), [rptr] "+l" (p_right),
-          [ctr] "+l" (l_counter), [carry] "+l" (l_carry), [left] "=l" (l_left), [right] "=l" (l_right)
-    #else
-        : [dptr] "+r" (p_result), [lptr] "+r" (p_left), [rptr] "+r" (p_right),
-          [ctr] "+r" (l_counter), [carry] "+r" (l_carry), [left] "=r" (l_left), [right] "=r" (l_right)
-    #endif
-        :
-        : "cc", "memory"
-    );
-    return !l_carry;
-}
-#define asm_sub 1
-#endif
-
-#if !asm_mult
-static void vli_mult(uint32_t *p_result, uint32_t *p_left, uint32_t *p_right)
-{
-#if (uECC_PLATFORM != uECC_arm_thumb)
-    uint32_t c0 = 0;
-    uint32_t c1 = 0;
-    uint32_t c2 = 0;
-    uint32_t k = 0;
-    uint32_t i;
-    uint32_t t0, t1;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        
-        "1: \n\t" /* outer loop (k < uECC_WORDS) */
-        "movs %[i], #0 \n\t" /* i = 0 */
-        "b 3f \n\t"
-        
-        "2: \n\t" /* outer loop (k >= uECC_WORDS) */
-        "movs %[i], %[k] \n\t"      /* i = k */
-        "subs %[i], %[eccdm1] \n\t" /* i = k - (uECC_WORDS - 1) (times 4) */
-        
-        "3: \n\t" /* inner loop */
-        "subs %[t0], %[k], %[i] \n\t" /* t0 = k-i */
-        
-        "ldr %[t1], [%[right], %[t0]] \n\t" /* t1 = p_right[k-i] */
-        "ldr %[t0], [%[left], %[i]] \n\t"   /* t0 = p_left[i] */
-        
-        "umull %[t0], %[t1], %[t0], %[t1] \n\t" /* (t0, t1) = p_left[i] * p_right[k-i] */
-        
-        "adds %[c0], %[t0] \n\t" /* add low word to c0 */
-        "adcs %[c1], %[t1] \n\t" /* add high word to c1, including carry */
-        "adcs %[c2], #0 \n\t"    /* add carry to c2 */
-
-        "adds %[i], #4 \n\t"     /* i += 4 */
-        "cmp %[i], %[eccd] \n\t" /* i < uECC_WORDS (times 4)? */
-        "bge 4f \n\t" /* if not, exit the loop */
-        "cmp %[i], %[k] \n\t"    /* i <= k? */
-        "ble 3b \n\t" /* if so, continue looping */
-        
-        "4: \n\t" /* end inner loop */
-        
-        "str %[c0], [%[result], %[k]] \n\t" /* p_result[k] = c0 */
-        "mov %[c0], %[c1] \n\t"     /* c0 = c1 */
-        "mov %[c1], %[c2] \n\t"     /* c1 = c2 */
-        "movs %[c2], #0 \n\t"       /* c2 = 0 */
-        "adds %[k], #4 \n\t"        /* k += 4 */
-        "cmp %[k], %[eccd] \n\t"    /* k < uECC_WORDS (times 4) ? */
-        "blt 1b \n\t" /* if not, loop back, start with i = 0 */
-        "cmp %[k], %[eccd2m1] \n\t" /* k < uECC_WORDS * 2 - 1 (times 4) ? */
-        "blt 2b \n\t" /* if not, loop back, start with i = (k+1) - uECC_WORDS */
-        /* end outer loop */
-        
-        "str %[c0], [%[result], %[k]] \n\t" /* p_result[uECC_WORDS * 2 - 1] = c0 */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : [c0] "+r" (c0), [c1] "+r" (c1), [c2] "+r" (c2), [k] "+r" (k), [i] "=&r" (i), [t0] "=&r" (t0), [t1] "=&r" (t1)
-        : [result] "r" (p_result), [left] "r" (p_left), [right] "r" (p_right),
-          [eccd] "I" (uECC_WORDS * 4), [eccdm1] "I" ((uECC_WORDS-1) * 4), [eccd2m1] "I" ((uECC_WORDS * 2 - 1) * 4)
-        : "cc", "memory"
-    );
-    
-#else /* Thumb-1 */
-
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    register uint32_t *r2 __asm__("r2") = p_right;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "movs r3, #0 \n\t" /* c0 = 0 */
-        "movs r4, #0 \n\t" /* c1 = 0 */
-        "movs r5, #0 \n\t" /* c2 = 0 */
-        "movs r6, #0 \n\t" /* k = 0 */
-        
-        "push {r0} \n\t" /* keep p_result on the stack */
-        
-        "1: \n\t" /* outer loop (k < uECC_WORDS) */
-        "movs r7, #0 \n\t" /* r7 = i = 0 */
-        "b 3f \n\t"
-        
-        "2: \n\t" /* outer loop (k >= uECC_WORDS) */
-        "movs r7, r6 \n\t"        /* r7 = k */
-        "subs r7, %[eccdm1] \n\t" /* r7 = i = k - (uECC_WORDS - 1) (times 4) */
-        
-        "3: \n\t" /* inner loop */
-        "push {r3, r4, r5, r6} \n\t" /* push things, r3 (c0) is at the top of stack. */
-        "subs r0, r6, r7 \n\t"       /* r0 = k-i */
-        
-        "ldr r4, [r2, r0] \n\t" /* r4 = p_right[k-i] */
-        "ldr r0, [r1, r7] \n\t" /* r0 = p_left[i] */
-        
-        "lsrs r3, r0, #16 \n\t" /* r3 = a1 */
-        "uxth r0, r0 \n\t"      /* r0 = a0 */
-        
-        "lsrs r5, r4, #16 \n\t" /* r5 = b1 */
-        "uxth r4, r4 \n\t"      /* r4 = b0 */
-        
-        "movs r6, r3 \n\t"     /* r6 = a1 */
-        "muls r6, r5, r6 \n\t" /* r6 = a1*b1 */
-        "muls r3, r4, r3 \n\t" /* r3 = b0*a1 */
-        "muls r5, r0, r5 \n\t" /* r5 = a0*b1 */
-        "muls r0, r4, r0 \n\t" /* r0 = a0*b0 */
-        
-        "movs r4, #0 \n\t"  /* r4 = 0 */
-        "adds r3, r5 \n\t"  /* r3 = b0*a1 + a0*b1 */
-        "adcs r4, r4 \n\t"  /* r4 = carry */
-        "lsls r4, #16 \n\t" /* r4 = carry << 16 */
-        "adds r6, r4 \n\t"  /* r6 = a1*b1 + carry */
-        
-        "lsls r4, r3, #16 \n\t" /* r4 = (b0*a1 + a0*b1) << 16 */
-        "lsrs r3, #16 \n\t"     /* r3 = (b0*a1 + a0*b1) >> 16 */
-        "adds r0, r4 \n\t"      /* r0 = low word = a0*b0 + ((b0*a1 + a0*b1) << 16) */
-        "adcs r6, r3 \n\t"      /* r6 = high word = a1*b1 + carry + ((b0*a1 + a0*b1) >> 16) */
-        
-        "pop {r3, r4, r5} \n\t" /* r3 = c0, r4 = c1, r5 = c2 */
-        "adds r3, r0 \n\t"      /* add low word to c0 */
-        "adcs r4, r6 \n\t"      /* add high word to c1, including carry */
-        "movs r0, #0 \n\t"      /* r0 = 0 (does not affect carry bit) */
-        "adcs r5, r0 \n\t"      /* add carry to c2 */
-        
-        "pop {r6} \n\t" /* r6 = k */
-
-        "adds r7, #4 \n\t"     /* i += 4 */
-        "cmp r7, %[eccd] \n\t" /* i < uECC_WORDS (times 4)? */
-        "bge 4f \n\t" /* if not, exit the loop */
-        "cmp r7, r6 \n\t"      /* i <= k? */
-        "ble 3b \n\t" /* if so, continue looping */
-        
-        "4: \n\t" /* end inner loop */
-        
-        "ldr r0, [sp, #0] \n\t" /* r0 = p_result */
-        
-        "str r3, [r0, r6] \n\t"   /* p_result[k] = c0 */
-        "mov r3, r4 \n\t"         /* c0 = c1 */
-        "mov r4, r5 \n\t"         /* c1 = c2 */
-        "movs r5, #0 \n\t"        /* c2 = 0 */
-        "adds r6, #4 \n\t"        /* k += 4 */
-        "cmp r6, %[eccd] \n\t"    /* k < uECC_WORDS (times 4) ? */
-        "blt 1b \n\t" /* if not, loop back, start with i = 0 */
-        "cmp r6, %[eccd2m1] \n\t" /* k < uECC_WORDS * 2 - 1 (times 4) ? */
-        "blt 2b \n\t" /* if not, loop back, start with i = (k+1) - uECC_WORDS */
-        /* end outer loop */
-        
-        "str r3, [r0, r6] \n\t" /* p_result[uECC_WORDS * 2 - 1] = c0 */
-        "pop {r0} \n\t"         /* pop p_result off the stack */
-        
-        ".syntax divided \n\t"
-        : 
-        : [r0] "l" (r0), [r1] "l" (r1), [r2] "l" (r2), [eccd] "I" (uECC_WORDS * 4), [eccdm1] "I" ((uECC_WORDS-1) * 4), [eccd2m1] "I" ((uECC_WORDS * 2 - 1) * 4)
-        : "r3", "r4", "r5", "r6", "r7", "cc", "memory"
-    );
-#endif
-}
-#define asm_mult 1
-#endif /* !asm_mult */
-
-#if uECC_SQUARE_FUNC
-#if !asm_square
-static void vli_square(uint32_t *p_result, uint32_t *p_left)
-{
-#if (uECC_PLATFORM != uECC_arm_thumb)
-    uint32_t c0 = 0;
-    uint32_t c1 = 0;
-    uint32_t c2 = 0;
-    uint32_t k = 0;
-    uint32_t i, tt;
-    uint32_t t0, t1;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        
-        "1: \n\t" /* outer loop (k < uECC_WORDS) */
-        "movs %[i], #0 \n\t" /* i = 0 */
-        "b 3f \n\t"
-        
-        "2: \n\t" /* outer loop (k >= uECC_WORDS) */
-        "movs %[i], %[k] \n\t"      /* i = k */
-        "subs %[i], %[eccdm1] \n\t" /* i = k - (uECC_WORDS - 1) (times 4) */
-        
-        "3: \n\t" /* inner loop */
-        "subs %[tt], %[k], %[i] \n\t" /* tt = k-i */
-        
-        "ldr %[t1], [%[left], %[tt]] \n\t" /* t1 = p_left[k-i] */
-        "ldr %[t0], [%[left], %[i]] \n\t"  /* t0 = p_left[i] */
-        
-        "umull %[t0], %[t1], %[t0], %[t1] \n\t" /* (t0, t1) = p_left[i] * p_right[k-i] */
-        
-        "cmp %[i], %[tt] \n\t"   /* (i < k-i) ? */
-        "bge 4f \n\t" /* if i >= k-i, skip */
-        "lsls %[t1], #1 \n\t"    /* high word << 1 */
-        "adc %[c2], #0 \n\t"     /* add carry bit to c2 */
-        "lsls %[t0], #1 \n\t"       /* low word << 1 */
-        "adc %[t1], #0 \n\t"     /* add carry bit to high word */
-        
-        "4: \n\t"
-
-        "adds %[c0], %[t0] \n\t" /* add low word to c0 */
-        "adcs %[c1], %[t1] \n\t" /* add high word to c1, including carry */
-        "adc %[c2], #0 \n\t"     /* add carry to c2 */
-        
-        "adds %[i], #4 \n\t"          /* i += 4 */
-        "cmp %[i], %[k] \n\t"         /* i <= k? */
-        "bge 5f \n\t" /* if not, exit the loop */
-        "subs %[tt], %[k], %[i] \n\t" /* tt = k-i */
-        "cmp %[i], %[tt] \n\t"        /* i <= k-i? */
-        "ble 3b \n\t" /* if so, continue looping */
-        
-        "5: \n\t" /* end inner loop */
-        
-        "str %[c0], [%[result], %[k]] \n\t" /* p_result[k] = c0 */
-        "mov %[c0], %[c1] \n\t"     /* c0 = c1 */
-        "mov %[c1], %[c2] \n\t"     /* c1 = c2 */
-        "movs %[c2], #0 \n\t"       /* c2 = 0 */
-        "adds %[k], #4 \n\t"        /* k += 4 */
-        "cmp %[k], %[eccd] \n\t"    /* k < uECC_WORDS (times 4) ? */
-        "blt 1b \n\t" /* if not, loop back, start with i = 0 */
-        "cmp %[k], %[eccd2m1] \n\t" /* k < uECC_WORDS * 2 - 1 (times 4) ? */
-        "blt 2b \n\t" /* if not, loop back, start with i = (k+1) - uECC_WORDS */
-        /* end outer loop */
-        
-        "str %[c0], [%[result], %[k]] \n\t" /* p_result[uECC_WORDS * 2 - 1] = c0 */
-    #if (uECC_PLATFORM != uECC_arm_thumb2)
-        ".syntax divided \n\t"
-    #endif
-        : [c0] "+r" (c0), [c1] "+r" (c1), [c2] "+r" (c2), [k] "+r" (k), [i] "=&r" (i), [tt] "=&r" (tt), [t0] "=&r" (t0), [t1] "=&r" (t1)
-        : [result] "r" (p_result), [left] "r" (p_left),
-          [eccd] "I" (uECC_WORDS * 4), [eccdm1] "I" ((uECC_WORDS-1) * 4), [eccd2m1] "I" ((uECC_WORDS * 2 - 1) * 4)
-        : "cc", "memory"
-    );
-    
-#else
-
-    register uint32_t *r0 __asm__("r0") = p_result;
-    register uint32_t *r1 __asm__("r1") = p_left;
-    
-    __asm__ volatile (
-        ".syntax unified \n\t"
-        "movs r2, #0 \n\t" /* c0 = 0 */
-        "movs r3, #0 \n\t" /* c1 = 0 */
-        "movs r4, #0 \n\t" /* c2 = 0 */
-        "movs r5, #0 \n\t" /* k = 0 */
-        
-        "push {r0} \n\t" /* keep p_result on the stack */
-        
-        "1: \n\t" /* outer loop (k < uECC_WORDS) */
-        "movs r6, #0 \n\t" /* r6 = i = 0 */
-        "b 3f \n\t"
-        
-        "2: \n\t" /* outer loop (k >= uECC_WORDS) */
-        "movs r6, r5 \n\t"        /* r6 = k */
-        "subs r6, %[eccdm1] \n\t" /* r6 = i = k - (uECC_WORDS - 1) (times 4) */
-        
-        "3: \n\t" /* inner loop */
-        "push {r2, r3, r4, r5} \n\t" /* push things, r2 (c0) is at the top of stack. */
-        "subs r7, r5, r6 \n\t"       /* r7 = k-i */
-        
-        "ldr r3, [r1, r7] \n\t" /* r3 = p_left[k-i] */
-        "ldr r0, [r1, r6] \n\t" /* r0 = p_left[i] */
-        
-        "lsrs r2, r0, #16 \n\t" /* r2 = a1 */
-        "uxth r0, r0 \n\t"      /* r0 = a0 */
-        
-        "lsrs r4, r3, #16 \n\t" /* r4 = b1 */
-        "uxth r3, r3 \n\t"      /* r3 = b0 */
-        
-        "movs r5, r2 \n\t"     /* r5 = a1 */
-        "muls r5, r4, r5 \n\t" /* r5 = a1*b1 */
-        "muls r2, r3, r2 \n\t" /* r2 = b0*a1 */
-        "muls r4, r0, r4 \n\t" /* r4 = a0*b1 */
-        "muls r0, r3, r0 \n\t" /* r0 = a0*b0 */
-        
-        "movs r3, #0 \n\t"  /* r3 = 0 */
-        "adds r2, r4 \n\t"  /* r2 = b0*a1 + a0*b1 */
-        "adcs r3, r3 \n\t"  /* r3 = carry */
-        "lsls r3, #16 \n\t" /* r3 = carry << 16 */
-        "adds r5, r3 \n\t"  /* r5 = a1*b1 + carry */
-        
-        "lsls r3, r2, #16 \n\t" /* r3 = (b0*a1 + a0*b1) << 16 */
-        "lsrs r2, #16 \n\t"     /* r2 = (b0*a1 + a0*b1) >> 16 */
-        "adds r0, r3 \n\t"      /* r0 = low word = a0*b0 + ((b0*a1 + a0*b1) << 16) */
-        "adcs r5, r2 \n\t"      /* r5 = high word = a1*b1 + carry + ((b0*a1 + a0*b1) >> 16) */
-    
-        "movs r3, #0 \n\t"  /* r3 = 0 */
-        "cmp r6, r7 \n\t"   /* (i < k-i) ? */
-        "mov r7, r3 \n\t"   /* r7 = 0 (does not affect condition)*/
-        "bge 4f \n\t" /* if i >= k-i, skip */
-        "lsls r5, #1 \n\t"  /* high word << 1 */
-        "adcs r7, r3 \n\t"  /* r7 = carry bit for c2 */
-        "lsls r0, #1 \n\t"  /* low word << 1 */
-        "adcs r5, r3 \n\t"  /* add carry from shift to high word */
-        
-        "4: \n\t"
-        "pop {r2, r3, r4} \n\t" /* r2 = c0, r3 = c1, r4 = c2 */
-        "adds r2, r0 \n\t"      /* add low word to c0 */
-        "adcs r3, r5 \n\t"      /* add high word to c1, including carry */
-        "movs r0, #0 \n\t"      /* r0 = 0 (does not affect carry bit) */
-        "adcs r4, r0 \n\t"      /* add carry to c2 */
-        "adds r4, r7 \n\t"      /* add carry from doubling (if any) */
-        
-        "pop {r5} \n\t" /* r5 = k */
-        
-        "adds r6, #4 \n\t"     /* i += 4 */
-        "cmp r6, r5 \n\t"      /* i <= k? */
-        "bge 5f \n\t" /* if not, exit the loop */
-        "subs r7, r5, r6 \n\t" /* r7 = k-i */
-        "cmp r6, r7 \n\t"      /* i <= k-i? */
-        "ble 3b \n\t" /* if so, continue looping */
-        
-        "5: \n\t" /* end inner loop */
-        
-        "ldr r0, [sp, #0] \n\t" /* r0 = p_result */
-        
-        "str r2, [r0, r5] \n\t"   /* p_result[k] = c0 */
-        "mov r2, r3 \n\t"         /* c0 = c1 */
-        "mov r3, r4 \n\t"         /* c1 = c2 */
-        "movs r4, #0 \n\t"        /* c2 = 0 */
-        "adds r5, #4 \n\t"        /* k += 4 */
-        "cmp r5, %[eccd] \n\t"    /* k < uECC_WORDS (times 4) ? */
-        "blt 1b \n\t" /* if not, loop back, start with i = 0 */
-        "cmp r5, %[eccd2m1] \n\t" /* k < uECC_WORDS * 2 - 1 (times 4) ? */
-        "blt 2b \n\t" /* if not, loop back, start with i = (k+1) - uECC_WORDS */
-        /* end outer loop */
-        
-        "str r2, [r0, r5] \n\t" /* p_result[uECC_WORDS * 2 - 1] = c0 */
-        "pop {r0} \n\t"         /* pop p_result off the stack */
-
-        ".syntax divided \n\t"
-        : [r0] "+l" (r0), [r1] "+l" (r1)
-        : [eccd] "I" (uECC_WORDS * 4), [eccdm1] "I" ((uECC_WORDS-1) * 4), [eccd2m1] "I" ((uECC_WORDS * 2 - 1) * 4)
-        : "r2", "r3", "r4", "r5", "r6", "r7", "cc", "memory"
-    );
-#endif
-}
-#define asm_square 1
-#endif /* !asm_square */
-#endif /* uECC_SQUARE_FUNC */
diff --git a/extlibs/tinydtls/ecc/asm_avr.inc b/extlibs/tinydtls/ecc/asm_avr.inc
deleted file mode 100755 (executable)
index a945e52..0000000
+++ /dev/null
@@ -1,16276 +0,0 @@
-#define DEC_20 19
-#define DEC_24 23
-#define DEC_32 31
-
-#define DEC(N) uECC_CONCAT(DEC_, N)
-
-#define REPEAT_1(stuff) stuff
-#define REPEAT_2(stuff) REPEAT_1(stuff) stuff
-#define REPEAT_3(stuff) REPEAT_2(stuff) stuff
-#define REPEAT_4(stuff) REPEAT_3(stuff) stuff
-#define REPEAT_5(stuff) REPEAT_4(stuff) stuff
-#define REPEAT_6(stuff) REPEAT_5(stuff) stuff
-#define REPEAT_7(stuff) REPEAT_6(stuff) stuff
-#define REPEAT_8(stuff) REPEAT_7(stuff) stuff
-#define REPEAT_9(stuff) REPEAT_8(stuff) stuff
-#define REPEAT_10(stuff) REPEAT_9(stuff) stuff
-#define REPEAT_11(stuff) REPEAT_10(stuff) stuff
-#define REPEAT_12(stuff) REPEAT_11(stuff) stuff
-#define REPEAT_13(stuff) REPEAT_12(stuff) stuff
-#define REPEAT_14(stuff) REPEAT_13(stuff) stuff
-#define REPEAT_15(stuff) REPEAT_14(stuff) stuff
-#define REPEAT_16(stuff) REPEAT_15(stuff) stuff
-#define REPEAT_17(stuff) REPEAT_16(stuff) stuff
-#define REPEAT_18(stuff) REPEAT_17(stuff) stuff
-#define REPEAT_19(stuff) REPEAT_18(stuff) stuff
-#define REPEAT_20(stuff) REPEAT_19(stuff) stuff
-#define REPEAT_21(stuff) REPEAT_20(stuff) stuff
-#define REPEAT_22(stuff) REPEAT_21(stuff) stuff
-#define REPEAT_23(stuff) REPEAT_22(stuff) stuff
-#define REPEAT_24(stuff) REPEAT_23(stuff) stuff
-#define REPEAT_25(stuff) REPEAT_24(stuff) stuff
-#define REPEAT_26(stuff) REPEAT_25(stuff) stuff
-#define REPEAT_27(stuff) REPEAT_26(stuff) stuff
-#define REPEAT_28(stuff) REPEAT_27(stuff) stuff
-#define REPEAT_29(stuff) REPEAT_28(stuff) stuff
-#define REPEAT_30(stuff) REPEAT_29(stuff) stuff
-#define REPEAT_31(stuff) REPEAT_30(stuff) stuff
-#define REPEAT_32(stuff) REPEAT_31(stuff) stuff
-
-#define REPEAT(N, stuff) uECC_CONCAT(REPEAT_, N)(stuff)
-
-#define STR2(thing) #thing
-#define STR(thing) STR2(thing)
-
-#if (uECC_ASM == uECC_asm_fast)
-
-static void vli_clear(uint8_t *p_vli)
-{
-    __asm__ volatile (
-        REPEAT(uECC_BYTES, "st %a[ptr]+, r1 \n\t")
-
-        : [ptr] "+e" (p_vli)
-        :
-        : "r0", "cc", "memory"
-    );
-}
-#define asm_clear 1
-
-static void vli_set(uint8_t *p_dest, const uint8_t *p_src)
-{
-    __asm__ volatile (
-        REPEAT(uECC_BYTES, "ld r0, %a[sptr]+ \n\t"
-            "st %a[dptr]+, r0 \n\t")
-        : [dptr] "+e" (p_dest), [sptr] "+e" (p_src)
-        :
-        : "r0", "cc", "memory"
-    );
-}
-#define asm_set 1
-
-static void vli_rshift1(uint8_t *p_vli)
-{
-    __asm__ volatile (
-        "adiw r30, " STR(uECC_BYTES) " \n\t"
-        "ld r0, -z \n\t"  /* Load byte. */
-        "lsr r0 \n\t" /* Shift. */
-        "st z, r0 \n\t"  /* Store the first result byte. */
-
-        /* Now we just do the remaining bytes with the carry bit (using ROR) */
-        REPEAT(DEC(uECC_BYTES), "ld r0, -z \n\t"
-            "ror r0 \n\t"
-            "st z, r0 \n\t")
-
-        : "+z" (p_vli)
-        :
-        : "r0", "cc", "memory"
-    );
-}
-#define asm_rshift1 1
-
-/* Computes p_result = p_left + p_right, returning carry. Can modify in place. */
-static uint8_t vli_add(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t l_carry = 0;
-    uint8_t l_left;
-    uint8_t l_right;
-
-    __asm__ volatile (
-        "ld %[left], x+ \n\t"  /* Load left byte. */
-        "ld %[right], y+ \n\t" /* Load right byte. */
-        "add %[left], %[right] \n\t" /* Add the first byte. */
-        "st z+, %[left] \n\t"  /* Store the first result byte. */
-        
-        /* Now we just do the remaining bytes with the carry bit (using ADC) */
-        REPEAT(DEC(uECC_BYTES), "ld %[left], x+ \n\t"
-            "ld %[right], y+ \n\t"
-            "adc %[left], %[right] \n\t"
-            "st z+, %[left] \n\t")
-        
-        "adc %[carry], %[carry] \n\t"    /* Store carry bit in l_carry. */
-        
-        "sbiw r28, " STR(uECC_BYTES) " \n\t" /* Restore Y */
-
-        : "+z" (p_result), "+x" (p_left),
-            [carry] "+r" (l_carry), [left] "=&r" (l_left), [right] "=&r" (l_right)
-        : "y" (p_right)
-        : "cc", "memory"
-    );
-    return l_carry;
-}
-#define asm_add 1
-
-/* Computes p_result = p_left - p_right, returning borrow. Can modify in place. */
-static uint8_t vli_sub(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t l_borrow = 0;
-    uint8_t l_left;
-    uint8_t l_right;
-
-    __asm__ volatile (
-        "ld %[left], x+ \n\t"  /* Load left byte. */
-        "ld %[right], y+ \n\t" /* Load right byte. */
-        "sub %[left], %[right] \n\t" /* Subtract the first byte. */
-        "st z+, %[left] \n\t"  /* Store the first result byte. */
-        
-        /* Now we just do the remaining bytes with the carry bit (using SBC) */
-        REPEAT(DEC(uECC_BYTES), "ld %[left], x+ \n\t"
-            "ld %[right], y+ \n\t"
-            "sbc %[left], %[right] \n\t"
-            "st z+, %[left] \n\t")
-        
-        "adc %[borrow], %[borrow] \n\t"    /* Store carry bit in l_borrow. */
-        
-        "sbiw r28, " STR(uECC_BYTES) " \n\t" /* Restore Y */
-
-        : "+z" (p_result), "+x" (p_left),
-            [borrow] "+r" (l_borrow), [left] "=&r" (l_left), [right] "=&r" (l_right)
-        : "y" (p_right)
-        : "cc", "memory"
-    );
-    return l_borrow;
-}
-#define asm_sub 1
-
-#if (uECC_BYTES == 20)
-__attribute((noinline))
-static void vli_mult(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    __asm__ volatile (
-        "adiw r30, 10 \n\t"
-        "adiw r28, 10 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r21, y+ \n\t"
-        "ldi r25, 0 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r24 \n\t"
-        "st z+, r22 \n\t"
-
-        "sbiw r30, 30 \n\t"
-        "sbiw r28, 20 \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r21, y+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r18, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r19, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r20, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r21, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r24 \n\t"
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+y" (p_right), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#elif (uECC_BYTES == 24)
-__attribute((noinline))
-static void vli_mult(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    __asm__ volatile (
-        "adiw r30, 20 \n\t"
-        "adiw r28, 20 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ldi r25, 0 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r24 \n\t"
-        "st z+, r22 \n\t"
-
-        "sbiw r30, 18 \n\t"
-        "sbiw r28, 14 \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r21, y+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r24 \n\t"
-
-        "sbiw r30, 38 \n\t"
-        "sbiw r28, 24 \n\t"
-        "sbiw r26, 14 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r21, y+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r18, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r19, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r20, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r21, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "st z+, r23 \n\t"
-
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+y" (p_right), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#elif (uECC_BYTES == 32)
-__attribute((noinline))
-static void vli_mult(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    __asm__ volatile (
-        "adiw r30, 30 \n\t"
-        "adiw r28, 30 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ldi r25, 0 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r24 \n\t"
-
-        "sbiw r30, 14 \n\t"
-        "sbiw r28, 12 \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r21, y+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "st z+, r23 \n\t"
-
-        "sbiw r30, 34 \n\t"
-        "sbiw r28, 22 \n\t"
-        "sbiw r26, 12 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r21, y+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r18, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r19, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r20, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r21, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r24 \n\t"
-        "st z+, r22 \n\t"
-
-        "sbiw r30, 54 \n\t"
-        "sbiw r28, 32 \n\t"
-        "sbiw r26, 22 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r12, y+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r17, y+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r18, y+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r19, y+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r20, y+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r21, y+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r18, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r19, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r20, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r21, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r18, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r19, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r20, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r21, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r25 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r25 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r5, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r8, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r19 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r18 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r9, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r11, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r21 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r24 \n\t"
-
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+y" (p_right), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#endif /* uECC_BYTES == 32 */
-
-#if uECC_SQUARE_FUNC
-
-#if (uECC_BYTES == 20)
-static void vli_square(uint8_t *p_result, uint8_t *p_left)
-{
-    __asm__ volatile (
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r12, x+ \n\t"
-        "ld r13, x+ \n\t"
-        "ld r14, x+ \n\t"
-        "ld r15, x+ \n\t"
-        "ld r16, x+ \n\t"
-        "ld r17, x+ \n\t"
-        "ld r18, x+ \n\t"
-        "ld r19, x+ \n\t"
-        "ld r20, x+ \n\t"
-        "ld r21, x+ \n\t"
-        "ldi r27, 0 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r2 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r3 \n\t"
-        "lsl r0 \n\t"
-        "rol r1 \n\t"
-        "adc r24, r27 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r27 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r4 \n\t"
-        "lsl r0 \n\t"
-        "rol r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r3, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r6 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r4, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r7 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r8 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r5, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r9 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r10 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r6, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r11 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r7, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r8, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r8, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r9, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r9, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r9, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r10, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r10, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r11, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r12, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r4, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r12, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r5, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r12, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r13, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r6, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r12, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r13, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r7, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r12, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r13, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r14, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r8, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r12, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r13, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r14, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r9, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r12, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r13, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r14, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r15, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r10, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r12, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r13, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r14, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r15, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r11, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r12, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r13, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r14, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r15, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r16, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r12, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r13, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r14, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r15, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r16, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r13, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r14, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r15, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r16, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r17, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r14, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r15, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r16, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r17, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r15, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r16, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "mul r17, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r18, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r16, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r17, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "mul r18, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r17, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r18, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r19, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r27 \n\t"
-        "add r23, r25 \n\t"
-        "adc r24, r26 \n\t"
-        "adc r22, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r26, 0 \n\t"
-        "mul r18, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r25, r1 \n\t"
-        "mul r19, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "adc r26, r27 \n\t"
-        "lsl r23 \n\t"
-        "rol r25 \n\t"
-        "rol r26 \n\t"
-        "add r23, r24 \n\t"
-        "adc r25, r22 \n\t"
-        "adc r26, r27 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r19, r21 \n\t"
-        "lsl r0 \n\t"
-        "rol r1 \n\t"
-        "adc r23, r27 \n\t"
-        "add r25, r0 \n\t"
-        "adc r26, r1 \n\t"
-        "adc r23, r27 \n\t"
-        "mul r20, r20 \n\t"
-        "add r25, r0 \n\t"
-        "adc r26, r1 \n\t"
-        "adc r23, r27 \n\t"
-        "st z+, r25 \n\t"
-
-        "ldi r25, 0 \n\t"
-        "mul r20, r21 \n\t"
-        "lsl r0 \n\t"
-        "rol r1 \n\t"
-        "adc r25, r27 \n\t"
-        "add r26, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r25, r27 \n\t"
-        "st z+, r26 \n\t"
-
-        "mul r21, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r25, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r25 \n\t"
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "cc", "memory"
-    );
-}
-#define asm_square 1
-
-#elif (uECC_BYTES == 24)
-
-__attribute((noinline))
-static void vli_square(uint8_t *p_result, uint8_t *p_left)
-{
-    __asm__ volatile (
-        "ldi r25, 0 \n\t"
-        "movw r28, r26 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "adiw r28, 20 \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "adiw r30, 20 \n\t"
-        
-        "ldi r23, 0 \n\t"
-        "mul 2, 12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-        
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-        
-        "ld r12, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ld r13, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-        
-        "ld r2, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r3, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-        
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "mul r3, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r24 \n\t"
-        "st z+, r22 \n\t"
-        
-        "sbiw r26, 4 \n\t"
-        "sbiw r30, 28 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r12, x+ \n\t"
-        "ld r13, x+ \n\t"
-        "ld r14, x+ \n\t"
-        "ld r15, x+ \n\t"
-        "ld r16, x+ \n\t"
-        "ld r17, x+ \n\t"
-        "ld r18, x+ \n\t"
-        "ld r19, x+ \n\t"
-        "ld r20, x+ \n\t"
-        "ld r21, x+ \n\t"
-        
-        "ldi r23, 0 \n\t"
-        "mul r2, r2 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-        
-        "ldi r24, 0 \n\t"
-        "mul r2, r3 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r6 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r4, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r7 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r8 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r5, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r9 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r10 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r6, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r11 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r7, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r8, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r9, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r10, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r11, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ld r2, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r12, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r3, r2 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r2 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r13, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r4, r3 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r5, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ld r4, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r5, r3 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r6, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r14, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r5, r4 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r6, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ld r5, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r4 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r7, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r15, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r6, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r7, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r7, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r8, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r16, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r8, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r9, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r9, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r10, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r17, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r10, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r11, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r11, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r12, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r18, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r12, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r13, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r13, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r14, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r19, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r14, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r15, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r15, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r16, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r20, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r16, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r17, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r17, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r18, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r21, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r18, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r19, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r19, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r20, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r2, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r20, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r21, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r22, 0 \n\t"
-        "mul r21, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r2, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r3, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r29, 0 \n\t"
-        "mul r2, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-        
-        "ldi r23, 0 \n\t"
-        "mul r3, r5 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r4 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r28 \n\t"
-        
-        "ldi r28, 0 \n\t"
-        "mul r4, r5 \n\t"
-        "add r29, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r28, r25 \n\t"
-        "add r29, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r28, r25 \n\t"
-        "st z+, r29 \n\t"
-        
-        "mul r5, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r28 \n\t"
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r28", "r29", "cc", "memory"
-    );
-}
-#define asm_square 1
-
-#elif (uECC_BYTES == 32)
-
-__attribute((noinline))
-static void vli_square(uint8_t *p_result, uint8_t *p_left)
-{
-    __asm__ volatile (
-        "ldi r25, 0 \n\t"
-        "movw r28, r26 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "adiw r28, 20 \n\t"
-        "ld r12, y+ \n\t"
-        "ld r13, y+ \n\t"
-        "ld r14, y+ \n\t"
-        "ld r15, y+ \n\t"
-        "ld r16, y+ \n\t"
-        "ld r17, y+ \n\t"
-        "adiw r30, 20 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul 2, 12 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r12, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r13, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r14, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r15, y+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r16, y+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r17, y+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r12 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r13 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r23, 0 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r2, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r3, r14 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r24, 0 \n\t"
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r2, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r3, r15 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r3, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r4, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r6, r17 \n\t"
-        "add r24, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r24 \n\t"
-
-        "mul r7, r17 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "st z+, r23 \n\t"
-
-        "sbiw r26, 12 \n\t"
-        "sbiw r30, 44 \n\t"
-        "ld r2, x+ \n\t"
-        "ld r3, x+ \n\t"
-        "ld r4, x+ \n\t"
-        "ld r5, x+ \n\t"
-        "ld r6, x+ \n\t"
-        "ld r7, x+ \n\t"
-        "ld r8, x+ \n\t"
-        "ld r9, x+ \n\t"
-        "ld r10, x+ \n\t"
-        "ld r11, x+ \n\t"
-        "ld r12, x+ \n\t"
-        "ld r13, x+ \n\t"
-        "ld r14, x+ \n\t"
-        "ld r15, x+ \n\t"
-        "ld r16, x+ \n\t"
-        "ld r17, x+ \n\t"
-        "ld r18, x+ \n\t"
-        "ld r19, x+ \n\t"
-        "ld r20, x+ \n\t"
-        "ld r21, x+ \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r2, r2 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-
-        "ldi r24, 0 \n\t"
-        "mul r2, r3 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r24, r25 \n\t"
-        "st z+, r22 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r6 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r4, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r7 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r8 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r5, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r9 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r10 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r6, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r11 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r12 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r7, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r14 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r8, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r15 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r16 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r9, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r17 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r18 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r10, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r19 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r2, r20 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r3, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r11, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r2, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r3, r21 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r4, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r12, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r3, r2 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r4, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r3, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r4, r2 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r5, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r13, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r4, r3 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r5, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r4, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r5, r3 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r6, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r14, r14 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r5, r4 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r6, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r5, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r6, r4 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r7, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r15, r15 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r6, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r7, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r6, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r7, r5 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r8, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r16, r16 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r7, r6 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r8, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r7, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r8, r6 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r9, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r10, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r17, r17 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r8, r7 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r9, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r8, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r9, r7 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r10, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r11, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r18, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r9, r8 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r10, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r11, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r9, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r10, r8 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r11, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r12, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r19, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r10, r9 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r11, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r12, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r10, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r11, r9 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r12, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r13, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r20, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r11, r10 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r12, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r13, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r11, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r12, r10 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r13, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r14, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r21, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r12, r11 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r13, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r14, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r12, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r13, r11 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r14, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r15, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r2, r2 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r13, r12 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r14, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r15, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ld r13, x+ \n\t"
-        "ldi r22, 0 \n\t"
-        "mul r14, r12 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r15, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r16, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r25 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r3, r3 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r14, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r15, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r16, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r17, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r3, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "ld r0, z \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r25 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r15, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r16, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r17, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r18, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r4, r4 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r16, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r17, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r18, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r19, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r3, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r17, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r18, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r19, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r20, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r5, r5 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r18, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r19, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r20, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r21, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r3, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r19, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r20, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r21, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r2, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r6, r6 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r20, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r21, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r2, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r3, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r21, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r2, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r3, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r4, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r7, r7 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r2, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r3, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r4, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r5, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r3, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r4, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r5, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r6, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r8, r8 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r4, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r5, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r6, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r7, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r5, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r6, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r7, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r8, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r9, r9 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r6, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r7, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r8, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r9, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r7, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r8, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "mul r9, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r10, r10 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r8, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r9, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "mul r10, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r22, 0 \n\t"
-        "mul r9, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r24, r1 \n\t"
-        "mul r10, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r24 \n\t"
-        "rol r22 \n\t"
-        "mul r11, r11 \n\t"
-        "add r23, r0 \n\t"
-        "adc r24, r1 \n\t"
-        "adc r22, r25 \n\t"
-        "add r23, r28 \n\t"
-        "adc r24, r29 \n\t"
-        "adc r22, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r29, 0 \n\t"
-        "mul r10, r13 \n\t"
-        "mov r23, r0 \n\t"
-        "mov r28, r1 \n\t"
-        "mul r11, r12 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "adc r29, r25 \n\t"
-        "lsl r23 \n\t"
-        "rol r28 \n\t"
-        "rol r29 \n\t"
-        "add r23, r24 \n\t"
-        "adc r28, r22 \n\t"
-        "adc r29, r25 \n\t"
-        "st z+, r23 \n\t"
-
-        "ldi r23, 0 \n\t"
-        "mul r11, r13 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "mul r12, r12 \n\t"
-        "add r28, r0 \n\t"
-        "adc r29, r1 \n\t"
-        "adc r23, r25 \n\t"
-        "st z+, r28 \n\t"
-
-        "ldi r28, 0 \n\t"
-        "mul r12, r13 \n\t"
-        "add r29, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r28, r25 \n\t"
-        "add r29, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "adc r28, r25 \n\t"
-        "st z+, r29 \n\t"
-
-        "mul r13, r13 \n\t"
-        "add r23, r0 \n\t"
-        "adc r28, r1 \n\t"
-        "st z+, r23 \n\t"
-        "st z+, r28 \n\t"
-        "eor r1, r1 \n\t"
-        : "+x" (p_left), "+z" (p_result)
-        :
-        : "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
-          "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r28", "r29", "cc", "memory"
-    );
-}
-#define asm_square 1
-
-#endif /* uECC_BYTES == xx */
-#endif /* uECC_SQUARE_FUNC */
-
-static void vli_modSub_fast(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t t1, t2;
-    __asm__ volatile (
-        "push r28 \n\t" /* Save Y */
-        "push r29 \n\t"
-        
-        "ld %[t1], x+ \n\t"  /* Load left word. */
-        "ld %[t2], y+ \n\t" /* Load right word. */
-        "sub %[t1], %[t2] \n\t" /* Subtract the first word. */
-        "st z+, %[t1] \n\t"  /* Store the first result word. */
-        
-        /* Now we just do the remaining words with the carry bit (using SBC) */
-        REPEAT(DEC(uECC_BYTES), "ld %[t1], x+ \n\t"
-            "ld %[t2], y+ \n\t"
-            "sbc %[t1], %[t2] \n\t"
-            "st z+, %[t1] \n\t")
-        
-        "brcs 1f \n\t" /* If borrow is set, then we need to add */
-        "rjmp done \n\t" /* otherwise we are done */
-        "1: \n\t"
-        
-        "sbiw r30, " STR(uECC_BYTES) " \n\t" /* make z point at p_result again */
-        "ldi r28, lo8(curve_p) \n\t" /* make y point at curve_p */
-       "ldi r29, hi8(curve_p) \n\t"
-       
-       /* do the addition */
-       "ld %[t1], z \n\t"
-        "ld %[t2], y+ \n\t"
-        "add %[t1], %[t2] \n\t"
-        "st z+, %[t1] \n\t"
-        REPEAT(DEC(uECC_BYTES), "ld %[t1], z \n\t"
-            "ld %[t2], y+ \n\t"
-            "adc %[t1], %[t2] \n\t"
-            "st z+, %[t1] \n\t")
-        
-        "done: \n\t"
-        "pop r29 \n\t" /* Restore Y */
-        "pop r28 \n\t"
-
-        : "+z" (p_result), "+x" (p_left),
-          [t1] "=&r" (t1), [t2] "=&r" (t2)
-        : "y" (p_right)
-        : "cc", "memory"
-    );
-}
-#define asm_modSub_fast 1
-
-#if uECC_CURVE == uECC_secp160r1
-static void vli_mmod_fast(uint8_t *RESTRICT p_result, uint8_t *RESTRICT p_product)
-{
-    uint8_t l_carry = 0;
-    __asm__ volatile (
-        "in r30, __SP_L__ \n\t"
-       "in r31, __SP_H__ \n\t"
-       "sbiw r30, 24 \n\t"
-       "in r0, __SREG__ \n\t"
-       "cli \n\t"
-       "out __SP_H__, r31 \n\t"
-       "out __SREG__, r0 \n\t"
-       "out __SP_L__, r30 \n\t"
-       
-       "adiw r30, 25 \n\t" /* we are shifting by 31 bits, so shift over 4 bytes (+ 1 since z initially points below the stack) */
-        "adiw r26, 40 \n\t" /* end of p_product */
-        "ld r18, -x \n\t"  /* Load word. */
-        "lsr r18 \n\t" /* Shift. */
-        "st -z, r18 \n\t"  /* Store the first result word. */
-
-        /* Now we just do the remaining words with the carry bit (using ROR) */
-        REPEAT(19, "ld r18, -x \n\t"
-            "ror r18 \n\t"
-            "st -z, r18 \n\t")
-
-        "eor r18, r18 \n\t" /* r18 = 0 */
-        "ror r18 \n\t" /* get last bit */
-        "st -z, r18 \n\t" /* store it */
-
-        "sbiw r30, 3 \n\t" /* move z back to point at tmp */
-        /* now we add p_right */
-        "ld r18, x+ \n\t"
-        "st z+, r18 \n\t" /* the first 3 bytes do not need to be added */
-        "ld r18, x+ \n\t"
-        "st z+, r18 \n\t"
-        "ld r18, x+ \n\t"
-        "st z+, r18 \n\t"
-
-        "ld r18, x+ \n\t"
-        "ld r19, z \n\t"
-        "add r18, r19 \n\t"
-        "st z+, r18 \n\t"
-
-        /* Now we just do the remaining words with the carry bit (using ADC) */
-        REPEAT(16, "ld r18, x+ \n\t"
-            "ld r19, z \n\t"
-            "adc r18, r19 \n\t"
-            "st z+, r18 \n\t")
-
-        /* Propagate over the remaining bytes of p_result */
-        "ld r18, z \n\t"
-        "adc r18, r1 \n\t"
-        "st z+, r18 \n\t"
-
-        "ld r18, z \n\t"
-        "adc r18, r1 \n\t"
-        "st z+, r18 \n\t"
-
-        "ld r18, z \n\t"
-        "adc r18, r1 \n\t"
-        "st z+, r18 \n\t"
-
-        "ld r18, z \n\t"
-        "adc r18, r1 \n\t"
-        "st z+, r18 \n\t"
-        
-        "sbiw r30, 24 \n\t" /* move z back to point at tmp */
-        "sbiw r26, 40 \n\t" /* move x back to point at p_product */
-        
-        /* add low bytes of tmp to p_product, storing in p_result */
-        "ld r18, z+ \n\t"
-        "ld r19, x+ \n\t"
-        "add r18, r19 \n\t"
-        "st y+, r18 \n\t"
-        REPEAT(19, "ld r18, z+ \n\t"
-            "ld r19, x+ \n\t"
-            "adc r18, r19 \n\t"
-            "st y+, r18 \n\t")
-        "adc %[carry], __zero_reg__ \n\t"    /* Store carry bit (carry flag is cleared). */
-        /* at this point x is at the end of p_product, y is at the end of p_result, z is 20 bytes into tmp */
-        "sbiw r28, 20 \n\t" /* move y back to point at p_result */
-        "adiw r30, 4 \n\t" /* move z to point to the end of tmp */
-        
-        /* do omega_mult again with the 4 relevant bytes */
-        /* z points to the end of tmp, x points to the end of p_product */
-        "ld r18, -z \n\t"  /* Load word. */
-        "lsr r18 \n\t" /* Shift. */
-        "st -x, r18 \n\t"  /* Store the first result word. */
-        
-        "ld r18, -z \n\t"
-        "ror r18 \n\t"
-        "st -x, r18 \n\t"
-        "ld r18, -z \n\t"
-        "ror r18 \n\t"
-        "st -x, r18 \n\t"
-        "ld r18, -z \n\t"
-        "ror r18 \n\t"
-        "st -x, r18 \n\t"
-        
-        "eor r18, r18 \n\t" /* r18 = 0 */
-        "ror r18 \n\t" /* get last bit */
-        "st -x, r18 \n\t" /* store it */
-        
-        "sbiw r26, 3 \n\t" /* move x back to point at beginning */
-        /* now we add a copy of the 4 bytes */
-        "ld r18, z+ \n\t"
-        "st x+, r18 \n\t" /* the first 3 bytes do not need to be added */
-        "ld r18, z+ \n\t"
-        "st x+, r18 \n\t"
-        "ld r18, z+ \n\t"
-        "st x+, r18 \n\t"
-        
-        "ld r18, z+ \n\t"
-        "ld r19, x \n\t"
-        "add r18, r19 \n\t"
-        "st x+, r18 \n\t"
-        
-        /* Propagate over the remaining bytes */
-        "ld r18, x \n\t"
-        "adc r18, r1 \n\t"
-        "st x+, r18 \n\t"
-        
-        "ld r18, x \n\t"
-        "adc r18, r1 \n\t"
-        "st x+, r18 \n\t"
-        
-        "ld r18, x \n\t"
-        "adc r18, r1 \n\t"
-        "st x+, r18 \n\t"
-        
-        "ld r18, x \n\t"
-        "adc r18, r1 \n\t"
-        "st x+, r18 \n\t"
-        
-        /* now z points to the end of tmp, x points to the end of p_product (y still points at p_result) */
-        "sbiw r26, 8 \n\t" /* move x back to point at beginning of actual data */
-        /* add into p_result */
-        "ld r18, x+ \n\t"
-        "ld r19, y \n\t"
-        "add r18, r19 \n\t"
-        "st y+, r18 \n\t"
-        REPEAT(7, "ld r18, x+ \n\t"
-            "ld r19, y \n\t"
-            "adc r18, r19 \n\t"
-            "st y+, r18 \n\t")
-        
-        /* Done adding, now propagate carry bit */
-        REPEAT(12, "ld r18, y \n\t"
-            "adc r18, __zero_reg__ \n\t"
-            "st y+, r18 \n\t")
-        
-        "adc %[carry], __zero_reg__ \n\t"    /* Store carry bit (carry flag is cleared). */
-        "sbiw r28, 20 \n\t" /* move y back to point at p_result */
-        
-        "sbiw r30, 1 \n\t" /* fix stack pointer */
-       "in r0, __SREG__ \n\t"
-       "cli \n\t"
-       "out __SP_H__, r31 \n\t"
-       "out __SREG__, r0 \n\t"
-       "out __SP_L__, r30 \n\t"
-        
-        : "+x" (p_product), [carry] "+r" (l_carry)
-        : "y" (p_result)
-        : "r0", "r18", "r19", "r30", "r31", "cc", "memory"
-    );
-    
-    if(l_carry > 0)
-    {
-        --l_carry;
-        vli_sub(p_result, p_result, curve_p);
-    }
-    if(l_carry > 0)
-    {
-        vli_sub(p_result, p_result, curve_p);
-    }
-    
-    if(vli_cmp(p_result, curve_p) > 0)
-    {
-        vli_sub(p_result, p_result, curve_p);
-    }
-}
-#define asm_mmod_fast 1
-
-#elif (uECC_CURVE == uECC_secp256k1)
-static void vli_mmod_fast(uint8_t *RESTRICT p_result, uint8_t *RESTRICT p_product)
-{
-    uint8_t l_carry = 0;
-    __asm__ volatile (
-        "in r30, __SP_L__ \n\t"
-       "in r31, __SP_H__ \n\t"
-       "sbiw r30, 37 \n\t"
-       "in r0, __SREG__ \n\t"
-       "cli \n\t"
-       "out __SP_H__, r31 \n\t"
-       "out __SREG__, r0 \n\t"
-       "out __SP_L__, r30 \n\t"
-       
-       "adiw r30, 1 \n\t" /* add 1 since z initially points below the stack */
-        "adiw r26, 32 \n\t" /* p_product + uECC_WORDS */
-        "ldi r25, 0x03 \n\t"
-        "ldi r24, 0xD1 \n\t"
-        "ld r18, x+ \n\t"
-        "ld r19, x+ \n\t"
-        "ld r20, x+ \n\t"
-        "ld r21, x+ \n\t"
-        
-        "mul r24, r18 \n\t"
-        "st z+, r0 \n\t"
-        "mov r22, r1 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "mul r24, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t" /* can't overflow */
-        "mul r25, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t" /* can't overflow */
-        "st z+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "mul r24, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "mul r25, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "mul r24, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r25, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        /* now we start adding the 2^32 part as well */
-        "add r23, r18 \n\t" // 28
-        "adc r22, r22 \n\t"
-        "ld r18, x+ \n\t"
-        "mul r24, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "mul r25, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "add r22, r19 \n\t" // 27
-        "adc r23, r23 \n\t"
-        "ld r19, x+ \n\t"
-        "mul r24, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r25, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        REPEAT(6, // 26 - 3
-            "add r23, r20 \n\t"
-            "adc r22, r22 \n\t"
-            "ld r20, x+ \n\t"
-            "mul r24, r20 \n\t"
-            "add r23, r0 \n\t"
-            "adc r22, r1 \n\t"
-            "mul r25, r19 \n\t"
-            "add r23, r0 \n\t"
-            "adc r22, r1 \n\t"
-            "st z+, r23 \n\t"
-            "ldi r23, 0 \n\t"
-            
-            "add r22, r21 \n\t"
-            "adc r23, r23 \n\t"
-            "ld r21, x+ \n\t"
-            "mul r24, r21 \n\t"
-            "add r22, r0 \n\t"
-            "adc r23, r1 \n\t"
-            "mul r25, r20 \n\t"
-            "add r22, r0 \n\t"
-            "adc r23, r1 \n\t"
-            "st z+, r22 \n\t"
-            "ldi r22, 0 \n\t"
-            
-            "add r23, r18 \n\t"
-            "adc r22, r22 \n\t"
-            "ld r18, x+ \n\t"
-            "mul r24, r18 \n\t"
-            "add r23, r0 \n\t"
-            "adc r22, r1 \n\t"
-            "mul r25, r21 \n\t"
-            "add r23, r0 \n\t"
-            "adc r22, r1 \n\t"
-            "st z+, r23 \n\t"
-            "ldi r23, 0 \n\t"
-            
-            "add r22, r19 \n\t"
-            "adc r23, r23 \n\t"
-            "ld r19, x+ \n\t"
-            "mul r24, r19 \n\t"
-            "add r22, r0 \n\t"
-            "adc r23, r1 \n\t"
-            "mul r25, r18 \n\t"
-            "add r22, r0 \n\t"
-            "adc r23, r1 \n\t"
-            "st z+, r22 \n\t"
-            "ldi r22, 0 \n\t")
-
-        "add r23, r20 \n\t" // 2
-        "adc r22, r22 \n\t"
-        "ld r20, x+ \n\t"
-        "mul r24, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "mul r25, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "add r22, r21 \n\t" // 1
-        "adc r23, r23 \n\t"
-        "ld r21, x+ \n\t"
-        "mul r24, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r25, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st z+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        /* Now finish the carries etc */
-        "add r23, r18 \n\t"
-        "adc r22, r22 \n\t"
-        "mul r25, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st z+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "add r22, r19 \n\t"
-        "adc r23, r23 \n\t"
-        "st z+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "add r23, r20 \n\t"
-        "adc r22, r22 \n\t"
-        "st z+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "add r22, r21 \n\t"
-        "adc r23, r23 \n\t"
-        "st z+, r22 \n\t"
-        "st z+, r23 \n\t"
-        "eor r1, r1 \n\t" /* make r1 be 0 again */
-        
-        "sbiw r30, 37 \n\t" /* move z back to point at tmp */
-        "subi r26, 64 \n\t" /* move x back to point at p_product */
-        "sbc r27, __zero_reg__ \n\t"
-        
-        /* add low bytes of tmp to p_product, storing in p_result */
-        "ld r18, z+ \n\t"
-        "ld r19, x+ \n\t"
-        "add r18, r19 \n\t"
-        "st y+, r18 \n\t"
-        REPEAT(31, "ld r18, z+ \n\t"
-            "ld r19, x+ \n\t"
-            "adc r18, r19 \n\t"
-            "st y+, r18 \n\t")
-        
-        "adc %[carry], __zero_reg__ \n\t"    /* Store carry bit (carry flag is cleared). */
-        /* at this point x is at the end of p_product, y is at the end of p_result, z is 32 bytes into tmp */
-        "sbiw r28, 32 \n\t" /* move y back to point at p_result */
-
-        /* do omega_mult again with the 5 relevant bytes */
-        /* z points to l_tmp + uECC_WORDS, x points to the end of p_product */
-        "sbiw r26, 32 \n\t" /* shift x back to point into the p_product buffer (we can overwrite it now) */
-        
-        "ld r18, z+ \n\t"
-        "ld r19, z+ \n\t"
-        "ld r20, z+ \n\t"
-        "ld r21, z+ \n\t"
-        
-        "mul r24, r18 \n\t"
-        "st x+, r0 \n\t"
-        "mov r22, r1 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "mul r24, r19 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t" /* can't overflow */
-        "mul r25, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t" /* can't overflow */
-        "st x+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "mul r24, r20 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "mul r25, r19 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st x+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "mul r24, r21 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "mul r25, r20 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st x+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "add r23, r18 \n\t"
-        "adc r22, r22 \n\t"
-        "ld r18, z+ \n\t"
-        "mul r24, r18 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "mul r25, r21 \n\t"
-        "add r23, r0 \n\t"
-        "adc r22, r1 \n\t"
-        "st x+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        /* Now finish the carries etc */
-        "add r22, r19 \n\t"
-        "adc r23, r23 \n\t"
-        "mul r25, r18 \n\t"
-        "add r22, r0 \n\t"
-        "adc r23, r1 \n\t"
-        "st x+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "add r23, r20 \n\t"
-        "adc r22, r22 \n\t"
-        "st x+, r23 \n\t"
-        "ldi r23, 0 \n\t"
-        
-        "add r22, r21 \n\t"
-        "adc r23, r23 \n\t"
-        "st x+, r22 \n\t"
-        "ldi r22, 0 \n\t"
-        
-        "add r23, r18 \n\t"
-        "adc r22, r22 \n\t"
-        "st x+, r23 \n\t"
-        "st x+, r22 \n\t"
-        "eor r1, r1 \n\t" /* make r1 be 0 again */
-        
-        /* now z points to the end of tmp, x points to the end of p_product (y still points at p_result) */
-        "sbiw r26, 10 \n\t" /* move x back to point at beginning of actual data */
-        /* add into p_result */
-        "ld r18, x+ \n\t"
-        "ld r19, y \n\t"
-        "add r18, r19 \n\t"
-        "st y+, r18 \n\t"
-        REPEAT(9, "ld r18, x+ \n\t"
-            "ld r19, y \n\t"
-            "adc r18, r19 \n\t"
-            "st y+, r18 \n\t")
-        
-        /* Done adding, now propagate carry bit */
-        REPEAT(22, "ld r18, y \n\t"
-            "adc r18, __zero_reg__ \n\t"
-            "st y+, r18 \n\t")
-        
-        "adc %[carry], __zero_reg__ \n\t"    /* Store carry bit (carry flag is cleared). */
-        "sbiw r28, 32 \n\t" /* move y back to point at p_result */
-        
-        "sbiw r30, 1 \n\t" /* fix stack pointer */
-       "in r0, __SREG__ \n\t"
-       "cli \n\t"
-       "out __SP_H__, r31 \n\t"
-       "out __SREG__, r0 \n\t"
-       "out __SP_L__, r30 \n\t"
-        
-        : "+x" (p_product), [carry] "+r" (l_carry)
-        : "y" (p_result)
-        : "r0", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r30", "r31", "cc", "memory"
-    );
-    
-    if(l_carry > 0)
-    {
-        --l_carry;
-        vli_sub(p_result, p_result, curve_p);
-    }
-    if(l_carry > 0)
-    {
-        vli_sub(p_result, p_result, curve_p);
-    }
-    
-    if(vli_cmp(p_result, curve_p) > 0)
-    {
-        vli_sub(p_result, p_result, curve_p);
-    }
-}
-#define asm_mmod_fast 1
-
-#endif /* (uECC_CURVE == uECC_secp256k1) */
-
-#endif /* (uECC_ASM == uECC_asm_fast) */
-
-#if !asm_rshift1
-static void vli_rshift1(uint8_t *p_vli)
-{
-    uint8_t i = uECC_BYTES;
-    __asm__ volatile (
-        "adiw r30, " STR(uECC_BYTES) " \n\t"
-        "clc \n\t"
-        
-        "1: \n\t"
-        "ld r0, -z \n\t"
-        "ror r0 \n\t"
-        "st z, r0 \n\t"
-        "dec %[i] \n\t"
-        "brne 1b \n\t"
-
-        : "+z" (p_vli), [i] "+r" (i)
-        : 
-        : "r0", "cc", "memory"
-    );
-}
-#define asm_rshift1 1
-#endif
-
-#if !asm_add
-static uint8_t vli_add(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t i = uECC_BYTES;
-    uint8_t l_carry = 0;
-    uint8_t l_left;
-    uint8_t l_right;
-
-    __asm__ volatile (
-        "clc \n\t"
-        
-        "1: \n\t"
-        "ld %[left], x+ \n\t"  /* Load left byte. */
-        "ld %[right], y+ \n\t" /* Load right byte. */
-        "adc %[left], %[right] \n\t" /* Add. */
-        "st z+, %[left] \n\t"  /* Store the result. */
-        "dec %[i] \n\t"
-        "brne 1b \n\t"
-        
-        "adc %[carry], %[carry] \n\t"    /* Store carry bit in l_carry. */
-        
-        "sbiw r28, " STR(uECC_BYTES) " \n\t" /* Restore Y */
-
-        : "+z" (p_result), "+x" (p_left), [i] "+r" (i),
-            [carry] "+r" (l_carry), [left] "=&r" (l_left), [right] "=&r" (l_right)
-        : "y" (p_right)
-        : "cc", "memory"
-    );
-    return l_carry;
-}
-#define asm_add 1
-#endif
-
-#if !asm_sub
-static uint8_t vli_sub(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t i = uECC_BYTES;
-    uint8_t l_borrow = 0;
-    uint8_t l_left;
-    uint8_t l_right;
-
-    __asm__ volatile (
-        "clc \n\t"
-        
-        "1: \n\t"
-        "ld %[left], x+ \n\t"  /* Load left byte. */
-        "ld %[right], y+ \n\t" /* Load right byte. */
-        "sbc %[left], %[right] \n\t" /* Subtract. */
-        "st z+, %[left] \n\t"  /* Store the result. */
-        "dec %[i] \n\t"
-        "brne 1b \n\t"
-        
-        "adc %[borrow], %[borrow] \n\t"    /* Store carry bit in l_borrow. */
-        
-        "sbiw r28, " STR(uECC_BYTES) " \n\t" /* Restore Y */
-
-        : "+z" (p_result), "+x" (p_left), [i] "+r" (i),
-            [borrow] "+r" (l_borrow), [left] "=&r" (l_left), [right] "=&r" (l_right)
-        : "y" (p_right)
-        : "cc", "memory"
-    );
-    return l_borrow;
-}
-#define asm_sub 1
-#endif
-
-#if !asm_mult
-__attribute((noinline))
-static void vli_mult(uint8_t *p_result, uint8_t *p_left, uint8_t *p_right)
-{
-    uint8_t r0 = 0;
-    uint8_t r1 = 0;
-    uint8_t r2 = 0;
-    
-    uint8_t l_zero = 0;
-    
-    uint8_t k, i;
-    
-    __asm__ volatile (
-        "ldi %[k], 1 \n\t" /* k = 1; k < uECC_BYTES; ++k */
-        
-        "1: \n\t"
-        "ldi %[i], 0 \n\t"  /* i=0; i < k; ++i */
-        
-        "add r28, %[k] \n\t" /* pre-add right ptr */
-        "adc r29, %[zero] \n\t"
-        
-        "2: \n\t"
-        "ld r0, x+ \n\t"
-        "ld r1, -y \n\t"
-        "mul r0, r1 \n\t"
-        
-        "add %[r0], r0 \n\t"
-        "adc %[r1], r1 \n\t"
-        "adc %[r2], %[zero] \n\t"
-        
-        "inc %[i] \n\t"
-        "cp %[i], %[k] \n\t"
-        "brlo 2b \n\t" /* loop if i < k */
-        
-        "sub r26, %[k] \n\t" /* fix up left ptr */
-        "sbc r27, %[zero] \n\t"
-        
-        "st z+, %[r0] \n\t"  /* Store the result. */
-        "mov %[r0], %[r1] \n\t"
-        "mov %[r1], %[r2] \n\t"
-        "mov %[r2], %[zero] \n\t"
-        
-        "inc %[k] \n\t"
-        "cpi %[k], " STR(uECC_BYTES) " \n\t"
-        "brlo 1b \n\t" /* loop if k < uECC_BYTES */
-        
-        /* second half */
-        "ldi %[k], " STR(uECC_BYTES) " \n\t" /* k = uECC_BYTES; k > 0; --k */
-        "adiw r28, " STR(uECC_BYTES) " \n\t" /* move right ptr to point at the end of p_right */
-        
-        "1: \n\t"
-        "ldi %[i], 0 \n\t" /* i=0; i < k; ++i */
-        
-        "2: \n\t"
-        "ld r0, x+ \n\t"
-        "ld r1, -y \n\t"
-        "mul r0, r1 \n\t"
-        
-        "add %[r0], r0 \n\t"
-        "adc %[r1], r1 \n\t"
-        "adc %[r2], %[zero] \n\t"
-        
-        "inc %[i] \n\t"
-        "cp %[i], %[k] \n\t"
-        "brlo 2b \n\t" /* loop if i < k */
-        
-        "add r28, %[k] \n\t" /* fix up right ptr */
-        "adc r29, %[zero] \n\t"
-        
-        "st z+, %[r0] \n\t"  /* Store the result. */
-        "mov %[r0], %[r1] \n\t"
-        "mov %[r1], %[r2] \n\t"
-        "mov %[r2], %[zero] \n\t"
-        
-        "dec %[k] \n\t"
-        "sub r26, %[k] \n\t" /* fix up left ptr (after k is decremented, so next time we start 1 higher) */
-        "sbc r27, %[zero] \n\t"
-        
-        "cpi %[k], 0 \n\t"
-        "brne 1b \n\t" /* loop if k > 0 */
-        
-        "st z+, %[r0] \n\t"  /* Store last result byte. */
-        
-        "eor r1, r1 \n\t" /* fix r1 to be 0 again */
-        
-        "sbiw r28, " STR(uECC_BYTES) " \n\t" /* Restore Y */
-    
-        : "+z" (p_result), "+x" (p_left),
-          [r0] "+r" (r0), [r1] "+r" (r1), [r2] "+r" (r2), [zero] "+r" (l_zero),
-          [k] "=&a" (k), [i] "=&a" (i)
-        : "y" (p_right)
-        : "r0", "cc", "memory"
-    );
-}
-#define asm_mult 1
-#endif
-
-#if uECC_SQUARE_FUNC
-#if !asm_square
-static void vli_square(uint8_t *p_result, uint8_t *p_left)
-{
-    uint8_t r0 = 0;
-    uint8_t r1 = 0;
-    uint8_t r2 = 0;
-    
-    uint8_t l_zero = 0;
-    
-    uint8_t k;
-    
-    __asm__ volatile (
-        "ldi %[k], 1 \n\t" /* k = 1; k < uECC_BYTES*2; ++k */
-        
-        "1: \n\t"
-        
-        "movw r26, %[orig] \n\t"  /* copy orig ptr to 'left' ptr */
-        "movw r30, %[orig] \n\t"  /* copy orig ptr to 'right' ptr */
-        "cpi %[k], " STR(uECC_BYTES) " \n\t"
-        "brlo 2f \n\t"
-        "breq 2f \n\t"
-        
-        /* when k > uECC_BYTES, we start from (k - uECC_BYTES) on the 'left' ptr */
-        "add r26, %[k] \n\t"
-        "adc r27, %[zero] \n\t"
-        "subi r26, " STR(uECC_BYTES) " \n\t"
-        "sbc r27, %[zero] \n\t"
-        "adiw r30, " STR(uECC_BYTES) " \n\t" /* move right ptr to point at the end */
-        "rjmp 3f \n\t"
-        
-        "2: \n\t" /* when k <= uECC_BYTES, we add k to the 'right' ptr */
-        "add r30, %[k] \n\t" /* pre-add 'right' ptr */
-        "adc r31, %[zero] \n\t"
-        
-        "3: \n\t"
-        "ld r0, x+ \n\t"
-        "cp r26, r30 \n\t" /* if left == right here, then we are done after this mult (and we don't need to double) */
-        "breq 4f \n\t"
-        "ld r1, -z \n\t"
-        "mul r0, r1 \n\t"
-        
-        /* add twice since it costs the same as doubling */
-        "add %[r0], r0 \n\t"
-        "adc %[r1], r1 \n\t"
-        "adc %[r2], %[zero] \n\t"
-        "add %[r0], r0 \n\t"
-        "adc %[r1], r1 \n\t"
-        "adc %[r2], %[zero] \n\t"
-        
-        "cpse r26, r30 \n\t" /* if left == right here, then we are done */
-        "rjmp 3b \n\t"
-        "rjmp 5f \n\t" /* skip code for non-doubled mult */
-        
-        "4: \n\t"
-        "ld r1, -z \n\t"
-        "mul r0, r1 \n\t"
-        "add %[r0], r0 \n\t"
-        "adc %[r1], r1 \n\t"
-        "adc %[r2], %[zero] \n\t"
-        
-        "5: \n\t"
-        "movw r30, %[result] \n\t"  /* make z point to result */
-        "st z+, %[r0] \n\t"  /* Store the result. */
-        "movw %[result], r30 \n\t"  /* update result ptr*/
-        "mov %[r0], %[r1] \n\t"
-        "mov %[r1], %[r2] \n\t"
-        "mov %[r2], %[zero] \n\t"
-        
-        "inc %[k] \n\t"
-        "cpi %[k], %[max] \n\t"
-        "brlo 1b \n\t" /* loop if k < uECC_BYTES */
-        
-        "movw r30, %[result] \n\t"  /* make z point to result */
-        "st z+, %[r0] \n\t"  /* Store last result byte. */
-        
-        "eor r1, r1 \n\t" /* fix r1 to be 0 again */
-    
-        : [result] "+r" (p_result),
-          [r0] "+r" (r0), [r1] "+r" (r1), [r2] "+r" (r2), [zero] "+r" (l_zero),
-          [k] "=&a" (k)
-        : [orig] "r" (p_left), [max] "M" (2*uECC_BYTES)
-        : "r0", "r26", "r27", "r30", "r31", "cc", "memory"
-    );
-}
-#define asm_square 1
-#endif
-#endif /* uECC_SQUARE_FUNC */
diff --git a/extlibs/tinydtls/ecc/ecc.c b/extlibs/tinydtls/ecc/ecc.c
deleted file mode 100644 (file)
index 4c2b532..0000000
+++ /dev/null
@@ -1,2474 +0,0 @@
-/* Copyright 2014, Kenneth MacKay. Licensed under the BSD 2-clause license. */
-
-#include "ecc.h"
-
-#ifndef uECC_PLATFORM
-    #if __AVR__
-        #define uECC_PLATFORM uECC_avr
-    #elif defined(__thumb2__) || defined(_M_ARMT) /* I think MSVC only supports Thumb-2 targets */
-        #define uECC_PLATFORM uECC_arm_thumb2
-    #elif defined(__thumb__)
-        #define uECC_PLATFORM uECC_arm_thumb
-    #elif defined(__arm__) || defined(_M_ARM)
-        #define uECC_PLATFORM uECC_arm
-    #elif defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__I86__)
-        #define uECC_PLATFORM uECC_x86
-    #elif defined(__amd64__) || defined(_M_X64)
-        #define uECC_PLATFORM uECC_x86_64
-    #else
-        #define uECC_PLATFORM uECC_arch_other
-    #endif
-#endif
-
-#ifndef uECC_WORD_SIZE
-    #if uECC_PLATFORM == uECC_avr
-        #define uECC_WORD_SIZE 1
-    #elif (uECC_PLATFORM == uECC_x86_64)
-        #define uECC_WORD_SIZE 8
-    #else
-        #define uECC_WORD_SIZE 4
-    #endif
-#endif
-
-#if (uECC_CURVE == uECC_secp160r1) && (uECC_WORD_SIZE == 8)
-    #undef uECC_WORD_SIZE
-    #define uECC_WORD_SIZE 4
-    #if (uECC_PLATFORM == uECC_x86_64)
-        #undef uECC_PLATFORM
-        #define uECC_PLATFORM uECC_x86
-    #endif
-#endif
-
-#if (uECC_WORD_SIZE != 1) && (uECC_WORD_SIZE != 4) && (uECC_WORD_SIZE != 8)
-    #error "Unsupported value for uECC_WORD_SIZE"
-#endif
-
-#if (uECC_ASM && (uECC_PLATFORM == uECC_avr) && (uECC_WORD_SIZE != 1))
-    #pragma message ("uECC_WORD_SIZE must be 1 when using AVR asm")
-    #undef uECC_WORD_SIZE
-    #define uECC_WORD_SIZE 1
-#endif
-
-#if (uECC_ASM && (uECC_PLATFORM == uECC_arm || uECC_PLATFORM == uECC_arm_thumb) && (uECC_WORD_SIZE != 4))
-    #pragma message ("uECC_WORD_SIZE must be 4 when using ARM asm")
-    #undef uECC_WORD_SIZE
-    #define uECC_WORD_SIZE 4
-#endif
-
-#if __STDC_VERSION__ >= 199901L
-    #define RESTRICT restrict
-#else
-    #define RESTRICT
-#endif
-
-#if defined(__SIZEOF_INT128__) || ((__clang_major__ * 100 + __clang_minor__) >= 302)
-    #define SUPPORTS_INT128 1
-#else
-    #define SUPPORTS_INT128 0
-#endif
-
-#define MAX_TRIES 16
-
-#if (uECC_WORD_SIZE == 1)
-
-typedef uint8_t uECC_word_t;
-typedef uint16_t uECC_dword_t;
-typedef uint8_t wordcount_t;
-typedef int8_t swordcount_t;
-typedef int16_t bitcount_t;
-typedef int8_t cmpresult_t;
-
-#define HIGH_BIT_SET 0x80
-#define uECC_WORD_BITS 8
-#define uECC_WORD_BITS_SHIFT 3
-#define uECC_WORD_BITS_MASK 0x07
-
-#define uECC_WORDS_1 20
-#define uECC_WORDS_2 24
-#define uECC_WORDS_3 32
-#define uECC_WORDS_4 32
-
-#define uECC_N_WORDS_1 21
-#define uECC_N_WORDS_2 24
-#define uECC_N_WORDS_3 32
-#define uECC_N_WORDS_4 32
-
-#define Curve_P_1 {0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF}
-#define Curve_P_2 {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
-#define Curve_P_3 {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, \
-                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-                   0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF}
-#define Curve_P_4 {0x2F, 0xFC, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
-
-#define Curve_B_1 {0x45, 0xFA, 0x65, 0xC5, 0xAD, 0xD4, 0xD4, 0x81, \
-                   0x9F, 0xF8, 0xAC, 0x65, 0x8B, 0x7A, 0xBD, 0x54, \
-                   0xFC, 0xBE, 0x97, 0x1C}
-#define Curve_B_2 {0xB1, 0xB9, 0x46, 0xC1, 0xEC, 0xDE, 0xB8, 0xFE, \
-                   0x49, 0x30, 0x24, 0x72, 0xAB, 0xE9, 0xA7, 0x0F, \
-                   0xE7, 0x80, 0x9C, 0xE5, 0x19, 0x05, 0x21, 0x64}
-#define Curve_B_3 {0x4B, 0x60, 0xD2, 0x27, 0x3E, 0x3C, 0xCE, 0x3B, \
-                   0xF6, 0xB0, 0x53, 0xCC, 0xB0, 0x06, 0x1D, 0x65, \
-                   0xBC, 0x86, 0x98, 0x76, 0x55, 0xBD, 0xEB, 0xB3, \
-                   0xE7, 0x93, 0x3A, 0xAA, 0xD8, 0x35, 0xC6, 0x5A}
-#define Curve_B_4 {0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
-                   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-#define Curve_G_1 { \
-    {0x82, 0xFC, 0xCB, 0x13, 0xB9, 0x8B, 0xC3, 0x68, \
-        0x89, 0x69, 0x64, 0x46, 0x28, 0x73, 0xF5, 0x8E, \
-        0x68, 0xB5, 0x96, 0x4A}, \
-    {0x32, 0xFB, 0xC5, 0x7A, 0x37, 0x51, 0x23, 0x04, \
-        0x12, 0xC9, 0xDC, 0x59, 0x7D, 0x94, 0x68, 0x31, \
-        0x55, 0x28, 0xA6, 0x23}}
-
-#define Curve_G_2 { \
-    {0x12, 0x10, 0xFF, 0x82, 0xFD, 0x0A, 0xFF, 0xF4, \
-        0x00, 0x88, 0xA1, 0x43, 0xEB, 0x20, 0xBF, 0x7C, \
-        0xF6, 0x90, 0x30, 0xB0, 0x0E, 0xA8, 0x8D, 0x18}, \
-    {0x11, 0x48, 0x79, 0x1E, 0xA1, 0x77, 0xF9, 0x73, \
-        0xD5, 0xCD, 0x24, 0x6B, 0xED, 0x11, 0x10, 0x63, \
-        0x78, 0xDA, 0xC8, 0xFF, 0x95, 0x2B, 0x19, 0x07}}
-
-#define Curve_G_3 { \
-    {0x96, 0xC2, 0x98, 0xD8, 0x45, 0x39, 0xA1, 0xF4, \
-        0xA0, 0x33, 0xEB, 0x2D, 0x81, 0x7D, 0x03, 0x77, \
-        0xF2, 0x40, 0xA4, 0x63, 0xE5, 0xE6, 0xBC, 0xF8, \
-        0x47, 0x42, 0x2C, 0xE1, 0xF2, 0xD1, 0x17, 0x6B}, \
-    {0xF5, 0x51, 0xBF, 0x37, 0x68, 0x40, 0xB6, 0xCB, \
-        0xCE, 0x5E, 0x31, 0x6B, 0x57, 0x33, 0xCE, 0x2B, \
-        0x16, 0x9E, 0x0F, 0x7C, 0x4A, 0xEB, 0xE7, 0x8E, \
-        0x9B, 0x7F, 0x1A, 0xFE, 0xE2, 0x42, 0xE3, 0x4F}}
-
-#define Curve_G_4 { \
-    {0x98, 0x17, 0xF8, 0x16, 0x5B, 0x81, 0xF2, 0x59, \
-        0xD9, 0x28, 0xCE, 0x2D, 0xDB, 0xFC, 0x9B, 0x02, \
-        0x07, 0x0B, 0x87, 0xCE, 0x95, 0x62, 0xA0, 0x55, \
-        0xAC, 0xBB, 0xDC, 0xF9, 0x7E, 0x66, 0xBE, 0x79}, \
-    {0xB8, 0xD4, 0x10, 0xFB, 0x8F, 0xD0, 0x47, 0x9C, \
-        0x19, 0x54, 0x85, 0xA6, 0x48, 0xB4, 0x17, 0xFD, \
-        0xA8, 0x08, 0x11, 0x0E, 0xFC, 0xFB, 0xA4, 0x5D, \
-        0x65, 0xC4, 0xA3, 0x26, 0x77, 0xDA, 0x3A, 0x48}}
-
-#define Curve_N_1 {0x57, 0x22, 0x75, 0xCA, 0xD3, 0xAE, 0x27, 0xF9, \
-                   0xC8, 0xF4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, \
-                   0x00, 0x00, 0x00, 0x00, 0x01}
-#define Curve_N_2 {0x31, 0x28, 0xD2, 0xB4, 0xB1, 0xC9, 0x6B, 0x14, \
-                   0x36, 0xF8, 0xDE, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
-#define Curve_N_3 {0x51, 0x25, 0x63, 0xFC, 0xC2, 0xCA, 0xB9, 0xF3, \
-                   0x84, 0x9E, 0x17, 0xA7, 0xAD, 0xFA, 0xE6, 0xBC, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF}
-#define Curve_N_4 {0x41, 0x41, 0x36, 0xD0, 0x8C, 0x5E, 0xD2, 0xBF, \
-                   0x3B, 0xA0, 0x48, 0xAF, 0xE6, 0xDC, 0xAE, 0xBA, \
-                   0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
-                   0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
-
-#elif (uECC_WORD_SIZE == 4)
-
-typedef uint32_t uECC_word_t;
-typedef uint64_t uECC_dword_t;
-typedef unsigned wordcount_t;
-typedef int swordcount_t;
-typedef int bitcount_t;
-typedef int cmpresult_t;
-
-#define HIGH_BIT_SET 0x80000000
-#define uECC_WORD_BITS 32
-#define uECC_WORD_BITS_SHIFT 5
-#define uECC_WORD_BITS_MASK 0x01F
-
-#define uECC_WORDS_1 5
-#define uECC_WORDS_2 6
-#define uECC_WORDS_3 8
-#define uECC_WORDS_4 8
-
-#define uECC_N_WORDS_1 6
-#define uECC_N_WORDS_2 6
-#define uECC_N_WORDS_3 8
-#define uECC_N_WORDS_4 8
-
-#define Curve_P_1 {0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
-#define Curve_P_2 {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
-#define Curve_P_3 {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xFFFFFFFF}
-#define Curve_P_4 {0xFFFFFC2F, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
-
-#define Curve_B_1 {0xC565FA45, 0x81D4D4AD, 0x65ACF89F, 0x54BD7A8B, 0x1C97BEFC}
-#define Curve_B_2 {0xC146B9B1, 0xFEB8DEEC, 0x72243049, 0x0FA7E9AB, 0xE59C80E7, 0x64210519}
-#define Curve_B_3 {0x27D2604B, 0x3BCE3C3E, 0xCC53B0F6, 0x651D06B0, 0x769886BC, 0xB3EBBD55, 0xAA3A93E7, 0x5AC635D8}
-#define Curve_B_4 {0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}
-
-#define Curve_G_1 { \
-    {0x13CBFC82, 0x68C38BB9, 0x46646989, 0x8EF57328, 0x4A96B568}, \
-    {0x7AC5FB32, 0x04235137, 0x59DCC912, 0x3168947D, 0x23A62855}}
-
-#define Curve_G_2 { \
-    {0x82FF1012, 0xF4FF0AFD, 0x43A18800, 0x7CBF20EB, 0xB03090F6, 0x188DA80E}, \
-    {0x1E794811, 0x73F977A1, 0x6B24CDD5, 0x631011ED, 0xFFC8DA78, 0x07192B95}}
-
-#define Curve_G_3 { \
-    {0xD898C296, 0xF4A13945, 0x2DEB33A0, 0x77037D81, 0x63A440F2, 0xF8BCE6E5, 0xE12C4247, 0x6B17D1F2}, \
-    {0x37BF51F5, 0xCBB64068, 0x6B315ECE, 0x2BCE3357, 0x7C0F9E16, 0x8EE7EB4A, 0xFE1A7F9B, 0x4FE342E2}}
-
-#define Curve_G_4 { \
-    {0x16F81798, 0x59F2815B, 0x2DCE28D9, 0x029BFCDB, 0xCE870B07, 0x55A06295, 0xF9DCBBAC, 0x79BE667E}, \
-    {0xFB10D4B8, 0x9C47D08F, 0xA6855419, 0xFD17B448, 0x0E1108A8, 0x5DA4FBFC, 0x26A3C465, 0x483ADA77}}
-
-#define Curve_N_1 {0xCA752257, 0xF927AED3, 0x0001F4C8, 0x00000000, 0x00000000, 0x00000001}
-#define Curve_N_2 {0xB4D22831, 0x146BC9B1, 0x99DEF836, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
-#define Curve_N_3 {0xFC632551, 0xF3B9CAC2, 0xA7179E84, 0xBCE6FAAD, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF}
-#define Curve_N_4 {0xD0364141, 0xBFD25E8C, 0xAF48A03B, 0xBAAEDCE6, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
-
-#elif (uECC_WORD_SIZE == 8)
-
-typedef uint64_t uECC_word_t;
-#if SUPPORTS_INT128
-typedef unsigned __int128 uECC_dword_t;
-#endif
-typedef unsigned wordcount_t;
-typedef int swordcount_t;
-typedef int bitcount_t;
-typedef int cmpresult_t;
-
-#define HIGH_BIT_SET 0x8000000000000000ull
-#define uECC_WORD_BITS 64
-#define uECC_WORD_BITS_SHIFT 6
-#define uECC_WORD_BITS_MASK 0x03F
-
-#define uECC_WORDS_1 3
-#define uECC_WORDS_2 3
-#define uECC_WORDS_3 4
-#define uECC_WORDS_4 4
-
-#define uECC_N_WORDS_1 3
-#define uECC_N_WORDS_2 3
-#define uECC_N_WORDS_3 4
-#define uECC_N_WORDS_4 4
-
-#define Curve_P_1 {0xFFFFFFFF7FFFFFFFull, 0xFFFFFFFFFFFFFFFFull, 0x00000000FFFFFFFFull}
-#define Curve_P_2 {0xFFFFFFFFFFFFFFFFull, 0xFFFFFFFFFFFFFFFEull, 0xFFFFFFFFFFFFFFFFull}
-#define Curve_P_3 {0xFFFFFFFFFFFFFFFFull, 0x00000000FFFFFFFFull, 0x0000000000000000ull, 0xFFFFFFFF00000001ull}
-#define Curve_P_4 {0xFFFFFFFEFFFFFC2Full, 0xFFFFFFFFFFFFFFFFull, 0xFFFFFFFFFFFFFFFFull, 0xFFFFFFFFFFFFFFFFull}
-
-#define Curve_B_1 {0x81D4D4ADC565FA45ull, 0x54BD7A8B65ACF89Full, 0x000000001C97BEFCull}
-#define Curve_B_2 {0xFEB8DEECC146B9B1ull, 0x0FA7E9AB72243049ull, 0x64210519E59C80E7ull}
-#define Curve_B_3 {0x3BCE3C3E27D2604Bull, 0x651D06B0CC53B0F6ull, 0xB3EBBD55769886BCull, 0x5AC635D8AA3A93E7ull}
-#define Curve_B_4 {0x0000000000000007ull, 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull}
-
-#define Curve_G_1 { \
-    {0x68C38BB913CBFC82ull, 0x8EF5732846646989ull, 0x000000004A96B568ull}, \
-    {0x042351377AC5FB32ull, 0x3168947D59DCC912ull, 0x0000000023A62855ull}}
-
-#define Curve_G_2 { \
-    {0xF4FF0AFD82FF1012ull, 0x7CBF20EB43A18800ull, 0x188DA80EB03090F6ull}, \
-    {0x73F977A11E794811ull, 0x631011ED6B24CDD5ull, 0x07192B95FFC8DA78ull}}
-
-#define Curve_G_3 { \
-    {0xF4A13945D898C296ull, 0x77037D812DEB33A0ull, 0xF8BCE6E563A440F2ull, 0x6B17D1F2E12C4247ull}, \
-    {0xCBB6406837BF51F5ull, 0x2BCE33576B315ECEull, 0x8EE7EB4A7C0F9E16ull, 0x4FE342E2FE1A7F9Bull}}
-
-#define Curve_G_4 { \
-    {0x59F2815B16F81798, 0x029BFCDB2DCE28D9, 0x55A06295CE870B07, 0x79BE667EF9DCBBAC}, \
-    {0x9C47D08FFB10D4B8, 0xFD17B448A6855419, 0x5DA4FBFC0E1108A8, 0x483ADA7726A3C465}}
-
-#define Curve_N_1 {0xF927AED3CA752257ull, 0x000000000001F4C8ull, 0x0000000100000000ull}
-#define Curve_N_2 {0x146BC9B1B4D22831ull, 0xFFFFFFFF99DEF836ull, 0xFFFFFFFFFFFFFFFFull}
-#define Curve_N_3 {0xF3B9CAC2FC632551ull, 0xBCE6FAADA7179E84ull, 0xFFFFFFFFFFFFFFFFull, 0xFFFFFFFF00000000ull}
-#define Curve_N_4 {0xBFD25E8CD0364141, 0xBAAEDCE6AF48A03B, 0xFFFFFFFFFFFFFFFE, 0xFFFFFFFFFFFFFFFF}
-
-#endif /* (uECC_WORD_SIZE == 8) */
-
-#define uECC_WORDS uECC_CONCAT(uECC_WORDS_, uECC_CURVE)
-#define uECC_N_WORDS uECC_CONCAT(uECC_N_WORDS_, uECC_CURVE)
-
-typedef struct EccPoint
-{
-    uECC_word_t x[uECC_WORDS];
-    uECC_word_t y[uECC_WORDS];
-} EccPoint;
-
-static uECC_word_t curve_p[uECC_WORDS] = uECC_CONCAT(Curve_P_, uECC_CURVE);
-static uECC_word_t curve_b[uECC_WORDS] = uECC_CONCAT(Curve_B_, uECC_CURVE);
-static EccPoint curve_G = uECC_CONCAT(Curve_G_, uECC_CURVE);
-static uECC_word_t curve_n[uECC_N_WORDS] = uECC_CONCAT(Curve_N_, uECC_CURVE);
-
-static void vli_clear(uECC_word_t *p_vli);
-static uECC_word_t vli_isZero(const uECC_word_t *p_vli);
-static uECC_word_t vli_testBit(const uECC_word_t *p_vli, bitcount_t p_bit);
-static bitcount_t vli_numBits(const uECC_word_t *p_vli, wordcount_t p_maxWords);
-static void vli_set(uECC_word_t *p_dest, const uECC_word_t *p_src);
-static cmpresult_t vli_cmp(uECC_word_t *p_left, uECC_word_t *p_right);
-static void vli_rshift1(uECC_word_t *p_vli);
-static uECC_word_t vli_add(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right);
-static uECC_word_t vli_sub(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right);
-static void vli_mult(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right);
-static void vli_modAdd(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right, uECC_word_t *p_mod);
-static void vli_modSub(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right, uECC_word_t *p_mod);
-static void vli_mmod_fast(uECC_word_t *RESTRICT p_result, uECC_word_t *RESTRICT p_product);
-static void vli_modMult_fast(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right);
-static void vli_modInv(uECC_word_t *p_result, uECC_word_t *p_input, uECC_word_t *p_mod);
-#if uECC_SQUARE_FUNC
-static void vli_square(uECC_word_t *p_result, uECC_word_t *p_left);
-static void vli_modSquare_fast(uECC_word_t *p_result, uECC_word_t *p_left);
-#endif
-// Function declarations to support the HAL shims
-int uECC_make_key_impl(uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_privateKey[uECC_BYTES]);
-int uECC_shared_secret_impl(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_privateKey[uECC_BYTES], uint8_t p_secret[uECC_BYTES]);
-int uECC_sign_impl(const uint8_t p_privateKey[uECC_BYTES], const uint8_t p_hash[uECC_BYTES], uint8_t p_signature[uECC_BYTES*2]);
-int uECC_verify_impl(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_hash[uECC_BYTES], const uint8_t p_signature[uECC_BYTES*2]);
-int uECC_ecdhe_impl(const uint8_t p_public_key_in[uECC_BYTES*2], uint8_t p_public_key_out[uECC_BYTES*2], uint8_t p_secret[uECC_BYTES]);
-int uECC_get_pubkey_impl(const uint8_t p_key_handle[uECC_BYTES], uint8_t p_public_key[uECC_BYTES*2]);
-
-#if (defined(_WIN32) || defined(_WIN64))
-/* Windows */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <bcrypt.h>
-
-static int default_RNG(uint8_t *p_dest, unsigned p_size)
-{
-    if (!BCRYPT_SUCCESS(BCryptGenRandom(NULL, (PUCHAR)p_dest, p_size, BCRYPT_USE_SYSTEM_PREFERRED_RNG)))
-    {
-        return 0;
-    }
-
-    return 1;
-}
-
-#elif defined(unix) || defined(__linux__) || defined(__unix__) || defined(__unix) || \
-    (defined(__APPLE__) && defined(__MACH__)) || defined(uECC_POSIX)
-
-/* Some POSIX-like system with /dev/urandom or /dev/random. */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#ifndef O_CLOEXEC
-    #define O_CLOEXEC 0
-#endif
-
-static int default_RNG(uint8_t *p_dest, unsigned p_size)
-{
-    int l_fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
-    if(l_fd == -1)
-    {
-        l_fd = open("/dev/random", O_RDONLY | O_CLOEXEC);
-        if(l_fd == -1)
-        {
-            return 0;
-        }
-    }
-
-    char *l_ptr = (char *)p_dest;
-    size_t l_left = p_size;
-    while(l_left > 0)
-    {
-        int l_read = read(l_fd, l_ptr, l_left);
-        if(l_read <= 0)
-        { // read failed
-            close(l_fd);
-            return 0;
-        }
-        l_left -= l_read;
-        l_ptr += l_read;
-    }
-
-    close(l_fd);
-    return 1;
-}
-
-#else /* Some other platform */
-
-static int default_RNG(uint8_t *p_dest, unsigned p_size)
-{
-    return 0;
-}
-
-#endif
-
-///////////////////////////////////////////////////////
-// Functions to set the callbacks for crypto operations
-static uECC_RNG_Function g_rng = &default_RNG;
-
-void uECC_set_rng(uECC_RNG_Function p_rng)
-{
-    g_rng = p_rng;
-}
-
-static uECC_make_key_Function g_make_key_cb = &uECC_make_key_impl;
-
-void uECC_set_make_key_cb(uECC_make_key_Function p_make_key_cb)
-{
-    g_make_key_cb = p_make_key_cb;
-}
-
-static uECC_shared_secret_Function g_shared_secret_cb = &uECC_shared_secret_impl;
-
-void uECC_set_shared_secret_cb(uECC_shared_secret_Function p_shared_secret_cb)
-{
-    g_shared_secret_cb = p_shared_secret_cb;
-}
-
-static uECC_sign_Function g_sign_cb = &uECC_sign_impl;
-
-void uECC_set_sign_cb(uECC_sign_Function p_sign_cb)
-{
-    g_sign_cb = p_sign_cb;
-}
-
-static uECC_verify_Function g_verify_cb = &uECC_verify_impl;
-
-void uECC_set_verify_cb(uECC_verify_Function p_verify_cb)
-{
-       g_verify_cb = p_verify_cb;
-}
-
-static uECC_ecdhe_Function g_ecdhe_cb = &uECC_ecdhe_impl;
-
-void uECC_set_ecdhe_cb(uECC_ecdhe_Function p_ecdhe_cb)
-{
-       g_ecdhe_cb = p_ecdhe_cb;
-}
-
-static uECC_get_pubkey_Function g_get_pubkey_cb = &uECC_get_pubkey_impl;
-
-void uECC_set_get_pubkey_cb(uECC_get_pubkey_Function p_get_pubkey_cb)
-{
-       g_get_pubkey_cb = p_get_pubkey_cb;
-}
-
-///////////////////////////////////////////////////////
-
-
-#ifdef __GNUC__ /* Only support GCC inline asm for now */
-    #if (uECC_ASM && (uECC_PLATFORM == uECC_avr))
-        #include "asm_avr.inc"
-    #endif
-
-    #if (uECC_ASM && (uECC_PLATFORM == uECC_arm || uECC_PLATFORM == uECC_arm_thumb || uECC_PLATFORM == uECC_arm_thumb2))
-        #include "asm_arm.inc"
-    #endif
-#endif
-
-#if !asm_clear
-static void vli_clear(uECC_word_t *p_vli)
-{
-    wordcount_t i;
-    for(i = 0; i < uECC_WORDS; ++i)
-    {
-        p_vli[i] = 0;
-    }
-}
-#endif
-
-/* Returns 1 if p_vli == 0, 0 otherwise. */
-#if !asm_isZero
-static uECC_word_t vli_isZero(const uECC_word_t *p_vli)
-{
-    wordcount_t i;
-    for(i = 0; i < uECC_WORDS; ++i)
-    {
-        if(p_vli[i])
-        {
-            return 0;
-        }
-    }
-    return 1;
-}
-#endif
-
-/* Returns nonzero if bit p_bit of p_vli is set. */
-#if !asm_testBit
-static uECC_word_t vli_testBit(const uECC_word_t *p_vli, bitcount_t p_bit)
-{
-    return (p_vli[p_bit >> uECC_WORD_BITS_SHIFT] & ((uECC_word_t)1 << (p_bit & uECC_WORD_BITS_MASK)));
-}
-#endif
-
-/* Counts the number of words in p_vli. */
-#if !asm_numBits
-static wordcount_t vli_numDigits(const uECC_word_t *p_vli, wordcount_t p_maxWords)
-{
-    swordcount_t i;
-    /* Search from the end until we find a non-zero digit.
-       We do it in reverse because we expect that most digits will be nonzero. */
-    for(i = p_maxWords-1; i >= 0 && p_vli[i] == 0; --i)
-    {
-    }
-
-    return (i + 1);
-}
-
-/* Counts the number of bits required to represent p_vli. */
-static bitcount_t vli_numBits(const uECC_word_t *p_vli, wordcount_t p_maxWords)
-{
-    uECC_word_t i;
-    uECC_word_t l_digit;
-
-    wordcount_t l_numDigits = vli_numDigits(p_vli, p_maxWords);
-    if(l_numDigits == 0)
-    {
-        return 0;
-    }
-
-    l_digit = p_vli[l_numDigits - 1];
-    for(i = 0; l_digit; ++i)
-    {
-        l_digit >>= 1;
-    }
-
-    return (((bitcount_t)(l_numDigits - 1) << uECC_WORD_BITS_SHIFT) + i);
-}
-#endif /* !asm_numBits */
-
-/* Sets p_dest = p_src. */
-#if !asm_set
-static void vli_set(uECC_word_t *p_dest, const uECC_word_t *p_src)
-{
-    wordcount_t i;
-    for(i=0; i<uECC_WORDS; ++i)
-    {
-        p_dest[i] = p_src[i];
-    }
-}
-#endif
-
-/* Returns sign of p_left - p_right. */
-#if !asm_cmp
-static cmpresult_t vli_cmp(uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    swordcount_t i;
-    for(i = uECC_WORDS-1; i >= 0; --i)
-    {
-        if(p_left[i] > p_right[i])
-        {
-            return 1;
-        }
-        else if(p_left[i] < p_right[i])
-        {
-            return -1;
-        }
-    }
-    return 0;
-}
-#endif
-
-/* Computes p_vli = p_vli >> 1. */
-#if !asm_rshift1
-static void vli_rshift1(uECC_word_t *p_vli)
-{
-    uECC_word_t *l_end = p_vli;
-    uECC_word_t l_carry = 0;
-
-    p_vli += uECC_WORDS;
-    while(p_vli-- > l_end)
-    {
-        uECC_word_t l_temp = *p_vli;
-        *p_vli = (l_temp >> 1) | l_carry;
-        l_carry = l_temp << (uECC_WORD_BITS - 1);
-    }
-}
-#endif
-
-/* Computes p_result = p_left + p_right, returning carry. Can modify in place. */
-#if !asm_add
-static uECC_word_t vli_add(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_carry = 0;
-    wordcount_t i;
-    for(i = 0; i < uECC_WORDS; ++i)
-    {
-        uECC_word_t l_sum = p_left[i] + p_right[i] + l_carry;
-        if(l_sum != p_left[i])
-        {
-            l_carry = (l_sum < p_left[i]);
-        }
-        p_result[i] = l_sum;
-    }
-    return l_carry;
-}
-#endif
-
-/* Computes p_result = p_left - p_right, returning borrow. Can modify in place. */
-#if !asm_sub
-static uECC_word_t vli_sub(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_borrow = 0;
-    wordcount_t i;
-    for(i = 0; i < uECC_WORDS; ++i)
-    {
-        uECC_word_t l_diff = p_left[i] - p_right[i] - l_borrow;
-        if(l_diff != p_left[i])
-        {
-            l_borrow = (l_diff > p_left[i]);
-        }
-        p_result[i] = l_diff;
-    }
-    return l_borrow;
-}
-#endif
-
-#if (!asm_mult || !asm_square || uECC_CURVE == uECC_secp256k1)
-static void muladd(uECC_word_t a, uECC_word_t b, uECC_word_t *r0, uECC_word_t *r1, uECC_word_t *r2)
-{
-#if uECC_WORD_SIZE == 8 && !SUPPORTS_INT128
-    uint64_t a0 = a & 0xffffffffull;
-    uint64_t a1 = a >> 32;
-    uint64_t b0 = b & 0xffffffffull;
-    uint64_t b1 = b >> 32;
-
-    uint64_t i0 = a0 * b0;
-    uint64_t i1 = a0 * b1;
-    uint64_t i2 = a1 * b0;
-    uint64_t i3 = a1 * b1;
-
-    uint64_t p0, p1;
-
-    i2 += (i0 >> 32);
-    i2 += i1;
-    if(i2 < i1)
-    { // overflow
-        i3 += 0x100000000ull;
-    }
-
-    p0 = (i0 & 0xffffffffull) | (i2 << 32);
-    p1 = i3 + (i2 >> 32);
-
-    *r0 += p0;
-    *r1 += (p1 + (*r0 < p0));
-    *r2 += ((*r1 < p1) || (*r1 == p1 && *r0 < p0));
-#else
-    uECC_dword_t p = (uECC_dword_t)a * b;
-    uECC_dword_t r01 = ((uECC_dword_t)(*r1) << uECC_WORD_BITS) | *r0;
-    r01 += p;
-    *r2 += (r01 < p);
-    *r1 = r01 >> uECC_WORD_BITS;
-    *r0 = (uECC_word_t)r01;
-#endif
-}
-#define muladd_exists 1
-#endif
-
-#if !asm_mult
-static void vli_mult(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t r0 = 0;
-    uECC_word_t r1 = 0;
-    uECC_word_t r2 = 0;
-
-    wordcount_t i, k;
-
-    /* Compute each digit of p_result in sequence, maintaining the carries. */
-    for(k = 0; k < uECC_WORDS; ++k)
-    {
-        for(i = 0; i <= k; ++i)
-        {
-            muladd(p_left[i], p_right[k-i], &r0, &r1, &r2);
-        }
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-    for(k = uECC_WORDS; k < uECC_WORDS*2 - 1; ++k)
-    {
-        for(i = (k + 1) - uECC_WORDS; i<uECC_WORDS; ++i)
-        {
-            muladd(p_left[i], p_right[k-i], &r0, &r1, &r2);
-        }
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-
-    p_result[uECC_WORDS*2 - 1] = r0;
-}
-#endif
-
-#if uECC_SQUARE_FUNC
-
-#if !asm_square
-static void mul2add(uECC_word_t a, uECC_word_t b, uECC_word_t *r0, uECC_word_t *r1, uECC_word_t *r2)
-{
-#if uECC_WORD_SIZE == 8 && !SUPPORTS_INT128
-    uint64_t a0 = a & 0xffffffffull;
-    uint64_t a1 = a >> 32;
-    uint64_t b0 = b & 0xffffffffull;
-    uint64_t b1 = b >> 32;
-
-    uint64_t i0 = a0 * b0;
-    uint64_t i1 = a0 * b1;
-    uint64_t i2 = a1 * b0;
-    uint64_t i3 = a1 * b1;
-
-    uint64_t p0, p1;
-
-    i2 += (i0 >> 32);
-    i2 += i1;
-    if(i2 < i1)
-    { // overflow
-        i3 += 0x100000000ull;
-    }
-
-    p0 = (i0 & 0xffffffffull) | (i2 << 32);
-    p1 = i3 + (i2 >> 32);
-
-    *r2 += (p1 >> 63);
-    p1 = (p1 << 1) | (p0 >> 63);
-    p0 <<= 1;
-
-    *r0 += p0;
-    *r1 += (p1 + (*r0 < p0));
-    *r2 += ((*r1 < p1) || (*r1 == p1 && *r0 < p0));
-#else
-    uECC_dword_t p = (uECC_dword_t)a * b;
-    uECC_dword_t r01 = ((uECC_dword_t)(*r1) << uECC_WORD_BITS) | *r0;
-    *r2 += (p >> (uECC_WORD_BITS * 2 - 1));
-    p *= 2;
-    r01 += p;
-    *r2 += (r01 < p);
-    *r1 = r01 >> uECC_WORD_BITS;
-    *r0 = (uECC_word_t)r01;
-#endif
-}
-
-static void vli_square(uECC_word_t *p_result, uECC_word_t *p_left)
-{
-    uECC_word_t r0 = 0;
-    uECC_word_t r1 = 0;
-    uECC_word_t r2 = 0;
-
-    wordcount_t i, k;
-
-    for(k = 0; k < uECC_WORDS*2 - 1; ++k)
-    {
-        uECC_word_t l_min = (k < uECC_WORDS ? 0 : (k + 1) - uECC_WORDS);
-        for(i = l_min; i<=k && i<=k-i; ++i)
-        {
-            if(i < k-i)
-            {
-                mul2add(p_left[i], p_left[k-i], &r0, &r1, &r2);
-            }
-            else
-            {
-                muladd(p_left[i], p_left[k-i], &r0, &r1, &r2);
-            }
-        }
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-
-    p_result[uECC_WORDS*2 - 1] = r0;
-}
-#endif
-
-#else /* uECC_SQUARE_FUNC */
-
-#define vli_square(result, left, size) vli_mult((result), (left), (left), (size))
-
-#endif /* uECC_SQUARE_FUNC */
-
-
-/* Computes p_result = (p_left + p_right) % p_mod.
-   Assumes that p_left < p_mod and p_right < p_mod, p_result != p_mod. */
-#if !asm_modAdd
-static void vli_modAdd(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right, uECC_word_t *p_mod)
-{
-    uECC_word_t l_carry = vli_add(p_result, p_left, p_right);
-    if(l_carry || vli_cmp(p_result, p_mod) >= 0)
-    { /* p_result > p_mod (p_result = p_mod + remainder), so subtract p_mod to get remainder. */
-        vli_sub(p_result, p_result, p_mod);
-    }
-}
-#endif
-
-/* Computes p_result = (p_left - p_right) % p_mod.
-   Assumes that p_left < p_mod and p_right < p_mod, p_result != p_mod. */
-#if !asm_modSub
-static void vli_modSub(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right, uECC_word_t *p_mod)
-{
-    uECC_word_t l_borrow = vli_sub(p_result, p_left, p_right);
-    if(l_borrow)
-    { /* In this case, p_result == -diff == (max int) - diff.
-         Since -x % d == d - x, we can get the correct result from p_result + p_mod (with overflow). */
-        vli_add(p_result, p_result, p_mod);
-    }
-}
-#endif
-
-#if !asm_modSub_fast
-    #define vli_modSub_fast(result, left, right) vli_modSub((result), (left), (right), curve_p)
-#endif
-
-#if !asm_mmod_fast
-
-#if (uECC_CURVE == uECC_secp160r1 || uECC_CURVE == uECC_secp256k1)
-/* omega_mult() is defined farther below for the different curves / word sizes */
-static void omega_mult(uECC_word_t * RESTRICT p_result, uECC_word_t * RESTRICT p_right);
-
-/* Computes p_result = p_product % curve_p
-    see http://www.isys.uni-klu.ac.at/PDF/2001-0126-MT.pdf page 354
-
-    Note that this only works if log2(omega) < log2(p)/2 */
-static void vli_mmod_fast(uECC_word_t *RESTRICT p_result, uECC_word_t *RESTRICT p_product)
-{
-    uECC_word_t l_tmp[2*uECC_WORDS];
-    uECC_word_t l_carry;
-
-    vli_clear(l_tmp);
-    vli_clear(l_tmp + uECC_WORDS);
-
-    omega_mult(l_tmp, p_product + uECC_WORDS); /* (Rq, q) = q * c */
-
-    l_carry = vli_add(p_result, p_product, l_tmp); /* (C, r) = r + q       */
-    vli_clear(p_product);
-    omega_mult(p_product, l_tmp + uECC_WORDS); /* Rq*c */
-    l_carry += vli_add(p_result, p_result, p_product); /* (C1, r) = r + Rq*c */
-
-    while(l_carry > 0)
-    {
-        --l_carry;
-        vli_sub(p_result, p_result, curve_p);
-    }
-
-    if(vli_cmp(p_result, curve_p) > 0)
-    {
-        vli_sub(p_result, p_result, curve_p);
-    }
-}
-
-#endif
-
-#if uECC_CURVE == uECC_secp160r1
-
-#if uECC_WORD_SIZE == 1
-static void omega_mult(uint8_t * RESTRICT p_result, uint8_t * RESTRICT p_right)
-{
-    uint8_t l_carry;
-    uint8_t i;
-
-    /* Multiply by (2^31 + 1). */
-    vli_set(p_result + 4, p_right); /* 2^32 */
-    vli_rshift1(p_result + 4); /* 2^31 */
-    p_result[3] = p_right[0] << 7; /* get last bit from shift */
-
-    l_carry = vli_add(p_result, p_result, p_right); /* 2^31 + 1 */
-    for(i = uECC_WORDS; l_carry; ++i)
-    {
-        uint16_t l_sum = (uint16_t)p_result[i] + l_carry;
-        p_result[i] = (uint8_t)l_sum;
-        l_carry = l_sum >> 8;
-    }
-}
-#elif uECC_WORD_SIZE == 4
-static void omega_mult(uint32_t * RESTRICT p_result, uint32_t * RESTRICT p_right)
-{
-    uint32_t l_carry;
-    unsigned i;
-
-    /* Multiply by (2^31 + 1). */
-    vli_set(p_result + 1, p_right); /* 2^32 */
-    vli_rshift1(p_result + 1); /* 2^31 */
-    p_result[0] = p_right[0] << 31; /* get last bit from shift */
-
-    l_carry = vli_add(p_result, p_result, p_right); /* 2^31 + 1 */
-    for(i = uECC_WORDS; l_carry; ++i)
-    {
-        uint64_t l_sum = (uint64_t)p_result[i] + l_carry;
-        p_result[i] = (uint32_t)l_sum;
-        l_carry = l_sum >> 32;
-    }
-}
-#endif /* uECC_WORD_SIZE */
-
-#elif uECC_CURVE == uECC_secp192r1
-
-/* Computes p_result = p_product % curve_p.
-   See algorithm 5 and 6 from http://www.isys.uni-klu.ac.at/PDF/2001-0126-MT.pdf */
-#if uECC_WORD_SIZE == 1
-static void vli_mmod_fast(uint8_t *RESTRICT p_result, uint8_t *RESTRICT p_product)
-{
-    uint8_t l_tmp[uECC_WORDS];
-    uint8_t l_carry;
-
-    vli_set(p_result, p_product);
-
-    vli_set(l_tmp, &p_product[24]);
-    l_carry = vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = l_tmp[1] = l_tmp[2] = l_tmp[3] = l_tmp[4] = l_tmp[5] = l_tmp[6] = l_tmp[7] = 0;
-    l_tmp[8] = p_product[24]; l_tmp[9] = p_product[25]; l_tmp[10] = p_product[26]; l_tmp[11] = p_product[27];
-    l_tmp[12] = p_product[28]; l_tmp[13] = p_product[29]; l_tmp[14] = p_product[30]; l_tmp[15] = p_product[31];
-    l_tmp[16] = p_product[32]; l_tmp[17] = p_product[33]; l_tmp[18] = p_product[34]; l_tmp[19] = p_product[35];
-    l_tmp[20] = p_product[36]; l_tmp[21] = p_product[37]; l_tmp[22] = p_product[38]; l_tmp[23] = p_product[39];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = l_tmp[8] = p_product[40];
-    l_tmp[1] = l_tmp[9] = p_product[41];
-    l_tmp[2] = l_tmp[10] = p_product[42];
-    l_tmp[3] = l_tmp[11] = p_product[43];
-    l_tmp[4] = l_tmp[12] = p_product[44];
-    l_tmp[5] = l_tmp[13] = p_product[45];
-    l_tmp[6] = l_tmp[14] = p_product[46];
-    l_tmp[7] = l_tmp[15] = p_product[47];
-    l_tmp[16] = l_tmp[17] = l_tmp[18] = l_tmp[19] = l_tmp[20] = l_tmp[21] = l_tmp[22] = l_tmp[23] = 0;
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    while(l_carry || vli_cmp(curve_p, p_result) != 1)
-    {
-        l_carry -= vli_sub(p_result, p_result, curve_p);
-    }
-}
-#elif uECC_WORD_SIZE == 4
-static void vli_mmod_fast(uint32_t *RESTRICT p_result, uint32_t *RESTRICT p_product)
-{
-    uint32_t l_tmp[uECC_WORDS];
-    int l_carry;
-
-    vli_set(p_result, p_product);
-
-    vli_set(l_tmp, &p_product[6]);
-    l_carry = vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = l_tmp[1] = 0;
-    l_tmp[2] = p_product[6];
-    l_tmp[3] = p_product[7];
-    l_tmp[4] = p_product[8];
-    l_tmp[5] = p_product[9];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = l_tmp[2] = p_product[10];
-    l_tmp[1] = l_tmp[3] = p_product[11];
-    l_tmp[4] = l_tmp[5] = 0;
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    while(l_carry || vli_cmp(curve_p, p_result) != 1)
-    {
-        l_carry -= vli_sub(p_result, p_result, curve_p);
-    }
-}
-#else
-static void vli_mmod_fast(uint64_t *RESTRICT p_result, uint64_t *RESTRICT p_product)
-{
-    uint64_t l_tmp[uECC_WORDS];
-    int l_carry;
-
-    vli_set(p_result, p_product);
-
-    vli_set(l_tmp, &p_product[3]);
-    l_carry = vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = 0;
-    l_tmp[1] = p_product[3];
-    l_tmp[2] = p_product[4];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    l_tmp[0] = l_tmp[1] = p_product[5];
-    l_tmp[2] = 0;
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    while(l_carry || vli_cmp(curve_p, p_result) != 1)
-    {
-        l_carry -= vli_sub(p_result, p_result, curve_p);
-    }
-}
-#endif /* uECC_WORD_SIZE */
-
-#elif uECC_CURVE == uECC_secp256r1
-
-/* Computes p_result = p_product % curve_p
-   from http://www.nsa.gov/ia/_files/nist-routines.pdf */
-#if uECC_WORD_SIZE == 1
-static void vli_mmod_fast(uint8_t *RESTRICT p_result, uint8_t *RESTRICT p_product)
-{
-    uint8_t l_tmp[uECC_BYTES];
-    int8_t l_carry;
-
-    /* t */
-    vli_set(p_result, p_product);
-
-    /* s1 */
-    l_tmp[0] = l_tmp[1] = l_tmp[2] = l_tmp[3] = 0;
-    l_tmp[4] = l_tmp[5] = l_tmp[6] = l_tmp[7] = 0;
-    l_tmp[8] = l_tmp[9] = l_tmp[10] = l_tmp[11] = 0;
-    l_tmp[12] = p_product[44]; l_tmp[13] = p_product[45]; l_tmp[14] = p_product[46]; l_tmp[15] = p_product[47];
-    l_tmp[16] = p_product[48]; l_tmp[17] = p_product[49]; l_tmp[18] = p_product[50]; l_tmp[19] = p_product[51];
-    l_tmp[20] = p_product[52]; l_tmp[21] = p_product[53]; l_tmp[22] = p_product[54]; l_tmp[23] = p_product[55];
-    l_tmp[24] = p_product[56]; l_tmp[25] = p_product[57]; l_tmp[26] = p_product[58]; l_tmp[27] = p_product[59];
-    l_tmp[28] = p_product[60]; l_tmp[29] = p_product[61]; l_tmp[30] = p_product[62]; l_tmp[31] = p_product[63];
-    l_carry = vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s2 */
-    l_tmp[12] = p_product[48]; l_tmp[13] = p_product[49]; l_tmp[14] = p_product[50]; l_tmp[15] = p_product[51];
-    l_tmp[16] = p_product[52]; l_tmp[17] = p_product[53]; l_tmp[18] = p_product[54]; l_tmp[19] = p_product[55];
-    l_tmp[20] = p_product[56]; l_tmp[21] = p_product[57]; l_tmp[22] = p_product[58]; l_tmp[23] = p_product[59];
-    l_tmp[24] = p_product[60]; l_tmp[25] = p_product[61]; l_tmp[26] = p_product[62]; l_tmp[27] = p_product[63];
-    l_tmp[28] = l_tmp[29] = l_tmp[30] = l_tmp[31] = 0;
-    l_carry += vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s3 */
-    l_tmp[0] = p_product[32]; l_tmp[1] = p_product[33]; l_tmp[2] = p_product[34]; l_tmp[3] = p_product[35];
-    l_tmp[4] = p_product[36]; l_tmp[5] = p_product[37]; l_tmp[6] = p_product[38]; l_tmp[7] = p_product[39];
-    l_tmp[8] = p_product[40]; l_tmp[9] = p_product[41]; l_tmp[10] = p_product[42]; l_tmp[11] = p_product[43];
-    l_tmp[12] = l_tmp[13] = l_tmp[14] = l_tmp[15] = 0;
-    l_tmp[16] = l_tmp[17] = l_tmp[18] = l_tmp[19] = 0;
-    l_tmp[20] = l_tmp[21] = l_tmp[22] = l_tmp[23] = 0;
-    l_tmp[24] = p_product[56]; l_tmp[25] = p_product[57]; l_tmp[26] = p_product[58]; l_tmp[27] = p_product[59];
-    l_tmp[28] = p_product[60]; l_tmp[29] = p_product[61]; l_tmp[30] = p_product[62]; l_tmp[31] = p_product[63];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s4 */
-    l_tmp[0] = p_product[36]; l_tmp[1] = p_product[37]; l_tmp[2] = p_product[38]; l_tmp[3] = p_product[39];
-    l_tmp[4] = p_product[40]; l_tmp[5] = p_product[41]; l_tmp[6] = p_product[42]; l_tmp[7] = p_product[43];
-    l_tmp[8] = p_product[44]; l_tmp[9] = p_product[45]; l_tmp[10] = p_product[46]; l_tmp[11] = p_product[47];
-    l_tmp[12] = p_product[52]; l_tmp[13] = p_product[53]; l_tmp[14] = p_product[54]; l_tmp[15] = p_product[55];
-    l_tmp[16] = p_product[56]; l_tmp[17] = p_product[57]; l_tmp[18] = p_product[58]; l_tmp[19] = p_product[59];
-    l_tmp[20] = p_product[60]; l_tmp[21] = p_product[61]; l_tmp[22] = p_product[62]; l_tmp[23] = p_product[63];
-    l_tmp[24] = p_product[52]; l_tmp[25] = p_product[53]; l_tmp[26] = p_product[54]; l_tmp[27] = p_product[55];
-    l_tmp[28] = p_product[32]; l_tmp[29] = p_product[33]; l_tmp[30] = p_product[34]; l_tmp[31] = p_product[35];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* d1 */
-    l_tmp[0] = p_product[44]; l_tmp[1] = p_product[45]; l_tmp[2] = p_product[46]; l_tmp[3] = p_product[47];
-    l_tmp[4] = p_product[48]; l_tmp[5] = p_product[49]; l_tmp[6] = p_product[50]; l_tmp[7] = p_product[51];
-    l_tmp[8] = p_product[52]; l_tmp[9] = p_product[53]; l_tmp[10] = p_product[54]; l_tmp[11] = p_product[55];
-    l_tmp[12] = l_tmp[13] = l_tmp[14] = l_tmp[15] = 0;
-    l_tmp[16] = l_tmp[17] = l_tmp[18] = l_tmp[19] = 0;
-    l_tmp[20] = l_tmp[21] = l_tmp[22] = l_tmp[23] = 0;
-    l_tmp[24] = p_product[32]; l_tmp[25] = p_product[33]; l_tmp[26] = p_product[34]; l_tmp[27] = p_product[35];
-    l_tmp[28] = p_product[40]; l_tmp[29] = p_product[41]; l_tmp[30] = p_product[42]; l_tmp[31] = p_product[43];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d2 */
-    l_tmp[0] = p_product[48]; l_tmp[1] = p_product[49]; l_tmp[2] = p_product[50]; l_tmp[3] = p_product[51];
-    l_tmp[4] = p_product[52]; l_tmp[5] = p_product[53]; l_tmp[6] = p_product[54]; l_tmp[7] = p_product[55];
-    l_tmp[8] = p_product[56]; l_tmp[9] = p_product[57]; l_tmp[10] = p_product[58]; l_tmp[11] = p_product[59];
-    l_tmp[12] = p_product[60]; l_tmp[13] = p_product[61]; l_tmp[14] = p_product[62]; l_tmp[15] = p_product[63];
-    l_tmp[16] = l_tmp[17] = l_tmp[18] = l_tmp[19] = 0;
-    l_tmp[20] = l_tmp[21] = l_tmp[22] = l_tmp[23] = 0;
-    l_tmp[24] = p_product[36]; l_tmp[25] = p_product[37]; l_tmp[26] = p_product[38]; l_tmp[27] = p_product[39];
-    l_tmp[28] = p_product[44]; l_tmp[29] = p_product[45]; l_tmp[30] = p_product[46]; l_tmp[31] = p_product[47];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d3 */
-    l_tmp[0] = p_product[52]; l_tmp[1] = p_product[53]; l_tmp[2] = p_product[54]; l_tmp[3] = p_product[55];
-    l_tmp[4] = p_product[56]; l_tmp[5] = p_product[57]; l_tmp[6] = p_product[58]; l_tmp[7] = p_product[59];
-    l_tmp[8] = p_product[60]; l_tmp[9] = p_product[61]; l_tmp[10] = p_product[62]; l_tmp[11] = p_product[63];
-    l_tmp[12] = p_product[32]; l_tmp[13] = p_product[33]; l_tmp[14] = p_product[34]; l_tmp[15] = p_product[35];
-    l_tmp[16] = p_product[36]; l_tmp[17] = p_product[37]; l_tmp[18] = p_product[38]; l_tmp[19] = p_product[39];
-    l_tmp[20] = p_product[40]; l_tmp[21] = p_product[41]; l_tmp[22] = p_product[42]; l_tmp[23] = p_product[43];
-    l_tmp[24] = l_tmp[25] = l_tmp[26] = l_tmp[27] = 0;
-    l_tmp[28] = p_product[48]; l_tmp[29] = p_product[49]; l_tmp[30] = p_product[50]; l_tmp[31] = p_product[51];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d4 */
-    l_tmp[0] = p_product[56]; l_tmp[1] = p_product[57]; l_tmp[2] = p_product[58]; l_tmp[3] = p_product[59];
-    l_tmp[4] = p_product[60]; l_tmp[5] = p_product[61]; l_tmp[6] = p_product[62]; l_tmp[7] = p_product[63];
-    l_tmp[8] = l_tmp[9] = l_tmp[10] = l_tmp[11] = 0;
-    l_tmp[12] = p_product[36]; l_tmp[13] = p_product[37]; l_tmp[14] = p_product[38]; l_tmp[15] = p_product[39];
-    l_tmp[16] = p_product[40]; l_tmp[17] = p_product[41]; l_tmp[18] = p_product[42]; l_tmp[19] = p_product[43];
-    l_tmp[20] = p_product[44]; l_tmp[21] = p_product[45]; l_tmp[22] = p_product[46]; l_tmp[23] = p_product[47];
-    l_tmp[24] = l_tmp[25] = l_tmp[26] = l_tmp[27] = 0;
-    l_tmp[28] = p_product[52]; l_tmp[29] = p_product[53]; l_tmp[30] = p_product[54]; l_tmp[31] = p_product[55];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    if(l_carry < 0)
-    {
-        do
-        {
-            l_carry += vli_add(p_result, p_result, curve_p);
-        } while(l_carry < 0);
-    }
-    else
-    {
-        while(l_carry || vli_cmp(curve_p, p_result) != 1)
-        {
-            l_carry -= vli_sub(p_result, p_result, curve_p);
-        }
-    }
-}
-#elif uECC_WORD_SIZE == 4
-static void vli_mmod_fast(uint32_t *RESTRICT p_result, uint32_t *RESTRICT p_product)
-{
-    uint32_t l_tmp[uECC_WORDS];
-    int l_carry;
-
-    /* t */
-    vli_set(p_result, p_product);
-
-    /* s1 */
-    l_tmp[0] = l_tmp[1] = l_tmp[2] = 0;
-    l_tmp[3] = p_product[11];
-    l_tmp[4] = p_product[12];
-    l_tmp[5] = p_product[13];
-    l_tmp[6] = p_product[14];
-    l_tmp[7] = p_product[15];
-    l_carry = vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s2 */
-    l_tmp[3] = p_product[12];
-    l_tmp[4] = p_product[13];
-    l_tmp[5] = p_product[14];
-    l_tmp[6] = p_product[15];
-    l_tmp[7] = 0;
-    l_carry += vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s3 */
-    l_tmp[0] = p_product[8];
-    l_tmp[1] = p_product[9];
-    l_tmp[2] = p_product[10];
-    l_tmp[3] = l_tmp[4] = l_tmp[5] = 0;
-    l_tmp[6] = p_product[14];
-    l_tmp[7] = p_product[15];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s4 */
-    l_tmp[0] = p_product[9];
-    l_tmp[1] = p_product[10];
-    l_tmp[2] = p_product[11];
-    l_tmp[3] = p_product[13];
-    l_tmp[4] = p_product[14];
-    l_tmp[5] = p_product[15];
-    l_tmp[6] = p_product[13];
-    l_tmp[7] = p_product[8];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* d1 */
-    l_tmp[0] = p_product[11];
-    l_tmp[1] = p_product[12];
-    l_tmp[2] = p_product[13];
-    l_tmp[3] = l_tmp[4] = l_tmp[5] = 0;
-    l_tmp[6] = p_product[8];
-    l_tmp[7] = p_product[10];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d2 */
-    l_tmp[0] = p_product[12];
-    l_tmp[1] = p_product[13];
-    l_tmp[2] = p_product[14];
-    l_tmp[3] = p_product[15];
-    l_tmp[4] = l_tmp[5] = 0;
-    l_tmp[6] = p_product[9];
-    l_tmp[7] = p_product[11];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d3 */
-    l_tmp[0] = p_product[13];
-    l_tmp[1] = p_product[14];
-    l_tmp[2] = p_product[15];
-    l_tmp[3] = p_product[8];
-    l_tmp[4] = p_product[9];
-    l_tmp[5] = p_product[10];
-    l_tmp[6] = 0;
-    l_tmp[7] = p_product[12];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d4 */
-    l_tmp[0] = p_product[14];
-    l_tmp[1] = p_product[15];
-    l_tmp[2] = 0;
-    l_tmp[3] = p_product[9];
-    l_tmp[4] = p_product[10];
-    l_tmp[5] = p_product[11];
-    l_tmp[6] = 0;
-    l_tmp[7] = p_product[13];
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    if(l_carry < 0)
-    {
-        do
-        {
-            l_carry += vli_add(p_result, p_result, curve_p);
-        } while(l_carry < 0);
-    }
-    else
-    {
-        while(l_carry || vli_cmp(curve_p, p_result) != 1)
-        {
-            l_carry -= vli_sub(p_result, p_result, curve_p);
-        }
-    }
-}
-#else
-static void vli_mmod_fast(uint64_t *RESTRICT p_result, uint64_t *RESTRICT p_product)
-{
-    uint64_t l_tmp[uECC_WORDS];
-    int l_carry;
-
-    /* t */
-    vli_set(p_result, p_product);
-
-    /* s1 */
-    l_tmp[0] = 0;
-    l_tmp[1] = p_product[5] & 0xffffffff00000000ull;
-    l_tmp[2] = p_product[6];
-    l_tmp[3] = p_product[7];
-    l_carry = vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s2 */
-    l_tmp[1] = p_product[6] << 32;
-    l_tmp[2] = (p_product[6] >> 32) | (p_product[7] << 32);
-    l_tmp[3] = p_product[7] >> 32;
-    l_carry += vli_add(l_tmp, l_tmp, l_tmp);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s3 */
-    l_tmp[0] = p_product[4];
-    l_tmp[1] = p_product[5] & 0xffffffff;
-    l_tmp[2] = 0;
-    l_tmp[3] = p_product[7];
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* s4 */
-    l_tmp[0] = (p_product[4] >> 32) | (p_product[5] << 32);
-    l_tmp[1] = (p_product[5] >> 32) | (p_product[6] & 0xffffffff00000000ull);
-    l_tmp[2] = p_product[7];
-    l_tmp[3] = (p_product[6] >> 32) | (p_product[4] << 32);
-    l_carry += vli_add(p_result, p_result, l_tmp);
-
-    /* d1 */
-    l_tmp[0] = (p_product[5] >> 32) | (p_product[6] << 32);
-    l_tmp[1] = (p_product[6] >> 32);
-    l_tmp[2] = 0;
-    l_tmp[3] = (p_product[4] & 0xffffffff) | (p_product[5] << 32);
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d2 */
-    l_tmp[0] = p_product[6];
-    l_tmp[1] = p_product[7];
-    l_tmp[2] = 0;
-    l_tmp[3] = (p_product[4] >> 32) | (p_product[5] & 0xffffffff00000000ull);
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d3 */
-    l_tmp[0] = (p_product[6] >> 32) | (p_product[7] << 32);
-    l_tmp[1] = (p_product[7] >> 32) | (p_product[4] << 32);
-    l_tmp[2] = (p_product[4] >> 32) | (p_product[5] << 32);
-    l_tmp[3] = (p_product[6] << 32);
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    /* d4 */
-    l_tmp[0] = p_product[7];
-    l_tmp[1] = p_product[4] & 0xffffffff00000000ull;
-    l_tmp[2] = p_product[5];
-    l_tmp[3] = p_product[6] & 0xffffffff00000000ull;
-    l_carry -= vli_sub(p_result, p_result, l_tmp);
-
-    if(l_carry < 0)
-    {
-        do
-        {
-            l_carry += vli_add(p_result, p_result, curve_p);
-        } while(l_carry < 0);
-    }
-    else
-    {
-        while(l_carry || vli_cmp(curve_p, p_result) != 1)
-        {
-            l_carry -= vli_sub(p_result, p_result, curve_p);
-        }
-    }
-}
-#endif /* uECC_WORD_SIZE */
-
-#elif uECC_CURVE == uECC_secp256k1
-
-#if uECC_WORD_SIZE == 1
-static void omega_mult(uint8_t * RESTRICT p_result, uint8_t * RESTRICT p_right)
-{
-    /* Multiply by (2^32 + 2^9 + 2^8 + 2^7 + 2^6 + 2^4 + 1). */
-    uECC_word_t r0 = 0;
-    uECC_word_t r1 = 0;
-    uECC_word_t r2 = 0;
-
-    wordcount_t k;
-
-    /* Multiply by (2^9 + 2^8 + 2^7 + 2^6 + 2^4 + 1). */
-    muladd(0xD1, p_right[0], &r0, &r1, &r2);
-    p_result[0] = r0;
-    r0 = r1;
-    r1 = r2;
-    /* r2 is still 0 */
-
-    for(k = 1; k < uECC_WORDS; ++k)
-    {
-        muladd(0x03, p_right[k-1], &r0, &r1, &r2);
-        muladd(0xD1, p_right[k], &r0, &r1, &r2);
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-
-    muladd(0x03, p_right[uECC_WORDS-1], &r0, &r1, &r2);
-    p_result[uECC_WORDS] = r0;
-    p_result[uECC_WORDS + 1] = r1;
-
-    p_result[4 + uECC_WORDS] = vli_add(p_result + 4, p_result + 4, p_right); /* add the 2^32 multiple */
-}
-#elif uECC_WORD_SIZE == 4
-static void omega_mult(uint32_t * RESTRICT p_result, uint32_t * RESTRICT p_right)
-{
-    /* Multiply by (2^9 + 2^8 + 2^7 + 2^6 + 2^4 + 1). */
-    uint32_t l_carry = 0;
-    wordcount_t k;
-
-    for(k = 0; k < uECC_WORDS; ++k)
-    {
-        uint64_t p = (uint64_t)0x3D1 * p_right[k] + l_carry;
-        p_result[k] = (p & 0xffffffff);
-        l_carry = p >> 32;
-    }
-    p_result[uECC_WORDS] = l_carry;
-
-    p_result[1 + uECC_WORDS] = vli_add(p_result + 1, p_result + 1, p_right); /* add the 2^32 multiple */
-}
-#else
-static void omega_mult(uint64_t * RESTRICT p_result, uint64_t * RESTRICT p_right)
-{
-    uECC_word_t r0 = 0;
-    uECC_word_t r1 = 0;
-    uECC_word_t r2 = 0;
-
-    wordcount_t k;
-
-    /* Multiply by (2^32 + 2^9 + 2^8 + 2^7 + 2^6 + 2^4 + 1). */
-    for(k = 0; k < uECC_WORDS; ++k)
-    {
-        muladd(0x1000003D1ull, p_right[k], &r0, &r1, &r2);
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-
-    p_result[uECC_WORDS] = r0;
-}
-#endif /* uECC_WORD_SIZE */
-
-#endif /* uECC_CURVE */
-#endif /* !asm_mmod_fast */
-
-/* Computes p_result = (p_left * p_right) % curve_p. */
-static void vli_modMult_fast(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_product[2 * uECC_WORDS];
-    vli_mult(l_product, p_left, p_right);
-    vli_mmod_fast(p_result, l_product);
-}
-
-#if uECC_SQUARE_FUNC
-
-/* Computes p_result = p_left^2 % curve_p. */
-static void vli_modSquare_fast(uECC_word_t *p_result, uECC_word_t *p_left)
-{
-    uECC_word_t l_product[2 * uECC_WORDS];
-    vli_square(l_product, p_left);
-    vli_mmod_fast(p_result, l_product);
-}
-
-#else /* uECC_SQUARE_FUNC */
-
-#define vli_modSquare_fast(result, left) vli_modMult_fast((result), (left), (left))
-
-#endif /* uECC_SQUARE_FUNC */
-
-
-#define EVEN(vli) (!(vli[0] & 1))
-/* Computes p_result = (1 / p_input) % p_mod. All VLIs are the same size.
-   See "From Euclid's GCD to Montgomery Multiplication to the Great Divide"
-   https://labs.oracle.com/techrep/2001/smli_tr-2001-95.pdf */
-#if !asm_modInv
-static void vli_modInv(uECC_word_t *p_result, uECC_word_t *p_input, uECC_word_t *p_mod)
-{
-    uECC_word_t a[uECC_WORDS], b[uECC_WORDS], u[uECC_WORDS], v[uECC_WORDS];
-    uECC_word_t l_carry;
-    cmpresult_t l_cmpResult;
-
-    if(vli_isZero(p_input))
-    {
-        vli_clear(p_result);
-        return;
-    }
-
-    vli_set(a, p_input);
-    vli_set(b, p_mod);
-    vli_clear(u);
-    u[0] = 1;
-    vli_clear(v);
-    while((l_cmpResult = vli_cmp(a, b)) != 0)
-    {
-        l_carry = 0;
-        if(EVEN(a))
-        {
-            vli_rshift1(a);
-            if(!EVEN(u))
-            {
-                l_carry = vli_add(u, u, p_mod);
-            }
-            vli_rshift1(u);
-            if(l_carry)
-            {
-                u[uECC_WORDS-1] |= HIGH_BIT_SET;
-            }
-        }
-        else if(EVEN(b))
-        {
-            vli_rshift1(b);
-            if(!EVEN(v))
-            {
-                l_carry = vli_add(v, v, p_mod);
-            }
-            vli_rshift1(v);
-            if(l_carry)
-            {
-                v[uECC_WORDS-1] |= HIGH_BIT_SET;
-            }
-        }
-        else if(l_cmpResult > 0)
-        {
-            vli_sub(a, a, b);
-            vli_rshift1(a);
-            if(vli_cmp(u, v) < 0)
-            {
-                vli_add(u, u, p_mod);
-            }
-            vli_sub(u, u, v);
-            if(!EVEN(u))
-            {
-                l_carry = vli_add(u, u, p_mod);
-            }
-            vli_rshift1(u);
-            if(l_carry)
-            {
-                u[uECC_WORDS-1] |= HIGH_BIT_SET;
-            }
-        }
-        else
-        {
-            vli_sub(b, b, a);
-            vli_rshift1(b);
-            if(vli_cmp(v, u) < 0)
-            {
-                vli_add(v, v, p_mod);
-            }
-            vli_sub(v, v, u);
-            if(!EVEN(v))
-            {
-                l_carry = vli_add(v, v, p_mod);
-            }
-            vli_rshift1(v);
-            if(l_carry)
-            {
-                v[uECC_WORDS-1] |= HIGH_BIT_SET;
-            }
-        }
-    }
-
-    vli_set(p_result, u);
-}
-#endif /* !asm_modInv */
-
-/* ------ Point operations ------ */
-
-/* Returns 1 if p_point is the point at infinity, 0 otherwise. */
-static cmpresult_t EccPoint_isZero(EccPoint *p_point)
-{
-    return (vli_isZero(p_point->x) && vli_isZero(p_point->y));
-}
-
-/* Point multiplication algorithm using Montgomery's ladder with co-Z coordinates.
-From http://eprint.iacr.org/2011/338.pdf
-*/
-
-/* Double in place */
-#if (uECC_CURVE == uECC_secp256k1)
-static void EccPoint_double_jacobian(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1, uECC_word_t * RESTRICT Z1)
-{
-    /* t1 = X, t2 = Y, t3 = Z */
-    uECC_word_t t4[uECC_WORDS];
-    uECC_word_t t5[uECC_WORDS];
-
-    if(vli_isZero(Z1))
-    {
-        return;
-    }
-
-    vli_modSquare_fast(t5, Y1);   /* t5 = y1^2 */
-    vli_modMult_fast(t4, X1, t5); /* t4 = x1*y1^2 = A */
-    vli_modSquare_fast(X1, X1);   /* t1 = x1^2 */
-    vli_modSquare_fast(t5, t5);   /* t5 = y1^4 */
-    vli_modMult_fast(Z1, Y1, Z1); /* t3 = y1*z1 = z3 */
-
-    vli_modAdd(Y1, X1, X1, curve_p); /* t2 = 2*x1^2 */
-    vli_modAdd(Y1, Y1, X1, curve_p); /* t2 = 3*x1^2 */
-    if(vli_testBit(Y1, 0))
-    {
-        uECC_word_t l_carry = vli_add(Y1, Y1, curve_p);
-        vli_rshift1(Y1);
-        Y1[uECC_WORDS-1] |= l_carry << (uECC_WORD_BITS - 1);
-    }
-    else
-    {
-        vli_rshift1(Y1);
-    }
-    /* t2 = 3/2*(x1^2) = B */
-
-    vli_modSquare_fast(X1, Y1);   /* t1 = B^2 */
-    vli_modSub(X1, X1, t4, curve_p); /* t1 = B^2 - A */
-    vli_modSub(X1, X1, t4, curve_p); /* t1 = B^2 - 2A = x3 */
-
-    vli_modSub(t4, t4, X1, curve_p); /* t4 = A - x3 */
-    vli_modMult_fast(Y1, Y1, t4);    /* t2 = B * (A - x3) */
-    vli_modSub(Y1, Y1, t5, curve_p); /* t2 = B * (A - x3) - y1^4 = y3 */
-}
-#else
-static void EccPoint_double_jacobian(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1, uECC_word_t * RESTRICT Z1)
-{
-    /* t1 = X, t2 = Y, t3 = Z */
-    uECC_word_t t4[uECC_WORDS];
-    uECC_word_t t5[uECC_WORDS];
-
-    if(vli_isZero(Z1))
-    {
-        return;
-    }
-
-    vli_modSquare_fast(t4, Y1);   /* t4 = y1^2 */
-    vli_modMult_fast(t5, X1, t4); /* t5 = x1*y1^2 = A */
-    vli_modSquare_fast(t4, t4);   /* t4 = y1^4 */
-    vli_modMult_fast(Y1, Y1, Z1); /* t2 = y1*z1 = z3 */
-    vli_modSquare_fast(Z1, Z1);   /* t3 = z1^2 */
-
-    vli_modAdd(X1, X1, Z1, curve_p); /* t1 = x1 + z1^2 */
-    vli_modAdd(Z1, Z1, Z1, curve_p); /* t3 = 2*z1^2 */
-    vli_modSub_fast(Z1, X1, Z1); /* t3 = x1 - z1^2 */
-    vli_modMult_fast(X1, X1, Z1);    /* t1 = x1^2 - z1^4 */
-
-    vli_modAdd(Z1, X1, X1, curve_p); /* t3 = 2*(x1^2 - z1^4) */
-    vli_modAdd(X1, X1, Z1, curve_p); /* t1 = 3*(x1^2 - z1^4) */
-    if(vli_testBit(X1, 0))
-    {
-        uECC_word_t l_carry = vli_add(X1, X1, curve_p);
-        vli_rshift1(X1);
-        X1[uECC_WORDS-1] |= l_carry << (uECC_WORD_BITS - 1);
-    }
-    else
-    {
-        vli_rshift1(X1);
-    }
-    /* t1 = 3/2*(x1^2 - z1^4) = B */
-
-    vli_modSquare_fast(Z1, X1);      /* t3 = B^2 */
-    vli_modSub_fast(Z1, Z1, t5); /* t3 = B^2 - A */
-    vli_modSub_fast(Z1, Z1, t5); /* t3 = B^2 - 2A = x3 */
-    vli_modSub_fast(t5, t5, Z1); /* t5 = A - x3 */
-    vli_modMult_fast(X1, X1, t5);    /* t1 = B * (A - x3) */
-    vli_modSub_fast(t4, X1, t4); /* t4 = B * (A - x3) - y1^4 = y3 */
-
-    vli_set(X1, Z1);
-    vli_set(Z1, Y1);
-    vli_set(Y1, t4);
-}
-#endif
-
-/* Modify (x1, y1) => (x1 * z^2, y1 * z^3) */
-static void apply_z(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1, uECC_word_t * RESTRICT Z)
-{
-    uECC_word_t t1[uECC_WORDS];
-
-    vli_modSquare_fast(t1, Z);    /* z^2 */
-    vli_modMult_fast(X1, X1, t1); /* x1 * z^2 */
-    vli_modMult_fast(t1, t1, Z);  /* z^3 */
-    vli_modMult_fast(Y1, Y1, t1); /* y1 * z^3 */
-}
-
-/* P = (x1, y1) => 2P, (x2, y2) => P' */
-static void XYcZ_initial_double(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1,
-    uECC_word_t * RESTRICT X2, uECC_word_t * RESTRICT Y2, const uECC_word_t * RESTRICT p_initialZ)
-{
-    uECC_word_t z[uECC_WORDS];
-
-    vli_set(X2, X1);
-    vli_set(Y2, Y1);
-
-    vli_clear(z);
-    z[0] = 1;
-    if(p_initialZ)
-    {
-        vli_set(z, p_initialZ);
-    }
-
-    apply_z(X1, Y1, z);
-
-    EccPoint_double_jacobian(X1, Y1, z);
-
-    apply_z(X2, Y2, z);
-}
-
-/* Input P = (x1, y1, Z), Q = (x2, y2, Z)
-   Output P' = (x1', y1', Z3), P + Q = (x3, y3, Z3)
-   or P => P', Q => P + Q
-*/
-static void XYcZ_add(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1, uECC_word_t * RESTRICT X2, uECC_word_t * RESTRICT Y2)
-{
-    /* t1 = X1, t2 = Y1, t3 = X2, t4 = Y2 */
-    uECC_word_t t5[uECC_WORDS];
-
-    vli_modSub_fast(t5, X2, X1); /* t5 = x2 - x1 */
-    vli_modSquare_fast(t5, t5);      /* t5 = (x2 - x1)^2 = A */
-    vli_modMult_fast(X1, X1, t5);    /* t1 = x1*A = B */
-    vli_modMult_fast(X2, X2, t5);    /* t3 = x2*A = C */
-    vli_modSub_fast(Y2, Y2, Y1); /* t4 = y2 - y1 */
-    vli_modSquare_fast(t5, Y2);      /* t5 = (y2 - y1)^2 = D */
-
-    vli_modSub_fast(t5, t5, X1); /* t5 = D - B */
-    vli_modSub_fast(t5, t5, X2); /* t5 = D - B - C = x3 */
-    vli_modSub_fast(X2, X2, X1); /* t3 = C - B */
-    vli_modMult_fast(Y1, Y1, X2);    /* t2 = y1*(C - B) */
-    vli_modSub_fast(X2, X1, t5); /* t3 = B - x3 */
-    vli_modMult_fast(Y2, Y2, X2);    /* t4 = (y2 - y1)*(B - x3) */
-    vli_modSub_fast(Y2, Y2, Y1); /* t4 = y3 */
-
-    vli_set(X2, t5);
-}
-
-/* Input P = (x1, y1, Z), Q = (x2, y2, Z)
-   Output P + Q = (x3, y3, Z3), P - Q = (x3', y3', Z3)
-   or P => P - Q, Q => P + Q
-*/
-static void XYcZ_addC(uECC_word_t * RESTRICT X1, uECC_word_t * RESTRICT Y1, uECC_word_t * RESTRICT X2, uECC_word_t * RESTRICT Y2)
-{
-    /* t1 = X1, t2 = Y1, t3 = X2, t4 = Y2 */
-    uECC_word_t t5[uECC_WORDS];
-    uECC_word_t t6[uECC_WORDS];
-    uECC_word_t t7[uECC_WORDS];
-
-    vli_modSub_fast(t5, X2, X1); /* t5 = x2 - x1 */
-    vli_modSquare_fast(t5, t5);      /* t5 = (x2 - x1)^2 = A */
-    vli_modMult_fast(X1, X1, t5);    /* t1 = x1*A = B */
-    vli_modMult_fast(X2, X2, t5);    /* t3 = x2*A = C */
-    vli_modAdd(t5, Y2, Y1, curve_p); /* t4 = y2 + y1 */
-    vli_modSub_fast(Y2, Y2, Y1); /* t4 = y2 - y1 */
-
-    vli_modSub_fast(t6, X2, X1); /* t6 = C - B */
-    vli_modMult_fast(Y1, Y1, t6);    /* t2 = y1 * (C - B) */
-    vli_modAdd(t6, X1, X2, curve_p); /* t6 = B + C */
-    vli_modSquare_fast(X2, Y2);      /* t3 = (y2 - y1)^2 */
-    vli_modSub_fast(X2, X2, t6); /* t3 = x3 */
-
-    vli_modSub_fast(t7, X1, X2); /* t7 = B - x3 */
-    vli_modMult_fast(Y2, Y2, t7);    /* t4 = (y2 - y1)*(B - x3) */
-    vli_modSub_fast(Y2, Y2, Y1); /* t4 = y3 */
-
-    vli_modSquare_fast(t7, t5);      /* t7 = (y2 + y1)^2 = F */
-    vli_modSub_fast(t7, t7, t6); /* t7 = x3' */
-    vli_modSub_fast(t6, t7, X1); /* t6 = x3' - B */
-    vli_modMult_fast(t6, t6, t5);    /* t6 = (y2 + y1)*(x3' - B) */
-    vli_modSub_fast(Y1, t6, Y1); /* t2 = y3' */
-
-    vli_set(X1, t7);
-}
-
-static void EccPoint_mult(EccPoint * RESTRICT p_result, EccPoint * RESTRICT p_point,
-    const uECC_word_t * RESTRICT p_scalar, const uECC_word_t * RESTRICT p_initialZ, bitcount_t p_numBits)
-{
-    /* R0 and R1 */
-    uECC_word_t Rx[2][uECC_WORDS];
-    uECC_word_t Ry[2][uECC_WORDS];
-    uECC_word_t z[uECC_WORDS];
-
-    bitcount_t i;
-    uECC_word_t nb;
-
-    vli_set(Rx[1], p_point->x);
-    vli_set(Ry[1], p_point->y);
-
-    XYcZ_initial_double(Rx[1], Ry[1], Rx[0], Ry[0], p_initialZ);
-
-    for(i = p_numBits - 2; i > 0; --i)
-    {
-        nb = !vli_testBit(p_scalar, i);
-        XYcZ_addC(Rx[1-nb], Ry[1-nb], Rx[nb], Ry[nb]);
-        XYcZ_add(Rx[nb], Ry[nb], Rx[1-nb], Ry[1-nb]);
-    }
-
-    nb = !vli_testBit(p_scalar, 0);
-    XYcZ_addC(Rx[1-nb], Ry[1-nb], Rx[nb], Ry[nb]);
-
-    /* Find final 1/Z value. */
-    vli_modSub_fast(z, Rx[1], Rx[0]); /* X1 - X0 */
-    vli_modMult_fast(z, z, Ry[1-nb]);     /* Yb * (X1 - X0) */
-    vli_modMult_fast(z, z, p_point->x);   /* xP * Yb * (X1 - X0) */
-    vli_modInv(z, z, curve_p);            /* 1 / (xP * Yb * (X1 - X0)) */
-    vli_modMult_fast(z, z, p_point->y);   /* yP / (xP * Yb * (X1 - X0)) */
-    vli_modMult_fast(z, z, Rx[1-nb]);     /* Xb * yP / (xP * Yb * (X1 - X0)) */
-    /* End 1/Z calculation */
-
-    XYcZ_add(Rx[nb], Ry[nb], Rx[1-nb], Ry[1-nb]);
-
-    apply_z(Rx[0], Ry[0], z);
-
-    vli_set(p_result->x, Rx[0]);
-    vli_set(p_result->y, Ry[0]);
-}
-
-/* Compute a = sqrt(a) (mod curve_p). */
-static void mod_sqrt(uECC_word_t *a)
-{
-    bitcount_t i;
-    uECC_word_t p1[uECC_WORDS] = {1};
-    uECC_word_t l_result[uECC_WORDS] = {1};
-
-    /* Since curve_p == 3 (mod 4) for all supported curves, we can
-       compute sqrt(a) = a^((curve_p + 1) / 4) (mod curve_p). */
-    vli_add(p1, curve_p, p1); /* p1 = curve_p + 1 */
-    for(i = vli_numBits(p1, uECC_WORDS) - 1; i > 1; --i)
-    {
-        vli_modSquare_fast(l_result, l_result);
-        if(vli_testBit(p1, i))
-        {
-            vli_modMult_fast(l_result, l_result, a);
-        }
-    }
-    vli_set(a, l_result);
-}
-
-#if uECC_WORD_SIZE == 1
-
-static void vli_nativeToBytes(uint8_t * RESTRICT p_dest, const uint8_t * RESTRICT p_src)
-{
-    uint8_t i;
-    for(i=0; i<uECC_BYTES; ++i)
-    {
-        p_dest[i] = p_src[(uECC_BYTES - 1) - i];
-    }
-}
-
-#define vli_bytesToNative(dest, src) vli_nativeToBytes((dest), (src))
-
-#elif uECC_WORD_SIZE == 4
-
-static void vli_nativeToBytes(uint8_t *p_bytes, const uint32_t *p_native)
-{
-    unsigned i;
-    for(i=0; i<uECC_WORDS; ++i)
-    {
-        uint8_t *p_digit = p_bytes + 4 * (uECC_WORDS - 1 - i);
-        p_digit[0] = p_native[i] >> 24;
-        p_digit[1] = p_native[i] >> 16;
-        p_digit[2] = p_native[i] >> 8;
-        p_digit[3] = p_native[i];
-    }
-}
-
-static void vli_bytesToNative(uint32_t *p_native, const uint8_t *p_bytes)
-{
-    unsigned i;
-    for(i=0; i<uECC_WORDS; ++i)
-    {
-        const uint8_t *p_digit = p_bytes + 4 * (uECC_WORDS - 1 - i);
-        p_native[i] = ((uint32_t)p_digit[0] << 24) | ((uint32_t)p_digit[1] << 16) | ((uint32_t)p_digit[2] << 8) | (uint32_t)p_digit[3];
-    }
-}
-
-#else
-
-static void vli_nativeToBytes(uint8_t *p_bytes, const uint64_t *p_native)
-{
-    unsigned i;
-    for(i=0; i<uECC_WORDS; ++i)
-    {
-        uint8_t *p_digit = p_bytes + 8 * (uECC_WORDS - 1 - i);
-        p_digit[0] = p_native[i] >> 56;
-        p_digit[1] = p_native[i] >> 48;
-        p_digit[2] = p_native[i] >> 40;
-        p_digit[3] = p_native[i] >> 32;
-        p_digit[4] = p_native[i] >> 24;
-        p_digit[5] = p_native[i] >> 16;
-        p_digit[6] = p_native[i] >> 8;
-        p_digit[7] = p_native[i];
-    }
-}
-
-static void vli_bytesToNative(uint64_t *p_native, const uint8_t *p_bytes)
-{
-    unsigned i;
-    for(i=0; i<uECC_WORDS; ++i)
-    {
-        const uint8_t *p_digit = p_bytes + 8 * (uECC_WORDS - 1 - i);
-        p_native[i] = ((uint64_t)p_digit[0] << 56) | ((uint64_t)p_digit[1] << 48) | ((uint64_t)p_digit[2] << 40) | ((uint64_t)p_digit[3] << 32) |
-            ((uint64_t)p_digit[4] << 24) | ((uint64_t)p_digit[5] << 16) | ((uint64_t)p_digit[6] << 8) | (uint64_t)p_digit[7];
-    }
-}
-
-#endif /* uECC_WORD_SIZE */
-
-// Safe calls to the callback functions
-int uECC_make_key(uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_privateKey[uECC_BYTES])
-{
-    // Check for a valid function pointer
-    if (g_make_key_cb != NULL)
-    {
-        return g_make_key_cb(p_publicKey, p_privateKey);
-    }
-    else
-    {
-        return uECC_make_key_impl(p_publicKey, p_privateKey);
-    }
-}
-
-int uECC_shared_secret(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_privateKey[uECC_BYTES], uint8_t p_secret[uECC_BYTES])
-{
-    // Check for a valid function pointer
-    if (g_shared_secret_cb != NULL)
-    {
-        return g_shared_secret_cb(p_publicKey, p_privateKey, p_secret);
-    }
-    else
-    {
-        return uECC_shared_secret_impl(p_publicKey, p_privateKey, p_secret);
-    }
-}
-
-int uECC_sign(const uint8_t p_privateKey[uECC_BYTES], const uint8_t p_hash[uECC_BYTES], uint8_t p_signature[uECC_BYTES*2])
-{
-    // Check for a valid function pointer
-    if (g_sign_cb != NULL)
-    {
-        return g_sign_cb(p_privateKey, p_hash, p_signature);
-    }
-    else
-    {
-        return uECC_sign_impl(p_privateKey, p_hash, p_signature);
-    }
-}
-
-int uECC_verify(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_hash[uECC_BYTES], const uint8_t p_signature[uECC_BYTES*2])
-{
-       // Check for a valid function pointer
-       if (g_verify_cb != NULL)
-       {
-               return g_verify_cb(p_publicKey, p_hash, p_signature);
-       }
-       else
-       {
-               return uECC_verify_impl(p_publicKey, p_hash, p_signature);
-       }
-}
-
-int uECC_ecdhe(const uint8_t p_public_key_in[uECC_BYTES*2], uint8_t p_public_key_out[uECC_BYTES*2], uint8_t p_secret[uECC_BYTES])
-{
-       // Check for a valid function pointer
-       if (g_ecdhe_cb != NULL)
-       {
-               return g_ecdhe_cb(p_public_key_in, p_public_key_out, p_secret);
-       }
-       else
-       {
-               return uECC_ecdhe_impl(p_public_key_in, p_public_key_out, p_secret);
-       }
-}
-
-int uECC_get_pubkey(const uint8_t p_key_handle[uECC_BYTES], uint8_t p_public_key[uECC_BYTES*2])
-{
-       // Check for a valid function pointer
-       if (g_get_pubkey_cb != NULL)
-       {
-               return g_get_pubkey_cb(p_key_handle, p_public_key);
-       }
-       else
-       {
-               return uECC_get_pubkey_impl(p_key_handle, p_public_key);
-       }
-}
-
-int uECC_ecdhe_impl(const uint8_t p_public_key_in[uECC_BYTES*2], uint8_t p_public_key_out[uECC_BYTES*2], uint8_t p_secret[uECC_BYTES])
-{
-       return 0;
-}
-
-int uECC_get_pubkey_impl(const uint8_t p_key_handle[uECC_BYTES], uint8_t p_public_key[uECC_BYTES*2])
-{
-       return 0;
-}
-
-int uECC_make_key_impl(uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_privateKey[uECC_BYTES])
-{
-    EccPoint l_public;
-    uECC_word_t l_private[uECC_WORDS];
-    uECC_word_t l_tries = 0;
-
-    do
-    {
-    repeat:
-        if(!g_rng((uint8_t *)l_private, sizeof(l_private)) || (l_tries++ >= MAX_TRIES))
-        {
-            return 0;
-        }
-        if(vli_isZero(l_private))
-        {
-            goto repeat;
-        }
-
-        /* Make sure the private key is in the range [1, n-1]. */
-    #if uECC_CURVE != uECC_secp160r1
-        if(vli_cmp(curve_n, l_private) != 1)
-        {
-            goto repeat;
-        }
-    #endif
-
-        EccPoint_mult(&l_public, &curve_G, l_private, 0, vli_numBits(l_private, uECC_WORDS));
-    } while(EccPoint_isZero(&l_public));
-
-    vli_nativeToBytes(p_privateKey, l_private);
-    vli_nativeToBytes(p_publicKey, l_public.x);
-    vli_nativeToBytes(p_publicKey + uECC_BYTES, l_public.y);
-    return 1;
-}
-
-int uECC_shared_secret_impl(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_privateKey[uECC_BYTES], uint8_t p_secret[uECC_BYTES])
-{
-    EccPoint l_public;
-    uECC_word_t l_private[uECC_WORDS];
-    uECC_word_t l_random[uECC_WORDS];
-
-    g_rng((uint8_t *)l_random, sizeof(l_random));
-
-    vli_bytesToNative(l_private, p_privateKey);
-    vli_bytesToNative(l_public.x, p_publicKey);
-    vli_bytesToNative(l_public.y, p_publicKey + uECC_BYTES);
-
-    EccPoint l_product;
-    EccPoint_mult(&l_product, &l_public, l_private, (vli_isZero(l_random) ? 0: l_random), vli_numBits(l_private, uECC_WORDS));
-
-    vli_nativeToBytes(p_secret, l_product.x);
-
-    return !EccPoint_isZero(&l_product);
-}
-
-void uECC_compress(const uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_compressed[uECC_BYTES+1])
-{
-    wordcount_t i;
-    for(i=0; i<uECC_BYTES; ++i)
-    {
-        p_compressed[i+1] = p_publicKey[i];
-    }
-    p_compressed[0] = 2 + (p_publicKey[uECC_BYTES * 2 - 1] & 0x01);
-}
-
-void uECC_decompress(const uint8_t p_compressed[uECC_BYTES+1], uint8_t p_publicKey[uECC_BYTES*2])
-{
-    EccPoint l_point;
-    vli_bytesToNative(l_point.x, p_compressed + 1);
-
-#if (uECC_CURVE == uECC_secp256k1)
-    vli_modSquare_fast(l_point.y, l_point.x); /* r = x^2 */
-    vli_modMult_fast(l_point.y, l_point.y, l_point.x); /* r = x^3 */
-    vli_modAdd(l_point.y, l_point.y, curve_b, curve_p); /* r = x^3 + b */
-#else
-    uECC_word_t _3[uECC_WORDS] = {3}; /* -a = 3 */
-
-    vli_modSquare_fast(l_point.y, l_point.x); /* y = x^2 */
-    vli_modSub_fast(l_point.y, l_point.y, _3); /* y = x^2 - 3 */
-    vli_modMult_fast(l_point.y, l_point.y, l_point.x); /* y = x^3 - 3x */
-    vli_modAdd(l_point.y, l_point.y, curve_b, curve_p); /* y = x^3 - 3x + b */
-#endif
-
-    mod_sqrt(l_point.y);
-
-    if((l_point.y[0] & 0x01) != (p_compressed[0] & 0x01))
-    {
-        vli_sub(l_point.y, curve_p, l_point.y);
-    }
-
-    vli_nativeToBytes(p_publicKey, l_point.x);
-    vli_nativeToBytes(p_publicKey + uECC_BYTES, l_point.y);
-}
-
-/* -------- ECDSA code -------- */
-
-#if (uECC_CURVE == uECC_secp160r1)
-static void vli_clear_n(uECC_word_t *p_vli)
-{
-    vli_clear(p_vli);
-    p_vli[uECC_N_WORDS - 1] = 0;
-}
-
-static uECC_word_t vli_isZero_n(const uECC_word_t *p_vli)
-{
-    if(p_vli[uECC_N_WORDS - 1])
-    {
-        return 0;
-    }
-    return vli_isZero(p_vli);
-}
-
-static void vli_set_n(uECC_word_t *p_dest, const uECC_word_t *p_src)
-{
-    vli_set(p_dest, p_src);
-    p_dest[uECC_N_WORDS-1] = p_src[uECC_N_WORDS-1];
-}
-
-static cmpresult_t vli_cmp_n(uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    if(p_left[uECC_N_WORDS-1] > p_right[uECC_N_WORDS-1])
-    {
-        return 1;
-    }
-    else if(p_left[uECC_N_WORDS-1] < p_right[uECC_N_WORDS-1])
-    {
-        return -1;
-    }
-    return vli_cmp(p_left, p_right);
-}
-
-static void vli_rshift1_n(uECC_word_t *p_vli)
-{
-    vli_rshift1(p_vli);
-    p_vli[uECC_N_WORDS-2] |= p_vli[uECC_N_WORDS-1] << (uECC_WORD_BITS - 1);
-    p_vli[uECC_N_WORDS-1] = p_vli[uECC_N_WORDS-1] >> 1;
-}
-
-static uECC_word_t vli_add_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_carry = vli_add(p_result, p_left, p_right);
-    uECC_word_t l_sum = p_left[uECC_N_WORDS-1] + p_right[uECC_N_WORDS-1] + l_carry;
-    if(l_sum != p_left[uECC_N_WORDS-1])
-    {
-        l_carry = (l_sum < p_left[uECC_N_WORDS-1]);
-    }
-    p_result[uECC_N_WORDS-1] = l_sum;
-    return l_carry;
-}
-
-static uECC_word_t vli_sub_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_borrow = vli_sub(p_result, p_left, p_right);
-    uECC_word_t l_diff = p_left[uECC_N_WORDS-1] - p_right[uECC_N_WORDS-1] - l_borrow;
-    if(l_diff != p_left[uECC_N_WORDS-1])
-    {
-        l_borrow = (l_diff > p_left[uECC_N_WORDS-1]);
-    }
-    p_result[uECC_N_WORDS-1] = l_diff;
-    return l_borrow;
-}
-
-#if !muladd_exists
-static void muladd(uECC_word_t a, uECC_word_t b, uECC_word_t *r0, uECC_word_t *r1, uECC_word_t *r2)
-{
-    uECC_dword_t p = (uECC_dword_t)a * b;
-    uECC_dword_t r01 = ((uECC_dword_t)(*r1) << uECC_WORD_BITS) | *r0;
-    r01 += p;
-    *r2 += (r01 < p);
-    *r1 = r01 >> uECC_WORD_BITS;
-    *r0 = (uECC_word_t)r01;
-}
-#define muladd_exists 1
-#endif
-
-static void vli_mult_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t r0 = 0;
-    uECC_word_t r1 = 0;
-    uECC_word_t r2 = 0;
-
-    wordcount_t i, k;
-    for(k = 0; k < uECC_N_WORDS*2 - 1; ++k)
-    {
-        wordcount_t l_min = (k < uECC_N_WORDS ? 0 : (k + 1) - uECC_N_WORDS);
-        wordcount_t l_max = (k < uECC_N_WORDS ? k : uECC_N_WORDS-1);
-        for(i = l_min; i <= l_max; ++i)
-        {
-            muladd(p_left[i], p_right[k-i], &r0, &r1, &r2);
-        }
-        p_result[k] = r0;
-        r0 = r1;
-        r1 = r2;
-        r2 = 0;
-    }
-
-    p_result[uECC_N_WORDS*2 - 1] = r0;
-}
-
-static void vli_modAdd_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right, uECC_word_t *p_mod)
-{
-    uECC_word_t l_carry = vli_add_n(p_result, p_left, p_right);
-    if(l_carry || vli_cmp_n(p_result, p_mod) >= 0)
-    {
-        vli_sub_n(p_result, p_result, p_mod);
-    }
-}
-
-static void vli_modInv_n(uECC_word_t *p_result, uECC_word_t *p_input, uECC_word_t *p_mod)
-{
-    uECC_word_t a[uECC_N_WORDS], b[uECC_N_WORDS], u[uECC_N_WORDS], v[uECC_N_WORDS];
-    uECC_word_t l_carry;
-    cmpresult_t l_cmpResult;
-
-    if(vli_isZero_n(p_input))
-    {
-        vli_clear_n(p_result);
-        return;
-    }
-
-    vli_set_n(a, p_input);
-    vli_set_n(b, p_mod);
-    vli_clear_n(u);
-    u[0] = 1;
-    vli_clear_n(v);
-    while((l_cmpResult = vli_cmp_n(a, b)) != 0)
-    {
-        l_carry = 0;
-        if(EVEN(a))
-        {
-            vli_rshift1_n(a);
-            if(!EVEN(u)) l_carry = vli_add_n(u, u, p_mod);
-            vli_rshift1_n(u);
-            if(l_carry) u[uECC_N_WORDS-1] |= HIGH_BIT_SET;
-        }
-        else if(EVEN(b))
-        {
-            vli_rshift1_n(b);
-            if(!EVEN(v)) l_carry = vli_add_n(v, v, p_mod);
-            vli_rshift1_n(v);
-            if(l_carry) v[uECC_N_WORDS-1] |= HIGH_BIT_SET;
-        }
-        else if(l_cmpResult > 0)
-        {
-            vli_sub_n(a, a, b);
-            vli_rshift1_n(a);
-            if(vli_cmp_n(u, v) < 0) vli_add_n(u, u, p_mod);
-            vli_sub_n(u, u, v);
-            if(!EVEN(u)) l_carry = vli_add_n(u, u, p_mod);
-            vli_rshift1_n(u);
-            if(l_carry) u[uECC_N_WORDS-1] |= HIGH_BIT_SET;
-        }
-        else
-        {
-            vli_sub_n(b, b, a);
-            vli_rshift1_n(b);
-            if(vli_cmp_n(v, u) < 0) vli_add_n(v, v, p_mod);
-            vli_sub_n(v, v, u);
-            if(!EVEN(v)) l_carry = vli_add_n(v, v, p_mod);
-            vli_rshift1_n(v);
-            if(l_carry) v[uECC_N_WORDS-1] |= HIGH_BIT_SET;
-        }
-    }
-
-    vli_set_n(p_result, u);
-}
-
-static void vli2_rshift1_n(uECC_word_t *p_vli)
-{
-    vli_rshift1_n(p_vli);
-    p_vli[uECC_N_WORDS-1] |= p_vli[uECC_N_WORDS] << (uECC_WORD_BITS - 1);
-    vli_rshift1_n(p_vli + uECC_N_WORDS);
-}
-
-static uECC_word_t vli2_sub_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_borrow = 0;
-    wordcount_t i;
-    for(i=0; i<uECC_N_WORDS*2; ++i)
-    {
-        uECC_word_t l_diff = p_left[i] - p_right[i] - l_borrow;
-        if(l_diff != p_left[i])
-        {
-            l_borrow = (l_diff > p_left[i]);
-        }
-        p_result[i] = l_diff;
-    }
-    return l_borrow;
-}
-
-/* Computes p_result = (p_left * p_right) % curve_n. */
-static void vli_modMult_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_product[2 * uECC_N_WORDS];
-    uECC_word_t l_modMultiple[2 * uECC_N_WORDS];
-    uECC_word_t l_tmp[2 * uECC_N_WORDS];
-    uECC_word_t *v[2] = {l_tmp, l_product};
-
-    vli_mult_n(l_product, p_left, p_right);
-    vli_clear_n(l_modMultiple);
-    vli_set(l_modMultiple + uECC_N_WORDS + 1, curve_n);
-    vli_rshift1(l_modMultiple + uECC_N_WORDS + 1);
-    l_modMultiple[2 * uECC_N_WORDS - 1] |= HIGH_BIT_SET;
-    l_modMultiple[uECC_N_WORDS] = HIGH_BIT_SET;
-
-    bitcount_t i;
-    uECC_word_t l_index = 1;
-    for(i=0; i<=((((bitcount_t)uECC_N_WORDS) << uECC_WORD_BITS_SHIFT) + (uECC_WORD_BITS - 1)); ++i)
-    {
-        uECC_word_t l_borrow = vli2_sub_n(v[1-l_index], v[l_index], l_modMultiple);
-        l_index = !(l_index ^ l_borrow); /* Swap the index if there was no borrow */
-        vli2_rshift1_n(l_modMultiple);
-    }
-
-    vli_set_n(p_result, v[l_index]);
-}
-
-#else
-
-#define vli_modInv_n vli_modInv
-#define vli_modAdd_n vli_modAdd
-
-static void vli2_rshift1(uECC_word_t *p_vli)
-{
-    vli_rshift1(p_vli);
-    p_vli[uECC_WORDS-1] |= p_vli[uECC_WORDS] << (uECC_WORD_BITS - 1);
-    vli_rshift1(p_vli + uECC_WORDS);
-}
-
-static uECC_word_t vli2_sub(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_borrow = 0;
-    wordcount_t i;
-    for(i=0; i<uECC_WORDS*2; ++i)
-    {
-        uECC_word_t l_diff = p_left[i] - p_right[i] - l_borrow;
-        if(l_diff != p_left[i])
-        {
-            l_borrow = (l_diff > p_left[i]);
-        }
-        p_result[i] = l_diff;
-    }
-    return l_borrow;
-}
-
-/* Computes p_result = (p_left * p_right) % curve_n. */
-static void vli_modMult_n(uECC_word_t *p_result, uECC_word_t *p_left, uECC_word_t *p_right)
-{
-    uECC_word_t l_product[2 * uECC_WORDS];
-    uECC_word_t l_modMultiple[2 * uECC_WORDS];
-    uECC_word_t l_tmp[2 * uECC_WORDS];
-    uECC_word_t *v[2] = {l_tmp, l_product};
-
-    vli_mult(l_product, p_left, p_right);
-    vli_set(l_modMultiple + uECC_WORDS, curve_n); /* works if curve_n has its highest bit set */
-    vli_clear(l_modMultiple);
-
-    bitcount_t i;
-    uECC_word_t l_index = 1;
-    for(i=0; i<=uECC_BYTES * 8; ++i)
-    {
-        uECC_word_t l_borrow = vli2_sub(v[1-l_index], v[l_index], l_modMultiple);
-        l_index = !(l_index ^ l_borrow); /* Swap the index if there was no borrow */
-        vli2_rshift1(l_modMultiple);
-    }
-
-    vli_set(p_result, v[l_index]);
-}
-#endif /* (uECC_CURVE != uECC_secp160r1) */
-
-int uECC_sign_impl(const uint8_t p_privateKey[uECC_BYTES], const uint8_t p_hash[uECC_BYTES], uint8_t p_signature[uECC_BYTES*2])
-{
-    uECC_word_t k[uECC_N_WORDS];
-    uECC_word_t l_tmp[uECC_N_WORDS];
-    uECC_word_t s[uECC_N_WORDS];
-    uECC_word_t *k2[2] = {l_tmp, s};
-    EccPoint p;
-    uECC_word_t l_tries = 0;
-
-    do
-    {
-    repeat:
-        if(!g_rng((uint8_t *)k, sizeof(k)) || (l_tries++ >= MAX_TRIES))
-        {
-            return 0;
-        }
-
-        if(vli_isZero(k))
-        {
-            goto repeat;
-        }
-
-    #if (uECC_CURVE == uECC_secp160r1)
-        k[uECC_WORDS] &= 0x01;
-        if(vli_cmp_n(curve_n, k) != 1)
-        {
-            goto repeat;
-        }
-
-        /* make sure that we don't leak timing information about k. See http://eprint.iacr.org/2011/232.pdf */
-        vli_add_n(l_tmp, k, curve_n);
-        uECC_word_t l_carry = (l_tmp[uECC_WORDS] & 0x02);
-        vli_add_n(s, l_tmp, curve_n);
-
-        /* p = k * G */
-        EccPoint_mult(&p, &curve_G, k2[!l_carry], 0, (uECC_BYTES * 8) + 2);
-    #else
-        if(vli_cmp(curve_n, k) != 1)
-        {
-            goto repeat;
-        }
-
-        /* make sure that we don't leak timing information about k. See http://eprint.iacr.org/2011/232.pdf */
-        uECC_word_t l_carry = vli_add(l_tmp, k, curve_n);
-        vli_add(s, l_tmp, curve_n);
-
-        /* p = k * G */
-        EccPoint_mult(&p, &curve_G, k2[!l_carry], 0, (uECC_BYTES * 8) + 1);
-
-        /* r = x1 (mod n) */
-        if(vli_cmp(curve_n, p.x) != 1)
-        {
-            vli_sub(p.x, p.x, curve_n);
-        }
-    #endif
-    } while(vli_isZero(p.x));
-
-    l_tries = 0;
-    do
-    {
-        if(!g_rng((uint8_t *)l_tmp, sizeof(l_tmp)) || (l_tries++ >= MAX_TRIES))
-        {
-            return 0;
-        }
-    } while(vli_isZero(l_tmp));
-
-    /* Prevent side channel analysis of vli_modInv() to determine
-       bits of k / the private key by premultiplying by a random number */
-    vli_modMult_n(k, k, l_tmp); /* k' = rand * k */
-    vli_modInv_n(k, k, curve_n); /* k = 1 / k' */
-    vli_modMult_n(k, k, l_tmp); /* k = 1 / k */
-
-    vli_nativeToBytes(p_signature, p.x); /* store r */
-
-    l_tmp[uECC_N_WORDS-1] = 0;
-    vli_bytesToNative(l_tmp, p_privateKey); /* tmp = d */
-    s[uECC_N_WORDS-1] = 0;
-    vli_set(s, p.x);
-    vli_modMult_n(s, l_tmp, s); /* s = r*d */
-
-    vli_bytesToNative(l_tmp, p_hash);
-    vli_modAdd_n(s, l_tmp, s, curve_n); /* s = e + r*d */
-    vli_modMult_n(s, s, k); /* s = (e + r*d) / k */
-#if (uECC_CURVE == uECC_secp160r1)
-    if(s[uECC_N_WORDS-1])
-    {
-        goto repeat;
-    }
-#endif
-    vli_nativeToBytes(p_signature + uECC_BYTES, s);
-
-    return 1;
-}
-
-static bitcount_t smax(bitcount_t a, bitcount_t b)
-{
-    return (a > b ? a : b);
-}
-
-int uECC_verify_impl(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_hash[uECC_BYTES], const uint8_t p_signature[uECC_BYTES*2])
-{
-    uECC_word_t u1[uECC_N_WORDS], u2[uECC_N_WORDS];
-    uECC_word_t z[uECC_N_WORDS];
-    EccPoint l_public, l_sum;
-    uECC_word_t rx[uECC_WORDS];
-    uECC_word_t ry[uECC_WORDS];
-    uECC_word_t tx[uECC_WORDS];
-    uECC_word_t ty[uECC_WORDS];
-    uECC_word_t tz[uECC_WORDS];
-
-    uECC_word_t r[uECC_N_WORDS], s[uECC_N_WORDS];
-    r[uECC_N_WORDS-1] = 0;
-    s[uECC_N_WORDS-1] = 0;
-
-    vli_bytesToNative(l_public.x, p_publicKey);
-    vli_bytesToNative(l_public.y, p_publicKey + uECC_BYTES);
-    vli_bytesToNative(r, p_signature);
-    vli_bytesToNative(s, p_signature + uECC_BYTES);
-
-    if(vli_isZero(r) || vli_isZero(s))
-    { /* r, s must not be 0. */
-        return 0;
-    }
-
-#if (uECC_CURVE != uECC_secp160r1)
-    if(vli_cmp(curve_n, r) != 1 || vli_cmp(curve_n, s) != 1)
-    { /* r, s must be < n. */
-        return 0;
-    }
-#endif
-
-    /* Calculate u1 and u2. */
-    vli_modInv_n(z, s, curve_n); /* Z = s^-1 */
-    u1[uECC_N_WORDS-1] = 0;
-    vli_bytesToNative(u1, p_hash);
-    vli_modMult_n(u1, u1, z); /* u1 = e/s */
-    vli_modMult_n(u2, r, z); /* u2 = r/s */
-
-    /* Calculate l_sum = G + Q. */
-    vli_set(l_sum.x, l_public.x);
-    vli_set(l_sum.y, l_public.y);
-    vli_set(tx, curve_G.x);
-    vli_set(ty, curve_G.y);
-    vli_modSub_fast(z, l_sum.x, tx); /* Z = x2 - x1 */
-    XYcZ_add(tx, ty, l_sum.x, l_sum.y);
-    vli_modInv(z, z, curve_p); /* Z = 1/Z */
-    apply_z(l_sum.x, l_sum.y, z);
-
-    /* Use Shamir's trick to calculate u1*G + u2*Q */
-    EccPoint *l_points[4] = {0, &curve_G, &l_public, &l_sum};
-    bitcount_t l_numBits = smax(vli_numBits(u1, uECC_N_WORDS), vli_numBits(u2, uECC_N_WORDS));
-
-    EccPoint *l_point = l_points[(!!vli_testBit(u1, l_numBits-1)) | ((!!vli_testBit(u2, l_numBits-1)) << 1)];
-    vli_set(rx, l_point->x);
-    vli_set(ry, l_point->y);
-    vli_clear(z);
-    z[0] = 1;
-
-    bitcount_t i;
-    for(i = l_numBits - 2; i >= 0; --i)
-    {
-        EccPoint_double_jacobian(rx, ry, z);
-
-        uECC_word_t l_index = (!!vli_testBit(u1, i)) | ((!!vli_testBit(u2, i)) << 1);
-        l_point = l_points[l_index];
-        if(l_point)
-        {
-            vli_set(tx, l_point->x);
-            vli_set(ty, l_point->y);
-            apply_z(tx, ty, z);
-            vli_modSub_fast(tz, rx, tx); /* Z = x2 - x1 */
-            XYcZ_add(tx, ty, rx, ry);
-            vli_modMult_fast(z, z, tz);
-        }
-    }
-
-    vli_modInv(z, z, curve_p); /* Z = 1/Z */
-    apply_z(rx, ry, z);
-
-    /* v = x1 (mod n) */
-#if (uECC_CURVE != uECC_secp160r1)
-    if(vli_cmp(curve_n, rx) != 1)
-    {
-        vli_sub(rx, rx, curve_n);
-    }
-#endif
-
-    /* Accept only if v == r. */
-    return (vli_cmp(rx, r) == 0);
-}
diff --git a/extlibs/tinydtls/ecc/ecc.h b/extlibs/tinydtls/ecc/ecc.h
deleted file mode 100644 (file)
index dd09ce6..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-/* Copyright 2014, Kenneth MacKay. Licensed under the BSD 2-clause license. */
-
-#ifndef _MICRO_ECC_H_
-#define _MICRO_ECC_H_
-
-#include <stdint.h>
-
-/* Platform selection options.
-If uECC_PLATFORM is not defined, the code will try to guess it based on compiler macros.
-Possible values for uECC_PLATFORM are defined below: */
-#define uECC_arch_other 0
-#define uECC_x86        1
-#define uECC_x86_64     2
-#define uECC_arm        3
-#define uECC_arm_thumb  4
-#define uECC_avr        5
-
-/* If desired, you can define uECC_WORD_SIZE as appropriate for your platform (1, 4, or 8 bytes).
-If uECC_WORD_SIZE is not explicitly defined then it will be automatically set based on your platform. */
-
-/* Inline assembly options.
-uECC_asm_none  - Use standard C99 only.
-uECC_asm_small - Use GCC inline assembly for the target platform (if available), optimized for minimum size.
-uECC_asm_fast  - Use GCC inline assembly optimized for maximum speed. */
-#define uECC_asm_none  0
-#define uECC_asm_small 1
-#define uECC_asm_fast  2
-#ifndef uECC_ASM
-    #define uECC_ASM uECC_asm_none//uECC_asm_fast
-#endif
-
-/* Curve selection options. */
-#define uECC_secp160r1 1
-#define uECC_secp192r1 2
-#define uECC_secp256r1 3
-#define uECC_secp256k1 4
-#ifndef uECC_CURVE
-    #define uECC_CURVE uECC_secp256r1
-#endif
-
-/* uECC_SQUARE_FUNC - If enabled (defined as nonzero), this will cause a specific function to be used for (scalar) squaring
-    instead of the generic multiplication function. This will make things faster by about 8% but increases the code size. */
-#define uECC_SQUARE_FUNC 1
-
-#define uECC_CONCAT1(a, b) a##b
-#define uECC_CONCAT(a, b) uECC_CONCAT1(a, b)
-
-#define uECC_size_1 20 /* secp160r1 */
-#define uECC_size_2 24 /* secp192r1 */
-#define uECC_size_3 32 /* secp256r1 */
-#define uECC_size_4 32 /* secp256k1 */
-
-#define uECC_BYTES uECC_CONCAT(uECC_size_, uECC_CURVE)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* uECC_RNG_Function type
-The RNG function should fill p_size random bytes into p_dest. It should return 1 if
-p_dest was filled with random data, or 0 if the random data could not be generated.
-The filled-in values should be either truly random, or from a cryptographically-secure PRNG.
-
-A correctly functioning RNG function must be set (using uECC_set_rng()) before calling
-uECC_make_key() or uECC_sign().
-
-A correct RNG function is set by default when building for Windows, Linux, or OS X.
-If you are building on another POSIX-compliant system that supports /dev/random or /dev/urandom,
-you can define uECC_POSIX to use the predefined RNG. For embedded platforms there is no predefined
-RNG function; you must provide your own.
-*/
-typedef int (*uECC_RNG_Function)(uint8_t *p_dest, unsigned p_size);
-
-/* uECC_set_rng() function.
-Set the function that will be used to generate random bytes. The RNG function should
-return 1 if the random data was generated, or 0 if the random data could not be generated.
-
-On platforms where there is no predefined RNG function (eg embedded platforms), this must
-be called before uECC_make_key() or uECC_sign() are used.
-
-Inputs:
-    p_rng  - The function that will be used to generate random bytes.
-*/
-void uECC_set_rng(uECC_RNG_Function p_rng);
-
-//////////////////////////////////////////
-// DTLS_CRYPTO_HAL
-/**
-* Call this function to create a unique public-private key pair in secure hardware
-*
-* @param[out] p_publicKey  The public key that is associated with the private key that was just created.
-* @param[out] p_privateKeyHandle  A handle that is used to point to the private key stored in hardware.
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_make_key_Function)(uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_privateKeyHandle[uECC_BYTES]);
-
-/**
-* Set the callback function that will be used to generate a public-private key pair.
-* This function will replace uECC_make_key.
-*
-* @param[in] p_make_key_cb  The function that will be used to generate a public-private key pair.
-*/
-void uECC_set_make_key_cb(uECC_make_key_Function p_make_key_cb);
-
-/**
-* Call this function to sign a hash using a hardware protected private key.
-*
-* @param[in] p_privateKeyHandle  A handle that is used to point to the private key stored in hardware.
-* @param[in] p_hash  The hash to sign.
-* @param[out] p_signature  The signature that is produced in hardware by the private key..
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_sign_Function)(uint8_t p_privateKeyHandle[uECC_BYTES], const uint8_t p_hash[uECC_BYTES], uint8_t p_signature[uECC_BYTES*2]);
-
-/**
-* Set the callback function that will be used to sign.
-* This function will replace uECC_sign.
-*
-* @param[in] p_sign_cb  The function that will be used to sign.
-*/
-void uECC_set_sign_cb(uECC_sign_Function p_sign_cb);
-
-/**
-* Call this function to verify a signature using the public key and hash that was signed. 
-*
-* @param[in] p_publicKey  The public key that is associated with the private key that produced the signature.
-* @param[in] p_hash  The hash that was signed.
-* @param[in] p_signature  The signature that was produced the private key that is associated with p_public_key
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_verify_Function)(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_hash[uECC_BYTES], const uint8_t p_signature[uECC_BYTES*2]);
-
-/**
-* Set the callback function that will be used to verify.
-* This function will replace uECC_verify.
-*
-* @param[in] p_verify_cb  The function that will be used to verify.
-*/
-void uECC_set_verify_cb(uECC_verify_Function p_verify_cb);
-
-/**
-* Call this function to produce an ECDH shared key using the public key of the other node.
-* A hardware protected private key will be used for the point multiply
-*
-* @param[in] p_publicKey  The public key from the other node used for communication.
-* @param[in] p_privateKeyHandle  A handle that is used to point to the private key stored in hardware.
-* @param[out] p_secret  The pre-master key that is produced by the point multiply with p_public_key and our private key
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_shared_secret_Function)(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_privateKeyHandle[uECC_BYTES], uint8_t p_secret[uECC_BYTES]);
-
-/**
-* Set the callback function that will be used to produce a shared secret.
-* This function will replace uECC_shared_secret.
-*
-* @param[in] p_make_key_cb  The function that will be used to generate the shared secret.
-*/
-void uECC_set_shared_secret_cb(uECC_shared_secret_Function p_shared_secret_cb);
-
-/**
-* Call this function to produce a shared key using the public key of the other node.
-* An ephemeral private key will be created in secure hardware that will be used for the point multiply
-*
-* @param[in] p_public_key  The public key from the other node used for communication.
-* @param[out] p_public_key_out  The ephemeral public key that will be used in the point multiply.
-* @param[out] p_secret  The pre-master key that is produced by the point multiply with p_public_key and our private key
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_ecdhe_Function)(const uint8_t p_public_key_in[uECC_BYTES*2],
-                                   uint8_t p_public_key_out[uECC_BYTES*2],
-                                   uint8_t p_secret[uECC_BYTES]);
-
-/**
-* Set the callback function that will be used to produce a ECDHE shared secret.
-*
-* @param[in] p_ecdhe_cb  The function that will be used to generate the ECDHE shared secret.
-*/
-void uECC_set_ecdhe_cb(uECC_ecdhe_Function p_ecdhe_cb);
-
-/**
-* Call this function to return the public key for an existing private key.
-*
-* @param[out] p_key_handle  A handle that is used to point to the private key stored in hardware.
-*    The public key that is associated with this private key will be returned
-* @param[out] p_public_key  The public key that is associated with the private key that was just created.
-* @return 1 upon success, 0 if an error occurred.
-*/
-typedef int (*uECC_get_pubkey_Function)(const uint8_t p_key_handle[uECC_BYTES],
-                                        uint8_t p_public_key[uECC_BYTES*2]);
-
-/**
-* Set the callback function that will be used to return the public key for an existing private key.
-*
-* @param[in] p_get_pubkey_cb  The function that will be used to return the public key for an existing private key.
-*/
-void uECC_set_get_pubkey_cb(uECC_get_pubkey_Function p_get_pubkey_cb);
-
-
-/**
-* Call this function to produce a shared key using the public key of the other node.
-* An ephemeral private key will be created that will be used for the point multiply
-*
-* @param[in] p_public_key  The public key from the other node used for communication.
-* @param[out] p_public_key_out  The ephemeral public key that will be used in the point multiply.
-* @param[out] p_secret  The pre-master key that is produced by the point multiply with p_public_key and our private key
-* @return 1 upon success, 0 if an error occurred.
-*/
-int uECC_ecdhe(const uint8_t p_public_key_in[uECC_BYTES*2],
-               uint8_t p_public_key_out[uECC_BYTES*2],
-               uint8_t p_secret[uECC_BYTES]);
-
-/**
-* Call this function to return the public key for an existing private key.
-*
-* @param[out] p_key_handle  A handle that is used to point to the private key stored in hardware.
-*    The public key that is associated with this private key will be returned
-* @param[out] p_public_key  The public key that is associated with the private key that was just created.
-* @return 1 upon success, 0 if an error occurred.
-*/
-int uECC_get_pubkey(const uint8_t p_key_handle[uECC_BYTES],
-                    uint8_t p_public_key[uECC_BYTES*2]);
-
-//////////////////////////////////////////
-
-
-/* uECC_make_key() function.
-Create a public/private key pair.
-
-Outputs:
-    p_publicKey  - Will be filled in with the public key.
-    p_privateKey - Will be filled in with the private key.
-
-Returns 1 if the key pair was generated successfully, 0 if an error occurred.
-*/
-int uECC_make_key(uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_privateKey[uECC_BYTES]);
-
-/* uECC_shared_secret() function.
-Compute a shared secret given your secret key and someone else's public key.
-Note: It is recommended that you hash the result of uECC_shared_secret() before using it for symmetric encryption or HMAC.
-
-Inputs:
-    p_publicKey  - The public key of the remote party.
-    p_privateKey - Your private key.
-
-Outputs:
-    p_secret - Will be filled in with the shared secret value.
-
-Returns 1 if the shared secret was generated successfully, 0 if an error occurred.
-*/
-int uECC_shared_secret(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_privateKey[uECC_BYTES], uint8_t p_secret[uECC_BYTES]);
-
-/* uECC_compress() function.
-Compress a public key.
-
-Inputs:
-    p_publicKey - The public key to compress.
-
-Outputs:
-    p_compressed - Will be filled in with the compressed public key.
-*/
-void uECC_compress(const uint8_t p_publicKey[uECC_BYTES*2], uint8_t p_compressed[uECC_BYTES+1]);
-
-/* uECC_decompress() function.
-Decompress a compressed public key.
-
-Inputs:
-    p_compressed - The compressed public key.
-
-Outputs:
-    p_publicKey - Will be filled in with the decompressed public key.
-*/
-void uECC_decompress(const uint8_t p_compressed[uECC_BYTES+1], uint8_t p_publicKey[uECC_BYTES*2]);
-
-/* uECC_sign() function.
-Generate an ECDSA signature for a given hash value.
-
-Usage: Compute a hash of the data you wish to sign (SHA-2 is recommended) and pass it in to
-this function along with your private key.
-
-Inputs:
-    p_privateKey - Your private key.
-    p_hash       - The message hash to sign.
-
-Outputs:
-    p_signature  - Will be filled in with the signature value.
-
-Returns 1 if the signature generated successfully, 0 if an error occurred.
-*/
-int uECC_sign(const uint8_t p_privateKey[uECC_BYTES], const uint8_t p_hash[uECC_BYTES], uint8_t p_signature[uECC_BYTES*2]);
-
-/* uECC_verify() function.
-Verify an ECDSA signature.
-
-Usage: Compute the hash of the signed data using the same hash as the signer and
-pass it to this function along with the signer's public key and the signature values (r and s).
-
-Inputs:
-    p_publicKey - The signer's public key
-    p_hash      - The hash of the signed data.
-    p_signature - The signature value.
-
-Returns 1 if the signature is valid, 0 if it is invalid.
-*/
-int uECC_verify(const uint8_t p_publicKey[uECC_BYTES*2], const uint8_t p_hash[uECC_BYTES], const uint8_t p_signature[uECC_BYTES*2]);
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif
-
-#endif /* _MICRO_ECC_H_ */
diff --git a/extlibs/tinydtls/ecc/test/ecc_test/ecc_test.ino b/extlibs/tinydtls/ecc/test/ecc_test/ecc_test.ino
deleted file mode 100755 (executable)
index 04c5e4a..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <uECC.h>
-
-#include <j0g.h>
-#include <js0n.h>
-
-#include <lwm.h>
-
-#include <bitlash.h>
-
-#include <GS.h>
-
-#include <SPI.h>
-#include <Wire.h>
-#include <Scout.h>
-#include <Shell.h>
-
-
-#include <uECC.h>
-
-extern "C" {
-
-static int RNG(uint8_t *p_dest, unsigned p_size)
-{
-  // Use the least-significant bits from the ADC for an unconnected pin (or connected to a source of random noise)
-  // This can take a long time to generate random data if the result of analogRead(0) doesn't change very frequently.
-  while(p_size) {
-    uint8_t l_val = 0;
-    for(unsigned i=0; i<8; ++i)
-    {
-      int l_init = analogRead(0);
-      int l_count = 0;
-      while(analogRead(0) == l_init)
-      {
-        ++l_count;
-      }
-      
-      if(l_count == 0)
-      {
-         l_val = (l_val << 1) | (l_init & 0x01);
-      }
-      else
-      {
-         l_val = (l_val << 1) | (l_count & 0x01);
-      }
-    }
-    *p_dest = l_val;
-    ++p_dest;
-    --p_size;
-  }
-  
-  // NOTE: it would be a good idea to hash the resulting random data using SHA-256 or similar.
-  return 1;
-}
-
-}
-
-void setup()
-{
-  Scout.setup();
-  
-  Serial.print("Testing ecc\n");
-  
-  uECC_set_rng(&RNG);
-}
-
-void loop() {
-  uint8_t l_private1[uECC_BYTES];
-  uint8_t l_private2[uECC_BYTES];
-  
-  uint8_t l_public1[uECC_BYTES * 2];
-  uint8_t l_public2[uECC_BYTES * 2];
-  
-  uint8_t l_secret1[uECC_BYTES];
-  uint8_t l_secret2[uECC_BYTES];
-  
-  unsigned long a = millis();
-  uECC_make_key(l_public1, l_private1);
-  unsigned long b = millis();
-  
-  Serial.print("Made key 1 in "); Serial.println(b-a);
-  a = millis();
-  uECC_make_key(l_public2, l_private2);
-  b = millis();
-  Serial.print("Made key 2 in "); Serial.println(b-a);
-
-  a = millis();
-  int r = uECC_shared_secret(l_public2, l_private1, l_secret1);
-  b = millis();
-  Serial.print("Shared secret 1 in "); Serial.println(b-a);
-  if(!r)
-  {
-    Serial.print("shared_secret() failed (1)\n");
-    return;
-  }
-
-  a = millis();
-  r = uECC_shared_secret(l_public1, l_private2, l_secret2);
-  b = millis();
-  Serial.print("Shared secret 2 in "); Serial.println(b-a);
-  if(!r)
-  {
-    Serial.print("shared_secret() failed (2)\n");
-    return;
-  }
-    
-  if(memcmp(l_secret1, l_secret2, sizeof(l_secret1)) != 0)
-  {
-    Serial.print("Shared secrets are not identical!\n");
-  }
-  else
-  {
-    Serial.print("Shared secrets are identical\n");
-  }
-}
-
diff --git a/extlibs/tinydtls/ecc/test/emk_rules.py b/extlibs/tinydtls/ecc/test/emk_rules.py
deleted file mode 100755 (executable)
index 956ccf5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-c, link = emk.module("c", "link")
-link.depdirs += [
-    "$:proj:$"
-]
diff --git a/extlibs/tinydtls/ecc/test/test_ecdh.c b/extlibs/tinydtls/ecc/test/test_ecdh.c
deleted file mode 100644 (file)
index cef274d..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright 2014, Kenneth MacKay. Licensed under the BSD 2-clause license. */
-
-#include "../ecc.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#if LPC11XX
-
-#include "/Projects/lpc11xx/peripherals/uart.h"
-#include "/Projects/lpc11xx/peripherals/time.h"
-
-static uint64_t g_rand = 88172645463325252ull;
-int fake_rng(uint8_t *p_dest, unsigned p_size)
-{
-    while(p_size)
-    {
-        g_rand ^= (g_rand << 13);
-        g_rand ^= (g_rand >> 7);
-        g_rand ^= (g_rand << 17);
-
-        unsigned l_amount = (p_size > 8 ? 8 : p_size);
-        memcpy(p_dest, &g_rand, l_amount);
-        p_size -= l_amount;
-    }
-    return 1;
-}
-
-#endif
-
-void vli_print(uint8_t *p_vli, unsigned int p_size)
-{
-    while(p_size)
-    {
-        printf("%02X ", (unsigned)p_vli[p_size - 1]);
-        --p_size;
-    }
-}
-
-int main()
-{
-#if LPC11XX
-    uartInit(BAUD_115200);
-       initTime();
-
-    uECC_set_rng(&fake_rng);
-#endif
-
-    int i;
-
-    uint8_t l_private1[uECC_BYTES];
-    uint8_t l_private2[uECC_BYTES];
-
-    uint8_t l_public1[uECC_BYTES * 2];
-    uint8_t l_public2[uECC_BYTES * 2];
-
-    uint8_t l_secret1[uECC_BYTES];
-    uint8_t l_secret2[uECC_BYTES];
-
-    printf("Testing 256 random private key pairs\n");
-
-    for(i=0; i<256; ++i)
-    {
-        printf(".");
-    #if !LPC11XX
-        fflush(stdout);
-    #endif
-
-        if(!uECC_make_key(l_public1, l_private1) || !uECC_make_key(l_public2, l_private2))
-        {
-            printf("uECC_make_key() failed\n");
-            return 1;
-        }
-
-        if(!uECC_shared_secret(l_public2, l_private1, l_secret1))
-        {
-            printf("shared_secret() failed (1)\n");
-            return 1;
-        }
-
-        if(!uECC_shared_secret(l_public1, l_private2, l_secret2))
-        {
-            printf("shared_secret() failed (2)\n");
-            return 1;
-        }
-
-        if(memcmp(l_secret1, l_secret2, sizeof(l_secret1)) != 0)
-        {
-            printf("Shared secrets are not identical!\n");
-            printf("Shared secret 1 = ");
-            vli_print(l_secret1, uECC_BYTES);
-            printf("\n");
-            printf("Shared secret 2 = ");
-            vli_print(l_secret2, uECC_BYTES);
-            printf("\n");
-            printf("Private key 1 = ");
-            vli_print(l_private1, uECC_BYTES);
-            printf("\n");
-            printf("Private key 2 = ");
-            vli_print(l_private2, uECC_BYTES);
-            printf("\n");
-        }
-    }
-    printf("\n");
-
-    return 0;
-}
diff --git a/extlibs/tinydtls/ecc/test/test_ecdsa.c b/extlibs/tinydtls/ecc/test/test_ecdsa.c
deleted file mode 100644 (file)
index f3983bb..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright 2014, Kenneth MacKay. Licensed under the BSD 2-clause license. */
-
-#include "../ecc.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#if LPC11XX
-
-#include "/Projects/lpc11xx/peripherals/uart.h"
-#include "/Projects/lpc11xx/peripherals/time.h"
-
-static uint64_t g_rand = 88172645463325252ull;
-int fake_rng(uint8_t *p_dest, unsigned p_size)
-{
-    while(p_size)
-    {
-        g_rand ^= (g_rand << 13);
-        g_rand ^= (g_rand >> 7);
-        g_rand ^= (g_rand << 17);
-
-        unsigned l_amount = (p_size > 8 ? 8 : p_size);
-        memcpy(p_dest, &g_rand, l_amount);
-        p_size -= l_amount;
-    }
-    return 1;
-}
-
-#endif
-
-int main()
-{
-#if LPC11XX
-    uartInit(BAUD_115200);
-       initTime();
-
-    uECC_set_rng(&fake_rng);
-#endif
-
-    uint8_t l_public[uECC_BYTES*2];
-    uint8_t l_private[uECC_BYTES];
-
-    uint8_t l_hash[uECC_BYTES];
-
-    uint8_t l_sig[uECC_BYTES*2];
-
-    int i;
-
-    printf("Testing 256 signatures\n");
-
-    for(i=0; i<256; ++i)
-    {
-        printf(".");
-    #if !LPC11XX
-        fflush(stdout);
-    #endif
-
-        if(!uECC_make_key(l_public, l_private))
-        {
-            printf("uECC_make_key() failed\n");
-            continue;
-        }
-        memcpy(l_hash, l_public, uECC_BYTES);
-
-        if(!uECC_sign(l_private, l_hash, l_sig))
-        {
-            printf("uECC_sign() failed\n");
-            continue;
-        }
-
-        if(!uECC_verify(l_public, l_hash, l_sig))
-        {
-            printf("uECC_verify() failed\n");
-        }
-    }
-    printf("\n");
-
-    return 0;
-}
diff --git a/extlibs/tinydtls/examples/contiki/Makefile.in b/extlibs/tinydtls/examples/contiki/Makefile.in
deleted file mode 100644 (file)
index 770f220..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-########################################################################
-# platform-specific options
-
-ifeq ($(TARGET), econotag)
-CFLAGS += -DUIP_CONF_TCP=0
-endif
-
-ifeq ($(TARGET), minimal-net)
-UIP_CONF_IPV6_RPL=0
-CFLAGS += -DUIP_CONF_IPV6_RPL=0 -DRPL_BORDER_ROUTER=0
-endif
-
-# usually, you should not need changing anything beyond this line
-########################################################################
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-top_srcdir:= @top_srcdir@
-DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-DTLS_SOURCES:=dtls-server.c dtls-client.c
-FILES:=Makefile.in $(DTLS_SOURCES)
-
-all: dtls-server dtls-client
-       $(MAKE) $(MAKEFLAGS) ROLE=server dtls-server
-       $(MAKE) $(MAKEFLAGS) clean
-       $(MAKE) $(MAKEFLAGS) ROLE=client dtls-client
-
-CONTIKI=$(top_srcdir)/../..
-
-WITH_UIP6=1
-UIP_CONF_IPV6=1
-
-ifneq ($(ROLE),client)
-       CFLAGS+= -DHARD_CODED_ADDRESS=\"aaaa::02:232\"
-else
-       CFLAGS+= -DUDP_CONNECTION_ADDR="fe80::ff:fe02:232" \
-                -DHARD_CODED_ADDRESS=\"aaaa::02:230\"
-endif
-
-CFLAGS += -ffunction-sections
-LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__
-
-CFLAGS += -DSHA2_USE_INTTYPES_H
-
-APPS += tinydtls/aes tinydtls/sha2 tinydtls/ecc tinydtls
-
-ccm-test: tests/ccm-test
-
-dist:  $(FILES)
-       test -d $(DISTDIR)/examples/contiki || $(MKDIR) -p $(DISTDIR)/examples/contiki
-       cp $(FILES) $(DISTDIR)/examples/contiki
-
-include $(CONTIKI)/Makefile.include
diff --git a/extlibs/tinydtls/examples/contiki/dtls-client.c b/extlibs/tinydtls/examples/contiki/dtls-client.c
deleted file mode 100644 (file)
index b1af669..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Institute nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This file is part of the Contiki operating system.
- *
- */
-
-#include "contiki.h"
-#include "contiki-lib.h"
-#include "contiki-net.h"
-
-#include "dev/serial-line.h"
-
-#include <string.h>
-
-#include "tinydtls.h"
-
-#ifndef DEBUG
-#define DEBUG DEBUG_PRINT
-#endif
-#include "net/ip/uip-debug.h"
-
-#include "debug.h"
-#include "dtls.h"
-
-#ifdef DTLS_PSK
-/* The PSK information for DTLS */
-/* make sure that default identity and key fit into buffer, i.e.
- * sizeof(PSK_DEFAULT_IDENTITY) - 1 <= PSK_ID_MAXLEN and
- * sizeof(PSK_DEFAULT_KEY) - 1 <= PSK_MAXLEN
-*/
-
-#define PSK_ID_MAXLEN 32
-#define PSK_MAXLEN 32
-#define PSK_DEFAULT_IDENTITY "Client_identity"
-#define PSK_DEFAULT_KEY      "secretPSK"
-#endif /* DTLS_PSK */
-
-#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define UIP_UDP_BUF  ((struct uip_udp_hdr *)&uip_buf[UIP_LLIPH_LEN])
-
-#define MAX_PAYLOAD_LEN 120
-
-static struct uip_udp_conn *client_conn;
-static dtls_context_t *dtls_context;
-static char buf[200];
-static size_t buflen = 0;
-
-static const unsigned char ecdsa_priv_key[] = {
-                       0x41, 0xC1, 0xCB, 0x6B, 0x51, 0x24, 0x7A, 0x14,
-                       0x43, 0x21, 0x43, 0x5B, 0x7A, 0x80, 0xE7, 0x14,
-                       0x89, 0x6A, 0x33, 0xBB, 0xAD, 0x72, 0x94, 0xCA,
-                       0x40, 0x14, 0x55, 0xA1, 0x94, 0xA9, 0x49, 0xFA};
-
-static const unsigned char ecdsa_pub_key_x[] = {
-                       0x36, 0xDF, 0xE2, 0xC6, 0xF9, 0xF2, 0xED, 0x29,
-                       0xDA, 0x0A, 0x9A, 0x8F, 0x62, 0x68, 0x4E, 0x91,
-                       0x63, 0x75, 0xBA, 0x10, 0x30, 0x0C, 0x28, 0xC5,
-                       0xE4, 0x7C, 0xFB, 0xF2, 0x5F, 0xA5, 0x8F, 0x52};
-
-static const unsigned char ecdsa_pub_key_y[] = {
-                       0x71, 0xA0, 0xD4, 0xFC, 0xDE, 0x1A, 0xB8, 0x78,
-                       0x5A, 0x3C, 0x78, 0x69, 0x35, 0xA7, 0xCF, 0xAB,
-                       0xE9, 0x3F, 0x98, 0x72, 0x09, 0xDA, 0xED, 0x0B,
-                       0x4F, 0xAB, 0xC3, 0x6F, 0xC7, 0x72, 0xF8, 0x29};
-
-static void
-try_send(struct dtls_context_t *ctx, session_t *dst) {
-  int res;
-  res = dtls_write(ctx, dst, (uint8 *)buf, buflen);
-  if (res >= 0) {
-    memmove(buf, buf + res, buflen - res);
-    buflen -= res;
-  }
-}
-
-static int
-read_from_peer(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *data, size_t len) {
-  size_t i;
-  for (i = 0; i < len; i++)
-    PRINTF("%c", data[i]);
-  return 0;
-}
-
-static int
-send_to_peer(struct dtls_context_t *ctx, 
-            session_t *session, uint8 *data, size_t len) {
-
-  struct uip_udp_conn *conn = (struct uip_udp_conn *)dtls_get_app_data(ctx);
-
-  uip_ipaddr_copy(&conn->ripaddr, &session->addr);
-  conn->rport = session->port;
-
-  PRINTF("send to ");
-  PRINT6ADDR(&conn->ripaddr);
-  PRINTF(":%u\n", uip_ntohs(conn->rport));
-
-  uip_udp_packet_send(conn, data, len);
-
-  /* Restore server connection to allow data from any node */
-  /* FIXME: do we want this at all? */
-  memset(&conn->ripaddr, 0, sizeof(conn->ripaddr));
-  memset(&conn->rport, 0, sizeof(conn->rport));
-
-  return len;
-}
-
-#ifdef DTLS_PSK
-static unsigned char psk_id[PSK_ID_MAXLEN] = PSK_DEFAULT_IDENTITY;
-static size_t psk_id_length = sizeof(PSK_DEFAULT_IDENTITY) - 1;
-static unsigned char psk_key[PSK_MAXLEN] = PSK_DEFAULT_KEY;
-static size_t psk_key_length = sizeof(PSK_DEFAULT_KEY) - 1;
-
-#ifdef __GNUC__
-#define UNUSED_PARAM __attribute__((unused))
-#else
-#define UNUSED_PARAM
-#endif /* __GNUC__ */
-
-/* This function is the "key store" for tinyDTLS. It is called to
- * retrieve a key for the given identity within this particular
- * session. */
-static int
-get_psk_info(struct dtls_context_t *ctx UNUSED_PARAM,
-           const session_t *session UNUSED_PARAM,
-           dtls_credentials_type_t type,
-           const unsigned char *id, size_t id_len,
-           unsigned char *result, size_t result_length) {
-
-  switch (type) {
-  case DTLS_PSK_IDENTITY:
-    if (result_length < psk_id_length) {
-      dtls_warn("cannot set psk_identity -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_id, psk_id_length);
-    return psk_id_length;
-  case DTLS_PSK_KEY:
-    if (id_len != psk_id_length || memcmp(psk_id, id, id_len) != 0) {
-      dtls_warn("PSK for unknown id requested, exiting\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_ILLEGAL_PARAMETER);
-    } else if (result_length < psk_key_length) {
-      dtls_warn("cannot set psk -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_key, psk_key_length);
-    return psk_key_length;
-  default:
-    dtls_warn("unsupported request type: %d\n", type);
-  }
-
-  return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-}
-#endif /* DTLS_PSK */
-
-#ifdef DTLS_ECC
-static int
-get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecdsa_key_t **result) {
-  static const dtls_ecdsa_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = ecdsa_priv_key,
-    .pub_key_x = ecdsa_pub_key_x,
-    .pub_key_y = ecdsa_pub_key_y
-  };
-
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-verify_ecdsa_key(struct dtls_context_t *ctx,
-                const session_t *session,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-  return 0;
-}
-#endif /* DTLS_ECC */
-
-PROCESS(udp_server_process, "UDP server process");
-AUTOSTART_PROCESSES(&udp_server_process);
-/*---------------------------------------------------------------------------*/
-static void
-dtls_handle_read(dtls_context_t *ctx) {
-  static session_t session;
-
-  if(uip_newdata()) {
-    uip_ipaddr_copy(&session.addr, &UIP_IP_BUF->srcipaddr);
-    session.port = UIP_UDP_BUF->srcport;
-    session.size = sizeof(session.addr) + sizeof(session.port);
-
-    ((char *)uip_appdata)[uip_datalen()] = 0;
-    PRINTF("Client received message from ");
-    PRINT6ADDR(&session.addr);
-    PRINTF(":%d\n", uip_ntohs(session.port));
-
-    dtls_handle_message(ctx, &session, uip_appdata, uip_datalen());
-  }
-}
-/*---------------------------------------------------------------------------*/
-static void
-print_local_addresses(void)
-{
-  int i;
-  uint8_t state;
-
-  PRINTF("Client IPv6 addresses: ");
-  for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
-    state = uip_ds6_if.addr_list[i].state;
-    if(uip_ds6_if.addr_list[i].isused &&
-       (state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
-      PRINT6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
-      PRINTF("\n");
-    }
-  }
-}
-
-static void
-set_connection_address(uip_ipaddr_t *ipaddr)
-{
-#define _QUOTEME(x) #x
-#define QUOTEME(x) _QUOTEME(x)
-#ifdef UDP_CONNECTION_ADDR
-  if(uiplib_ipaddrconv(QUOTEME(UDP_CONNECTION_ADDR), ipaddr) == 0) {
-    PRINTF("UDP client failed to parse address '%s'\n", QUOTEME(UDP_CONNECTION_ADDR));
-  }
-#elif UIP_CONF_ROUTER
-  uip_ip6addr(ipaddr,0xaaaa,0,0,0,0x0200,0x0000,0x0000,0x0001);
-#else
-  uip_ip6addr(ipaddr,0xfe80,0,0,0,0x6466,0x6666,0x6666,0x6666);
-#endif /* UDP_CONNECTION_ADDR */
-}
-
-void
-init_dtls(session_t *dst) {
-  static dtls_handler_t cb = {
-    .write = send_to_peer,
-    .read  = read_from_peer,
-    .event = NULL,
-#ifdef DTLS_PSK
-    .get_psk_info = get_psk_info,
-#endif /* DTLS_PSK */
-#ifdef DTLS_ECC
-    .get_ecdsa_key = get_ecdsa_key,
-    .verify_ecdsa_key = verify_ecdsa_key
-#endif /* DTLS_ECC */
-  };
-  PRINTF("DTLS client started\n");
-
-  print_local_addresses();
-
-  dst->size = sizeof(dst->addr) + sizeof(dst->port);
-  dst->port = UIP_HTONS(20220);
-
-  set_connection_address(&dst->addr);
-  client_conn = udp_new(&dst->addr, 0, NULL);
-  udp_bind(client_conn, dst->port);
-
-  PRINTF("set connection address to ");
-  PRINT6ADDR(&dst->addr);
-  PRINTF(":%d\n", uip_ntohs(dst->port));
-
-  dtls_set_log_level(DTLS_LOG_DEBUG);
-
-  dtls_context = dtls_new_context(client_conn);
-  if (dtls_context)
-    dtls_set_handler(dtls_context, &cb);
-}
-
-/*---------------------------------------------------------------------------*/
-PROCESS_THREAD(udp_server_process, ev, data)
-{
-  static int connected = 0;
-  static session_t dst;
-
-  PROCESS_BEGIN();
-
-  dtls_init();
-
-  init_dtls(&dst);
-  serial_line_init();
-
-  if (!dtls_context) {
-    dtls_emerg("cannot create context\n");
-    PROCESS_EXIT();
-  }
-
-  while(1) {
-    PROCESS_YIELD();
-    if(ev == tcpip_event) {
-      dtls_handle_read(dtls_context);
-    } else if (ev == serial_line_event_message) {
-      register size_t len = min(strlen(data), sizeof(buf) - buflen);
-      memcpy(buf + buflen, data, len);
-      buflen += len;
-      if (buflen < sizeof(buf) - 1)
-       buf[buflen++] = '\n';   /* serial event does not contain LF */
-    }
-
-    if (buflen) {
-      if (!connected)
-       connected = dtls_connect(dtls_context, &dst) >= 0;
-      
-      try_send(dtls_context, &dst);
-    }
-  }
-  
-  PROCESS_END();
-}
-/*---------------------------------------------------------------------------*/
diff --git a/extlibs/tinydtls/examples/contiki/dtls-server.c b/extlibs/tinydtls/examples/contiki/dtls-server.c
deleted file mode 100644 (file)
index d9269a8..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Institute nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This file is part of the Contiki operating system.
- *
- */
-
-#include "contiki.h"
-#include "contiki-lib.h"
-#include "contiki-net.h"
-
-#if UIP_CONF_IPV6_RPL
-#include "net/rpl/rpl.h"
-#endif /* UIP_CONF_IPV6_RPL */
-
-#include <string.h>
-
-#include "tinydtls.h"
-
-#ifndef DEBUG
-#define DEBUG DEBUG_PRINT
-#endif
-#include "net/ip/uip-debug.h"
-
-#include "debug.h"
-#include "dtls.h"
-
-#ifdef ENABLE_POWERTRACE
-#include "powertrace.h"
-#endif
-
-#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
-#define UIP_UDP_BUF  ((struct uip_udp_hdr *)&uip_buf[UIP_LLIPH_LEN])
-
-#define MAX_PAYLOAD_LEN 120
-
-static struct uip_udp_conn *server_conn;
-
-static dtls_context_t *dtls_context;
-
-static const unsigned char ecdsa_priv_key[] = {
-                       0xD9, 0xE2, 0x70, 0x7A, 0x72, 0xDA, 0x6A, 0x05,
-                       0x04, 0x99, 0x5C, 0x86, 0xED, 0xDB, 0xE3, 0xEF,
-                       0xC7, 0xF1, 0xCD, 0x74, 0x83, 0x8F, 0x75, 0x70,
-                       0xC8, 0x07, 0x2D, 0x0A, 0x76, 0x26, 0x1B, 0xD4};
-
-static const unsigned char ecdsa_pub_key_x[] = {
-                       0xD0, 0x55, 0xEE, 0x14, 0x08, 0x4D, 0x6E, 0x06,
-                       0x15, 0x59, 0x9D, 0xB5, 0x83, 0x91, 0x3E, 0x4A,
-                       0x3E, 0x45, 0x26, 0xA2, 0x70, 0x4D, 0x61, 0xF2,
-                       0x7A, 0x4C, 0xCF, 0xBA, 0x97, 0x58, 0xEF, 0x9A};
-
-static const unsigned char ecdsa_pub_key_y[] = {
-                       0xB4, 0x18, 0xB6, 0x4A, 0xFE, 0x80, 0x30, 0xDA,
-                       0x1D, 0xDC, 0xF4, 0xF4, 0x2E, 0x2F, 0x26, 0x31,
-                       0xD0, 0x43, 0xB1, 0xFB, 0x03, 0xE2, 0x2F, 0x4D,
-                       0x17, 0xDE, 0x43, 0xF9, 0xF9, 0xAD, 0xEE, 0x70};
-
-static int
-read_from_peer(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *data, size_t len) {
-  size_t i;
-  for (i = 0; i < len; i++)
-    PRINTF("%c", data[i]);
-
-  /* echo incoming application data */
-  dtls_write(ctx, session, data, len);
-  return 0;
-}
-
-static int
-send_to_peer(struct dtls_context_t *ctx, 
-            session_t *session, uint8 *data, size_t len) {
-
-  struct uip_udp_conn *conn = (struct uip_udp_conn *)dtls_get_app_data(ctx);
-
-  uip_ipaddr_copy(&conn->ripaddr, &session->addr);
-  conn->rport = session->port;
-
-  PRINTF("send to ");
-  PRINT6ADDR(&conn->ripaddr);
-  PRINTF(":%u\n", uip_ntohs(conn->rport));
-
-  uip_udp_packet_send(conn, data, len);
-
-  /* Restore server connection to allow data from any node */
-  memset(&conn->ripaddr, 0, sizeof(conn->ripaddr));
-  memset(&conn->rport, 0, sizeof(conn->rport));
-
-  return len;
-}
-
-#ifdef DTLS_PSK
-/* This function is the "key store" for tinyDTLS. It is called to
- * retrieve a key for the given identity within this particular
- * session. */
-static int
-get_psk_info(struct dtls_context_t *ctx, const session_t *session,
-            dtls_credentials_type_t type,
-            const unsigned char *id, size_t id_len,
-            unsigned char *result, size_t result_length) {
-
-  struct keymap_t {
-    unsigned char *id;
-    size_t id_length;
-    unsigned char *key;
-    size_t key_length;
-  } psk[3] = {
-    { (unsigned char *)"Client_identity", 15,
-      (unsigned char *)"secretPSK", 9 },
-    { (unsigned char *)"default identity", 16,
-      (unsigned char *)"\x11\x22\x33", 3 },
-    { (unsigned char *)"\0", 2,
-      (unsigned char *)"", 1 }
-  };
-
-  if (type != DTLS_PSK_KEY) {
-    return 0;
-  }
-
-  if (id) {
-    int i;
-    for (i = 0; i < sizeof(psk)/sizeof(struct keymap_t); i++) {
-      if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) {
-       if (result_length < psk[i].key_length) {
-         dtls_warn("buffer too small for PSK");
-         return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-       }
-
-       memcpy(result, psk[i].key, psk[i].key_length);
-       return psk[i].key_length;
-      }
-    }
-  }
-
-  return dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-}
-#endif /* DTLS_PSK */
-
-#ifdef DTLS_ECC
-static int
-get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecdsa_key_t **result) {
-  static const dtls_ecdsa_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = ecdsa_priv_key,
-    .pub_key_x = ecdsa_pub_key_x,
-    .pub_key_y = ecdsa_pub_key_y
-  };
-
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-verify_ecdsa_key(struct dtls_context_t *ctx,
-                const session_t *session,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-  return 0;
-}
-#endif /* DTLS_ECC */
-
-PROCESS(udp_server_process, "UDP server process");
-AUTOSTART_PROCESSES(&udp_server_process);
-/*---------------------------------------------------------------------------*/
-static void
-dtls_handle_read(dtls_context_t *ctx) {
-  session_t session;
-
-  if(uip_newdata()) {
-    uip_ipaddr_copy(&session.addr, &UIP_IP_BUF->srcipaddr);
-    session.port = UIP_UDP_BUF->srcport;
-    session.size = sizeof(session.addr) + sizeof(session.port);
-    
-    dtls_handle_message(ctx, &session, uip_appdata, uip_datalen());
-  }
-}
-/*---------------------------------------------------------------------------*/
-static void
-print_local_addresses(void)
-{
-  int i;
-  uint8_t state;
-
-  PRINTF("Server IPv6 addresses: \n");
-  for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
-    state = uip_ds6_if.addr_list[i].state;
-    if(uip_ds6_if.addr_list[i].isused &&
-       (state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
-      PRINT6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
-      PRINTF("\n");
-    }
-  }
-}
-
-#if 0
-static void
-create_rpl_dag(uip_ipaddr_t *ipaddr)
-{
-  struct uip_ds6_addr *root_if;
-
-  root_if = uip_ds6_addr_lookup(ipaddr);
-  if(root_if != NULL) {
-    rpl_dag_t *dag;
-    uip_ipaddr_t prefix;
-    
-    rpl_set_root(RPL_DEFAULT_INSTANCE, ipaddr);
-    dag = rpl_get_any_dag();
-    uip_ip6addr(&prefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
-    rpl_set_prefix(dag, &prefix, 64);
-    PRINTF("created a new RPL dag\n");
-  } else {
-    PRINTF("failed to create a new RPL DAG\n");
-  }
-}
-#endif
-
-void
-init_dtls() {
-  static dtls_handler_t cb = {
-    .write = send_to_peer,
-    .read  = read_from_peer,
-    .event = NULL,
-#ifdef DTLS_PSK
-    .get_psk_info = get_psk_info,
-#endif /* DTLS_PSK */
-#ifdef DTLS_ECC
-    .get_ecdsa_key = get_ecdsa_key,
-    .verify_ecdsa_key = verify_ecdsa_key
-#endif /* DTLS_ECC */
-  };
-#if 0
-  uip_ipaddr_t ipaddr;
-  /* struct uip_ds6_addr *root_if; */
-#endif /* UIP_CONF_ROUTER */
-
-  PRINTF("DTLS server started\n");
-
-#if 0  /* TEST */
-  memset(&tmp_addr, 0, sizeof(rimeaddr_t));
-  if(get_eui64_from_eeprom(tmp_addr.u8));
-#if UIP_CONF_IPV6
-  memcpy(&uip_lladdr.addr, &tmp_addr.u8, 8);
-#endif
-#endif /* TEST */
-
-#if 0
-/*   uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); */
-/*   uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr); */
-/*   uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); */
-
-/*   create_rpl_dag(&ipaddr); */
-/* #else */
-  /* uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); */
-
-  uip_ip6addr(&ipaddr, 0xaaaa, 0,0,0,0x0200,0,0,0x0003);
-  uip_ds6_addr_add(&ipaddr, 0, ADDR_MANUAL);
-
-  create_rpl_dag(&ipaddr);
-#endif /* UIP_CONF_ROUTER */
-
-  server_conn = udp_new(NULL, 0, NULL);
-  udp_bind(server_conn, UIP_HTONS(20220));
-
-  dtls_set_log_level(DTLS_LOG_DEBUG);
-
-  dtls_context = dtls_new_context(server_conn);
-  if (dtls_context)
-    dtls_set_handler(dtls_context, &cb);
-}
-
-/*---------------------------------------------------------------------------*/
-PROCESS_THREAD(udp_server_process, ev, data)
-{
-  PROCESS_BEGIN();
-
-  dtls_init();
-  init_dtls();
-
-  print_local_addresses();
-
-  if (!dtls_context) {
-    dtls_emerg("cannot create context\n");
-    PROCESS_EXIT();
-  }
-
-#ifdef ENABLE_POWERTRACE
-  powertrace_start(CLOCK_SECOND * 2); 
-#endif
-
-  while(1) {
-    PROCESS_WAIT_EVENT();
-    if(ev == tcpip_event) {
-      dtls_handle_read(dtls_context);
-    }
-#if 0
-    if (bytes_read > 0) {
-      /* dtls_handle_message(dtls_context, &the_session, readbuf, bytes_read); */
-      read_from_peer(dtls_context, &the_session, readbuf, bytes_read);
-    }
-    dtls_handle_message(ctx, &session, uip_appdata, bytes_read);
-#endif
-  }
-
-  PROCESS_END();
-}
-/*---------------------------------------------------------------------------*/
diff --git a/extlibs/tinydtls/global.h b/extlibs/tinydtls/global.h
deleted file mode 100644 (file)
index 8f947e7..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_GLOBAL_H_
-#define _DTLS_GLOBAL_H_
-
-#include <stdlib.h>
-#include <sys/types.h>
-
-#include "tinydtls.h"
-
-#ifndef DTLSv12
-/* The current version of tinyDTLS supports DTLSv1.2 only. */
-#define DTLSv12 1
-#endif
-
-#ifndef WITH_SHA256
-/* The current version of tinyDTLS supports DTLSv1.2 with SHA256 PRF
-   only. */
-#define WITH_SHA256 1
-#endif
-
-/* Define our own types as at least uint32_t does not work on my amd64. */
-
-typedef unsigned char uint8;
-typedef unsigned char uint16[2];
-typedef unsigned char uint24[3];
-typedef unsigned char uint32[4];
-typedef unsigned char uint48[6];
-
-#ifndef DTLS_MAX_BUF
-/** Maximum size of DTLS message.
-    When Peers are sending bigger messages this causes problems. Californium
-    with ECDSA needs at least 220 */
-#ifdef WITH_CONTIKI
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-#define DTLS_MAX_BUF 200
-#else /* DTLS_ECC */
-#define DTLS_MAX_BUF 100
-#endif /* DTLS_ECC */
-#else /* WITH_CONTIKI */
-#define DTLS_MAX_BUF 1400
-#endif /* WITH_CONTIKI */
-#endif
-
-#ifndef DTLS_DEFAULT_MAX_RETRANSMIT
-/** Number of message retransmissions. */
-#define DTLS_DEFAULT_MAX_RETRANSMIT 7
-#endif
-
-/** Known cipher suites.*/
-typedef enum {
-  TLS_NULL_WITH_NULL_NULL = 0x0000,   /**< NULL cipher  */
-  TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 = 0xFF00, /**< OCF Vendor Specific Ciphersuite */
-  TLS_PSK_WITH_AES_128_CCM_8 = 0xC0A8, /**< see RFC 6655 */
-  TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 = 0xC037, /**< see RFC 5489 */
-  TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xC0AE /**< see RFC 7251 */
-} dtls_cipher_t;
-
-typedef enum {
-    DTLS_CIPHER_DISABLE = 0,
-    DTLS_CIPHER_ENABLE = 1
-} dtls_cipher_enable_t;
-
-/** Known compression suites.*/
-typedef enum {
-  TLS_COMPRESSION_NULL = 0x0000                /* NULL compression */
-} dtls_compression_t;
-
-#define TLS_EXT_ELLIPTIC_CURVES                10 /* see RFC 4492 */
-#define TLS_EXT_EC_POINT_FORMATS       11 /* see RFC 4492 */
-#define TLS_EXT_SIG_HASH_ALGO          13 /* see RFC 5246 */
-#define TLS_EXT_CLIENT_CERTIFICATE_TYPE        19 /* see RFC 7250 */
-#define TLS_EXT_SERVER_CERTIFICATE_TYPE        20 /* see RFC 7250 */
-#define TLS_EXT_ENCRYPT_THEN_MAC       22 /* see RFC 7366 */
-
-/* see http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#tls-extensiontype-values-3 */
-#define TLS_CERT_TYPE_X509              0 /* see RFC 6091 */
-#define TLS_CERT_TYPE_RAW_PUBLIC_KEY    2 /* see RFC 7250 */
-
-
-#define TLS_EXT_ELLIPTIC_CURVES_SECP256R1      23 /* see RFC 4492 */
-
-#define TLS_EXT_EC_POINT_FORMATS_UNCOMPRESSED  0 /* see RFC 4492 */
-
-#define TLS_EC_CURVE_TYPE_NAMED_CURVE          3 /* see RFC 4492 */
-
-#define TLS_CLIENT_CERTIFICATE_TYPE_ECDSA_SIGN 64 /* see RFC 4492 */
-
-#define TLS_EXT_SIG_HASH_ALGO_SHA256           4 /* see RFC 5246 */
-#define TLS_EXT_SIG_HASH_ALGO_ECDSA            3 /* see RFC 5246 */
-
-/**
- * XORs \p n bytes byte-by-byte starting at \p y to the memory area
- * starting at \p x. */
-INLINE_API void
-memxor(unsigned char *x, const unsigned char *y, size_t n) {
-  while(n--) {
-    *x ^= *y;
-    x++; y++;
-  }
-}
-
-/**
- * Compares \p len bytes from @p a with @p b in constant time. This
- * functions always traverses the entire length to prevent timing
- * attacks.
- *
- * \param a Byte sequence to compare
- * \param b Byte sequence to compare
- * \param len Number of bytes to compare.
- * \return \c 1 if \p a and \p b are equal, \c 0 otherwise.
- */
-INLINE_API int
-equals(unsigned char *a, unsigned char *b, size_t len) {
-  int result = 1;
-  while (len--) {
-    result &= (*a++ == *b++);
-  }
-  return result;
-}
-
-#ifdef HAVE_FLS
-#define dtls_fls(i) fls(i)
-#else
-INLINE_API int
-dtls_fls(unsigned int i) {
-  int n;
-  for (n = 0; i; n++)
-    i >>= 1;
-  return n;
-}
-#endif /* HAVE_FLS */
-
-#endif /* _DTLS_GLOBAL_H_ */
diff --git a/extlibs/tinydtls/hmac.c b/extlibs/tinydtls/hmac.c
deleted file mode 100644 (file)
index 571a59a..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "dtls_config.h"
-
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#else
-#define assert(x)
-#endif
-
-#include "debug.h"
-#include "hmac.h"
-
-/* use malloc()/free() on platforms other than Contiki */
-#ifndef WITH_CONTIKI
-#include <stdlib.h>
-
-INLINE_API dtls_hmac_context_t *
-dtls_hmac_context_new() {
-  return (dtls_hmac_context_t *)malloc(sizeof(dtls_hmac_context_t));
-}
-
-INLINE_API void
-dtls_hmac_context_free(dtls_hmac_context_t *ctx) {
-  free(ctx);
-}
-
-#else /* WITH_CONTIKI */
-#include "memb.h"
-MEMB(hmac_context_storage, dtls_hmac_context_t, DTLS_HASH_MAX);
-
-INLINE_API dtls_hmac_context_t *
-dtls_hmac_context_new() {
-  return (dtls_hmac_context_t *)memb_alloc(&hmac_context_storage);
-}
-
-INLINE_API void
-dtls_hmac_context_free(dtls_hmac_context_t *ctx) {
-  memb_free(&hmac_context_storage, ctx);
-}
-
-void
-dtls_hmac_storage_init() {
-  memb_init(&hmac_context_storage);
-}
-#endif /* WITH_CONTIKI */
-
-void
-dtls_hmac_update(dtls_hmac_context_t *ctx,
-                const unsigned char *input, size_t ilen) {
-  assert(ctx);
-  dtls_hash_update(&ctx->data, input, ilen);
-}
-
-dtls_hmac_context_t *
-dtls_hmac_new(const unsigned char *key, size_t klen) {
-  dtls_hmac_context_t *ctx;
-
-  ctx = dtls_hmac_context_new();
-  if (ctx) 
-    dtls_hmac_init(ctx, key, klen);
-
-  return ctx;
-}
-
-void
-dtls_hmac_init(dtls_hmac_context_t *ctx, const unsigned char *key, size_t klen) {
-  int i;
-
-  assert(ctx);
-
-  memset(ctx, 0, sizeof(dtls_hmac_context_t));
-
-  if (klen > DTLS_HMAC_BLOCKSIZE) {
-    dtls_hash_init(&ctx->data);
-    dtls_hash_update(&ctx->data, key, klen);
-    dtls_hash_finalize(ctx->pad, &ctx->data);
-  } else
-    memcpy(ctx->pad, key, klen);
-
-  /* create ipad: */
-  for (i=0; i < DTLS_HMAC_BLOCKSIZE; ++i)
-    ctx->pad[i] ^= 0x36;
-
-  dtls_hash_init(&ctx->data);
-  dtls_hmac_update(ctx, ctx->pad, DTLS_HMAC_BLOCKSIZE);
-
-  /* create opad by xor-ing pad[i] with 0x36 ^ 0x5C: */
-  for (i=0; i < DTLS_HMAC_BLOCKSIZE; ++i)
-    ctx->pad[i] ^= 0x6A;
-}
-
-void
-dtls_hmac_free(dtls_hmac_context_t *ctx) {
-  if (ctx)
-    dtls_hmac_context_free(ctx);
-}
-
-int
-dtls_hmac_finalize(dtls_hmac_context_t *ctx, unsigned char *result) {
-  unsigned char buf[DTLS_HMAC_DIGEST_SIZE];
-  size_t len; 
-
-  assert(ctx);
-  assert(result);
-  
-  len = dtls_hash_finalize(buf, &ctx->data);
-
-  dtls_hash_init(&ctx->data);
-  dtls_hash_update(&ctx->data, ctx->pad, DTLS_HMAC_BLOCKSIZE);
-  dtls_hash_update(&ctx->data, buf, len);
-
-  len = dtls_hash_finalize(result, &ctx->data);
-
-  return len;
-}
-
-#ifdef HMAC_TEST
-#include <stdio.h>
-
-int main(int argc, char **argv) {
-  static unsigned char buf[DTLS_HMAC_DIGEST_SIZE];
-  size_t len, i;
-  dtls_hmac_context_t *ctx;
-
-  if (argc < 3) {
-    fprintf(stderr, "usage: %s key text", argv[0]);
-    return -1;
-  }
-
-  dtls_hmac_storage_init();
-  ctx = dtls_hmac_new(argv[1], strlen(argv[1]));
-  assert(ctx);
-  dtls_hmac_update(ctx, argv[2], strlen(argv[2]));
-  
-  len = dtls_hmac_finalize(ctx, buf);
-
-  for(i = 0; i < len; i++) 
-    printf("%02x", buf[i]);
-  printf("\n");
-
-  dtls_hmac_free(ctx);
-
-  return 0;
-}
-#endif
diff --git a/extlibs/tinydtls/hmac.h b/extlibs/tinydtls/hmac.h
deleted file mode 100644 (file)
index e4046a7..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_HMAC_H_
-#define _DTLS_HMAC_H_
-
-#include <sys/types.h>
-
-#include "global.h"
-
-#ifdef WITH_SHA256
-/** Aaron D. Gifford's implementation of SHA256
- *  see http://www.aarongifford.com/ */
-#include "sha2/sha2.h"
-
-typedef dtls_sha256_ctx dtls_hash_ctx;
-typedef dtls_hash_ctx *dtls_hash_t;
-#define DTLS_HASH_CTX_SIZE sizeof(dtls_sha256_ctx)
-
-INLINE_API void
-dtls_hash_init(dtls_hash_t ctx) {
-  dtls_sha256_init((dtls_sha256_ctx *)ctx);
-}
-
-INLINE_API void 
-dtls_hash_update(dtls_hash_t ctx, const unsigned char *input, size_t len) {
-  dtls_sha256_update((dtls_sha256_ctx *)ctx, input, len);
-}
-
-INLINE_API size_t
-dtls_hash_finalize(unsigned char *buf, dtls_hash_t ctx) {
-  dtls_sha256_final(buf, (dtls_sha256_ctx *)ctx);
-  return DTLS_SHA256_DIGEST_LENGTH;
-}
-#endif /* WITH_SHA256 */
-
-#ifndef WITH_CONTIKI
-INLINE_API void dtls_hmac_storage_init()
-{ }
-#else
-void dtls_hmac_storage_init();
-#endif
-
-/**
- * \defgroup HMAC Keyed-Hash Message Authentication Code (HMAC)
- * NIST Standard FIPS 198 describes the Keyed-Hash Message Authentication 
- * Code (HMAC) which is used as hash function for the DTLS PRF.
- * @{
- */
-
-#define DTLS_HMAC_BLOCKSIZE   64       /**< size of hmac blocks */
-#define DTLS_HMAC_DIGEST_SIZE 32       /**< digest size (for SHA-256) */
-#define DTLS_HMAC_MAX         64       /**< max number of bytes in digest */
-
-/**
- * List of known hash functions for use in dtls_hmac_init(). The
- * identifiers are the same as the HashAlgorithm defined in 
- * <a href="http://tools.ietf.org/html/rfc5246#section-7.4.1.4.1"
- * >Section 7.4.1.4.1 of RFC 5246</a>.
- */
-typedef enum { 
-  HASH_NONE=0, HASH_MD5=1, HASH_SHA1=2, HASH_SHA224=3,
-  HASH_SHA256=4, HASH_SHA384=5, HASH_SHA512=6
-} dtls_hashfunc_t;
-
-/**
- * Context for HMAC generation. This object is initialized with
- * dtls_hmac_init() and must be passed to dtls_hmac_update() and
- * dtls_hmac_finalize(). Once, finalized, the component \c H is
- * invalid and must be initialized again with dtls_hmac_init() before
- * the structure can be used again. 
- */
-typedef struct {
-  unsigned char pad[DTLS_HMAC_BLOCKSIZE]; /**< ipad and opad storage */
-  dtls_hash_ctx data;                    /**< context for hash function */
-} dtls_hmac_context_t;
-
-/**
- * Initializes an existing HMAC context. 
- *
- * @param ctx The HMAC context to initialize.
- * @param key    The secret key.
- * @param klen   The length of @p key.
- */
-void dtls_hmac_init(dtls_hmac_context_t *ctx, const unsigned char *key, size_t klen);
-
-/**
- * Allocates a new HMAC context \p ctx with the given secret key.
- * This function returns \c 1 if \c ctx has been set correctly, or \c
- * 0 or \c -1 otherwise. Note that this function allocates new storage
- * that must be released by dtls_hmac_free().
- *
- * \param key    The secret key.
- * \param klen   The length of \p key.
- * \return A new dtls_hmac_context_t object or @c NULL on error
- */
-dtls_hmac_context_t *dtls_hmac_new(const unsigned char *key, size_t klen);
-
-/**
- * Releases the storage for @p ctx that has been allocated by
- * dtls_hmac_new().
- *
- * @param ctx The dtls_hmac_context_t to free. 
- */
-void dtls_hmac_free(dtls_hmac_context_t *ctx);
-
-/**
- * Updates the HMAC context with data from \p input. 
- * 
- * \param ctx    The HMAC context.
- * \param input  The input data.
- * \param ilen   Size of \p input.
- */
-void dtls_hmac_update(dtls_hmac_context_t *ctx,
-                     const unsigned char *input, size_t ilen);
-
-/** 
- * Completes the HMAC generation and writes the result to the given
- * output parameter \c result. The buffer must be large enough to hold
- * the message digest created by the actual hash function. If in
- * doubt, use \c DTLS_HMAC_MAX. The function returns the number of
- * bytes written to \c result. 
- *
- * \param ctx    The HMAC context.
- * \param result Output parameter where the MAC is written to.
- * \return Length of the MAC written to \p result.
- */
-int dtls_hmac_finalize(dtls_hmac_context_t *ctx, unsigned char *result);
-
-/**@}*/
-
-#endif /* _DTLS_HMAC_H_ */
diff --git a/extlibs/tinydtls/netq.c b/extlibs/tinydtls/netq.c
deleted file mode 100644 (file)
index 8589858..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* netq.h -- Simple packet queue
- *
- * Copyright (C) 2010--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * This file is part of the library tinyDTLS. Please see the file
- * LICENSE for terms of use.
- */
-
-#include "dtls_config.h"
-#include "debug.h"
-#include "netq.h"
-
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#else
-#ifndef assert
-#warning "assertions are disabled"
-#  define assert(x)
-#endif
-#endif
-
-#include "t_list.h"
-
-#ifndef WITH_CONTIKI
-#include <stdlib.h>
-
-INLINE_API netq_t *
-netq_malloc_node(size_t size) {
-  return (netq_t *)malloc(sizeof(netq_t) + size);
-}
-
-INLINE_API void
-netq_free_node(netq_t *node) {
-  free(node);
-}
-
-/* FIXME: implement Contiki's list functions using utlist.h */
-
-#else /* WITH_CONTIKI */
-#include "memb.h"
-
-MEMB(netq_storage, netq_t, NETQ_MAXCNT);
-
-INLINE_API netq_t *
-netq_malloc_node(size_t size) {
-  return (netq_t *)memb_alloc(&netq_storage);
-}
-
-INLINE_API void
-netq_free_node(netq_t *node) {
-  memb_free(&netq_storage, node);
-}
-
-void
-netq_init() {
-  memb_init(&netq_storage);
-}
-#endif /* WITH_CONTIKI */
-
-int 
-netq_insert_node(list_t queue, netq_t *node) {
-  netq_t *p;
-
-  assert(queue);
-  assert(node);
-
-  p = (netq_t *)list_head(queue);
-  while(p && p->t <= node->t && list_item_next(p))
-    p = list_item_next(p);
-
-  if (p)
-    list_insert(queue, p, node);
-  else
-    list_push(queue, node);
-
-  return 1;
-}
-
-netq_t *
-netq_head(list_t queue) {
-  if (!queue)
-    return NULL;
-
-  return list_head(queue);
-}
-
-netq_t *
-netq_next(netq_t *p) {
-  if (!p)
-    return NULL;
-
-  return list_item_next(p);
-}
-
-void
-netq_remove(list_t queue, netq_t *p) {
-  if (!queue || !p)
-    return;
-
-  list_remove(queue, p);
-}
-
-netq_t *netq_pop_first(list_t queue) {
-  if (!queue)
-    return NULL;
-
-  return list_pop(queue);
-}
-
-netq_t *
-netq_node_new(size_t size) {
-  netq_t *node;
-  node = netq_malloc_node(size);
-
-#ifndef NDEBUG
-  if (!node)
-    dtls_warn("netq_node_new: malloc\n");
-#endif
-
-  if (node)
-    memset(node, 0, sizeof(netq_t));
-
-  return node;  
-}
-
-void 
-netq_node_free(netq_t *node) {
-  if (node)
-    netq_free_node(node);
-}
-
-void 
-netq_delete_all(list_t queue) {
-  netq_t *p;
-  if (queue) {
-    while((p = list_pop(queue)))
-      netq_free_node(p); 
-  }
-}
-
diff --git a/extlibs/tinydtls/netq.h b/extlibs/tinydtls/netq.h
deleted file mode 100644 (file)
index c3db339..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/* netq.h -- Simple packet queue
- *
- * Copyright (C) 2010--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * This file is part of the library tinyDTLS. Please see the file
- * LICENSE for terms of use.
- */
-
-#ifndef _DTLS_NETQ_H_
-#define _DTLS_NETQ_H_
-
-#include "tinydtls.h"
-#include "global.h"
-#include "dtls.h"
-#include "dtls_time.h"
-
-/**
- * \defgroup netq Network Packet Queue
- * The netq utility functions implement an ordered queue of data packets
- * to send over the network and can also be used to queue received packets
- * from the network.
- * @{
- */
-
-#ifndef NETQ_MAXCNT
-#if defined(DTLS_ECC) || defined(DTLS_X509)
-#define NETQ_MAXCNT 5 /**< maximum number of elements in netq structure */
-#elif defined(DTLS_PSK)
-#define NETQ_MAXCNT 3 /**< maximum number of elements in netq structure */
-#endif
-#endif
-
-/** 
- * Datagrams in the netq_t structure have a fixed maximum size of
- * DTLS_MAX_BUF to simplify memory management on constrained nodes. */ 
-typedef unsigned char netq_packet_t[DTLS_MAX_BUF];
-
-typedef struct netq_t {
-  struct netq_t *next;
-
-  clock_time_t t;              /**< when to send PDU for the next time */
-  unsigned int timeout;                /**< randomized timeout value */
-
-  dtls_peer_t *peer;           /**< remote address */
-  uint16_t epoch;
-  uint8_t type;
-  unsigned char retransmit_cnt;        /**< retransmission counter, will be removed when zero */
-
-  size_t length;               /**< actual length of data */
-#ifndef WITH_CONTIKI
-  unsigned char data[];                /**< the datagram to send */
-#else
-  netq_packet_t data;          /**< the datagram to send */
-#endif
-} netq_t;
-
-#ifndef WITH_CONTIKI
-INLINE_API void netq_init()
-{ }
-#else
-void netq_init();
-#endif
-
-/** 
- * Adds a node to the given queue, ordered by their time-stamp t.
- * This function returns @c 0 on error, or non-zero if @p node has
- * been added successfully.
- *
- * @param queue A pointer to the queue head where @p node will be added.
- * @param node  The new item to add.
- * @return @c 0 on error, or non-zero if the new item was added.
- */
-int netq_insert_node(list_t queue, netq_t *node);
-
-/** Destroys specified node and releases any memory that was allocated
- * for the associated datagram. */
-void netq_node_free(netq_t *node);
-
-/** Removes all items from given queue and frees the allocated storage */
-void netq_delete_all(list_t queue);
-
-/** Creates a new node suitable for adding to a netq_t queue. */
-netq_t *netq_node_new(size_t size);
-
-/**
- * Returns a pointer to the first item in given queue or NULL if
- * empty. 
- */
-netq_t *netq_head(list_t queue);
-
-netq_t *netq_next(netq_t *p);
-void netq_remove(list_t queue, netq_t *p);
-
-/**
- * Removes the first item in given queue and returns a pointer to the
- * removed element. If queue is empty when netq_pop_first() is called,
- * this function returns NULL.
- */
-netq_t *netq_pop_first(list_t queue);
-
-/**@}*/
-
-#endif /* _DTLS_NETQ_H_ */
diff --git a/extlibs/tinydtls/numeric.h b/extlibs/tinydtls/numeric.h
deleted file mode 100644 (file)
index 5af0c4c..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_NUMERIC_H_
-#define _DTLS_NUMERIC_H_
-
-#include <stdint.h>
-
-#ifndef min
-#define min(A,B) ((A) <= (B) ? (A) : (B))
-#endif
-
-#ifndef max
-#define max(A,B) ((A) < (B) ? (B) : (A))
-#endif
-
-/* this one is for consistency... */
-INLINE_API int dtls_int_to_uint8(unsigned char *field, uint8_t value)
-{
-  field[0] = value & 0xff;
-  return 1;
-}
-
-INLINE_API int dtls_int_to_uint16(unsigned char *field, uint16_t value)
-{
-  field[0] = (value >> 8) & 0xff;
-  field[1] = value & 0xff;
-  return 2;
-}
-
-INLINE_API int dtls_int_to_uint24(unsigned char *field, uint32_t value)
-{
-  field[0] = (value >> 16) & 0xff;
-  field[1] = (value >> 8) & 0xff;
-  field[2] = value & 0xff;
-  return 3;
-}
-
-INLINE_API int dtls_int_to_uint32(unsigned char *field, uint32_t value)
-{
-  field[0] = (value >> 24) & 0xff;
-  field[1] = (value >> 16) & 0xff;
-  field[2] = (value >> 8) & 0xff;
-  field[3] = value & 0xff;
-  return 4;
-}
-
-INLINE_API int dtls_int_to_uint48(unsigned char *field, uint64_t value)
-{
-  field[0] = (value >> 40) & 0xff;
-  field[1] = (value >> 32) & 0xff;
-  field[2] = (value >> 24) & 0xff;
-  field[3] = (value >> 16) & 0xff;
-  field[4] = (value >> 8) & 0xff;
-  field[5] = value & 0xff;
-  return 6;
-}
-
-INLINE_API int dtls_int_to_uint64(unsigned char *field, uint64_t value)
-{
-  field[0] = (value >> 56) & 0xff;
-  field[1] = (value >> 48) & 0xff;
-  field[2] = (value >> 40) & 0xff;
-  field[3] = (value >> 32) & 0xff;
-  field[4] = (value >> 24) & 0xff;
-  field[5] = (value >> 16) & 0xff;
-  field[6] = (value >> 8) & 0xff;
-  field[7] = value & 0xff;
-  return 8;
-}
-
-INLINE_API uint8_t dtls_uint8_to_int(const unsigned char *field)
-{
-  return (uint8_t)field[0];
-}
-
-INLINE_API uint16_t dtls_uint16_to_int(const unsigned char *field)
-{
-  return ((uint16_t)field[0] << 8)
-        | (uint16_t)field[1];
-}
-
-INLINE_API uint32_t dtls_uint24_to_int(const unsigned char *field)
-{
-  return ((uint32_t)field[0] << 16)
-        | ((uint32_t)field[1] << 8)
-        | (uint32_t)field[2];
-}
-
-INLINE_API uint32_t dtls_uint32_to_int(const unsigned char *field)
-{
-  return ((uint32_t)field[0] << 24)
-        | ((uint32_t)field[1] << 16)
-        | ((uint32_t)field[2] << 8)
-        | (uint32_t)field[3];
-}
-
-INLINE_API uint64_t dtls_uint48_to_int(const unsigned char *field)
-{
-  return ((uint64_t)field[0] << 40)
-        | ((uint64_t)field[1] << 32)
-        | ((uint64_t)field[2] << 24)
-        | ((uint64_t)field[3] << 16)
-        | ((uint64_t)field[4] << 8)
-        | (uint64_t)field[5];
-}
-
-INLINE_API uint64_t dtls_uint64_to_int(const unsigned char *field)
-{
-  return ((uint64_t)field[0] << 56)
-        | ((uint64_t)field[1] << 48)
-        | ((uint64_t)field[2] << 40)
-        | ((uint64_t)field[3] << 32)
-        | ((uint64_t)field[4] << 24)
-        | ((uint64_t)field[5] << 16)
-        | ((uint64_t)field[6] << 8)
-        | (uint64_t)field[7];
-}
-
-#endif /* _DTLS_NUMERIC_H_ */
diff --git a/extlibs/tinydtls/peer.c b/extlibs/tinydtls/peer.c
deleted file mode 100644 (file)
index 109a612..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "global.h"
-#include "peer.h"
-#include "debug.h"
-
-#ifndef WITH_CONTIKI
-void peer_init()
-{
-}
-
-INLINE_API dtls_peer_t *
-dtls_malloc_peer() {
-  return (dtls_peer_t *)malloc(sizeof(dtls_peer_t));
-}
-
-void
-dtls_free_peer(dtls_peer_t *peer) {
-  dtls_handshake_free(peer->handshake_params);
-  dtls_security_free(peer->security_params[0]);
-  dtls_security_free(peer->security_params[1]);
-  free(peer);
-}
-#else /* WITH_CONTIKI */
-
-#include "memb.h"
-MEMB(peer_storage, dtls_peer_t, DTLS_PEER_MAX);
-
-void
-peer_init() {
-  memb_init(&peer_storage);
-}
-
-INLINE_API dtls_peer_t *
-dtls_malloc_peer() {
-  return memb_alloc(&peer_storage);
-}
-
-void
-dtls_free_peer(dtls_peer_t *peer) {
-  dtls_handshake_free(peer->handshake_params);
-  dtls_security_free(peer->security_params[0]);
-  dtls_security_free(peer->security_params[1]);
-  memb_free(&peer_storage, peer);
-}
-#endif /* WITH_CONTIKI */
-
-dtls_peer_t *
-dtls_new_peer(const session_t *session) {
-  dtls_peer_t *peer;
-
-  peer = dtls_malloc_peer();
-  if (peer) {
-    memset(peer, 0, sizeof(dtls_peer_t));
-    memcpy(&peer->session, session, sizeof(session_t));
-    peer->security_params[0] = dtls_security_new();
-
-    if (!peer->security_params[0]) {
-      dtls_free_peer(peer);
-      return NULL;
-    }
-
-    dtls_dsrv_log_addr(DTLS_LOG_DEBUG, "dtls_new_peer", session);
-  }
-
-  return peer;
-}
diff --git a/extlibs/tinydtls/peer.h b/extlibs/tinydtls/peer.h
deleted file mode 100644 (file)
index 41fd943..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file peer.h
- * @brief information about peers in a DTLS session
- */
-
-#ifndef _DTLS_PEER_H_
-#define _DTLS_PEER_H_
-
-#include <sys/types.h>
-
-#include "tinydtls.h"
-#include "global.h"
-#include "session.h"
-
-#include "state.h"
-#include "crypto.h"
-
-#ifndef WITH_CONTIKI
-#include "uthash.h"
-#endif /* WITH_CONTIKI */
-
-typedef enum { DTLS_CLIENT=0, DTLS_SERVER } dtls_peer_type;
-
-/** 
- * Holds security parameters, local state and the transport address
- * for each peer. */
-typedef struct dtls_peer_t {
-#ifndef WITH_CONTIKI
-  UT_hash_handle hh;
-#else /* WITH_CONTIKI */
-  struct dtls_peer_t *next;
-#endif /* WITH_CONTIKI */
-
-  session_t session;        /**< peer address and local interface */
-
-  dtls_peer_type role;       /**< denotes if this host is DTLS_CLIENT or DTLS_SERVER */
-  dtls_state_t state;        /**< DTLS engine state */
-
-  dtls_security_parameters_t *security_params[2];
-  dtls_handshake_parameters_t *handshake_params;
-} dtls_peer_t;
-
-INLINE_API dtls_security_parameters_t *dtls_security_params_epoch(dtls_peer_t *peer, uint16_t epoch)
-{
-  if (peer->security_params[0] && peer->security_params[0]->epoch == epoch) {
-    return peer->security_params[0];
-  } else if (peer->security_params[1] && peer->security_params[1]->epoch == epoch) {
-    return peer->security_params[1];
-  } else {
-    return NULL;
-  }
-}
-
-INLINE_API dtls_security_parameters_t *dtls_security_params(dtls_peer_t *peer)
-{
-  return peer->security_params[0];
-}
-
-INLINE_API dtls_security_parameters_t *dtls_security_params_next(dtls_peer_t *peer)
-{
-  if (peer->security_params[1])
-    dtls_security_free(peer->security_params[1]);
-
-  peer->security_params[1] = dtls_security_new();
-  if (!peer->security_params[1]) {
-    return NULL;
-  }
-  peer->security_params[1]->epoch = peer->security_params[0]->epoch + 1;
-  return peer->security_params[1];
-}
-
-INLINE_API void dtls_security_params_free_other(dtls_peer_t *peer)
-{
-  dtls_security_parameters_t * security0 = peer->security_params[0];
-  dtls_security_parameters_t * security1 = peer->security_params[1];
-
-  if (!security0 || !security1 || security0->epoch < security1->epoch)
-    return;
-
-  dtls_security_free(security1);
-  peer->security_params[1] = NULL;
-}
-
-INLINE_API void dtls_security_params_switch(dtls_peer_t *peer)
-{
-  dtls_security_parameters_t * security = peer->security_params[1];
-
-  peer->security_params[1] = peer->security_params[0];
-  peer->security_params[0] = security;
-}
-
-void peer_init();
-
-/**
- * Creates a new peer for given @p session. The current configuration
- * is initialized with the cipher suite TLS_NULL_WITH_NULL_NULL (i.e.
- * no security at all). This function returns a pointer to the new
- * peer or NULL on error. The caller is responsible for releasing the
- * storage allocated for this peer using dtls_free_peer().
- *
- * @param session  The remote peer's address and local interface index.
- * @return A pointer to a newly created and initialized peer object
- * or NULL on error.
- */
-dtls_peer_t *dtls_new_peer(const session_t *session);
-
-/** Releases the storage allocated to @p peer. */
-void dtls_free_peer(dtls_peer_t *peer);
-
-/** Returns the current state of @p peer. */
-INLINE_API dtls_state_t dtls_peer_state(const dtls_peer_t *peer) {
-  return peer->state;
-}
-
-/**
- * Checks if given @p peer is connected. This function returns
- * @c 1 if connected, or @c 0 otherwise.
- */
-INLINE_API int dtls_peer_is_connected(const dtls_peer_t *peer) {
-  return peer->state == DTLS_STATE_CONNECTED;
-}
-
-#endif /* _DTLS_PEER_H_ */
diff --git a/extlibs/tinydtls/platform-specific/Makefile.in b/extlibs/tinydtls/platform-specific/Makefile.in
deleted file mode 100644 (file)
index 6b30d21..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-top_builddir = @top_builddir@
-
-THIS=platform-specific
-DISTDIR?=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-FILES:=Makefile.in $(wildcard *.h)
-
-clean:
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ 
-
-dist:  
-       test -d $(DISTDIR)/$(THIS) || mkdir $(DISTDIR)/$(THIS)
-       cp -r $(FILES) $(DISTDIR)/$(THIS)
-
-# this directory contains no installation candidates
-install:
-       :
diff --git a/extlibs/tinydtls/platform-specific/config-cc2538dk.h b/extlibs/tinydtls/platform-specific/config-cc2538dk.h
deleted file mode 100644 (file)
index 38bc85e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BYTE_ORDER 1234
-#define HAVE_ASSERT_H 1
diff --git a/extlibs/tinydtls/platform-specific/config-econotag.h b/extlibs/tinydtls/platform-specific/config-econotag.h
deleted file mode 100644 (file)
index 38bc85e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BYTE_ORDER 1234
-#define HAVE_ASSERT_H 1
diff --git a/extlibs/tinydtls/platform-specific/config-minimal-net.h b/extlibs/tinydtls/platform-specific/config-minimal-net.h
deleted file mode 100644 (file)
index 547a1b6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define HAVE_ASSERT_H 1
diff --git a/extlibs/tinydtls/platform-specific/config-sky.h b/extlibs/tinydtls/platform-specific/config-sky.h
deleted file mode 100644 (file)
index f49ff3b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#define BYTE_ORDER 1234
-#define HAVE_ASSERT_H 1
-typedef int ssize_t;
diff --git a/extlibs/tinydtls/platform-specific/config-wismote.h b/extlibs/tinydtls/platform-specific/config-wismote.h
deleted file mode 100644 (file)
index 547a1b6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define HAVE_ASSERT_H 1
diff --git a/extlibs/tinydtls/prng.h b/extlibs/tinydtls/prng.h
deleted file mode 100644 (file)
index daf956b..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/* prng.h -- Pseudo Random Numbers
- *
- * Copyright (C) 2010--2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * This file is part of the library tinydtls. Please see
- * README for terms of use. 
- */
-
-/** 
- * @file prng.h
- * @brief Pseudo Random Numbers
- */
-
-#ifndef _DTLS_PRNG_H_
-#define _DTLS_PRNG_H_
-
-#include "tinydtls.h"
-
-/** 
- * @defgroup prng Pseudo Random Numbers
- * @{
- */
-
-#ifndef WITH_CONTIKI
-#include <stdlib.h>
-
-/**
- * Fills \p buf with \p len random bytes. This is the default
- * implementation for prng().  You might want to change prng() to use
- * a better PRNG on your specific platform.
- */
-INLINE_API int
-dtls_prng(unsigned char *buf, size_t len) {
-  while (len--)
-    *buf++ = rand() & 0xFF;
-  return 1;
-}
-
-INLINE_API void
-dtls_prng_init(unsigned short seed) {
-       srand(seed);
-}
-#else /* WITH_CONTIKI */
-#include <string.h>
-#include "random.h"
-
-#ifdef HAVE_PRNG
-INLINE_API int
-dtls_prng(unsigned char *buf, size_t len)
-{
-       return contiki_prng_impl(buf, len);
-}
-#else
-/**
- * Fills \p buf with \p len random bytes. This is the default
- * implementation for prng().  You might want to change prng() to use
- * a better PRNG on your specific platform.
- */
-INLINE_API int
-dtls_prng(unsigned char *buf, size_t len) {
-  unsigned short v = random_rand();
-  while (len > sizeof(v)) {
-    memcpy(buf, &v, sizeof(v));
-    len -= sizeof(v);
-    buf += sizeof(v);
-    v = random_rand();
-  }
-
-  memcpy(buf, &v, len);
-  return 1;
-}
-#endif /* HAVE_PRNG */
-
-INLINE_API void
-dtls_prng_init(unsigned short seed) {
-       random_init(seed);
-}
-#endif /* WITH_CONTIKI */
-
-/** @} */
-
-#endif /* _DTLS_PRNG_H_ */
diff --git a/extlibs/tinydtls/session.c b/extlibs/tinydtls/session.c
deleted file mode 100644 (file)
index 6170fd1..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "dtls_config.h"
-#include "debug.h"
-#include "session.h"
-
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#else
-#ifndef assert
-#warning "assertions are disabled"
-#  define assert(x)
-#endif
-#endif
-
-#ifdef WITH_CONTIKI
-#define _dtls_address_equals_impl(A,B)                         \
-  ((A)->size == (B)->size                                      \
-   && (A)->port == (B)->port                                   \
-   && uip_ipaddr_cmp(&((A)->addr),&((B)->addr))                        \
-   && (A)->ifindex == (B)->ifindex)
-
-#else /* WITH_CONTIKI */
-
-INLINE_API int 
-_dtls_address_equals_impl(const session_t *a,
-                         const session_t *b) {
-  if ((a == b) && (a != NULL))
-    return 1;
-  if (a->ifindex != b->ifindex ||
-      a->size != b->size || a->addr.sa.sa_family != b->addr.sa.sa_family)
-    return 0;
-  
-  /* need to compare only relevant parts of sockaddr_in6 */
- switch (a->addr.sa.sa_family) {
- case AF_INET:
-   return 
-     a->addr.sin.sin_port == b->addr.sin.sin_port && 
-     memcmp(&a->addr.sin.sin_addr, &b->addr.sin.sin_addr, 
-           sizeof(struct in_addr)) == 0;
- case AF_INET6:
-   return a->addr.sin6.sin6_port == b->addr.sin6.sin6_port && 
-     memcmp(&a->addr.sin6.sin6_addr, &b->addr.sin6.sin6_addr, 
-           sizeof(struct in6_addr)) == 0;
- default: /* fall through and signal error */
-    dtls_emerg("Could not compare dtls addresses!\n");
- }
- return 0;
-}
-#endif /* WITH_CONTIKI */
-
-void
-dtls_session_init(session_t *sess) {
-  assert(sess);
-  memset(sess, 0, sizeof(session_t));
-  sess->size = sizeof(sess->addr);
-}
-
-int
-dtls_session_equals(const session_t *a, const session_t *b) {
-  assert(a); assert(b);
-  return _dtls_address_equals_impl(a, b);
-}
diff --git a/extlibs/tinydtls/session.h b/extlibs/tinydtls/session.h
deleted file mode 100644 (file)
index 11ce357..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _DTLS_SESSION_H_
-#define _DTLS_SESSION_H_
-
-#include <string.h>
-
-#include "dtls_config.h"
-#include "tinydtls.h"
-#include "global.h"
-
-#ifdef WITH_CONTIKI
-#include "ip/uip.h"
-typedef struct {
-  unsigned char size;
-  uip_ipaddr_t addr;
-  unsigned short port;
-  int ifindex;
-} session_t;
-
-#else /* WITH_CONTIKI */
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-#include <stdint.h>
-
-typedef struct {
-  socklen_t size;              /**< size of addr */
-#ifdef _MSC_VER
-  __declspec(align(8))
-#endif
-  union {
-    struct sockaddr     sa;
-    struct sockaddr_storage st;
-    struct sockaddr_in  sin;
-    struct sockaddr_in6 sin6;
-  } addr;
-  uint8_t ifindex;
-} session_t;
-#endif /* WITH_CONTIKI */
-
-/** 
- * Resets the given session_t object @p sess to its default
- * values.  In particular, the member rlen must be initialized to the
- * available size for storing addresses.
- * 
- * @param sess The session_t object to initialize.
- */
-void dtls_session_init(session_t *sess);
-
-/**
- * Compares the given session objects. This function returns @c 0
- * when @p a and @p b differ, @c 1 otherwise.
- */
-int dtls_session_equals(const session_t *a, const session_t *b);
-
-#endif /* _DTLS_SESSION_H_ */
diff --git a/extlibs/tinydtls/sha2/Makefile.in b/extlibs/tinydtls/sha2/Makefile.in
deleted file mode 100644 (file)
index 85ce9ce..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# Makefile for tinydtls
-#
-# Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-top_srcdir:= @top_srcdir@
-
-SOURCES:= sha2.c
-HEADERS:=sha2.h
-OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
-CPPFLAGS=@CPPFLAGS@ -I$(top_srcdir)
-CFLAGS=-Wall -std=c99 -pedantic @CFLAGS@
-LDLIBS=@LIBS@
-FILES:=Makefile.in $(SOURCES) $(HEADERS) README sha2prog.c sha2speed.c sha2test.pl 
-DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-
-.PHONY: all dirs clean install dist distclean .gitignore doc
-
-.SUFFIXES:
-.SUFFIXES:      .c .o
-
-all:
-
-check: 
-       echo DISTDIR: $(DISTDIR)
-       echo top_builddir: $(top_builddir)
-
-clean:
-       @rm -f $(PROGRAMS) main.o $(LIB) $(OBJECTS)
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir clean ; \
-       done
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ $(DISTDIR).tar.gz
-
-dist:  $(FILES)
-       test -d $(DISTDIR)/sha2 || mkdir $(DISTDIR)/sha2
-       cp -p $(FILES) $(DISTDIR)/sha2
-       test -d $(DISTDIR)/sha2/testvectors || mkdir $(DISTDIR)/sha2/testvectors
-       cp -pr testvectors $(DISTDIR)/sha2/testvectors
-
-install:       $(HEADERS)
-       test -d $(includedir)/sha2 || mkdir -p $(includedir)/sha2
-       $(install) $(HEADERS) $(includedir)/sha2
-
-.gitignore:
-       echo "core\n*~\n*.[oa]\n*.gz\n*.cap\n$(PROGRAM)\n$(DISTDIR)\n.gitignore" >$@
diff --git a/extlibs/tinydtls/sha2/README b/extlibs/tinydtls/sha2/README
deleted file mode 100644 (file)
index 95e57f3..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-VERSION:
-
-This is version 1.0 RELEASE
-
-While this is my "release" version, due to lack of additional
-official test vectors against which to verify this implementation's
-correctness, beware that there may be implementation bugs.  Also,
-it has not yet been tested on very many other architectures,
-big-endian machines in particular.
-
-
-LICENSE:
-
-This implementation is released freely under an open-source BSD
-license which appears at the top of each source code file.
-
-
-WHAT IT IS:
-
-The files sha2.h and sha2.c implement the SHA-256, SHA-384, and SHA-512
-hash algorithms as described in the PDF document found at the following
-web address:
-
-  http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf
-
-The interface is similar to the interface to SHA-1 found in the OpenSSL
-library.
-
-The file sha2prog.c is a simple program that accepts input from either
-STDIN or reads one or more files specified on the command line, and then
-generates the specified hash (either SHA-256, SHA-384, SHA-512, or any
-combination thereof, including all three at once).
-
-
-LIMITATIONS:
-
-This implementation has several limitations:
-
- * Input data is only accepted in octet-length increments.  No sub-byte
-   data is handled.  The NIST document describes how to handle sub-byte
-   input data, but for ease of implementation this version will only
-   accept message data in multiples of bytes.
- * This implementation utilizes 64-bit integer data types.  If your
-   system and compiler does not have a 64-bit integer data type, this
-   implementation will not work.
- * Because of the use of 64-bit operations, many 32-bit architectures
-   that do have 64-bit data types but do operations most efficiently
-   on 32-bit words, this implementation may be slower than an
-   implementation designed to use only 32-bit words (emulating the
-   64-bit operations).
- * On platforms with 128-bit integer data types, the SHA-384 and SHA-512
-   bit counters used by this implementation might be better off using
-   the 128-bit type instead of simulating it with two 64-bit integers.
- * This implementation was written in C in hopes of portability and for
-   the fun of it during my spare time.  It is probably not the most
-   efficient or fastest C implementation.  I welcome suggestions,
-   however, that suggest ways to speed things up without breaking
-   portability.  I also welcome suggestions to improve portability.
- * As mentioned above, this code has NOT been thoroughly tested.
-   This is perhaps the most severe limitation.
-
-
-BEFORE YOU COMPILE (OPTIONS):
-
-Each of the options described below may either be defined in the sha2.h
-header file (or in the sha2.c file in some cases), or on the command
-line at compile time if your compiler supports such things.  For
-example:
-
-  #define SHA2_USE_INTTYPES_H
-  #define SHA2_UNROLL_TRANSFORM
-
-Or:
-
-  cc -c -DSHA2_UNROLL_TRANSFORM sha2.c
-  cc -c -DBYTE_ORDER=4321 -DBIG_ENDIAN=4321 sha2.c
-
-Here are the available options.  Read on below for a description of
-each one:
-
-  SHA2_USE_INTTYPES_H
-  SHA2_USE_MEMSET_MEMCPY/SHA2_USE_BZERO_BCOPY
-  SHA2_UNROLL_TRANSFORM
-  BYTE_ORDER (LITTLE_ENDIAN/BIG_ENDIAN)
-
-* SHA2_USE_INTTYPES_H option:
-By default, this code uses u_intXX_t data types for 8 bit, 32 bit, and
-64 bit unsigned integer type definitions.  Most BSD systems define these,
-as does Linux.  However, some (like Compaq's Tru64 Unix) may instead
-use uintXX_t data types as defined by recent ANSI C standards and as
-included in the inttypes.h header file.  Those wanting to use inttypes.h
-need to define this either in sha.h or at compile time.
-
-On those systems where NEITHER definitions are available, you will need
-to edit both sha2.h and sha2.c and define things by hand in the appropriate
-sections.
-
-* BYTE_ORDER definitions:
-This code assumes that BYTE_ORDER will be defined by the system during
-compile to either equal LITTLE_ENDIAN or BIG_ENDIAN.  If your system
-does not define these, you may need to define them by hand in the sha.c
-file according to the byte ordering conventions of your system.
-
-* SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY
-The code in sha2.c can use either memset()/memcpy() for memory block
-operations, or bzero()/mcopy().  If you define neither of these, the
-code will default to memset()/memcpy().  You can define either at the
-command line or in sha2.h or in sha2.c.
-
-* SHA2_UNROLL_TRANSFORM
-By defining this either on the command line or in sha2.h or sha2.c,
-the code will use macros to partially "unroll" the SHA transform
-function.  This usually generates bigger executables.  It CAN (but
-not necessarily WILL) generate faster code when you tell your compiler
-to optimize things.  For example, on the FreeBSD and Linux x86 systems
-I tested things on (using gcc), when I optimized with just -O2 and
-unrolled the transform, the hash transform was faster by 15-30%.  On
-these same systems, if I did NO optimization, the unrolled transform
-was SLOWER, much slower (I'm guessing because the code was breaking
-the cache, but I'm not sure).  Your mileage may vary.
-
-
-PORTABILITY:
-
-The code in sha2.c and sha2.h is intended to be portable.  It may
-require that you do a few #definitions in the .h file.  I've successfully
-compiled and tested the sha2.c and sha2.h code on Apple's OS X (on
-a PPC), FreeBSD 4.1.1 on Intel, Linux on Intel, FreeBSD on the Alpha,
-and even under Windows98SE using Metrowerks C.  The utility/example
-programs (sha2prog.c, sha2test.c, and sha2speed.c) will very likely
-have more trouble in portability since they do I/O.
-
-To get sha2.c/sha2.h working under Windows, I had to define
-SHA2_USE_INTTYPES_H, BYTE_ORDER, LITTLE_ENDIAN, and had to comment
-out the include of <sys/types.h> in sha2.h.  With a bit more work
-I got the test program to run and verified that all the test
-cases passed.
-
-
-SUGGESTIONS/BUG FIXES:
-
-If you make changes to get it working on other architectures, if you fix
-any bugs, or if you make changes that improve this implementation's
-efficiency that would be relatively portable and you're willing to release
-your changes under the same license, please send them to me for possible
-inclusion in future versions.
-
-If you know where I can find some additional test vectors, please let me
-know.
-
-
-CHANGE HISTORY:
-
-0.8 to 0.9     - Fixed spelling errors, changed to u_intXX_t type usage,
-                 removed names from prototypes, added prototypes to sha2.c,
-                 and a few things I can't recall.
-
-0.9 to 0.9.5   - Add a new define in sha2.c that permits one to compile
-                 it to either use memcpy()/memset() or bcopy()/bzero()
-                 for memory block copying and zeroing.  Added support
-                 for unrolled SHA-256/384/512 transform loops.  Just
-                 compile with SHA2_UNROLL_TRANSFORM to enable.  It takes
-                 longer to compile, but I hope it is a bit faster.  I
-                 need to do some test to see whether or not it is. Oh,
-                 in sha2.c, you either need to define SHA2_USE_BZERO_BCOPY
-                 or SHA2_USE_MEMSET_MEMCPY to choose which way you want
-                 to compile.  *Whew*  It's amazing how quickly something
-                 simple starts to grow more complex even in the span of
-                 just a few hours.  I didn't really intend to do this much.
-0.9.5 to 0.9.6  - Added a test program (sha2test) which tests against several
-                  known test vectors.  WARNING: Some of the test output
-                  hashes are NOT from NIST's documentation and are the
-                  output of this implementation and so may be incorrect.
-0.9.6 to 0.9.7  - Fixed a bug that could cause invalid output in certain
-                 cases and added an assumed scenario where zero-length
-                 data is hashed.  Also changed the rotation macros to use
-                 a temporary variable as this reduces the number of operations.
-                 When data is fed in blocks of the right length, copying of
-                 data is reduced in this version.  Added SHAYXZ_Data()
-                 functions for ease of hashing a set of data.  Added another
-                 file sha2speed.c for doing speed testing.  Added another test
-                 vector with a larger data size (16KB).  Fixed u_intXX_t and
-                 uintXX_t handling by adding a define for SHA2_USE_INTTYPES_H
-                 as well as made a few other minor changes to get rid of
-                 warnings when compiling on Compaq's Tru64 Unix.
-0.9.7 to 0.9.8  - The bug fix in 0.9.7 was incomplete and in some cases made
-                  things worse.  I believe that 0.9.8 fixes the bug completely
-                  so that output is correct.  I cannot verify this, however,
-                  because of the lack of test vectors against which to do such
-                  verification.  All versions correctly matched the very few
-                  NIST-provided vectors, but unfortunately the bug only
-                  appeared in longer message data sets.
-0.9.8 to 0.9.9  - Fixed some really bad typos and mistakes on my part that
-                  only affected big-endian systems.  I didn't have direct
-                  access for testing before this version.  Thanks to
-                  Lucas Marshall for giving me access to his OS X system.
-0.9.9 to 1.0.0b1  Added a few more test samples and made a few changes to
-                  make things easier compiling on several other platforms.
-                  Also I experimented with alternate macro definitions
-                  in the SHA2_UNROLL_TRANSFORM version (see sha2.slower.c)
-                  and eliminated the T1 temporary variable (the compiler
-                  would of course still use internal temporary storage
-                  during expression evaluation, but I'd hoped the compiler
-                  would be more efficient), but unfortunately under FreeBSD
-                  4.1.1-STABLE on an x86 platform, the change slowed things
-                  down.
-1.0.0b1 to 1.0 RELEASE  Fixed an off-by-one implementation bug that affected
-                  SHA-256 when hashed data length L = 55 + 64 * X where X is
-                  either zero or a positive integer, and another (basically
-                  the same bug) bug in SHA-384 and SHA-512 that showed up when
-                  hashed data lengths L = 111 + 128 * X.  Thanks to Rogier
-                 van de Pol for sending me test data that revealed the bug.
-                  The fix was very simple (just two tiny changes).  Also,
-                  I finally put the files into RCS so future changes will be
-                  easier to manage.  The sha2prog.c file was rewritten to
-                  be more useful to me, and I got rid of the old C testing
-                  program and now use a perl script with a subdirectory full
-                  of test data.  It's a more flexible test system.
-
-
-LATEST VERSION:
-
-The latest version and documentation (if any ;) should always be available
-on the web at:
-
-  http://www.aarongifford.com/computers/sha.html
-
-
-CONTACT ME:
-
-I can be reached via email at:
-
-  Aaron Gifford   <m e @ a a r o n g i f f o r d . c o m>
-
-Please don't send support questions.  I don't have the time to answer and
-they'll probably be ignored.  Bug fixes, or patches that add something useful
-will be gratefully accepted, however.
-
-If you use this implementation, I would enjoy getting a brief email message
-letting me know who you are and what use to which it is being put.  There
-is no requirement to do so.  I just think it would be fun.
-
-
-EXAMPLES:
-
-Here's an example of compiling and using the sha2 program (in this example
-I build it using the unrolled transform version with -O2 optimizations),
-and then running the perl testing script:
-
-  cc -O2 -DSHA2_UNROLL_TRANSFORM -Wall -o sha2 sha2prog.c sha2.c
-  % ./sha2test.pl
-
-  [most of the perl script output deleted for brevity]
-
-  ===== RESULTS (18 VECTOR DATA FILES HASHED) =====
-
-  HASH TYPE       NO. OF TESTS    PASSED  FAILED
-  ---------       ------------    ------  ------
-  SHA-256                   18        18       0
-  SHA-384                   18        18       0
-  SHA-512                   18        18       0
-  ----------------------------------------------
-  TOTAL:                    54        54       0
-
-  NO ERRORS!  ALL TESTS WERE SUCCESSFUL!
-
-  ALL TEST VECTORS PASSED!
-
-That's all folks!  Have fun!
-
-Aaron out.
-
diff --git a/extlibs/tinydtls/sha2/sha2.c b/extlibs/tinydtls/sha2/sha2.c
deleted file mode 100644 (file)
index c42c993..0000000
+++ /dev/null
@@ -1,1101 +0,0 @@
-/*
- * FILE:       sha2.c
- * AUTHOR:     Aaron D. Gifford - http://www.aarongifford.com/
- * 
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
- */
-
-#include "tinydtls.h"
-#include "dtls_config.h"
-#include <string.h>    /* memcpy()/memset() or bcopy()/bzero() */
-#ifdef HAVE_ASSERT_H
-#include <assert.h>    /* assert() */
-#else
-#ifndef assert
-#warning "assertions are disabled"
-#  define assert(x)
-#endif
-#endif
-#include "sha2.h"
-
-/*
- * ASSERT NOTE:
- * Some sanity checking code is included using assert().  On my FreeBSD
- * system, this additional code can be removed by compiling with NDEBUG
- * defined.  Check your own systems manpage on assert() to see how to
- * compile WITHOUT the sanity checking code on your system.
- *
- * UNROLLED TRANSFORM LOOP NOTE:
- * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
- * loop version for the hash transform rounds (defined using macros
- * later in this file).  Either define on the command line, for example:
- *
- *   cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c
- *
- * or define below:
- *
- *   #define SHA2_UNROLL_TRANSFORM
- *
- */
-
-
-/*** SHA-256/384/512 Machine Architecture Definitions *****************/
-/*
- * BYTE_ORDER NOTE:
- *
- * Please make sure that your system defines BYTE_ORDER.  If your
- * architecture is little-endian, make sure it also defines
- * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
- * equivilent.
- *
- * If your system does not define the above, then you can do so by
- * hand like this:
- *
- *   #define LITTLE_ENDIAN 1234
- *   #define BIG_ENDIAN    4321
- *
- * And for little-endian machines, add:
- *
- *   #define BYTE_ORDER LITTLE_ENDIAN 
- *
- * Or for big-endian machines:
- *
- *   #define BYTE_ORDER BIG_ENDIAN
- *
- * The FreeBSD machine this was written on defines BYTE_ORDER
- * appropriately by including <sys/types.h> (which in turn includes
- * <machine/endian.h> where the appropriate definitions are actually
- * made).
- */
-
-/* bergmann: define LITTLE_ENDIAN and BIG_ENDIAN to ease autoconf: */
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
-#endif
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#endif
-
-#ifndef BYTE_ORDER
-#  if defined(WORDS_BIGENDIAN) || (defined(AC_APPLE_UNIVERSAL_BUILD) && defined(__BIG_ENDIAN__))
-#    define BYTE_ORDER BIG_ENDIAN
-#  else /* WORDS_BIGENDIAN */
-#    define BYTE_ORDER LITTLE_ENDIAN
-#  endif
-#endif
-
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
-/*
- * Define the followingsha2_* types to types of the correct length on
- * the native archtecture.   Most BSD systems and Linux define u_intXX_t
- * types.  Machines with very recent ANSI C headers, can use the
- * uintXX_t definintions from inttypes.h by defining SHA2_USE_INTTYPES_H
- * during compile or in the sha.h header file.
- *
- * Machines that support neither u_intXX_t nor inttypes.h's uintXX_t
- * will need to define these three typedefs below (and the appropriate
- * ones in sha.h too) by hand according to their system architecture.
- *
- * Thank you, Jun-ichiro itojun Hagino, for suggesting using u_intXX_t
- * types and pointing out recent ANSI C support for uintXX_t in inttypes.h.
- */
-#ifdef SHA2_USE_INTTYPES_H
-
-typedef uint8_t  sha2_byte;    /* Exactly 1 byte */
-typedef uint32_t sha2_word32;  /* Exactly 4 bytes */
-typedef uint64_t sha2_word64;  /* Exactly 8 bytes */
-
-#else /* SHA2_USE_INTTYPES_H */
-
-typedef u_int8_t  sha2_byte;   /* Exactly 1 byte */
-typedef u_int32_t sha2_word32; /* Exactly 4 bytes */
-typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
-
-#endif /* SHA2_USE_INTTYPES_H */
-
-
-/*** SHA-256/384/512 Various Length Definitions ***********************/
-/* NOTE: Most of these are in sha2.h */
-#define DTLS_SHA256_SHORT_BLOCK_LENGTH (DTLS_SHA256_BLOCK_LENGTH - 8)
-#define DTLS_SHA384_SHORT_BLOCK_LENGTH (DTLS_SHA384_BLOCK_LENGTH - 16)
-#define DTLS_SHA512_SHORT_BLOCK_LENGTH (DTLS_SHA512_BLOCK_LENGTH - 16)
-
-
-/*** ENDIAN REVERSAL MACROS *******************************************/
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define REVERSE32(w,x) { \
-       sha2_word32 tmp = (w); \
-       tmp = (tmp >> 16) | (tmp << 16); \
-       (x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \
-}
-#define REVERSE64(w,x) { \
-       sha2_word64 tmp = (w); \
-       tmp = (tmp >> 32) | (tmp << 32); \
-       tmp = ((tmp & 0xff00ff00ff00ff00ULL) >> 8) | \
-             ((tmp & 0x00ff00ff00ff00ffULL) << 8); \
-       (x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \
-             ((tmp & 0x0000ffff0000ffffULL) << 16); \
-}
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-/*
- * Macro for incrementally adding the unsigned 64-bit integer n to the
- * unsigned 128-bit integer (represented using a two-element array of
- * 64-bit words):
- */
-#define ADDINC128(w,n) { \
-       (w)[0] += (sha2_word64)(n); \
-       if ((w)[0] < (n)) { \
-               (w)[1]++; \
-       } \
-}
-
-/*
- * Macros for copying blocks of memory and for zeroing out ranges
- * of memory.  Using these macros makes it easy to switch from
- * using memset()/memcpy() and using bzero()/bcopy().
- *
- * Please define either SHA2_USE_MEMSET_MEMCPY or define
- * SHA2_USE_BZERO_BCOPY depending on which function set you
- * choose to use:
- */
-#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY)
-/* Default to memset()/memcpy() if no option is specified */
-#define        SHA2_USE_MEMSET_MEMCPY  1
-#endif
-#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY)
-/* Abort with an error if BOTH options are defined */
-#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both!
-#endif
-
-#ifdef SHA2_USE_MEMSET_MEMCPY
-#define MEMSET_BZERO(p,l)      memset((p), 0, (l))
-#define MEMCPY_BCOPY(d,s,l)    memcpy((d), (s), (l))
-#endif
-#ifdef SHA2_USE_BZERO_BCOPY
-#define MEMSET_BZERO(p,l)      bzero((p), (l))
-#define MEMCPY_BCOPY(d,s,l)    bcopy((s), (d), (l))
-#endif
-
-
-/*** THE SIX LOGICAL FUNCTIONS ****************************************/
-/*
- * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
- *
- *   NOTE:  The naming of R and S appears backwards here (R is a SHIFT and
- *   S is a ROTATION) because the SHA-256/384/512 description document
- *   (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
- *   same "backwards" definition.
- */
-/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
-#define R(b,x)                 ((x) >> (b))
-/* 32-bit Rotate-right (used in SHA-256): */
-#define S32(b,x)       (((x) >> (b)) | ((x) << (32 - (b))))
-/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
-#define S64(b,x)       (((x) >> (b)) | ((x) << (64 - (b))))
-
-/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
-#define Ch(x,y,z)      (((x) & (y)) ^ ((~(x)) & (z)))
-#define Maj(x,y,z)     (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
-
-/* Four of six logical functions used in SHA-256: */
-#define Sigma0_256(x)  (S32(2,  (x)) ^ S32(13, (x)) ^ S32(22, (x)))
-#define Sigma1_256(x)  (S32(6,  (x)) ^ S32(11, (x)) ^ S32(25, (x)))
-#define sigma0_256(x)  (S32(7,  (x)) ^ S32(18, (x)) ^ R(3 ,   (x)))
-#define sigma1_256(x)  (S32(17, (x)) ^ S32(19, (x)) ^ R(10,   (x)))
-
-/* Four of six logical functions used in SHA-384 and SHA-512: */
-#define Sigma0_512(x)  (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
-#define Sigma1_512(x)  (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
-#define sigma0_512(x)  (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7,   (x)))
-#define sigma1_512(x)  (S64(19, (x)) ^ S64(61, (x)) ^ R( 6,   (x)))
-
-/*** INTERNAL FUNCTION PROTOTYPES *************************************/
-/* NOTE: These should not be accessed directly from outside this
- * library -- they are intended for private internal visibility/use
- * only.
- */
-void dtls_sha512_last(dtls_sha512_ctx*);
-void dtls_sha256_transform(dtls_sha256_ctx*, const sha2_word32*);
-void dtls_sha512_transform(dtls_sha512_ctx*, const sha2_word64*);
-
-#ifdef WITH_SHA256
-/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
-/* Hash constant words K for SHA-256: */
-const static sha2_word32 K256[64] = {
-       0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
-       0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
-       0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
-       0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
-       0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
-       0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
-       0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
-       0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
-       0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
-       0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
-       0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
-       0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
-       0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
-       0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
-       0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
-       0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
-};
-
-/* Initial hash value H for SHA-256: */
-const static sha2_word32 sha256_initial_hash_value[8] = {
-       0x6a09e667UL,
-       0xbb67ae85UL,
-       0x3c6ef372UL,
-       0xa54ff53aUL,
-       0x510e527fUL,
-       0x9b05688cUL,
-       0x1f83d9abUL,
-       0x5be0cd19UL
-};
-#endif
-
-#if defined(WITH_SHA384) || defined(WITH_SHA512)
-/* Hash constant words K for SHA-384 and SHA-512: */
-const static sha2_word64 K512[80] = {
-       0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
-       0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
-       0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
-       0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
-       0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
-       0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
-       0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
-       0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
-       0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
-       0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
-       0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
-       0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
-       0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
-       0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
-       0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
-       0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
-       0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
-       0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
-       0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
-       0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
-       0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
-       0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
-       0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
-       0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
-       0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
-       0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
-       0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
-       0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
-       0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
-       0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
-       0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
-       0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
-       0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
-       0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
-       0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
-       0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
-       0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
-       0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
-       0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
-       0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
-};
-#endif
-
-#ifdef WITH_SHA384
-/* Initial hash value H for SHA-384 */
-const static sha2_word64 sha384_initial_hash_value[8] = {
-       0xcbbb9d5dc1059ed8ULL,
-       0x629a292a367cd507ULL,
-       0x9159015a3070dd17ULL,
-       0x152fecd8f70e5939ULL,
-       0x67332667ffc00b31ULL,
-       0x8eb44a8768581511ULL,
-       0xdb0c2e0d64f98fa7ULL,
-       0x47b5481dbefa4fa4ULL
-};
-#endif
-
-#ifdef WITH_SHA512
-/* Initial hash value H for SHA-512 */
-const static sha2_word64 sha512_initial_hash_value[8] = {
-       0x6a09e667f3bcc908ULL,
-       0xbb67ae8584caa73bULL,
-       0x3c6ef372fe94f82bULL,
-       0xa54ff53a5f1d36f1ULL,
-       0x510e527fade682d1ULL,
-       0x9b05688c2b3e6c1fULL,
-       0x1f83d9abfb41bd6bULL,
-       0x5be0cd19137e2179ULL
-};
-#endif
-
-/*
- * Constant used by SHA256/384/512_End() functions for converting the
- * digest to a readable hexadecimal character string:
- */
-static const char *sha2_hex_digits = "0123456789abcdef";
-
-
-/*** SHA-256: *********************************************************/
-#ifdef WITH_SHA256
-void dtls_sha256_init(dtls_sha256_ctx* context) {
-       if (context == (dtls_sha256_ctx*)0) {
-               return;
-       }
-       MEMCPY_BCOPY(context->state, sha256_initial_hash_value, DTLS_SHA256_DIGEST_LENGTH);
-       MEMSET_BZERO(context->buffer, DTLS_SHA256_BLOCK_LENGTH);
-       context->bitcount = 0;
-}
-
-#ifdef SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-256 round macros: */
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)      \
-       REVERSE32(*data++, W256[j]); \
-       T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
-             K256[j] + W256[j]; \
-       (d) += T1; \
-       (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
-       j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)      \
-       T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
-            K256[j] + (W256[j] = *data++); \
-       (d) += T1; \
-       (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
-       j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256(a,b,c,d,e,f,g,h)      \
-       s0 = W256[(j+1)&0x0f]; \
-       s0 = sigma0_256(s0); \
-       s1 = W256[(j+14)&0x0f]; \
-       s1 = sigma1_256(s1); \
-       T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
-            (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \
-       (d) += T1; \
-       (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
-       j++
-
-void dtls_sha256_transform(dtls_sha256_ctx* context, const sha2_word32* data) {
-       sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
-       sha2_word32     T1, *W256;
-       int             j;
-
-       W256 = (sha2_word32*)context->buffer;
-
-       /* Initialize registers with the prev. intermediate value */
-       a = context->state[0];
-       b = context->state[1];
-       c = context->state[2];
-       d = context->state[3];
-       e = context->state[4];
-       f = context->state[5];
-       g = context->state[6];
-       h = context->state[7];
-
-       j = 0;
-       do {
-               /* Rounds 0 to 15 (unrolled): */
-               ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
-               ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
-               ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
-               ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
-               ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
-               ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
-               ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
-               ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
-       } while (j < 16);
-
-       /* Now for the remaining rounds to 64: */
-       do {
-               ROUND256(a,b,c,d,e,f,g,h);
-               ROUND256(h,a,b,c,d,e,f,g);
-               ROUND256(g,h,a,b,c,d,e,f);
-               ROUND256(f,g,h,a,b,c,d,e);
-               ROUND256(e,f,g,h,a,b,c,d);
-               ROUND256(d,e,f,g,h,a,b,c);
-               ROUND256(c,d,e,f,g,h,a,b);
-               ROUND256(b,c,d,e,f,g,h,a);
-       } while (j < 64);
-
-       /* Compute the current intermediate hash value */
-       context->state[0] += a;
-       context->state[1] += b;
-       context->state[2] += c;
-       context->state[3] += d;
-       context->state[4] += e;
-       context->state[5] += f;
-       context->state[6] += g;
-       context->state[7] += h;
-
-       /* Clean up */
-       a = b = c = d = e = f = g = h = T1 = 0;
-}
-
-#else /* SHA2_UNROLL_TRANSFORM */
-
-void dtls_sha256_transform(dtls_sha256_ctx* context, const sha2_word32* data) {
-       sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
-       sha2_word32     T1, T2, *W256;
-       int             j;
-
-       W256 = (sha2_word32*)context->buffer;
-
-       /* Initialize registers with the prev. intermediate value */
-       a = context->state[0];
-       b = context->state[1];
-       c = context->state[2];
-       d = context->state[3];
-       e = context->state[4];
-       f = context->state[5];
-       g = context->state[6];
-       h = context->state[7];
-
-       j = 0;
-       do {
-#if BYTE_ORDER == LITTLE_ENDIAN
-               /* Copy data while converting to host byte order */
-               REVERSE32(*data++,W256[j]);
-               /* Apply the SHA-256 compression function to update a..h */
-               T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-               /* Apply the SHA-256 compression function to update a..h with copy */
-               T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-               T2 = Sigma0_256(a) + Maj(a, b, c);
-               h = g;
-               g = f;
-               f = e;
-               e = d + T1;
-               d = c;
-               c = b;
-               b = a;
-               a = T1 + T2;
-
-               j++;
-       } while (j < 16);
-
-       do {
-               /* Part of the message block expansion: */
-               s0 = W256[(j+1)&0x0f];
-               s0 = sigma0_256(s0);
-               s1 = W256[(j+14)&0x0f]; 
-               s1 = sigma1_256(s1);
-
-               /* Apply the SHA-256 compression function to update a..h */
-               T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + 
-                    (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
-               T2 = Sigma0_256(a) + Maj(a, b, c);
-               h = g;
-               g = f;
-               f = e;
-               e = d + T1;
-               d = c;
-               c = b;
-               b = a;
-               a = T1 + T2;
-
-               j++;
-       } while (j < 64);
-
-       /* Compute the current intermediate hash value */
-       context->state[0] += a;
-       context->state[1] += b;
-       context->state[2] += c;
-       context->state[3] += d;
-       context->state[4] += e;
-       context->state[5] += f;
-       context->state[6] += g;
-       context->state[7] += h;
-
-       /* Clean up */
-       a = b = c = d = e = f = g = h = T1 = T2 = 0;
-}
-
-#endif /* SHA2_UNROLL_TRANSFORM */
-
-void dtls_sha256_update(dtls_sha256_ctx* context, const sha2_byte *data, size_t len) {
-       unsigned int    freespace, usedspace;
-
-       if (len == 0) {
-               /* Calling with no data is valid - we do nothing */
-               return;
-       }
-
-       /* Sanity check: */
-       assert(context != (dtls_sha256_ctx*)0 && data != (sha2_byte*)0);
-
-       usedspace = (context->bitcount >> 3) % DTLS_SHA256_BLOCK_LENGTH;
-       if (usedspace > 0) {
-               /* Calculate how much free space is available in the buffer */
-               freespace = DTLS_SHA256_BLOCK_LENGTH - usedspace;
-
-               if (len >= freespace) {
-                       /* Fill the buffer completely and process it */
-                       MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
-                       context->bitcount += freespace << 3;
-                       len -= freespace;
-                       data += freespace;
-                       dtls_sha256_transform(context, (sha2_word32*)context->buffer);
-               } else {
-                       /* The buffer is not yet full */
-                       MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
-                       context->bitcount += len << 3;
-                       /* Clean up: */
-                       usedspace = freespace = 0;
-                       return;
-               }
-       }
-       while (len >= DTLS_SHA256_BLOCK_LENGTH) {
-               /* Process as many complete blocks as we can */
-               dtls_sha256_transform(context, (sha2_word32*)data);
-               context->bitcount += DTLS_SHA256_BLOCK_LENGTH << 3;
-               len -= DTLS_SHA256_BLOCK_LENGTH;
-               data += DTLS_SHA256_BLOCK_LENGTH;
-       }
-       if (len > 0) {
-               /* There's left-overs, so save 'em */
-               MEMCPY_BCOPY(context->buffer, data, len);
-               context->bitcount += len << 3;
-       }
-       /* Clean up: */
-       usedspace = freespace = 0;
-}
-
-void dtls_sha256_final(sha2_byte digest[], dtls_sha256_ctx* context) {
-       sha2_word32     *d = (sha2_word32*)digest;
-       unsigned int    usedspace;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha256_ctx*)0);
-
-       /* If no digest buffer is passed, we don't bother doing this: */
-       if (digest != (sha2_byte*)0) {
-               usedspace = (context->bitcount >> 3) % DTLS_SHA256_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
-               /* Convert FROM host byte order */
-               REVERSE64(context->bitcount,context->bitcount);
-#endif
-               if (usedspace > 0) {
-                       /* Begin padding with a 1 bit: */
-                       context->buffer[usedspace++] = 0x80;
-
-                       if (usedspace <= DTLS_SHA256_SHORT_BLOCK_LENGTH) {
-                               /* Set-up for the last transform: */
-                               MEMSET_BZERO(&context->buffer[usedspace], DTLS_SHA256_SHORT_BLOCK_LENGTH - usedspace);
-                       } else {
-                               if (usedspace < DTLS_SHA256_BLOCK_LENGTH) {
-                                       MEMSET_BZERO(&context->buffer[usedspace], DTLS_SHA256_BLOCK_LENGTH - usedspace);
-                               }
-                               /* Do second-to-last transform: */
-                               dtls_sha256_transform(context, (sha2_word32*)context->buffer);
-
-                               /* And set-up for the last transform: */
-                               MEMSET_BZERO(context->buffer, DTLS_SHA256_SHORT_BLOCK_LENGTH);
-                       }
-               } else {
-                       /* Set-up for the last transform: */
-                       MEMSET_BZERO(context->buffer, DTLS_SHA256_SHORT_BLOCK_LENGTH);
-
-                       /* Begin padding with a 1 bit: */
-                       *context->buffer = 0x80;
-               }
-               /* Set the bit count: */
-               *(sha2_word64*)&context->buffer[DTLS_SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
-
-               /* Final transform: */
-               dtls_sha256_transform(context, (sha2_word32*)context->buffer);
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-               {
-                       /* Convert TO host byte order */
-                       int     j;
-                       for (j = 0; j < 8; j++) {
-                               REVERSE32(context->state[j],context->state[j]);
-                               *d++ = context->state[j];
-                       }
-               }
-#else
-               MEMCPY_BCOPY(d, context->state, DTLS_SHA256_DIGEST_LENGTH);
-#endif
-       }
-
-       /* Clean up state data: */
-       MEMSET_BZERO(context, sizeof(*context));
-       usedspace = 0;
-}
-
-char *dtls_sha256_end(dtls_sha256_ctx* context, char buffer[]) {
-       sha2_byte       digest[DTLS_SHA256_DIGEST_LENGTH], *d = digest;
-       int             i;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha256_ctx*)0);
-
-       if (buffer != (char*)0) {
-               dtls_sha256_final(digest, context);
-
-               for (i = 0; i < DTLS_SHA256_DIGEST_LENGTH; i++) {
-                       *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
-                       *buffer++ = sha2_hex_digits[*d & 0x0f];
-                       d++;
-               }
-               *buffer = (char)0;
-       } else {
-               MEMSET_BZERO(context, sizeof(*context));
-       }
-       MEMSET_BZERO(digest, DTLS_SHA256_DIGEST_LENGTH);
-       return buffer;
-}
-
-char* dtls_sha256_data(const sha2_byte* data, size_t len, char digest[DTLS_SHA256_DIGEST_STRING_LENGTH]) {
-       dtls_sha256_ctx context;
-
-       dtls_sha256_init(&context);
-       dtls_sha256_update(&context, data, len);
-       return dtls_sha256_end(&context, digest);
-}
-#endif
-
-/*** SHA-512: *********************************************************/
-#ifdef WITH_SHA512
-void dtls_sha512_init(dtls_sha512_ctx* context) {
-       if (context == (dtls_sha512_ctx*)0) {
-               return;
-       }
-       MEMCPY_BCOPY(context->state, sha512_initial_hash_value, DTLS_SHA512_DIGEST_LENGTH);
-       MEMSET_BZERO(context->buffer, DTLS_SHA512_BLOCK_LENGTH);
-       context->bitcount[0] = context->bitcount[1] =  0;
-}
-
-#ifdef SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-512 round macros: */
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)      \
-       REVERSE64(*data++, W512[j]); \
-       T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
-             K512[j] + W512[j]; \
-       (d) += T1, \
-       (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
-       j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)      \
-       T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
-             K512[j] + (W512[j] = *data++); \
-       (d) += T1; \
-       (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
-       j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512(a,b,c,d,e,f,g,h)      \
-       s0 = W512[(j+1)&0x0f]; \
-       s0 = sigma0_512(s0); \
-       s1 = W512[(j+14)&0x0f]; \
-       s1 = sigma1_512(s1); \
-       T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
-             (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \
-       (d) += T1; \
-       (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
-       j++
-
-void dtls_sha512_transform(dtls_sha512_ctx* context, const sha2_word64* data) {
-       sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
-       sha2_word64     T1, *W512 = (sha2_word64*)context->buffer;
-       int             j;
-
-       /* Initialize registers with the prev. intermediate value */
-       a = context->state[0];
-       b = context->state[1];
-       c = context->state[2];
-       d = context->state[3];
-       e = context->state[4];
-       f = context->state[5];
-       g = context->state[6];
-       h = context->state[7];
-
-       j = 0;
-       do {
-               ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
-               ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
-               ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
-               ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
-               ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
-               ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
-               ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
-               ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
-       } while (j < 16);
-
-       /* Now for the remaining rounds up to 79: */
-       do {
-               ROUND512(a,b,c,d,e,f,g,h);
-               ROUND512(h,a,b,c,d,e,f,g);
-               ROUND512(g,h,a,b,c,d,e,f);
-               ROUND512(f,g,h,a,b,c,d,e);
-               ROUND512(e,f,g,h,a,b,c,d);
-               ROUND512(d,e,f,g,h,a,b,c);
-               ROUND512(c,d,e,f,g,h,a,b);
-               ROUND512(b,c,d,e,f,g,h,a);
-       } while (j < 80);
-
-       /* Compute the current intermediate hash value */
-       context->state[0] += a;
-       context->state[1] += b;
-       context->state[2] += c;
-       context->state[3] += d;
-       context->state[4] += e;
-       context->state[5] += f;
-       context->state[6] += g;
-       context->state[7] += h;
-
-       /* Clean up */
-       a = b = c = d = e = f = g = h = T1 = 0;
-}
-
-#else /* SHA2_UNROLL_TRANSFORM */
-
-void dtls_sha512_transform(dtls_sha512_ctx* context, const sha2_word64* data) {
-       sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
-       sha2_word64     T1, T2, *W512 = (sha2_word64*)context->buffer;
-       int             j;
-
-       /* Initialize registers with the prev. intermediate value */
-       a = context->state[0];
-       b = context->state[1];
-       c = context->state[2];
-       d = context->state[3];
-       e = context->state[4];
-       f = context->state[5];
-       g = context->state[6];
-       h = context->state[7];
-
-       j = 0;
-       do {
-#if BYTE_ORDER == LITTLE_ENDIAN
-               /* Convert TO host byte order */
-               REVERSE64(*data++, W512[j]);
-               /* Apply the SHA-512 compression function to update a..h */
-               T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-               /* Apply the SHA-512 compression function to update a..h with copy */
-               T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-               T2 = Sigma0_512(a) + Maj(a, b, c);
-               h = g;
-               g = f;
-               f = e;
-               e = d + T1;
-               d = c;
-               c = b;
-               b = a;
-               a = T1 + T2;
-
-               j++;
-       } while (j < 16);
-
-       do {
-               /* Part of the message block expansion: */
-               s0 = W512[(j+1)&0x0f];
-               s0 = sigma0_512(s0);
-               s1 = W512[(j+14)&0x0f];
-               s1 =  sigma1_512(s1);
-
-               /* Apply the SHA-512 compression function to update a..h */
-               T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
-                    (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
-               T2 = Sigma0_512(a) + Maj(a, b, c);
-               h = g;
-               g = f;
-               f = e;
-               e = d + T1;
-               d = c;
-               c = b;
-               b = a;
-               a = T1 + T2;
-
-               j++;
-       } while (j < 80);
-
-       /* Compute the current intermediate hash value */
-       context->state[0] += a;
-       context->state[1] += b;
-       context->state[2] += c;
-       context->state[3] += d;
-       context->state[4] += e;
-       context->state[5] += f;
-       context->state[6] += g;
-       context->state[7] += h;
-
-       /* Clean up */
-       a = b = c = d = e = f = g = h = T1 = T2 = 0;
-}
-
-#endif /* SHA2_UNROLL_TRANSFORM */
-
-void dtls_sha512_update(dtls_sha512_ctx* context, const sha2_byte *data, size_t len) {
-       unsigned int    freespace, usedspace;
-
-       if (len == 0) {
-               /* Calling with no data is valid - we do nothing */
-               return;
-       }
-
-       /* Sanity check: */
-       assert(context != (dtls_sha512_ctx*)0 && data != (sha2_byte*)0);
-
-       usedspace = (context->bitcount[0] >> 3) % DTLS_SHA512_BLOCK_LENGTH;
-       if (usedspace > 0) {
-               /* Calculate how much free space is available in the buffer */
-               freespace = DTLS_SHA512_BLOCK_LENGTH - usedspace;
-
-               if (len >= freespace) {
-                       /* Fill the buffer completely and process it */
-                       MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
-                       ADDINC128(context->bitcount, freespace << 3);
-                       len -= freespace;
-                       data += freespace;
-                       dtls_sha512_transform(context, (sha2_word64*)context->buffer);
-               } else {
-                       /* The buffer is not yet full */
-                       MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
-                       ADDINC128(context->bitcount, len << 3);
-                       /* Clean up: */
-                       usedspace = freespace = 0;
-                       return;
-               }
-       }
-       while (len >= DTLS_SHA512_BLOCK_LENGTH) {
-               /* Process as many complete blocks as we can */
-               dtls_sha512_transform(context, (sha2_word64*)data);
-               ADDINC128(context->bitcount, DTLS_SHA512_BLOCK_LENGTH << 3);
-               len -= DTLS_SHA512_BLOCK_LENGTH;
-               data += DTLS_SHA512_BLOCK_LENGTH;
-       }
-       if (len > 0) {
-               /* There's left-overs, so save 'em */
-               MEMCPY_BCOPY(context->buffer, data, len);
-               ADDINC128(context->bitcount, len << 3);
-       }
-       /* Clean up: */
-       usedspace = freespace = 0;
-}
-
-void dtls_sha512_last(dtls_sha512_ctx* context) {
-       unsigned int    usedspace;
-
-       usedspace = (context->bitcount[0] >> 3) % DTLS_SHA512_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
-       /* Convert FROM host byte order */
-       REVERSE64(context->bitcount[0],context->bitcount[0]);
-       REVERSE64(context->bitcount[1],context->bitcount[1]);
-#endif
-       if (usedspace > 0) {
-               /* Begin padding with a 1 bit: */
-               context->buffer[usedspace++] = 0x80;
-
-               if (usedspace <= DTLS_SHA512_SHORT_BLOCK_LENGTH) {
-                       /* Set-up for the last transform: */
-                       MEMSET_BZERO(&context->buffer[usedspace], DTLS_SHA512_SHORT_BLOCK_LENGTH - usedspace);
-               } else {
-                       if (usedspace < DTLS_SHA512_BLOCK_LENGTH) {
-                               MEMSET_BZERO(&context->buffer[usedspace], DTLS_SHA512_BLOCK_LENGTH - usedspace);
-                       }
-                       /* Do second-to-last transform: */
-                       dtls_sha512_transform(context, (sha2_word64*)context->buffer);
-
-                       /* And set-up for the last transform: */
-                       MEMSET_BZERO(context->buffer, DTLS_SHA512_BLOCK_LENGTH - 2);
-               }
-       } else {
-               /* Prepare for final transform: */
-               MEMSET_BZERO(context->buffer, DTLS_SHA512_SHORT_BLOCK_LENGTH);
-
-               /* Begin padding with a 1 bit: */
-               *context->buffer = 0x80;
-       }
-       /* Store the length of input data (in bits): */
-       *(sha2_word64*)&context->buffer[DTLS_SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
-       *(sha2_word64*)&context->buffer[DTLS_SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
-
-       /* Final transform: */
-       dtls_sha512_transform(context, (sha2_word64*)context->buffer);
-}
-
-void dtls_sha512_final(sha2_byte digest[], dtls_sha512_ctx* context) {
-       sha2_word64     *d = (sha2_word64*)digest;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha512_ctx*)0);
-
-       /* If no digest buffer is passed, we don't bother doing this: */
-       if (digest != (sha2_byte*)0) {
-               dtls_sha512_last(context);
-
-               /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
-               {
-                       /* Convert TO host byte order */
-                       int     j;
-                       for (j = 0; j < 8; j++) {
-                               REVERSE64(context->state[j],context->state[j]);
-                               *d++ = context->state[j];
-                       }
-               }
-#else
-               MEMCPY_BCOPY(d, context->state, DTLS_SHA512_DIGEST_LENGTH);
-#endif
-       }
-
-       /* Zero out state data */
-       MEMSET_BZERO(context, sizeof(context));
-}
-
-char *dtls_sha512_end(dtls_sha512_ctx* context, char buffer[]) {
-       sha2_byte       digest[DTLS_SHA512_DIGEST_LENGTH], *d = digest;
-       int             i;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha512_ctx*)0);
-
-       if (buffer != (char*)0) {
-               dtls_sha512_final(digest, context);
-
-               for (i = 0; i < DTLS_SHA512_DIGEST_LENGTH; i++) {
-                       *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
-                       *buffer++ = sha2_hex_digits[*d & 0x0f];
-                       d++;
-               }
-               *buffer = (char)0;
-       } else {
-               MEMSET_BZERO(context, sizeof(context));
-       }
-       MEMSET_BZERO(digest, DTLS_SHA512_DIGEST_LENGTH);
-       return buffer;
-}
-
-char* dtls_sha512_data(const sha2_byte* data, size_t len, char digest[DTLS_SHA512_DIGEST_STRING_LENGTH]) {
-       dtls_sha512_ctx context;
-
-       dtls_sha512_init(&context);
-       dtls_sha512_update(&context, data, len);
-       return dtls_sha512_end(&context, digest);
-}
-#endif
-
-/*** SHA-384: *********************************************************/
-#ifdef WITH_SHA384
-void dtls_sha384_init(dtls_sha384_ctx* context) {
-       if (context == (dtls_sha384_ctx*)0) {
-               return;
-       }
-       MEMCPY_BCOPY(context->state, sha384_initial_hash_value, DTLS_SHA512_DIGEST_LENGTH);
-       MEMSET_BZERO(context->buffer, DTLS_SHA384_BLOCK_LENGTH);
-       context->bitcount[0] = context->bitcount[1] = 0;
-}
-
-void dtls_sha384_update(dtls_sha384_ctx* context, const sha2_byte* data, size_t len) {
-       dtls_sha512_update((dtls_sha512_ctx*)context, data, len);
-}
-
-void dtls_sha384_final(sha2_byte digest[], dtls_sha384_ctx* context) {
-       sha2_word64     *d = (sha2_word64*)digest;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha384_ctx*)0);
-
-       /* If no digest buffer is passed, we don't bother doing this: */
-       if (digest != (sha2_byte*)0) {
-               dtls_sha512_last((dtls_sha512_ctx*)context);
-
-               /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
-               {
-                       /* Convert TO host byte order */
-                       int     j;
-                       for (j = 0; j < 6; j++) {
-                               REVERSE64(context->state[j],context->state[j]);
-                               *d++ = context->state[j];
-                       }
-               }
-#else
-               MEMCPY_BCOPY(d, context->state, DTLS_SHA384_DIGEST_LENGTH);
-#endif
-       }
-
-       /* Zero out state data */
-       MEMSET_BZERO(context, sizeof(context));
-}
-
-char *dtls_sha384_end(dtls_sha384_ctx* context, char buffer[]) {
-       sha2_byte       digest[DTLS_SHA384_DIGEST_LENGTH], *d = digest;
-       int             i;
-
-       /* Sanity check: */
-       assert(context != (dtls_sha384_ctx*)0);
-
-       if (buffer != (char*)0) {
-               dtls_sha384_final(digest, context);
-
-               for (i = 0; i < DTLS_SHA384_DIGEST_LENGTH; i++) {
-                       *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
-                       *buffer++ = sha2_hex_digits[*d & 0x0f];
-                       d++;
-               }
-               *buffer = (char)0;
-       } else {
-               MEMSET_BZERO(context, sizeof(context));
-       }
-       MEMSET_BZERO(digest, DTLS_SHA384_DIGEST_LENGTH);
-       return buffer;
-}
-
-char* dtls_sha384_data(const sha2_byte* data, size_t len, char digest[DTLS_SHA384_DIGEST_STRING_LENGTH]) {
-       dtls_sha384_ctx context;
-
-       dtls_sha384_init(&context);
-       dtls_sha384_update(&context, data, len);
-       return dtls_sha384_end(&context, digest);
-}
-#endif
diff --git a/extlibs/tinydtls/sha2/sha2.h b/extlibs/tinydtls/sha2/sha2.h
deleted file mode 100644 (file)
index c56b42a..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * FILE:       sha2.h
- * AUTHOR:     Aaron D. Gifford - http://www.aarongifford.com/
- * 
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
- */
-
-#ifndef __SHA2_H__
-#define __SHA2_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
- * Import u_intXX_t size_t type definitions from system headers.  You
- * may need to change this, or define these things yourself in this
- * file.
- */
-#include <sys/types.h>
-
-#ifdef SHA2_USE_INTTYPES_H
-
-#include <inttypes.h>
-
-#endif /* SHA2_USE_INTTYPES_H */
-
-
-/*** SHA-256/384/512 Various Length Definitions ***********************/
-#define DTLS_SHA256_BLOCK_LENGTH               64
-#define DTLS_SHA256_DIGEST_LENGTH              32
-#define DTLS_SHA256_DIGEST_STRING_LENGTH       (DTLS_SHA256_DIGEST_LENGTH * 2 + 1)
-#define DTLS_SHA384_BLOCK_LENGTH               128
-#define DTLS_SHA384_DIGEST_LENGTH              48
-#define DTLS_SHA384_DIGEST_STRING_LENGTH       (DTLS_SHA384_DIGEST_LENGTH * 2 + 1)
-#define DTLS_SHA512_BLOCK_LENGTH               128
-#define DTLS_SHA512_DIGEST_LENGTH              64
-#define DTLS_SHA512_DIGEST_STRING_LENGTH       (DTLS_SHA512_DIGEST_LENGTH * 2 + 1)
-
-
-/*** SHA-256/384/512 Context Structures *******************************/
-/* NOTE: If your architecture does not define either u_intXX_t types or
- * uintXX_t (from inttypes.h), you may need to define things by hand
- * for your system:
- */
-#if 0
-typedef unsigned char u_int8_t;                /* 1-byte  (8-bits)  */
-typedef unsigned int u_int32_t;                /* 4-bytes (32-bits) */
-typedef unsigned long long u_int64_t;  /* 8-bytes (64-bits) */
-#endif
-/*
- * Most BSD systems already define u_intXX_t types, as does Linux.
- * Some systems, however, like Compaq's Tru64 Unix instead can use
- * uintXX_t types defined by very recent ANSI C standards and included
- * in the file:
- *
- *   #include <inttypes.h>
- *
- * If you choose to use <inttypes.h> then please define: 
- *
- *   #define SHA2_USE_INTTYPES_H
- *
- * Or on the command line during compile:
- *
- *   cc -DSHA2_USE_INTTYPES_H ...
- */
-#ifdef SHA2_USE_INTTYPES_H
-
-typedef struct _dtls_sha256_ctx {
-       uint32_t        state[8];
-       uint64_t        bitcount;
-       uint8_t buffer[DTLS_SHA256_BLOCK_LENGTH];
-} dtls_sha256_ctx;
-typedef struct _dtls_sha512_ctx {
-       uint64_t        state[8];
-       uint64_t        bitcount[2];
-       uint8_t buffer[DTLS_SHA512_BLOCK_LENGTH];
-} dtls_sha512_ctx;
-
-#else /* SHA2_USE_INTTYPES_H */
-
-typedef struct _dtls_sha256_ctx {
-       u_int32_t       state[8];
-       u_int64_t       bitcount;
-       u_int8_t        buffer[DTLS_SHA256_BLOCK_LENGTH];
-} dtls_sha256_ctx;
-typedef struct _dtls_sha512_ctx {
-       u_int64_t       state[8];
-       u_int64_t       bitcount[2];
-       u_int8_t        buffer[DTLS_SHA512_BLOCK_LENGTH];
-} dtls_sha512_ctx;
-
-#endif /* SHA2_USE_INTTYPES_H */
-
-typedef dtls_sha512_ctx dtls_sha384_ctx;
-
-
-/*** SHA-256/384/512 Function Prototypes ******************************/
-#ifndef NOPROTO
-#ifdef SHA2_USE_INTTYPES_H
-
-#ifdef WITH_SHA256
-void dtls_sha256_init(dtls_sha256_ctx *);
-void dtls_sha256_update(dtls_sha256_ctx*, const uint8_t*, size_t);
-void dtls_sha256_final(uint8_t[DTLS_SHA256_DIGEST_LENGTH], dtls_sha256_ctx*);
-char* dtls_sha256_end(dtls_sha256_ctx*, char[DTLS_SHA256_DIGEST_STRING_LENGTH]);
-char* dtls_sha256_data(const uint8_t*, size_t, char[DTLS_SHA256_DIGEST_STRING_LENGTH]);
-#endif
-
-#ifdef WITH_SHA384
-void dtls_sha384_init(dtls_sha384_ctx*);
-void dtls_sha384_update(dtls_sha384_ctx*, const uint8_t*, size_t);
-void dtls_sha384_final(uint8_t[DTLS_SHA384_DIGEST_LENGTH], SHA384_CTX*);
-char* dtls_sha384_end(dtls_sha384_ctx*, char[DTLS_SHA384_DIGEST_STRING_LENGTH]);
-char* dtls_sha384_data(const uint8_t*, size_t, char[DTLS_SHA384_DIGEST_STRING_LENGTH]);
-#endif
-
-#ifdef WITH_SHA512
-void dtls_sha512_init(dtls_sha512_ctx*);
-void dtls_sha512_update(dtls_sha512_ctx*, const uint8_t*, size_t);
-void dtls_sha512_final(uint8_t[DTLS_SHA512_DIGEST_LENGTH], dtls_sha512_ctx*);
-char* dtls_sha512_end(dtls_sha512_ctx*, char[DTLS_SHA512_DIGEST_STRING_LENGTH]);
-char* dtls_sha512_data(const uint8_t*, size_t, char[DTLS_SHA512_DIGEST_STRING_LENGTH]);
-#endif
-
-#else /* SHA2_USE_INTTYPES_H */
-
-#ifdef WITH_SHA256
-void dtls_sha256_init(dtls_sha256_ctx *);
-void dtls_sha256_update(dtls_sha256_ctx*, const u_int8_t*, size_t);
-void dtls_sha256_final(u_int8_t[DTLS_SHA256_DIGEST_LENGTH], dtls_sha256_ctx*);
-char* dtls_sha256_end(dtls_sha256_ctx*, char[DTLS_SHA256_DIGEST_STRING_LENGTH]);
-char* dtls_sha256_data(const u_int8_t*, size_t, char[DTLS_SHA256_DIGEST_STRING_LENGTH]);
-#endif
-
-#ifdef WITH_SHA384
-void dtls_sha384_init(dtls_sha384_ctx*);
-void dtls_sha384_update(dtls_sha384_ctx*, const u_int8_t*, size_t);
-void dtls_sha384_final(u_int8_t[DTLS_SHA384_DIGEST_LENGTH], dtls_sha384_ctx*);
-char* dtls_sha384_end(dtls_sha384_ctx*, char[DTLS_SHA384_DIGEST_STRING_LENGTH]);
-char* dtls_sha384_data(const u_int8_t*, size_t, char[DTLS_SHA384_DIGEST_STRING_LENGTH]);
-#endif
-
-#ifdef WITH_SHA512
-void dtls_sha512_init(dtls_sha512_ctx*);
-void dtls_sha512_update(dtls_sha512_ctx*, const u_int8_t*, size_t);
-void dtls_sha512_final(u_int8_t[DTLS_SHA512_DIGEST_LENGTH], dtls_sha512_ctx*);
-char* dtls_sha512_end(dtls_sha512_ctx*, char[DTLS_SHA512_DIGEST_STRING_LENGTH]);
-char* dtls_sha512_data(const u_int8_t*, size_t, char[DTLS_SHA512_DIGEST_STRING_LENGTH]);
-#endif
-
-#endif /* SHA2_USE_INTTYPES_H */
-
-#else /* NOPROTO */
-
-#ifdef WITH_SHA256
-void dtls_sha256_init();
-void dtls_sha256_update();
-void dtls_sha256_final();
-char* dtls_sha256_end();
-char* dtls_sha256_data();
-#endif
-
-#ifdef WITH_SHA384
-void dtls_sha384_init();
-void dtls_sha384_update();
-void dtls_sha384_final();
-char* dtls_sha384_end();
-char* dtls_sha384_data();
-#endif
-
-#ifdef WITH_SHA512
-void dtls_sha512_init();
-void dtls_sha512_update();
-void dtls_sha512_final();
-char* dtls_sha512_end();
-char* dtls_sha512_data();
-#endif
-
-#endif /* NOPROTO */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __SHA2_H__ */
-
diff --git a/extlibs/tinydtls/sha2/sha2prog.c b/extlibs/tinydtls/sha2/sha2prog.c
deleted file mode 100644 (file)
index 6ac6796..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * FILE:       sha2prog.c
- * AUTHOR:     Aaron D. Gifford - http://www.aarongifford.com/
- * 
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: sha2prog.c,v 1.1 2001/11/08 00:02:11 adg Exp adg $
- */
-
-#include <stdio.h>
-#include <sysexits.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-
-#include "sha2.h"
-
-void usage(char *prog, char *msg) {
-       fprintf(stderr, "%s\nUsage:\t%s [options] [<file>]\nOptions:\n\t-256\tGenerate SHA-256 hash\n\t-384\tGenerate SHA-284 hash\n\t-512\tGenerate SHA-512 hash\n\t-ALL\tGenerate all three hashes\n\t-q\tQuiet mode - only output hexadecimal hashes, one per line\n\n", msg, prog);
-       exit(-1);
-}
-
-#define BUFLEN 16384
-
-int main(int argc, char **argv) {
-       int             kl, l, fd, ac;
-       int             quiet = 0, hash = 0;
-       char            *av, *file = (char*)0;
-       FILE            *IN = (FILE*)0;
-       dtls_sha256_ctx ctx256;
-       dtls_sha384_ctx ctx384;
-       dtls_sha512_ctx ctx512;
-       unsigned char   buf[BUFLEN];
-
-       dtls_sha256_init(&ctx256);
-       dtls_sha384_init(&ctx384);
-       dtls_sha512_init(&ctx512);
-
-       /* Read data from STDIN by default */
-       fd = fileno(stdin);
-
-       ac = 1;
-       while (ac < argc) {
-               if (*argv[ac] == '-') {
-                       av = argv[ac] + 1;
-                       if (!strcmp(av, "q")) {
-                               quiet = 1;
-                       } else if (!strcmp(av, "256")) {
-                               hash |= 1;
-                       } else if (!strcmp(av, "384")) {
-                               hash |= 2;
-                       } else if (!strcmp(av, "512")) {
-                               hash |= 4;
-                       } else if (!strcmp(av, "ALL")) {
-                               hash = 7;
-                       } else {
-                               usage(argv[0], "Invalid option.");
-                       }
-                       ac++;
-               } else {
-                       file = argv[ac++];
-                       if (ac != argc) {
-                               usage(argv[0], "Too many arguments.");
-                       }
-                       if ((IN = fopen(file, "r")) == NULL) {
-                               perror(argv[0]);
-                               exit(-1);
-                       }
-                       fd = fileno(IN);
-               }
-       }
-       if (hash == 0)
-               hash = 7;       /* Default to ALL */
-
-       kl = 0;
-       while ((l = read(fd,buf,BUFLEN)) > 0) {
-               kl += l;
-               dtls_sha256_update(&ctx256, (unsigned char*)buf, l);
-               dtls_sha384_update(&ctx384, (unsigned char*)buf, l);
-               dtls_sha512_update(&ctx512, (unsigned char*)buf, l);
-       }
-       if (file) {
-               fclose(IN);
-       }
-
-       if (hash & 1) {
-               dtls_sha256_end(&ctx256, buf);
-               if (!quiet)
-                       printf("SHA-256 (%s) = ", file);
-               printf("%s\n", buf);
-       }
-       if (hash & 2) {
-               dtls_sha384_end(&ctx384, buf);
-               if (!quiet)
-                       printf("SHA-384 (%s) = ", file);
-               printf("%s\n", buf);
-       }
-       if (hash & 4) {
-               dtls_sha512_end(&ctx512, buf);
-               if (!quiet)
-                       printf("SHA-512 (%s) = ", file);
-               printf("%s\n", buf);
-       }
-
-       return 1;
-}
-
diff --git a/extlibs/tinydtls/sha2/sha2speed.c b/extlibs/tinydtls/sha2/sha2speed.c
deleted file mode 100644 (file)
index 77d17af..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * FILE:       sha2speed.c
- * AUTHOR:     Aaron D. Gifford - http://www.aarongifford.com/
- * 
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: sha2speed.c,v 1.1 2001/11/08 00:02:23 adg Exp adg $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-
-#include "sha2.h"
-
-#define BUFSIZE        16384
-
-void usage(char *prog) {
-       fprintf(stderr, "Usage:\t%s [<num-of-bytes>] [<num-of-loops>] [<fill-byte>]\n", prog);
-       exit(-1);
-}
-
-void printspeed(char *caption, unsigned long bytes, double time) {
-       if (bytes / 1073741824UL > 0) {
-                printf("%s %.4f sec (%.3f GBps)\n", caption, time, (double)bytes/1073741824UL/time);
-        } else if (bytes / 1048576 > 0) {
-                printf("%s %.4f (%.3f MBps)\n", caption, time, (double)bytes/1048576/time);
-        } else if (bytes / 1024 > 0) {
-                printf("%s %.4f (%.3f KBps)\n", caption, time, (double)bytes/1024/time);
-        } else {
-               printf("%s %.4f (%f Bps)\n", caption, time, (double)bytes/time);
-       }
-}
-
-
-int main(int argc, char **argv) {
-       dtls_sha256_ctx c256;
-       dtls_sha384_ctx c384;
-       dtls_sha512_ctx c512;
-       char            buf[BUFSIZE];
-       char            md[DTLS_SHA512_DIGEST_STRING_LENGTH];
-       int             bytes, blocks, rep, i, j;
-       struct timeval  start, end;
-       double          t, ave256, ave384, ave512;
-       double          best256, best384, best512;
-
-       if (argc > 4) {
-               usage(argv[0]);
-       }
-
-       /* Default to 1024 16K blocks (16 MB) */
-       bytes = 1024 * 1024 * 16;
-       if (argc > 1) {
-               blocks = atoi(argv[1]);
-       }
-       blocks = bytes / BUFSIZE;
-
-       /* Default to 10 repetitions */
-       rep = 10;
-       if (argc > 2) {
-               rep = atoi(argv[2]);
-       }
-
-       /* Set up the input data */
-       if (argc > 3) {
-               memset(buf, atoi(argv[2]), BUFSIZE);
-       } else {
-               memset(buf, 0xb7, BUFSIZE);
-       }
-
-       ave256 = ave384 = ave512 = 0;
-       best256 = best384 = best512 = 100000;
-       for (i = 0; i < rep; i++) {
-               dtls_sha256_init(&c256);
-               dtls_sha384_init(&c384);
-               dtls_sha512_init(&c512);
-       
-               gettimeofday(&start, (struct timezone*)0);
-               for (j = 0; j < blocks; j++) {
-                       dtls_sha256_update(&c256, (unsigned char*)buf, BUFSIZE);
-               }
-               if (bytes % BUFSIZE) {
-                       dtls_sha256_update(&c256, (unsigned char*)buf, bytes % BUFSIZE);
-               }
-               dtls_sha256_end(&c256, md);
-               gettimeofday(&end, (struct timezone*)0);
-               t = ((end.tv_sec - start.tv_sec) * 1000000.0 + (end.tv_usec - start.tv_usec)) / 1000000.0;
-               ave256 += t;
-               if (t < best256) {
-                       best256 = t;
-               }
-               printf("SHA-256[%d] (%.4f/%.4f/%.4f seconds) = 0x%s\n", i+1, t, ave256/(i+1), best256, md);
-
-               gettimeofday(&start, (struct timezone*)0);
-               for (j = 0; j < blocks; j++) {
-                       dtls_sha384_update(&c384, (unsigned char*)buf, BUFSIZE);
-               }
-               if (bytes % BUFSIZE) {
-                       dtls_sha384_update(&c384, (unsigned char*)buf, bytes % BUFSIZE);
-               }
-               dtls_sha384_end(&c384, md);
-               gettimeofday(&end, (struct timezone*)0);
-               t = ((end.tv_sec - start.tv_sec) * 1000000.0 + (end.tv_usec - start.tv_usec)) / 1000000.0;
-               ave384 += t;
-               if (t < best384) {
-                       best384 = t;
-               }
-               printf("SHA-384[%d] (%.4f/%.4f/%.4f seconds) = 0x%s\n", i+1, t, ave384/(i+1), best384, md);
-
-               gettimeofday(&start, (struct timezone*)0);
-               for (j = 0; j < blocks; j++) {
-                       dtls_sha512_update(&c512, (unsigned char*)buf, BUFSIZE);
-               }
-               if (bytes % BUFSIZE) {
-                       dtls_sha512_update(&c512, (unsigned char*)buf, bytes % BUFSIZE);
-               }
-               dtls_sha512_end(&c512, md);
-               gettimeofday(&end, (struct timezone*)0);
-               t = ((end.tv_sec - start.tv_sec) * 1000000.0 + (end.tv_usec - start.tv_usec)) / 1000000.0;
-               ave512 += t;
-               if (t < best512) {
-                       best512 = t;
-               }
-               printf("SHA-512[%d] (%.4f/%.4f/%.4f seconds) = 0x%s\n", i+1, t, ave512/(i+1), best512, md);
-       }
-       ave256 /= rep;
-       ave384 /= rep;
-       ave512 /= rep;
-       printf("\nTEST RESULTS SUMMARY:\nTEST REPETITIONS: %d\n", rep);
-       if (bytes / 1073741824UL > 0) {
-               printf("TEST SET SIZE: %.3f GB\n", (double)bytes/1073741824UL);
-       } else if (bytes / 1048576 > 0) {
-               printf("TEST SET SIZE: %.3f MB\n", (double)bytes/1048576);
-       } else if (bytes /1024 > 0) {
-               printf("TEST SET SIZE: %.3f KB\n", (double)bytes/1024);
-       } else {
-               printf("TEST SET SIZE: %d B\n", bytes);
-       }
-       printspeed("SHA-256 average:", bytes, ave256);
-       printspeed("SHA-256 best:   ", bytes, best256);
-       printspeed("SHA-384 average:", bytes, ave384);
-       printspeed("SHA-384 best:   ", bytes, best384);
-       printspeed("SHA-512 average:", bytes, ave512);
-       printspeed("SHA-512 best:   ", bytes, best512);
-
-       return 1;
-}
-
diff --git a/extlibs/tinydtls/sha2/sha2test.pl b/extlibs/tinydtls/sha2/sha2test.pl
deleted file mode 100755 (executable)
index dc884d8..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-#!/usr/bin/perl
-#
-# FILE:                sha2test.pl
-# AUTHOR:      Aaron D. Gifford - http://www.aarongifford.com/
-# 
-# Copyright (c) 2001, Aaron D. Gifford
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of the copyright holder nor the names of contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $Id: sha2test.pl,v 1.1 2001/11/08 00:02:37 adg Exp adg $
-#
-
-sub usage {
-       my ($err) = shift(@_);
-
-       print <<EOM;
-Error:
-       $err
-Usage:
-       $0 [<options>] [<test-vector-info-file> [<test-vector-info-file> ...]]
-
-Options:
-       -256    Use SHA-256 hashes during testing
-       -384    Use SHA-384 hashes during testing
-       -512    Use SHA-512 hashes during testing
-       -ALL    Use all three hashes during testing
-       -c256 <command-spec>    Specify a command to execute to generate a
-                               SHA-256 hash.  Be sure to include a '%'
-                               character which will be replaced by the
-                               test vector data filename containing the
-                               data to be hashed.  This command implies
-                               the -256 option.
-       -c384 <command-spec>    Specify a command to execute to generate a
-                               SHA-384 hash.  See above.  Implies -384.
-       -c512 <command-spec>    Specify a command to execute to generate a
-                               SHA-512 hash.  See above.  Implies -512.
-       -cALL <command-spec>    Specify a command to execute that will
-                               generate all three hashes at once and output
-                               the data in hexadecimal.  See above for
-                               information about the <command-spec>.
-                               This option implies the -ALL option, and
-                               also overrides any other command options if
-                               present.
-
-By default, this program expects to execute the command ./sha2 within the
-current working directory to generate all hashes.  If no test vector
-information files are specified, this program expects to read a series of
-files ending in ".info" within a subdirectory of the current working
-directory called "testvectors".
-
-EOM
-       exit(-1);
-}
-
-$c256 = $c384 = $c512 = $cALL = "";
-$hashes = 0;
-@FILES = ();
-
-# Read all command-line options and files:
-while ($opt = shift(@ARGV)) {
-       if ($opt =~ s/^\-//) {
-               if ($opt eq "256") {
-                       $hashes |= 1;
-               } elsif ($opt eq "384") {
-                       $hashes |= 2;
-               } elsif ($opt eq "512") {
-                       $hashes |= 4;
-               } elsif ($opt =~ /^ALL$/i) {
-                       $hashes = 7;
-               } elsif ($opt =~ /^c256$/i) {
-                       $hashes |= 1;
-                       $opt = $c256 = shift(@ARGV);
-                       $opt =~ s/\s+.*$//;
-                       if (!$c256 || $c256 !~ /\%/ || !-x $opt) {
-                               usage("Missing or invalid command specification for option -c256: $opt\n");
-                       }
-               } elsif ($opt =~ /^c384$/i) {
-                       $hashes |= 2;
-                       $opt = $c384 = shift(@ARGV);
-                       $opt =~ s/\s+.*$//;
-                       if (!$c384 || $c384 !~ /\%/ || !-x $opt) {
-                               usage("Missing or invalid command specification for option -c384: $opt\n");
-                       }
-               } elsif ($opt =~ /^c512$/i) {
-                       $hashes |= 4;
-                       $opt = $c512 = shift(@ARGV);
-                       $opt =~ s/\s+.*$//;
-                       if (!$c512 || $c512 !~ /\%/ || !-x $opt) {
-                               usage("Missing or invalid command specification for option -c512: $opt\n");
-                       }
-               } elsif ($opt =~ /^cALL$/i) {
-                       $hashes = 7;
-                       $opt = $cALL = shift(@ARGV);
-                       $opt =~ s/\s+.*$//;
-                       if (!$cALL || $cALL !~ /\%/ || !-x $opt) {
-                               usage("Missing or invalid command specification for option -cALL: $opt\n");
-                       }
-               } else {
-                       usage("Unknown/invalid option '$opt'\n");
-               }
-       } else {
-               usage("Invalid, nonexistent, or unreadable file '$opt': $!\n") if (!-f $opt);
-               push(@FILES, $opt);
-       }
-}
-
-# Set up defaults:
-if (!$cALL && !$c256 && !$c384 && !$c512) {
-       $cALL = "./sha2 -ALL %";
-       usage("Required ./sha2 binary executable not found.\n") if (!-x "./sha2");
-}
-$hashes = 7 if (!$hashes);
-
-# Do some sanity checks:
-usage("No command was supplied to generate SHA-256 hashes.\n") if ($hashes & 1 == 1 && !$cALL && !$c256);
-usage("No command was supplied to generate SHA-384 hashes.\n") if ($hashes & 2 == 2 && !$cALL && !$c384);
-usage("No command was supplied to generate SHA-512 hashes.\n") if ($hashes & 4 == 4 && !$cALL && !$c512);
-
-# Default .info files:
-if (scalar(@FILES) < 1) {
-       opendir(DIR, "testvectors") || usage("Unable to scan directory 'testvectors' for vector information files: $!\n");
-       @FILES = grep(/\.info$/, readdir(DIR));
-       closedir(DIR);
-       @FILES = map { s/^/testvectors\//; $_; } @FILES;
-       @FILES = sort(@FILES);
-}
-
-# Now read in each test vector information file:
-foreach $file (@FILES) {
-       $dir = $file;
-       if ($file !~ /\//) {
-               $dir = "./";
-       } else {
-               $dir =~ s/\/[^\/]+$//;
-               $dir .= "/";
-       }
-       open(FILE, "<" . $file) ||
-               usage("Unable to open test vector information file '$file' for reading: $!\n");
-       $vec = { desc => "", file => "", sha256 => "", sha384 => "", sha512 => "" };
-       $data = $field = "";
-       $line = 0;
-       while(<FILE>) {
-               $line++;
-               s/\s*[\r\n]+$//;
-               next if ($field && $field ne "DESCRIPTION" && !$_);
-               if (/^(DESCRIPTION|FILE|SHA256|SHA384|SHA512):$/) {
-                       if ($field eq "DESCRIPTION") {
-                               $vec->{desc} = $data;
-                       } elsif ($field eq "FILE") {
-                               $data = $dir . $data if ($data !~ /^\//);
-                               $vec->{file} = $data;
-                       } elsif ($field eq "SHA256") {
-                               $vec->{sha256} = $data;
-                       } elsif ($field eq "SHA384") {
-                               $vec->{sha384} = $data;
-                       } elsif ($field eq "SHA512") {
-                               $vec->{sha512} = $data;
-                       }
-                       $data = "";
-                       $field = $1;
-               } elsif ($field eq "DESCRIPTION") {
-                       s/^    //;
-                       $data .= $_ . "\n";
-               } elsif ($field =~ /^SHA\d\d\d$/) {
-                       s/^\s+//;
-                       if (!/^([a-f0-9]{32}|[a-f0-9]{64})$/) {
-                               usage("Invalid SHA-256/384/512 test vector information " .
-                                     "file format at line $line of file '$file'\n");
-                       }
-                       $data .= $_;
-               } elsif ($field eq "FILE") {
-                       s/^    //;
-                       $data .= $_;
-               } else {
-                       usage("Invalid SHA-256/384/512 test vector information file " .
-                             "format at line $line of file '$file'\n");
-               }
-       }
-       if ($field eq "DESCRIPTION") {
-               $data = $dir . $data if ($data !~ /^\//);
-               $vec->{desc} = $data;
-       } elsif ($field eq "FILE") {
-               $vec->{file} = $data;
-       } elsif ($field eq "SHA256") {
-               $vec->{sha256} = $data;
-       } elsif ($field eq "SHA384") {
-               $vec->{sha384} = $data;
-       } elsif ($field eq "SHA512") {
-               $vec->{sha512} = $data;
-       } else {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  Missing required fields in file '$file'\n");
-       }
-
-       # Sanity check all entries:
-       if (!$vec->{desc}) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  Missing required DESCRIPTION field in file '$file'\n");
-       }
-       if (!$vec->{file}) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  Missing required FILE field in file '$file'\n");
-       }
-       if (! -f $vec->{file}) {
-               usage("The test vector data file (field FILE) name " .
-                     "'$vec->{file}' is not a readable file.  Check the FILE filed in " .
-                     "file '$file'.\n");
-       }
-       if (!($vec->{sha256} || $vec->{sha384} || $vec->{sha512})) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  There must be at least one SHA256, SHA384, or SHA512 " .
-                     "field specified in file '$file'.\n");
-       }
-       if ($vec->{sha256} !~ /^(|[a-f0-9]{64})$/) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  The SHA256 field is invalid in file '$file'.\n");
-       }
-       if ($vec->{sha384} !~ /^(|[a-f0-9]{96})$/) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  The SHA384 field is invalid in file '$file'.\n");
-       }
-       if ($vec->{sha512} !~ /^(|[a-f0-9]{128})$/) {
-               usage("Invalid SHA-256/384/512 test vector information file " .
-                     "format.  The SHA512 field is invalid in file '$file'.\n");
-       }
-       close(FILE);
-       if ($hashes & (($vec->{sha256} ? 1 : 0) | ($vec->{sha384} ? 2 : 0) | ($vec->{sha512} ? 4 : 0))) {
-               push(@VECTORS, $vec);
-       }
-}
-
-usage("There were no test vectors for the specified hash(es) in any of the test vector information files you specified.\n") if (scalar(@VECTORS) < 1);
-
-$num = $errors = $error256 = $error384 = $error512 = $tests = $test256 = $test384 = $test512 = 0;
-foreach $vec (@VECTORS) {
-       $num++;
-       print "TEST VECTOR #$num:\n";
-       print "\t" . join("\n\t", split(/\n/, $vec->{desc})) . "\n";
-       print "VECTOR DATA FILE:\n\t$vec->{file}\n";
-       $sha256 = $sha384 = $sha512 = "";
-       if ($cALL) {
-               $prog = $cALL;
-               $prog =~ s/\%/'$vec->{file}'/g;
-               @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`));
-               ($sha256) = grep(/(^[a-fA-F0-9]{64}$|^[a-fA-F0-9]{64}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{64}$|[^a-fA-F0-9][a-fA-F0-9]{64}[^a-fA-F0-9])/, @SHA);
-               ($sha384) = grep(/(^[a-fA-F0-9]{96}$|^[a-fA-F0-9]{96}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{96}$|[^a-fA-F0-9][a-fA-F0-9]{96}[^a-fA-F0-9])/, @SHA);
-               ($sha512) = grep(/(^[a-fA-F0-9]{128}$|^[a-fA-F0-9]{128}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{128}$|[^a-fA-F0-9][a-fA-F0-9]{128}[^a-fA-F0-9])/, @SHA);
-       } else {
-               if ($c256) {
-                       $prog = $c256;
-                       $prog =~ s/\%/'$vec->{file}'/g;
-                       @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`));
-                       ($sha256) = grep(/(^[a-fA-F0-9]{64}$|^[a-fA-F0-9]{64}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{64}$|[^a-fA-F0-9][a-fA-F0-9]{64}[^a-fA-F0-9])/, @SHA);
-               }
-               if ($c384) {
-                       $prog = $c384;
-                       $prog =~ s/\%/'$vec->{file}'/g;
-                       @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`));
-                       ($sha384) = grep(/(^[a-fA-F0-9]{96}$|^[a-fA-F0-9]{96}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{96}$|[^a-fA-F0-9][a-fA-F0-9]{96}[^a-fA-F0-9])/, @SHA);
-               }
-               if ($c512) {
-                       $prog = $c512;
-                       $prog =~ s/\%/'$vec->{file}'/g;
-                       @SHA = grep(/[a-fA-f0-9]{64,128}/, split(/\n/, `$prog`));
-                       ($sha512) = grep(/(^[a-fA-F0-9]{128}$|^[a-fA-F0-9]{128}[^a-fA-F0-9]|[^a-fA-F0-9][a-fA-F0-9]{128}$|[^a-fA-F0-9][a-fA-F0-9]{128}[^a-fA-F0-9])/, @SHA);
-               }
-       }
-       usage("Unable to generate any hashes for file '$vec->{file}'!\n") if (!$sha256 && !$sha384 && $sha512);
-       $sha256 =~ tr/A-F/a-f/;
-       $sha384 =~ tr/A-F/a-f/;
-       $sha512 =~ tr/A-F/a-f/;
-       $sha256 =~ s/^.*([a-f0-9]{64}).*$/$1/;
-       $sha384 =~ s/^.*([a-f0-9]{96}).*$/$1/;
-       $sha512 =~ s/^.*([a-f0-9]{128}).*$/$1/;
-
-       if ($sha256 && $hashes & 1 == 1) {
-               if ($vec->{sha256} eq $sha256) {
-                       print "SHA256 MATCHES:\n\t$sha256\n"
-               } else {
-                       print "SHA256 DOES NOT MATCH:\n\tEXPECTED:\n\t\t$vec->{sha256}\n" .
-                             "\tGOT:\n\t\t$sha256\n\n";
-                       $error256++;
-               }
-               $test256++;
-       }
-       if ($sha384 && $hashes & 2 == 2) {
-               if ($vec->{sha384} eq $sha384) {
-                       print "SHA384 MATCHES:\n\t" . substr($sha384, 0, 64) . "\n\t" .
-                             substr($sha384, -32) . "\n";
-               } else {
-                       print "SHA384 DOES NOT MATCH:\n\tEXPECTED:\n\t\t" .
-                             substr($vec->{sha384}, 0, 64) . "\n\t\t" .
-                             substr($vec->{sha384}, -32) . "\n\tGOT:\n\t\t" .
-                             substr($sha384, 0, 64) . "\n\t\t" . substr($sha384, -32) . "\n\n";
-                       $error384++;
-               }
-               $test384++;
-       }
-       if ($sha512 && $hashes & 4 == 4) {
-               if ($vec->{sha512} eq $sha512) {
-                       print "SHA512 MATCHES:\n\t" . substr($sha512, 0, 64) . "\n\t" .
-                             substr($sha512, -64) . "\n";
-               } else {
-                       print "SHA512 DOES NOT MATCH:\n\tEXPECTED:\n\t\t" .
-                             substr($vec->{sha512}, 0, 64) . "\n\t\t" .
-                             substr($vec->{sha512}, -32) . "\n\tGOT:\n\t\t" .
-                             substr($sha512, 0, 64) . "\n\t\t" . substr($sha512, -64) . "\n\n";
-                       $error512++;
-               }
-               $test512++;
-       }
-}
-
-$errors = $error256 + $error384 + $error512;
-$tests = $test256 + $test384 + $test512;
-print "\n\n===== RESULTS ($num VECTOR DATA FILES HASHED) =====\n\n";
-print "HASH TYPE\tNO. OF TESTS\tPASSED\tFAILED\n";
-print "---------\t------------\t------\t------\n";
-if ($test256) {
-       $pass = $test256 - $error256;
-       print "SHA-256\t\t".substr("           $test256", -12)."\t".substr("     $pass", -6)."\t".substr("     $error256", -6)."\n";
-}
-if ($test384) {
-       $pass = $test384 - $error384;
-       print "SHA-384\t\t".substr("           $test384", -12)."\t".substr("     $pass", -6)."\t".substr("     $error384", -6)."\n";
-}
-if ($test512) {
-       $pass = $test512 - $error512;
-       print "SHA-512\t\t".substr("           $test512", -12)."\t".substr("     $pass", -6)."\t".substr("     $error512", -6)."\n";
-}
-print "----------------------------------------------\n";
-$pass = $tests - $errors;
-print "TOTAL:          ".substr("           $tests", -12)."\t".substr("     $pass", -6)."\t".substr("     $errors", -6)."\n\n";
-print "NO ERRORS!  ALL TESTS WERE SUCCESSFUL!\n\n" if (!$errors);
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector001.dat b/extlibs/tinydtls/sha2/testvectors/vector001.dat
deleted file mode 100644 (file)
index f2ba8f8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-abc
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector001.info b/extlibs/tinydtls/sha2/testvectors/vector001.info
deleted file mode 100644 (file)
index 57b444e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION:
-    This test vector is taken from the PDF document that describes
-    the SHA-256/384/512 algorithms.  That document contains sample
-    output for all three versions (SHA-256, SHA-384, and SHA-512).
-    
-    (Total length of test vector data: 3)
-
-FILE:
-    vector001.dat
-
-SHA256:
-    ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
-
-SHA384:
-    cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed
-    8086072ba1e7cc2358baeca134c825a7
-
-SHA512:
-    ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a
-    2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector002.dat b/extlibs/tinydtls/sha2/testvectors/vector002.dat
deleted file mode 100644 (file)
index 199f24e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector002.info b/extlibs/tinydtls/sha2/testvectors/vector002.info
deleted file mode 100644 (file)
index 0fc1ed3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION:
-    The PDF document only provided sample output for SHA-256 using
-    this test data.  I have provided SHA-384 and SHA-512 sample
-    output from my own implementation which may not be correct.
-    
-    (Total length of test vector data: 56)
-
-FILE:
-    vector002.dat
-
-SHA256:
-    248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1
-
-SHA384:
-    3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6
-    b0455a8520bc4e6f5fe95b1fe3c8452b
-
-SHA512:
-    204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c335
-    96fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector003.dat b/extlibs/tinydtls/sha2/testvectors/vector003.dat
deleted file mode 100644 (file)
index 4674ea4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector003.info b/extlibs/tinydtls/sha2/testvectors/vector003.info
deleted file mode 100644 (file)
index 17a2ad8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    For this test data (from the PDF document), no example output
-    was provided for SHA-256 (SHA-384 and SHA-512 samples were
-    provided), so the sample for SHA-256 comes from the output of
-    my own implementation and so may not be correct.
-    
-    (Total length of test vector data: 112)
-
-FILE:
-    vector003.dat
-
-SHA256:
-    cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1
-
-SHA384:
-    09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712
-    fcc7c71a557e2db966c3e9fa91746039
-
-SHA512:
-    8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018
-    501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector004.dat b/extlibs/tinydtls/sha2/testvectors/vector004.dat
deleted file mode 100644 (file)
index 3d71eba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-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.  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 battlefield 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.  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.  -- President Abraham Lincoln, November 19, 1863
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector004.info b/extlibs/tinydtls/sha2/testvectors/vector004.info
deleted file mode 100644 (file)
index eed148c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for this test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample comes from...well
-    most anyone in the U.S. will know and many outside the U.S. too.
-    
-    (Total length of test vector data: 1515)
-
-FILE:
-    vector004.dat
-
-SHA256:
-    4d25fccf8752ce470a58cd21d90939b7eb25f3fa418dd2da4c38288ea561e600
-
-SHA384:
-    69cc75b95280bdd9e154e743903e37b1205aa382e92e051b1f48a6db9d0203f8
-    a17c1762d46887037275606932d3381e
-
-SHA512:
-    23450737795d2f6a13aa61adcca0df5eef6df8d8db2b42cd2ca8f783734217a7
-    3e9cabc3c9b8a8602f8aeaeb34562b6b1286846060f9809b90286b3555751f09
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector005.dat b/extlibs/tinydtls/sha2/testvectors/vector005.dat
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/extlibs/tinydtls/sha2/testvectors/vector005.info b/extlibs/tinydtls/sha2/testvectors/vector005.info
deleted file mode 100644 (file)
index 37602d3..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION:
-    The output samples for this test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is EMPTY (no bits).
-    Mr. David A. Ireland's SHA-256 implementation agrees with my own
-    implementation on the output of this test vector (SHA-256 only).
-    
-    (Total length of test vector data: 0)
-
-FILE:
-    vector005.dat
-
-SHA256:
-    e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
-
-SHA384:
-    38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da
-    274edebfe76f65fbd51ad2f14898b95b
-
-SHA512:
-    cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce
-    47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector006.dat b/extlibs/tinydtls/sha2/testvectors/vector006.dat
deleted file mode 100644 (file)
index 7caf161..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This is exactly 64 bytes long, not counting the terminating byte
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector006.info b/extlibs/tinydtls/sha2/testvectors/vector006.info
deleted file mode 100644 (file)
index 2a0d78a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample exactly the same
-    length as the SHA-256 block length.
-    
-    (Total length of test vector data: 64)
-
-FILE:
-    vector006.dat
-
-SHA256:
-    ab64eff7e88e2e46165e29f2bce41826bd4c7b3552f6b382a9e7d3af47c245f8
-
-SHA384:
-    e28e35e25a1874908bf0958bb088b69f3d742a753c86993e9f4b1c4c21988f95
-    8bd1fe0315b195aca7b061213ac2a9bd
-
-SHA512:
-    70aefeaa0e7ac4f8fe17532d7185a289bee3b428d950c14fa8b713ca09814a38
-    7d245870e007a80ad97c369d193e41701aa07f3221d15f0e65a1ff970cedf030
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector007.dat b/extlibs/tinydtls/sha2/testvectors/vector007.dat
deleted file mode 100644 (file)
index 1caf01b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-For this sample, this 63-byte string will be used as input data
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector007.info b/extlibs/tinydtls/sha2/testvectors/vector007.info
deleted file mode 100644 (file)
index fad860d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample one byte shorter
-    than the SHA-256 block length.
-    
-    (Total length of test vector data: 63)
-
-FILE:
-    vector007.dat
-
-SHA256:
-    f08a78cbbaee082b052ae0708f32fa1e50c5c421aa772ba5dbb406a2ea6be342
-
-SHA384:
-    37b49ef3d08de53e9bd018b0630067bd43d09c427d06b05812f48531bce7d2a6
-    98ee2d1ed1ffed46fd4c3b9f38a8a557
-
-SHA512:
-    b3de4afbc516d2478fe9b518d063bda6c8dd65fc38402dd81d1eb7364e72fb6e
-    6663cf6d2771c8f5a6da09601712fb3d2a36c6ffea3e28b0818b05b0a8660766
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector008.dat b/extlibs/tinydtls/sha2/testvectors/vector008.dat
deleted file mode 100644 (file)
index baae226..0000000
+++ /dev/null
@@ -1 +0,0 @@
-And this textual data, astonishing as it may appear, is exactly 128 bytes in length, as are both SHA-384 and SHA-512 block sizes
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector008.info b/extlibs/tinydtls/sha2/testvectors/vector008.info
deleted file mode 100644 (file)
index 22cfd81..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample exactly the same
-    length as the SHA-384 and SHA-512 block lengths.
-    
-    (Total length of test vector data: 128)
-
-FILE:
-    vector008.dat
-
-SHA256:
-    0ab803344830f92089494fb635ad00d76164ad6e57012b237722df0d7ad26896
-
-SHA384:
-    e3e3602f4d90c935321d788f722071a8809f4f09366f2825cd85da97ccd2955e
-    b6b8245974402aa64789ed45293e94ba
-
-SHA512:
-    97fb4ec472f3cb698b9c3c12a12768483e5b62bcdad934280750b4fa4701e5e0
-    550a80bb0828342c19631ba55a55e1cee5de2fda91fc5d40e7bee1d4e6d415b3
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector009.dat b/extlibs/tinydtls/sha2/testvectors/vector009.dat
deleted file mode 100644 (file)
index 9c64af4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-By hashing data that is one byte less than a multiple of a hash block length (like this 127-byte string), bugs may be revealed.
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector009.info b/extlibs/tinydtls/sha2/testvectors/vector009.info
deleted file mode 100644 (file)
index d5fe515..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is one byte shorter
-    in length than the SHA-384 and SHA-512 block lengths.
-    
-    (Total length of test vector data: 127)
-
-FILE:
-    vector009.dat
-
-SHA256:
-    e4326d0459653d7d3514674d713e74dc3df11ed4d30b4013fd327fdb9e394c26
-
-SHA384:
-    1ca650f38480fa9dfb5729636bec4a935ebc1cd4c0055ee50cad2aa627e06687
-    1044fd8e6fdb80edf10b85df15ba7aab
-
-SHA512:
-    d399507bbf5f2d0da51db1ff1fc51c1c9ff1de0937e00d01693b240e84fcc340
-    0601429f45c297acc6e8fcf1e4e4abe9ff21a54a0d3d88888f298971bd206cd5
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector010.dat b/extlibs/tinydtls/sha2/testvectors/vector010.dat
deleted file mode 100644 (file)
index f1681bc..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector010.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector010.info b/extlibs/tinydtls/sha2/testvectors/vector010.info
deleted file mode 100644 (file)
index df7717d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is exactly 5 times
-    size of the SHA-256 block length.
-    
-    (Total length of test vector data: 320)
-
-FILE:
-    vector010.dat
-
-SHA256:
-    a7f001d996dd25af402d03b5f61aef950565949c1a6ad5004efa730328d2dbf3
-
-SHA384:
-    b8261ddcd7df7b3969a516b72550de6fbf0e394a4a7bb2bbc60ec603c2ceff64
-    3c5bf62bc6dcbfa5beb54b62d750b969
-
-SHA512:
-    caf970d3638e21053173a638c4b94d6d1ff87bc47b58f8ee928fbe9e245c23ab
-    f81019e45bf017ecc8610e5e0b95e3b025ccd611a772ca4fb3dfba26f0859725
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector011.dat b/extlibs/tinydtls/sha2/testvectors/vector011.dat
deleted file mode 100644 (file)
index d1609a9..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector011.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector011.info b/extlibs/tinydtls/sha2/testvectors/vector011.info
deleted file mode 100644 (file)
index f36988c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is one byte less
-    than 7 times the size of the SHA-256 block length.
-    
-    (Total length of test vector data: 447)
-
-FILE:
-    vector011.dat
-
-SHA256:
-    6dcd63a07b0922cc3a9b3315b158478681cc32543b0a4180abe58a73c5e14cc2
-
-SHA384:
-    548e4e9a1ff57f469ed47b023bf5279dfb4d4ca08c65051e3a5c41fab84479a2
-    05496276906008b4b3c5b0970b2f5446
-
-SHA512:
-    ee5d07460183b130687c977e9f8d43110989b0864b18fe6ee00a53dec5eda111
-    f3aaa3bac7ab8dae26ed545a4de33ed45190f18fa0c327c44642ab9424265330
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector012.dat b/extlibs/tinydtls/sha2/testvectors/vector012.dat
deleted file mode 100644 (file)
index d74f1db..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector012.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector012.info b/extlibs/tinydtls/sha2/testvectors/vector012.info
deleted file mode 100644 (file)
index a1574e1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is exactly 5 times
-    size of the SHA-384 and SHA-512 block lengths.
-    
-    (Total length of test vector data: 640)
-
-FILE:
-    vector012.dat
-
-SHA256:
-    af6ebfde7d93d5badb6cde6287ecc2061c1cafc5b1c1217cd984fbcdb9c61aaa
-
-SHA384:
-    c6fec3a3278dd6b5afc8c0971d32d38faf5802f1a21527c32563b32a1ac34065
-    6b433b44fe2648aa2232206f4301193a
-
-SHA512:
-    73ffeb67716c3495fbc33f2d62fe08e2616706a5599881c7e67e9ef2b68f4988
-    ea8b3b604ba87e50b07962692705c420fa31a00be41d6aaa9f3b11eafe9cf49b
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector013.dat b/extlibs/tinydtls/sha2/testvectors/vector013.dat
deleted file mode 100644 (file)
index cc8a8ae..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector013.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector013.info b/extlibs/tinydtls/sha2/testvectors/vector013.info
deleted file mode 100644 (file)
index 4fbd4cb..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample is one byte short
-    of 17 times size of the SHA-384 and SHA-512 block lengths.
-    
-    (Total length of test vector data: 2175)
-
-FILE:
-    vector013.dat
-
-SHA256:
-    8ff59c6d33c5a991088bc44dd38f037eb5ad5630c91071a221ad6943e872ac29
-
-SHA384:
-    92dca5655229b3c34796a227ff1809e273499adc2830149481224e0f54ff4483
-    bd49834d4865e508ef53d4cd22b703ce
-
-SHA512:
-    0e928db6207282bfb498ee871202f2337f4074f3a1f5055a24f08e912ac118f8
-    101832cdb9c2f702976e629183db9bacfdd7b086c800687c3599f15de7f7b9dd
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector014.dat b/extlibs/tinydtls/sha2/testvectors/vector014.dat
deleted file mode 100644 (file)
index 6ee6629..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector014.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector014.info b/extlibs/tinydtls/sha2/testvectors/vector014.info
deleted file mode 100644 (file)
index 1780afc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION:
-    The output samples for thi test vector come exclusively from my
-    own implementation and so may be completely incorrect.  Use with
-    a very large grain of salt.  The input sample 4 KB of misc.
-    data.
-    
-    (Total length of test vector data: 16384)
-
-FILE:
-    vector014.dat
-
-SHA256:
-    1818e87564e0c50974ecaabbb2eb4ca2f6cc820234b51861e2590be625f1f703
-
-SHA384:
-    310fbb2027bdb7042f0e09e7b092e9ada506649510a7aa029825c8e8019e9c30
-    749d723f2de1bd8c043d8d89d3748c2f
-
-SHA512:
-    a001636f3ff1ce34f432f8e8f7785b78be84318beb8485a406650a8b243c419f
-    7db6435cf6bf3000c6524adb5b52bad01afb76b3ceff701331e18b85b0e4cbd3
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector015.dat b/extlibs/tinydtls/sha2/testvectors/vector015.dat
deleted file mode 100644 (file)
index 7d63021..0000000
+++ /dev/null
@@ -1 +0,0 @@
-qwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwerty
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector015.info b/extlibs/tinydtls/sha2/testvectors/vector015.info
deleted file mode 100644 (file)
index d035782..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION:
-    This is yet another of my own test vectors for a larger
-    input data set.  The input data is the string "qwerty
-    repeated 65536 times.
-    
-    (Total length of test vector data: 393216)
-
-FILE:
-    vector015.dat
-
-SHA256:
-    5e3dfe0cc98fd1c2de2a9d2fd893446da43d290f2512200c515416313cdf3192
-
-SHA384:
-    0d5e45317bc7997cb9c8a23bad9bac9170d5bc81789b51af6bcd74ace379fd64
-    9a2b48cb56c4cb4ec1477e6933329e0e
-
-SHA512:
-    735bd6bebfe6f8070d70069105bc761f35ed1ac3742f2e372fdc14d2a51898e6
-    153ccaff9073324130abdc451c730dc5dab5a0452487b1171c4dd97f92e267b7
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector016.dat b/extlibs/tinydtls/sha2/testvectors/vector016.dat
deleted file mode 100644 (file)
index fc00891..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Rijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AESRijndael is AES
\ No newline at end of file
diff --git a/extlibs/tinydtls/sha2/testvectors/vector016.info b/extlibs/tinydtls/sha2/testvectors/vector016.info
deleted file mode 100644 (file)
index effb114..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION:
-    This test vector came from Brian LaMacchia in his e-mail
-    message containing several samples of output from his SHA-256
-    and SHA-512 implementations.  My own implementations match
-    his output exactly.  The input data data set is the string
-    "Rijndael is AES" repeated 1024 times.
-    
-    (Total length of test vector data: 15360)
-
-FILE:
-    vector016.dat
-
-SHA256:
-    80fced5a97176a5009207cd119551b42c5b51ceb445230d02ecc2663bbfb483a
-
-SHA384:
-    aa1e77c094e5ce6db81a1add4c095201d020b7f8885a4333218da3b799b9fc42
-    f00d60cd438a1724ae03bd7b515b739b
-
-SHA512:
-    fae25ec70bcb3bbdef9698b9d579da49db68318dbdf18c021d1f76aaceff9628
-    38873235597e7cce0c68aabc610e0deb79b13a01c302abc108e459ddfbe9bee8
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector017.dat b/extlibs/tinydtls/sha2/testvectors/vector017.dat
deleted file mode 100644 (file)
index 4272d97..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector017.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector017.info b/extlibs/tinydtls/sha2/testvectors/vector017.info
deleted file mode 100644 (file)
index 5d6c632..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-DESCRIPTION:
-    Rogier van de Pol notified me that my implementation differed
-    with several others on several test data sets he had tested
-    against.  This test vector data set is one Rogier provided
-    to me that highlighted an off-by-one bug in my implementation
-    that affected SHA-256/384/512 hashes where the data set length
-    was of a certain length.  In the case of SHA512 or SHA384, if
-    the data length after subtracting 111 was an even multiple of
-    128 bytes, the bug surfaced.  In the case of SHA256, after
-    subtracting 55, the remaining length was an even multiple of 64,
-    the bug surfaced.  The fix was simple.  In SHA512_Last() and in
-    SHA256_Final() functions,  I simply replaced a single "<" test
-    with a "<=" test.
-
-    Thanks, Rogier!
-   
-    (Total length of test vector data: 12271)
-
-FILE:
-    vector017.dat
-
-SHA256:
-    88ee6ada861083094f4c64b373657e178d88ef0a4674fce6e4e1d84e3b176afb
-
-SHA384:
-    78cc6402a29eb984b8f8f888ab0102cabe7c06f0b9570e3d8d744c969db14397
-    f58ecd14e70f324bf12d8dd4cd1ad3b2
-
-SHA512:
-    211bec83fbca249c53668802b857a9889428dc5120f34b3eac1603f13d1b4796
-    5c387b39ef6af15b3a44c5e7b6bbb6c1096a677dc98fc8f472737540a332f378
-
diff --git a/extlibs/tinydtls/sha2/testvectors/vector018.dat b/extlibs/tinydtls/sha2/testvectors/vector018.dat
deleted file mode 100644 (file)
index cc8a8d1..0000000
Binary files a/extlibs/tinydtls/sha2/testvectors/vector018.dat and /dev/null differ
diff --git a/extlibs/tinydtls/sha2/testvectors/vector018.info b/extlibs/tinydtls/sha2/testvectors/vector018.info
deleted file mode 100644 (file)
index 7ee3444..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-DESCRIPTION:
-    I added this vector after fixing a bug first discovered by
-    Rogier van de Pol.  The length of this data set is designed to
-    test for that bug or similar bugs in SHA-256 hashes.  The bug
-    was an off-by-one bug where I used a "<" test instead of a "<="
-    test in SHA256_Final().  Whenever data set lengths were an even
-    multiple of 64 after subtracting 55, the bug showed up.  The
-    fix was easy, once the problem was fully diagnosed.
-
-    Thanks, Rogier!
-   
-    (Total length of test vector data: 1079)
-
-FILE:
-    vector018.dat
-
-SHA256:
-    5a2e925a7f8399fa63a20a1524ae83a7e3c48452f9af4df493c8c51311b04520
-
-SHA384:
-    72ec26cc742bc5fb1ef82541c9cadcf01a15c8104650d305f24ec8b006d7428e
-    8ebe2bb320a465dbdd5c6326bbd8c9ad
-
-SHA512:
-    ebad464e6d9f1df7e8aadff69f52db40a001b253fbf65a018f29974dcc7fbf8e
-    58b69e247975fbadb4153d7289357c9b6212752d0ab67dd3d9bbc0bb908aa98c
diff --git a/extlibs/tinydtls/state.h b/extlibs/tinydtls/state.h
deleted file mode 100644 (file)
index 72df125..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2013 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file state.h
- * @brief state information for DTLS FSM
- */
-
-#ifndef _DTLS_STATE_H_
-#define _DTLS_STATE_H_
-
-#include <sys/types.h>
-#include <stdint.h>
-
-#include "global.h"
-#include "hmac.h"
-
-typedef enum { 
-  DTLS_STATE_INIT = 0, DTLS_STATE_WAIT_CLIENTHELLO, DTLS_STATE_WAIT_CLIENTCERTIFICATE,
-  DTLS_STATE_WAIT_CLIENTKEYEXCHANGE, DTLS_STATE_WAIT_CERTIFICATEVERIFY,
-  DTLS_STATE_WAIT_CHANGECIPHERSPEC,
-  DTLS_STATE_WAIT_FINISHED, DTLS_STATE_FINISHED, 
-  /* client states */
-  DTLS_STATE_CLIENTHELLO, DTLS_STATE_WAIT_SERVERCERTIFICATE, DTLS_STATE_WAIT_SERVERKEYEXCHANGE,
-  DTLS_STATE_WAIT_SERVERHELLODONE,
-
-  DTLS_STATE_CONNECTED,
-  DTLS_STATE_CLOSING,
-  DTLS_STATE_CLOSED
-} dtls_state_t;
-
-typedef struct {
-  uint16_t mseq_s;          /**< send handshake message sequence number counter */
-  uint16_t mseq_r;          /**< received handshake message sequence number counter */
-
-  /** pending config that is updated during handshake */
-  /* FIXME: dtls_security_parameters_t pending_config; */
-
-  /* temporary storage for the final handshake hash */
-  dtls_hash_ctx hs_hash;
-} dtls_hs_state_t;
-#endif /* _DTLS_STATE_H_ */
diff --git a/extlibs/tinydtls/t_list.h b/extlibs/tinydtls/t_list.h
deleted file mode 100644 (file)
index 1c3fba9..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/* t_list -- tinydtls lists
- *
- * Copyright (C) 2012 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file t_list.h
- * @brief Wrappers for list structures and functions
- */
-
-#ifndef _DTLS_LIST_H_
-#define _DTLS_LIST_H_
-
-#include "tinydtls.h"
-
-#ifndef WITH_CONTIKI
-#include "uthash.h"
-#include "utlist.h"
-
-/* We define list structures and utility functions to be compatible
- * with Contiki list structures. The Contiki list API is part of the
- * Contiki operating system, and therefore the following licensing
- * terms apply (taken from contiki/core/lib/list.h):
- *
- * Copyright (c) 2004, Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Institute nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This file is part of the Contiki operating system.
- *
- * Author: Adam Dunkels <adam@sics.se>
- *
- * $ Id: list.h,v 1.5 2010/09/13 13:31:00 adamdunkels Exp $
- */
-
-typedef void **list_t;
-struct list {
-  struct list *next;
-};
-
-#define LIST_CONCAT(s1, s2) s1##s2
-
-#define LIST_STRUCT(name)                      \
-  void *LIST_CONCAT(name, _list);              \
-  list_t name
-
-#define LIST_STRUCT_INIT(struct_ptr, name)  {                          \
-    (struct_ptr)->name = &((struct_ptr)->LIST_CONCAT(name,_list));     \
-    (struct_ptr)->LIST_CONCAT(name,_list) = NULL;                      \
-  }
-
-INLINE_API void *
-list_head(list_t list) {
-  return *list;
-}
-
-INLINE_API void 
-list_remove(list_t list, void *item) {
-  LL_DELETE(*(struct list **)list, (struct list *)item);
-}
-
-INLINE_API void 
-list_add(list_t list, void *item) {
-  list_remove(list, item);
-  LL_APPEND(*(struct list **)list, (struct list *)item);
-}
-
-INLINE_API void 
-list_push(list_t list, void *item) {
-  LL_PREPEND(*(struct list **)list, (struct list *)item);
-}
-
-INLINE_API void *
-list_pop(list_t list) {
-  struct list *l;
-  l = *list;
-  if(l)
-    list_remove(list, l);
-  
-  return l;
-}
-
-INLINE_API void
-list_insert(list_t list, void *previtem, void *newitem) {
-  if(previtem == NULL) {
-    list_push(list, newitem);
-  } else {
-    ((struct list *)newitem)->next = ((struct list *)previtem)->next;
-    ((struct list *)previtem)->next = newitem;
-  } 
-}
-
-INLINE_API void *
-list_item_next(void *item)
-{
-  return item == NULL? NULL: ((struct list *)item)->next;
-}
-
-#else /* WITH_CONTIKI */
-#include "list.h"
-#endif /* WITH_CONTIKI */
-
-#endif /* _DTLS_LIST_H_ */
-
diff --git a/extlibs/tinydtls/tests/Makefile.in b/extlibs/tinydtls/tests/Makefile.in
deleted file mode 100644 (file)
index a2d8ca4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-# Makefile for tinydtls
-#
-# Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-# the library's version
-VERSION:=@PACKAGE_VERSION@
-
-# tools
-@SET_MAKE@
-SHELL = /bin/sh
-MKDIR = mkdir
-
-abs_builddir = @abs_builddir@
-top_builddir = @top_builddir@
-top_srcdir:= @top_srcdir@
-
-# files and flags
-SOURCES:= dtls-server.c ccm-test.c prf-test.c \
-  dtls-client.c
-  #cbc_aes128-test.c #dsrv-test.c
-OBJECTS:= $(patsubst %.c, %.o, $(SOURCES))
-PROGRAMS:= $(patsubst %.c, %, $(SOURCES))
-HEADERS:=
-CFLAGS:=-Wall @CFLAGS@
-CPPFLAGS:=-I$(top_srcdir) @CPPFLAGS@
-LDFLAGS:=-L$(top_builddir)
-LDLIBS:=-ltinydtls @LIBS@
-DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
-FILES:=Makefile.in $(SOURCES) ccm-testdata.c #cbc_aes128-testdata.c
-
-.PHONY: all dirs clean distclean .gitignore doc
-
-.SUFFIXES:
-.SUFFIXES:      .c .o
-
-all:   $(PROGRAMS)
-
-check: 
-       echo DISTDIR: $(DISTDIR)
-       echo top_builddir: $(top_builddir)
-
-clean:
-       @rm -f $(PROGRAMS) main.o $(LIB) $(OBJECTS)
-       for dir in $(SUBDIRS); do \
-               $(MAKE) -C $$dir clean ; \
-       done
-
-doc:   
-       $(MAKE) -C doc
-
-distclean:     clean
-       @rm -rf $(DISTDIR)
-       @rm -f *~ $(DISTDIR).tar.gz
-
-dist:  $(FILES)
-       test -d $(DISTDIR)/tests || mkdir $(DISTDIR)/tests
-       cp $(FILES) $(DISTDIR)/tests
-
-# this directory contains no installation candidates
-install:
-       :
-
-.gitignore:
-       echo "core\n*~\n*.[oa]\n*.gz\n*.cap\n$(PROGRAM)\n$(DISTDIR)\n.gitignore" >$@
diff --git a/extlibs/tinydtls/tests/cbc_aes128-test.c b/extlibs/tinydtls/tests/cbc_aes128-test.c
deleted file mode 100644 (file)
index 1f91920..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "debug.h"
-#include "numeric.h"
-#include "crypto.h"
-
-#include "cbc_aes128-testdata.c"
-
-void 
-dump(unsigned char *buf, size_t len) {
-  size_t i = 0;
-  while (i < len) {
-    printf("%02x ", buf[i++]);
-    if (i % 4 == 0)
-      printf(" ");
-    if (i % 16 == 0)
-      printf("\n\t");
-  }
-  printf("\n");
-}
-
-int main(int argc, char **argv) {
-  int len, n;
-
-  for (n = 0; n < sizeof(data)/sizeof(struct test_vector); ++n) {
-    dtls_cipher_context_t *cipher;
-
-    cipher = dtls_new_cipher(&ciphers[AES128],
-                            data[n].key,
-                            sizeof(data[n].key));
-    
-    if (!cipher) {
-      fprintf(stderr, "cannot set key\n");
-      exit(-1);
-    }
-
-    dtls_init_cipher(cipher, data[n].nonce, sizeof(data[n].nonce));
-
-    if (data[n].M == 0)
-      len = dtls_encrypt(cipher, data[n].msg, data[n].lm);
-    else
-      len = dtls_decrypt(cipher, data[n].msg, data[n].lm);
-
-    printf("Packet Vector #%d ", n+1);
-    if (len != data[n].r_lm
-       || memcmp(data[n].msg, data[n].result, len))
-      printf("FAILED, ");
-    else 
-      printf("OK, ");
-    
-    printf("result is (total length = %d):\n\t", (int)len);
-    dump(data[n].msg, len);
-
-    free(cipher);
-  }
-
-  return 0;
-}
diff --git a/extlibs/tinydtls/tests/cbc_aes128-testdata.c b/extlibs/tinydtls/tests/cbc_aes128-testdata.c
deleted file mode 100644 (file)
index 0791679..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/* test vectors from Appendix F.2.{1,2} of NIST SP 800-38A, ed. 2001 */
-
-struct test_vector {
-  size_t M;                    /* mode: 0 == encrypt, 1 == decrypt */
-  size_t lm;                   /* overall message length */
-  size_t la;                   /* not used */
-  unsigned char key[AES_BLKLEN];
-  unsigned char nonce[AES_BLKLEN];
-  unsigned char msg[2000];
-  size_t r_lm;                 /* overall result length */
-  unsigned char result[2000];  /* result */
-};
-
-struct test_vector data[] = {
-  /* F.2.1 (encrypt) */
-  { 0, 4 * AES_BLKLEN, 0,
-    { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },        /* AES key */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },        /* Nonce */
-    { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
-      0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
-      0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
-      0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },        /* msg */
-    4 * AES_BLKLEN,    /* length of result */
-    { 0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d,
-      0x50, 0x86, 0xcb, 0x9b, 0x50, 0x72, 0x19, 0xee, 0x95, 0xdb, 0x11, 0x3a, 0x91, 0x76, 0x78, 0xb2,
-      0x73, 0xbe, 0xd6, 0xb8, 0xe3, 0xc1, 0x74, 0x3b, 0x71, 0x16, 0xe6, 0x9e, 0x22, 0x22, 0x95, 0x16,
-      0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09, 0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7
-    }  /* result */
-  },
-  
-  /* F.2.2 (decrypt) */
-  { 1, 4 * AES_BLKLEN, 0,
-    { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },        /* AES key */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },        /* Nonce */
-    { 0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d,
-      0x50, 0x86, 0xcb, 0x9b, 0x50, 0x72, 0x19, 0xee, 0x95, 0xdb, 0x11, 0x3a, 0x91, 0x76, 0x78, 0xb2,
-      0x73, 0xbe, 0xd6, 0xb8, 0xe3, 0xc1, 0x74, 0x3b, 0x71, 0x16, 0xe6, 0x9e, 0x22, 0x22, 0x95, 0x16,
-      0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09, 0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7
-    }, /* msg */
-    4 * AES_BLKLEN,    /* length of result */
-    { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
-      0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
-      0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
-      0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }  /* result */
-  }
-};
diff --git a/extlibs/tinydtls/tests/ccm-test.c b/extlibs/tinydtls/tests/ccm-test.c
deleted file mode 100644 (file)
index cbb7d2a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#ifdef WITH_CONTIKI
-#include "contiki.h"
-#include "contiki-lib.h"
-#include "contiki-net.h"
-#endif /* WITH_CONTIKI */
-
-//#include "debug.h"
-#include "numeric.h"
-#include "ccm.h"
-
-#include "ccm-testdata.c"
-
-#ifndef HAVE_FLS
-int fls(unsigned int i) {
-  int n;
-  for (n = 0; i; n++)
-    i >>= 1;
-  return n;
-}
-#endif
-
-void 
-dump(unsigned char *buf, size_t len) {
-  size_t i = 0;
-  while (i < len) {
-    printf("%02x ", buf[i++]);
-    if (i % 4 == 0)
-      printf(" ");
-    if (i % 16 == 0)
-      printf("\n\t");
-  }
-  printf("\n");
-}
-
-#ifdef WITH_CONTIKI
-PROCESS(ccm_test_process, "CCM test process");
-AUTOSTART_PROCESSES(&ccm_test_process);
-PROCESS_THREAD(ccm_test_process, ev, d)
-{
-#else  /* WITH_CONTIKI */
-int main(int argc, char **argv) {
-#endif /* WITH_CONTIKI */
-  long int len;
-  int n;
-
-  rijndael_ctx ctx;
-
-#ifdef WITH_CONTIKI
-  PROCESS_BEGIN();
-#endif /* WITH_CONTIKI */
-
-  for (n = 0; n < sizeof(data)/sizeof(struct test_vector); ++n) {
-
-    if (rijndael_set_key_enc_only(&ctx, data[n].key, 8*sizeof(data[n].key)) < 0) {
-      fprintf(stderr, "cannot set key\n");
-      return -1;
-    }
-
-    len = dtls_ccm_encrypt_message(&ctx, data[n].M, data[n].L, data[n].nonce, 
-                                  data[n].msg + data[n].la, 
-                                  data[n].lm - data[n].la, 
-                                  data[n].msg, data[n].la);
-    
-    len +=  + data[n].la;
-    printf("Packet Vector #%d ", n+1);
-    if (len != data[n].r_lm || memcmp(data[n].msg, data[n].result, len))
-      printf("FAILED, ");
-    else 
-      printf("OK, ");
-    
-    printf("result is (total length = %lu):\n\t", len);
-    dump(data[n].msg, len);
-
-    len = dtls_ccm_decrypt_message(&ctx, data[n].M, data[n].L, data[n].nonce, 
-                                  data[n].msg + data[n].la, len - data[n].la, 
-                                  data[n].msg, data[n].la);
-    
-    if (len < 0)
-      printf("Packet Vector #%d: cannot decrypt message\n", n+1);
-    else 
-      printf("\t*** MAC verified (total length = %lu) ***\n", len + data[n].la);
-  }
-
-#ifdef WITH_CONTIKI
-  PROCESS_END();
-#else /* WITH_CONTIKI */
-  return 0;
-#endif /* WITH_CONTIKI */
-}
diff --git a/extlibs/tinydtls/tests/ccm-testdata.c b/extlibs/tinydtls/tests/ccm-testdata.c
deleted file mode 100644 (file)
index f0da4ae..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/* dtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/* test vectors from RFC 3610 */
-
-struct test_vector {
-  size_t M, L;
-  size_t lm;                   /* overall message length */
-  size_t la;                   /* number of bytes additional data */
-  unsigned char key[DTLS_CCM_BLOCKSIZE];
-  unsigned char nonce[DTLS_CCM_BLOCKSIZE];
-  unsigned char msg[200];
-  size_t r_lm;                 /* overall result length */
-  unsigned char result[200];   /* result */
-};
-
-struct test_vector data[] = {
-  /* #1 */
-  { 8, 2, 31, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E},       /* msg */
-    39,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x58, 0x8C, 0x97, 0x9A, 0x61, 0xC6, 0x63, 0xD2, 0xF0, 0x66, 0xD0, 0xC2, 0xC0, 0xF9, 0x89, 0x80, 0x6D, 0x5F, 0x6B, 0x61, 0xDA, 0xC3, 0x84, 0x17, 0xE8, 0xD1, 0x2C, 0xFD, 0xF9, 0x26, 0xE0}        /* result */
-  },
-  
-  /* #2 */
-  { 8, 2, 32, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}, /* msg */
-    40,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x72, 0xC9, 0x1A, 0x36, 0xE1, 0x35, 0xF8, 0xCF, 0x29, 0x1C, 0xA8, 0x94, 0x08, 0x5C, 0x87, 0xE3, 0xCC, 0x15, 0xC4, 0x39, 0xC9, 0xE4, 0x3A, 0x3B, 0xA0, 0x91, 0xD5, 0x6E, 0x10, 0x40, 0x09, 0x16}  /* result */
-  },
-
-  /* #3 */
-  { 8, 2, 33, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x05, 0x04, 0x03, 0x02, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20},   /* msg */
-    41,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x51, 0xB1, 0xE5, 0xF4, 0x4A, 0x19, 0x7D, 0x1D, 0xA4, 0x6B, 0x0F, 0x8E, 0x2D, 0x28, 0x2A, 0xE8, 0x71, 0xE8, 0x38, 0xBB, 0x64, 0xDA, 0x85, 0x96, 0x57, 0x4A, 0xDA, 0xA7, 0x6F, 0xBD, 0x9F, 0xB0, 0xC5}    /* result */
-  },
-
-  /* #4 */
-  { 8, 2, 31, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x03, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E},       /* msg */
-    39,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xA2, 0x8C, 0x68, 0x65, 0x93, 0x9A, 0x9A, 0x79, 0xFA, 0xAA, 0x5C, 0x4C, 0x2A, 0x9D, 0x4A, 0x91, 0xCD, 0xAC, 0x8C, 0x96, 0xC8, 0x61, 0xB9, 0xC9, 0xE6, 0x1E, 0xF1}        /* result */
-  },
-
-  /* #5 */
-  { 8, 2, 32, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x07, 0x06, 0x05, 0x04, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}, /* msg */
-    40,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xDC, 0xF1, 0xFB, 0x7B, 0x5D, 0x9E, 0x23, 0xFB, 0x9D, 0x4E, 0x13, 0x12, 0x53, 0x65, 0x8A, 0xD8, 0x6E, 0xBD, 0xCA, 0x3E, 0x51, 0xE8, 0x3F, 0x07, 0x7D, 0x9C, 0x2D, 0x93}  /* result */
-  },
-
-  /* #6 */
-  { 8, 2, 33, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20},   /* msg */
-    41,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x6F, 0xC1, 0xB0, 0x11, 0xF0, 0x06, 0x56, 0x8B, 0x51, 0x71, 0xA4, 0x2D, 0x95, 0x3D, 0x46, 0x9B, 0x25, 0x70, 0xA4, 0xBD, 0x87, 0x40, 0x5A, 0x04, 0x43, 0xAC, 0x91, 0xCB, 0x94}    /* result */
-  },
-
-  /* #7 */
-  { 10, 2, 31, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x09, 0x08, 0x07, 0x06, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E},       /* msg */
-    41,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x01, 0x35, 0xD1, 0xB2, 0xC9, 0x5F, 0x41, 0xD5, 0xD1, 0xD4, 0xFE, 0xC1, 0x85, 0xD1, 0x66, 0xB8, 0x09, 0x4E, 0x99, 0x9D, 0xFE, 0xD9, 0x6C, 0x04, 0x8C, 0x56, 0x60, 0x2C, 0x97, 0xAC, 0xBB, 0x74, 0x90}    /* result */
-  },
-
-  /* #8 */
-  { 10, 2, 32, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x0A, 0x09, 0x08, 0x07, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}, /* msg */
-    42,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x7B, 0x75, 0x39, 0x9A, 0xC0, 0x83, 0x1D, 0xD2, 0xF0, 0xBB, 0xD7, 0x58, 0x79, 0xA2, 0xFD, 0x8F, 0x6C, 0xAE, 0x6B, 0x6C, 0xD9, 0xB7, 0xDB, 0x24, 0xC1, 0x7B, 0x44, 0x33, 0xF4, 0x34, 0x96, 0x3F, 0x34, 0xB4}      /* result */
-  },
-
-  /* #9 */
-  { 10, 2, 33, 8,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x0B, 0x0A, 0x09, 0x08, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20},   /* msg */
-    43,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x82, 0x53, 0x1A, 0x60, 0xCC, 0x24, 0x94, 0x5A, 0x4B, 0x82, 0x79, 0x18, 0x1A, 0xB5, 0xC8, 0x4D, 0xF2, 0x1C, 0xE7, 0xF9, 0xB7, 0x3F, 0x42, 0xE1, 0x97, 0xEA, 0x9C, 0x07, 0xE5, 0x6B, 0x5E, 0xB1, 0x7E, 0x5F, 0x4E}        /* result */
-  },
-
-  /* #10 */
-  { 10, 2, 31, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x0C, 0x0B, 0x0A, 0x09, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E},       /* msg */
-    41,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x07, 0x34, 0x25, 0x94, 0x15, 0x77, 0x85, 0x15, 0x2B, 0x07, 0x40, 0x98, 0x33, 0x0A, 0xBB, 0x14, 0x1B, 0x94, 0x7B, 0x56, 0x6A, 0xA9, 0x40, 0x6B, 0x4D, 0x99, 0x99, 0x88, 0xDD}    /* result */
-  },
-
-  /* #11 */
-  { 10, 2, 32, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x0D, 0x0C, 0x0B, 0x0A, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}, /* msg */
-    42,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x67, 0x6B, 0xB2, 0x03, 0x80, 0xB0, 0xE3, 0x01, 0xE8, 0xAB, 0x79, 0x59, 0x0A, 0x39, 0x6D, 0xA7, 0x8B, 0x83, 0x49, 0x34, 0xF5, 0x3A, 0xA2, 0xE9, 0x10, 0x7A, 0x8B, 0x6C, 0x02, 0x2C}      /* result */
-  },
-
-  /* #12 */
-  { 10, 2, 33, 12,
-    { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF}, /* AES key */
-    { 0x00, 0x00, 0x00, 0x0E, 0x0D, 0x0C, 0x0B, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5},   /* Nonce */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20},   /* msg */
-    43,        /* length of result */
-    { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xC0, 0xFF, 0xA0, 0xD6, 0xF0, 0x5B, 0xDB, 0x67, 0xF2, 0x4D, 0x43, 0xA4, 0x33, 0x8D, 0x2A, 0xA4, 0xBE, 0xD7, 0xB2, 0x0E, 0x43, 0xCD, 0x1A, 0xA3, 0x16, 0x62, 0xE7, 0xAD, 0x65, 0xD6, 0xDB}        /* result */
-  },
-
-  /* #13 */
-  { 8, 2, 31, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x41, 0x2B, 0x4E, 0xA9, 0xCD, 0xBE, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x0B, 0xE1, 0xA8, 0x8B, 0xAC, 0xE0, 0x18, 0xB1, 0x08, 0xE8, 0xCF, 0x97, 0xD8, 0x20, 0xEA, 0x25, 0x84, 0x60, 0xE9, 0x6A, 0xD9, 0xCF, 0x52, 0x89, 0x05, 0x4D, 0x89, 0x5C, 0xEA, 0xC4, 0x7C},       /* msg */
-    39,        /* length of result */
-    { 0x0B, 0xE1, 0xA8, 0x8B, 0xAC, 0xE0, 0x18, 0xB1, 0x4C, 0xB9, 0x7F, 0x86, 0xA2, 0xA4, 0x68, 0x9A, 0x87, 0x79, 0x47, 0xAB, 0x80, 0x91, 0xEF, 0x53, 0x86, 0xA6, 0xFF, 0xBD, 0xD0, 0x80, 0xF8, 0xE7, 0x8C, 0xF7, 0xCB, 0x0C, 0xDD, 0xD7, 0xB3}        /* result */
-  },
-
-  /* #14 */
-  { 8, 2, 32, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x33, 0x56, 0x8E, 0xF7, 0xB2, 0x63, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x63, 0x01, 0x8F, 0x76, 0xDC, 0x8A, 0x1B, 0xCB, 0x90, 0x20, 0xEA, 0x6F, 0x91, 0xBD, 0xD8, 0x5A, 0xFA, 0x00, 0x39, 0xBA, 0x4B, 0xAF, 0xF9, 0xBF, 0xB7, 0x9C, 0x70, 0x28, 0x94, 0x9C, 0xD0, 0xEC}, /* msg */
-    40,        /* length of result */
-    { 0x63, 0x01, 0x8F, 0x76, 0xDC, 0x8A, 0x1B, 0xCB, 0x4C, 0xCB, 0x1E, 0x7C, 0xA9, 0x81, 0xBE, 0xFA, 0xA0, 0x72, 0x6C, 0x55, 0xD3, 0x78, 0x06, 0x12, 0x98, 0xC8, 0x5C, 0x92, 0x81, 0x4A, 0xBC, 0x33, 0xC5, 0x2E, 0xE8, 0x1D, 0x7D, 0x77, 0xC0, 0x8A}  /* result */
-  },
-
-  /* #15 */
-  { 8, 2, 33, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x10, 0x3F, 0xE4, 0x13, 0x36, 0x71, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0xAA, 0x6C, 0xFA, 0x36, 0xCA, 0xE8, 0x6B, 0x40, 0xB9, 0x16, 0xE0, 0xEA, 0xCC, 0x1C, 0x00, 0xD7, 0xDC, 0xEC, 0x68, 0xEC, 0x0B, 0x3B, 0xBB, 0x1A, 0x02, 0xDE, 0x8A, 0x2D, 0x1A, 0xA3, 0x46, 0x13, 0x2E},   /* msg */
-    41,        /* length of result */
-    { 0xAA, 0x6C, 0xFA, 0x36, 0xCA, 0xE8, 0x6B, 0x40, 0xB1, 0xD2, 0x3A, 0x22, 0x20, 0xDD, 0xC0, 0xAC, 0x90, 0x0D, 0x9A, 0xA0, 0x3C, 0x61, 0xFC, 0xF4, 0xA5, 0x59, 0xA4, 0x41, 0x77, 0x67, 0x08, 0x97, 0x08, 0xA7, 0x76, 0x79, 0x6E, 0xDB, 0x72, 0x35, 0x06}    /* result */
-  },
-
-  /* #16 */
-  { 8, 2, 31, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x76, 0x4C, 0x63, 0xB8, 0x05, 0x8E, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0xD0, 0xD0, 0x73, 0x5C, 0x53, 0x1E, 0x1B, 0xEC, 0xF0, 0x49, 0xC2, 0x44, 0x12, 0xDA, 0xAC, 0x56, 0x30, 0xEF, 0xA5, 0x39, 0x6F, 0x77, 0x0C, 0xE1, 0xA6, 0x6B, 0x21, 0xF7, 0xB2, 0x10, 0x1C},       /* msg */
-    39,        /* length of result */
-    { 0xD0, 0xD0, 0x73, 0x5C, 0x53, 0x1E, 0x1B, 0xEC, 0xF0, 0x49, 0xC2, 0x44, 0x14, 0xD2, 0x53, 0xC3, 0x96, 0x7B, 0x70, 0x60, 0x9B, 0x7C, 0xBB, 0x7C, 0x49, 0x91, 0x60, 0x28, 0x32, 0x45, 0x26, 0x9A, 0x6F, 0x49, 0x97, 0x5B, 0xCA, 0xDE, 0xAF}        /* result */
-  },
-
-  /* #17 */
-  { 8, 2, 32, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0xF8, 0xB6, 0x78, 0x09, 0x4E, 0x3B, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x77, 0xB6, 0x0F, 0x01, 0x1C, 0x03, 0xE1, 0x52, 0x58, 0x99, 0xBC, 0xAE, 0xE8, 0x8B, 0x6A, 0x46, 0xC7, 0x8D, 0x63, 0xE5, 0x2E, 0xB8, 0xC5, 0x46, 0xEF, 0xB5, 0xDE, 0x6F, 0x75, 0xE9, 0xCC, 0x0D}, /* msg */
-    40,        /* length of result */
-    { 0x77, 0xB6, 0x0F, 0x01, 0x1C, 0x03, 0xE1, 0x52, 0x58, 0x99, 0xBC, 0xAE, 0x55, 0x45, 0xFF, 0x1A, 0x08, 0x5E, 0xE2, 0xEF, 0xBF, 0x52, 0xB2, 0xE0, 0x4B, 0xEE, 0x1E, 0x23, 0x36, 0xC7, 0x3E, 0x3F, 0x76, 0x2C, 0x0C, 0x77, 0x44, 0xFE, 0x7E, 0x3C}  /* result */
-  },
-
-  /* #18 */
-  { 8, 2, 33, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0xD5, 0x60, 0x91, 0x2D, 0x3F, 0x70, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0xCD, 0x90, 0x44, 0xD2, 0xB7, 0x1F, 0xDB, 0x81, 0x20, 0xEA, 0x60, 0xC0, 0x64, 0x35, 0xAC, 0xBA, 0xFB, 0x11, 0xA8, 0x2E, 0x2F, 0x07, 0x1D, 0x7C, 0xA4, 0xA5, 0xEB, 0xD9, 0x3A, 0x80, 0x3B, 0xA8, 0x7F},   /* msg */
-    41,        /* length of result */
-    { 0xCD, 0x90, 0x44, 0xD2, 0xB7, 0x1F, 0xDB, 0x81, 0x20, 0xEA, 0x60, 0xC0, 0x00, 0x97, 0x69, 0xEC, 0xAB, 0xDF, 0x48, 0x62, 0x55, 0x94, 0xC5, 0x92, 0x51, 0xE6, 0x03, 0x57, 0x22, 0x67, 0x5E, 0x04, 0xC8, 0x47, 0x09, 0x9E, 0x5A, 0xE0, 0x70, 0x45, 0x51}    /* result */
-  },
-
-  /* #19 */
-  { 10, 2, 31, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x42, 0xFF, 0xF8, 0xF1, 0x95, 0x1C, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0xD8, 0x5B, 0xC7, 0xE6, 0x9F, 0x94, 0x4F, 0xB8, 0x8A, 0x19, 0xB9, 0x50, 0xBC, 0xF7, 0x1A, 0x01, 0x8E, 0x5E, 0x67, 0x01, 0xC9, 0x17, 0x87, 0x65, 0x98, 0x09, 0xD6, 0x7D, 0xBE, 0xDD, 0x18},       /* msg */
-    41,        /* length of result */
-    { 0xD8, 0x5B, 0xC7, 0xE6, 0x9F, 0x94, 0x4F, 0xB8, 0xBC, 0x21, 0x8D, 0xAA, 0x94, 0x74, 0x27, 0xB6, 0xDB, 0x38, 0x6A, 0x99, 0xAC, 0x1A, 0xEF, 0x23, 0xAD, 0xE0, 0xB5, 0x29, 0x39, 0xCB, 0x6A, 0x63, 0x7C, 0xF9, 0xBE, 0xC2, 0x40, 0x88, 0x97, 0xC6, 0xBA}    /* result */
-  },
-
-  /* #20 */
-  { 10, 2, 32, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x92, 0x0F, 0x40, 0xE5, 0x6C, 0xDC, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x74, 0xA0, 0xEB, 0xC9, 0x06, 0x9F, 0x5B, 0x37, 0x17, 0x61, 0x43, 0x3C, 0x37, 0xC5, 0xA3, 0x5F, 0xC1, 0xF3, 0x9F, 0x40, 0x63, 0x02, 0xEB, 0x90, 0x7C, 0x61, 0x63, 0xBE, 0x38, 0xC9, 0x84, 0x37}, /* msg */
-    42,        /* length of result */
-    { 0x74, 0xA0, 0xEB, 0xC9, 0x06, 0x9F, 0x5B, 0x37, 0x58, 0x10, 0xE6, 0xFD, 0x25, 0x87, 0x40, 0x22, 0xE8, 0x03, 0x61, 0xA4, 0x78, 0xE3, 0xE9, 0xCF, 0x48, 0x4A, 0xB0, 0x4F, 0x44, 0x7E, 0xFF, 0xF6, 0xF0, 0xA4, 0x77, 0xCC, 0x2F, 0xC9, 0xBF, 0x54, 0x89, 0x44}      /* result */
-  },
-
-  /* #21 */
-  { 10, 2, 33, 8,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x27, 0xCA, 0x0C, 0x71, 0x20, 0xBC, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x44, 0xA3, 0xAA, 0x3A, 0xAE, 0x64, 0x75, 0xCA, 0xA4, 0x34, 0xA8, 0xE5, 0x85, 0x00, 0xC6, 0xE4, 0x15, 0x30, 0x53, 0x88, 0x62, 0xD6, 0x86, 0xEA, 0x9E, 0x81, 0x30, 0x1B, 0x5A, 0xE4, 0x22, 0x6B, 0xFA},   /* msg */
-    43,        /* length of result */
-    { 0x44, 0xA3, 0xAA, 0x3A, 0xAE, 0x64, 0x75, 0xCA, 0xF2, 0xBE, 0xED, 0x7B, 0xC5, 0x09, 0x8E, 0x83, 0xFE, 0xB5, 0xB3, 0x16, 0x08, 0xF8, 0xE2, 0x9C, 0x38, 0x81, 0x9A, 0x89, 0xC8, 0xE7, 0x76, 0xF1, 0x54, 0x4D, 0x41, 0x51, 0xA4, 0xED, 0x3A, 0x8B, 0x87, 0xB9, 0xCE}        /* result */
-  },
-
-  /* #22 */
-  { 10, 2, 31, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x5B, 0x8C, 0xCB, 0xCD, 0x9A, 0xF8, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0xEC, 0x46, 0xBB, 0x63, 0xB0, 0x25, 0x20, 0xC3, 0x3C, 0x49, 0xFD, 0x70, 0xB9, 0x6B, 0x49, 0xE2, 0x1D, 0x62, 0x17, 0x41, 0x63, 0x28, 0x75, 0xDB, 0x7F, 0x6C, 0x92, 0x43, 0xD2, 0xD7, 0xC2},       /* msg */
-    41,        /* length of result */
-    { 0xEC, 0x46, 0xBB, 0x63, 0xB0, 0x25, 0x20, 0xC3, 0x3C, 0x49, 0xFD, 0x70, 0x31, 0xD7, 0x50, 0xA0, 0x9D, 0xA3, 0xED, 0x7F, 0xDD, 0xD4, 0x9A, 0x20, 0x32, 0xAA, 0xBF, 0x17, 0xEC, 0x8E, 0xBF, 0x7D, 0x22, 0xC8, 0x08, 0x8C, 0x66, 0x6B, 0xE5, 0xC1, 0x97}    /* result */
-  },
-
-  /* #23 */
-  { 10, 2, 32, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x3E, 0xBE, 0x94, 0x04, 0x4B, 0x9A, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x47, 0xA6, 0x5A, 0xC7, 0x8B, 0x3D, 0x59, 0x42, 0x27, 0xE8, 0x5E, 0x71, 0xE2, 0xFC, 0xFB, 0xB8, 0x80, 0x44, 0x2C, 0x73, 0x1B, 0xF9, 0x51, 0x67, 0xC8, 0xFF, 0xD7, 0x89, 0x5E, 0x33, 0x70, 0x76}, /* msg */
-    42,        /* length of result */
-    { 0x47, 0xA6, 0x5A, 0xC7, 0x8B, 0x3D, 0x59, 0x42, 0x27, 0xE8, 0x5E, 0x71, 0xE8, 0x82, 0xF1, 0xDB, 0xD3, 0x8C, 0xE3, 0xED, 0xA7, 0xC2, 0x3F, 0x04, 0xDD, 0x65, 0x07, 0x1E, 0xB4, 0x13, 0x42, 0xAC, 0xDF, 0x7E, 0x00, 0xDC, 0xCE, 0xC7, 0xAE, 0x52, 0x98, 0x7D}      /* result */
-  },
-
-  /* #24 */
-  { 10, 2, 33, 12,
-    { 0xD7, 0x82, 0x8D, 0x13, 0xB2, 0xB0, 0xBD, 0xC3, 0x25, 0xA7, 0x62, 0x36, 0xDF, 0x93, 0xCC, 0x6B}, /* AES key */
-    { 0x00, 0x8D, 0x49, 0x3B, 0x30, 0xAE, 0x8B, 0x3C, 0x96, 0x96, 0x76, 0x6C, 0xFA},   /* Nonce */
-    { 0x6E, 0x37, 0xA6, 0xEF, 0x54, 0x6D, 0x95, 0x5D, 0x34, 0xAB, 0x60, 0x59, 0xAB, 0xF2, 0x1C, 0x0B, 0x02, 0xFE, 0xB8, 0x8F, 0x85, 0x6D, 0xF4, 0xA3, 0x73, 0x81, 0xBC, 0xE3, 0xCC, 0x12, 0x85, 0x17, 0xD4},   /* msg */
-    43,        /* length of result */
-    { 0x6E, 0x37, 0xA6, 0xEF, 0x54, 0x6D, 0x95, 0x5D, 0x34, 0xAB, 0x60, 0x59, 0xF3, 0x29, 0x05, 0xB8, 0x8A, 0x64, 0x1B, 0x04, 0xB9, 0xC9, 0xFF, 0xB5, 0x8C, 0xC3, 0x90, 0x90, 0x0F, 0x3D, 0xA1, 0x2A, 0xB1, 0x6D, 0xCE, 0x9E, 0x82, 0xEF, 0xA1, 0x6D, 0xA6, 0x20, 0x59}        /* result */
-  },
-
-  /* #25 */
-  /* Cipher: AES-128 M=16 L=2 K_LEN=1 N_LEN=13 K=0x00 N=0x00000000000000000000000000 */
-  { 16, 2, 0, 0,
-    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* AES key */  
-    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* Nonce */
-    { },       /* msg */
-    16,                /* length of result */
-    { 0x8b, 0x60, 0xab, 0xcd, 0x60, 0x43, 0x81, 0x0b, 
-      0xa3, 0x78, 0xa0, 0x1d, 0x4a, 0x29, 0x83, 0x0b
-    }          /* result */
-  },
-
-  /* #26 */
-  /* Cipher: AES-128 M=16 L=2 K_LEN=1 N_LEN=13 K=0x00 N=0x00000000000000000000000000 */
-  { 16, 2, 37, 0,
-    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* AES key */  
-    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-      0x00, 0x00, 0x00, 0x00 }, /* Nonce */
-    { 0x45, 0x69, 0x6e, 0x20, 0x6b, 0x6c, 0x65, 0x69, 
-      0x6e, 0x65, 0x72, 0x20, 0x54, 0x65, 0x78, 0x74,
-      0x0a, 0x7a, 0x75, 0x6d, 0x20, 0x54, 0x65, 0x73,
-      0x74, 0x65, 0x6e, 0x20, 0x76, 0x6f, 0x6e, 0x20,
-      0x43, 0x43, 0x4d, 0x2e, 0x0a
-    }, /* msg */
-    53,                /* length of result */
-    { 0x90, 0x11, 0x9c, 0x2d, 0x6b, 0xf9, 0xe9, 0x05,
-      0x3e, 0x0b, 0x44, 0x56, 0xca, 0xc8, 0xb6, 0x1a,
-      0x00, 0x57, 0xa9, 0x8b, 0x6b, 0x69, 0x09, 0x7e, 
-      0x8e, 0x50, 0x50, 0x63, 0x50, 0x58, 0x0f, 0x78,
-      0x75, 0x69, 0x6e, 0x9f, 0x3d, 0x63, 0x93, 0xe7,
-      0x7a, 0x84, 0xe9, 0x9f, 0x11, 0x93, 0x95, 0xa0,
-      0x9a, 0xef, 0x0d, 0xa0, 0xed
-    } /* result */
-  },
-
-  /* #27 */
-  /* Cipher: AES-128 M=8 L=5 K_LEN=16 N_LEN=10 K=0x001234567890abcdefdcaffeed3921ee N=0x00112233445566778899 */
-  { 8, 5, 0, 0,
-    { 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd,
-      0xef, 0xdc, 0xaf, 0xfe, 0xed, 0x39, 0x21, 0xee }, /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99 }, /* Nonce */
-    { },           /* msg */
-    8,             /* length of result */
-    { 0xb1, 0x33, 0x51, 0xc8, 0xb3, 0xd5, 0x10, 0xa7 } /* result */
-  },
-
-  /* #28 */
-  /* Cipher: AES-128 M=8 L=5 K_LEN=16 N_LEN=10 K=0x001234567890abcdefdcaffeed3921ee N=0x00112233445566778899 */
-  { 8, 5, 37, 0,
-    { 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd,
-      0xef, 0xdc, 0xaf, 0xfe, 0xed, 0x39, 0x21, 0xee }, /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99 }, /* Nonce */
-    { 0x45, 0x69, 0x6e, 0x20, 0x6b, 0x6c, 0x65, 0x69, 
-      0x6e, 0x65, 0x72, 0x20, 0x54, 0x65, 0x78, 0x74,
-      0x0a, 0x7a, 0x75, 0x6d, 0x20, 0x54, 0x65, 0x73,
-      0x74, 0x65, 0x6e, 0x20, 0x76, 0x6f, 0x6e, 0x20,
-      0x43, 0x43, 0x4d, 0x2e, 0x0a
-    }, /* msg */
-    45,                    /* length of result */
-    { 0x44, 0x7a, 0x82, 0x70, 0x1d, 0xd0, 0x35, 0x7b,
-      0x68, 0xf7, 0x35, 0x4d, 0xbf, 0xd9, 0x16, 0x15,
-      0x97, 0x41, 0x3d, 0x1e, 0x89, 0xc1, 0x25, 0xe7,
-      0xd6, 0xa7, 0xde, 0x90, 0x1e, 0xf1, 0x69, 0x69,
-      0x9f, 0xce, 0x40, 0xdc, 0xf0, 0xd1, 0x74, 0x53,
-      0x2c, 0xa3, 0xb0, 0xcf, 0xb9
-    } /* result */
-  },
-
-  /* #29 */
-  /* Cipher: AES-128 M=14 L=3 K_LEN=16 N_LEN=12 K=0x001234567890abcdefdcaffeed3921ee N=0x001122334455667788990000 */
-  { 14, 3, 0, 0,
-    { 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd,
-      0xef, 0xdc, 0xaf, 0xfe, 0xed, 0x39, 0x21, 0xee }, /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99, 0x00, 0x00 }, /* Nonce */
-    { },           /* msg */
-    14,                    /* length of result */
-    { 0xa4, 0x06, 0xa4, 0x23, 0x93, 0x3d, 0xa0, 0xca,
-      0xb5, 0x90, 0xdb, 0x69, 0x69, 0x33 } /* result */
-  },
-
-  /* #30 */
-  /* Cipher: AES-128 M=14 L=3 K_LEN=16 N_LEN=12 K=0x001234567890abcdefdcaffeed3921ee N=0x001122334455667788990000 */
-  { 14, 3, 37, 0,
-    { 0x00, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd,
-      0xef, 0xdc, 0xaf, 0xfe, 0xed, 0x39, 0x21, 0xee }, /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99, 0x00, 0x00 }, /* Nonce */
-    { 0x45, 0x69, 0x6e, 0x20, 0x6b, 0x6c, 0x65, 0x69, 
-      0x6e, 0x65, 0x72, 0x20, 0x54, 0x65, 0x78, 0x74,
-      0x0a, 0x7a, 0x75, 0x6d, 0x20, 0x54, 0x65, 0x73,
-      0x74, 0x65, 0x6e, 0x20, 0x76, 0x6f, 0x6e, 0x20,
-      0x43, 0x43, 0x4d, 0x2e, 0x0a
-    }, /* msg */
-    51,
-    { 0x60, 0xaf, 0x87, 0x67, 0x4d, 0x9d, 0x54, 0x17,
-      0x16, 0xc0, 0x29, 0x10, 0x7e, 0x3e, 0x34, 0x93,
-      0x78, 0xe8, 0xd3, 0xc8, 0xc1, 0x03, 0x4f, 0xd6,
-      0xf5, 0x3b, 0xaf, 0xd3, 0xf0, 0xd7, 0x0b, 0xdd,
-      0x63, 0x93, 0xed, 0xf2, 0xb2, 0x72, 0xdc, 0xae,
-      0x7c, 0xa0, 0x01, 0xdb, 0x56, 0x2a, 0x06, 0xb6,
-      0xe9, 0xcf, 0x3c } /* result */
-  },
-
-  /* #31 */
-  /* Cipher: AES-128 M=8 L=5 K_LEN=6 N_LEN=10 K=0x11223344aabb N=0x00112233445566778899 */
-  { 8, 5, 0, 0,
-    { 0x11, 0x22, 0x33, 0x44, 0xaa, 0xbb },    /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99 },                            /* Nonce */
-    { },                                       /* msg */
-    8,
-    { 0x28, 0x15, 0xfe, 0x81, 0xdd, 0xc3, 0x79, 0x04 } /* result */
-  },
-
-  /* #32 */
-  /* Cipher: AES-128 M=8 L=5 K_LEN=6 N_LEN=10 K=0x11223344aabb N=0x00112233445566778899 */
-
-  { 8, 5, 37, 0,
-    { 0x11, 0x22, 0x33, 0x44, 0xaa, 0xbb },    /* AES key */
-    { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-      0x88, 0x99 },                            /* Nonce */
-    { 0x45, 0x69, 0x6e, 0x20, 0x6b, 0x6c, 0x65, 0x69, 
-      0x6e, 0x65, 0x72, 0x20, 0x54, 0x65, 0x78, 0x74,
-      0x0a, 0x7a, 0x75, 0x6d, 0x20, 0x54, 0x65, 0x73,
-      0x74, 0x65, 0x6e, 0x20, 0x76, 0x6f, 0x6e, 0x20,
-      0x43, 0x43, 0x4d, 0x2e, 0x0a
-    }, /* msg */
-    45,
-    { 0xdb, 0x31, 0x55, 0x9d, 0xab, 0x70, 0xdc, 0x62,
-      0xd7, 0x76, 0x41, 0xb2, 0x14, 0x9e, 0x9c, 0x26,
-      0x70, 0x61, 0xea, 0x36, 0xf8, 0x0e, 0xdf, 0x19,
-      0xa6, 0xc7, 0x46, 0x3d, 0x5a, 0xc3, 0x0a, 0x73,
-      0x14, 0x96, 0xa4, 0x84, 0x7f, 0x37, 0x55, 0x42,
-      0xce, 0x7e, 0xf9, 0x3b, 0xe5 } /* result */
-  }
-};
diff --git a/extlibs/tinydtls/tests/dsrv-test.c b/extlibs/tinydtls/tests/dsrv-test.c
deleted file mode 100644 (file)
index e7b44a9..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-
-#include "dsrv.h" 
-
-void
-handle_read(struct dsrv_context_t *ctx) {
-  int len;
-  static char buf[200];
-  struct sockaddr_storage src;
-  socklen_t srclen = sizeof(src);
-  int fd = dsrv_get_fd(ctx, DSRV_READ);
-
-  len = recvfrom(fd, buf, sizeof(buf), 0, 
-                (struct sockaddr *)&src, &srclen);
-
-  if (len < 0) {
-    perror("recvfrom");
-  } else {
-    printf("read %d bytes: '%*s'\n", len, len, buf);
-    if (dsrv_sendto(ctx, (struct sockaddr *)&src, srclen, 0, buf, len) 
-       == NULL) {
-      fprintf(stderr, "cannot add packet to sendqueue\n");
-    }
-  }
-}
-
-int
-handle_write(struct dsrv_context_t *ctx) {
-  struct packet_t *p;
-  int fd = dsrv_get_fd(ctx, DSRV_WRITE);
-  int len;
-
-  p = ctx->rq ? nq_peek(ctx->wq) : NULL;
-
-  if (!p)
-    return -1;
-
-  len = sendto(fd, p->buf, p->len, 0, p->raddr, p->rlen);
-  
-  if (len < 0)
-    perror("sendto");
-  else 
-    nq_pop(ctx->wq);
-
-  return len;
-}
-
-int main(int argc, char **argv) {
-
-#if 1
-  struct sockaddr_in6 listen_addr = { AF_INET6, htons(20220), 0, IN6ADDR_ANY_INIT, 0 };
-#else
-  struct sockaddr_in listen_addr = { AF_INET, htons(20220), { htonl(0x7f000001) } };
-#endif
-  fd_set rfds, wfds;
-  struct timeval timeout;
-  struct dsrv_context_t *ctx;
-  int result;
-
-  ctx = dsrv_new_context((struct sockaddr *)&listen_addr, sizeof(listen_addr), 
-                        200,200);
-
-  if (!ctx) {
-    fprintf(stderr, "E: cannot create server context\n");
-    return -1;
-  }
-
-  while (1) {
-    FD_ZERO(&rfds);
-    FD_ZERO(&wfds);
-
-    dsrv_prepare(ctx, &rfds, DSRV_READ);
-    dsrv_prepare(ctx, &wfds, DSRV_WRITE);
-    
-#if 0
-    timeout.tv_sec = 0;
-    timeout.tv_usec = dsrv_get_timeout(ctx);
-#else
-    timeout.tv_sec = 5;
-    timeout.tv_usec = 0;
-#endif
-    
-    result = select( FD_SETSIZE, &rfds, &wfds, 0, &timeout);
-    
-    if (result < 0) {          /* error */
-      if (errno != EINTR)
-       perror("select");
-    } else if (result == 0) {  /* timeout */
-      printf(".");             
-    } else {                   /* ok */
-      if (dsrv_check(ctx, &wfds, DSRV_WRITE))
-       handle_write(ctx);
-      else if (dsrv_check(ctx, &rfds, DSRV_READ))
-       handle_read(ctx);
-    }
-  }
-
-  dsrv_close(ctx);
-  dsrv_free_context(ctx);
-
-  return 0;
-}
diff --git a/extlibs/tinydtls/tests/dtls-client.c b/extlibs/tinydtls/tests/dtls-client.c
deleted file mode 100644 (file)
index 9c71254..0000000
+++ /dev/null
@@ -1,905 +0,0 @@
-#include "iotivity_config.h" 
-#include "tinydtls.h" 
-
-/* This is needed for apple */
-#define __APPLE_USE_RFC_3542
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <ctype.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#include <signal.h>
-#include <getopt.h>
-
-#include "global.h"
-#include "debug.h"
-#include "dtls.h"
-
-/**
- * @struct byte_array
- *
- * General purpose byte array structure.
- *
- * Contains pointer to array of bytes and it's length.
- */
-
-typedef struct
-{
-    uint8_t *data;    /**< Pointer to the byte array */
-    size_t len;      /**< Data size */
-} byte_array;
-
-
-/**@def BYTE_ARRAY_INITIALIZER
- *
- * Initializes of existing byte array pointer to \a NULL.
- */
-#undef BYTE_ARRAY_INITIALIZER
-#define BYTE_ARRAY_INITIALIZER {NULL, 0}
-
-#define DTLS_PRIVATE_KEY_SIZE        (32)
-#define DTLS_PUBLIC_KEY_SIZE         (64)
-
-#define DEFAULT_PORT 20220
-
-#define PSK_CLIENT_IDENTITY  "Client_identity"
-#define PSK_SERVER_IDENTITY  "Server_identity"
-#define PSK_DEFAULT_KEY      "secretPSK"
-#define PSK_OPTIONS          "i:s:k:"
-#define X509_OPTIONS         "x:r:u:"
-
-#ifdef __GNUC__
-#define UNUSED_PARAM __attribute__((unused))
-#else
-#define UNUSED_PARAM
-#endif /* __GNUC__ */
-
-static char buf[200];
-static size_t len = 0;
-
-typedef struct {
-  size_t length;               /* length of string */
-  unsigned char *s;            /* string data */
-} dtls_str;
-
-static dtls_str output_file = { 0, NULL }; /* output file name */
-
-static dtls_context_t *dtls_context = NULL;
-static dtls_context_t *orig_dtls_context = NULL;
-
-#ifdef DTLS_X509
-#define CLIENT_CRT_LEN 293
-static const unsigned char g_client_certificate[CLIENT_CRT_LEN] = {
-        0x00, 0x01, 0x22,
-        0x30, 0x82, 0x01, 0x1e, 0x30, 0x81, 0xc4, 0xa0,
-        0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x38,
-        0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
-        0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x30, 0x17,
-        0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
-        0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
-        0x20, 0x49, 0x53, 0x53, 0x55, 0x45, 0x52, 0x30,
-        0x1e, 0x17, 0x0d, 0x31, 0x33, 0x30, 0x31, 0x30,
-        0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
-        0x17, 0x0d, 0x34, 0x39, 0x30, 0x31, 0x30, 0x31,
-        0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30,
-        0x17, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55,
-        0x04, 0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61,
-        0x6c, 0x20, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54,
-        0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
-        0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
-        0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
-        0x42, 0x00, 0x04, 0xe3, 0xd1, 0x67, 0x1e, 0xdc,
-        0x46, 0xf4, 0x19, 0x50, 0x15, 0x2e, 0x3a, 0x2f,
-        0xd8, 0x68, 0x6b, 0x37, 0x32, 0x84, 0x9e, 0x83,
-        0x81, 0xbf, 0x25, 0x5d, 0xbb, 0x18, 0x07, 0x3c,
-        0xbd, 0xf3, 0xab, 0xd3, 0xbf, 0x53, 0x59, 0xc9,
-        0x1e, 0xce, 0x5b, 0x39, 0x6a, 0xe5, 0x60, 0xf3,
-        0x70, 0xdb, 0x66, 0xb6, 0x80, 0xcb, 0x65, 0x0b,
-        0x35, 0x2a, 0x62, 0x44, 0x89, 0x63, 0x64, 0x6f,
-        0x6f, 0xbd, 0xf0, 0x30, 0x0c, 0x06, 0x08, 0x2a,
-        0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05,
-        0x00, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20,
-        0x60, 0xdc, 0x45, 0x77, 0x7d, 0xcb, 0xc3, 0xb4,
-        0xba, 0x60, 0x5a, 0x2e, 0xe5, 0x4e, 0x19, 0x8b,
-        0x48, 0x8a, 0x87, 0xd4, 0x66, 0xb4, 0x1a, 0x86,
-        0x23, 0x67, 0xb8, 0xb6, 0x50, 0xfe, 0x4d, 0xde,
-        0x02, 0x20, 0x60, 0x68, 0x46, 0xff, 0x74, 0x11,
-        0xfb, 0x36, 0x13, 0xf4, 0xa7, 0x3d, 0xb7, 0x35,
-        0x79, 0x23, 0x29, 0x14, 0x6a, 0x28, 0x09, 0xff,
-        0x8c, 0x19, 0x26, 0xe3, 0x41, 0xc8, 0xe4, 0x13,
-        0xbc, 0x8e};
-//default client's key pair
-static const unsigned char x509_priv_key[] = {
-        0xf9, 0x42, 0xb4, 0x16, 0x89, 0x10, 0xf4, 0x07,
-        0x99, 0xb2, 0xe2, 0x9a, 0xed, 0xd4, 0x39, 0xb8,
-        0xca, 0xd4, 0x9d, 0x76, 0x11, 0x43, 0x3a, 0xac,
-        0x14, 0xba, 0x17, 0x9d, 0x3e, 0xbb, 0xbf, 0xbc};
-
-static const unsigned char x509_pub_key_x[] = {
-        0xe3, 0xd1, 0x67, 0x1e, 0xdc, 0x46, 0xf4, 0x19,
-        0x50, 0x15, 0x2e, 0x3a, 0x2f, 0xd8, 0x68, 0x6b,
-        0x37, 0x32, 0x84, 0x9e, 0x83, 0x81, 0xbf, 0x25,
-        0x5d, 0xbb, 0x18, 0x07, 0x3c, 0xbd, 0xf3, 0xab};
-
-static const unsigned char x509_pub_key_y[] = {
-        0xd3, 0xbf, 0x53, 0x59, 0xc9, 0x1e, 0xce, 0x5b,
-        0x39, 0x6a, 0xe5, 0x60, 0xf3, 0x70, 0xdb, 0x66,
-        0xb6, 0x80, 0xcb, 0x65, 0x0b, 0x35, 0x2a, 0x62,
-        0x44, 0x89, 0x63, 0x64, 0x6f, 0x6f, 0xbd, 0xf0};
-
-//default CA pub key
-static const unsigned char x509_ca_pub_x[] = {
-        0x57, 0x94, 0x7f, 0x98, 0x7a, 0x02, 0x67, 0x09,
-        0x25, 0xc1, 0xcb, 0x5a, 0xf5, 0x46, 0xfb, 0xad,
-        0xf7, 0x68, 0x94, 0x8c, 0xa7, 0xe3, 0xf0, 0x5b,
-        0xc3, 0x6b, 0x5c, 0x9b, 0xd3, 0x7d, 0x74, 0x12
-};
-
-static const unsigned char x509_ca_pub_y[] = {
-        0xce, 0x68, 0xbc, 0x55, 0xf5, 0xf8, 0x1b, 0x3d,
-        0xef, 0xed, 0x1f, 0x2b, 0xd2, 0x69, 0x5d, 0xcf,
-        0x79, 0x16, 0xa6, 0xbd, 0x97, 0x96, 0x27, 0x60,
-        0x5d, 0xd1, 0xb7, 0x93, 0xa2, 0x4a, 0x62, 0x4d
-};
-
-//default server's key pair
-static const unsigned char serv_pub_key_x[] = {
-        0x07, 0x88, 0x10, 0xdc, 0x62, 0xd7, 0xe6, 0x9b,
-        0x7c, 0xad, 0x6e, 0x78, 0xb0, 0x5f, 0x9a, 0x00,
-        0x11, 0x74, 0x2c, 0x8b, 0xaf, 0x09, 0x65, 0x7c,
-        0x86, 0x8e, 0x55, 0xcb, 0x39, 0x55, 0x72, 0xc6};
-
-static const unsigned char serv_pub_key_y[] = {
-        0x65, 0x71, 0xcd, 0x03, 0xdc, 0x2a, 0x4f, 0x46,
-        0x5b, 0x14, 0xc8, 0x27, 0x74, 0xab, 0xf4, 0x1f,
-        0xc1, 0x35, 0x0d, 0x42, 0xbc, 0xc2, 0x9f, 0xb5,
-        0xc1, 0x79, 0xb6, 0x8b, 0xca, 0xdb, 0xff, 0x82};
-
-
-static unsigned char x509_client_cert[DTLS_MAX_CERT_SIZE];
-static size_t x509_client_cert_len = 0;
-static unsigned char x509_client_priv[DTLS_PRIVATE_KEY_SIZE+1];
-static size_t x509_client_priv_is_set = 0;
-static unsigned char x509_ca_pub[DTLS_PUBLIC_KEY_SIZE+1];
-static size_t x509_ca_pub_is_set = 0;
-
-static int x509_info_from_file = 0;
-#endif /*DTLS_X509*/
-#ifdef DTLS_ECC
-static const unsigned char ecdsa_priv_key[] = {
-                       0x41, 0xC1, 0xCB, 0x6B, 0x51, 0x24, 0x7A, 0x14,
-                       0x43, 0x21, 0x43, 0x5B, 0x7A, 0x80, 0xE7, 0x14,
-                       0x89, 0x6A, 0x33, 0xBB, 0xAD, 0x72, 0x94, 0xCA,
-                       0x40, 0x14, 0x55, 0xA1, 0x94, 0xA9, 0x49, 0xFA};
-
-static const unsigned char ecdsa_pub_key_x[] = {
-                       0x36, 0xDF, 0xE2, 0xC6, 0xF9, 0xF2, 0xED, 0x29,
-                       0xDA, 0x0A, 0x9A, 0x8F, 0x62, 0x68, 0x4E, 0x91,
-                       0x63, 0x75, 0xBA, 0x10, 0x30, 0x0C, 0x28, 0xC5,
-                       0xE4, 0x7C, 0xFB, 0xF2, 0x5F, 0xA5, 0x8F, 0x52};
-
-static const unsigned char ecdsa_pub_key_y[] = {
-                       0x71, 0xA0, 0xD4, 0xFC, 0xDE, 0x1A, 0xB8, 0x78,
-                       0x5A, 0x3C, 0x78, 0x69, 0x35, 0xA7, 0xCF, 0xAB,
-                       0xE9, 0x3F, 0x98, 0x72, 0x09, 0xDA, 0xED, 0x0B,
-                       0x4F, 0xAB, 0xC3, 0x6F, 0xC7, 0x72, 0xF8, 0x29};
-
-#endif /*DTLS_ECC*/
-#if defined(DTLS_PSK) || defined(DTLS_X509)
-ssize_t
-read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
-  FILE *f;
-  ssize_t result = 0;
-
-  f = fopen(arg, "r");
-  if (f == NULL)
-    return -1;
-
-  while (!feof(f)) {
-    size_t bytes_read;
-    bytes_read = fread(buf, 1, max_buf_len, f);
-    if (ferror(f)) {
-      result = -1;
-      break;
-    }
-
-    buf += bytes_read;
-    result += bytes_read;
-    max_buf_len -= bytes_read;
-  }
-  fclose(f);
-  return result;
-}
-#endif /*DTLS_PSK||DTLS_X509*/
-#ifdef DTLS_PSK
-/* The PSK information for DTLS */
-#define PSK_ID_MAXLEN 256
-#define PSK_MAXLEN 256
-static unsigned char psk_client_id[PSK_ID_MAXLEN];
-static size_t psk_client_id_length = 0;
-static unsigned char psk_server_id[PSK_ID_MAXLEN];
-static size_t psk_server_id_length = 0;
-static unsigned char psk_key[PSK_MAXLEN];
-static size_t psk_key_length = 0;
-
-/* This function is the "key store" for tinyDTLS. It is called to
- * retrieve a key for the given identity within this particular
- * session. */
-static int
-get_psk_info(struct dtls_context_t *ctx UNUSED_PARAM,
-           const session_t *session UNUSED_PARAM,
-           dtls_credentials_type_t type,
-           const unsigned char *id, size_t id_len,
-           unsigned char *result, size_t result_length) {
-
-  switch (type) {
-  case DTLS_PSK_IDENTITY:
-    if (id_len) {
-      dtls_debug("got psk_identity_hint: '%.*s'\n", id_len, id);
-    }
-
-    if (result_length < psk_client_id_length) {
-      dtls_warn("cannot set psk_identity -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_client_id, psk_client_id_length);
-    return psk_client_id_length;
-  case DTLS_PSK_KEY:
-    if (id_len != psk_server_id_length || memcmp(psk_server_id, id, id_len) != 0) {
-      dtls_debug("PSK for unknown id requested\n");
-    }
-    if (result_length < psk_key_length) {
-      dtls_warn("cannot set psk -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, psk_key, psk_key_length);
-    return psk_key_length;
-  default:
-    dtls_warn("unsupported request type: %d\n", type);
-  }
-
-  return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-}
-#endif /* DTLS_PSK */
-
-#ifdef DTLS_ECC
-static int
-get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecc_key_t **result) {
-    (void)ctx;
-    (void)session;
-  static const dtls_ecc_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = ecdsa_priv_key,
-    .pub_key_x = ecdsa_pub_key_x,
-    .pub_key_y = ecdsa_pub_key_y
-  };
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-verify_ecdsa_key(struct dtls_context_t *ctx,
-                const session_t *session,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-  (void)ctx;
-  (void)session;
-  (void)other_pub_x;
-  (void)other_pub_y;
-  (void)key_size;
-  return 0;
-}
-
-#endif /* DTLS_ECC */
-
-#ifdef DTLS_X509
-static int
-get_x509_key(struct dtls_context_t *ctx,
-          const session_t *session,
-          const dtls_ecc_key_t **result) {
-    (void)ctx;
-    (void)session;
-  static dtls_ecc_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = x509_priv_key,
-    .pub_key_x = x509_pub_key_x,
-    .pub_key_y = x509_pub_key_y
-  };
-  if (x509_info_from_file)
-      ecdsa_key.priv_key = x509_client_priv;
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-get_x509_cert(struct dtls_context_t *ctx,
-        const session_t *session,
-        const unsigned char **cert,
-        size_t *cert_size)
-{
-    (void)ctx;
-    (void)session;
-    if (x509_info_from_file)
-    {
-        *cert = x509_client_cert;
-        *cert_size = x509_client_cert_len;
-    }
-    else
-    {
-        *cert = g_client_certificate;
-        *cert_size = CLIENT_CRT_LEN;
-    }
-
-    return 0;
-}
-
-int check_certificate(byte_array cert_der_code, byte_array ca_public_key)
-{
-    (void)cert_der_code;
-    (void)ca_public_key;
-    return 0;
-}
-
-static int verify_x509_cert(struct dtls_context_t *ctx, const session_t *session,
-                                  const unsigned char *cert, size_t cert_size,
-                                  unsigned char *x,
-                                  size_t x_size,
-                                  unsigned char *y,
-                                  size_t y_size)
-{
-    int ret;
-    const unsigned char *ca_pub_x;
-    const unsigned char *ca_pub_y;
-    byte_array cert_der_code = BYTE_ARRAY_INITIALIZER;
-    byte_array ca_public_key = BYTE_ARRAY_INITIALIZER;
-    unsigned char ca_pub_key[DTLS_PUBLIC_KEY_SIZE];
-    (void)ctx;
-    (void)session;
-
-    if (x509_info_from_file)
-    {
-        ca_pub_x = x509_ca_pub;
-        ca_pub_y = x509_ca_pub + DTLS_PUBLIC_KEY_SIZE/2;
-    }
-    else
-    {
-        ca_pub_x = x509_ca_pub_x;
-        ca_pub_y = x509_ca_pub_y;
-    }
-
-    cert_der_code.data = (uint8_t *)cert;
-    cert_der_code.len = cert_size;
-
-    ca_public_key.len = DTLS_PUBLIC_KEY_SIZE;
-    ca_public_key.data = ca_pub_key;
-    memcpy(ca_public_key.data, ca_pub_x, DTLS_PUBLIC_KEY_SIZE/2);
-    memcpy(ca_public_key.data + DTLS_PUBLIC_KEY_SIZE/2, ca_pub_y, DTLS_PUBLIC_KEY_SIZE/2);
-
-    memcpy(x, serv_pub_key_x, x_size);
-    memcpy(y, serv_pub_key_y, y_size);
-
-    ret = (int) check_certificate(cert_der_code, ca_public_key);
-
-    return -ret;
-}
-
-static int is_x509_active(struct dtls_context_t *ctx)
-{
-    (void)ctx;
-    return 0;
-}
-
-#endif /* DTLS_X509 */
-
-static void
-try_send(struct dtls_context_t *ctx, session_t *dst) {
-  int res;
-  res = dtls_write(ctx, dst, (uint8 *)buf, len);
-  if (res >= 0) {
-    memmove(buf, buf + res, len - res);
-    len -= res;
-  }
-}
-
-static void
-handle_stdin() {
-  if (fgets(buf + len, sizeof(buf) - len, stdin))
-    len += strlen(buf + len);
-}
-
-static int
-read_from_peer(struct dtls_context_t *ctx, 
-              session_t *session, uint8 *data, size_t len) {
-  size_t i;
-  (void)ctx;
-  (void)session;
-  for (i = 0; i < len; i++)
-    printf("%c", data[i]);
-  return 0;
-}
-
-static int
-send_to_peer(struct dtls_context_t *ctx, 
-            session_t *session, uint8 *data, size_t len) {
-
-  int fd = *(int *)dtls_get_app_data(ctx);
-  return sendto(fd, data, len, MSG_DONTWAIT,
-               &session->addr.sa, session->size);
-}
-
-static int
-dtls_handle_read(struct dtls_context_t *ctx) {
-  int fd;
-  session_t session;
-#define MAX_READ_BUF 2000
-  static uint8 buf[MAX_READ_BUF];
-  int len;
-
-  fd = *(int *)dtls_get_app_data(ctx);
-  
-  if (!fd)
-    return -1;
-
-  memset(&session, 0, sizeof(session_t));
-  session.size = sizeof(session.addr);
-  len = recvfrom(fd, buf, MAX_READ_BUF, 0, 
-                &session.addr.sa, &session.size);
-  
-  if (len < 0) {
-    perror("recvfrom");
-    return -1;
-  } else {
-    dtls_dsrv_log_addr(DTLS_LOG_DEBUG, "peer", &session);
-    dtls_debug_dump("bytes from peer", buf, len);
-  }
-
-  return dtls_handle_message(ctx, &session, buf, len);
-}    
-
-static void dtls_handle_signal(int sig)
-{
-  dtls_free_context(dtls_context);
-  dtls_free_context(orig_dtls_context);
-  signal(sig, SIG_DFL);
-#ifdef _WIN32
-  exit(sig);
-#else
-  kill(getpid(), sig);
-#endif
-}
-
-/* stolen from libcoap: */
-static int
-resolve_address(const char *server, struct sockaddr *dst) {
-  
-  struct addrinfo *res, *ainfo;
-  struct addrinfo hints;
-  static char addrstr[256];
-  int error;
-
-  memset(addrstr, 0, sizeof(addrstr));
-  if (server && strlen(server) > 0)
-    memcpy(addrstr, server, strlen(server));
-  else
-    memcpy(addrstr, "localhost", 9);
-
-  memset ((char *)&hints, 0, sizeof(hints));
-  hints.ai_socktype = SOCK_DGRAM;
-  hints.ai_family = AF_UNSPEC;
-
-  error = getaddrinfo(addrstr, "", &hints, &res);
-
-  if (error != 0) {
-    fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error));
-    return error;
-  }
-
-  for (ainfo = res; ainfo != NULL; ainfo = ainfo->ai_next) {
-
-    switch (ainfo->ai_family) {
-    case AF_INET6:
-    case AF_INET:
-
-      memcpy(dst, ainfo->ai_addr, ainfo->ai_addrlen);
-      return ainfo->ai_addrlen;
-    default:
-      ;
-    }
-  }
-
-  freeaddrinfo(res);
-  return -1;
-}
-
-/*---------------------------------------------------------------------------*/
-static void
-usage( const char *program, const char *version) {
-  const char *p;
-
-  p = strrchr( program, '/' );
-  if ( p )
-    program = ++p;
-
-  fprintf(stderr, "%s v%s -- DTLS client implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
-         "usage: %s"
-#ifdef DTLS_PSK
-          " [-i file] [-s file] [-k file]"
-#endif /* DTLS_PSK */
-#ifdef DTLS_X509
-          " [-x file] [-r file] [-u file]"
-#endif /* DTLS_X509 */
-          " [-o file] [-p port] [-v num] [-c num] addr [port]\n"
-#ifdef DTLS_PSK
-         "\t-i file\t\tread PSK Client identity from file\n"
-         "\t-s file\t\tread PSK Server identity from file\n"
-         "\t-k file\t\tread pre-shared key from file\n"
-#endif /* DTLS_PSK */
-#ifdef DTLS_X509
-          "\t-x file\tread Client certificate from file\n"
-          "\t-r file\tread Client private key from file\n"
-          "\t-u file\tread CA public key from file\n"
-#endif /* DTLS_X509 */
-         "\t-o file\t\toutput received data to this file (use '-' for STDOUT)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-          "\t-c num\t\tcipher suite (default: 1)\n"
-          "\t\t\t1: TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 \n"
-          "\t\t\t2: TLS_PSK_WITH_AES_128_CCM_8\n"
-          "\t\t\t3: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8\n"
-          "\t\t\t4: TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256\n",
-          program, version, program, DEFAULT_PORT);
-}
-
-static dtls_handler_t cb = {
-  .write = send_to_peer,
-  .read  = read_from_peer,
-  .event = NULL,
-#ifdef DTLS_PSK
-  .get_psk_info = get_psk_info,
-#endif /* DTLS_PSK */
-#ifdef DTLS_ECC
-  .get_ecdsa_key = get_ecdsa_key,
-  .verify_ecdsa_key = verify_ecdsa_key,
-#endif /* DTLS_ECC */
-#ifdef DTLS_X509
-  .get_x509_key = get_x509_key,
-  .verify_x509_cert = verify_x509_cert,
-  .get_x509_cert = get_x509_cert,
-  .is_x509_active = is_x509_active,
-#endif /* DTLS_X509 */
-
-};
-
-#define DTLS_CLIENT_CMD_CLOSE "client:close"
-#define DTLS_CLIENT_CMD_RENEGOTIATE "client:renegotiate"
-
-/* As per RFC 6347 section 4.2.8, DTLS Server should support requests
- * from clients who have silently abandoned the existing association
- * and initiated a new handshake request by sending a ClientHello.
- * Below command tests this feature.
- */
-#define DTLS_CLIENT_CMD_REHANDSHAKE "client:rehandshake"
-
-int 
-main(int argc, char **argv) {
-  fd_set rfds, wfds;
-  struct timeval timeout;
-  unsigned short port = DEFAULT_PORT;
-  char port_str[NI_MAXSERV] = "0";
-  log_t log_level = DTLS_LOG_WARN;
-  int fd, result;
-  int on = 1;
-  dtls_cipher_t selected_cipher = TLS_NULL_WITH_NULL_NULL;
-  dtls_cipher_enable_t ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-  int opt, res;
-  session_t dst;
-
-  dtls_init();
-  snprintf(port_str, sizeof(port_str), "%d", port);
-
-#ifdef DTLS_PSK
-  psk_client_id_length = strlen(PSK_CLIENT_IDENTITY);
-  psk_server_id_length = strlen(PSK_SERVER_IDENTITY);
-  psk_key_length = strlen(PSK_DEFAULT_KEY);
-  memcpy(psk_client_id, PSK_CLIENT_IDENTITY, psk_client_id_length);
-  memcpy(psk_server_id, PSK_SERVER_IDENTITY, psk_server_id_length);
-  memcpy(psk_key, PSK_DEFAULT_KEY, psk_key_length);
-#endif /* DTLS_PSK */
-
-  while ((opt = getopt(argc, argv, "p:o:v:c:" PSK_OPTIONS X509_OPTIONS)) != -1) {
-    switch (opt) {
-#ifdef DTLS_PSK
-    case 'i' : {
-      ssize_t result = read_from_file(optarg, psk_client_id, PSK_ID_MAXLEN);
-      if (result < 0) {
-       dtls_warn("cannot read Client PSK identity\n");
-      } else {
-       psk_client_id_length = result;
-      }
-      break;
-    }
-    case 's' : {
-      ssize_t result = read_from_file(optarg, psk_server_id, PSK_ID_MAXLEN);
-      if (result < 0) {
-       dtls_warn("cannot read Server PSK identity\n");
-      } else {
-       psk_server_id_length = result;
-      }
-      break;
-    }
-    case 'k' : {
-      ssize_t result = read_from_file(optarg, psk_key, PSK_MAXLEN);
-      if (result < 0) {
-       dtls_warn("cannot read PSK\n");
-      } else {
-       psk_key_length = result;
-      }
-      break;
-    }
-#endif /* DTLS_PSK */
-#ifdef DTLS_X509
-    case 'x' :
-    {
-      ssize_t result = read_from_file(optarg, x509_client_cert, DTLS_MAX_CERT_SIZE);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read Client certificate. Using default\n");
-      }
-      else
-      {
-          x509_client_cert_len = result;
-      }
-      break;
-    }
-    case 'r' :
-    {
-      ssize_t result = read_from_file(optarg, x509_client_priv, DTLS_PRIVATE_KEY_SIZE+1);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read Client private key. Using default\n");
-      }
-      else
-      {
-          x509_client_priv_is_set = result;
-      }
-      break;
-    }
-    case 'u' :
-    {
-      ssize_t result = read_from_file(optarg, x509_ca_pub, DTLS_PUBLIC_KEY_SIZE+1);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read CA public key. Using default\n");
-      }
-      else
-      {
-          x509_ca_pub_is_set = result;
-      }
-      break;
-    }
-#endif /* DTLS_X509 */
-    case 'p' :
-      strncpy(port_str, optarg, NI_MAXSERV-1);
-      port_str[NI_MAXSERV - 1] = '\0';
-      break;
-    case 'o' :
-      output_file.length = strlen(optarg);
-      output_file.s = (unsigned char *)malloc(output_file.length + 1);
-
-      if (!output_file.s) {
-       dtls_crit("cannot set output file: insufficient memory\n");
-       exit(-1);
-      } else {
-       /* copy filename including trailing zero */
-       memcpy(output_file.s, optarg, output_file.length + 1);
-      }
-      break;
-    case 'v' :
-      log_level = strtol(optarg, NULL, 10);
-      break;
-    case 'c':
-      if( strcmp(optarg, "1") == 0)
-      {
-          selected_cipher = TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256;
-          ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-      }
-      else if( strcmp(optarg, "2") == 0)
-      {
-          selected_cipher = TLS_PSK_WITH_AES_128_CCM_8 ;
-          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-      }
-      else if( strcmp(optarg, "3") == 0)
-      {
-          selected_cipher = TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ;
-          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-      }
-      else if( strcmp(optarg, "4") == 0)
-      {
-          selected_cipher = TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256;
-          ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-      }
-      break;
-    default:
-      usage(argv[0], dtls_package_version());
-      exit(1);
-    }
-  }
-
-  dtls_set_log_level(log_level);
-
-  if (argc <= optind) {
-    usage(argv[0], dtls_package_version());
-    exit(1);
-  }
-
-#ifdef DTLS_X509
-  if (x509_client_cert_len && x509_client_priv_is_set && x509_ca_pub_is_set)
-  {
-      x509_info_from_file = 1;
-  }
-  else if(!(x509_client_cert_len || x509_client_priv_is_set || x509_ca_pub_is_set))
-  {
-      x509_info_from_file = 0;
-  }
-  else
-  {
-      fprintf(stderr,"please set -x, -r, -u options simultaneously");
-      usage(argv[0], dtls_package_version());
-      exit(1);
-  }
-#endif /* DTLS_X509 */
-
-  memset(&dst, 0, sizeof(session_t));
-  /* resolve destination address where server should be sent */
-  res = resolve_address(argv[optind++], &dst.addr.sa);
-  if (res < 0) {
-    dtls_emerg("failed to resolve address\n");
-    exit(-1);
-  }
-  dst.size = res;
-
-  /* use port number from command line when specified or the listen
-     port, otherwise */
-  dst.addr.sin.sin_port = htons(atoi(optind < argc ? argv[optind++] : port_str));
-
-  
-  /* init socket and set it to non-blocking */
-  fd = socket(dst.addr.sa.sa_family, SOCK_DGRAM, 0);
-
-  if (fd < 0) {
-    dtls_alert("socket: %s\n", strerror(errno));
-    return 0;
-  }
-
-  if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, OPTVAL_T(&on), sizeof(on) ) < 0) {
-    dtls_alert("setsockopt SO_REUSEADDR: %s\n", strerror(errno));
-  }
-#if 0
-  flags = fcntl(fd, F_GETFL, 0);
-  if (flags < 0 || fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
-    dtls_alert("fcntl: %s\n", strerror(errno));
-    goto error;
-  }
-#endif
-  on = 1;
-#ifdef IPV6_RECVPKTINFO
-  if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, OPTVAL_T(&on), sizeof(on) ) < 0) {
-#else /* IPV6_RECVPKTINFO */
-  if (setsockopt(fd, IPPROTO_IPV6, IPV6_PKTINFO, OPTVAL_T(&on), sizeof(on) ) < 0) {
-#endif /* IPV6_RECVPKTINFO */
-    dtls_alert("setsockopt IPV6_PKTINFO: %s\n", strerror(errno));
-  }
-
-  if (signal(SIGINT, dtls_handle_signal) == SIG_ERR) {
-    dtls_alert("An error occurred while setting a signal handler.\n");
-    return EXIT_FAILURE;
-  }
-
-  dtls_context = dtls_new_context(&fd);
-  if (!dtls_context) {
-    dtls_emerg("cannot create context\n");
-    exit(-1);
-  }
-
-
-  /* select cipher suite */
-  dtls_select_cipher(dtls_context, selected_cipher);
-
-  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha_256 */
-  dtls_enables_anon_ecdh(dtls_context, ecdh_anon_enalbe);
-
-  dtls_set_handler(dtls_context, &cb);
-
-  dtls_connect(dtls_context, &dst);
-
-  while (1) {
-    FD_ZERO(&rfds);
-    FD_ZERO(&wfds);
-
-    FD_SET(fileno(stdin), &rfds);
-    FD_SET(fd, &rfds);
-    /* FD_SET(fd, &wfds); */
-    
-    timeout.tv_sec = 5;
-    timeout.tv_usec = 0;
-    
-    result = select(fd+1, &rfds, &wfds, 0, &timeout);
-    
-    if (result < 0) {          /* error */
-      if (errno != EINTR)
-       perror("select");
-    } else if (result == 0) {  /* timeout */
-    } else {                   /* ok */
-      if (FD_ISSET(fd, &wfds))
-       /* FIXME */;
-      else if (FD_ISSET(fd, &rfds))
-       dtls_handle_read(dtls_context);
-      else if (FD_ISSET(fileno(stdin), &rfds))
-       handle_stdin();
-    }
-
-    if (len) {
-      if (len >= strlen(DTLS_CLIENT_CMD_CLOSE) &&
-         !memcmp(buf, DTLS_CLIENT_CMD_CLOSE, strlen(DTLS_CLIENT_CMD_CLOSE))) {
-       printf("client: closing connection\n");
-       dtls_close(dtls_context, &dst);
-       len = 0;
-      } else if (len >= strlen(DTLS_CLIENT_CMD_RENEGOTIATE) &&
-                !memcmp(buf, DTLS_CLIENT_CMD_RENEGOTIATE, strlen(DTLS_CLIENT_CMD_RENEGOTIATE))) {
-       printf("client: renegotiate connection\n");
-       dtls_renegotiate(dtls_context, &dst);
-       len = 0;
-      } else if (len >= strlen(DTLS_CLIENT_CMD_REHANDSHAKE) &&
-                !memcmp(buf, DTLS_CLIENT_CMD_REHANDSHAKE, strlen(DTLS_CLIENT_CMD_REHANDSHAKE))) {
-       printf("client: rehandshake connection\n");
-       if (orig_dtls_context == NULL) {
-         /* Cache the current context. We cannot free the current context as it will notify 
-          * the Server to close the connection (which we do not want).
-          */
-         orig_dtls_context = dtls_context;
-         /* Now, Create a new context and attempt to initiate a handshake. */
-         dtls_context = dtls_new_context(&fd);
-         if (!dtls_context) {
-           dtls_emerg("cannot create context\n");
-           exit(-1);
-          }
-         dtls_set_handler(dtls_context, &cb);
-         dtls_connect(dtls_context, &dst);
-       }
-       len = 0;
-      } else {
-       try_send(dtls_context, &dst);
-      }
-    }
-  }
-  
-  dtls_free_context(dtls_context);
-  dtls_free_context(orig_dtls_context);
-  exit(0);
-}
-
diff --git a/extlibs/tinydtls/tests/dtls-server.c b/extlibs/tinydtls/tests/dtls-server.c
deleted file mode 100644 (file)
index 07acd18..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-
-/* This is needed for apple */
-#define __APPLE_USE_RFC_3542
-
-#include "iotivity_config.h"
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#include <signal.h>
-#include <getopt.h>
-#include "platform_features.h"
-
-#include "tinydtls.h"
-#include "dtls.h"
-#include "debug.h"
-
-#ifdef DTLS_X509
-#define DTLS_PRIVATE_KEY_SIZE        (32)
-#define DTLS_PUBLIC_KEY_SIZE         (64)
-#endif
-
-#define DEFAULT_PORT 20220
-
-/**
- * @struct byte_array
- *
- * General purpose byte array structure.
- *
- * Contains pointer to array of bytes and it's length.
- */
-
-typedef struct
-{
-    uint8_t *data;    /**< Pointer to the byte array */
-    size_t len;      /**< Data size */
-} byte_array;
-
-
-/**@def BYTE_ARRAY_INITIALIZER
- *
- * Initializes of existing byte array pointer to \a NULL.
- */
-#undef BYTE_ARRAY_INITIALIZER
-#define BYTE_ARRAY_INITIALIZER {NULL, 0}
-
-#ifdef DTLS_X509
-#define X509_OPTIONS         "x:r:u:"
-#define SERVER_CRT_LEN 295
-static const unsigned char g_server_certificate[SERVER_CRT_LEN] = {
-        0x00, 0x01, 0x24,
-        0x30, 0x82, 0x01, 0x20, 0x30, 0x81, 0xc4, 0xa0,
-        0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x37,
-        0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
-        0x3d, 0x04, 0x03, 0x02, 0x05, 0x00, 0x30, 0x17,
-        0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04,
-        0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
-        0x20, 0x49, 0x53, 0x53, 0x55, 0x45, 0x52, 0x30,
-        0x1e, 0x17, 0x0d, 0x31, 0x33, 0x30, 0x31, 0x30,
-        0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
-        0x17, 0x0d, 0x34, 0x39, 0x30, 0x31, 0x30, 0x31,
-        0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30,
-        0x17, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55,
-        0x04, 0x03, 0x0c, 0x0c, 0x4c, 0x6f, 0x63, 0x61,
-        0x6c, 0x20, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52,
-        0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
-        0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
-        0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
-        0x42, 0x00, 0x04, 0x07, 0x88, 0x10, 0xdc, 0x62,
-        0xd7, 0xe6, 0x9b, 0x7c, 0xad, 0x6e, 0x78, 0xb0,
-        0x5f, 0x9a, 0x00, 0x11, 0x74, 0x2c, 0x8b, 0xaf,
-        0x09, 0x65, 0x7c, 0x86, 0x8e, 0x55, 0xcb, 0x39,
-        0x55, 0x72, 0xc6, 0x65, 0x71, 0xcd, 0x03, 0xdc,
-        0x2a, 0x4f, 0x46, 0x5b, 0x14, 0xc8, 0x27, 0x74,
-        0xab, 0xf4, 0x1f, 0xc1, 0x35, 0x0d, 0x42, 0xbc,
-        0xc2, 0x9f, 0xb5, 0xc1, 0x79, 0xb6, 0x8b, 0xca,
-        0xdb, 0xff, 0x82, 0x30, 0x0c, 0x06, 0x08, 0x2a,
-        0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x05,
-        0x00, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,
-        0x00, 0xb1, 0x81, 0x81, 0x92, 0x0e, 0x76, 0x7c,
-        0xeb, 0xf5, 0x37, 0xde, 0x27, 0xc4, 0x01, 0xc8,
-        0x96, 0xc3, 0xe5, 0x9f, 0x47, 0x7e, 0x25, 0x92,
-        0xa4, 0xba, 0x22, 0x25, 0xa3, 0x81, 0x19, 0xcf,
-        0x0d, 0x02, 0x21, 0x00, 0xca, 0x92, 0xbe, 0x79,
-        0xc7, 0x82, 0x84, 0x64, 0xc4, 0xc4, 0xf4, 0x3d,
-        0x69, 0x79, 0x68, 0xc0, 0xf1, 0xba, 0xaf, 0x6c,
-        0xbb, 0xdd, 0x54, 0x7d, 0x07, 0xe7, 0x53, 0x3b,
-        0xc3, 0x1b, 0x87, 0x04};
-
-//default server's key pair
-static const unsigned char x509_priv_key[] = {
-        0xaa, 0xa3, 0x46, 0xf1, 0x3c, 0x56, 0x5d, 0x08,
-        0x5e, 0x59, 0xba, 0x7f, 0xd2, 0x21, 0x62, 0xc6,
-        0xcc, 0x5d, 0xfa, 0x3f, 0xb5, 0x25, 0xa9, 0x89,
-        0x4f, 0x32, 0xe8, 0x2a, 0xe0, 0xee, 0x9b, 0x4c};
-
-static const unsigned char x509_pub_key_x[] = {
-        0x07, 0x88, 0x10, 0xdc, 0x62, 0xd7, 0xe6, 0x9b,
-        0x7c, 0xad, 0x6e, 0x78, 0xb0, 0x5f, 0x9a, 0x00,
-        0x11, 0x74, 0x2c, 0x8b, 0xaf, 0x09, 0x65, 0x7c,
-        0x86, 0x8e, 0x55, 0xcb, 0x39, 0x55, 0x72, 0xc6};
-
-static const unsigned char x509_pub_key_y[] = {
-        0x65, 0x71, 0xcd, 0x03, 0xdc, 0x2a, 0x4f, 0x46,
-        0x5b, 0x14, 0xc8, 0x27, 0x74, 0xab, 0xf4, 0x1f,
-        0xc1, 0x35, 0x0d, 0x42, 0xbc, 0xc2, 0x9f, 0xb5,
-        0xc1, 0x79, 0xb6, 0x8b, 0xca, 0xdb, 0xff, 0x82};
-
-//default CA pub key
-static const unsigned char x509_ca_pub_x[] = {
-        0x57, 0x94, 0x7f, 0x98, 0x7a, 0x02, 0x67, 0x09,
-        0x25, 0xc1, 0xcb, 0x5a, 0xf5, 0x46, 0xfb, 0xad,
-        0xf7, 0x68, 0x94, 0x8c, 0xa7, 0xe3, 0xf0, 0x5b,
-        0xc3, 0x6b, 0x5c, 0x9b, 0xd3, 0x7d, 0x74, 0x12
-};
-
-static const unsigned char x509_ca_pub_y[] = {
-        0xce, 0x68, 0xbc, 0x55, 0xf5, 0xf8, 0x1b, 0x3d,
-        0xef, 0xed, 0x1f, 0x2b, 0xd2, 0x69, 0x5d, 0xcf,
-        0x79, 0x16, 0xa6, 0xbd, 0x97, 0x96, 0x27, 0x60,
-        0x5d, 0xd1, 0xb7, 0x93, 0xa2, 0x4a, 0x62, 0x4d
-};
-
-static const unsigned char client_pub_key_x[] = {
-        0xe3, 0xd1, 0x67, 0x1e, 0xdc, 0x46, 0xf4, 0x19,
-        0x50, 0x15, 0x2e, 0x3a, 0x2f, 0xd8, 0x68, 0x6b,
-        0x37, 0x32, 0x84, 0x9e, 0x83, 0x81, 0xbf, 0x25,
-        0x5d, 0xbb, 0x18, 0x07, 0x3c, 0xbd, 0xf3, 0xab};
-
-static const unsigned char client_pub_key_y[] = {
-        0xd3, 0xbf, 0x53, 0x59, 0xc9, 0x1e, 0xce, 0x5b,
-        0x39, 0x6a, 0xe5, 0x60, 0xf3, 0x70, 0xdb, 0x66,
-        0xb6, 0x80, 0xcb, 0x65, 0x0b, 0x35, 0x2a, 0x62,
-        0x44, 0x89, 0x63, 0x64, 0x6f, 0x6f, 0xbd, 0xf0};
-
-static unsigned char x509_server_cert[DTLS_MAX_CERT_SIZE];
-static size_t x509_server_cert_len = 0;
-static unsigned char x509_server_priv[DTLS_PRIVATE_KEY_SIZE+1];
-static size_t x509_server_priv_is_set = 0;
-static unsigned char x509_ca_pub[DTLS_PUBLIC_KEY_SIZE+1];
-static size_t x509_ca_pub_is_set = 0;
-
-static int x509_info_from_file = 0;
-#endif /*DTLS_X509*/
-#ifdef DTLS_ECC
-static const unsigned char ecdsa_priv_key[] = {
-                       0xD9, 0xE2, 0x70, 0x7A, 0x72, 0xDA, 0x6A, 0x05,
-                       0x04, 0x99, 0x5C, 0x86, 0xED, 0xDB, 0xE3, 0xEF,
-                       0xC7, 0xF1, 0xCD, 0x74, 0x83, 0x8F, 0x75, 0x70,
-                       0xC8, 0x07, 0x2D, 0x0A, 0x76, 0x26, 0x1B, 0xD4};
-
-static const unsigned char ecdsa_pub_key_x[] = {
-                       0xD0, 0x55, 0xEE, 0x14, 0x08, 0x4D, 0x6E, 0x06,
-                       0x15, 0x59, 0x9D, 0xB5, 0x83, 0x91, 0x3E, 0x4A,
-                       0x3E, 0x45, 0x26, 0xA2, 0x70, 0x4D, 0x61, 0xF2,
-                       0x7A, 0x4C, 0xCF, 0xBA, 0x97, 0x58, 0xEF, 0x9A};
-
-static const unsigned char ecdsa_pub_key_y[] = {
-                       0xB4, 0x18, 0xB6, 0x4A, 0xFE, 0x80, 0x30, 0xDA,
-                       0x1D, 0xDC, 0xF4, 0xF4, 0x2E, 0x2F, 0x26, 0x31,
-                       0xD0, 0x43, 0xB1, 0xFB, 0x03, 0xE2, 0x2F, 0x4D,
-                       0x17, 0xDE, 0x43, 0xF9, 0xF9, 0xAD, 0xEE, 0x70};
-#endif /*DTLS_ECC*/
-#if 0
-/* SIGINT handler: set quit to 1 for graceful termination */
-void
-handle_sigint(int signum) {
-  dsrv_stop(dsrv_get_context());
-}
-#endif
-
-#ifdef DTLS_X509
-ssize_t
-read_from_file(char *arg, unsigned char *buf, size_t max_buf_len) {
-  FILE *f;
-  ssize_t result = 0;
-
-  f = fopen(arg, "r");
-  if (f == NULL)
-    return -1;
-
-  while (!feof(f)) {
-    size_t bytes_read;
-    bytes_read = fread(buf, 1, max_buf_len, f);
-    if (ferror(f)) {
-      result = -1;
-      break;
-    }
-
-    buf += bytes_read;
-    result += bytes_read;
-    max_buf_len -= bytes_read;
-  }
-
-  fclose(f);
-  return result;
-}
-#endif /*DTLS_X509*/
-
-#ifdef DTLS_PSK
-
-#define PSK_SERVER_HINT  "Server_identity"
-
-/* This function is the "key store" for tinyDTLS. It is called to
- * retrieve a key for the given identity within this particular
- * session. */
-static int
-get_psk_info(struct dtls_context_t *ctx, const session_t *session,
-            dtls_credentials_type_t type,
-            const unsigned char *id, size_t id_len,
-            unsigned char *result, size_t result_length) {
-
-  (void)ctx;
-  (void)session;
-  struct keymap_t {
-    unsigned char *id;
-    size_t id_length;
-    unsigned char *key;
-    size_t key_length;
-  } psk[3] = {
-    { (unsigned char *)"Client_identity", 15,
-      (unsigned char *)"secretPSK", 9 },
-    { (unsigned char *)"default identity", 16,
-      (unsigned char *)"\x11\x22\x33", 3 },
-    { (unsigned char *)"\0", 2,
-      (unsigned char *)"", 1 }
-  };
-
-  switch (type) {
-  case DTLS_PSK_HINT:
-    if (result_length < strlen(PSK_SERVER_HINT)) {
-      dtls_warn("cannot set psk_hint -- buffer too small\n");
-      return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-    }
-
-    memcpy(result, PSK_SERVER_HINT, strlen(PSK_SERVER_HINT));
-    return strlen(PSK_SERVER_HINT);
-
-  case DTLS_PSK_KEY:
-    if (id) {
-      int i;
-      for (i = 0; i < (int)(sizeof(psk)/sizeof(struct keymap_t)); i++) {
-        if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) {
-         if (result_length < psk[i].key_length) {
-           dtls_warn("buffer too small for PSK");
-           return dtls_alert_fatal_create(DTLS_ALERT_INTERNAL_ERROR);
-         }
-
-         memcpy(result, psk[i].key, psk[i].key_length);
-         return psk[i].key_length;
-        }
-      }
-    }
-    break;
-
-  default:
-    dtls_warn("unsupported request type: %d\n", type);
-  }
-
-  return dtls_alert_fatal_create(DTLS_ALERT_DECRYPT_ERROR);
-}
-
-#endif /* DTLS_PSK */
-
-#ifdef DTLS_ECC
-static int
-get_ecdsa_key(struct dtls_context_t *ctx,
-             const session_t *session,
-             const dtls_ecc_key_t **result) {
-    (void)ctx;
-    (void)session;
-  static const dtls_ecc_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = ecdsa_priv_key,
-    .pub_key_x = ecdsa_pub_key_x,
-    .pub_key_y = ecdsa_pub_key_y
-  };
-
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-verify_ecdsa_key(struct dtls_context_t *ctx,
-                const session_t *session,
-                const unsigned char *other_pub_x,
-                const unsigned char *other_pub_y,
-                size_t key_size) {
-  (void)ctx;
-  (void)session;
-  (void)other_pub_x;
-  (void)other_pub_y;
-  (void)key_size;
-  return 0;
-}
-#endif /* DTLS_ECC */
-
-#ifdef DTLS_X509
-static int
-get_x509_key(struct dtls_context_t *ctx,
-          const session_t *session,
-          const dtls_ecc_key_t **result) {
-    (void)ctx;
-    (void)session;
-  static dtls_ecc_key_t ecdsa_key = {
-    .curve = DTLS_ECDH_CURVE_SECP256R1,
-    .priv_key = x509_priv_key,
-    .pub_key_x = x509_pub_key_x,
-    .pub_key_y = x509_pub_key_y
-  };
-  if (x509_info_from_file)
-      ecdsa_key.priv_key = x509_server_priv;
-
-  *result = &ecdsa_key;
-  return 0;
-}
-
-static int
-get_x509_cert(struct dtls_context_t *ctx,
-               const session_t *session,
-               const unsigned char **cert,
-               size_t *cert_size)
-{
-    (void)ctx;
-    (void)session;
-    if (x509_info_from_file)
-    {
-        *cert = x509_server_cert;
-        *cert_size = x509_server_cert_len;
-    }
-    else
-    {
-        *cert = g_server_certificate;
-        *cert_size = SERVER_CRT_LEN;
-    }
-
-    return 0;
-}
-
-static int check_certificate(byte_array cert_der_code, byte_array ca_public_key)
-{
-    (void)cert_der_code;
-    (void)ca_public_key;
-    return 0;
-}
-
-static int verify_x509_cert(struct dtls_context_t *ctx, const session_t *session,
-                                  const unsigned char *cert, size_t cert_size,
-                                  unsigned char *x,
-                                  size_t x_size,
-                                  unsigned char *y,
-                                  size_t y_size)
-{
-    int ret;
-    const unsigned char *ca_pub_x;
-    const unsigned char *ca_pub_y;
-    byte_array cert_der_code = BYTE_ARRAY_INITIALIZER;
-    byte_array ca_public_key = BYTE_ARRAY_INITIALIZER;
-    unsigned char ca_pub_key[DTLS_PUBLIC_KEY_SIZE];
-    (void)ctx;
-    (void)session;
-
-    if (x509_info_from_file)
-    {
-        ca_pub_x = x509_ca_pub;
-        ca_pub_y = x509_ca_pub + DTLS_PUBLIC_KEY_SIZE/2;
-    }
-    else
-    {
-        ca_pub_x = x509_ca_pub_x;
-        ca_pub_y = x509_ca_pub_y;
-    }
-
-    cert_der_code.data = (uint8_t *)cert;
-    cert_der_code.len = cert_size;
-
-    ca_public_key.len = DTLS_PUBLIC_KEY_SIZE;
-    ca_public_key.data = ca_pub_key;
-    memcpy(ca_public_key.data, ca_pub_x, DTLS_PUBLIC_KEY_SIZE/2);
-    memcpy(ca_public_key.data + DTLS_PUBLIC_KEY_SIZE/2, ca_pub_y, DTLS_PUBLIC_KEY_SIZE/2);
-
-    memcpy(x, client_pub_key_x, x_size);
-    memcpy(y, client_pub_key_y, y_size);
-
-    ret = (int) check_certificate(cert_der_code, ca_public_key);
-
-  return -ret;
-}
-
-static int is_x509_active(struct dtls_context_t *ctx)
-{
-    (void)ctx;
-    return 0;
-}
-#endif /* DTLS_X509 */
-
-
-#define DTLS_SERVER_CMD_CLOSE "server:close"
-#define DTLS_SERVER_CMD_RENEGOTIATE "server:renegotiate"
-
-static int
-read_from_peer(struct dtls_context_t *ctx,
-              session_t *session, uint8 *data, size_t len) {
-  size_t i;
-  for (i = 0; i < len; i++)
-    printf("%c", data[i]);
-  if (len >= strlen(DTLS_SERVER_CMD_CLOSE) &&
-      !memcmp(data, DTLS_SERVER_CMD_CLOSE, strlen(DTLS_SERVER_CMD_CLOSE))) {
-    printf("server: closing connection\n");
-    dtls_close(ctx, session);
-    return len;
-  } else if (len >= strlen(DTLS_SERVER_CMD_RENEGOTIATE) &&
-      !memcmp(data, DTLS_SERVER_CMD_RENEGOTIATE, strlen(DTLS_SERVER_CMD_RENEGOTIATE))) {
-    printf("server: renegotiate connection\n");
-    dtls_renegotiate(ctx, session);
-    return len;
-  }
-
-  return dtls_write(ctx, session, data, len);
-}
-
-static int
-send_to_peer(struct dtls_context_t *ctx, 
-            session_t *session, uint8 *data, size_t len) {
-
-  int fd = *(int *)dtls_get_app_data(ctx);
-  return sendto(fd, data, len, MSG_DONTWAIT,
-               &session->addr.sa, session->size);
-}
-
-static int
-dtls_handle_read(struct dtls_context_t *ctx) {
-  int *fd;
-  session_t session;
-  static uint8 buf[DTLS_MAX_BUF];
-  int len;
-
-  fd = dtls_get_app_data(ctx);
-
-  assert(fd);
-
-  memset(&session, 0, sizeof(session_t));
-  session.size = sizeof(session.addr);
-  len = recvfrom(*fd, buf, sizeof(buf), MSG_TRUNC,
-                &session.addr.sa, &session.size);
-
-  if (len < 0) {
-    perror("recvfrom");
-    return -1;
-  } else {
-    dtls_debug("got %d bytes from port %d\n", len, 
-            ntohs(session.addr.sin6.sin6_port));
-    if ((int)(sizeof(buf)) < len) {
-      dtls_warn("packet was truncated (%d bytes lost)\n", len - sizeof(buf));
-    }
-  }
-
-  return dtls_handle_message(ctx, &session, buf, len);
-}    
-
-static int
-resolve_address(const char *server, struct sockaddr *dst) {
-  
-  struct addrinfo *res, *ainfo;
-  struct addrinfo hints;
-  static char addrstr[256];
-  int error;
-
-  memset(addrstr, 0, sizeof(addrstr));
-  if (server && strlen(server) > 0)
-    memcpy(addrstr, server, strlen(server));
-  else
-    memcpy(addrstr, "localhost", 9);
-
-  memset ((char *)&hints, 0, sizeof(hints));
-  hints.ai_socktype = SOCK_DGRAM;
-  hints.ai_family = AF_UNSPEC;
-
-  error = getaddrinfo(addrstr, "", &hints, &res);
-
-  if (error != 0) {
-    fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(error));
-    return error;
-  }
-
-  for (ainfo = res; ainfo != NULL; ainfo = ainfo->ai_next) {
-
-    switch (ainfo->ai_family) {
-    case AF_INET6:
-
-      memcpy(dst, ainfo->ai_addr, ainfo->ai_addrlen);
-      return ainfo->ai_addrlen;
-    default:
-      ;
-    }
-  }
-
-  freeaddrinfo(res);
-  return -1;
-}
-
-static void
-usage(const char *program, const char *version) {
-  const char *p;
-
-  p = strrchr( program, '/' );
-  if ( p )
-    program = ++p;
-
-  fprintf(stderr, "%s v%s -- DTLS server implementation\n"
-         "(c) 2011-2014 Olaf Bergmann <bergmann@tzi.org>\n\n"
-         "usage: %s [-A address] [-p port] [-v num] [-a enable|disable]\n"
-#ifdef DTLS_X509
-      " [-x file] [-r file] [-u file]"
-#endif /* DTLS_X509 */
-         "\t-A address\t\tlisten on specified address (default is ::)\n"
-         "\t-p port\t\tlisten on specified port (default is %d)\n"
-         "\t-v num\t\tverbosity level (default: 3)\n"
-         "\t-a enable|disable\t(default: disable)\n"
-         "\t\t\t\tenable:enable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n"
-         "\t\t\t\tdisable:disable TLS_ECDH_anon_with_AES_128_CBC_SHA_256\n"
-#ifdef DTLS_X509
-      "\t-x file\tread Server certificate from file\n"
-      "\t-r file\tread Server private key from file\n"
-      "\t-u file\tread CA public key from file\n"
-#endif /* DTLS_X509 */
-      ,program, version, program, DEFAULT_PORT);
-}
-
-static dtls_handler_t cb = {
-  .write = send_to_peer,
-  .read  = read_from_peer,
-  .event = NULL,
-#ifdef DTLS_PSK
-  .get_psk_info = get_psk_info,
-#endif /* DTLS_PSK */
-#ifdef DTLS_ECC
-  .get_ecdsa_key = get_ecdsa_key,
-  .verify_ecdsa_key = verify_ecdsa_key,
-#endif /* DTLS_ECC */
-#ifdef DTLS_X509
-  .get_x509_key = get_x509_key,
-  .verify_x509_cert = verify_x509_cert,
-  .get_x509_cert = get_x509_cert,
-  .is_x509_active = is_x509_active,
-#endif
-
-};
-
-int
-main(int argc, char **argv) {
-  dtls_context_t *the_context = NULL;
-  log_t log_level = DTLS_LOG_WARN;
-  fd_set rfds, wfds;
-  struct timeval timeout;
-  int fd, opt, result;
-  int on = 1;
-  dtls_cipher_enable_t ecdh_anon_enalbe = DTLS_CIPHER_DISABLE;
-  struct sockaddr_in6 listen_addr;
-
-  memset(&listen_addr, 0, sizeof(struct sockaddr_in6));
-
-  /* fill extra field for 4.4BSD-based systems (see RFC 3493, section 3.4) */
-#if defined(SIN6_LEN) || defined(HAVE_SOCKADDR_IN6_SIN6_LEN)
-  listen_addr.sin6_len = sizeof(struct sockaddr_in6);
-#endif
-
-  listen_addr.sin6_family = AF_INET6;
-  listen_addr.sin6_port = htons(DEFAULT_PORT);
-  listen_addr.sin6_addr = in6addr_any;
-
-  while ((opt = getopt(argc, argv, "A:p:v:a:")) != -1) {
-    switch (opt) {
-    case 'A' :
-      if (resolve_address(optarg, (struct sockaddr *)&listen_addr) < 0) {
-       fprintf(stderr, "cannot resolve address\n");
-       exit(-1);
-      }
-      break;
-    case 'p' :
-      listen_addr.sin6_port = htons(atoi(optarg));
-      break;
-    case 'v' :
-      log_level = strtol(optarg, NULL, 10);
-      break;
-    case 'a':
-      if( strcmp(optarg, "enable") == 0)
-          ecdh_anon_enalbe = DTLS_CIPHER_ENABLE;
-      break;
-#ifdef DTLS_X509
-    case 'x' :
-    {
-      ssize_t result = read_from_file(optarg, x509_server_cert, DTLS_MAX_CERT_SIZE);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read Server certificate. Using default\n");
-      }
-      else
-      {
-          x509_server_cert_len = result;
-      }
-      break;
-    }
-    case 'r' :
-    {
-      ssize_t result = read_from_file(optarg, x509_server_priv, DTLS_PRIVATE_KEY_SIZE+1);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read Server private key. Using default\n");
-      }
-      else
-      {
-          x509_server_priv_is_set = result;
-      }
-      break;
-    }
-    case 'u' :
-    {
-      ssize_t result = read_from_file(optarg, x509_ca_pub, DTLS_PUBLIC_KEY_SIZE+1);
-      if (result < 0)
-      {
-          dtls_warn("Cannot read CA public key. Using default\n");
-      }
-      else
-      {
-          x509_ca_pub_is_set = result;
-      }
-      break;
-    }
-#endif /* DTLS_X509 */
-    default:
-      usage(argv[0], dtls_package_version());
-      exit(1);
-    }
-  }
-
-  dtls_set_log_level(log_level);
-
-#ifdef DTLS_X509
-  if (x509_server_cert_len && x509_server_priv_is_set && x509_ca_pub_is_set)
-  {
-      x509_info_from_file = 1;
-  }
-  else if(!(x509_server_cert_len || x509_server_priv_is_set || x509_ca_pub_is_set))
-  {
-      x509_info_from_file = 0;
-  }
-  else
-  {
-      fprintf(stderr,"please set -x, -r, -u options simultaneously");
-      usage(argv[0], dtls_package_version());
-      exit(1);
-  }
-#endif /* DTLS_X509 */
-
-  /* init socket and set it to non-blocking */
-  fd = socket(listen_addr.sin6_family, SOCK_DGRAM, 0);
-
-  if (fd < 0) {
-    dtls_alert("socket: %s\n", strerror(errno));
-    return 0;
-  }
-
-  if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, OPTVAL_T(&on), sizeof(on) ) < 0) {
-    dtls_alert("setsockopt SO_REUSEADDR: %s\n", strerror(errno));
-  }
-#if 0
-  flags = fcntl(fd, F_GETFL, 0);
-  if (flags < 0 || fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
-    dtls_alert("fcntl: %s\n", strerror(errno));
-    goto error;
-  }
-#endif
-  on = 1;
-#ifdef IPV6_RECVPKTINFO
-  if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, OPTVAL_T(&on), sizeof(on) ) < 0) {
-#else /* IPV6_RECVPKTINFO */
-  if (setsockopt(fd, IPPROTO_IPV6, IPV6_PKTINFO, OPTVAL_T(&on), sizeof(on) ) < 0) {
-#endif /* IPV6_RECVPKTINFO */
-    dtls_alert("setsockopt IPV6_PKTINFO: %s\n", strerror(errno));
-  }
-
-  if (bind(fd, (struct sockaddr *)&listen_addr, sizeof(listen_addr)) < 0) {
-    dtls_alert("bind: %s\n", strerror(errno));
-    goto error;
-  }
-
-  dtls_init();
-
-  the_context = dtls_new_context(&fd);
-
-  /* enable/disable tls_ecdh_anon_with_aes_128_cbc_sha_256 */
-  dtls_enables_anon_ecdh(the_context, ecdh_anon_enalbe);
-
-  dtls_set_handler(the_context, &cb);
-
-  while (1) {
-    FD_ZERO(&rfds);
-    FD_ZERO(&wfds);
-
-    FD_SET(fd, &rfds);
-    /* FD_SET(fd, &wfds); */
-    
-    timeout.tv_sec = 5;
-    timeout.tv_usec = 0;
-    
-    result = select( fd+1, &rfds, &wfds, 0, &timeout);
-    
-    if (result < 0) {          /* error */
-      if (errno != EINTR)
-       perror("select");
-    } else if (result == 0) {  /* timeout */
-    } else {                   /* ok */
-      if (FD_ISSET(fd, &wfds))
-       ;
-      else if (FD_ISSET(fd, &rfds)) {
-       dtls_handle_read(the_context);
-      }
-    }
-  }
-  
- error:
-  dtls_free_context(the_context);
-  exit(0);
-}
diff --git a/extlibs/tinydtls/tests/netq-test.c b/extlibs/tinydtls/tests/netq-test.c
deleted file mode 100644 (file)
index d0dc66f..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <string.h>
-#include <netinet/in.h>
-
-#include "netq.h" 
-
-#ifndef NDEBUG
-extern void nq_dump(struct netq_t *);
-#endif
-
-int main(int argc, char **argv) {
-#ifndef NDEBUG
-  struct netq_t *nq;
-
-  struct sockaddr_in6 dst = { AF_INET6, htons(20220), 0, IN6ADDR_ANY_INIT, 0 };
-  struct packet_t *p;
-
-  char *pkt[20] = { 
-    "Packet #1",
-    "This is packet #2",
-    "The third packet #3 is the largest",
-    "Packet #4",
-    "Packet #5",
-    "Packet #6",
-    "Packet #7"
-  };
-
-  nq = nq_new(200);
-
-  if (!nq) {
-    fprintf(stderr, "E: cannot create network packet queue\n");
-    return -1;
-  }
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[0], strlen(pkt[0]))) {
-    fprintf(stderr, "E: cannot add packet #1\n");
-  }
-
-  nq_dump(nq);
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[1], strlen(pkt[1]))) {
-    fprintf(stderr, "E: cannot add packet #2\n");
-  }
-
-  nq_dump(nq);
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[2], strlen(pkt[2]))) {
-    fprintf(stderr, "E: cannot add packet #3\n");
-  }
-
-  nq_dump(nq);
-
-  p = nq_pop(nq);
-  if (!p) {
-    fprintf(stderr, "E: no packet\n");
-  }
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[3], strlen(pkt[3]))) {
-    fprintf(stderr, "E: cannot add packet #4\n");
-  }
-
-  nq_dump(nq);
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[4], strlen(pkt[4]))) {
-    fprintf(stderr, "E: cannot add packet #5\n");
-  }
-
-  nq_dump(nq);
-
-  p = nq_pop(nq);
-  if (!p) {
-    fprintf(stderr, "E: no packet\n");
-  }
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[5], strlen(pkt[5]))) {
-    fprintf(stderr, "E: cannot add packet #6\n");
-  }
-
-  nq_dump(nq);
-
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-  p = nq_pop(nq);
-
-  if (!nq_new_packet(nq, (struct sockaddr *)&dst, sizeof(dst), 
-                    0, pkt[6], strlen(pkt[6]))) {
-    fprintf(stderr, "E: cannot add packet #7\n");
-  }
-
-  nq_dump(nq);
-#endif
-
-  return 0;
-}
diff --git a/extlibs/tinydtls/tests/pcap.c b/extlibs/tinydtls/tests/pcap.c
deleted file mode 100644 (file)
index b53dc8c..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <getopt.h>
-#include <pcap/pcap.h>
-
-#include "tinydtls.h"
-#include "debug.h"
-#include "dtls.h"
-
-#define TRANSPORT_HEADER_SIZE (14+20+8) /* Ethernet + IP + UDP */
-
-/* the pre_master_secret is generated from the PSK at startup */
-unsigned char pre_master_secret[60];
-size_t pre_master_len = 0;
-
-unsigned char master_secret[DTLS_MASTER_SECRET_LENGTH];
-size_t master_secret_len = 0;
-
-dtls_security_parameters_t security_params[2]; 
-int config = 0;
-unsigned int epoch[2] = { 0, 0 };
-
-#if DTLS_VERSION == 0xfeff
-dtls_hash_t hs_hash[2];
-#elif DTLS_VERSION == 0xfefd
-dtls_hash_t hs_hash[1];
-#endif
-
-static inline void
-update_hash(uint8 *record, size_t rlength, 
-           uint8 *data, size_t data_length) {
-  int i;
-
-  if (!hs_hash[0])
-    return;
-
-  for (i = 0; i < sizeof(hs_hash) / sizeof(dtls_hash_t *); ++i) {
-    dtls_hash_update(hs_hash[i], data, data_length);
-  }
-}
-
-static inline void
-finalize_hash(uint8 *buf) {
-#if DTLS_VERSION == 0xfeff
-  unsigned char statebuf[sizeof(md5_state_t) + sizeof(SHA_CTX)];
-#elif DTLS_VERSION == 0xfefd
-  unsigned char statebuf[sizeof(dtls_sha256_ctx)];
-#endif
-
-  if (!hs_hash[0])
-    return;
-
-  /* temporarily store hash status for roll-back after finalize */
-#if DTLS_VERSION == 0xfeff
-  memcpy(statebuf, hs_hash[0], sizeof(md5_state_t));
-  memcpy(statebuf + sizeof(md5_state_t), 
-        hs_hash[1], 
-        sizeof(SHA_CTX));
-#elif DTLS_VERSION == 0xfefd
-  memcpy(statebuf, hs_hash[0], sizeof(statebuf));
-#endif
-
-  dtls_hash_finalize(buf, hs_hash[0]);
-#if DTLS_VERSION == 0xfeff
-  dtls_hash_finalize(buf + 16, hs_hash[1]);
-#endif
-
-  /* restore hash status */
-#if DTLS_VERSION == 0xfeff
-  memcpy(hs_hash[0], statebuf, sizeof(md5_state_t));
-  memcpy(hs_hash[1], 
-        statebuf + sizeof(md5_state_t), 
-        sizeof(SHA_CTX));
-#elif DTLS_VERSION == 0xfefd
-  memcpy(hs_hash[0], statebuf, sizeof(statebuf));
-#endif
-}
-
-static inline void
-clear_hash() {
-  int i;
-
-  for (i = 0; i < sizeof(hs_hash) / sizeof(dtls_hash_t *); ++i)
-    free(hs_hash[i]);
-  memset(hs_hash, 0, sizeof(hs_hash));
-}
-
-#undef CURRENT_CONFIG
-#undef OTHER_CONFIG
-#undef SWITCH_CONFIG
-#define CURRENT_CONFIG (&security_params[config])
-#define OTHER_CONFIG   (&security_params[!(config & 0x01)])
-#define SWITCH_CONFIG  (config = !(config & 0x01))
-
-int
-pcap_verify(dtls_security_parameters_t *sec,
-           int is_client, 
-           const unsigned char *record, size_t record_length,
-           const unsigned char *cleartext, size_t cleartext_length) {
-
-  unsigned char mac[DTLS_HMAC_MAX];
-  dtls_hmac_context_t hmac_ctx;
-  int ok;
-
-  if (cleartext_length < dtls_kb_digest_size(sec))
-    return 0;
-
-  dtls_hmac_init(&hmac_ctx, 
-                is_client 
-                ? dtls_kb_client_mac_secret(sec)
-                : dtls_kb_server_mac_secret(sec),
-                dtls_kb_mac_secret_size(sec));
-
-  cleartext_length -= dtls_kb_digest_size(sec);
-
-  /* calculate MAC even if padding is wrong */
-  dtls_mac(&hmac_ctx, 
-          record,              /* the pre-filled record header */
-          cleartext, cleartext_length,
-          mac);
-
-  ok = memcmp(mac, cleartext + cleartext_length, 
-             dtls_kb_digest_size(sec)) == 0;
-#ifndef NDEBUG
-  printf("MAC (%s): ", ok ? "valid" : "invalid");
-  dump(mac, dtls_kb_digest_size(sec));
-  printf("\n");
-#endif
-  return ok;
-}
-                   
-int
-decrypt_verify(int is_client, const uint8 *packet, size_t length,
-              uint8 **cleartext, size_t *clen) {
-  int res, ok = 0;
-  dtls_cipher_context_t *cipher;
-
-  static unsigned char buf[1000];
-  
-  switch (CURRENT_CONFIG->cipher) {
-  case AES128:                 /* TLS_PSK_WITH_AES128_CBC_SHA */
-    *cleartext = buf;
-    *clen = length - sizeof(dtls_record_header_t);
-
-    if (is_client)
-      cipher = CURRENT_CONFIG->read_cipher;
-    else 
-      cipher = CURRENT_CONFIG->write_cipher; 
-
-    res = dtls_decrypt(cipher,
-                      (uint8 *)packet + sizeof(dtls_record_header_t), *clen, 
-                      buf, NULL, 0);
-
-    if (res < 0) {
-      warn("decryption failed!\n");
-    } else {
-      ok = pcap_verify(CURRENT_CONFIG, is_client, (uint8 *)packet, length, 
-                      *cleartext, res);  
-
-      if (ok)
-       *clen = res - dtls_kb_digest_size(CURRENT_CONFIG);
-    }
-    break;
-  default:                     /* no cipher suite selected */
-    *cleartext = (uint8 *)packet + sizeof(dtls_record_header_t);
-    *clen = length - sizeof(dtls_record_header_t);
-    
-    ok = 1;
-  }
-  
-  if (ok)
-    printf("verify OK\n");
-  else
-    printf("verification failed!\n");
-  return ok;
-}
-
-#define SKIP_ETH_HEADER(M,L)                   \
-  if ((L) < 14)                                        \
-    return;                                    \
-  else {                                       \
-    (M) += 14;                                 \
-    (L) -= 14;                                 \
-  }
-
-#define SKIP_IP_HEADER(M,L)                            \
-  if (((M)[0] & 0xF0) == 0x40) {       /* IPv4 */      \
-    (M) += (M[0] & 0x0F) * 4;                          \
-    (L) -= (M[0] & 0x0F) * 4;                          \
-  } else                                               \
-    if (((M)[0] & 0xF0) == 0x60) { /* IPv6 */          \
-      (M) += 40;                                       \
-      (L) -= 40;                                       \
-    } 
-
-#define SKIP_UDP_HEADER(M,L) {                 \
-    (M) += 8;                                  \
-    (L) -= 8;                                  \
-  }
-
-void
-handle_packet(const u_char *packet, int length) {
-  static int n = 0;
-  static unsigned char initial_hello[] = { 
-    0x16, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
-  };
-  uint8 *data; 
-  size_t data_length, rlen;
-  int i, res;
-#if DTLS_VERSION == 0xfeff
-#ifndef SHA1_DIGEST_LENGTH
-#define SHA1_DIGEST_LENGTH 20
-#endif
-  uint8 hash_buf[16 + SHA1_DIGEST_LENGTH];
-#elif DTLS_VERSION == 0xfefd
-  uint8 hash_buf[DTLS_SHA256_DIGEST_LENGTH];
-#endif
-#define verify_data_length 12
-  int is_client;
-  n++;
-
-  SKIP_ETH_HEADER(packet, length);
-  SKIP_IP_HEADER(packet, length);
-
-  /* determine from port if this is a client */
-  is_client = dtls_uint16_to_int(packet) != 20220;
-
-  SKIP_UDP_HEADER(packet, length);
-
-  while (length) {
-    rlen = dtls_uint16_to_int(packet + 11) + sizeof(dtls_record_header_t);
-
-    if (!rlen) {
-      fprintf(stderr, "invalid length!\n");
-      return;
-    }
-
-    /* skip packet if it is from a different epoch */
-    if (dtls_uint16_to_int(packet + 3) != epoch[is_client])
-      goto next;
-
-    res = decrypt_verify(is_client, packet, rlen,
-                        &data, &data_length);
-
-    if (res <= 0)
-      goto next;
-    
-    printf("packet %d (from %s):\n", n, is_client ? "client" : "server");
-    hexdump(packet, sizeof(dtls_record_header_t));
-    printf("\n");
-    hexdump(data, data_length);
-    printf("\n");
-    
-    if (packet[0] == 22 && data[0] == 1) { /* ClientHello */
-      if (memcmp(packet, initial_hello, sizeof(initial_hello)) == 0)
-       goto next;
-       
-      memcpy(dtls_kb_client_iv(OTHER_CONFIG), data + 14, 32);
-
-       clear_hash();
-#if DTLS_VERSION == 0xfeff
-      hs_hash[0] = dtls_new_hash(HASH_MD5);
-      hs_hash[1] = dtls_new_hash(HASH_SHA1);
-
-      hs_hash[0]->init(hs_hash[0]->data);
-      hs_hash[1]->init(hs_hash[1]->data);
-#elif DTLS_VERSION == 0xfefd
-      dtls_hash_init(hs_hash[0]);
-#endif
-    }
-    
-    if (packet[0] == 22 && data[0] == 2) { /* ServerHello */
-      memcpy(dtls_kb_server_iv(OTHER_CONFIG), data + 14, 32);
-      /* FIXME: search in ciphers */
-      OTHER_CONFIG->cipher = TLS_PSK_WITH_AES_128_CCM_8;
-    }
-    
-    if (packet[0] == 20 && data[0] == 1) { /* ChangeCipherSpec */
-      printf("client random: ");
-      dump(dtls_kb_client_iv(OTHER_CONFIG), 32);
-      printf("\nserver random: ");
-      dump(dtls_kb_server_iv(OTHER_CONFIG), 32);
-      printf("\n");
-      master_secret_len = 
-       dtls_prf(pre_master_secret, pre_master_len,
-                (unsigned char *)"master secret", 13,
-                dtls_kb_client_iv(OTHER_CONFIG), 32,
-                dtls_kb_server_iv(OTHER_CONFIG), 32,
-                master_secret, DTLS_MASTER_SECRET_LENGTH);
-  
-      printf("master_secret:\n  ");
-      for(i = 0; i < master_secret_len; i++) 
-       printf("%02x", master_secret[i]);
-      printf("\n");
-
-      /* create key_block from master_secret
-       * key_block = PRF(master_secret,
-                     "key expansion" + server_random + client_random) */
-      dtls_prf(master_secret, master_secret_len,
-              (unsigned char *)"key expansion", 13,
-              dtls_kb_server_iv(OTHER_CONFIG), 32,
-              dtls_kb_client_iv(OTHER_CONFIG), 32,
-              OTHER_CONFIG->key_block, 
-              dtls_kb_size(OTHER_CONFIG));
-
-      OTHER_CONFIG->read_cipher = 
-       dtls_cipher_new(OTHER_CONFIG->cipher,
-                       dtls_kb_client_write_key(OTHER_CONFIG),
-                       dtls_kb_key_size(OTHER_CONFIG));
-
-      if (!OTHER_CONFIG->read_cipher) {
-       warn("cannot create read cipher\n");
-      } else {
-       dtls_cipher_set_iv(OTHER_CONFIG->read_cipher,
-                          dtls_kb_client_iv(OTHER_CONFIG),
-                          dtls_kb_iv_size(OTHER_CONFIG));
-      }
-
-      OTHER_CONFIG->write_cipher = 
-       dtls_cipher_new(OTHER_CONFIG->cipher, 
-                       dtls_kb_server_write_key(OTHER_CONFIG),
-                       dtls_kb_key_size(OTHER_CONFIG));
-      
-      if (!OTHER_CONFIG->write_cipher) {
-       warn("cannot create write cipher\n");
-      } else {
-       dtls_cipher_set_iv(OTHER_CONFIG->write_cipher,
-                          dtls_kb_server_iv(OTHER_CONFIG),
-                          dtls_kb_iv_size(OTHER_CONFIG));
-      }
-
-      /* if (is_client) */
-       SWITCH_CONFIG;
-      epoch[is_client]++;
-
-      printf("key_block:\n");
-      printf("  client_MAC_secret:\t");  
-      dump(dtls_kb_client_mac_secret(CURRENT_CONFIG), 
-          dtls_kb_mac_secret_size(CURRENT_CONFIG));
-      printf("\n");
-
-      printf("  server_MAC_secret:\t");  
-      dump(dtls_kb_server_mac_secret(CURRENT_CONFIG), 
-          dtls_kb_mac_secret_size(CURRENT_CONFIG));
-      printf("\n");
-
-      printf("  client_write_key:\t");  
-      dump(dtls_kb_client_write_key(CURRENT_CONFIG), 
-          dtls_kb_key_size(CURRENT_CONFIG));
-      printf("\n");
-
-      printf("  server_write_key:\t");  
-      dump(dtls_kb_server_write_key(CURRENT_CONFIG), 
-          dtls_kb_key_size(CURRENT_CONFIG));
-      printf("\n");
-
-      printf("  client_IV:\t\t");  
-      dump(dtls_kb_client_iv(CURRENT_CONFIG), 
-          dtls_kb_iv_size(CURRENT_CONFIG));
-      printf("\n");
-      
-      printf("  server_IV:\t\t");  
-      dump(dtls_kb_server_iv(CURRENT_CONFIG), 
-          dtls_kb_iv_size(CURRENT_CONFIG));
-      printf("\n");
-      
-    }
-
-    if (packet[0] == 22) {
-      if (data[0] == 20) { /* Finished */
-       finalize_hash(hash_buf);
-       /* clear_hash(); */
-
-       update_hash((unsigned char *)packet, sizeof(dtls_record_header_t),
-                   data, data_length);
-
-       dtls_prf(master_secret, master_secret_len,
-                is_client 
-                ? (unsigned char *)"client finished" 
-                : (unsigned char *)"server finished" 
-                , 15,
-                hash_buf, sizeof(hash_buf),
-                NULL, 0,
-                data + sizeof(dtls_handshake_header_t),
-                verify_data_length);
-       printf("verify_data:\n");
-       dump(data, data_length);
-       printf("\n");
-      } else {
-       update_hash((unsigned char *)packet, sizeof(dtls_record_header_t),
-                   data, data_length);
-      }
-    }
-
-    if (packet[0] == 23) {     /* Application Data */
-      printf("Application Data:\n");
-      dump(data, data_length);
-      printf("\n");
-    }
-
-  next:
-    length -= rlen;
-    packet += rlen;
-  }
-}
-
-void init() {
-  memset(security_params, 0, sizeof(security_params));
-  CURRENT_CONFIG->cipher = -1;
-
-  memset(hs_hash, 0, sizeof(hs_hash));
-
-  /* set pre_master_secret to default if no PSK was given */
-  if (!pre_master_len) {
-    /* unsigned char psk[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 }; */
-    pre_master_len =
-      dtls_pre_master_secret((unsigned char *)"secretPSK", 9,
-                            pre_master_secret);
-  }
-}
-
-int main(int argc, char **argv) {
-  pcap_t *pcap;
-  char errbuf[PCAP_ERRBUF_SIZE];
-  struct pcap_pkthdr *pkthdr;
-  const u_char *packet;
-  int res = 0;
-  int c, option_index = 0;
-
-  static struct option opts[] = {
-    { "psk",  1, 0, 'p' },
-    { 0, 0, 0, 0 }
-  };
-
-  /* handle command line options */
-  while (1) {
-    c = getopt_long(argc, argv, "p:", opts, &option_index);
-    if (c == -1)
-      break;
-
-    switch (c) {
-    case 'p':
-      pre_master_len = dtls_pre_master_secret((unsigned char *)optarg, 
-                                     strlen(optarg), pre_master_secret);
-      break;
-    }
-  }
-
-  if (argc <= optind) {
-    fprintf(stderr, "usage: %s [-p|--psk PSK] pcapfile\n", argv[0]);
-    return -1;
-  }
-
-  init();
-
-  pcap = pcap_open_offline(argv[optind], errbuf);
-  if (!pcap) {
-    fprintf(stderr, "pcap_open_offline: %s\n", errbuf);
-    return -2;
-  }
-
-  for (;;) {
-    res = pcap_next_ex(pcap, &pkthdr, &packet);
-    
-    switch(res) {
-    case -2: goto done;
-    case -1: pcap_perror(pcap, "read packet"); break;
-    case  1: handle_packet(packet, pkthdr->caplen); break;
-    default: 
-      ;
-    }      
-  }
- done:
-
-  pcap_close(pcap);
-
-  return 0;
-}
diff --git a/extlibs/tinydtls/tests/prf-test.c b/extlibs/tinydtls/tests/prf-test.c
deleted file mode 100644 (file)
index d8d83d9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <stdio.h>
-
-#include "tinydtls.h"
-#include "debug.h"
-#include "global.h"
-#include "crypto.h"
-
-int 
-main() {
-  /* see http://www.ietf.org/mail-archive/web/tls/current/msg03416.html */
-  unsigned char key[] = { 0x9b, 0xbe, 0x43, 0x6b, 0xa9, 0x40, 0xf0, 0x17, 
-                         0xb1, 0x76, 0x52, 0x84, 0x9a, 0x71, 0xdb, 0x35 };
-  unsigned char label[] = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6c, 0x61, 0x62, 
-                           0x65, 0x6c};
-  unsigned char random1[] = { 0xa0, 0xba, 0x9f, 0x93, 0x6c, 0xda, 0x31, 0x18};
-  unsigned char random2[] = {0x27, 0xa6, 0xf7, 0x96, 0xff, 0xd5, 0x19, 0x8c
-  };
-  unsigned char buf[200];
-  size_t result;
-  
-  result = dtls_prf(key, sizeof(key),
-                   label, sizeof(label),
-                   random1, sizeof(random1),
-                   random2, sizeof(random2),
-                   buf, 100);
-
-  printf("PRF yields %zu bytes of random data:\n", result);
-  hexdump(buf, result);
-  printf("\n");
-  return 0;
-}
diff --git a/extlibs/tinydtls/tests/secure-server.c b/extlibs/tinydtls/tests/secure-server.c
deleted file mode 100644 (file)
index 6ba5258..0000000
+++ /dev/null
@@ -1,862 +0,0 @@
-/* secure-server -- A (broken) DTLS server example
- *
- * Copyright (C) 2011 Olaf Bergmann <bergmann@tzi.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/select.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <signal.h>
-
-#include <openssl/ssl.h>
-#include <openssl/bio.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-
-#ifdef WITH_DTLS
-#define SERVER_CERT_PEM "./server-cert.pem"
-#define SERVER_KEY_PEM  "./server-key.pem"
-#define CA_CERT_PEM     "./ca-cert.pem"
-#endif
-
-#ifdef HAVE_ASSERT_H
-# include <assert.h>
-#else
-# define assert(x)
-#endif /* HAVE_ASSERT_H */
-
-static int quit=0;
-
-/* SIGINT handler: set quit to 1 for graceful termination */
-void
-handle_sigint(int signum) {
-  quit = 1;
-}
-
-int 
-check_connect(int sockfd, char *buf, int buflen, 
-          struct sockaddr *src, int *ifindex) {
-
-  /* for some reason, the definition in netinet/in.h is not exported */
-#ifndef IN6_PKTINFO
-  struct in6_pktinfo
-  {
-    struct in6_addr ipi6_addr; /* src/dst IPv6 address */
-    unsigned int ipi6_ifindex; /* send/recv interface index */
-  };
-#endif
-
-  size_t bytes;
-
-  struct iovec iov[1] = { {buf, buflen} };
-  char cmsgbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
-  struct in6_pktinfo *p = NULL;
-  
-  struct msghdr msg = { 0 };
-  struct cmsghdr *cmsg;
-
-  msg.msg_name = src;
-  msg.msg_namelen = sizeof(struct sockaddr_in6);
-  msg.msg_iov = iov;
-  msg.msg_iovlen = 1;
-  msg.msg_control = cmsgbuf;
-  msg.msg_controllen = sizeof(cmsgbuf);
-
-  bytes = recvmsg(sockfd, &msg, MSG_DONTWAIT | MSG_PEEK);
-  if (bytes < 0) {
-    perror("recvmsg");
-    return bytes;
-  }
-
-  /* TODO: handle msg.msg_flags & MSG_TRUNC */
-  if (msg.msg_flags & MSG_CTRUNC) {
-    fprintf(stderr, "control was truncated!\n");
-    return -1;
-  }
-
-  if (ifindex) {
-    /* Here we try to retrieve the interface index where the packet was received */
-    *ifindex = 0;
-    for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
-        cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-
-      if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) {
-       p = (struct in6_pktinfo *)(CMSG_DATA(cmsg));
-       *ifindex = p->ipi6_ifindex;
-       break;
-      }
-    }
-  }
-
-  return bytes;
-}
-
-typedef enum { UNKNOWN=0, DTLS=1 } protocol_t;
-
-protocol_t
-demux_protocol(const char *buf, int len) {
-  return DTLS;
-}
-
-#ifdef WITH_DTLS
-typedef enum { 
-  PEER_ST_ESTABLISHED, PEER_ST_PENDING, PEER_ST_CLOSED 
- } peer_state_t;
-typedef struct {
-  peer_state_t state;
-  unsigned long h;
-  SSL *ssl;
-} ssl_peer_t;
-
-#define MAX_SSL_PENDING      2 /* must be less than MAX_SSL_PEERS */
-#define MAX_SSL_PEERS       10 /* MAX_SSL_PENDING of these might be pending  */
-ssl_peer_t *ssl_peer_storage[MAX_SSL_PEERS];
-static int pending = 0;
-
-void
-check_peers() {
-typedef struct bio_dgram_data_st
-       {
-       union {
-               struct sockaddr sa;
-               struct sockaddr_in sa_in;
-               struct sockaddr_in6 sa_in6;
-       } peer;
-       unsigned int connected;
-       unsigned int _errno;
-       unsigned int mtu;
-       struct timeval next_timeout;
-       struct timeval socket_timeout;
-       } bio_dgram_data;
-
-  struct sockaddr_in6 peer;
-  int i;
-  BIO *bio;
-  for (i = 0; i < MAX_SSL_PEERS; i++) {
-    if (ssl_peer_storage[i]) {
-      if (!ssl_peer_storage[i]->ssl)
-       fprintf(stderr, "invalid SSL object for peer %d!\n",i);
-      else {
-       bio = SSL_get_rbio(ssl_peer_storage[i]->ssl);
-       if (bio) {
-         (void) BIO_dgram_get_peer(bio, (struct sockaddr *)&peer);
-         if (peer.sin6_port && ssl_peer_storage[i]->h != ntohs(peer.sin6_port)) {
-           fprintf(stderr, "   bio %p: port differs from hash: %d != %d! (%sconnected)\n", bio,
-                   ssl_peer_storage[i]->h, 
-                   ntohs(((struct sockaddr_in6 *)&peer)->sin6_port),
-                   ((bio_dgram_data *)bio->ptr)->connected ? "" : "not ");
-         }
-
-       }
-      }
-    }
-  }
-}
-
-/** Creates a hash value from the first num bytes of s, taking init as
- * initialization value. */
-static inline unsigned long
-_hash(unsigned long init, const char *s, int num) {
-  int c;
-
-  while (num--)
-    while ( (c = *s++) ) {
-      init = ((init << 7) + init) + c;
-    }
-
-  return init;
-}
-
-static inline unsigned long
-hash_peer(const struct sockaddr *peer, int ifindex) {
-  unsigned long h;
-
-  /* initialize hash value to interface index */
-  h = _hash(0, (char *)&ifindex, sizeof(int));
-
-#define CAST(TYPE,VAR) ((TYPE)VAR)
-
-  assert(peer);
-  switch (peer->sa_family) {
-  case AF_INET: 
-    return ntohs(CAST(const struct sockaddr_in *, peer)->sin_port);
-    h = _hash(h, (char *) &CAST(const struct sockaddr_in *, peer)->sin_addr, 
-             sizeof(struct in_addr));
-    h = _hash(h, (char *) &CAST(const struct sockaddr_in *, peer)->sin_port, 
-             sizeof(in_port_t));
-    break;
-  case AF_INET6:
-    return ntohs(CAST(const struct sockaddr_in6 *, peer)->sin6_port);
-    h = _hash(h, 
-             (char *) &CAST(const struct sockaddr_in6 *, peer)->sin6_addr, 
-             sizeof(struct in6_addr));
-    h = _hash(h, 
-             (char *) &CAST(const struct sockaddr_in6 *, peer)->sin6_port, 
-             sizeof(in_port_t));
-    break;
-  default:
-    /* last resort */
-    h = _hash(h, (char *)peer, sizeof(struct sockaddr));
-  }
-
-  return 42;
-  return h;
-}
-
-/* Returns index of peer object for specified address/ifindex pair. */
-int
-get_index_of_peer(const struct sockaddr *peer, int ifindex) {
-  unsigned long h;
-  int idx;
-#ifndef NDEBUG
-  char addr[INET6_ADDRSTRLEN];
-  char port[6];
-#endif
-
-  if (!peer)
-    return -1;
-
-  h = hash_peer(peer,ifindex);
-
-  for (idx = 0; idx < MAX_SSL_PEERS; idx++) {
-    if (ssl_peer_storage[idx] && ssl_peer_storage[idx]->h == h) {
-#ifndef NDEBUG
-      getnameinfo((struct sockaddr *)peer, sizeof(struct sockaddr_in6), 
-                 addr, sizeof(addr), port, sizeof(port), 
-                 NI_NUMERICHOST | NI_NUMERICSERV);
-
-      fprintf(stderr, "get_index_of_peer: [%s]:%s  =>  %lu\n",
-             addr, port, h);
-#endif
-      return idx;
-    }
-  }
-  return -1;
-}
-
-SSL *
-get_ssl(SSL_CTX *ctx, int sockfd, struct sockaddr *src, int ifindex) {
-  int idx;
-  BIO *bio;
-  SSL *ssl;
-#ifndef NDEBUG
-  struct sockaddr_storage peer;
-  char addr[INET6_ADDRSTRLEN];
-  char port[6];
-  int i;
-#endif
-
-  idx = get_index_of_peer(src,ifindex);
-  if (idx >= 0) {
-    fprintf(stderr,"found peer %d ",idx);
-    switch (ssl_peer_storage[idx]->state) {
-    case PEER_ST_ESTABLISHED: fprintf(stderr,"established\n"); break;
-    case PEER_ST_PENDING:     fprintf(stderr,"pending\n"); break;
-    case PEER_ST_CLOSED:      fprintf(stderr,"closed\n"); break;
-    default:
-      OPENSSL_assert(0);
-    }
-
-#ifndef NDEBUG
-    memset(&peer, 0, sizeof(peer));
-    (void) BIO_dgram_get_peer(SSL_get_rbio(ssl_peer_storage[idx]->ssl), &peer);
-
-    getnameinfo((struct sockaddr *)&peer, sizeof(peer), 
-               addr, sizeof(addr), port, sizeof(port), 
-               NI_NUMERICHOST | NI_NUMERICSERV);
-
-    fprintf(stderr,"      [%s]:%s   \n", addr, port);
-#endif
-    return ssl_peer_storage[idx]->ssl;
-  }
-
-  /* none found, create new if sufficient space available */
-  if (pending < MAX_SSL_PENDING) {
-    for (idx = 0; idx < MAX_SSL_PEERS; idx++) {
-      if (ssl_peer_storage[idx] == NULL) { /* found space */
-       ssl = SSL_new(ctx);
-       
-       if (ssl) {
-         bio = BIO_new_dgram(sockfd, BIO_NOCLOSE);
-         if (!bio) {
-           SSL_free(ssl);
-           return NULL;
-         }
-         
-         SSL_set_bio(ssl, bio, bio);
-         SSL_set_options(ssl, SSL_OP_COOKIE_EXCHANGE);
-         
-         SSL_set_accept_state(ssl);
-         ssl_peer_storage[idx] = (ssl_peer_t *) malloc(sizeof(ssl_peer_t));
-         if (!ssl_peer_storage[idx]) {
-           SSL_free(ssl);
-           return NULL;
-         }
-         ssl_peer_storage[idx]->state = PEER_ST_PENDING;
-         ssl_peer_storage[idx]->h = hash_peer(src,ifindex);
-         ssl_peer_storage[idx]->ssl = ssl;
-         
-         pending++;
-         
-         fprintf(stderr,
-                 "created new SSL peer %d for ssl object %p (storage: %p)\n", 
-                idx, ssl, ssl_peer_storage[idx]);
-#ifndef NDEBUG
-    if (getnameinfo((struct sockaddr *)&src, sizeof(src), 
-               addr, sizeof(addr), port, sizeof(port), 
-                   NI_NUMERICHOST | NI_NUMERICSERV) != 0) {
-      perror("getnameinfo");
-      fprintf(stderr, "port was %u\n", ntohs(((struct sockaddr_in6 *)src)->sin6_port));
-    } else {
-    fprintf(stderr,"      [%s]:%s   \n", addr, port);
-      }
-#endif
-    OPENSSL_assert(ssl_peer_storage[idx]->ssl == ssl);
-         fprintf(stderr,"%d objects pending\n", pending);
-         check_peers();
-         return ssl;
-       }
-      }
-    }
-  } else {
-    fprintf(stderr, "too many pending SSL objects\n");
-    return NULL;
-  }
-
-  fprintf(stderr, "too many peers\n");
-  return NULL;
-}
-
-/** Deletes peer stored at index idx and frees allocated memory. */
-static inline void
-delete_peer(int idx) {
-  if (idx < 0 || !ssl_peer_storage[idx])
-    return;
-
-  if (ssl_peer_storage[idx]->state == PEER_ST_PENDING)
-    pending--;
-
-  OPENSSL_assert(ssl_peer_storage[idx]->ssl);
-  SSL_free(ssl_peer_storage[idx]->ssl);
-    
-  free(ssl_peer_storage[idx]);
-  ssl_peer_storage[idx] = NULL;
-
-  printf("deleted peer %d\n",idx);
-}
-
-/** Deletes all closed objects from ssl_peer_storage. */
-void
-remove_closed() {
-  int idx;
-
-  for (idx = 0; idx < MAX_SSL_PEERS; idx++)
-    if (ssl_peer_storage[idx] 
-       && ssl_peer_storage[idx]->state == PEER_ST_CLOSED)
-      delete_peer(idx);
-}
-
-#define min(a,b) ((a) < (b) ? (a) : (b))
-
-unsigned int
-psk_server_callback(SSL *ssl, const char *identity,
-                   unsigned char *psk, unsigned int max_psk_len) {
-  static char keybuf[] = "secretPSK";
-
-  printf("psk_server_callback: check identity of client %s\n", identity);
-  memcpy(psk, keybuf, min(strlen(keybuf), max_psk_len));
-
-  return min(strlen(keybuf), max_psk_len);
-}
-
-#endif
-
-#ifdef WITH_DTLS
-/**
- * This function tracks the status changes from libssl to manage local
- * object state.
- */
-void
-info_callback(const SSL *ssl, int where, int ret) {
-  int idx, i;
-  struct sockaddr_storage peer;
-  struct sockaddr_storage peer2;
-  char addr[INET6_ADDRSTRLEN];
-  char port[6];
-
-  if (where & SSL_CB_LOOP)  /* do not care for intermediary states */
-    return;
-
-  memset(&peer, 0, sizeof(peer));
-  (void) BIO_dgram_get_peer(SSL_get_rbio(ssl), &peer);
-
-  /* lookup SSL object */   /* FIXME: need to get the ifindex */
-  idx = get_index_of_peer((struct sockaddr *)&peer, 0);
-  
-  if (idx >= 0)
-    fprintf(stderr, "info_callback: assert: %d < 0 || %p == %p (storage: %p)\n",
-           idx, ssl, ssl_peer_storage[idx]->ssl, ssl_peer_storage[idx]); 
-  if (idx >= 0 && ssl != ssl_peer_storage[idx]->ssl) {
-    getnameinfo((struct sockaddr *)&peer, sizeof(peer), 
-               addr, sizeof(addr), port, sizeof(port), 
-               NI_NUMERICHOST | NI_NUMERICSERV);
-
-    fprintf(stderr," ssl: [%s]:%s   ", addr, port);
-    
-    (void) BIO_dgram_get_peer(SSL_get_rbio(ssl_peer_storage[idx]->ssl), &peer2);
-    getnameinfo((struct sockaddr *)&peer2, sizeof(peer2), 
-               addr, sizeof(addr), port, sizeof(port), 
-               NI_NUMERICHOST | NI_NUMERICSERV);
-
-    fprintf(stderr," ssl_peer_storage[idx]->ssl: [%s]:%s\n", addr, port);
-
-    fprintf(stderr, " hash:%lu     h: %lu\n",
-           hash_peer((const struct sockaddr *)&peer, 0),
-           ssl_peer_storage[idx]->h);
-
-    for (i = 0; i < MAX_SSL_PEERS; i++) {
-      if (ssl_peer_storage[i]) {
-       fprintf(stderr, "%02d: %p ssl: %p  ",
-               i, ssl_peer_storage[i] ,ssl_peer_storage[i]->ssl);
-
-       (void) BIO_dgram_get_peer(SSL_get_rbio(ssl_peer_storage[i]->ssl), &peer2);
-       getnameinfo((struct sockaddr *)&peer2, sizeof(peer2), 
-                   addr, sizeof(addr), port, sizeof(port), 
-                   NI_NUMERICHOST | NI_NUMERICSERV);
-       
-       fprintf(stderr," peer: [%s]:%s    h: %lu\n", addr, port, ssl_peer_storage[i]->h);
-      }
-    }
-    fprintf(stderr, "***** ASSERT FAILED ******\n");
-
-    memset(&peer, 0, sizeof(peer));
-    (void) BIO_dgram_get_peer(SSL_get_wbio(ssl), &peer);
-
-    idx = get_index_of_peer((struct sockaddr *)&peer, 0);
-    fprintf(stderr, "  get_index_of_peer for wbio returns %d, type is %04x\n",
-           idx, where);    
-  }
-#if 1
-         check_peers();
-  OPENSSL_assert((idx < 0) || (ssl == ssl_peer_storage[idx]->ssl));
-#endif
-
-  if (where & SSL_CB_ALERT) {
-#ifndef NDEBUG
-    if (ret != 0)
-      fprintf(stderr,"%s:%s:%s\n", SSL_alert_type_string(ret),
-             SSL_alert_desc_string(ret), SSL_alert_desc_string_long(ret));
-#endif
-
-    /* examine alert type */
-    switch (*SSL_alert_type_string(ret)) {
-    case 'F':
-      /* move SSL object from pending to close */
-      if (idx >= 0) {
-       ssl_peer_storage[idx]->state = PEER_ST_CLOSED;
-       pending--;
-      }
-      break;
-    case 'W': 
-      if ((ret & 0xff) == SSL_AD_CLOSE_NOTIFY) {
-       if (where == SSL_CB_WRITE_ALERT) 
-         fprintf(stderr,"sent CLOSE_NOTIFY\n");
-       else /* received CN */
-         fprintf(stderr,"received CLOSE_NOTIFY\n");
-      }
-      break;
-    default:                   /* handle unknown alert types */
-#ifndef NDEBUG
-      printf("not handled!\n");
-#endif
-    }
-  }
-
-  if (where & SSL_CB_HANDSHAKE_DONE) {
-    /* move SSL object from pending to established */
-    printf("HANDSHAKE_DONE ");
-    if (idx >= 0) {
-      
-      if (ssl_peer_storage[idx]->state == PEER_ST_PENDING) {
-       ssl_peer_storage[idx]->state = PEER_ST_ESTABLISHED;
-       pending--;
-       printf("moved SSL object %d to ESTABLISHED\n", idx);
-       printf("%d objects pending\n", pending);
-      } else {
-#ifndef NDEBUG
-       printf("huh, object %d was not pending? (%d)\n", idx,
-              ssl_peer_storage[idx]->state);
-#endif
-      }
-      return;
-    }
-    return;
-  }
-
-  return;
-}
-#endif
-
-#ifdef WITH_DTLS
-/* checks if ssl object was closed and can be removed */
-int 
-check_close(SSL *ssl) {
-  int res, err, idx;
-  struct sockaddr_storage peer;
-  
-  memset(&peer, 0, sizeof(peer));
-  (void)BIO_dgram_get_peer(SSL_get_rbio(ssl), &peer);
-
-  res = 0;
-  if (SSL_get_shutdown(ssl) & SSL_RECEIVED_SHUTDOWN) {
-    printf("SSL_RECEIVED_SHUTDOWN\n");
-    res = SSL_shutdown(ssl);
-    if (res == 0) {
-      printf("must call SSL_shutdown again\n");
-      res = SSL_shutdown(ssl);
-    }
-    if (res < 0) {
-       err = SSL_get_error(ssl,res);   
-       fprintf(stderr, "shutdown: SSL error %d: %s\n", err,
-               ERR_error_string(err, NULL));
-    } 
-
-    /* we can close the SSL object anyway */
-    /* FIXME: need to get ifindex from somewhere */
-    idx = get_index_of_peer((struct sockaddr *)&peer, 0);
-    OPENSSL_assert(idx < 0 || ssl == ssl_peer_storage[idx]->ssl);
-    if (idx >= 0) {
-      ssl_peer_storage[idx]->state = PEER_ST_CLOSED;
-      printf("moved SSL object %d to CLOSED\n",idx);
-    }
-  }
-  
-  return res;
-}
-
-int 
-check_timeout() {
-  int i, result, err;
-
-  for (i = 0; i < MAX_SSL_PEERS; i++) {
-    if (ssl_peer_storage[i]) {
-      OPENSSL_assert(ssl_peer_storage[i]->ssl);
-      result = DTLSv1_handle_timeout(ssl_peer_storage[i]->ssl);
-      if (result < 0) {
-       err = SSL_get_error(ssl_peer_storage[i]->ssl,result);
-       fprintf(stderr, "dtls1_handle_timeout (%d): %s\n",
-               err, ERR_error_string(err, NULL));
-      }
-    }
-  }
-
-  /* remove outdated obbjects? */
-  
-  return 0;
-}
-#endif /* WITH_DTLS */
-  
-int 
-_read(SSL_CTX *ctx, int sockfd) {
-  char buf[2000];
-  struct sockaddr_in6 src;
-  int len, ifindex, i;
-  char addr[INET6_ADDRSTRLEN];
-  char port[6];
-  socklen_t sz = sizeof(struct sockaddr_in6);
-#ifdef WITH_DTLS
-  SSL *ssl;
-  int err;
-#endif
-
-  /* Retrieve remote address and interface index as well as the first
-     few bytes of the message to demultiplex protocols. */
-  memset(&src, 0, sizeof(struct sockaddr_in6));
-  len = check_connect(sockfd, buf, 4, (struct sockaddr *)&src, &ifindex);
-
-  if (len < 0)                 /* error */
-    return len;
-
-#ifndef NDEBUG
-  fprintf(stderr,"received packet");
-  
-  if (getnameinfo((struct sockaddr *)&src, sizeof(src), 
-                 addr, sizeof(addr), port, sizeof(port), 
-                 NI_NUMERICHOST | NI_NUMERICSERV) == 0)
-    fprintf(stderr," from [%s]:%s", addr, port);
-  
-  fprintf(stderr," on interface %d\n", ifindex);
-#endif
-
-  switch (demux_protocol(buf, len)) {
-#ifdef WITH_DTLS
-  case DTLS :
-    ssl = get_ssl(ctx, sockfd, (struct sockaddr *)&src, ifindex);
-    if (!ssl) {
-      fprintf(stderr, "cannot create new SSL object\n");
-      /*      return recv(sockfd, buf, sizeof(buf), MSG_DONTWAIT);*/
-      len = recvfrom(sockfd, buf, sizeof(buf), MSG_DONTWAIT,
-                    (struct sockaddr *)&src, &sz);
-      getnameinfo((struct sockaddr *)&src, sz, 
-                 addr, sizeof(addr), port, sizeof(port), 
-                 NI_NUMERICHOST | NI_NUMERICSERV);
-      printf("discarded %d bytes from [%s]:%s\n", len, addr, port);      
-      return len;
-    }
-    len = SSL_read(ssl, buf, sizeof(buf));
-    break;
-#endif
-  case UNKNOWN:
-  default :
-    len = recv(sockfd, buf, sizeof(buf), MSG_DONTWAIT);
-  }
-
-  if (len > 0) {
-    printf("here is the data:\n");
-    for (i=0; i<len; i++)
-      printf("%c",buf[i]);
-  } if (len == 0) {            /* session closed? */
-#ifdef WITH_DTLS
-    if (check_close(ssl) <= 0) {
-      fprintf(stderr, "not closed\n");
-    }
-#endif
-  } else {
-#ifdef WITH_DTLS
-    err = SSL_get_error(ssl,len);
-    switch (err) {
-    case SSL_ERROR_WANT_READ:
-      fprintf(stderr, "SSL_ERROR_WANT_READ\n");
-      return 0;
-    case SSL_ERROR_WANT_WRITE:
-      fprintf(stderr, "SSL_ERROR_WANT_WRITE\n");
-      return 0;
-    default:
-      fprintf(stderr, "read: SSL error %d: %s\n", err,
-             ERR_error_string(err, NULL));
-      return 0;
-    }
-#else
-    perror("recv");
-#endif
-  }
-
-  return len;
-}
-
-int 
-_write(SSL_CTX *ctx, int sockfd) {
-  int res = 0;
-#ifdef WITH_DTLS
-  SSL *ssl;
-  int err;
-
-  ssl = get_ssl(ctx, sockfd, NULL, 1);
-  if (!ssl) {
-    fprintf(stderr, "no SSL object for writing");
-    return 0;
-  }
-  res = SSL_write(ssl, NULL, 0);
-  if (res < 0) {
-    /*
-    if (SSL_want_write(ssl))
-      return 0;
-    */
-    /* FIXME: check SSL_want_read(ssl) */
-
-    err = SSL_get_error(ssl,res);
-    fprintf(stderr,"SSL_write returned %d (%s)\n", err, ERR_error_string(err, NULL));
-  } else {
-    printf("SSL_write successful\n");
-  }
-#else
-#endif
-  
-  return res;
-}
-
-
-int 
-generate_cookie(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len) {
-  /* FIXME: generate secure client-specific cookie */
-#define DUMMYSTR "ABCDEFGHIJKLMNOP"
-  *cookie_len = strlen(DUMMYSTR);
-  memcpy(cookie, DUMMYSTR, *cookie_len);
-
-  return 1;
-}
-
-int 
-verify_cookie(SSL *ssl, unsigned char *cookie, unsigned int cookie_len) {
-  /* FIXME */
-  return 1;
-}
-
-enum { READ, WRITE };
-
-int
-main(int argc, char **argv) {
-  int sockfd = 0;
-  int on = 1;
-  struct sockaddr_in6 listen_addr = { AF_INET6, htons(20220), 0, IN6ADDR_ANY_INIT, 0 };
-  size_t addr_size = sizeof(struct sockaddr_in6);
-  fd_set fds[2];
-  int result, flags;
-  int idx, res = 0;
-  struct timeval timeout;
-  struct sigaction act, oact;
-  
-#ifdef WITH_DTLS
-  SSL_CTX *ctx;
-
-  memset(ssl_peer_storage, 0, sizeof(ssl_peer_storage));
-
-  SSL_load_error_strings();
-  SSL_library_init();
-  ctx = SSL_CTX_new(DTLSv1_server_method());
-
-  SSL_CTX_set_cipher_list(ctx, "ALL");
-  SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);
-
-  res = SSL_CTX_use_certificate_file(ctx, SERVER_CERT_PEM, SSL_FILETYPE_PEM);
-  if (res != 1) {
-    fprintf(stderr, "cannot read server certificate from file '%s' (%s)\n", 
-           SERVER_CERT_PEM, ERR_error_string(res,NULL));
-    goto end;
-  }
-
-  res = SSL_CTX_use_PrivateKey_file(ctx, SERVER_KEY_PEM, SSL_FILETYPE_PEM);
-  if (res != 1) {
-    fprintf(stderr, "cannot read server key from file '%s' (%s)\n", 
-           SERVER_KEY_PEM, ERR_error_string(res,NULL));
-    goto end;
-  }
-
-  res = SSL_CTX_check_private_key (ctx);
-  if (res != 1) {
-    fprintf(stderr, "invalid private key\n");
-    goto end;
-  }
-
-  res = SSL_CTX_load_verify_locations(ctx, CA_CERT_PEM, NULL);
-  if (res != 1) {
-    fprintf(stderr, "cannot read ca file '%s'\n", CA_CERT_PEM);
-    goto end;
-  }
-
-  /* Client has to authenticate */
-
-  /* Client has to authenticate */
-  SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, NULL);
-
-  SSL_CTX_set_read_ahead(ctx, 1); /* disable read-ahead */
-  SSL_CTX_set_cookie_generate_cb(ctx, generate_cookie);
-  SSL_CTX_set_cookie_verify_cb(ctx, verify_cookie);
-
-  SSL_CTX_use_psk_identity_hint(ctx, "Enter password for CoAP-Gateway");
-  SSL_CTX_set_psk_server_callback(ctx, psk_server_callback);
-
-  SSL_CTX_set_info_callback(ctx, info_callback);
-#endif
-
-  sockfd = socket(listen_addr.sin6_family, SOCK_DGRAM, 0);
-  if ( sockfd < 0 ) {
-    perror("socket");
-    return -1;
-  }
-
-  if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on) ) < 0)
-    perror("setsockopt SO_REUSEADDR");
-
-  flags = fcntl(sockfd, F_GETFL, 0);
-  if (flags < 0 || fcntl(sockfd, F_SETFL, flags | O_NONBLOCK) < 0) {
-    perror("fcntl");
-    return -1;
-  }
-
-  on = 1;
-  if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on) ) < 0) {
-    perror("setsockopt IPV6_PKTINFO");
-  }
-
-  if (bind (sockfd, (const struct sockaddr *)&listen_addr, addr_size) < 0) {
-    perror("bind");
-    res = -2;
-    goto end;
-  }
-
-  act.sa_handler = handle_sigint;
-  sigemptyset(&act.sa_mask);
-  act.sa_flags = 0;
-  sigaction(SIGINT, &act, &oact);
-
-  while (!quit) {
-    FD_ZERO(&fds[READ]);
-    FD_ZERO(&fds[WRITE]);
-    FD_SET(sockfd, &fds[READ]);
-
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-    result = select( FD_SETSIZE, &fds[READ], &fds[WRITE], 0, &timeout);
-
-    if (result < 0) {          /* error */
-      if (errno != EINTR)
-       perror("select");
-    } else if (result > 0) {   /* read from socket */
-      if ( FD_ISSET( sockfd, &fds[READ]) ) {
-       _read(ctx, sockfd);     /* read received data */
-      } else if ( FD_ISSET( sockfd, &fds[WRITE]) ) { /* write to socket */
-       _write(ctx, sockfd);            /* write data */
-      }
-    } else {                   /* timeout */
-      check_timeout();
-    }
-    remove_closed();
-  }
-  
- end:
-#ifdef WITH_DTLS
-  for (idx = 0; idx < MAX_SSL_PEERS; idx++) {
-    if (ssl_peer_storage[idx] && ssl_peer_storage[idx]->ssl) {
-      if (ssl_peer_storage[idx]->state == PEER_ST_ESTABLISHED)
-       SSL_shutdown(ssl_peer_storage[idx]->ssl);
-      SSL_free(ssl_peer_storage[idx]->ssl);
-    }
-  }
-
-  SSL_CTX_free(ctx);
-#endif
-  close(sockfd);               /* don't care if we close stdin at this point */
-  return res;
-}
diff --git a/extlibs/tinydtls/tinydtls.h b/extlibs/tinydtls/tinydtls.h
deleted file mode 100644 (file)
index 7921b08..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* tinydtls.h.  Generated from tinydtls.h.in by configure.  */
-/* tinydtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file tinydtls.h
- * @brief public tinydtls API
- */
-
-#ifndef _DTLS_TINYDTLS_H_
-#define _DTLS_TINYDTLS_H_
-
-/** Defined to 1 if tinydtls is built with support for ECC */
-#define DTLS_ECC 1
-
-/** Defined to 1 if tinydtls is built with support for PSK */
-#define DTLS_PSK 1
-
-/** Defined to 1 if tinydtls is built for Contiki OS */
-/* #undef WITH_CONTIKI */
-
-/** Define to 1 if building with X.509 support */
-#define DTLS_X509 1
-
-/** Define to 1 if building with Hardware Abstraction Layer */
-#define DTLS_CRYPTO_HAL 0
-
-#ifndef INLINE_API
-#  if defined(__cplusplus)
-#    define INLINE_API inline
-#  else
-#    ifdef _MSC_VER
-#      define INLINE_API static __inline
-#    else
-#      define INLINE_API static inline
-#    endif
-#  endif
-#endif
-
-#endif /* _DTLS_TINYDTLS_H_ */
diff --git a/extlibs/tinydtls/tinydtls.h.in b/extlibs/tinydtls/tinydtls.h.in
deleted file mode 100644 (file)
index a267ad6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* tinydtls -- a very basic DTLS implementation
- *
- * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
- * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * @file tinydtls.h
- * @brief public tinydtls API
- */
-
-#ifndef _DTLS_TINYDTLS_H_
-#define _DTLS_TINYDTLS_H_
-
-/** Defined to 1 if tinydtls is built with support for ECC */
-#undef DTLS_ECC
-
-/** Defined to 1 if tinydtls is built with support for PSK */
-#undef DTLS_PSK
-
-/** Defined to 1 if tinydtls is built for Contiki OS */
-#undef WITH_CONTIKI
-
-/** Define to 1 if building with X.509 support */
-#undef DTLS_X509
-
-/** Define to 1 if building with crypto hardware abstraction support */
-#undef DTLS_CRYPTO_HAL
-
-#endif /* _DTLS_TINYDTLS_H_ */
diff --git a/extlibs/tinydtls/uthash.h b/extlibs/tinydtls/uthash.h
deleted file mode 100644 (file)
index 5125cc6..0000000
+++ /dev/null
@@ -1,972 +0,0 @@
-/*
-Copyright (c) 2003-2010, Troy D. Hanson     http://uthash.sourceforge.net
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef UTHASH_H
-#define UTHASH_H
-
-#include <string.h>   /* memcmp,strlen */
-#include <stddef.h>   /* ptrdiff_t */
-
-/* These macros use decltype or the earlier __typeof GNU extension.
-   As decltype is only available in newer compilers (VS2010 or gcc 4.3+
-   when compiling c++ source) this code uses whatever method is needed
-   or, for VS2008 where neither is available, uses casting workarounds. */
-#ifdef _MSC_VER         /* MS compiler */
-#if _MSC_VER >= 1600 && defined(__cplusplus)  /* VS2010 or newer in C++ mode */
-#define DECLTYPE(x) (decltype(x))
-#else                   /* VS2008 or older (or VS2010 in C mode) */
-#define NO_DECLTYPE
-#define DECLTYPE(x)
-#endif
-#else                   /* GNU, Sun and other compilers */
-#define DECLTYPE(x) (__typeof(x))
-#endif
-
-#ifdef NO_DECLTYPE
-#define DECLTYPE_ASSIGN(dst,src)                                                 \
-do {                                                                             \
-  char **_da_dst = (char**)(&(dst));                                             \
-  *_da_dst = (char*)(src);                                                       \
-} while(0)
-#else
-#define DECLTYPE_ASSIGN(dst,src)                                                 \
-do {                                                                             \
-  (dst) = DECLTYPE(dst)(src);                                                    \
-} while(0)
-#endif
-
-/* a number of the hash function use uint32_t which isn't defined on win32 */
-#ifdef _MSC_VER
-typedef unsigned int uint32_t;
-#else
-#include <inttypes.h>   /* uint32_t */
-#endif
-
-#define UTHASH_VERSION 1.9.3
-
-#define uthash_fatal(msg) exit(-1)        /* fatal error (out of memory,etc) */
-#define uthash_malloc(sz) malloc(sz)      /* malloc fcn                      */
-#define uthash_free(ptr,sz) free(ptr)     /* free fcn                        */
-
-#define uthash_noexpand_fyi(tbl)          /* can be defined to log noexpand  */
-#define uthash_expand_fyi(tbl)            /* can be defined to log expands   */
-
-/* initial number of buckets */
-#define HASH_INITIAL_NUM_BUCKETS 32      /* initial number of buckets        */
-#define HASH_INITIAL_NUM_BUCKETS_LOG2 5  /* lg2 of initial number of buckets */
-#define HASH_BKT_CAPACITY_THRESH 10      /* expand when bucket count reaches */
-
-/* calculate the element whose hash handle address is hhe */
-#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
-
-#define HASH_FIND(hh,head,keyptr,keylen,out)                                     \
-do {                                                                             \
-  unsigned _hf_bkt,_hf_hashv;                                                    \
-  out=NULL;                                                                      \
-  if (head) {                                                                    \
-     HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt);   \
-     if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) {                           \
-       HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ],  \
-                        keyptr,keylen,out);                                      \
-     }                                                                           \
-  }                                                                              \
-} while (0)
-
-#ifdef HASH_BLOOM
-#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM)
-#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0)
-#define HASH_BLOOM_MAKE(tbl)                                                     \
-do {                                                                             \
-  (tbl)->bloom_nbits = HASH_BLOOM;                                               \
-  (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN);                 \
-  if (!((tbl)->bloom_bv))  { uthash_fatal( "out of memory"); }                   \
-  memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN);                                \
-  (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE;                                       \
-} while (0);
-
-#define HASH_BLOOM_FREE(tbl)                                                     \
-do {                                                                             \
-  uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN);                              \
-} while (0);
-
-#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8)))
-#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8)))
-
-#define HASH_BLOOM_ADD(tbl,hashv)                                                \
-  HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
-
-#define HASH_BLOOM_TEST(tbl,hashv)                                               \
-  HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
-
-#else
-#define HASH_BLOOM_MAKE(tbl)
-#define HASH_BLOOM_FREE(tbl)
-#define HASH_BLOOM_ADD(tbl,hashv)
-#define HASH_BLOOM_TEST(tbl,hashv) (1)
-#endif
-
-#define HASH_MAKE_TABLE(hh,head)                                                 \
-do {                                                                             \
-  (head)->hh.tbl = (UT_hash_table*)uthash_malloc(                                \
-                  sizeof(UT_hash_table));                                        \
-  if (!((head)->hh.tbl))  { uthash_fatal( "out of memory"); }                    \
-  memset((head)->hh.tbl, 0, sizeof(UT_hash_table));                              \
-  (head)->hh.tbl->tail = &((head)->hh);                                          \
-  (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS;                        \
-  (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2;              \
-  (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head);                    \
-  (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc(                      \
-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
-  if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); }             \
-  memset((head)->hh.tbl->buckets, 0,                                             \
-          HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket));               \
-  HASH_BLOOM_MAKE((head)->hh.tbl);                                               \
-  (head)->hh.tbl->signature = HASH_SIGNATURE;                                    \
-} while(0)
-
-#define HASH_ADD(hh,head,fieldname,keylen_in,add)                                \
-        HASH_ADD_KEYPTR(hh,head,&add->fieldname,keylen_in,add)
-
-#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add)                            \
-do {                                                                             \
- unsigned _ha_bkt;                                                               \
- (add)->hh.next = NULL;                                                          \
- (add)->hh.key = (char*)keyptr;                                                  \
- (add)->hh.keylen = keylen_in;                                                   \
- if (!(head)) {                                                                  \
-    head = (add);                                                                \
-    (head)->hh.prev = NULL;                                                      \
-    HASH_MAKE_TABLE(hh,head);                                                    \
- } else {                                                                        \
-    (head)->hh.tbl->tail->next = (add);                                          \
-    (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail);         \
-    (head)->hh.tbl->tail = &((add)->hh);                                         \
- }                                                                               \
- (head)->hh.tbl->num_items++;                                                    \
- (add)->hh.tbl = (head)->hh.tbl;                                                 \
- HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets,                         \
-         (add)->hh.hashv, _ha_bkt);                                              \
- HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh);                   \
- HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv);                                 \
- HASH_EMIT_KEY(hh,head,keyptr,keylen_in);                                        \
- HASH_FSCK(hh,head);                                                             \
-} while(0)
-
-#define HASH_TO_BKT( hashv, num_bkts, bkt )                                      \
-do {                                                                             \
-  bkt = ((hashv) & ((num_bkts) - 1));                                            \
-} while(0)
-
-/* delete "delptr" from the hash table.
- * "the usual" patch-up process for the app-order doubly-linked-list.
- * The use of _hd_hh_del below deserves special explanation.
- * These used to be expressed using (delptr) but that led to a bug
- * if someone used the same symbol for the head and deletee, like
- *  HASH_DELETE(hh,users,users);
- * We want that to work, but by changing the head (users) below
- * we were forfeiting our ability to further refer to the deletee (users)
- * in the patch-up process. Solution: use scratch space to
- * copy the deletee pointer, then the latter references are via that
- * scratch pointer rather than through the repointed (users) symbol.
- */
-#define HASH_DELETE(hh,head,delptr)                                              \
-do {                                                                             \
-    unsigned _hd_bkt;                                                            \
-    struct UT_hash_handle *_hd_hh_del;                                           \
-    if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) )  {         \
-        uthash_free((head)->hh.tbl->buckets,                                     \
-                    (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
-        HASH_BLOOM_FREE((head)->hh.tbl);                                         \
-        uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                      \
-        head = NULL;                                                             \
-    } else {                                                                     \
-        _hd_hh_del = &((delptr)->hh);                                            \
-        if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) {     \
-            (head)->hh.tbl->tail =                                               \
-                (UT_hash_handle*)((char*)((delptr)->hh.prev) +                   \
-                (head)->hh.tbl->hho);                                            \
-        }                                                                        \
-        if ((delptr)->hh.prev) {                                                 \
-            ((UT_hash_handle*)((char*)((delptr)->hh.prev) +                      \
-                    (head)->hh.tbl->hho))->next = (delptr)->hh.next;             \
-        } else {                                                                 \
-            DECLTYPE_ASSIGN(head,(delptr)->hh.next);                             \
-        }                                                                        \
-        if (_hd_hh_del->next) {                                                  \
-            ((UT_hash_handle*)((char*)_hd_hh_del->next +                         \
-                    (head)->hh.tbl->hho))->prev =                                \
-                    _hd_hh_del->prev;                                            \
-        }                                                                        \
-        HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt);   \
-        HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del);        \
-        (head)->hh.tbl->num_items--;                                             \
-    }                                                                            \
-    HASH_FSCK(hh,head);                                                          \
-} while (0)
-
-
-/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
-#define HASH_FIND_STR(head,findstr,out)                                          \
-    HASH_FIND(hh,head,findstr,strlen(findstr),out)
-#define HASH_ADD_STR(head,strfield,add)                                          \
-    HASH_ADD(hh,head,strfield,strlen(add->strfield),add)
-#define HASH_FIND_INT(head,findint,out)                                          \
-    HASH_FIND(hh,head,findint,sizeof(int),out)
-#define HASH_ADD_INT(head,intfield,add)                                          \
-    HASH_ADD(hh,head,intfield,sizeof(int),add)
-#define HASH_FIND_PTR(head,findptr,out)                                          \
-    HASH_FIND(hh,head,findptr,sizeof(void *),out)
-#define HASH_ADD_PTR(head,ptrfield,add)                                          \
-    HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
-#define HASH_DEL(head,delptr)                                                    \
-    HASH_DELETE(hh,head,delptr)
-
-/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
- * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
- */
-#ifdef HASH_DEBUG
-#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
-#define HASH_FSCK(hh,head)                                                       \
-do {                                                                             \
-    unsigned _bkt_i;                                                             \
-    unsigned _count, _bkt_count;                                                 \
-    char *_prev;                                                                 \
-    struct UT_hash_handle *_thh;                                                 \
-    if (head) {                                                                  \
-        _count = 0;                                                              \
-        for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) {       \
-            _bkt_count = 0;                                                      \
-            _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head;                      \
-            _prev = NULL;                                                        \
-            while (_thh) {                                                       \
-               if (_prev != (char*)(_thh->hh_prev)) {                            \
-                   HASH_OOPS("invalid hh_prev %p, actual %p\n",                  \
-                    _thh->hh_prev, _prev );                                      \
-               }                                                                 \
-               _bkt_count++;                                                     \
-               _prev = (char*)(_thh);                                            \
-               _thh = _thh->hh_next;                                             \
-            }                                                                    \
-            _count += _bkt_count;                                                \
-            if ((head)->hh.tbl->buckets[_bkt_i].count !=  _bkt_count) {          \
-               HASH_OOPS("invalid bucket count %d, actual %d\n",                 \
-                (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count);              \
-            }                                                                    \
-        }                                                                        \
-        if (_count != (head)->hh.tbl->num_items) {                               \
-            HASH_OOPS("invalid hh item count %d, actual %d\n",                   \
-                (head)->hh.tbl->num_items, _count );                             \
-        }                                                                        \
-        /* traverse hh in app order; check next/prev integrity, count */         \
-        _count = 0;                                                              \
-        _prev = NULL;                                                            \
-        _thh =  &(head)->hh;                                                     \
-        while (_thh) {                                                           \
-           _count++;                                                             \
-           if (_prev !=(char*)(_thh->prev)) {                                    \
-              HASH_OOPS("invalid prev %p, actual %p\n",                          \
-                    _thh->prev, _prev );                                         \
-           }                                                                     \
-           _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh);                    \
-           _thh = ( _thh->next ?  (UT_hash_handle*)((char*)(_thh->next) +        \
-                                  (head)->hh.tbl->hho) : NULL );                 \
-        }                                                                        \
-        if (_count != (head)->hh.tbl->num_items) {                               \
-            HASH_OOPS("invalid app item count %d, actual %d\n",                  \
-                (head)->hh.tbl->num_items, _count );                             \
-        }                                                                        \
-    }                                                                            \
-} while (0)
-#else
-#define HASH_FSCK(hh,head)
-#endif
-
-/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to
- * the descriptor to which this macro is defined for tuning the hash function.
- * The app can #include <unistd.h> to get the prototype for write(2). */
-#ifdef HASH_EMIT_KEYS
-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)                                   \
-do {                                                                             \
-    unsigned _klen = fieldlen;                                                   \
-    write(HASH_EMIT_KEYS, &_klen, sizeof(_klen));                                \
-    write(HASH_EMIT_KEYS, keyptr, fieldlen);                                     \
-} while (0)
-#else
-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)
-#endif
-
-/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
-#ifdef HASH_FUNCTION
-#define HASH_FCN HASH_FUNCTION
-#else
-#define HASH_FCN HASH_JEN
-#endif
-
-/* The Bernstein hash function, used in Perl prior to v5.6 */
-#define HASH_BER(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  unsigned _hb_keylen=keylen;                                                    \
-  char *_hb_key=(char*)(key);                                                    \
-  (hashv) = 0;                                                                   \
-  while (_hb_keylen--)  { (hashv) = ((hashv) * 33) + *_hb_key++; }               \
-  bkt = (hashv) & (num_bkts-1);                                                  \
-} while (0)
-
-
-/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
-#define HASH_SAX(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  unsigned _sx_i;                                                                \
-  char *_hs_key=(char*)(key);                                                    \
-  hashv = 0;                                                                     \
-  for(_sx_i=0; _sx_i < keylen; _sx_i++)                                          \
-      hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i];                     \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while (0)
-
-#define HASH_FNV(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  unsigned _fn_i;                                                                \
-  char *_hf_key=(char*)(key);                                                    \
-  hashv = 2166136261UL;                                                          \
-  for(_fn_i=0; _fn_i < keylen; _fn_i++)                                          \
-      hashv = (hashv * 16777619) ^ _hf_key[_fn_i];                               \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while(0);
-
-#define HASH_OAT(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  unsigned _ho_i;                                                                \
-  char *_ho_key=(char*)(key);                                                    \
-  hashv = 0;                                                                     \
-  for(_ho_i=0; _ho_i < keylen; _ho_i++) {                                        \
-      hashv += _ho_key[_ho_i];                                                   \
-      hashv += (hashv << 10);                                                    \
-      hashv ^= (hashv >> 6);                                                     \
-  }                                                                              \
-  hashv += (hashv << 3);                                                         \
-  hashv ^= (hashv >> 11);                                                        \
-  hashv += (hashv << 15);                                                        \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while(0)
-
-#define HASH_JEN_MIX(a,b,c)                                                      \
-do {                                                                             \
-  a -= b; a -= c; a ^= ( c >> 13 );                                              \
-  b -= c; b -= a; b ^= ( a << 8 );                                               \
-  c -= a; c -= b; c ^= ( b >> 13 );                                              \
-  a -= b; a -= c; a ^= ( c >> 12 );                                              \
-  b -= c; b -= a; b ^= ( a << 16 );                                              \
-  c -= a; c -= b; c ^= ( b >> 5 );                                               \
-  a -= b; a -= c; a ^= ( c >> 3 );                                               \
-  b -= c; b -= a; b ^= ( a << 10 );                                              \
-  c -= a; c -= b; c ^= ( b >> 15 );                                              \
-} while (0)
-
-#define HASH_JEN(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  unsigned _hj_i,_hj_j,_hj_k;                                                    \
-  char *_hj_key=(char*)(key);                                                    \
-  hashv = 0xfeedbeef;                                                            \
-  _hj_i = _hj_j = 0x9e3779b9;                                                    \
-  _hj_k = keylen;                                                                \
-  while (_hj_k >= 12) {                                                          \
-    _hj_i +=    (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 )                      \
-        + ( (unsigned)_hj_key[2] << 16 )                                         \
-        + ( (unsigned)_hj_key[3] << 24 ) );                                      \
-    _hj_j +=    (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 )                      \
-        + ( (unsigned)_hj_key[6] << 16 )                                         \
-        + ( (unsigned)_hj_key[7] << 24 ) );                                      \
-    hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 )                         \
-        + ( (unsigned)_hj_key[10] << 16 )                                        \
-        + ( (unsigned)_hj_key[11] << 24 ) );                                     \
-                                                                                 \
-     HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                          \
-                                                                                 \
-     _hj_key += 12;                                                              \
-     _hj_k -= 12;                                                                \
-  }                                                                              \
-  hashv += keylen;                                                               \
-  switch ( _hj_k ) {                                                             \
-     case 11: hashv += ( (unsigned)_hj_key[10] << 24 );                          \
-     case 10: hashv += ( (unsigned)_hj_key[9] << 16 );                           \
-     case 9:  hashv += ( (unsigned)_hj_key[8] << 8 );                            \
-     case 8:  _hj_j += ( (unsigned)_hj_key[7] << 24 );                           \
-     case 7:  _hj_j += ( (unsigned)_hj_key[6] << 16 );                           \
-     case 6:  _hj_j += ( (unsigned)_hj_key[5] << 8 );                            \
-     case 5:  _hj_j += _hj_key[4];                                               \
-     case 4:  _hj_i += ( (unsigned)_hj_key[3] << 24 );                           \
-     case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );                           \
-     case 2:  _hj_i += ( (unsigned)_hj_key[1] << 8 );                            \
-     case 1:  _hj_i += _hj_key[0];                                               \
-  }                                                                              \
-  HASH_JEN_MIX(_hj_i, _hj_j, hashv);                                             \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while(0)
-
-/* The Paul Hsieh hash function */
-#undef get16bits
-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__)             \
-  || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
-#define get16bits(d) (*((const uint16_t *) (d)))
-#endif
-
-#if !defined (get16bits)
-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)             \
-                       +(uint32_t)(((const uint8_t *)(d))[0]) )
-#endif
-#define HASH_SFH(key,keylen,num_bkts,hashv,bkt)                                  \
-do {                                                                             \
-  char *_sfh_key=(char*)(key);                                                   \
-  uint32_t _sfh_tmp, _sfh_len = keylen;                                          \
-                                                                                 \
-  int _sfh_rem = _sfh_len & 3;                                                   \
-  _sfh_len >>= 2;                                                                \
-  hashv = 0xcafebabe;                                                            \
-                                                                                 \
-  /* Main loop */                                                                \
-  for (;_sfh_len > 0; _sfh_len--) {                                              \
-    hashv    += get16bits (_sfh_key);                                            \
-    _sfh_tmp       = (get16bits (_sfh_key+2) << 11) ^ hashv;                     \
-    hashv     = (hashv << 16) ^ _sfh_tmp;                                        \
-    _sfh_key += 2*sizeof (uint16_t);                                             \
-    hashv    += hashv >> 11;                                                     \
-  }                                                                              \
-                                                                                 \
-  /* Handle end cases */                                                         \
-  switch (_sfh_rem) {                                                            \
-    case 3: hashv += get16bits (_sfh_key);                                       \
-            hashv ^= hashv << 16;                                                \
-            hashv ^= _sfh_key[sizeof (uint16_t)] << 18;                          \
-            hashv += hashv >> 11;                                                \
-            break;                                                               \
-    case 2: hashv += get16bits (_sfh_key);                                       \
-            hashv ^= hashv << 11;                                                \
-            hashv += hashv >> 17;                                                \
-            break;                                                               \
-    case 1: hashv += *_sfh_key;                                                  \
-            hashv ^= hashv << 10;                                                \
-            hashv += hashv >> 1;                                                 \
-  }                                                                              \
-                                                                                 \
-    /* Force "avalanching" of final 127 bits */                                  \
-    hashv ^= hashv << 3;                                                         \
-    hashv += hashv >> 5;                                                         \
-    hashv ^= hashv << 4;                                                         \
-    hashv += hashv >> 17;                                                        \
-    hashv ^= hashv << 25;                                                        \
-    hashv += hashv >> 6;                                                         \
-    bkt = hashv & (num_bkts-1);                                                  \
-} while(0);
-
-#ifdef HASH_USING_NO_STRICT_ALIASING
-/* The MurmurHash exploits some CPU's (e.g. x86) tolerance for unaligned reads.
- * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
- * So MurmurHash comes in two versions, the faster unaligned one and the slower
- * aligned one. We only use the faster one on CPU's where we know it's safe.
- *
- * Note the preprocessor built-in defines can be emitted using:
- *
- *   gcc -m64 -dM -E - < /dev/null                  (on gcc)
- *   cc -## a.c (where a.c is a simple test file)   (Sun Studio)
- */
-#if (defined(__i386__) || defined(__x86_64__))
-#define HASH_MUR HASH_MUR_UNALIGNED
-#else
-#define HASH_MUR HASH_MUR_ALIGNED
-#endif
-
-/* Appleby's MurmurHash fast version for unaligned-tolerant archs like i386 */
-#define HASH_MUR_UNALIGNED(key,keylen,num_bkts,hashv,bkt)                        \
-do {                                                                             \
-  const unsigned int _mur_m = 0x5bd1e995;                                        \
-  const int _mur_r = 24;                                                         \
-  hashv = 0xcafebabe ^ keylen;                                                   \
-  char *_mur_key = (char *)(key);                                                \
-  uint32_t _mur_tmp, _mur_len = keylen;                                          \
-                                                                                 \
-  for (;_mur_len >= 4; _mur_len-=4) {                                            \
-    _mur_tmp = *(uint32_t *)_mur_key;                                            \
-    _mur_tmp *= _mur_m;                                                          \
-    _mur_tmp ^= _mur_tmp >> _mur_r;                                              \
-    _mur_tmp *= _mur_m;                                                          \
-    hashv *= _mur_m;                                                             \
-    hashv ^= _mur_tmp;                                                           \
-    _mur_key += 4;                                                               \
-  }                                                                              \
-                                                                                 \
-  switch(_mur_len)                                                               \
-  {                                                                              \
-    case 3: hashv ^= _mur_key[2] << 16;                                          \
-    case 2: hashv ^= _mur_key[1] << 8;                                           \
-    case 1: hashv ^= _mur_key[0];                                                \
-            hashv *= _mur_m;                                                     \
-  };                                                                             \
-                                                                                 \
-  hashv ^= hashv >> 13;                                                          \
-  hashv *= _mur_m;                                                               \
-  hashv ^= hashv >> 15;                                                          \
-                                                                                 \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while(0)
-
-/* Appleby's MurmurHash version for alignment-sensitive archs like Sparc */
-#define HASH_MUR_ALIGNED(key,keylen,num_bkts,hashv,bkt)                          \
-do {                                                                             \
-  const unsigned int _mur_m = 0x5bd1e995;                                        \
-  const int _mur_r = 24;                                                         \
-  hashv = 0xcafebabe ^ (keylen);                                                 \
-  char *_mur_key = (char *)(key);                                                \
-  uint32_t _mur_len = keylen;                                                    \
-  int _mur_align = (int)_mur_key & 3;                                            \
-                                                                                 \
-  if (_mur_align && (_mur_len >= 4)) {                                           \
-    unsigned _mur_t = 0, _mur_d = 0;                                             \
-    switch(_mur_align) {                                                         \
-      case 1: _mur_t |= _mur_key[2] << 16;                                       \
-      case 2: _mur_t |= _mur_key[1] << 8;                                        \
-      case 3: _mur_t |= _mur_key[0];                                             \
-    }                                                                            \
-    _mur_t <<= (8 * _mur_align);                                                 \
-    _mur_key += 4-_mur_align;                                                    \
-    _mur_len -= 4-_mur_align;                                                    \
-    int _mur_sl = 8 * (4-_mur_align);                                            \
-    int _mur_sr = 8 * _mur_align;                                                \
-                                                                                 \
-    for (;_mur_len >= 4; _mur_len-=4) {                                          \
-      _mur_d = *(unsigned *)_mur_key;                                            \
-      _mur_t = (_mur_t >> _mur_sr) | (_mur_d << _mur_sl);                        \
-      unsigned _mur_k = _mur_t;                                                  \
-      _mur_k *= _mur_m;                                                          \
-      _mur_k ^= _mur_k >> _mur_r;                                                \
-      _mur_k *= _mur_m;                                                          \
-      hashv *= _mur_m;                                                           \
-      hashv ^= _mur_k;                                                           \
-      _mur_t = _mur_d;                                                           \
-      _mur_key += 4;                                                             \
-    }                                                                            \
-    _mur_d = 0;                                                                  \
-    if(_mur_len >= _mur_align) {                                                 \
-      switch(_mur_align) {                                                       \
-        case 3: _mur_d |= _mur_key[2] << 16;                                     \
-        case 2: _mur_d |= _mur_key[1] << 8;                                      \
-        case 1: _mur_d |= _mur_key[0];                                           \
-      }                                                                          \
-      unsigned _mur_k = (_mur_t >> _mur_sr) | (_mur_d << _mur_sl);               \
-      _mur_k *= _mur_m;                                                          \
-      _mur_k ^= _mur_k >> _mur_r;                                                \
-      _mur_k *= _mur_m;                                                          \
-      hashv *= _mur_m;                                                           \
-      hashv ^= _mur_k;                                                           \
-      _mur_k += _mur_align;                                                      \
-      _mur_len -= _mur_align;                                                    \
-                                                                                 \
-      switch(_mur_len)                                                           \
-      {                                                                          \
-        case 3: hashv ^= _mur_key[2] << 16;                                      \
-        case 2: hashv ^= _mur_key[1] << 8;                                       \
-        case 1: hashv ^= _mur_key[0];                                            \
-                hashv *= _mur_m;                                                 \
-      }                                                                          \
-    } else {                                                                     \
-      switch(_mur_len)                                                           \
-      {                                                                          \
-        case 3: _mur_d ^= _mur_key[2] << 16;                                     \
-        case 2: _mur_d ^= _mur_key[1] << 8;                                      \
-        case 1: _mur_d ^= _mur_key[0];                                           \
-        case 0: hashv ^= (_mur_t >> _mur_sr) | (_mur_d << _mur_sl);              \
-        hashv *= _mur_m;                                                         \
-      }                                                                          \
-    }                                                                            \
-                                                                                 \
-    hashv ^= hashv >> 13;                                                        \
-    hashv *= _mur_m;                                                             \
-    hashv ^= hashv >> 15;                                                        \
-  } else {                                                                       \
-    for (;_mur_len >= 4; _mur_len-=4) {                                          \
-      unsigned _mur_k = *(unsigned*)_mur_key;                                    \
-      _mur_k *= _mur_m;                                                          \
-      _mur_k ^= _mur_k >> _mur_r;                                                \
-      _mur_k *= _mur_m;                                                          \
-      hashv *= _mur_m;                                                           \
-      hashv ^= _mur_k;                                                           \
-      _mur_key += 4;                                                             \
-    }                                                                            \
-    switch(_mur_len)                                                             \
-    {                                                                            \
-      case 3: hashv ^= _mur_key[2] << 16;                                        \
-      case 2: hashv ^= _mur_key[1] << 8;                                         \
-      case 1: hashv ^= _mur_key[0];                                              \
-      hashv *= _mur_m;                                                           \
-    }                                                                            \
-                                                                                 \
-    hashv ^= hashv >> 13;                                                        \
-    hashv *= _mur_m;                                                             \
-    hashv ^= hashv >> 15;                                                        \
-  }                                                                              \
-  bkt = hashv & (num_bkts-1);                                                    \
-} while(0)
-#endif  /* HASH_USING_NO_STRICT_ALIASING */
-
-/* key comparison function; return 0 if keys equal */
-#define HASH_KEYCMP(a,b,len) memcmp(a,b,len)
-
-/* iterate over items in a known bucket to find desired item */
-#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out)                       \
-do {                                                                             \
- if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head));          \
- else out=NULL;                                                                  \
- while (out) {                                                                   \
-    if (out->hh.keylen == keylen_in) {                                           \
-        if ((HASH_KEYCMP(out->hh.key,keyptr,keylen_in)) == 0) break;             \
-    }                                                                            \
-    if (out->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,out->hh.hh_next)); \
-    else out = NULL;                                                             \
- }                                                                               \
-} while(0)
-
-/* add an item to a bucket  */
-#define HASH_ADD_TO_BKT(head,addhh)                                              \
-do {                                                                             \
- head.count++;                                                                   \
- (addhh)->hh_next = head.hh_head;                                                \
- (addhh)->hh_prev = NULL;                                                        \
- if (head.hh_head) { (head).hh_head->hh_prev = (addhh); }                        \
- (head).hh_head=addhh;                                                           \
- if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH)             \
-     && (addhh)->tbl->noexpand != 1) {                                           \
-       HASH_EXPAND_BUCKETS((addhh)->tbl);                                        \
- }                                                                               \
-} while(0)
-
-/* remove an item from a given bucket */
-#define HASH_DEL_IN_BKT(hh,head,hh_del)                                          \
-    (head).count--;                                                              \
-    if ((head).hh_head == hh_del) {                                              \
-      (head).hh_head = hh_del->hh_next;                                          \
-    }                                                                            \
-    if (hh_del->hh_prev) {                                                       \
-        hh_del->hh_prev->hh_next = hh_del->hh_next;                              \
-    }                                                                            \
-    if (hh_del->hh_next) {                                                       \
-        hh_del->hh_next->hh_prev = hh_del->hh_prev;                              \
-    }
-
-/* Bucket expansion has the effect of doubling the number of buckets
- * and redistributing the items into the new buckets. Ideally the
- * items will distribute more or less evenly into the new buckets
- * (the extent to which this is true is a measure of the quality of
- * the hash function as it applies to the key domain).
- *
- * With the items distributed into more buckets, the chain length
- * (item count) in each bucket is reduced. Thus by expanding buckets
- * the hash keeps a bound on the chain length. This bounded chain
- * length is the essence of how a hash provides constant time lookup.
- *
- * The calculation of tbl->ideal_chain_maxlen below deserves some
- * explanation. First, keep in mind that we're calculating the ideal
- * maximum chain length based on the *new* (doubled) bucket count.
- * In fractions this is just n/b (n=number of items,b=new num buckets).
- * Since the ideal chain length is an integer, we want to calculate
- * ceil(n/b). We don't depend on floating point arithmetic in this
- * hash, so to calculate ceil(n/b) with integers we could write
- *
- *      ceil(n/b) = (n/b) + ((n%b)?1:0)
- *
- * and in fact a previous version of this hash did just that.
- * But now we have improved things a bit by recognizing that b is
- * always a power of two. We keep its base 2 log handy (call it lb),
- * so now we can write this with a bit shift and logical AND:
- *
- *      ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
- *
- */
-#define HASH_EXPAND_BUCKETS(tbl)                                                 \
-do {                                                                             \
-    unsigned _he_bkt;                                                            \
-    unsigned _he_bkt_i;                                                          \
-    struct UT_hash_handle *_he_thh, *_he_hh_nxt;                                 \
-    UT_hash_bucket *_he_new_buckets, *_he_newbkt;                                \
-    _he_new_buckets = (UT_hash_bucket*)uthash_malloc(                            \
-             2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));              \
-    if (!_he_new_buckets) { uthash_fatal( "out of memory"); }                    \
-    memset(_he_new_buckets, 0,                                                   \
-            2 * tbl->num_buckets * sizeof(struct UT_hash_bucket));               \
-    tbl->ideal_chain_maxlen =                                                    \
-       (tbl->num_items >> (tbl->log2_num_buckets+1)) +                           \
-       ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0);                    \
-    tbl->nonideal_items = 0;                                                     \
-    for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++)                \
-    {                                                                            \
-        _he_thh = tbl->buckets[ _he_bkt_i ].hh_head;                             \
-        while (_he_thh) {                                                        \
-           _he_hh_nxt = _he_thh->hh_next;                                        \
-           HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt);            \
-           _he_newbkt = &(_he_new_buckets[ _he_bkt ]);                           \
-           if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) {                \
-             tbl->nonideal_items++;                                              \
-             _he_newbkt->expand_mult = _he_newbkt->count /                       \
-                                        tbl->ideal_chain_maxlen;                 \
-           }                                                                     \
-           _he_thh->hh_prev = NULL;                                              \
-           _he_thh->hh_next = _he_newbkt->hh_head;                               \
-           if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev =               \
-                _he_thh;                                                         \
-           _he_newbkt->hh_head = _he_thh;                                        \
-           _he_thh = _he_hh_nxt;                                                 \
-        }                                                                        \
-    }                                                                            \
-    uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
-    tbl->num_buckets *= 2;                                                       \
-    tbl->log2_num_buckets++;                                                     \
-    tbl->buckets = _he_new_buckets;                                              \
-    tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ?         \
-        (tbl->ineff_expands+1) : 0;                                              \
-    if (tbl->ineff_expands > 1) {                                                \
-        tbl->noexpand=1;                                                         \
-        uthash_noexpand_fyi(tbl);                                                \
-    }                                                                            \
-    uthash_expand_fyi(tbl);                                                      \
-} while(0)
-
-
-/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
-/* Note that HASH_SORT assumes the hash handle name to be hh.
- * HASH_SRT was added to allow the hash handle name to be passed in. */
-#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
-#define HASH_SRT(hh,head,cmpfcn)                                                 \
-do {                                                                             \
-  unsigned _hs_i;                                                                \
-  unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize;               \
-  struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail;            \
-  if (head) {                                                                    \
-      _hs_insize = 1;                                                            \
-      _hs_looping = 1;                                                           \
-      _hs_list = &((head)->hh);                                                  \
-      while (_hs_looping) {                                                      \
-          _hs_p = _hs_list;                                                      \
-          _hs_list = NULL;                                                       \
-          _hs_tail = NULL;                                                       \
-          _hs_nmerges = 0;                                                       \
-          while (_hs_p) {                                                        \
-              _hs_nmerges++;                                                     \
-              _hs_q = _hs_p;                                                     \
-              _hs_psize = 0;                                                     \
-              for ( _hs_i = 0; _hs_i  < _hs_insize; _hs_i++ ) {                  \
-                  _hs_psize++;                                                   \
-                  _hs_q = (UT_hash_handle*)((_hs_q->next) ?                      \
-                          ((void*)((char*)(_hs_q->next) +                        \
-                          (head)->hh.tbl->hho)) : NULL);                         \
-                  if (! (_hs_q) ) break;                                         \
-              }                                                                  \
-              _hs_qsize = _hs_insize;                                            \
-              while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) {           \
-                  if (_hs_psize == 0) {                                          \
-                      _hs_e = _hs_q;                                             \
-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
-                              ((void*)((char*)(_hs_q->next) +                    \
-                              (head)->hh.tbl->hho)) : NULL);                     \
-                      _hs_qsize--;                                               \
-                  } else if ( (_hs_qsize == 0) || !(_hs_q) ) {                   \
-                      _hs_e = _hs_p;                                             \
-                      _hs_p = (UT_hash_handle*)((_hs_p->next) ?                  \
-                              ((void*)((char*)(_hs_p->next) +                    \
-                              (head)->hh.tbl->hho)) : NULL);                     \
-                      _hs_psize--;                                               \
-                  } else if ((                                                   \
-                      cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
-                             DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
-                             ) <= 0) {                                           \
-                      _hs_e = _hs_p;                                             \
-                      _hs_p = (UT_hash_handle*)((_hs_p->next) ?                  \
-                              ((void*)((char*)(_hs_p->next) +                    \
-                              (head)->hh.tbl->hho)) : NULL);                     \
-                      _hs_psize--;                                               \
-                  } else {                                                       \
-                      _hs_e = _hs_q;                                             \
-                      _hs_q = (UT_hash_handle*)((_hs_q->next) ?                  \
-                              ((void*)((char*)(_hs_q->next) +                    \
-                              (head)->hh.tbl->hho)) : NULL);                     \
-                      _hs_qsize--;                                               \
-                  }                                                              \
-                  if ( _hs_tail ) {                                              \
-                      _hs_tail->next = ((_hs_e) ?                                \
-                            ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL);          \
-                  } else {                                                       \
-                      _hs_list = _hs_e;                                          \
-                  }                                                              \
-                  _hs_e->prev = ((_hs_tail) ?                                    \
-                     ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL);              \
-                  _hs_tail = _hs_e;                                              \
-              }                                                                  \
-              _hs_p = _hs_q;                                                     \
-          }                                                                      \
-          _hs_tail->next = NULL;                                                 \
-          if ( _hs_nmerges <= 1 ) {                                              \
-              _hs_looping=0;                                                     \
-              (head)->hh.tbl->tail = _hs_tail;                                   \
-              DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list));      \
-          }                                                                      \
-          _hs_insize *= 2;                                                       \
-      }                                                                          \
-      HASH_FSCK(hh,head);                                                        \
- }                                                                               \
-} while (0)
-
-/* This function selects items from one hash into another hash.
- * The end result is that the selected items have dual presence
- * in both hashes. There is no copy of the items made; rather
- * they are added into the new hash through a secondary hash
- * hash handle that must be present in the structure. */
-#define HASH_SELECT(hh_dst, dst, hh_src, src, cond)                              \
-do {                                                                             \
-  unsigned _src_bkt, _dst_bkt;                                                   \
-  void *_last_elt=NULL, *_elt;                                                   \
-  UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL;                         \
-  ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst));                 \
-  if (src) {                                                                     \
-    for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) {     \
-      for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head;                \
-          _src_hh;                                                               \
-          _src_hh = _src_hh->hh_next) {                                          \
-          _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh);                       \
-          if (cond(_elt)) {                                                      \
-            _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho);               \
-            _dst_hh->key = _src_hh->key;                                         \
-            _dst_hh->keylen = _src_hh->keylen;                                   \
-            _dst_hh->hashv = _src_hh->hashv;                                     \
-            _dst_hh->prev = _last_elt;                                           \
-            _dst_hh->next = NULL;                                                \
-            if (_last_elt_hh) { _last_elt_hh->next = _elt; }                     \
-            if (!dst) {                                                          \
-              DECLTYPE_ASSIGN(dst,_elt);                                         \
-              HASH_MAKE_TABLE(hh_dst,dst);                                       \
-            } else {                                                             \
-              _dst_hh->tbl = (dst)->hh_dst.tbl;                                  \
-            }                                                                    \
-            HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt);    \
-            HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh);            \
-            (dst)->hh_dst.tbl->num_items++;                                      \
-            _last_elt = _elt;                                                    \
-            _last_elt_hh = _dst_hh;                                              \
-          }                                                                      \
-      }                                                                          \
-    }                                                                            \
-  }                                                                              \
-  HASH_FSCK(hh_dst,dst);                                                         \
-} while (0)
-
-#define HASH_CLEAR(hh,head)                                                      \
-do {                                                                             \
-  if (head) {                                                                    \
-    uthash_free((head)->hh.tbl->buckets,                                         \
-                (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket));      \
-    uthash_free((head)->hh.tbl, sizeof(UT_hash_table));                          \
-    (head)=NULL;                                                                 \
-  }                                                                              \
-} while(0)
-
-#ifdef NO_DECLTYPE
-#define HASH_ITER(hh,head,el,tmp)                                                \
-for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL);       \
-  el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL))
-#else
-#define HASH_ITER(hh,head,el,tmp)                                                \
-for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL);                 \
-  el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL))
-#endif
-
-/* obtain a count of items in the hash */
-#define HASH_COUNT(head) HASH_CNT(hh,head)
-#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)
-
-typedef struct UT_hash_bucket {
-   struct UT_hash_handle *hh_head;
-   unsigned count;
-
-   /* expand_mult is normally set to 0. In this situation, the max chain length
-    * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
-    * the bucket's chain exceeds this length, bucket expansion is triggered).
-    * However, setting expand_mult to a non-zero value delays bucket expansion
-    * (that would be triggered by additions to this particular bucket)
-    * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
-    * (The multiplier is simply expand_mult+1). The whole idea of this
-    * multiplier is to reduce bucket expansions, since they are expensive, in
-    * situations where we know that a particular bucket tends to be overused.
-    * It is better to let its chain length grow to a longer yet-still-bounded
-    * value, than to do an O(n) bucket expansion too often.
-    */
-   unsigned expand_mult;
-
-} UT_hash_bucket;
-
-/* random signature used only to find hash tables in external analysis */
-#define HASH_SIGNATURE 0xa0111fe1
-#define HASH_BLOOM_SIGNATURE 0xb12220f2
-
-typedef struct UT_hash_table {
-   UT_hash_bucket *buckets;
-   unsigned num_buckets, log2_num_buckets;
-   unsigned num_items;
-   struct UT_hash_handle *tail; /* tail hh in app order, for fast append    */
-   ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
-
-   /* in an ideal situation (all buckets used equally), no bucket would have
-    * more than ceil(#items/#buckets) items. that's the ideal chain length. */
-   unsigned ideal_chain_maxlen;
-
-   /* nonideal_items is the number of items in the hash whose chain position
-    * exceeds the ideal chain maxlen. these items pay the penalty for an uneven
-    * hash distribution; reaching them in a chain traversal takes >ideal steps */
-   unsigned nonideal_items;
-
-   /* ineffective expands occur when a bucket doubling was performed, but
-    * afterward, more than half the items in the hash had nonideal chain
-    * positions. If this happens on two consecutive expansions we inhibit any
-    * further expansion, as it's not helping; this happens when the hash
-    * function isn't a good fit for the key domain. When expansion is inhibited
-    * the hash will still work, albeit no longer in constant time. */
-   unsigned ineff_expands, noexpand;
-
-   uint32_t signature; /* used only to find hash tables in external analysis */
-#ifdef HASH_BLOOM
-   uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
-   uint8_t *bloom_bv;
-   char bloom_nbits;
-#endif
-
-} UT_hash_table;
-
-typedef struct UT_hash_handle {
-   struct UT_hash_table *tbl;
-   void *prev;                       /* prev element in app order      */
-   void *next;                       /* next element in app order      */
-   struct UT_hash_handle *hh_prev;   /* previous hh in bucket order    */
-   struct UT_hash_handle *hh_next;   /* next hh in bucket order        */
-   void *key;                        /* ptr to enclosing struct's key  */
-   unsigned keylen;                  /* enclosing struct's key len     */
-   unsigned hashv;                   /* result of hash-fcn(key)        */
-} UT_hash_handle;
-
-#endif /* _DTLS_UTHASH_H */
diff --git a/extlibs/tinydtls/utlist.h b/extlibs/tinydtls/utlist.h
deleted file mode 100644 (file)
index dd72b7d..0000000
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
-Copyright (c) 2007-2010, Troy D. Hanson   http://uthash.sourceforge.net
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef UTLIST_H
-#define UTLIST_H
-
-#define UTLIST_VERSION 1.9.1
-
-/*
- * This file contains macros to manipulate singly and doubly-linked lists.
- *
- * 1. LL_ macros:  singly-linked lists.
- * 2. DL_ macros:  doubly-linked lists.
- * 3. CDL_ macros: circular doubly-linked lists.
- *
- * To use singly-linked lists, your structure must have a "next" pointer.
- * To use doubly-linked lists, your structure must "prev" and "next" pointers.
- * Either way, the pointer to the head of the list must be initialized to NULL.
- *
- * ----------------.EXAMPLE -------------------------
- * struct item {
- *      int id;
- *      struct item *prev, *next;
- * }
- *
- * struct item *list = NULL:
- *
- * int main() {
- *      struct item *item;
- *      ... allocate and populate item ...
- *      DL_APPEND(list, item);
- * }
- * --------------------------------------------------
- *
- * For doubly-linked lists, the append and delete macros are O(1)
- * For singly-linked lists, append and delete are O(n) but prepend is O(1)
- * The sort macro is O(n log(n)) for all types of single/double/circular lists.
- */
-
-/* These macros use decltype or the earlier __typeof GNU extension.
-   As decltype is only available in newer compilers (VS2010 or gcc 4.3+
-   when compiling c++ code), this code uses whatever method is needed
-   or, for VS2008 where neither is available, uses casting workarounds. */
-#ifdef _MSC_VER            /* MS compiler */
-#if _MSC_VER >= 1600 && __cplusplus  /* VS2010 and newer in C++ mode */
-#define LDECLTYPE(x) decltype(x)
-#else                     /* VS2008 or older (or VS2010 in C mode) */
-#define NO_DECLTYPE
-#define LDECLTYPE(x) char*
-#endif
-#else                      /* GNU, Sun and other compilers */
-#define LDECLTYPE(x) __typeof(x)
-#endif
-
-/* for VS2008 we use some workarounds to get around the lack of decltype,
- * namely, we always reassign our tmp variable to the list head if we need
- * to dereference its prev/next pointers, and save/restore the real head.*/
-#ifdef NO_DECLTYPE
-#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); }
-#define _NEXT(elt,list) ((char*)((list)->next))
-#define _NEXTASGN(elt,list,to) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); }
-#define _PREV(elt,list) ((char*)((list)->prev))
-#define _PREVASGN(elt,list,to) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); }
-#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; }
-#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); }
-#else
-#define _SV(elt,list)
-#define _NEXT(elt,list) ((elt)->next)
-#define _NEXTASGN(elt,list,to) ((elt)->next)=(to)
-#define _PREV(elt,list) ((elt)->prev)
-#define _PREVASGN(elt,list,to) ((elt)->prev)=(to)
-#define _RS(list)
-#define _CASTASGN(a,b) (a)=(b)
-#endif
-
-/******************************************************************************
- * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort    *
- * Unwieldy variable names used here to avoid shadowing passed-in variables.  *
- *****************************************************************************/
-#define LL_SORT(list, cmp)                                                                     \
-do {                                                                                           \
-  LDECLTYPE(list) _ls_p;                                                                       \
-  LDECLTYPE(list) _ls_q;                                                                       \
-  LDECLTYPE(list) _ls_e;                                                                       \
-  LDECLTYPE(list) _ls_tail;                                                                    \
-  LDECLTYPE(list) _ls_oldhead;                                                                 \
-  LDECLTYPE(list) _tmp;                                                                        \
-  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
-  if (list) {                                                                                  \
-    _ls_insize = 1;                                                                            \
-    _ls_looping = 1;                                                                           \
-    while (_ls_looping) {                                                                      \
-      _CASTASGN(_ls_p,list);                                                                   \
-      _CASTASGN(_ls_oldhead,list);                                                             \
-      list = NULL;                                                                             \
-      _ls_tail = NULL;                                                                         \
-      _ls_nmerges = 0;                                                                         \
-      while (_ls_p) {                                                                          \
-        _ls_nmerges++;                                                                         \
-        _ls_q = _ls_p;                                                                         \
-        _ls_psize = 0;                                                                         \
-        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
-          _ls_psize++;                                                                         \
-          _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list);                               \
-          if (!_ls_q) break;                                                                   \
-        }                                                                                      \
-        _ls_qsize = _ls_insize;                                                                \
-        while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) {                                    \
-          if (_ls_psize == 0) {                                                                \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-          } else if (_ls_qsize == 0 || !_ls_q) {                                               \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-          } else {                                                                             \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-          }                                                                                    \
-          if (_ls_tail) {                                                                      \
-            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list);                     \
-          } else {                                                                             \
-            _CASTASGN(list,_ls_e);                                                             \
-          }                                                                                    \
-          _ls_tail = _ls_e;                                                                    \
-        }                                                                                      \
-        _ls_p = _ls_q;                                                                         \
-      }                                                                                        \
-      _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL); _RS(list);                            \
-      if (_ls_nmerges <= 1) {                                                                  \
-        _ls_looping=0;                                                                         \
-      }                                                                                        \
-      _ls_insize *= 2;                                                                         \
-    }                                                                                          \
-  } else _tmp=NULL; /* quiet gcc unused variable warning */                                    \
-} while (0)
-
-#define DL_SORT(list, cmp)                                                                     \
-do {                                                                                           \
-  LDECLTYPE(list) _ls_p;                                                                       \
-  LDECLTYPE(list) _ls_q;                                                                       \
-  LDECLTYPE(list) _ls_e;                                                                       \
-  LDECLTYPE(list) _ls_tail;                                                                    \
-  LDECLTYPE(list) _ls_oldhead;                                                                 \
-  LDECLTYPE(list) _tmp;                                                                        \
-  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
-  if (list) {                                                                                  \
-    _ls_insize = 1;                                                                            \
-    _ls_looping = 1;                                                                           \
-    while (_ls_looping) {                                                                      \
-      _CASTASGN(_ls_p,list);                                                                   \
-      _CASTASGN(_ls_oldhead,list);                                                             \
-      list = NULL;                                                                             \
-      _ls_tail = NULL;                                                                         \
-      _ls_nmerges = 0;                                                                         \
-      while (_ls_p) {                                                                          \
-        _ls_nmerges++;                                                                         \
-        _ls_q = _ls_p;                                                                         \
-        _ls_psize = 0;                                                                         \
-        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
-          _ls_psize++;                                                                         \
-          _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list);                               \
-          if (!_ls_q) break;                                                                   \
-        }                                                                                      \
-        _ls_qsize = _ls_insize;                                                                \
-        while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) {                                    \
-          if (_ls_psize == 0) {                                                                \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-          } else if (_ls_qsize == 0 || !_ls_q) {                                               \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-          } else {                                                                             \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-          }                                                                                    \
-          if (_ls_tail) {                                                                      \
-            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list);                     \
-          } else {                                                                             \
-            _CASTASGN(list,_ls_e);                                                             \
-          }                                                                                    \
-          _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail); _RS(list);                          \
-          _ls_tail = _ls_e;                                                                    \
-        }                                                                                      \
-        _ls_p = _ls_q;                                                                         \
-      }                                                                                        \
-      _CASTASGN(list->prev, _ls_tail);                                                         \
-      _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL); _RS(list);                            \
-      if (_ls_nmerges <= 1) {                                                                  \
-        _ls_looping=0;                                                                         \
-      }                                                                                        \
-      _ls_insize *= 2;                                                                         \
-    }                                                                                          \
-  } else _tmp=NULL; /* quiet gcc unused variable warning */                                    \
-} while (0)
-
-#define CDL_SORT(list, cmp)                                                                    \
-do {                                                                                           \
-  LDECLTYPE(list) _ls_p;                                                                       \
-  LDECLTYPE(list) _ls_q;                                                                       \
-  LDECLTYPE(list) _ls_e;                                                                       \
-  LDECLTYPE(list) _ls_tail;                                                                    \
-  LDECLTYPE(list) _ls_oldhead;                                                                 \
-  LDECLTYPE(list) _tmp;                                                                        \
-  LDECLTYPE(list) _tmp2;                                                                       \
-  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
-  if (list) {                                                                                  \
-    _ls_insize = 1;                                                                            \
-    _ls_looping = 1;                                                                           \
-    while (_ls_looping) {                                                                      \
-      _CASTASGN(_ls_p,list);                                                                   \
-      _CASTASGN(_ls_oldhead,list);                                                             \
-      list = NULL;                                                                             \
-      _ls_tail = NULL;                                                                         \
-      _ls_nmerges = 0;                                                                         \
-      while (_ls_p) {                                                                          \
-        _ls_nmerges++;                                                                         \
-        _ls_q = _ls_p;                                                                         \
-        _ls_psize = 0;                                                                         \
-        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
-          _ls_psize++;                                                                         \
-          _SV(_ls_q,list);                                                                     \
-          if (_NEXT(_ls_q,list) == _ls_oldhead) {                                              \
-            _ls_q = NULL;                                                                      \
-          } else {                                                                             \
-            _ls_q = _NEXT(_ls_q,list);                                                         \
-          }                                                                                    \
-          _RS(list);                                                                           \
-          if (!_ls_q) break;                                                                   \
-        }                                                                                      \
-        _ls_qsize = _ls_insize;                                                                \
-        while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) {                                    \
-          if (_ls_psize == 0) {                                                                \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-            if (_ls_q == _ls_oldhead) { _ls_q = NULL; }                                        \
-          } else if (_ls_qsize == 0 || !_ls_q) {                                               \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-            if (_ls_p == _ls_oldhead) { _ls_p = NULL; }                                        \
-          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
-            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
-            if (_ls_p == _ls_oldhead) { _ls_p = NULL; }                                        \
-          } else {                                                                             \
-            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
-            if (_ls_q == _ls_oldhead) { _ls_q = NULL; }                                        \
-          }                                                                                    \
-          if (_ls_tail) {                                                                      \
-            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list);                     \
-          } else {                                                                             \
-            _CASTASGN(list,_ls_e);                                                             \
-          }                                                                                    \
-          _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail); _RS(list);                          \
-          _ls_tail = _ls_e;                                                                    \
-        }                                                                                      \
-        _ls_p = _ls_q;                                                                         \
-      }                                                                                        \
-      _CASTASGN(list->prev,_ls_tail);                                                          \
-      _CASTASGN(_tmp2,list);                                                                   \
-      _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp2); _RS(list);                           \
-      if (_ls_nmerges <= 1) {                                                                  \
-        _ls_looping=0;                                                                         \
-      }                                                                                        \
-      _ls_insize *= 2;                                                                         \
-    }                                                                                          \
-  } else _tmp=NULL; /* quiet gcc unused variable warning */                                    \
-} while (0)
-
-/******************************************************************************
- * singly linked list macros (non-circular)                                   *
- *****************************************************************************/
-#define LL_PREPEND(head,add)                                                                   \
-do {                                                                                           \
-  (add)->next = head;                                                                          \
-  head = add;                                                                                  \
-} while (0)
-
-#define LL_APPEND(head,add)                                                                    \
-do {                                                                                           \
-  LDECLTYPE(head) _tmp;                                                                        \
-  (add)->next=NULL;                                                                            \
-  if (head) {                                                                                  \
-    _tmp = head;                                                                               \
-    while (_tmp->next) { _tmp = _tmp->next; }                                                  \
-    _tmp->next=(add);                                                                          \
-  } else {                                                                                     \
-    (head)=(add);                                                                              \
-  }                                                                                            \
-} while (0)
-
-#define LL_DELETE(head,del)                                                                    \
-do {                                                                                           \
-  LDECLTYPE(head) _tmp;                                                                        \
-  if ((head) == (del)) {                                                                       \
-    (head)=(head)->next;                                                                       \
-  } else {                                                                                     \
-    _tmp = head;                                                                               \
-    while (_tmp->next && (_tmp->next != (del))) {                                              \
-      _tmp = _tmp->next;                                                                       \
-    }                                                                                          \
-    if (_tmp->next) {                                                                          \
-      _tmp->next = ((del)->next);                                                              \
-    }                                                                                          \
-  }                                                                                            \
-} while (0)
-
-/* Here are VS2008 replacements for LL_APPEND and LL_DELETE */
-#define LL_APPEND_VS2008(head,add)                                                             \
-do {                                                                                           \
-  if (head) {                                                                                  \
-    (add)->next = head;     /* use add->next as a temp variable */                             \
-    while ((add)->next->next) { (add)->next = (add)->next->next; }                             \
-    (add)->next->next=(add);                                                                   \
-  } else {                                                                                     \
-    (head)=(add);                                                                              \
-  }                                                                                            \
-  (add)->next=NULL;                                                                            \
-} while (0)
-
-#define LL_DELETE_VS2008(head,del)                                                             \
-do {                                                                                           \
-  if ((head) == (del)) {                                                                       \
-    (head)=(head)->next;                                                                       \
-  } else {                                                                                     \
-    char *_tmp = (char*)(head);                                                                \
-    while ((head)->next && ((head)->next != (del))) {                                          \
-      (head) = (head)->next;                                                                   \
-    }                                                                                          \
-    if ((head)->next) {                                                                        \
-      (head)->next = ((del)->next);                                                            \
-    }                                                                                          \
-    {                                                                                          \
-      char **_head_alias = (char**)&(head);                                                    \
-      *_head_alias = _tmp;                                                                     \
-    }                                                                                          \
-  }                                                                                            \
-} while (0)
-#ifdef NO_DECLTYPE
-#undef LL_APPEND
-#define LL_APPEND LL_APPEND_VS2008
-#undef LL_DELETE
-#define LL_DELETE LL_DELETE_VS2008
-#endif
-/* end VS2008 replacements */
-
-#define LL_FOREACH(head,el)                                                                    \
-    for(el=head;el;el=el->next)
-
-#define LL_FOREACH_SAFE(head,el,tmp)                                                           \
-  for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
-
-#define LL_SEARCH_SCALAR(head,out,field,val)                                                   \
-do {                                                                                           \
-    LL_FOREACH(head,out) {                                                                     \
-      if ((out)->field == (val)) break;                                                        \
-    }                                                                                          \
-} while(0)
-
-#define LL_SEARCH(head,out,elt,cmp)                                                            \
-do {                                                                                           \
-    LL_FOREACH(head,out) {                                                                     \
-      if ((cmp(out,elt))==0) break;                                                            \
-    }                                                                                          \
-} while(0)
-
-/******************************************************************************
- * doubly linked list macros (non-circular)                                   *
- *****************************************************************************/
-#define DL_PREPEND(head,add)                                                                   \
-do {                                                                                           \
- (add)->next = head;                                                                           \
- if (head) {                                                                                   \
-   (add)->prev = (head)->prev;                                                                 \
-   (head)->prev = (add);                                                                       \
- } else {                                                                                      \
-   (add)->prev = (add);                                                                        \
- }                                                                                             \
- (head) = (add);                                                                               \
-} while (0)
-
-#define DL_APPEND(head,add)                                                                    \
-do {                                                                                           \
-  if (head) {                                                                                  \
-      (add)->prev = (head)->prev;                                                              \
-      (head)->prev->next = (add);                                                              \
-      (head)->prev = (add);                                                                    \
-      (add)->next = NULL;                                                                      \
-  } else {                                                                                     \
-      (head)=(add);                                                                            \
-      (head)->prev = (head);                                                                   \
-      (head)->next = NULL;                                                                     \
-  }                                                                                            \
-} while (0);
-
-#define DL_DELETE(head,del)                                                                    \
-do {                                                                                           \
-  if ((del)->prev == (del)) {                                                                  \
-      (head)=NULL;                                                                             \
-  } else if ((del)==(head)) {                                                                  \
-      (del)->next->prev = (del)->prev;                                                         \
-      (head) = (del)->next;                                                                    \
-  } else {                                                                                     \
-      (del)->prev->next = (del)->next;                                                         \
-      if ((del)->next) {                                                                       \
-          (del)->next->prev = (del)->prev;                                                     \
-      } else {                                                                                 \
-          (head)->prev = (del)->prev;                                                          \
-      }                                                                                        \
-  }                                                                                            \
-} while (0);
-
-
-#define DL_FOREACH(head,el)                                                                    \
-    for(el=head;el;el=el->next)
-
-/* this version is safe for deleting the elements during iteration */
-#define DL_FOREACH_SAFE(head,el,tmp)                                                           \
-  for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
-
-/* these are identical to their singly-linked list counterparts */
-#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR
-#define DL_SEARCH LL_SEARCH
-
-/******************************************************************************
- * circular doubly linked list macros                                         *
- *****************************************************************************/
-#define CDL_PREPEND(head,add)                                                                  \
-do {                                                                                           \
- if (head) {                                                                                   \
-   (add)->prev = (head)->prev;                                                                 \
-   (add)->next = (head);                                                                       \
-   (head)->prev = (add);                                                                       \
-   (add)->prev->next = (add);                                                                  \
- } else {                                                                                      \
-   (add)->prev = (add);                                                                        \
-   (add)->next = (add);                                                                        \
- }                                                                                             \
-(head)=(add);                                                                                  \
-} while (0)
-
-#define CDL_DELETE(head,del)                                                                   \
-do {                                                                                           \
-  if ( ((head)==(del)) && ((head)->next == (head))) {                                          \
-      (head) = 0L;                                                                             \
-  } else {                                                                                     \
-     (del)->next->prev = (del)->prev;                                                          \
-     (del)->prev->next = (del)->next;                                                          \
-     if ((del) == (head)) (head)=(del)->next;                                                  \
-  }                                                                                            \
-} while (0);
-
-#define CDL_FOREACH(head,el)                                                                   \
-    for(el=head;el;el=(el->next==head ? 0L : el->next))
-
-#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2)                                                    \
-  for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL);                                        \
-      (el) && ((tmp2)=(el)->next, 1);                                                          \
-      ((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
-
-#define CDL_SEARCH_SCALAR(head,out,field,val)                                                  \
-do {                                                                                           \
-    CDL_FOREACH(head,out) {                                                                    \
-      if ((out)->field == (val)) break;                                                        \
-    }                                                                                          \
-} while(0)
-
-#define CDL_SEARCH(head,out,elt,cmp)                                                           \
-do {                                                                                           \
-    CDL_FOREACH(head,out) {                                                                    \
-      if ((cmp(out,elt))==0) break;                                                            \
-    }                                                                                          \
-} while(0)
-
-#endif /* _DTLS_UTLIST_H */
-
index 78c5891..9532294 100755 (executable)
@@ -32,7 +32,6 @@ rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
 cp -R ./extlibs/mbedtls $sourcedir/tmp/extlibs
 cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
-cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
index 52641ad..6228e01 100644 (file)
@@ -67,8 +67,8 @@ jni_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 jni_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
 jni_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction'])
 if env.get('SECURED') == '1':
-#    jni_env.AppendUnique(CPPDEFINES= ['__WITH_TLS__'])
-    jni_env.PrependUnique(LIBS = ['tinydtls', 'ocprovision', 'ocpmapi'])
+    jni_env.AppendUnique(CPPDEFINES= ['__WITH_TLS__'])
+    jni_env.PrependUnique(LIBS = ['mbedtls', 'ocprovision', 'ocpmapi'])
     jni_env.AppendUnique(CPPPATH = ['#resource/csdk/security/include/internal',
                                     '#extlibs/cjson'])
     if env.get('WITH_CLOUD') == '1':
diff --git a/resource/c_common/utlist.h b/resource/c_common/utlist.h
new file mode 100644 (file)
index 0000000..84216ae
--- /dev/null
@@ -0,0 +1,892 @@
+/*
+Copyright (c) 2007-2016, Troy D. Hanson   http://troydhanson.github.com/uthash/
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef UTLIST_H
+#define UTLIST_H
+
+#define UTLIST_VERSION 2.0.1
+
+#include <assert.h>
+
+/*
+ * This file contains macros to manipulate singly and doubly-linked lists.
+ *
+ * 1. LL_ macros:  singly-linked lists.
+ * 2. DL_ macros:  doubly-linked lists.
+ * 3. CDL_ macros: circular doubly-linked lists.
+ *
+ * To use singly-linked lists, your structure must have a "next" pointer.
+ * To use doubly-linked lists, your structure must "prev" and "next" pointers.
+ * Either way, the pointer to the head of the list must be initialized to NULL.
+ *
+ * ----------------.EXAMPLE -------------------------
+ * struct item {
+ *      int id;
+ *      struct item *prev, *next;
+ * }
+ *
+ * struct item *list = NULL:
+ *
+ * int main() {
+ *      struct item *item;
+ *      ... allocate and populate item ...
+ *      DL_APPEND(list, item);
+ * }
+ * --------------------------------------------------
+ *
+ * For doubly-linked lists, the append and delete macros are O(1)
+ * For singly-linked lists, append and delete are O(n) but prepend is O(1)
+ * The sort macro is O(n log(n)) for all types of single/double/circular lists.
+ */
+
+/* These macros use decltype or the earlier __typeof GNU extension.
+   As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+   when compiling c++ code), this code uses whatever method is needed
+   or, for VS2008 where neither is available, uses casting workarounds. */
+#ifdef _MSC_VER            /* MS compiler */
+#if _MSC_VER >= 1600 && defined(__cplusplus)  /* VS2010 or newer in C++ mode */
+#define LDECLTYPE(x) decltype(x)
+#else                     /* VS2008 or older (or VS2010 in C mode) */
+#define NO_DECLTYPE
+#endif
+#elif defined(__ICCARM__)
+#define NO_DECLTYPE
+#else                      /* GNU, Sun and other compilers */
+#define LDECLTYPE(x) __typeof(x)
+#endif
+
+/* for VS2008 we use some workarounds to get around the lack of decltype,
+ * namely, we always reassign our tmp variable to the list head if we need
+ * to dereference its prev/next pointers, and save/restore the real head.*/
+#ifdef NO_DECLTYPE
+#define IF_NO_DECLTYPE(x) x
+#define LDECLTYPE(x) char*
+#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); }
+#define _NEXT(elt,list,next) ((char*)((list)->next))
+#define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); }
+/* #define _PREV(elt,list,prev) ((char*)((list)->prev)) */
+#define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); }
+#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; }
+#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); }
+#else
+#define IF_NO_DECLTYPE(x)
+#define _SV(elt,list)
+#define _NEXT(elt,list,next) ((elt)->next)
+#define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to)
+/* #define _PREV(elt,list,prev) ((elt)->prev) */
+#define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to)
+#define _RS(list)
+#define _CASTASGN(a,b) (a)=(b)
+#endif
+
+/******************************************************************************
+ * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort    *
+ * Unwieldy variable names used here to avoid shadowing passed-in variables.  *
+ *****************************************************************************/
+#define LL_SORT(list, cmp)                                                                     \
+    LL_SORT2(list, cmp, next)
+
+#define LL_SORT2(list, cmp, next)                                                              \
+do {                                                                                           \
+  LDECLTYPE(list) _ls_p;                                                                       \
+  LDECLTYPE(list) _ls_q;                                                                       \
+  LDECLTYPE(list) _ls_e;                                                                       \
+  LDECLTYPE(list) _ls_tail;                                                                    \
+  IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;)                                                        \
+  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
+  if (list) {                                                                                  \
+    _ls_insize = 1;                                                                            \
+    _ls_looping = 1;                                                                           \
+    while (_ls_looping) {                                                                      \
+      _CASTASGN(_ls_p,list);                                                                   \
+      (list) = NULL;                                                                           \
+      _ls_tail = NULL;                                                                         \
+      _ls_nmerges = 0;                                                                         \
+      while (_ls_p) {                                                                          \
+        _ls_nmerges++;                                                                         \
+        _ls_q = _ls_p;                                                                         \
+        _ls_psize = 0;                                                                         \
+        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
+          _ls_psize++;                                                                         \
+          _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list);                          \
+          if (!_ls_q) break;                                                                   \
+        }                                                                                      \
+        _ls_qsize = _ls_insize;                                                                \
+        while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) {                                    \
+          if (_ls_psize == 0) {                                                                \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+          } else if (_ls_qsize == 0 || !_ls_q) {                                               \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+          } else {                                                                             \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+          }                                                                                    \
+          if (_ls_tail) {                                                                      \
+            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list);                \
+          } else {                                                                             \
+            _CASTASGN(list,_ls_e);                                                             \
+          }                                                                                    \
+          _ls_tail = _ls_e;                                                                    \
+        }                                                                                      \
+        _ls_p = _ls_q;                                                                         \
+      }                                                                                        \
+      if (_ls_tail) {                                                                          \
+        _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list);                     \
+      }                                                                                        \
+      if (_ls_nmerges <= 1) {                                                                  \
+        _ls_looping=0;                                                                         \
+      }                                                                                        \
+      _ls_insize *= 2;                                                                         \
+    }                                                                                          \
+  }                                                                                            \
+} while (0)
+
+
+#define DL_SORT(list, cmp)                                                                     \
+    DL_SORT2(list, cmp, prev, next)
+
+#define DL_SORT2(list, cmp, prev, next)                                                        \
+do {                                                                                           \
+  LDECLTYPE(list) _ls_p;                                                                       \
+  LDECLTYPE(list) _ls_q;                                                                       \
+  LDECLTYPE(list) _ls_e;                                                                       \
+  LDECLTYPE(list) _ls_tail;                                                                    \
+  IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;)                                                        \
+  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
+  if (list) {                                                                                  \
+    _ls_insize = 1;                                                                            \
+    _ls_looping = 1;                                                                           \
+    while (_ls_looping) {                                                                      \
+      _CASTASGN(_ls_p,list);                                                                   \
+      (list) = NULL;                                                                           \
+      _ls_tail = NULL;                                                                         \
+      _ls_nmerges = 0;                                                                         \
+      while (_ls_p) {                                                                          \
+        _ls_nmerges++;                                                                         \
+        _ls_q = _ls_p;                                                                         \
+        _ls_psize = 0;                                                                         \
+        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
+          _ls_psize++;                                                                         \
+          _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list);                          \
+          if (!_ls_q) break;                                                                   \
+        }                                                                                      \
+        _ls_qsize = _ls_insize;                                                                \
+        while ((_ls_psize > 0) || ((_ls_qsize > 0) && _ls_q)) {                                \
+          if (_ls_psize == 0) {                                                                \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+          } else if ((_ls_qsize == 0) || (!_ls_q)) {                                           \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+          } else {                                                                             \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+          }                                                                                    \
+          if (_ls_tail) {                                                                      \
+            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list);                \
+          } else {                                                                             \
+            _CASTASGN(list,_ls_e);                                                             \
+          }                                                                                    \
+          _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list);                     \
+          _ls_tail = _ls_e;                                                                    \
+        }                                                                                      \
+        _ls_p = _ls_q;                                                                         \
+      }                                                                                        \
+      _CASTASGN((list)->prev, _ls_tail);                                                       \
+      _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list);                       \
+      if (_ls_nmerges <= 1) {                                                                  \
+        _ls_looping=0;                                                                         \
+      }                                                                                        \
+      _ls_insize *= 2;                                                                         \
+    }                                                                                          \
+  }                                                                                            \
+} while (0)
+
+#define CDL_SORT(list, cmp)                                                                    \
+    CDL_SORT2(list, cmp, prev, next)
+
+#define CDL_SORT2(list, cmp, prev, next)                                                       \
+do {                                                                                           \
+  LDECLTYPE(list) _ls_p;                                                                       \
+  LDECLTYPE(list) _ls_q;                                                                       \
+  LDECLTYPE(list) _ls_e;                                                                       \
+  LDECLTYPE(list) _ls_tail;                                                                    \
+  LDECLTYPE(list) _ls_oldhead;                                                                 \
+  LDECLTYPE(list) _tmp;                                                                        \
+  int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping;                       \
+  if (list) {                                                                                  \
+    _ls_insize = 1;                                                                            \
+    _ls_looping = 1;                                                                           \
+    while (_ls_looping) {                                                                      \
+      _CASTASGN(_ls_p,list);                                                                   \
+      _CASTASGN(_ls_oldhead,list);                                                             \
+      (list) = NULL;                                                                           \
+      _ls_tail = NULL;                                                                         \
+      _ls_nmerges = 0;                                                                         \
+      while (_ls_p) {                                                                          \
+        _ls_nmerges++;                                                                         \
+        _ls_q = _ls_p;                                                                         \
+        _ls_psize = 0;                                                                         \
+        for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) {                                         \
+          _ls_psize++;                                                                         \
+          _SV(_ls_q,list);                                                                     \
+          if (_NEXT(_ls_q,list,next) == _ls_oldhead) {                                         \
+            _ls_q = NULL;                                                                      \
+          } else {                                                                             \
+            _ls_q = _NEXT(_ls_q,list,next);                                                    \
+          }                                                                                    \
+          _RS(list);                                                                           \
+          if (!_ls_q) break;                                                                   \
+        }                                                                                      \
+        _ls_qsize = _ls_insize;                                                                \
+        while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) {                                    \
+          if (_ls_psize == 0) {                                                                \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+            if (_ls_q == _ls_oldhead) { _ls_q = NULL; }                                        \
+          } else if (_ls_qsize == 0 || !_ls_q) {                                               \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+            if (_ls_p == _ls_oldhead) { _ls_p = NULL; }                                        \
+          } else if (cmp(_ls_p,_ls_q) <= 0) {                                                  \
+            _ls_e = _ls_p; _SV(_ls_p,list); _ls_p =                                            \
+              _NEXT(_ls_p,list,next); _RS(list); _ls_psize--;                                  \
+            if (_ls_p == _ls_oldhead) { _ls_p = NULL; }                                        \
+          } else {                                                                             \
+            _ls_e = _ls_q; _SV(_ls_q,list); _ls_q =                                            \
+              _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--;                                  \
+            if (_ls_q == _ls_oldhead) { _ls_q = NULL; }                                        \
+          }                                                                                    \
+          if (_ls_tail) {                                                                      \
+            _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list);                \
+          } else {                                                                             \
+            _CASTASGN(list,_ls_e);                                                             \
+          }                                                                                    \
+          _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list);                     \
+          _ls_tail = _ls_e;                                                                    \
+        }                                                                                      \
+        _ls_p = _ls_q;                                                                         \
+      }                                                                                        \
+      _CASTASGN((list)->prev,_ls_tail);                                                        \
+      _CASTASGN(_tmp,list);                                                                    \
+      _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp,next); _RS(list);                       \
+      if (_ls_nmerges <= 1) {                                                                  \
+        _ls_looping=0;                                                                         \
+      }                                                                                        \
+      _ls_insize *= 2;                                                                         \
+    }                                                                                          \
+  }                                                                                            \
+} while (0)
+
+/******************************************************************************
+ * singly linked list macros (non-circular)                                   *
+ *****************************************************************************/
+#define LL_PREPEND(head,add)                                                                   \
+    LL_PREPEND2(head,add,next)
+
+#define LL_PREPEND2(head,add,next)                                                             \
+do {                                                                                           \
+  (add)->next = (head);                                                                        \
+  (head) = (add);                                                                              \
+} while (0)
+
+#define LL_CONCAT(head1,head2)                                                                 \
+    LL_CONCAT2(head1,head2,next)
+
+#define LL_CONCAT2(head1,head2,next)                                                           \
+do {                                                                                           \
+  LDECLTYPE(head1) _tmp;                                                                       \
+  if (head1) {                                                                                 \
+    _tmp = (head1);                                                                            \
+    while (_tmp->next) { _tmp = _tmp->next; }                                                  \
+    _tmp->next=(head2);                                                                        \
+  } else {                                                                                     \
+    (head1)=(head2);                                                                           \
+  }                                                                                            \
+} while (0)
+
+#define LL_APPEND(head,add)                                                                    \
+    LL_APPEND2(head,add,next)
+
+#define LL_APPEND2(head,add,next)                                                              \
+do {                                                                                           \
+  LDECLTYPE(head) _tmp;                                                                        \
+  (add)->next=NULL;                                                                            \
+  if (head) {                                                                                  \
+    _tmp = (head);                                                                             \
+    while (_tmp->next) { _tmp = _tmp->next; }                                                  \
+    _tmp->next=(add);                                                                          \
+  } else {                                                                                     \
+    (head)=(add);                                                                              \
+  }                                                                                            \
+} while (0)
+
+#define LL_DELETE(head,del)                                                                    \
+    LL_DELETE2(head,del,next)
+
+#define LL_DELETE2(head,del,next)                                                              \
+do {                                                                                           \
+  LDECLTYPE(head) _tmp;                                                                        \
+  if ((head) == (del)) {                                                                       \
+    (head)=(head)->next;                                                                       \
+  } else {                                                                                     \
+    _tmp = (head);                                                                             \
+    while (_tmp->next && (_tmp->next != (del))) {                                              \
+      _tmp = _tmp->next;                                                                       \
+    }                                                                                          \
+    if (_tmp->next) {                                                                          \
+      _tmp->next = (del)->next;                                                                \
+    }                                                                                          \
+  }                                                                                            \
+} while (0)
+
+#define LL_COUNT(head,el,counter)                                                              \
+    LL_COUNT2(head,el,counter,next)                                                            \
+
+#define LL_COUNT2(head,el,counter,next)                                                        \
+do {                                                                                           \
+  (counter) = 0;                                                                               \
+  LL_FOREACH2(head,el,next) { ++(counter); }                                                   \
+} while (0)
+
+#define LL_FOREACH(head,el)                                                                    \
+    LL_FOREACH2(head,el,next)
+
+#define LL_FOREACH2(head,el,next)                                                              \
+    for ((el) = (head); el; (el) = (el)->next)
+
+#define LL_FOREACH_SAFE(head,el,tmp)                                                           \
+    LL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define LL_FOREACH_SAFE2(head,el,tmp,next)                                                     \
+  for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp))
+
+#define LL_SEARCH_SCALAR(head,out,field,val)                                                   \
+    LL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define LL_SEARCH_SCALAR2(head,out,field,val,next)                                             \
+do {                                                                                           \
+    LL_FOREACH2(head,out,next) {                                                               \
+      if ((out)->field == (val)) break;                                                        \
+    }                                                                                          \
+} while (0)
+
+#define LL_SEARCH(head,out,elt,cmp)                                                            \
+    LL_SEARCH2(head,out,elt,cmp,next)
+
+#define LL_SEARCH2(head,out,elt,cmp,next)                                                      \
+do {                                                                                           \
+    LL_FOREACH2(head,out,next) {                                                               \
+      if ((cmp(out,elt))==0) break;                                                            \
+    }                                                                                          \
+} while (0)
+
+#define LL_REPLACE_ELEM2(head, el, add, next)                                                  \
+do {                                                                                           \
+ LDECLTYPE(head) _tmp;                                                                         \
+ assert((head) != NULL);                                                                       \
+ assert((el) != NULL);                                                                         \
+ assert((add) != NULL);                                                                        \
+ (add)->next = (el)->next;                                                                     \
+ if ((head) == (el)) {                                                                         \
+  (head) = (add);                                                                              \
+ } else {                                                                                      \
+  _tmp = (head);                                                                               \
+  while (_tmp->next && (_tmp->next != (el))) {                                                 \
+   _tmp = _tmp->next;                                                                          \
+  }                                                                                            \
+  if (_tmp->next) {                                                                            \
+    _tmp->next = (add);                                                                        \
+  }                                                                                            \
+ }                                                                                             \
+} while (0)
+
+#define LL_REPLACE_ELEM(head, el, add)                                                         \
+    LL_REPLACE_ELEM2(head, el, add, next)
+
+#define LL_PREPEND_ELEM2(head, el, add, next)                                                  \
+do {                                                                                           \
+ if (el) {                                                                                     \
+  LDECLTYPE(head) _tmp;                                                                        \
+  assert((head) != NULL);                                                                      \
+  assert((add) != NULL);                                                                       \
+  (add)->next = (el);                                                                          \
+  if ((head) == (el)) {                                                                        \
+   (head) = (add);                                                                             \
+  } else {                                                                                     \
+   _tmp = (head);                                                                              \
+   while (_tmp->next && (_tmp->next != (el))) {                                                \
+    _tmp = _tmp->next;                                                                         \
+   }                                                                                           \
+   if (_tmp->next) {                                                                           \
+     _tmp->next = (add);                                                                       \
+   }                                                                                           \
+  }                                                                                            \
+ } else {                                                                                      \
+  LL_APPEND2(head, add, next);                                                                 \
+ }                                                                                             \
+} while (0)                                                                                    \
+
+#define LL_PREPEND_ELEM(head, el, add)                                                         \
+    LL_PREPEND_ELEM2(head, el, add, next)
+
+#define LL_APPEND_ELEM2(head, el, add, next)                                                   \
+do {                                                                                           \
+ if (el) {                                                                                     \
+  assert((head) != NULL);                                                                      \
+  assert((add) != NULL);                                                                       \
+  (add)->next = (el)->next;                                                                    \
+  (el)->next = (add);                                                                          \
+ } else {                                                                                      \
+  LL_PREPEND2(head, add, next);                                                                \
+ }                                                                                             \
+} while (0)                                                                                    \
+
+#define LL_APPEND_ELEM(head, el, add)                                                          \
+    LL_APPEND_ELEM2(head, el, add, next)
+
+#ifdef NO_DECLTYPE
+/* Here are VS2008 / NO_DECLTYPE replacements for a few functions */
+
+#undef LL_CONCAT2
+#define LL_CONCAT2(head1,head2,next)                                                           \
+do {                                                                                           \
+  char *_tmp;                                                                                  \
+  if (head1) {                                                                                 \
+    _tmp = (char*)(head1);                                                                     \
+    while ((head1)->next) { (head1) = (head1)->next; }                                         \
+    (head1)->next = (head2);                                                                   \
+    _RS(head1);                                                                                \
+  } else {                                                                                     \
+    (head1)=(head2);                                                                           \
+  }                                                                                            \
+} while (0)
+
+#undef LL_APPEND2
+#define LL_APPEND2(head,add,next)                                                              \
+do {                                                                                           \
+  if (head) {                                                                                  \
+    (add)->next = head;     /* use add->next as a temp variable */                             \
+    while ((add)->next->next) { (add)->next = (add)->next->next; }                             \
+    (add)->next->next=(add);                                                                   \
+  } else {                                                                                     \
+    (head)=(add);                                                                              \
+  }                                                                                            \
+  (add)->next=NULL;                                                                            \
+} while (0)
+
+#undef LL_DELETE2
+#define LL_DELETE2(head,del,next)                                                              \
+do {                                                                                           \
+  if ((head) == (del)) {                                                                       \
+    (head)=(head)->next;                                                                       \
+  } else {                                                                                     \
+    char *_tmp = (char*)(head);                                                                \
+    while ((head)->next && ((head)->next != (del))) {                                          \
+      (head) = (head)->next;                                                                   \
+    }                                                                                          \
+    if ((head)->next) {                                                                        \
+      (head)->next = ((del)->next);                                                            \
+    }                                                                                          \
+    _RS(head);                                                                                 \
+  }                                                                                            \
+} while (0)
+
+#undef LL_REPLACE_ELEM2
+#define LL_REPLACE_ELEM2(head, el, add, next)                                                  \
+do {                                                                                           \
+  assert((head) != NULL);                                                                      \
+  assert((el) != NULL);                                                                        \
+  assert((add) != NULL);                                                                       \
+  if ((head) == (el)) {                                                                        \
+    (head) = (add);                                                                            \
+  } else {                                                                                     \
+    (add)->next = head;                                                                        \
+    while ((add)->next->next && ((add)->next->next != (el))) {                                 \
+      (add)->next = (add)->next->next;                                                         \
+    }                                                                                          \
+    if ((add)->next->next) {                                                                   \
+      (add)->next->next = (add);                                                               \
+    }                                                                                          \
+  }                                                                                            \
+  (add)->next = (el)->next;                                                                    \
+} while (0)
+
+#undef LL_PREPEND_ELEM2
+#define LL_PREPEND_ELEM2(head, el, add, next)                                                  \
+do {                                                                                           \
+  if (el) {                                                                                    \
+    assert((head) != NULL);                                                                    \
+    assert((add) != NULL);                                                                     \
+    if ((head) == (el)) {                                                                      \
+      (head) = (add);                                                                          \
+    } else {                                                                                   \
+      (add)->next = (head);                                                                    \
+      while ((add)->next->next && ((add)->next->next != (el))) {                               \
+        (add)->next = (add)->next->next;                                                       \
+      }                                                                                        \
+      if ((add)->next->next) {                                                                 \
+        (add)->next->next = (add);                                                             \
+      }                                                                                        \
+    }                                                                                          \
+    (add)->next = (el);                                                                        \
+  } else {                                                                                     \
+    LL_APPEND2(head, add, next);                                                               \
+  }                                                                                            \
+} while (0)                                                                                    \
+
+#endif /* NO_DECLTYPE */
+
+/******************************************************************************
+ * doubly linked list macros (non-circular)                                   *
+ *****************************************************************************/
+#define DL_PREPEND(head,add)                                                                   \
+    DL_PREPEND2(head,add,prev,next)
+
+#define DL_PREPEND2(head,add,prev,next)                                                        \
+do {                                                                                           \
+ (add)->next = (head);                                                                         \
+ if (head) {                                                                                   \
+   (add)->prev = (head)->prev;                                                                 \
+   (head)->prev = (add);                                                                       \
+ } else {                                                                                      \
+   (add)->prev = (add);                                                                        \
+ }                                                                                             \
+ (head) = (add);                                                                               \
+} while (0)
+
+#define DL_APPEND(head,add)                                                                    \
+    DL_APPEND2(head,add,prev,next)
+
+#define DL_APPEND2(head,add,prev,next)                                                         \
+do {                                                                                           \
+  if (head) {                                                                                  \
+      (add)->prev = (head)->prev;                                                              \
+      (head)->prev->next = (add);                                                              \
+      (head)->prev = (add);                                                                    \
+      (add)->next = NULL;                                                                      \
+  } else {                                                                                     \
+      (head)=(add);                                                                            \
+      (head)->prev = (head);                                                                   \
+      (head)->next = NULL;                                                                     \
+  }                                                                                            \
+} while (0)
+
+#define DL_CONCAT(head1,head2)                                                                 \
+    DL_CONCAT2(head1,head2,prev,next)
+
+#define DL_CONCAT2(head1,head2,prev,next)                                                      \
+do {                                                                                           \
+  LDECLTYPE(head1) _tmp;                                                                       \
+  if (head2) {                                                                                 \
+    if (head1) {                                                                               \
+        _CASTASGN(_tmp, (head2)->prev);                                                        \
+        (head2)->prev = (head1)->prev;                                                         \
+        (head1)->prev->next = (head2);                                                         \
+        _CASTASGN((head1)->prev, _tmp);                                                        \
+    } else {                                                                                   \
+        (head1)=(head2);                                                                       \
+    }                                                                                          \
+  }                                                                                            \
+} while (0)
+
+#define DL_DELETE(head,del)                                                                    \
+    DL_DELETE2(head,del,prev,next)
+
+#define DL_DELETE2(head,del,prev,next)                                                         \
+do {                                                                                           \
+  assert((del)->prev != NULL);                                                                 \
+  if ((del)->prev == (del)) {                                                                  \
+      (head)=NULL;                                                                             \
+  } else if ((del)==(head)) {                                                                  \
+      (del)->next->prev = (del)->prev;                                                         \
+      (head) = (del)->next;                                                                    \
+  } else {                                                                                     \
+      (del)->prev->next = (del)->next;                                                         \
+      if ((del)->next) {                                                                       \
+          (del)->next->prev = (del)->prev;                                                     \
+      } else {                                                                                 \
+          (head)->prev = (del)->prev;                                                          \
+      }                                                                                        \
+  }                                                                                            \
+} while (0)
+
+#define DL_COUNT(head,el,counter)                                                              \
+    DL_COUNT2(head,el,counter,next)                                                            \
+
+#define DL_COUNT2(head,el,counter,next)                                                        \
+do {                                                                                           \
+  (counter) = 0;                                                                               \
+  DL_FOREACH2(head,el,next) { ++(counter); }                                                   \
+} while (0)
+
+#define DL_FOREACH(head,el)                                                                    \
+    DL_FOREACH2(head,el,next)
+
+#define DL_FOREACH2(head,el,next)                                                              \
+    for ((el) = (head); el; (el) = (el)->next)
+
+/* this version is safe for deleting the elements during iteration */
+#define DL_FOREACH_SAFE(head,el,tmp)                                                           \
+    DL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define DL_FOREACH_SAFE2(head,el,tmp,next)                                                     \
+  for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp))
+
+/* these are identical to their singly-linked list counterparts */
+#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR
+#define DL_SEARCH LL_SEARCH
+#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2
+#define DL_SEARCH2 LL_SEARCH2
+
+#define DL_REPLACE_ELEM2(head, el, add, prev, next)                                            \
+do {                                                                                           \
+ assert((head) != NULL);                                                                       \
+ assert((el) != NULL);                                                                         \
+ assert((add) != NULL);                                                                        \
+ if ((head) == (el)) {                                                                         \
+  (head) = (add);                                                                              \
+  (add)->next = (el)->next;                                                                    \
+  if ((el)->next == NULL) {                                                                    \
+   (add)->prev = (add);                                                                        \
+  } else {                                                                                     \
+   (add)->prev = (el)->prev;                                                                   \
+   (add)->next->prev = (add);                                                                  \
+  }                                                                                            \
+ } else {                                                                                      \
+  (add)->next = (el)->next;                                                                    \
+  (add)->prev = (el)->prev;                                                                    \
+  (add)->prev->next = (add);                                                                   \
+  if ((el)->next == NULL) {                                                                    \
+   (head)->prev = (add);                                                                       \
+  } else {                                                                                     \
+   (add)->next->prev = (add);                                                                  \
+  }                                                                                            \
+ }                                                                                             \
+} while (0)
+
+#define DL_REPLACE_ELEM(head, el, add)                                                         \
+    DL_REPLACE_ELEM2(head, el, add, prev, next)
+
+#define DL_PREPEND_ELEM2(head, el, add, prev, next)                                            \
+do {                                                                                           \
+ if (el) {                                                                                     \
+  assert((head) != NULL);                                                                      \
+  assert((add) != NULL);                                                                       \
+  (add)->next = (el);                                                                          \
+  (add)->prev = (el)->prev;                                                                    \
+  (el)->prev = (add);                                                                          \
+  if ((head) == (el)) {                                                                        \
+   (head) = (add);                                                                             \
+  } else {                                                                                     \
+   (add)->prev->next = (add);                                                                  \
+  }                                                                                            \
+ } else {                                                                                      \
+  DL_APPEND2(head, add, prev, next);                                                           \
+ }                                                                                             \
+} while (0)                                                                                    \
+
+#define DL_PREPEND_ELEM(head, el, add)                                                         \
+    DL_PREPEND_ELEM2(head, el, add, prev, next)
+
+#define DL_APPEND_ELEM2(head, el, add, prev, next)                                             \
+do {                                                                                           \
+ if (el) {                                                                                     \
+  assert((head) != NULL);                                                                      \
+  assert((add) != NULL);                                                                       \
+  (add)->next = (el)->next;                                                                    \
+  (add)->prev = (el);                                                                          \
+  (el)->next = (add);                                                                          \
+  if ((add)->next) {                                                                           \
+   (add)->next->prev = (add);                                                                  \
+  } else {                                                                                     \
+   (head)->prev = (add);                                                                       \
+  }                                                                                            \
+ } else {                                                                                      \
+  DL_PREPEND2(head, add, prev, next);                                                          \
+ }                                                                                             \
+} while (0)                                                                                    \
+
+#define DL_APPEND_ELEM(head, el, add)                                                          \
+   DL_APPEND_ELEM2(head, el, add, prev, next)
+
+/******************************************************************************
+ * circular doubly linked list macros                                         *
+ *****************************************************************************/
+#define CDL_APPEND(head,add)                                                                   \
+    CDL_APPEND2(head,add,prev,next)
+
+#define CDL_APPEND2(head,add,prev,next)                                                        \
+do {                                                                                           \
+ if (head) {                                                                                   \
+   (add)->prev = (head)->prev;                                                                 \
+   (add)->next = (head);                                                                       \
+   (head)->prev = (add);                                                                       \
+   (add)->prev->next = (add);                                                                  \
+ } else {                                                                                      \
+   (add)->prev = (add);                                                                        \
+   (add)->next = (add);                                                                        \
+   (head) = (add);                                                                             \
+ }                                                                                             \
+} while (0)
+
+#define CDL_PREPEND(head,add)                                                                  \
+    CDL_PREPEND2(head,add,prev,next)
+
+#define CDL_PREPEND2(head,add,prev,next)                                                       \
+do {                                                                                           \
+ if (head) {                                                                                   \
+   (add)->prev = (head)->prev;                                                                 \
+   (add)->next = (head);                                                                       \
+   (head)->prev = (add);                                                                       \
+   (add)->prev->next = (add);                                                                  \
+ } else {                                                                                      \
+   (add)->prev = (add);                                                                        \
+   (add)->next = (add);                                                                        \
+ }                                                                                             \
+ (head) = (add);                                                                               \
+} while (0)
+
+#define CDL_DELETE(head,del)                                                                   \
+    CDL_DELETE2(head,del,prev,next)
+
+#define CDL_DELETE2(head,del,prev,next)                                                        \
+do {                                                                                           \
+  if (((head)==(del)) && ((head)->next == (head))) {                                           \
+      (head) = NULL;                                                                           \
+  } else {                                                                                     \
+     (del)->next->prev = (del)->prev;                                                          \
+     (del)->prev->next = (del)->next;                                                          \
+     if ((del) == (head)) (head)=(del)->next;                                                  \
+  }                                                                                            \
+} while (0)
+
+#define CDL_COUNT(head,el,counter)                                                             \
+    CDL_COUNT2(head,el,counter,next)                                                           \
+
+#define CDL_COUNT2(head, el, counter,next)                                                     \
+do {                                                                                           \
+  (counter) = 0;                                                                               \
+  CDL_FOREACH2(head,el,next) { ++(counter); }                                                  \
+} while (0)
+
+#define CDL_FOREACH(head,el)                                                                   \
+    CDL_FOREACH2(head,el,next)
+
+#define CDL_FOREACH2(head,el,next)                                                             \
+    for ((el)=(head);el;(el)=(((el)->next==(head)) ? NULL : (el)->next))
+
+#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2)                                                    \
+    CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
+
+#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)                                         \
+  for ((el) = (head), (tmp1) = (head) ? (head)->prev : NULL;                                   \
+       (el) && ((tmp2) = (el)->next, 1);                                                       \
+       (el) = ((el) == (tmp1) ? NULL : (tmp2)))
+
+#define CDL_SEARCH_SCALAR(head,out,field,val)                                                  \
+    CDL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define CDL_SEARCH_SCALAR2(head,out,field,val,next)                                            \
+do {                                                                                           \
+    CDL_FOREACH2(head,out,next) {                                                              \
+      if ((out)->field == (val)) break;                                                        \
+    }                                                                                          \
+} while (0)
+
+#define CDL_SEARCH(head,out,elt,cmp)                                                           \
+    CDL_SEARCH2(head,out,elt,cmp,next)
+
+#define CDL_SEARCH2(head,out,elt,cmp,next)                                                     \
+do {                                                                                           \
+    CDL_FOREACH2(head,out,next) {                                                              \
+      if ((cmp(out,elt))==0) break;                                                            \
+    }                                                                                          \
+} while (0)
+
+#define CDL_REPLACE_ELEM2(head, el, add, prev, next)                                           \
+do {                                                                                           \
+ assert((head) != NULL);                                                                       \
+ assert((el) != NULL);                                                                         \
+ assert((add) != NULL);                                                                        \
+ if ((el)->next == (el)) {                                                                     \
+  (add)->next = (add);                                                                         \
+  (add)->prev = (add);                                                                         \
+  (head) = (add);                                                                              \
+ } else {                                                                                      \
+  (add)->next = (el)->next;                                                                    \
+  (add)->prev = (el)->prev;                                                                    \
+  (add)->next->prev = (add);                                                                   \
+  (add)->prev->next = (add);                                                                   \
+  if ((head) == (el)) {                                                                        \
+   (head) = (add);                                                                             \
+  }                                                                                            \
+ }                                                                                             \
+} while (0)
+
+#define CDL_REPLACE_ELEM(head, el, add)                                                        \
+    CDL_REPLACE_ELEM2(head, el, add, prev, next)
+
+#define CDL_PREPEND_ELEM2(head, el, add, prev, next)                                           \
+do {                                                                                           \
+  if (el) {                                                                                    \
+    assert((head) != NULL);                                                                    \
+    assert((add) != NULL);                                                                     \
+    (add)->next = (el);                                                                        \
+    (add)->prev = (el)->prev;                                                                  \
+    (el)->prev = (add);                                                                        \
+    (add)->prev->next = (add);                                                                 \
+    if ((head) == (el)) {                                                                      \
+      (head) = (add);                                                                          \
+    }                                                                                          \
+  } else {                                                                                     \
+    CDL_APPEND2(head, add, prev, next);                                                        \
+  }                                                                                            \
+} while (0)
+
+#define CDL_PREPEND_ELEM(head, el, add)                                                        \
+    CDL_PREPEND_ELEM2(head, el, add, prev, next)
+
+#define CDL_APPEND_ELEM2(head, el, add, prev, next)                                            \
+do {                                                                                           \
+ if (el) {                                                                                     \
+  assert((head) != NULL);                                                                      \
+  assert((add) != NULL);                                                                       \
+  (add)->next = (el)->next;                                                                    \
+  (add)->prev = (el);                                                                          \
+  (el)->next = (add);                                                                          \
+  (add)->next->prev = (add);                                                                   \
+ } else {                                                                                      \
+  CDL_PREPEND2(head, add, prev, next);                                                         \
+ }                                                                                             \
+} while (0)
+
+#define CDL_APPEND_ELEM(head, el, add)                                                         \
+    CDL_APPEND_ELEM2(head, el, add, prev, next)
+
+#endif /* UTLIST_H */
index efbf64f..1f255a1 100644 (file)
@@ -23,7 +23,6 @@ PROJECT_COMMON_INC_PATH     = $(PROJECT_COMMON_PATH)/inc
 PROJECT_COMMON_SRC_PATH     = $(PROJECT_COMMON_PATH)/src
 PROJECT_LIB_PATH            = $(PROJECT_ROOT_PATH)/lib
 PROJECT_EXTERNAL_PATH       = $(PROJECT_ROOT_PATH)/external/inc
-DTLS_LIB                    = $(EXT_LIB_PATH)/tinydtls
 OIC_C_COMMON_PATH           = $(ROOT_DIR_PATH)/resource/c_common
 #GLIB_PATH                  = ../../../../../../extlibs/glib/glib-2.40.2
 
@@ -47,12 +46,6 @@ BUILD_FLAG.release      =       $(DEFINE_FLAG)
 BUILD_FLAG = $(BUILD_FLAG.$(BUILD))
 
 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-#Build TinyDtls
-
-include $(CLEAR_VARS)
-include $(DTLS_LIB)/Android.mk
-
-#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 #Build OIC C Common libraries required for CA
 
 include $(CLEAR_VARS)
@@ -131,7 +124,7 @@ LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
 LOCAL_PATH = $(PROJECT_SRC_PATH)
 LOCAL_MODULE = CA
 
-LOCAL_STATIC_LIBRARIES = CACommon CACoap TinyDtls
+LOCAL_STATIC_LIBRARIES = CACommon CACoap
 
 LOCAL_C_INCLUDES = $(PROJECT_API_PATH)
 LOCAL_C_INCLUDES += $(PROJECT_COMMON_INC_PATH)
index 8df2869..287ec5f 100644 (file)
@@ -18,9 +18,6 @@ CC=gcc
 LIBCOAP=./lib/libcoap-4.1.1/
 LIBCOAP_OBJ_DIR=./lib/libcoap-4.1.1/obj
 
-TINYDTLS=./lib/extlibs/tinydtls
-TINYDTLS_OBJ_DIR=./lib/extlibs/tinydtls/obj
-
 # TODO : Currently Hardcoded WIFI_ADAPTER. Change it to generic
 CFLAGS.debug = -DWITH_POSIX -D__TIZEN__ -Wall -std=c99 -DSLP_SDK_LOG -g -D_GNU_SOURCE -DTIZEN_DEBUG_ENABLE -DTB_LOG $(ADAPTER_MACRO)
 CFLAGS.release = -DWITH_POSIX -D__TIZEN__ -Wall -std=c99 -DSLP_SDK_LOG -D_GNU_SOURCE -DTIZEN_DEBUG_ENABLE -DTB_LOG $(ADAPTER_MACRO)
index 458e227..772cc8e 100755 (executable)
@@ -54,7 +54,6 @@ cp -R $cur_dir/samples/tizen/ $sourcedir/tmp/con/sample/
 mkdir -p $sourcedir/tmp/con/sample/external/inc
 cp -R $cur_dir/external/inc/* $sourcedir/tmp/con/sample/external/inc/
 
-cp -R ./extlibs/tinydtls/ $sourcedir/tmp/con/extlibs/
 cp -R ./extlibs/mbedtls/ $sourcedir/tmp/con/mbedtls/
 cp -R ./extlibs/timer/ $sourcedir/tmp/con/extlibs/
 cp -R ./extlibs/libcoap/ $sourcedir/tmp/con/extlibs/
index 9269526..0e0458f 100644 (file)
@@ -67,10 +67,9 @@ mkdir -p %{DEST_LIB_DIR}/pkgconfig
 cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
 cp -f %{ROOTDIR}/extlibs/libcoap/libcoap.a %{buildroot}/%{_libdir}
 if echo %{SECURED}|grep -qi '1'; then
-       cp -f %{ROOTDIR}/con/extlibs/tinydtls/libtinydtls.a %{buildroot}/%{_libdir}
        cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedcrypto.a %{buildroot}/%{_libdir}
-       cp -f %{ROOTDIR}/con/extlibs/tinydtls/libmbedtls.a %{buildroot}/%{_libdir}
-       cp -f %{ROOTDIR}/con/extlibs/tinydtls/libmbedx509.a %{buildroot}/%{_libdir}
+       cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedtls.a %{buildroot}/%{_libdir}
+       cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedx509.a %{buildroot}/%{_libdir}
 fi
 cp -rf %{ROOTDIR}/con/api/cacommon.h* %{DEST_INC_DIR}/
 cp -rf %{ROOTDIR}/con/inc/caadapterinterface.h* %{DEST_INC_DIR}/
index 57bf1dd..f660d25 100644 (file)
@@ -53,9 +53,6 @@ env.SConscript(os.path.join(root_dir, 'common', 'SConscript'))
 # Getting util source files
 env.SConscript(os.path.join(root_dir, 'util', 'SConscript'))
 
-# The tinydtls library is found in '#extlibs/tinydtls', where the '#'
-# is interpreted by SCons as the top-level iotivity directory where
-# the SConscruct file is found.
 build_dir = env.get('BUILD_DIR')
 
 env.AppendUnique(CA_SRC = [os.path.join(ca_path,
@@ -66,8 +63,6 @@ if (('BLE' in ca_transport) or ('ALL' in ca_transport)):
                                           'adapter_util/cafragmentation.c')])
 
 if env.get('SECURED') == '1':
-       SConscript('#/extlibs/tinydtls/SConscript')
-       env.AppendUnique(CPPPATH = ['#extlibs/tinydtls'])
        env.AppendUnique(CPPPATH = ['#extlibs/timer'])
        env.AppendUnique(CPPPATH = [src_dir + '/resource/csdk/security/include'])
        env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
index e510931..9a750ea 100644 (file)
@@ -40,7 +40,6 @@ else:
        libocsrm_env.AppendUnique(CPPPATH = ['#/resource/connectivity/lib/libcoap-4.1.1/include'])
 
 libocsrm_env.PrependUnique(CPPPATH = [
-               '#/extlibs/tinydtls',
                '#/resource/csdk/logger/include',
                '#/resource/c_common/ocrandom/include',
                '#/resource/csdk/include',
@@ -53,7 +52,8 @@ libocsrm_env.PrependUnique(CPPPATH = [
                '#/resource/csdk/connectivity/api',
                '#/resource/csdk/security/include',
                '#/resource/csdk/security/include/internal',
-               '#/resource/csdk/security/provisioning/include'
+               '#/resource/csdk/security/provisioning/include',
+               '#/extlibs/mbedtls/mbedtls/include'
                ])
 
 if target_os in ['windows', 'msys_nt']:
index ef2f5f4..77a588a 100644 (file)
@@ -36,9 +36,8 @@ provisioning_env.AppendUnique(CPPPATH = [
                '#/resource/csdk/security/provisioning/include/cloud',
                '#/resource/csdk/security/provisioning/include/oxm',
                '#/resource/csdk/connectivity/inc/pkix',
-               '#/extlibs/tinydtls/ecc',
-               '#/extlibs/tinydtls/sha2',
-               '#/extlibs/asn1cert'
+               '#/extlibs/asn1cert',
+               '#/extlibs/mbedtls/mbedtls/include'
                ])
 
 provisioning_env.AppendUnique(CPPDEFINES= ['__WITH_DTLS__'])
index 4e7757d..820b350 100644 (file)
@@ -37,8 +37,6 @@
 #include "cacommon.h"
 #include "cainterface.h"
 #include "base64.h"
-#include "global.h"
-
 #include "srmresourcestrings.h"
 #include "doxmresource.h"
 #include "pstatresource.h"
@@ -58,6 +56,7 @@
 #include "oxmpreconfpin.h"
 #include "oxmrandompin.h"
 #include "otmcontextlist.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #define TAG "OIC_MULTIPLE_OTM"
 
@@ -762,11 +761,10 @@ static OCStackApplicationResult SubOwnerCredentialHandler(void *ctx, OCDoHandle
                 return OC_STACK_DELETE_TRANSACTION;
             }
 
-            // TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 = 0xC037, /**< see RFC 5489 */
-            caResult = CASelectCipherSuite(0xC037, endpoint->adapter);
+            caResult = CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, endpoint->adapter);
             if(CA_STATUS_OK != caResult)
             {
-                OIC_LOG(ERROR, TAG, "Failed to select TLS_NULL_WITH_NULL_NULL");
+                OIC_LOG(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256");
                 SetMOTResult(motCtx, OC_STACK_ERROR);
                 return OC_STACK_DELETE_TRANSACTION;
             }
index 51b7812..c460e6c 100755 (executable)
@@ -50,7 +50,6 @@
 #include "cacommon.h"
 #include "cainterface.h"
 #include "base64.h"
-#include "global.h"
 #include "utlist.h"
 #include "srmresourcestrings.h"
 #include "doxmresource.h"
index db4b5f5..550b2fb 100644 (file)
@@ -26,9 +26,9 @@
 #include "cainterface.h"
 #include "oic_malloc.h"
 #include "logger.h"
-#include "global.h"
 #include "pmtypes.h"
 #include "ownershiptransfermanager.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #define TAG "OIC_OXM_JustWorks"
 
@@ -91,10 +91,10 @@ OCStackResult CreateSecureSessionJustWorksCallback(OTMContext_t* otmCtx)
     }
     OIC_LOG(INFO, TAG, "Anonymous cipher suite Enabled.");
 
-    caresult  = CASelectCipherSuite(TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256, otmCtx->selectedDeviceInfo->endpoint.adapter);
+    caresult  = CASelectCipherSuite(MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256, otmCtx->selectedDeviceInfo->endpoint.adapter);
     if (CA_STATUS_OK != caresult)
     {
-        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256");
+        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDH_anon_WITH_AES_128_CBC_SHA256");
         caresult = CAEnableAnonECDHCipherSuite(false);
         if (CA_STATUS_OK != caresult)
         {
@@ -106,7 +106,7 @@ OCStackResult CreateSecureSessionJustWorksCallback(OTMContext_t* otmCtx)
         }
         return OC_STACK_ERROR;
     }
-    OIC_LOG(INFO, TAG, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA_256 cipher suite selected.");
+    OIC_LOG(INFO, TAG, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA256 cipher suite selected.");
 
     OCProvisionDev_t *selDevInfo = otmCtx->selectedDeviceInfo;
     CAEndpoint_t endpoint;
index b1bf0d5..671f78f 100644 (file)
@@ -31,7 +31,6 @@
 #include "oic_malloc.h"
 #include "logger.h"
 #include "pbkdf2.h"
-#include "global.h"
 #include "base64.h"
 #include "oxmmanufacturercert.h"
 #include "ownershiptransfermanager.h"
index 05b8064..4329df6 100644 (file)
 #include "oic_string.h"
 #include "logger.h"
 #include "pbkdf2.h"
-#include "global.h"
 #include "base64.h"
 #include "oxmpreconfpin.h"
 #include "ownershiptransfermanager.h"
 #include "pinoxmcommon.h"
 #include "srmresourcestrings.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #define TAG "OIC_OXM_PreconfigPIN"
 
@@ -186,13 +186,13 @@ OCStackResult CreateSecureSessionPreconfigPinCallback(OTMContext_t* otmCtx)
     }
     OIC_LOG(INFO, TAG, "Anonymous cipher suite disabled.");
 
-    caresult  = CASelectCipherSuite(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, otmCtx->selectedDeviceInfo->endpoint.adapter);
+    caresult  = CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, otmCtx->selectedDeviceInfo->endpoint.adapter);
     if (CA_STATUS_OK != caresult)
     {
-        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256");
+        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256");
         return OC_STACK_ERROR;
     }
-    OIC_LOG(INFO, TAG, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 cipher suite selected.");
+    OIC_LOG(INFO, TAG, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 cipher suite selected.");
 
     OCProvisionDev_t* selDevInfo = otmCtx->selectedDeviceInfo;
     CAEndpoint_t *endpoint = (CAEndpoint_t *)OICCalloc(1, sizeof (CAEndpoint_t));
index 24c2248..217f360 100644 (file)
 #include "oic_malloc.h"
 #include "logger.h"
 #include "pbkdf2.h"
-#include "global.h"
 #include "base64.h"
 #include "oxmrandompin.h"
 #include "ownershiptransfermanager.h"
 #include "pinoxmcommon.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #define TAG "OIC_OXM_RandomPIN"
 
@@ -138,13 +138,13 @@ OCStackResult CreateSecureSessionRandomPinCallback(OTMContext_t* otmCtx)
     }
     OIC_LOG(INFO, TAG, "Anonymous cipher suite disabled.");
 
-    caresult  = CASelectCipherSuite(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, otmCtx->selectedDeviceInfo->endpoint.adapter);
+    caresult  = CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, otmCtx->selectedDeviceInfo->endpoint.adapter);
     if (CA_STATUS_OK != caresult)
     {
-        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256");
+        OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256");
         return OC_STACK_ERROR;
     }
-    OIC_LOG(INFO, TAG, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256 cipher suite selected.");
+    OIC_LOG(INFO, TAG, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 cipher suite selected.");
 
     OCProvisionDev_t* selDevInfo = otmCtx->selectedDeviceInfo;
     CAEndpoint_t endpoint;
index 659aba4..e803772 100644 (file)
@@ -54,13 +54,11 @@ sptest_env.PrependUnique(CPPPATH = [
                '../../../security/provisioning/include/internal',
                '../../../../oc_logger/include',
                '../include/oxm',
-               '../../../../../extlibs/tinydtls',
                '../../../../../extlibs/base64',
                '../../../connectivity/inc',
                '../../../connectivity/inc/pkix',
                '../../../connectivity/common/inc',
-               '../../../connectivity/api',
-               '../../../../../extlibs/tinydtls'
+               '../../../connectivity/api'
                ])
 sptest_env.AppendUnique(LIBPATH = [sptest_env.get('BUILD_DIR')])
 sptest_env.PrependUnique(LIBS = [   'ocpmapi',
@@ -73,7 +71,6 @@ sptest_env.PrependUnique(LIBS = [   'ocpmapi',
 
 if sptest_env.get('SECURED') == '1':
     sptest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
-    sptest_env.AppendUnique(LIBS = ['tinydtls'])
 
 if not sptest_env.get('RELEASE'):
        sptest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
index ad10ebc..ada892a 100644 (file)
 #include <unistd.h>
 #endif
 
-#ifdef __WITH_DTLS__
-#include "global.h"
-#endif
-
 #define TAG  "OIC_SRM_CREDL"
 
 #ifdef HAVE_WINDOWS_H
@@ -2785,7 +2781,7 @@ void GetDerCaCert(ByteArray_t * crt, const char * usage)
             if(OIC_ENCODING_BASE64 == temp->optionalData.encoding)
             {
                 size_t bufSize = B64DECODE_OUT_SAFESIZE((temp->optionalData.len + 1));
-                uint8 * buf = OICCalloc(1, bufSize);
+                uint8_t * buf = OICCalloc(1, bufSize);
                 if(NULL == buf)
                 {
                     OIC_LOG(ERROR, TAG, "Failed to allocate memory");
index eb2021d..ad78c10 100644 (file)
 #include "ocpayload.h"
 #include "payload_logging.h"
 #include "cainterface.h"
-
 #include "directpairing.h"
 #include "srmresourcestrings.h" //@note: SRM's internal header
 #include "doxmresource.h"       //@note: SRM's internal header
 #include "pconfresource.h"       //@note: SRM's internal header
 #include "dpairingresource.h"       //@note: SRM's internal header
 #include "credresource.h"
-
 #include "pmtypes.h"
 #include "pmutility.h"
-
 #include "srmutility.h"
-
-#ifdef __WITH_DTLS__
-#include "global.h"
-#endif
-
+#include "mbedtls/ssl_ciphersuites.h"
 
 #define TAG ("OIC_DP")
 static const uint16_t CBOR_SIZE = 1024;
@@ -396,12 +389,6 @@ static OCStackApplicationResult DirectPairingFinalizeHandler(void *ctx, OCDoHand
             {
                 OIC_LOG(INFO, TAG, "Fail to close temporary dtls session");
             }
-
-            caResult = CASelectCipherSuite(TLS_NULL_WITH_NULL_NULL, CA_ADAPTER_IP);
-            if(CA_STATUS_OK != caResult)
-            {
-                OIC_LOG(ERROR, TAG, "Failed to select TLS_NULL_WITH_NULL_NULL");
-            }
 #endif // __WITH_DTLS__ or __WITH_TLS__
 
             OIC_LOG(INFO, TAG, "Direct-Papring was successfully completed.");
@@ -637,7 +624,7 @@ static OCStackApplicationResult DirectPairingHandler(void *ctx, OCDoHandle UNUSE
             caresult = CAEnableAnonECDHCipherSuite(false);
             VERIFY_SUCCESS(TAG, CA_STATUS_OK == caresult, ERROR);
 
-            caresult = CASelectCipherSuite(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, CA_ADAPTER_IP);
+            caresult = CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, CA_ADAPTER_IP);
             VERIFY_SUCCESS(TAG, CA_STATUS_OK == caresult, ERROR);
 
             //Register proceeding peer info. & DTLS event handler to catch the dtls event while handshake
index 5da4598..9b9b246 100644 (file)
 #include <strings.h>
 #endif
 
-#ifdef __WITH_DTLS__
-#include "global.h"
-#endif
-
 #include "ocstack.h"
 #include "oic_malloc.h"
 #include "payload_logging.h"
@@ -53,6 +49,7 @@
 #include "srmutility.h"
 #include "pinoxmcommon.h"
 #include "oxmverifycommon.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #if defined(__WITH_DTLS__) || defined (__WITH_TLS__)
 #include "mbedtls/md.h"
@@ -1094,7 +1091,7 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe
                             OIC_LOG(INFO, TAG, "ECDH_ANON CipherSuite is DISABLED");
 
                             RegisterOTMSslHandshakeCallback(DoxmDTLSHandshakeCB);
-                            caRes = CASelectCipherSuite((uint16_t)TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, ehRequest->devAddr.adapter);
+                            caRes = CASelectCipherSuite((uint16_t)MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, ehRequest->devAddr.adapter);
                             VERIFY_SUCCESS(TAG, caRes == CA_STATUS_OK, ERROR);
                             OIC_LOG(INFO, TAG, "ECDHE_PSK CipherSuite will be used for MOT");
 
@@ -1303,7 +1300,7 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe
                         OIC_LOG(INFO, TAG, "ECDH_ANON CipherSuite is DISABLED");
 
                         RegisterOTMSslHandshakeCallback(DoxmDTLSHandshakeCB);
-                        caRes = CASelectCipherSuite(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256,
+                        caRes = CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
                                                     ehRequest->devAddr.adapter);
                         VERIFY_SUCCESS(TAG, caRes == CA_STATUS_OK, ERROR);
 
@@ -1704,10 +1701,10 @@ static void PrepareMOT(const OicSecDoxm_t* doxm)
             OIC_LOG(INFO, TAG, "ECDH_ANON CipherSuite is DISABLED");
 
             RegisterOTMSslHandshakeCallback(DoxmDTLSHandshakeCB);
-            caRes = CASelectCipherSuite((uint16_t)TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, CA_ADAPTER_IP);
+            caRes = CASelectCipherSuite((uint16_t)MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, CA_ADAPTER_IP);
             VERIFY_SUCCESS(TAG, caRes == CA_STATUS_OK, ERROR);
 #ifdef __WITH_TLS__
-            caRes = CASelectCipherSuite((uint16_t)TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, CA_ADAPTER_TCP);
+            caRes = CASelectCipherSuite((uint16_t)MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, CA_ADAPTER_TCP);
             VERIFY_SUCCESS(TAG, caRes == CA_STATUS_OK, ERROR);
 #endif
             OIC_LOG(INFO, TAG, "ECDHE_PSK CipherSuite will be used for MOT");
index a87eef0..dcb7643 100644 (file)
 #include "ocpayload.h"
 #include "ocpayloadcbor.h"
 #include "payload_logging.h"
+#include "mbedtls/ssl_ciphersuites.h"
 
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
 
-#ifdef __WITH_DTLS__
-#include "global.h"
-#endif
-
 #define TAG  "OIC_SRM_DPAIRING"
 
 /** Default cbor payload size. This value is increased in case of CborErrorOutOfMemory.
@@ -461,7 +458,7 @@ static OCEntityHandlerResult HandleDpairingPostRequest (const OCEntityHandlerReq
 
             // Prepare to establish a secure channel with Pin-based PSK cipher suite
             if (CA_STATUS_OK != CAEnableAnonECDHCipherSuite(false) ||
-                CA_STATUS_OK != CASelectCipherSuite(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256, CA_ADAPTER_IP))
+                CA_STATUS_OK != CASelectCipherSuite(MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, CA_ADAPTER_IP))
             {
                 OIC_LOG_V(ERROR, TAG, "Failed to select TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA_256");
                 goto exit;
index 4998fd6..543456d 100644 (file)
@@ -118,7 +118,7 @@ void SetInputPinCB(InputPinCallback pinCB)
         OIC_LOG(ERROR, TAG, "Failed to set callback for input pin.");
         return;
     }
-    
+
     if ((NULL != g_inputPinCallbacks.callback) || (NULL != g_inputPinCallbacks.contextCallback))
     {
         OIC_LOG(ERROR, TAG, "Callback for input pin is already set.");
@@ -135,7 +135,7 @@ OCStackResult SetInputPinWithContextCB(InputPinCallbackWithContext inputPinCB, v
         OIC_LOG(ERROR, TAG, "Failed to set callback for input pin.");
         return OC_STACK_INVALID_PARAM;
     }
-    
+
     if ((NULL != g_inputPinCallbacks.callback) || (NULL != g_inputPinCallbacks.contextCallback))
     {
         OIC_LOG(ERROR, TAG, "Callback for input pin is already set.");
@@ -172,7 +172,7 @@ OCStackResult SetDisplayPinWithContextCB(DisplayPinCallbackWithContext displayPi
         OIC_LOG(ERROR, TAG, "Failed to set a callback for displaying a pin.");
         return OC_STACK_INVALID_PARAM;
     }
-    
+
     if ((NULL != g_displayPinCallbacks.callback) || (NULL != g_displayPinCallbacks.contextCallback))
     {
         OIC_LOG(ERROR, TAG, "Callback for displaying a pin is already set.");
index fdc5d69..d0a47e6 100644 (file)
@@ -55,10 +55,10 @@ SConscript('#/extlibs/cjson/SConscript')
 
 if target_os in ['msys_nt', 'windows']:
     # octbstack.dll doesn't export all the functions called by this app, so use static LIBs instead.
-    tools_env.AppendUnique(LIBS = ['coap', 'tinydtls', 'mbedtls', 'mbedx509', 'mbedcrypto',
+    tools_env.AppendUnique(LIBS = ['coap', 'mbedtls', 'mbedx509', 'mbedcrypto',
                                    'octbstack_static', 'ocsrm', 'connectivity_abstraction', 'sqlite3'])
 elif target_os in ['darwin']:
-    tools_env.AppendUnique(LIBS = ['coap', 'tinydtls', 'mbedtls', 'mbedx509', 'mbedcrypto',
+    tools_env.AppendUnique(LIBS = ['coap', 'mbedtls', 'mbedx509', 'mbedcrypto',
                                    'octbstack', 'ocsrm', 'connectivity_abstraction'])
 else:
     tools_env.PrependUnique(LIBS = ['octbstack', 'ocsrm', 'm'])
index e9d50c3..cf2aa7b 100644 (file)
@@ -66,7 +66,6 @@ srmtest_env.PrependUnique(LIBS = ['ocsrm',
 
 if srmtest_env.get('SECURED') == '1':
     srmtest_env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
-    srmtest_env.AppendUnique(LIBS = ['tinydtls'])
 
 if srmtest_env.get('LOGGING') == '1':
        srmtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
index 0b5c1a7..d700e6c 100644 (file)
@@ -99,7 +99,7 @@ if target_os in ['linux'] and liboctbstack_env.get('SIMULATOR', False):
     liboctbstack_env.Append( RPATH = liboctbstack_env.Literal('\\$$ORIGIN'))
 
 if env.get('SECURED') == '1':
-    liboctbstack_env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto', 'tinydtls'])
+    liboctbstack_env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
 
 if target_os in ['android', 'linux', 'tizen', 'msys_nt', 'windows']:
     liboctbstack_env.PrependUnique(LIBS = ['connectivity_abstraction'])
index 4d8bc9e..d8854bb 100644 (file)
@@ -65,7 +65,7 @@ if target_os not in ['windows']:
     samples_env.PrependUnique(LIBS=['m'])
 
 if samples_env.get('SECURED') == '1':
-    samples_env.AppendUnique(LIBS=['tinydtls'])
+    samples_env.AppendUnique(LIBS=['mbedtls'])
 
 samples_env.AppendUnique(LIBS = ['timer'])
 
index 18ac0a6..b1f8815 100644 (file)
@@ -29,7 +29,6 @@ samples_env.PrependUnique(CPPPATH = [
                '../../../../include',
                '../../../../stack/include',
                '../../../../security/include',
-               '../../../../../../extlibs/tinydtls',
                '../../../../../oc_logger/include'
                ])
 
index 7fc6c9f..bd8bc3a 100644 (file)
@@ -52,7 +52,6 @@ mkdir ./tmp/extlibs/
 mkdir ./tmp/packaging
 cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
 cp -Rf ./extlibs/mbedtls $sourcedir/tmp/extlibs
-cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
 cp -R ./extlibs/libcoap $sourcedir/tmp/extlibs
index 7dd8c8b..b8196f9 100644 (file)
@@ -78,7 +78,6 @@ cp -f %{ROOTDIR}/extlibs/libcoap/libcoap.a %{buildroot}/%{_libdir}
 cp -av /usr/lib*/libuuid.so.1 %{buildroot}%{_libdir}/libuuid1.so ||:
 
 if echo %{SECURED}|grep -qi '1'; then
-       cp -f %{ROOTDIR}/out/tizen/*/*/extlibs/tinydtls/libtinydtls.a %{buildroot}/%{_libdir}
        cp -f %{ROOTDIR}/out/tizen/*/*/libmbedcrypto.a %{buildroot}/%{_libdir}
        cp -f %{ROOTDIR}/out/tizen/*/*/libmbedtls.a %{buildroot}/%{_libdir}
        cp -f %{ROOTDIR}/out/tizen/*/*/libmbedx509.a %{buildroot}/%{_libdir}
index 0339115..f348571 100644 (file)
@@ -55,7 +55,7 @@ if target_os != 'darwin':
     stacktest_env.PrependUnique(LIBS = ['oc_logger'])
 
 if stacktest_env.get('SECURED') == '1':
-    stacktest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto', 'tinydtls'])
+    stacktest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
 
 if stacktest_env.get('LOGGING'):
     stacktest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
index 44202b8..c804f8e 100644 (file)
@@ -67,7 +67,6 @@ unittests_env.PrependUnique(LIBS = [
 
 if unittests_env.get('SECURED') == '1':
        unittests_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
-       unittests_env.AppendUnique(LIBS = ['tinydtls'])
 
 if unittests_env.get('LOGGING'):
        unittests_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
index 0f14cbf..46aa0ad 100644 (file)
@@ -81,7 +81,7 @@ if target_os in ['linux']:
 
 
 if CoAP_test_env.get('SECURED') == '1':
-    CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto','tinydtls'])
+    CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto',])
 ######################################################################
 # Build Test
 ######################################################################
index bdf7a8a..b00216e 100644 (file)
@@ -34,7 +34,6 @@ cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
 cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
 cp -R ./extlibs/mbedtls $sourcedir/tmp/extlibs
 cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
-cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
 cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
 cp -R ./extlibs/timer $sourcedir/tmp/extlibs
 cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
@@ -74,7 +73,7 @@ if [ ! -d .git ]; then
    git commit -m "Initial commit"
 fi
 
-buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6 --define 'WITH_TCP '$7 --define 'WITH_CLOUD '$8" 
+buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6 --define 'WITH_TCP '$7 --define 'WITH_CLOUD '$8"
 echo "Calling core gbs build command"
 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
 echo $gbscommand