Files
esp-idf/examples/peripherals/secure_element/atecc608_ecdsa
Aditya Patwardhan 3b71bd7326 mbedtls-3.0: Fixed ESP32 build issues
- Added MBEDLTS_PRIVATE(...) wherever necessary
- For functions like mbedtls_pk_parse_key(...), it is necessary to pass the RNG function
  pointers as parameter. Solved for dependent components: wpa_supplicant & openSSL
- For libcoap, the SSLv2 ClientHello handshake method has been deprecated, need to handle this.
  Currently, corresponding snippet has been commented.
- Examples tested: hello-world | https_request | wifi_prov_mgr

mbedtls-3.0: Fixed ESP32-C3 & ESP32-S3 build issues
- Removed MBEDTLS_DEPRECATED_REMOVED macro from sha1 port
- DS peripheral: esp_ds_rsa_sign -> removed unsused 'mode' argument
- Added MBEDTLS_PRIVATE(...) wherever required

mbedtls-3.0: Fixed ESP32-S2 build issues
- Fixed outdated function prototypes and usage in mbedlts/port/aes/esp_aes_gcm.c due to changes in GCM module

mbedtls-3.0: Fixed ESP32-H2 build issues

ci: Fixing build stage
- Added MBEDTLS_PRIVATE(...) wherever required
- Added RNG function parameter
- Updated GCM Module changes
- Updated Copyright notices

- Tests:
- build_esp_idf_tests_cmake_esp32
- build_esp_idf_tests_cmake_esp32s2
- build_esp_idf_tests_cmake_esp32c3
- build_esp_idf_tests_cmake_esp32s3

ci: Fixing build stage (mbedtls-related changes)
- Added MBEDTLS_PRIVATE(...) wherever required
- Updated SHAXXX functions
- Updated esp_config according to mbedtls changes

- Tests:
- build_examples_cmake_esp32
- build_examples_cmake_esp32s2
- build_examples_cmake_esp32c3
- build_examples_cmake_esp32s3

ci: Fixing build stage (example-related changes)
- Added MBEDTLS_PRIVATE(...) wherever required
- Updated SHAXXX functions
- Updated esp_config according to mbedtls changes

- Tests:
- build_examples_cmake_esp32
- build_examples_cmake_esp32s2
- build_examples_cmake_esp32c3
- build_examples_cmake_esp32s3

ci: Fixing target_test stage
- Updated test SSL version to TLS_v1_2

- Tests:
- example_test_protocols 1/2

ci: Fixing build stage
- Added checks for MBEDTLS_DHM_C (disabled by default)
- Updated esp_cryptoauthlib submodule
- Updated factory partition size for legacy BLE provisioning example

- Tests:
- build_examples_cmake_esp32
- build_examples_cmake_esp32s2
- build_examples_cmake_esp32c3
- build_examples_cmake_esp32s3

Co-authored-by: Laukik Hase <laukik.hase@espressif.com>
2022-03-03 01:37:10 +05:30
..

Supported Targets ESP32

ECDSA sign/verify Example with ESP32-WROOM-32SE

Description

(See the README.md file in the upper level 'examples' directory for more information about examples.)

This example requires ESP32-WROOM-32SE which has Microchip's ATECC608A (Secure Element) integrated on the module.

The example performs ECDSA sign/verify functions on sample data using hardware private key stored in ATECC608A chip. If you want to use bare ATECC608A chip (Secure Element) with ESP32-WROOM-32 module by making external connections, please refer this for details.

How to use example

Before project configuration and build, be sure to set the correct chip target using idf.py set-target <chip_name>.

Hardware Required

To get started you will need a ESP32-WROOM-32SE development board which integrates Microchip’s ATECC608A CryptoAuth chip in the module.

  • A development board with ESP32-WROOM-32SE SoC or an custom board with the ATECC608A IC.
  • A USB cable for Power supply and programming

Configure the project

ATECC608A chip on ESP32-WROOM-32SE should be configured to run the example, for details on configuration of ATECC608A chip, please refer esp_cryptoauth_utility

Open the project configuration menu (idf.py menuconfig).

In the Component config -> esp-cryptoauthlib menu:

  • Use Choose the type of ATECC608A chip to set the Crypto IC type [1].
  • Use Enable Hardware ECDSA keys for mbedTLS Enable Hardware ECDSA.
    • Set Enable ATECC608A sign operations in mbedTLS to use Hardware ECDSA sign.
    • Set Enable ATECC608A verify operations in mbedTLS to use Hardware ECDSA verify.
  • Set I2C SDA pin used to communicate with the ATECC608A.
  • Set I2C SCL pin used to communicate with the ATECC608A.

[1]: for more details refer Find ATECC608A chip type.

Build and Flash

Build the project and flash it to the board, then run the monitor tool to view the serial output:

Run idf.py -p PORT flash monitor to build, flash and monitor the project.

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects.

Troubleshooting

For any technical queries, please open an issue on GitHub. We will get back to you soon.