Commit Graph

260 Commits

Author SHA1 Message Date
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
Marius Vikhammer
71ab83cdfb aes: increase timeout for "mbedtls AES performance" test
Timeout increased to 60 sec from default 30 sec.

Test would occasionally timeout on S2 due to cache misses.
2020-04-10 15:49:40 +08:00
Marius Vikhammer
a2a204c2b9 crypto: DS uses RSA peripheral, added shared lock 2020-04-09 11:11:04 +00:00
Ivan Grokhotkov
8bf18d868a Merge branch 'bugfix/crt_bundle_mem_leak' into 'master'
cert bundle: Fix memory leak during cert verification

Closes IDFGH-2950

See merge request espressif/esp-idf!8117
2020-04-09 05:41:41 +08:00
Angus Gratton
2bdf22b25d Merge branch 'bugfix/sha_alloc_fallback' into 'master'
sha: add fallback for when memory alloc fails

See merge request espressif/esp-idf!8177
2020-04-08 14:15:52 +08:00
Marius Vikhammer
832599718d cert bundle: add server_root.pem incase bundle needs to be regenerated 2020-04-07 18:51:26 +08:00
Marius Vikhammer
9ccc5e6d84 cert bundle: Fix memory leak during cert verification
Also refactors the unit tests and fixes the test case, as it was giving false positives.

Closes IDFGH-2950

Closes https://github.com/espressif/esp-idf/issues/4983
2020-04-07 18:50:30 +08:00
Marius Vikhammer
1863a8ce82 sha: add fallback for when memory alloc fails 2020-04-01 02:07:44 +00:00
Marius Vikhammer
d1d91ec3dd crypto tests: fix mallocs that were missing MALLOC_CAP_8BIT
Tests had the potential to fail they got non byte-accessible memory allocated.
2020-03-30 10:40:59 +07:00
Marius Vikhammer
32f16e8c30 crypto tests: fix mallocs that were missing MALLOC_CAP_8BIT
Tests had the potential to fail they got non byte-accessible memory allocated.
2020-03-30 11:12:20 +08:00
Jeroen Domburg
419848549e Add fixes for gcc8 psram fix improvement 2020-03-27 20:04:47 +07:00
Jakob Hasse
ea47bbb118 HMAC: adding upstream message support 2020-03-26 19:00:27 +08:00