Skip to content

Add feature to choose Ecc, Micro-ecc or Cryptoauthlib to manage ecc #1

Draft
LizzieDE110 wants to merge 22 commits intomainfrom
micro-ecc
Draft

Add feature to choose Ecc, Micro-ecc or Cryptoauthlib to manage ecc #1
LizzieDE110 wants to merge 22 commits intomainfrom
micro-ecc

Conversation

@LizzieDE110
Copy link
Owner

I had noticed that the handshake was very slow on a SAMR21-xpro board, and I discovered that it was because ECC management (key generation, signature, and verification) was very slow.

I am working with RIOT (which supports Micro-ecc), so I created a small program to compare execution times between the current ECC API and Micro-ecc. Here are my results:

Example using ECC from tinydtls/ecc:

2024-02-08 11:34:16,670 # DTLS sock example to generate key and see if it takes a long time
2024-02-08 11:34:23,755 # Keys generated
2024-02-08 11:34:30,593 # Signature created

Similar example using Micro-ecc:

2024-02-08 11:32:39,924 # ECDSA key generation example
2024-02-08 11:32:40,336 # Keys generated
2024-02-08 11:32:40,773 # Signature created

So Micro-ecc is much faster than the current ECC API and I decided to add the feature of tinydtls to use Micro-ecc (and thus accelerate the handshake).

Additionally, on another board, I have a secure element (ATECC608A) which is even faster than Micro-ecc and adds a very secure environment to work with private keys and secrets, so I decided to integrate it as well.

For now, I know that I have to add documentation. Examples using Micro-ecc and Cryptoauthlib require that those libraries are installed on your development environment before compiling.

@LizzieDE110 LizzieDE110 marked this pull request as draft March 1, 2024 09:53
@LizzieDE110
Copy link
Owner Author

Todo :

  • add function to set slots to use for ECC and ECDH
  • May be also add feature to store peer keys into ATECC?

@LizzieDE110 LizzieDE110 marked this pull request as ready for review March 1, 2024 15:27
@LizzieDE110 LizzieDE110 marked this pull request as draft March 1, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant