avolinski
f976ce3c18
Temporary disable Crypto HW accelerator on STM32F439xI chipset due to issue: https://github.com/ARMmbed/mbed-os/issues/10095
2019-03-14 17:00:06 +02:00
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
ccli8
b16b1dbeb9
[M487] Fix return error code when ECC H/W acceleratioin is failed
2018-12-14 17:28:30 +08:00
Juho Eskeli
361d804e2e
STM32L4: before calling HAL_CRYP_DeInit initialize the Instance member
2018-12-03 16:07:49 +02:00
Ron Eldor
9f4e752ef3
Modify HW accelerator drivers to new error code
...
Have the HW accelearation drivers return the platform module
errors about feature unsupported, and hw acceleration failure,
because the moduel specific errors will be removed.
2018-11-11 09:59:18 +02:00
Martin Kojtal
bc706f0329
Merge pull request #8142 from moranpeker/disable-HW-acceleration
...
Disable MBEDTLS_CONFIG_HW_SUPPORT on STM targets.
2018-10-06 07:46:13 +02:00
Moran Peker
333f087386
Disable MBEDTLS_SHA256_ALT on STM targets.
2018-10-02 14:35:22 +03:00
ccli8
d2c8be678f
[M487] Add missing mbedtls_device.h for NUMAKER_IOT_M487
2018-09-11 18:25:14 +08:00
jeromecoutant
057142167b
TARGET_STM mbedtls astyle
2018-06-27 15:00:04 +02:00
Krzysztof Stachowiak
6370a3500d
Correct typos and code alignment
2018-02-28 17:03:47 +01:00
Krzysztof Stachowiak
9d5d60b62e
Adjust partner code for MD HW acceleration to new MD API
2018-02-28 10:02:56 +01:00
Martin Kojtal
414b2d971d
Revert "Update Mbed TLS HW acceleration partner code to new hashing API"
2018-02-22 11:20:35 +00:00
Cruz Monrreal
817f9a569c
Merge pull request #5812 from OpenNuvoton/nuvoton_crypto
...
M487: Support ECP H/W accelerator
2018-02-20 11:53:23 -06:00
Cruz Monrreal
06b618447f
Merge pull request #5973 from k-stachowiak/IOTSSL-1727-update-to-new-md-api
...
Update Mbed TLS HW acceleration partner code to new hashing API
2018-02-14 12:58:08 -06:00
Krzysztof Stachowiak
2e9243f2e1
Expand guards for conditional compilation of ALT MD API
2018-02-14 16:33:58 +01:00
Krzysztof Stachowiak
8c412ed886
Resolve compiler and linker issues in MD APIs
...
The features/mbedtls/targets/TARGET_STM/* files include constant needed
for the error codes returned from the MD functions.
The features/mbedtls/targets/hash_wrappers.c provides thin redirection
layer for the hardware accelerated MD implementations that rely on the
old API.
The TESTS/mbedtls/multi/main.cpp has been changed to use the new API
as its build environment does not rely on the translation unit
containing the necessary wrappers.
2018-02-13 10:07:28 +01:00
ccli8
03f0ea1117
[M487] Refine internal_mpi_write_eccreg in ECP alter.
2018-02-12 14:11:15 +08:00
Cruz Monrreal
1c5c1c79d0
Merge pull request #6027 from ithinuel/fix-target-names-for-murata-abz-and-adv-wise-1510
...
rename MURATA type ABZ & WISE 1510 to their expected name
2018-02-07 20:06:50 -06:00
Wilfried Chauveau
6c9fcf3dd8
rename MURATA type ABZ & WISE_1510 to their expected name
2018-02-06 21:23:37 +00:00
Krzysztof Stachowiak
256e1de28a
Modify Silicon Labs target code to use MD API with the return values
2018-02-06 12:58:27 +01:00
ccli8
25253529ae
[M487] Support internal self-test for ECP alter.
2018-02-06 11:15:48 +08:00
ccli8
95d4110e31
[M487] Remove mbedtls_internal_ecp_mul in ECP alter.
...
MbedTLS doesn't support point multiplication for MBEDTLS_ECP_INTERNAL_ALT acceleration configuration.
2018-02-06 09:58:36 +08:00
ccli8
df76e297b4
[M487] Remove mbedtls prefix for internal functions in ECP alter.
2018-02-06 09:43:53 +08:00
ccli8
c9cc357734
[M487] Check divisor is not zero in MODOP_DIV operation in ECP alter.
2018-02-06 09:30:57 +08:00
Kimmo Vaisanen
41490f48d0
Add MTB_ADV_WISE_1570 target
2018-02-05 14:31:20 +02:00
Krzysztof Stachowiak
174530b5fe
Resolve conflicts after master update
2018-02-01 14:30:56 +01:00
Cruz Monrreal
c06a42b05d
Merge pull request #5630 from adustm/fix5079_sha1_md5_sha256_hwcrypto
...
Fix #5079 . Support of call to mbedtls_x_finish without calling mbedtls_x_update
2018-01-31 12:08:44 -06:00
Krzysztof Stachowiak
876a3b1a74
Update Mbed TLS HW acceleration partner code to new hashing API
2018-01-30 14:49:53 +01:00
adustm
88c3b3ee28
Remove last code redundancy
2018-01-30 11:06:15 +01:00
adustm
53027fd590
Improve fix calling Accumulate function every time in finish function
2018-01-30 09:41:23 +01:00
adustm
cba538854d
Fix MD5 link issue
2018-01-30 09:41:23 +01:00
adustm
3250e2d6d4
Fix #5079 . Add the support of call to mbedtls_xxx_finish even if mbedtls_xxx_udate
...
was not called since mbedtls_xxx_start
2018-01-30 09:41:23 +01:00
Wilfried Chauveau
e6b19d838c
add support for STM32L443RC & WISE-1510
2018-01-26 17:06:39 +00:00
ccli8
17280372a7
[M487] Refine code in ECP alter.
...
1. Add comment for unnecessary parameter 'n' in mbedtls_internal_run_eccop
2. Fix warning message with goto which causes `bypass initialization`
3. Fix comment
2018-01-22 11:21:19 +08:00
ccli8
a68750473c
[M487] Support ECP H/W accelerator
2018-01-09 16:20:41 +08:00
ccli8
67386b9ebd
[NUC472/M487] Fix DMA input/output buffers are overlapped in AES alter.
2018-01-05 09:18:26 +08:00
ccli8
4023078e14
[NUC472/M487] Remove unnecessary H/W context clone functions in SHA alter.
2018-01-05 09:18:26 +08:00
ccli8
acff29e6f2
[NUC472/M487] Fix context clone corner case in SHA alter.
...
As destination/source contexts are the same, we return immediately.
2018-01-05 09:18:25 +08:00
ccli8
d96bcda606
[NUC472/M487] Fix indefinite loop in SHA alter.
2018-01-05 09:18:25 +08:00
ccli8
8b7ff095a9
[NUC472/M487] Remove duplicate configuration of CRPT->SHA_CTL/CRPT->HMAC_CTL in SHA alter.
2018-01-05 09:18:25 +08:00
ccli8
3a8c1aa687
[NUC472/M487] Use interrupt signal rather than polling to check operation completion in DES alter.
...
This is to be consistent with PRNG/AES.
2018-01-05 09:18:24 +08:00
ccli8
0c1098483f
[NUC472/M487] Refine flow control code between crypto start and crypto ISR
2018-01-05 09:18:24 +08:00
ccli8
add839c808
[NUC472/M487] Refine code in SHA alter.
2018-01-05 09:18:24 +08:00
ccli8
b443a23b07
[NUC472/M487] Add memory barrier for DMA transfer in AES/DES alter.
2018-01-05 09:18:23 +08:00
ccli8
c906790257
[NUC472/M487] Call BSP driver rather than direct register access in DES alter.
2018-01-05 09:18:23 +08:00
ccli8
dc3c84c011
[NUC472/M487] Fix parameter check for TMODE/OPMODE in DES alter.
2018-01-05 09:18:23 +08:00
ccli8
815a6a7c4d
[NUC472/M487] Add parameter check for configuring DES registers in DES alter.
2018-01-05 09:18:23 +08:00
ccli8
1d62b9120b
[NUC472/M487] Refine comment with BSP driver use in DES alter.
2018-01-05 09:18:22 +08:00
ccli8
479cf687ff
[NUC472/M487] Fix multiple calls to SHA free in SHA alter.
2018-01-05 09:18:22 +08:00
ccli8
7d92550d11
[NUC472/M487] Remove superfluous code in AES alter.
2018-01-05 09:18:22 +08:00