Commit Graph
100 Commits
Author SHA1 Message Date
harshal.patil 6d03d5c8fc fix(mbedlts/aes): Ensure cache coherency when DMA writes to cacheable PSRAM buffers 2026-01-14 11:22:43 +05:30
harshal.patil b0442de937 fix(bootloader_support): Allow pre-programmed XTS-AES psuedo round level efuses
- The API esp_flash_encryption_set_release_mode() by defualt programs
the XTS-AES pseudo round level efuse to level low but did not considered
any existing value that would have been programmed in the efuse bit.
2025-09-30 15:19:26 +05:30
harshal.patil 42ae31d5bb fix(bootloader_support): Reorder write disabling ECDSA_CURVE_MODE 2025-09-30 15:00:11 +05:30
harshal.patil c3c15d240e fix(bootloader_support): Reorder write protection bits of some shared security efuses 2025-09-30 14:57:12 +05:30
harshal.patil 2bfecc9638 change(mbedtls/ecdsa): The ECDSA module of ESP32-H2 ECO5 does not use MPI module 2025-08-13 20:50:53 +05:30
harshal.patil 4f1de8e961 fix(mbedtls/gcm): Allow enabling GCM fallback only if software GCM is available 2025-07-25 08:48:35 +05:30
harshal.patil 748d29c394 fix(bootlaoder): Fix documentation as ESP32 does not support secure download mode 2025-06-30 10:27:30 +05:30
harshal.patilandMahavir Jain 38452e4cc8 fix(mbedtls/esp_crt_bundle): Suppress non-negative serial number warning
Co-authored-by: Mahavir Jain <mahavir.jain@espressif.com>
2025-05-26 13:55:08 +05:30
harshal.patil 5e15adfae9 fix(esp_psram): Add XIP PSRAM alignment gaps in heap only if PSRAM protection is enabled 2025-05-21 15:36:41 +05:30
harshal.patil 29f7654c2b feat(cpu_region_protect): Enable basic memory protection for SPIRAM 2025-05-21 15:36:41 +05:30
harshal.patil 8d42a711c4 feat(esp_psram): Add the gap created due to alignment of XIP segments in heap 2025-05-21 15:36:41 +05:30
harshal.patil 2cb93cd926 feat(esp_psram): Add some helper APIs to get usable PSRAM memory size 2025-05-21 15:36:41 +05:30
harshal.patil 53321dd030 change(bootloader_support/secure_boot): Improve description of the config SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS 2025-05-06 13:48:30 +05:30
harshal.patil 5bd3fb9f0c fix(mbedtls): Fix config dependencies when ROM mbedtls is used 2025-04-29 11:20:25 +05:30
harshal.patil 031ca5cc9b fix(wpa_supplicant): Disable fastpbkdf2 when s/w and h/w SHA1 is disabled 2025-04-29 11:20:18 +05:30
harshal.patil 86fb48da77 fix(esp-tls): Fix build failure when CONFIG_MBEDTLS_SHA1_C is disabled 2025-04-29 11:17:27 +05:30
harshal.patil 36e5d6c695 feat(mbedtls): Make mbedtls SHA1 support configurable 2025-04-29 11:17:27 +05:30
harshal.patil 28e42429f4 fix(examples): Example CA certs must contain the Key Usage parameter
- Example CA certificates that are used for self-signed client certificates
need to include the Key Usage parameter.
- Python3.13 changed the default context of the SSL context that is
generated using ssl.create_default_context() by enabling the VERIFY_X509_STRICT
flag by default
2025-04-03 10:52:47 +05:30
harshal.patil 223b25e1f3 fix(esp_psram): Fix incorrect calculation of used XIP PSRAM pages
The functions mmu_config_psram_text_segment() and mmu_config_psram_rodata_segment()
used to return the value of next start page in *out_page instead of the number
of pages used as mentioned in the documentation
2025-03-05 10:37:42 +05:30
harshal.patil 1318d51dd4 fix(esptool_py): Fix NVS partition being incorrectly marked as encrypted
- The CMake function esptool_py_partition_needs_encryption() in the esptool_py
component used to mark NVS partition as encrypted, instead it should have marked
the NVS keys partition as encrypted.
2025-01-30 12:02:54 +05:30
harshal.patil ac0dc0d775 feat(bootloader_support): Permanently enable XTS-AES pseudo rounds when FE release mode is enabled 2025-01-23 14:06:16 +05:30
harshal.patil ae4e693cfc feat(hal/spi_flash_encrypted): Enable pseudo rounds function during XTS-AES operations 2025-01-23 14:06:16 +05:30
harshal.patil 8d30077744 feat(hal/aes): Enable pseudo rounds function during AES operations 2025-01-23 14:06:16 +05:30
harshal.patil ea5c318031 fix(mbedtls/aes): Fix external memory corruption caused due to unaligned length cache sync
Fixes the memory corruption issue that arises due to external memory cache sync of unaligned
length bytes when L2 cache line size is greater than the L1 cache line size
2024-11-21 12:16:18 +05:30
harshal.patil 18998ddbe0 fix(mbedtls): Fix the increase in build size of mbedtls when upgrading to v3.x 2024-10-17 14:53:30 +05:30
harshal.patilandHanno 8d9d5ee218 feat(mbedtls/esp_crt_bundle): Move dummy cert to .rodata to save 408B from dram
Co-authored-by: Hanno <h.binder@web.de>
2024-10-16 16:36:33 +05:30
harshal.patil e1d72e960c feat(mbedtls): Wrap mbedtls_ecdsa_read_signature to use ECDSA hardware when possible 2024-09-24 17:05:27 +05:30
harshal.patil e4de9ffe7d fix(cpu_region_protect): Reset PMA entries before using them
- ROM uses some PMA entries so we clear such PMA entries before using them in ESP-IDF
2024-09-24 16:56:17 +05:30
harshal.patil 87ddff0ce5 fix(mbedtls/port): Check signature hash length before using ECDSA hardware 2024-09-24 16:48:01 +05:30
harshal.patil e94d1f275c fix(mbedtls/aes): Avoid extra C2M sync of memory 2024-08-08 14:50:38 +05:30
harshal.patil 12a2e89ac6 fix(bootloader_support): Fix encrypt image instead of the partition feature not being enabled 2024-08-06 13:44:36 +05:30
harshal.patil 7e1bdbd683 fix(tools/esp_prov): Fix incorrect input decoding when using console transport
- Closes https://github.com/espressif/esp-idf/issues/14013
2024-06-24 12:28:31 +05:30
harshal.patil 18470061ab docs(secure_boot): Add secure boot signature verification time for esp32p4 2024-06-24 12:25:42 +05:30
harshal.patil 8445486303 fix(soc): Cleanup inaccessible SHA registers from the header files 2024-06-11 14:24:09 +05:30
harshal.patil 0868604664 fix(esp_hw_support): Fix incorrect PMA configuration for ESP32-P4
- As the PMA entry that made some memory regions cacheable was
assigned the highest priority, some intermediate inaccessible
memory regions bypassed protection.

