Commit Graph

367 Commits

Author SHA1 Message Date
hrushikesh.bhosale
83afbfd4d7 fix(mbedtls): Check return values of md functions during ssl handshake
Added checks for mbedtls_md_setup and mbedtls_md_start
functioms in esp_ssl_tls.c
2024-07-24 11:16:20 +05:30
Armando
38bdfe195e fix(aes): fixed aes wrong dma desc alignment 2024-07-16 17:44:48 +08:00
Mahavir Jain
e1499ddde3
fix(hal): correct the power up sequence for MPI/ECC peripherals in ESP32-C5 2024-06-21 09:42:57 +08:00
morris
65710f70e3
change(aes): refactor DMA buffer allocation 2024-06-17 11:28:07 +08:00
nilesh.kale
46c0902fd6 feat: enabled hmac and ds peripheral support for c5
This commit add support for HMAC and DS peripheral support for ESP32-C5.
2024-05-28 10:44:54 +05:30
morris
e659675965 Merge branch 'feat/gdma_set_burst_size' into 'master'
feat(gdma): return alignment constraints required by the GDMA channel

Closes IDF-9848

See merge request espressif/esp-idf!30748
2024-05-27 15:33:57 +08:00
Mahavir Jain
eca073df3c Merge branch 'bugfix/ecc_coverity_warning' into 'master'
fix(ecc_alt): adjust null pointer check to fix coverity warning

Closes IDF-9872

See merge request espressif/esp-idf!30946
2024-05-27 13:43:00 +08:00
morris
dc6989796a feat(gdma): set burst size and return alignment constraint
burst size can affect the buffer alignment
2024-05-24 22:43:55 +08:00
Mahavir Jain
bc2ae212cf fix(ecc_alt): adjust null pointer check to fix coverity warning 2024-05-23 13:01:32 +08:00
harshal.patil
7c7c33ecbd
fix(mbedtls/port): Fix some divide-by-zero and deadcode coverity checks 2024-05-23 09:45:44 +05:30
harshal.patil
141cdac87e fix(mbedtls/aes): Check location of the buffer only for SOC_AXI_DMA_EXT_MEM_ENC_ALIGNMENT
When buffer_needs_realloc in the AES driver, check the location of the buffer only in case
of SOC_AXI_DMA_EXT_MEM_ENC_ALIGNMENT for allocating the newer buffer, otherwise use generic
DMA capable memory (as was done earlier)
2024-05-16 13:36:30 +08:00
harshal.patil
5dfbc47192
fix(mbedtls/crypto_shared_gdma): Enable AXI-DMA enable external memory AES-ECC access
- When external memory encryption is enabled, set the aes_ecc bit of AXI-DMA to enable memory access
2024-05-13 16:54:45 +05:30
nilesh.kale
3e6d62781f feat(mbedtls): updated mbedtls version from 3.5.2 to 3.6.0
This MR updated MbedTLS version to latest version 3.6.0.
2024-04-18 14:11:02 +05:30
Armando
d341540a5e change(drivers): other driver changes for cache malloc 2024-04-15 15:34:51 +08:00
Mahavir Jain
64fd14e787
feat(mbedtls): add kconfig option for MBEDTLS_ERROR_C
Disabling this config can reduce footprint for the cases where
mbedtls_strerror() is used and hence the debug strings are getting
pulled into the application image.
2024-04-04 09:20:28 +05:30
harshal.patil
e383616503 fix(mbedtls/aes): Fix incorrect dma alignment size 2024-04-02 14:30:14 +08:00
gaoxu
40f38bea6f feat(dma): refactor dma calloc function 2024-04-02 14:30:14 +08:00
Aditya Patwardhan
d0a23799e8
feat(mbedtls): Added support for using ECDSA key through key manager 2024-04-01 14:37:12 +05:30
harshal.patil
272633bde1
fix(mbedtls/ecdsa): Fix dependant peripheral's enable and reset 2024-03-29 12:40:13 +05:30
harshal.patil
84b6940ce4
feat(mbedtls/ecdsa): Wrapped ecdsa_write_signature to support deterministic ECDSA signatures 2024-03-29 12:14:11 +05:30
harshal.patil
70ef80d974
feat(mbedtls/ecdsa): Add support for deterministic ECDSA signature generation 2024-03-29 12:14:11 +05:30
harshal.patil
95fac15698
feat(hal/ecdsa): Add HAL API for operation successful check 2024-03-29 12:14:11 +05:30
harshal.patil
9cd10e196b
feat(hal/sha): use RCC atomic block to enable/reset the SHA peripheral 2024-03-27 11:23:30 +05:30
harshal.patil
211a2a5477
feat(mbedtls/sha): Support SHA-DMA operations by satisfying L1 cache alignment requirements
- Use block mode as default SHA operation mode instead of DMA
2024-03-27 11:23:29 +05:30
harshal.patil
d737625215
feat(mbedtls/sha): Support in AXI-DMA SHA driver layer 2024-03-27 11:23:29 +05:30
harshal.patil
853bff88c5
change(mbedtls/sha): replace Cache ROM APIs usage with APIs from esp_cache.h 2024-03-27 11:23:29 +05:30
harshal.patil
c4f052cee4
feat(mbedtls/aes): Satisfy L1 cache alignment for AES-GCM DMA operations 2024-03-26 11:38:33 +05:30
harshal.patil
07f7b06d8d
change(mbedtls/aes): Move aad desc population into the internal AES-GCM DMA process API 2024-03-26 11:31:11 +05:30
harshal.patil
0b16999093
fix(mbedtls/aes): Remove ESP_CACHE_MSYNC_FLAG_UNALIGNED flag for the cache M2C operation 2024-03-22 14:45:34 +05:30
Mahavir Jain
cd47cf46dc Merge branch 'esp32p4/add_aes_support' into 'master'
feat: add AES support for ESP32-P4

