Marius Vikhammer
457ce080ae
AES: refactor and add HAL layer
...
Refactor the AES driver and add HAL, LL and caps.
Add better support for running AES-GCM fully in hardware.
2020-12-10 09:04:47 +00:00
Marius Vikhammer
7e0f362149
esp_crt_bundle: add additional unit tests
...
Add unit test for:
* Trusted certificate with weak hash algorithm signature
* Certificate with wrong signature
Merges https://github.com/espressif/esp-idf/pull/6117
2020-12-08 10:11:31 +08:00
Jeff Epler
a79cb9f8cd
esp_crt_bundle: Allow verify_callback to correct BADCERT_BAD_MD
2020-12-03 14:53:53 +08:00
Angus Gratton
5228d9f9ce
esp32c3: Apply one-liner/small changes for ESP32-C3
2020-12-01 10:58:50 +11:00
Angus Gratton
d6bdd1cb32
Merge branch 'bugfix/small_cleanups' into 'master'
...
Small cleanups
See merge request espressif/esp-idf!11141
2020-11-23 17:23:53 +08:00
Dong Heng
1c9592efc4
fix(mbedtls): fix mbedtls dynamic resource memory leaks and RSA cert drop earlier
...
RX process caches the session information in "ssl->in_ctr" not in "ssl->in_buf".
So when freeing the SSL, can't free the "ssl->in_ctr", because the "ssl->in_buf"
is empty.
Make the RX process like TX process, and cache the session information in
"ssl->in_buf", so that the cache buffer can be freed when freeing the SSL.
Closes https://github.com/espressif/esp-idf/issues/6104
2020-11-19 07:31:50 +00:00
Marius Vikhammer
09e1d104ba
SHA: fix dma lldesc going out of scope issue
...
DMA process didnt wait for idle before returning.
This meant that there was a potential for the dma
descriptors which were on the stack to be reclaimed
before the DMA operation finished.
2020-11-18 06:04:31 +00:00
Angus Gratton
b798158b4c
mbedtls: Avoid malloc in esp_sha() function
2020-11-17 22:51:32 +00:00
Angus Gratton
a4fb6c0173
mbedtls: Add missing sha_caps includes
2020-11-17 22:51:07 +00:00
Marius Vikhammer
488f46acf5
SHA/RSA: moved all caps to soc_caps.h
2020-11-12 02:15:46 +00:00
Angus Gratton
66fb5a29bb
Whitespace: Automated whitespace fixes (large commit)
...
Apply the pre-commit hook whitespace fixes to all files in the repo.
(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Konstantin Kondrashov
9386cafbc3
time: Fix gettimeofday for ESP32-S3
2020-10-20 14:09:32 +08:00
Marius Vikhammer
949fb8e63a
SHA: add HAL layer and refactor driver
...
Add a LL and HAL layer for SHA.
2020-10-09 08:24:08 +00:00
David Čermák
28d2b7a9b3
Merge branch 'bugfix/esp_netif_non_lwip' into 'master'
...
esp-netif: Enable use of the ESP-IDF with a non-LWIP (and non-BSD-style) IP stack.
Closes IDFGH-3971
See merge request espressif/esp-idf!10472
2020-10-05 16:16:11 +08:00
Angus Gratton
1eefe6494c
Merge branch 'feature/rsa_caps' into 'master'
...
RSA: add max RSA bit len as a soc caps
See merge request espressif/esp-idf!10594
2020-10-05 12:56:28 +08:00
Aditya Patwardhan
db3cbf91f9
mbedtls: Fixed target library linking when using the DS peripheral
2020-09-28 12:58:54 +05:30
Renz Bagaporo
6462f9bfe1
esp32, esp32s2: create esp_pm component
2020-09-25 05:24:10 +00:00
Marius Vikhammer
3c14900a95
RSA: add max RSA bit len as a soc caps
2020-09-24 16:52:50 +08:00
Mahavir Jain
4a3b5b73a8
Merge branch 'feature/esp_ds_sw_support' into 'master'
...
Added support for RSA sign using DS peripheral (only for ESP32-S2)
Closes IDF-1626
See merge request espressif/esp-idf!9477
2020-09-23 20:39:04 +08:00
Aditya Patwardhan
47f7c6a991
esp32s2/esp_ds: Digital Signature software support
...
1)Added support for alt rsa sign implementation with DS peripheral (
through ESP-TLS - mbedTLS SSL/TLS stack)
2020-09-22 18:31:31 +05:30
Marius Vikhammer
bff0016eb8
crypto accelerator support on esp32s3
...
SHA: passing unit tests
RSA: pass tests
AES: tests passing
2020-09-22 15:15:03 +08:00
morris
61f89b97c6
bringup esp32-s3 on FPGA
2020-09-22 15:15:03 +08:00
cnlohr
507c08251e
esp_netif: Enable use of the ESP-IDF with a non-LWIP (and non-BSD-style) IP stack.
...
Note: besides the esp-netif component, this commit also disables
net_sockets.c from mbedtls, which is one of the base components and uses BSD API (not specifically lwIP). This might be refactored to use CONFIG_SUPPORT_BSD_API instead of CONFIG_ESP_NETIF_TCPIP_LWIP
in the future.
It also disables smartconfig_ack.c and wifi_init.c from esp_wifi
component for referencing some lwIP config options (smartconfig_ack.c changes might be also
updated to check CONFIG_SUPPORT_BSD_API)
Merges https://github.com/espressif/esp-idf/pull/5856
2020-09-18 15:10:55 +02:00
Jakob Hasse
20c068ef3b
cmock: added cmock as component
...
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Michal Vácha
e4820fc447
Fixed TLS 1.1 still being enables even if disabled via config.
...
Fixed MBEDTLS_SSL_PROTO_TLS1_1 still being defined even ifCONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not
Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
Merges https://github.com/espressif/esp-idf/pull/5675
2020-08-05 03:38:51 +00:00
Angus Gratton
75402afcae
Merge branch 'feature/esp32s3_clk_memory_layout' into 'master'
...
esp32s3: memory layout
See merge request espressif/esp-idf!9753
2020-07-29 13:48:25 +08:00
morris
2917651478
esp_rom: extract common ets apis into esp_rom_sys.h
2020-07-27 15:27:01 +08:00
morris
19761e3113
esp32s3: clk, memory layout
2020-07-27 13:05:22 +08:00
Angus Gratton
a62689a351
Merge branch 'bugfix/mbedtls_mpi_exp_mod' into 'master'
...
mbedtls: Fix a case for mpi_montgomery_exp_calc() when Z is not init
Closes IDF-1870
See merge request espressif/esp-idf!9496
2020-07-24 00:02:13 +08:00
Mahavir Jain
603e0883a1
mbedtls: update to mbedtls release v2.16.7
...
For detailed release notes, please refer to:
https://github.com/ARMmbed/mbedtls/releases/tag/mbedtls-2.16.7
2020-07-20 15:50:20 +05:30
KonstantinKondrashov
11844a54f4
mbedtls: Fix a case for mpi_montgomery_exp_calc() when Z is not init
...
Closes: IDF-1870
2020-07-13 22:46:05 +08:00
Angus Gratton
22d9ff5b05
Merge branch 'feature/block_sha_fallback' into 'master'
...
esp32s2 SHA: fallback to hashing block by block for non DMA memory
Closes IDF-1529
See merge request espressif/esp-idf!8293
2020-06-25 09:30:39 +08:00
Marius Vikhammer
b75edc84e3
esp32s2 SHA: fallback to hashing block by block for non DMA memory
...
Also adds unit test for SHA with input buffer in flash
Closes IDF-1529
2020-06-10 15:09:20 +08:00
Marius Vikhammer
c343323863
Fixes issues with gen_crt_bundle.py for unicode chars
...
gen_crt_bundle.py could fail to parse the certificates if it contained a non-ascii character.
2020-06-08 18:27:03 +08:00
Angus Gratton
33bfe2393a
Merge branch 'bugfix/wpa_supplicant_no_hw_mpi' into 'master'
...
wpa_supplicant: Allow building with mbedTLS integration but no hardware MPI
Closes IDFGH-3344
See merge request espressif/esp-idf!8822
2020-06-01 14:48:06 +08:00
Angus Gratton
59f29cbca8
Merge branch 'feature/allow_rtc_memory_for_task_stacks' into 'master'
...
Add RTC Fast Memory to Dynamic Memory Pool
See merge request espressif/esp-idf!8390
2020-05-29 14:07:01 +08:00
Angus Gratton
94f5129bf8
mbedtls: Don't compile hardware MPI & SHA files if disabled in config
...
Fixes bug where hardware accelerated mbedtls_mpi API was always used, even when
disabled in config.
2020-05-26 03:37:46 +00:00
Ivan Grokhotkov
a2d7e8cbba
Merge branch 'bugfix/crt_bundle_no_config_file' into 'master'
...
esp_crt_bundle: fixes the "No CA Chain is set" error
See merge request espressif/esp-idf!8851
2020-05-22 09:34:32 +08:00
Aditya Patwardhan
423e600d46
secure_element: atecc608_ecdsa example
...
* Replaced crypotoauthlib with esp-cryptoauthlib
* Added menuconfig option for esp-tls about using HSM
* Added error codes for HSM in esp-tls,
* Added support to select different type of ATECC608A chips
* Added README, updated docs
* tcp_transport: Added option to enable secure_element for ssl
Closes https://github.com/espressif/esp-idf/issues/4432
2020-05-21 13:08:30 +05:30
Marius Vikhammer
f72d259622
esp_crt_bundle: fixes the "No CA Chain is set" error
...
When compiling esp_crt_bundle.c, it would end up with a different struct layout due
to configuration options from "mbedtls/esp_config.h" not being considered.
This lead to ca_chain potentially not being set correctly.
2020-05-21 15:19:49 +08:00
Bryan Hunt
4553f6c95d
Add cryptoauthlib as a component with mbedtls integration
...
* Add options to mbedtls for hardware acceleration
* Disable mbedtls EC curves if hardware acceleration is selected
since the hardware will have to define the curves supported
* Add a hardware ecdsa example
2020-05-20 22:52:37 +05:30
Angus Gratton
0927ec029e
wpa_supplicant: Allow building with mbedTLS integration but no hardware MPI
...
Also disable the relevant function in bignum.h based on config, so fails at
compile not link time.
Closes https://github.com/espressif/esp-idf/issues/5321
2020-05-20 12:06:07 +10:00
Mahavir Jain
be3b6b7cb8
Merge branch 'feature/mbedtls_dynamic_memory' into 'master'
...
feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost
See merge request espressif/esp-idf!8313
2020-05-18 13:55:05 +08:00
Shubham Kulkarni
ca3daa50de
mbedtls: Add configuration options
2020-05-15 11:27:44 +05:30
Mahavir Jain
0d208aabab
mbedtls: esp32s2: check and reallocate output buffer if its from non-DMA range
...
Earlier check was for only input buffer but it is quite likely to have
output buffer also from non-DMA memory range and hence requirement to
reallocate and then copy data from AES engine.
2020-05-14 13:12:26 +00:00
Dong Heng
3d57bf30a2
feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost
2020-05-14 11:45:09 +00:00
Piyush Shah
43b3def711
mbedtls_hkdf: Add a config option to enable HKDF
2020-05-11 11:49:14 +05:30
Piyush Shah
62e1d6712b
mbedtls: Add config options for chacha20, poly1305 and chachapoly
2020-05-05 16:41:31 +00:00
Angus Gratton
433c1c9ee1
Merge branch 'bugfix/ds_mpi_lock' into 'master'
...
crypto: DS uses RSA peripheral, added shared lock
See merge request espressif/esp-idf!8274
2020-04-15 15:15:25 +08:00
kangping
4883010f40
mbedtls: add configuration options for EC-JPAKE
...
Closes https://github.com/espressif/esp-idf/pull/5106
2020-04-14 12:22:16 +00:00