- Added tests for the same

- Verified that even after changing the priority of the PMA entry,
a write operation at SOC_IRAM_LOW + 0x40 (a random RAM cached address)
still needs the same number (29) of CPU cycles.
2024-06-11 12:23:06 +05:30
harshal.patil 0c5bce6918 fix(bootloader_support): Make esp_flash_encrypt.h independent of spi_flash_mmap.h header 2024-05-20 14:40:49 +08:00
harshal.patil bef1fba3bc 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-20 14:40:49 +08:00
harshal.patil f07db4ef4d ci(otatool): fix test failure caused due to closing connection incorrectly 2024-04-15 17:09:39 +05:30
harshal.patil 6ec486e351 fix(esp_system): Enable crpyto peripherals related clocks for specific ESP32-P4 ECOs 2024-04-12 14:56:53 +05:30
harshal.patil 5ba9b53667 fix(hal): Clear reset on parent crpyto lock while resetting a crypto peripheral 2024-04-12 14:55:11 +05:30
harshal.patil e383616503 fix(mbedtls/aes): Fix incorrect dma alignment size 2024-04-02 14:30:14 +08:00
harshal.patil 1975c1c69e docs(security): Update security-related docs for ESP32-P4 2024-04-01 17:34:28 +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 cd98dfc3fd feat(hal): Add LL and HAL layer support for deterministic ECDSA 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 4ef1bf8031 Merge branch 'fix/esp32c5_sha_api_definitions' into 'master'
fix(hal/sha): Add RCC enable and reset API definitions for ESP32-C5 SHA

Closes IDFCI-2111

See merge request espressif/esp-idf!29883
2024-03-27 21:46:22 +08:00
harshal.patil e454fa4026 fix(hal/sha): Add RCC enable and reset API definitions for ESP32-C5 SHA 2024-03-27 18:09:33 +05:30
Harshal Patil 5274bf88e4 Merge branch 'esp32p4/add_sha_support' into 'master'
feat: add SHA support for ESP32-P4

Closes IDF-7541 and IDF-7882

See merge request espressif/esp-idf!24865
2024-03-27 20:08:28 +08:00
harshal.patil 22857529dd ci(hal/crypto): Update crypto test app to use SHA-DMA process API from mbedtls 2024-03-27 11:23:30 +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 507b5fd2b6 fix(soc/sha_struct): fix register name continue to conti
- As contnue being a reserved keyword in C, the register name
continue is not valid
2024-03-27 11:23:28 +05:30
harshal.patil e6782156c4 feat(hal/sha): add SHA peripheral support for esp32p4 2024-03-27 11:23:28 +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 80b33ed3e7 fix(soc/sha_struct): fix register name continue to conti
- As continue being a reserved keyword in C, the register name continue is not valid
2024-03-26 11:31:11 +05:30
harshal.patil 0eb52a8fbf feat(hal/aes): Add LL layer support for ESP32-P4 AES-GCM 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
Harshal Patil 03756359b2 Merge branch 'update/qemu_release_versions' into 'master'
Update QEMU release versions