Closes IDF-6519

See merge request espressif/esp-idf!26429
2024-03-15 11:43:22 +08:00
Wu Zheng Hui
5a682c3bbb Merge branch 'feature/optimize_chips_active_power' into 'master'
feat(system): Optimize the power consumption of esp32h2 and esp32c6 in the active state

Closes IDF-5658

See merge request espressif/esp-idf!27798
2024-03-14 12:08:33 +08:00
harshal.patil
e8268d8b6b
feat(hal/aes): use RCC atomic block to enable/reset the AES peripheral 2024-03-13 15:22:07 +05:30
harshal.patil
2abb656ba2
feat(mbedtls/aes): Support AES-DMA operations by satisfying L1 cache alignment requirements
- Use DMA RX done interrupt status bit while waiting for DMA rx transfer
2024-03-13 15:22:07 +05:30
harshal.patil
9b15189583
change(mbedtls): replace Cache ROM APIs usage with APIs from esp_cache.h
- Only APIs used in esp_crypto_shared_gdma and aes have been replaced
- Get dcache line size using cache api instead of Kconfig
2024-03-13 15:22:07 +05:30
harshal.patil
a6012c9e5a
feat(mbedtls/aes): add AES peripheral support for esp32p4 2024-03-13 15:22:06 +05:30
harshal.patil
83dd60307f
feat(mbedtls/esp_crypto_shared_gdma): support AXI-DMA in the crypto shared gdma layer
- In case of AXI-DMA, the DMA descriptors need to be 8 bytes aligned
lldesc_t do not satify this condition thus we need to replace it with
dma_descriptor_t (align(4) and align(8)) in esp_crypto_shared_gdma.

- Added new shared gdma start API that supports the dma_descriptor_t
DMA descriptor.

- Added some generic dma descriptor macros and helper functions

- replace lldesc_t with dma_descriptor_t
2024-03-13 15:22:06 +05:30
harshal.patil
2c570ed53b
change(mbedtls/aes): moved esp_aes_internal.h to be a private header
- Also enable AES-GCM test in the hal crypto test app for all targets
2024-03-13 15:22:06 +05:30
harshal.patil
343a6f47ab
fix(mbedtls/aes-gcm): Fix null pointer derefernce coverity reports
- Also fixed a tcp_transport and https_server report
2024-03-12 12:36:00 +05:30
wuzhenghui
92849e660e
fix(mbedtls): fixing ecdsa's dependence on ecc_mult clock 2024-03-12 10:10:42 +08:00
harshal.patil
8977be856d
fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation
- Even if the config MBEDTLS_HARDWARE_AES is enabled, we now support fallback
to software implementation of GCM operations when non-AES ciphers are used.
2024-02-23 10:47:30 +05:30
nilesh.kale
aab3f604ec feat(hal/testapps): Added AES and SHA testcases with DMA support 2024-02-09 14:23:06 +05:30
Aditya Patwardhan
4dc2ace0b7
fix(esp_hw_support): Update key manager support
1) Added new Key Manager APIs
    2) Added crypto locking layer for Key Manager
    3) Remove support for deploying known key
    4) Format key manager support
    5) Fix build header error
    6) Updated the key_mgr_types.h file
    7) Added key manager tests
2024-01-23 10:24:39 +05:30
Aditya Patwardhan
1220c36f96 Merge branch 'fix/build_failure_when_hardware_gcm_is_disabled' into 'master'
fix(mbedtls/gcm): Fix build failure when config `MBEDTLS_HARDWARE_GCM` is disabled

See merge request espressif/esp-idf!28149
2024-01-08 13:35:04 +08:00
harshal.patil
8ac4d9ab99
fix(mbedtls/gcm): Avoid using GCM hardware when config MBEDTLS_HARDWARE_GCM is disabled 2024-01-04 12:20:11 +05:30
jim
b0b6980421 mbedtls: Fix enable dynamic mbedtls will occur heap corruption when server support TLS renegotiation 2023-12-22 17:23:42 +08:00
Ivan Grokhotkov
a596ca56a8
fix(mbedtls): fix -Wstrict-prototypes warning when compiling on Linux 2023-12-19 13:29:15 +01:00
harshal.patil
47821f6299
fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations 2023-11-30 11:59:59 +05:30
Mahavir Jain
7505667e7d Merge branch 'bugfix/esp32h2_ecdsa_hardware_k' into 'master'
fix(esp32h2): program use_hardware_k efuse bit for ECDSA key purpose

Closes IDF-8508 and IDF-8506

See merge request espressif/esp-idf!26918
2023-11-17 15:10:12 +08:00
Mahavir Jain
fec7fc30f1
fix(api-docs): include in the ECDSA APIs for doxygen build 2023-11-15 09:42:27 +05:30
Mahavir Jain
7bb29086df
docs: add ECDSA peripheral chapter for H2/P4
- Add ECDSA peripheral chapter and instructions to program efuse key block
- Update security guide for ECDSA peripheral mention for device identity
- Link with ESP-TLS guide about using ECDSA peripheral in TLS connection
2023-11-15 09:42:26 +05:30