Is it possible to use mutex on secure_element atecc608_ecdsa code?

Ismael
Posts: 20
Joined: Thu Mar 05, 2020 7:35 am

Is it possible to use mutex on secure_element atecc608_ecdsa code?

Postby Ismael » Tue May 25, 2021 10:59 am

Hello,
I want to know is is there any possibility to add a mutex usage to this component.
The reason I want to do this is because on my board development I2C is shared with an ATECC608, an GPIO expansion board with an RTC timer. This components are implemented using UncleRus/esp-idf-lib (https://github.com/UncleRus/esp-idf-lib) components.

Is I2C library protected itself to avoid multiple access? or has secure element any mechanism to use same mutex created for esp-idf-lib?

Thanks.

AngelVer
Posts: 4
Joined: Thu Mar 12, 2020 10:54 am

Re: Is it possible to use mutex on secure_element atecc608_ecdsa code?

Postby AngelVer » Mon Jul 05, 2021 11:17 am

The only way we found to do that in my company is modifying the sdk. Will be awesome if espressif include the mutex to the ATECC608 usage on i2c bus. Is not a hard task.

Ismael
Posts: 20
Joined: Thu Mar 05, 2020 7:35 am

Re: Is it possible to use mutex on secure_element atecc608_ecdsa code?

Postby Ismael » Tue Jul 06, 2021 7:29 am

Hello AngelVer,
Did you add this functionality directly to hal_esp32_i2c.c file? (esp-cryptoauthlib/cryptoauthlib/third_party/hal/esp32/hal_esp32_i2c.c)

Making some search into the cryptoauthlib files I found that there is a implementation to use mutex over esp32 (defined in esp-cryptoauthlib/cryptoauthlib/lib/hal/hal_freertos.c). This implementation is only used on function "pkcs11_os_lock_mutex" (esp-cryptoauthlib/cryptoauthlib/lib/pkcs11/pkcs11_os.c).

Who is online

Users browsing this forum: No registered users and 393 guests