Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Software-only support for recent esp32 targets #6256
base: master
Are you sure you want to change the base?
Software-only support for recent esp32 targets #6256
Changes from 6 commits
1af5ea5
a45684c
09de0c0
73edfc9
2af15f0
80b1b82
969ee0b
fabb44f
e1c042b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I agree that the ambiguous
WOLFSSL_ESPWROOM32
should be refined, it is probably not a good idea to remove it at this time. See wolfssl/wolfcrypt/settings.h. Let's leave HW acceleration enabled by default for the classic ESP32 and disable for architectures that don't support it at this time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll look into adding some #ifdefs to enable it on the appropriate targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please help me clarify a few things here if I read the code correctly:
WOLFSSL_ESPWROOM32
has nothing to do with the WROOM module, it's the internal crypto accelerator of the ESP32 chip. and should essentially beCONFIG_IDF_TARGET_ESP32
. The other targets have different crypto accelerators.WOLFSSL_ESPWROOM32SE
enables the same features asWOLFSSL_ESPWROOM32
and adds the WOLFSSL_ATECC508A #define (although the code has 608A define, too).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you understand correctly. Unfortunately that's true, and not very intuitive, I know. That was created when there was only the ESP32WROOM chip. At some point that needs to be cleaned up.
I agree the
WOLFSSL_ESPWROOM32
andWOLFSSL_ESPWROOM32SE
should probably be completely removed and replaced with something more appropriate.The ESP32-S3 on the Xtensa architecture has very similar crypto accelerators. As you noted: the RISC-V chipsets are very different. I have a WIP for some HW acceleration on the -C3 and -C6.
Oh, and yes: the
SE
uses the ATECC508A. I'm not certain if it is 100% compatible with the ATECC608A.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the datasheet, the SE has a 608A. Do you maybe have the hardware to test if changing the define to 608 still works?
Otherwise how about this:
WROOM32
from the following macros, they all refer to the internal crypto in the ESP32:NO_ESP32WROOM32_CRYPT
WOLFSSL_ESP32WROOM32_CRYPT
NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI
NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH
NO_WOLFSSL_ESP32WROOM32_CRYPT_AES
WOLFSSL_ESP32WROOM32_CRYPT_DEBUG
WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW
WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI
WOLFSSL_ESPWROOM32
withCONFIG_IDF_TARGET_ESP32
. It is only used in settings.h/user_settings.h to set other macros. HW crypto can still be disabled from user_settings.h with the NO_ macros.WOLFSSL_ESPWROOM32SE
as is (maybe change 508A to 608A) to enable the Atmel chip from user_settings.h, by default disabled.WOLFSSL_ESP32_XTENSA_CRYPT
based onCONFIG_IDF_TARGET
in settings.h for both to mark the shared code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake on the SE, I thought it was the '608A. I don't have either one to test.
I agree on others: I like the idea of removing
WROOM32
. Good to keepWOLFSSL_ESPWROOM32SE
as it is a very specific chipset. At some point, I'd like to have 508A/608A support on other chipsets that may have a manually added device.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, PTAL.