See merge request espressif/esp-idf!29706
2024-03-20 14:26:07 +08:00
harshal.patil bc899d0bad ci(esp-tls): Fix test-specific leak for ESP32-P4 2024-03-13 15:22:07 +05:30
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
Harshal Patil ff3e51885a Merge branch 'fix/incorrect_parent_crypto_clk_reset' into 'master'
fix(hal/crypto): Do not reset parent crypto clk when resetting a crypto peripheral

See merge request espressif/esp-idf!29422
2024-03-08 18:28:54 +08:00
harshal.patil 2b6f12ba51 fix(hal/crypto): Do not reset parent crypto clk when resetting a crypto peripheral 2024-03-05 15:08:08 +05:30
harshal.patil 483b87750c docs(wifi_provisioning): Use heap to allocate memory for the response
Added a note to specify that the memory for the response of a custom endpoint
should be allocated using the heap, as this memory gets freed by the protocomm layer
once it has been passed to the transport layer.

Closes https://github.com/espressif/esp-idf/issues/13263
2024-03-04 16:34:27 +05:30
harshal.patil a21a16f34f ci(mbedtls/gcm): Added test to verify software fallback for non-AES cipher GCM operations 2024-02-23 10:47:30 +05:30
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
harshal.patil f4581d7103 docs(secure_boot_v2): Specify the workflow to disable revocation of unused key digests slots 2024-02-15 14:31:41 +05:30
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
harshal.patil c1ed825d3e fix(mbedtls/gcm): Fix build failure when config MBEDTLS_HARDWARE_GCM is disabled 2024-01-04 12:20:10 +05:30
harshal.patil 42943845e4 feat(bootloader_support): Encrypt only the app image instead of the whole partition
Currently, when flash encryption is enabled, the whole partition gets encrypted.
This can be optimised by encrypting only the app image instead of encrypting the whole partition.

Closes https://github.com/espressif/esp-idf/issues/12576
2023-12-18 17:10:17 +05:30
harshal.patil cb169cb02f fix(bootloader_support): Fix image_length calculation when secure boot v1 is enabled
Fixed the value of the image_length field of the image metadata populated by esp_image_verfiy()
to include the size of the signature sector when Secure Boot V1 is enabled.
2023-12-18 17:08:11 +05:30
harshal.patil fd637d5be7 feat(examples): Add BLE support in the esp_local_ctrl example 2023-12-15 11:10:26 +05:30
harshal.patil fd012bf2c4 fix(examples): Fix encoding issue in esp_local_ctrl's proto script 2023-12-15 11:10:26 +05:30
harshal.patil fe293dfd83 feat(bootloader_support): Make esp_secure_boot_verify_sbv2_signature_block() function public
Closes https://github.com/espressif/esp-idf/issues/12717
2023-12-11 18:50:55 +05:30
Harshal Patil d69ee9e133 Merge branch 'fix/aes_mpi_interrupt_allocation_workflow_for_aes_gcm' into 'master'
fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations

See merge request espressif/esp-idf!27516
2023-12-01 19:03:00 +08:00
harshal.patil 47821f6299 fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations 2023-11-30 11:59:59 +05:30
harshal.patil 5e1335aae4 fix(nvs_flash): Fix the memory leak in the nvs_flash test app
The leak is now reduced by allocating the AES interrupt and
loading the partitions in the test setup instead of in the tests itself.
2023-11-22 16:23:18 +05:30
harshal.patil 91af44d6e8 fix(soc/esp32h2): Fix llperi_rng_data field discrepancy 2023-11-16 17:49:26 +05:30
harshal.patil 798059ace1 fix(soc/esp32c6): Fix llperi_rng_data field discrepancy 2023-11-16 17:49:26 +05:30
harshal.patil d3be7bda05 fix(mbedtls): move interrupt allocation during initialization phase 2023-11-06 11:20:53 +05:30
harshal.patil 6cf9cc2c9b docs(secure_boot_v1): add missing digest byte swap information
- In the secure bootloader digest algorithm section, the final
four byte word byte-swap information was not mentioned.
2023-10-12 17:35:10 +05:30
harshal.patil 5e7672a21d docs(build): enable docs build of DS and HMAC for esp32p4 2023-10-12 17:25:12 +05:30
harshal.patil ef92f03658 feat(efuses): enable eFuse example test (secure boot) for ESP32-P4 2023-10-12 10:12:54 +05:30
harshal.patil f46a93e565 feat(secure_boot): add secure boot support for esp32p4 2023-10-12 10:12:54 +05:30
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 43864f7fb4 feat(ds): use RCC atomic block to enable/reset the DS peripheral 2023-10-11 14:59:04 +05:30
harshal.patil 18b93e9564 feat(hmac): use RCC atomic block to enable/reset the HMAC 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
harshal.patil 3483cf61aa fix(esp_hw_support/esp_ds): remove enabling redundant peripherals 2023-10-11 14:59:03 +05:30