mbed-os/features/mbedtls/targets/TARGET_NUVOTON/TARGET_NUC472/sha
ccli8 ca44675086 [Nuvoton] Fix crypto AC management
1. For SHA AC, use atomic flag to manage its ownership.
   (1) Nuvoton SHA AC doesn't support SHA context save & restore, so S/W
       SHA fallback has been supported before. To make non-blocking 'acquire'
       semantics clearer, introduce 'try_acquire' to substitute for 'acquire'.
   (2) No biting CPU due to mechanism above.
   (3) No deadlock due to mechanism above.
2. For AES/DES/ECC AC, change to mutex to manage their ownership.
   (1) Change crypto-misc.c to crypto-misc.cpp to utilize C++ SingletonPtr
       which guarantees thread-safe mutex construct-on-first-use.
   (2) With change to crypto-misc.cpp, add 'extern "C"' modifier to CRYPTO_IRQHandler()
       to avoid name mangling in C++.
   (3) No priority inversion because mutex has osMutexPrioInherit attribute
       bit set.
   (4) No deadlock because these AC are all locked for a short sequence
       of operations rather than the whole lifetime of mbedtls context.
   (5) For double mbedtls_internal_ecp_init() issue, it has been fixed in upper
       mbedtls layer. So no need to change ecc init/free flow.
2018-12-19 10:17:39 +08:00
..
sha1_alt.c [Nuvoton] Fix crypto AC management 2018-12-19 10:17:39 +08:00
sha1_alt.h Adjust partner code for MD HW acceleration to new MD API 2018-02-28 10:02:56 +01:00
sha1_alt_sw.c [NUC472] Refine coding style 2018-01-05 09:18:14 +08:00
sha1_alt_sw.h [NUC472/M487] Fix compile error with disabled crypto 2018-01-05 09:18:20 +08:00
sha256_alt.c [Nuvoton] Fix crypto AC management 2018-12-19 10:17:39 +08:00
sha256_alt.h Adjust partner code for MD HW acceleration to new MD API 2018-02-28 10:02:56 +01:00
sha256_alt_sw.c [NUC472] Refine coding style 2018-01-05 09:18:14 +08:00
sha256_alt_sw.h [NUC472/M487] Fix compile error with disabled crypto 2018-01-05 09:18:20 +08:00
sha_alt_hw.c [NUC472/M487] Remove unnecessary H/W context clone functions in SHA alter. 2018-01-05 09:18:26 +08:00
sha_alt_hw.h [NUC472/M487] Remove unnecessary H/W context clone functions in SHA alter. 2018-01-05 09:18:26 +08:00