tinyCrypt: Move key buffers to end of mbedtls_ssl_handshake_params
This saves considerable amount of code on Thumb due to single-instruction
load/stores for fields preceding these buffers.
diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h
index 19d1fd3..e8f7b71 100644
--- a/include/mbedtls/ssl_internal.h
+++ b/include/mbedtls/ssl_internal.h
@@ -392,11 +392,6 @@
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
uint16_t curve_tls_id; /*!< TLS ID of EC for ECDHE. */
#endif
-#if defined(MBEDTLS_USE_TINYCRYPT)
- uint8_t ecdh_privkey[NUM_ECC_BYTES];
- uint8_t ecdh_ownpubkey[2*NUM_ECC_BYTES];
- uint8_t ecdh_peerkey[2*NUM_ECC_BYTES];
-#endif /* MBEDTLS_USE_TINYCRYPT */
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
unsigned char *psk; /*!< PSK from the callback */
size_t psk_len; /*!< Length of PSK from callback */
@@ -554,6 +549,12 @@
* The library does not use it internally. */
void *user_async_ctx;
#endif /* MBEDTLS_SSL_ASYNC_PRIVATE */
+
+#if defined(MBEDTLS_USE_TINYCRYPT)
+ uint8_t ecdh_privkey[NUM_ECC_BYTES];
+ uint8_t ecdh_ownpubkey[2*NUM_ECC_BYTES];
+ uint8_t ecdh_peerkey[2*NUM_ECC_BYTES];
+#endif /* MBEDTLS_USE_TINYCRYPT */
};
/*