Commit graph

235 commits

Author SHA1 Message Date
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
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
Angus Gratton 62426a6c90 Merge branch 'refactor/use_new_component_registration_functions' into 'master'
CMake: Use new component registration function

See merge request espressif/esp-idf!8068
2020-03-25 08:02:42 +08:00
Marius Vikhammer 32fd9d6c63 s2 crypto: update perf test to use cache comp timer
Updated S2 hardware accelerated crypto to use the cache compensated timer.

Re-enabled RSA performance test and set lower targets now that results are more stable

Closes: IDF-1174
2020-03-23 11:30:55 +08:00
Renz Bagaporo 3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Ivan Grokhotkov 6330b3345e Merge branch 'bugfix/disable_rsa_perf_test' into 'master'
rsa: ignore performance test in CI

See merge request espressif/esp-idf!8026
2020-03-20 15:09:15 +08:00
Marius Vikhammer 2f5e4601ef rsa: ignore performance test in CI
Even with a static key the performance vary a lot between different builds.
2020-03-19 14:16:39 +08:00
Marius Vikhammer ffb9010cbe aes: Fixed tag sometime being wrong for HW GCM
The GCM hardware accelerated algorithm for S2 would sometimes output
the wrong tag.

Added additional tests for AES and GCM

Re-enable HW GCM as default option
2020-03-18 08:44:38 +08:00
Angus Gratton 9c430a17aa Merge branch 'feature/mpi_accel_s2' into 'master'
MPI/RSA accelerator bringup for S2 and bignum refactor

Closes IDF-803 and IDF-1174

See merge request espressif/esp-idf!7915
2020-03-17 13:16:05 +08:00
Marius Vikhammer 7e824508a9 mpi: refactor bignum into common and hw specific components
Closes IDF-1174
2020-03-16 19:44:30 +08:00
Marius Vikhammer 16b6a7a903 s2 sha hw: Fix bug where alloc would fail if input were of len 0 2020-03-16 19:29:59 +08:00
Marius Vikhammer e21bef3f28 mpi: active hw accel for S2
Actives MPI/RSA hardware acceleratio for ESP32 S2.

Closes IDF-803
2020-03-13 18:33:18 +08:00
Ivan Grokhotkov 64ceab0069 Merge branch 'feature/aes_sha_accel_s2' into 'master'
crypto: SHA and AES accelerator bring up for S2

Closes IDF-1443, IDF-714, and IDF-716

See merge request espressif/esp-idf!7825
2020-03-13 18:21:09 +08:00
Mahavir Jain 453b65a608 Merge branch 'feature/upgrade_mbedtls_to_v2.16.4' into 'master'
mbedtls: upgrade to release v2.16.5

Closes IDFGH-2638

See merge request espressif/esp-idf!7607
2020-03-12 18:08:33 +08:00
Marius Vikhammer 3351376a11 AES: optimize AES-GCM
HW acceleration for GCM is now enabled by default

Closes IDF-1443
2020-03-12 10:20:24 +08:00
Aditya Patwardhan 874e987a3b esp_tls: change argument pointer type to (void *) for esp_crt_bundle_attach 2020-03-11 15:54:05 +05:30
Marius Vikhammer 37369a8a57 crypto: SHA and AES accelerator bring up for S2
Brings up, fixes and enables AES and SHA hardware acceleration.

Closes IDF-714
Closes IDF-716
2020-03-11 15:09:45 +08:00
Mahavir Jain 02d2903e39 mbedtls: upgrade to release v2.16.5
For detailed release notes please refer to:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.5-and-2.7.14-released

Closes: IDFGH-2638
Closes: https://github.com/espressif/esp-idf/issues/4716
2020-03-11 05:17:33 +00:00
Angus Gratton f393938c22 Merge branch 'bugfix/remove_esp32s2_esp_intr_header' into 'master'
esp32s2: remove esp_intr.h header

See merge request espressif/esp-idf!7883
2020-03-06 14:30:28 +08:00
Renz Bagaporo 71c02394e5 esp32s2: remove esp_intr.h header 2020-03-05 16:15:59 +08:00
Marius Vikhammer 947e3e94ed Add ESP certificate bundle feature
Adds the ESP certificate bundle feature that enables users to bundle a
root certificate bundle together with their application.

Default bundle includes all Mozilla root certificates

Closes IDF-296
2020-03-04 10:51:43 +08:00
Sachin Parekh 301dacfb33 Exception handlers for LoadStoreError and LoadStoreAlignmentError
Configurable option to use IRAM as byte accessible memory (in single core mode) using
load-store (non-word aligned and non-word size IRAM access specific) exception handlers.
This allows to use IRAM for use-cases where certain performance penalty
(upto 170 cpu cycles per load or store operation) is acceptable. Additional configuration
option has been provided to redirect mbedTLS specific in-out content length buffers to
IRAM (in single core mode), allows to save 20KB per TLS connection.
2020-02-26 20:21:59 +08:00
michael 2529eda907 ci: disable failed cases for s2 temporarily 2020-02-15 18:28:25 +08:00
Ivan Grokhotkov 6e527fb763 mbedtls: temporary disable HW crypto for ESP32S2
To be re-enabled once HW crypto accelerators support is merged:
IDF-714, IDF-716, IDF-803.
2020-01-23 18:14:10 +01:00
morris e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
morris 2422c52851 global: hello world on real esp32-s2 2020-01-16 17:43:59 +08:00
morris 1c2cc5430e global: bring up esp32s2(not beta) 2020-01-16 17:41:31 +08:00