Commit Graph

569 Commits

Author SHA1 Message Date
Jiang Guang Ming
e882782f0d feat(mbedtls): add new option CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL for mbedtls pytest 2023-10-23 13:10:44 +08:00
Jiang Guang Ming
37ec1cc592 feat(mbedtls): support C2 mbedtls can use crypto algorithm in ROM 2023-10-23 13:10:44 +08:00
Mahavir Jain
dbc33ca7aa Merge branch 'feature/add_intr_priority_config_option' into 'master'
feat(mbedtls): Add config for interrupt priority in AES and RSA

Closes IDF-7963 and IDF-7964

See merge request espressif/esp-idf!26190
2023-10-16 11:33:03 +08:00
Mahavir Jain
6b62065b92 Merge branch 'fix/crypto_periphs_use_rcc_atomic_blocks' into 'master'
Use rcc atomic blocks to enable/reset crypto peripherals

See merge request espressif/esp-idf!25811
2023-10-13 22:37:58 +08:00
nilesh.kale
cf4a7bb09d feat(mbedtls): Add config for interrupt priority in AES and RSA(MPI) 2023-10-12 11:06:13 +05:30
Mahavir Jain
0c3ed4f540 fix(mbedtls): remove deprecated MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
This config has been removed in the upstream mbedTLS starting 3.0
release. Please see mbedTLS changelog for more details.
2023-10-11 09:32:32 +00:00
Mahavir Jain
e9094cef66 fix(mbedtls): dynamic buffer feature issue with mbedtls 3.5.0
Set max TLS version in the SSL context during setup phase. Dynamic
buffer feature overrides the `mbedtls_ssl_setup` API and hence
this change is required per upstream 3.5.0 codebase change.
2023-10-11 09:32:32 +00:00
Mahavir Jain
9ca8f3d45b feat(mbedtls): update to 3.5.0 release
Changelog:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.5.0
2023-10-11 09:32:32 +00:00
harshal.patil
57d10477da
feat(ecdsa): use RCC atomic block to enable/reset the ECDSA peripheral 2023-10-11 14:59:04 +05:30
harshal.patil
1c6ff8ce9f
feat(ecc): use RCC atomic block to enable/reset the ECC peripheral 2023-10-11 14:59:04 +05:30
harshal.patil
c5cc4f488a
feat(mpi): use RCC atomic block to enable/reset the MPI peripheral 2023-10-11 14:59:03 +05:30
Alexey Lapshin
71713bcdb5 fix(mbedtls): fix gcc 13.1.0 warnings 2023-10-09 12:13:02 +04:00
Mahavir Jain
ab74fb4d92 Merge branch 'feature/locking_layer_for_ecdsa' into 'master'
feat(esp_hw_support): Added locking mechanism for the ECDSA and ECC peripherals

Closes IDF-7990

See merge request espressif/esp-idf!26029
2023-09-25 18:04:21 +08:00
Jakob Hasse
ac2515e199 refactor(lwip): Added on/off switch for LwIP stack
* This switch allows applications to replace lwip with a different
  IP stack or just make it build if it is a dependency but not
  actually needed.
2023-09-22 10:03:13 +08:00
harshal.patil
6a7caa7b8e
feat(esp_hw_support): Added locking mechanism for the ECDSA and ECC peripheral 2023-09-20 16:05:50 +05:30
Jiang Jiang Jian
62720ffa8c Merge branch 'feature/pbkdf2_fast_implementation' into 'master'
esp_wifi: Port fast_pbkdf2 implementation to calculate PMK

See merge request espressif/esp-idf!24287
2023-09-12 14:06:02 +08:00
Kapil Gupta
c82a792bc3 change(esp_wifi): Port fast_pbkdf2 implementation for mbedlts
Add changes to use fast_pbkdf2 as default for PMK calculations.
fast_pbkdf2 is significantly faster than current implementations
for esp chips.

Also removes unnecessary code for pbkdf-sha256 and pbkdf-sha512.
2023-09-11 19:33:17 +05:30
Mahavir Jain
2b3418b4a0 Merge branch 'feature/use_ecdsa_perph_while_mutual_auth' into 'master'
feat: ECDSA peripheral while performing http connection with mutual auth

