This has the following optimization potentials which are also applied.
- crypto: only one HMAC context is required
- crypto: integrate last iteration into loop
- hmac: remove dtls_hmac_new()/_free()/_storage_init() as dtls_hmac_new()
now only is used in tests
Co-Authored-By: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
For ESP-IDF, use the ESP-IDF sha256 hash implementation to save on code
size.
[Test for ESP_PLATFORM and CONFIG_LIBSODIUM_USE_MBEDTLS_SHA]
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
This moves the mapping of function names and types for sha256
calculations into a single conditional section at the beginning
of the file in order to minimize the number of pre-processor
conditionals spread throughout the code.
Change-Id: Iad02455e1fdb22f7a17bba0a9f2ac4750826bcc3
For platforms other than Contiki, dtls_hmac_storage_init() was
defined inline in hmac.h which cluttered the interface.
Change-Id: I9eb1f0b6a299ef3b60560b3d529dde39d610cd33
Fixes dtls_config.h not visible in headers
Include dtls_config.h in tinydtls.h and include tinydtls.h in all necessary
headers.
Remaining headers do not use 'ifdef', but they may require it too.
Change-Id: I39c86dffc8bbc8bd7551e74386994f92f49d00ec
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
this change is for resolving |sha2| symbol-conflict in using
|tinydtls| with other crypto modules. this symbol-conflict could
occur on the |tinydtls|-deployed systems with using |OpenSSL| or
|OpenSSL|-like, which has another |SHA| symbols.
In case of |iotivity-tinydtls|, the conflict occurs between
|iotivity-tinydtls| and the deployed |crypto| library, which has
also another |SHA|.
[patch #1] initial commit
[patch #2-3] updated commit message
[patch #4] reverted renaming for internal symbols
[patch #5] updated symbols with lower-case
[patch #6] fixed typo for calling API
bugs: https://bugs.eclipse.org/bugs/show_bug.cgi?id=490467
Change-Id: I6942870c7c31544e89a20209d21730406ffb08d2
Signed-off-by: Kyungsun Cho <goodsun.cho@samsung.com>