Commit graph

226 commits

Author SHA1 Message Date
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
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
David Cermak 2efb3288a0 mbedtls: fix hw accelerated big-num mul if operand and result overlap
this issue is mainly exposed when using larger (4096) client key in TLS mutual auth,
since it uses multiplications > 2048 when mbedtls_mpi_mul_mpi is used in recursion,
which works only if both operands point to different location than result since
mpi_mult_mpi_overlong() called mbedtls_mpi_grow() to reallocate buffers used in previous
pointer arithmetics and thus corrupting it. Fixed by growing the mpi buffer before
calling mpi_mult_mpi_overlong()
2020-01-09 18:11:18 +00:00
David Cermak b0a714476a mbedtls: added mpi multiplication test for large numbers 2020-01-09 18:11:18 +00:00
David Cermak 1acf4d46ef mbedtls: bugnum test for rsa operations with blinding 2020-01-09 18:11:18 +00:00
Angus Gratton 65dad0d46f build system: Remove some dependencies from esp32 & esp32s2beta
Possible now that wifi related source files are all in esp_wifi
2020-01-08 18:13:12 +11:00
michael 4220752aed ut: Move tests back from "esp32" subfolder
DISABLED_FOR_TARGETS macros are used

Partly revert "ci: disable unavailable tests for esp32s2beta"

This partly reverts commit 76a3a5fb48.

Partly revert "ci: disable UTs for esp32s2beta without runners"

This partly reverts commit eb158e9a22.

Partly revert "fix unit test and examples for s2beta"

This partly reverts commit 9baa7826be.

Partly revert "efuse: Add support for esp32s2beta"

This partly reverts commit db84ba868c.
2020-01-06 17:13:53 +08:00
Marius Vikhammer c63684cf6c hw crypto: activated hardware acceleration for esp32s2beta
Activated AES, RSA and SHA hardware acceleration for esp32s2 and enabled related unit tests.

Updated with changes made for ESP32 from 0a04034, 961f59f and caea288.

Added performance targets for esp32s2beta

Closes IDF-757
2019-12-12 12:37:29 +08:00
Ryan Kurte 4ee78f8496 added KConfig option to allow loading CA certs with unsupported extensions
Close https://github.com/espressif/esp-idf/pull/4445
2019-12-10 08:47:26 +05:30
Shubham Kulkarni c741dd0535 Fixed warnings for components driver, esp32 and mbedtls 2019-11-15 08:51:16 +00:00
Angus Gratton 6f761dd62d cmake: Fix some uninitialized variable warnings 2019-11-08 12:50:28 +08:00