Closes IDF-7390

See merge request espressif/esp-idf!25052
2023-09-11 19:41:21 +08:00
Aditya Patwardhan
a57c8dc938 Merge branch 'contrib/github_pr_12177' into 'master'
mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding (GitHub PR)

See merge request espressif/esp-idf!25826
2023-09-09 12:27:56 +08:00
Harshit Malpani
692e1a9e61
feat: ECDSA peripheral while performing http connection with mutual auth 2023-09-08 12:22:41 +05:30
Daniel Mangum
35c428b0ec
mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding
Updates config to define the new MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY
option, which replaced the previously used
MBEDTLS_SSL_CID_PADDING_GRANULARITY. The old option is continuing to be
used as the new one exceeds the maximum length for an option name in
esp-idf.

See https://github.com/Mbed-TLS/mbedtls/pull/4490 for more information.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-09-08 11:45:55 +05:30
harshal.patil
4c0dd8388b
feat(mbedtls): Integrate the ecdsa export public key feature in mbedtls 2023-09-06 11:07:40 +05:30
harshal.patil
d86b320892
feat(ecdsa): add ECDSA peripheral support for esp32p4 2023-09-06 11:07:37 +05:30
Mahavir Jain
5b001f9e53 Merge branch 'bugfix/aes_dma_descriptor_setup_issue' into 'master'
fix(aes): correct the linking of the DMA descriptors

See merge request espressif/esp-idf!25723
2023-09-05 17:19:28 +08:00
Mahavir Jain
9dc4b8beeb fix(aes): correct the linking of the DMA descriptors
For certain data lengths, the last input descriptor was not getting appended
correctly and hence the EOF flag in the DMA descriptor link list was
set at incorrect location. This was resulting in the peripheral being
stalled expecting more data and eventually the code used to timeout
waiting for the AES completion interrupt.

Required configs for this issue:

CONFIG_MBEDTLS_HARDWARE_AES
CONFIG_SOC_AES_SUPPORT_DMA

This observation is similar to the issue reported in:
https://github.com/espressif/esp-idf/issues/10647

To recreate this issue, start the AES-GCM DMA operation with data length
12280 bytes and this should stall the operation forever.

In this fix, we are tracing the entire descriptor list and then appending the
extra bytes descriptor at correct position (as the last node).
2023-09-04 05:35:15 +00:00
Mahavir Jain
89584cd1d0 fix(aes-gcm): correct the DMA completion wait condition for hardware GCM case
DMA operation completion must wait until the last DMA descriptor
ownership has been changed to hardware, that is hardware is completed
the write operation for entire data. Earlier for the hardware GCM case,
the first DMA descriptor was checked and it could have resulted in some
race condition for non interrupt (MBEDTLS_AES_USE_INTERRUPT disabled) case.
2023-09-04 05:35:15 +00:00
harshal.patil
b8c208cdb3
feat(ds): add Digital Signature peripheral support for esp32p4 2023-09-01 15:44:21 +05:30
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Harshit Malpani
4c5a7de6a6
feat(mbedtls): Update to release/v3.4.1 2023-08-16 11:40:31 +05:30
nilesh.kale
b4f9dd1fa5 fix(mbedtls): IRAM optimization analyzed on mbedtls/test_apps 2023-08-10 14:05:22 +05:30
Jiang Guang Ming
3f2746688c feat(mbedtls): support ecp fixed-point multiplication configurable 2023-08-08 14:03:57 +08:00
Mahavir Jain
6f5f7fd9d8 Merge branch 'bugfix/sha_dma_mode_incorrect_result' into 'master'
fix(sha): DMA mode iteration calculation issue for certain data lengths

Closes IDFGH-10690

See merge request espressif/esp-idf!25010
2023-08-01 16:44:47 +08:00
Mahavir Jain
224a308fd5
ci(test): add SHA DMA mode test for large data in PSRAM
Covers a test scenario described in following issue:
https://github.com/espressif/esp-idf/issues/11915
2023-07-28 14:23:02 +05:30
Laukik Hase
521dd35f2f
fix(mbedtls): Updated redundant assert for H/W MPI operations 2023-07-27 11:40:23 +05:30
Mahavir Jain
735c0c325b
fix(sha): DMA mode iteration calculation issue for certain data lengths
SHA hardware DMA mode calculation had off-by-one error for specific
input lengths. This was causing last chunk of the input data not being
fed to the hardware accelerator and hence resulting in an incorrect
final result.

Closes: https://github.com/espressif/esp-idf/issues/11915
2023-07-26 15:31:12 +05:30
harshal.patil
eb3dab8af4 ci(mbedtls): added a test for the mbedtls_internal_shaX_process API 2023-07-14 04:08:30 +00:00
harshal.patil
79d07f9909 fix(mbedtls): Fix the port for the mbedtls_internal_shaX_process API
- Also added the fix to update intermediate SHA state in the mbedtls_shaX_update API
2023-07-14 04:08:30 +00:00
Aditya Patwardhan
56f15ab017 Merge branch 'fix/mpi_incorrect_assert' into 'master'
fix(mbedtls): Fix incorrect assert for H/W MPI operations

Closes WIFI-5591 and IDFGH-10615

See merge request espressif/esp-idf!24737
2023-07-14 08:59:10 +08:00
Mahavir Jain
36908cc5fd Merge branch 'bugfix/mbedtls_sha_test_fail_when_run_twice' into 'master'
fix(mbedtls): sha test will fail when run twice

See merge request espressif/esp-idf!24767
2023-07-13 20:47:30 +08:00
Laukik Hase
20a3fcae48
fix(mbedtls): Fix incorrect assert for H/W MPI operations
- Closes https://github.com/espressif/esp-idf/issues/11850
2023-07-13 14:52:00 +05:30
Jiang Guang Ming
01b71b0978 fix(mbedtls): sha test will fail when run twice 2023-07-13 00:00:16 -07:00
harshal.patil
990e1e9307 refactor(mbedtls): refactored the return values check in some esp-aes APIs 2023-07-12 14:41:41 +05:30
harshal.patil
38255c048a fix(mbedtls): Fixed the transmission of return values of the esp-aes APIs
- Earlier, some intermediate return values were not stored and returned,
thus incorrect return values used to get transmitted to the upper layer of APIs.

- Also, zeroised the output buffer in case of error condition.
2023-07-12 14:41:41 +05:30
morris
56a376c696 feat(esp_gdma): add hal interface for common operations
GDMA driver will be adapted to more DMA peripherals in the future.
This commit is to extract a minimal interface in the hal layer
2023-07-10 13:45:57 +08:00
Mahavir Jain
90290507fb
fix(mbedtls): Build issue in dynamic buffer feature
Fix build issue in mbedTLS dynamic buffer feature with
`CONFIG_MBEDTLS_DHM_C` enabled case. Also added a build
configuration for the test coverage.

Closes https://github.com/espressif/esp-idf/issues/11770
2023-06-29 13:30:30 +05:30
harshal.patil
f0ae5bd25a mbedtls: update submodule to include:
fix: mbedtls_ecdsa_can_do was not being defined when ECDSA_SIGN_ALT is defined but ECDSA_VERIFY_ALT is not defined causing mbedtls_ecdsa_verify_restartable to always fail.
feature: initial version of the sbom.yml file
2023-06-23 14:07:45 +05:30
Song Ruo Jing
921713fff4 uart: Support LP_UART port with UART driver on esp32c6 2023-06-16 07:31:40 +00:00
Konstantin Kondrashov
c350c3c504 Merge branch 'feature/cleanup_wrong_log_use' into 'master'
all: Removes unnecessary newline character in logs

Closes IDFGH-10197

See merge request espressif/esp-idf!24131
2023-06-15 21:49:49 +08:00
Marius Vikhammer
6d11c37ff1 core-system: trim build components for core-system test apps 2023-06-13 09:14:42 +08:00
KonstantinKondrashov
e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00