Skip to content
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

sha256 hash hardware acceleration? #6819

Closed
1 task done
torntrousers opened this issue May 29, 2022 · 3 comments
Closed
1 task done

sha256 hash hardware acceleration? #6819

torntrousers opened this issue May 29, 2022 · 3 comments
Labels
Area: Performance Issue related to performance problems and improvements Type: Question Only question

Comments

@torntrousers
Copy link
Contributor

torntrousers commented May 29, 2022

Board

M5Stack EduKit

Device Description

.

Hardware Configuration

.

Version

v2.0.3

IDE Name

platformio

Operating System

Windows

Flash frequency

40MHz

PSRAM enabled

yes

Upload speed

115200

Description

I happened to be doing some testing of different sha256 impls and found that in my test mbedtls sha256 with esp32/arduino v2.0.3 was slower than v2.0.2, taking about 80 microseconds compared to 43 microseconds on v2.0.2, so nearly twice as slow.

I remember seeing this issue that I think is saying from 2.0.3 mbedtls will use the ESP32 hardware acceleration for things like mbedtls sha256 hashes.

Its not a big deal I'm just curious - shouldn't v2.0.3 be faster at this if its using hardware acceleration now?

I do have a testcase to show this if interested but would have to do some work to pullout just this sha256 test into a standalone project.

Sketch

.

Debug Message

.

Other Steps to Reproduce

.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@torntrousers torntrousers added the Status: Awaiting triage Issue is waiting for triage label May 29, 2022
@VojtechBartoska VojtechBartoska added Area: Performance Issue related to performance problems and improvements Status: Needs investigation We need to do some research before taking next steps on this issue and removed Status: Awaiting triage Issue is waiting for triage labels May 30, 2022
@VojtechBartoska
Copy link
Collaborator

@me-no-dev PTAL, thanks!

@me-no-dev
Copy link
Member

@torntrousers actually it's slower in hardware, because the clock speed of the hardware is 80MHz and the CPU at 240MHz can calculate a bit faster. If the CPU was also at 80MHz, then hardware would have been twice faster or so...

@torntrousers
Copy link
Contributor Author

I see, interesting. thanks.

@VojtechBartoska VojtechBartoska added Type: Question Only question and removed Status: Needs investigation We need to do some research before taking next steps on this issue labels May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance Issue related to performance problems and improvements Type: Question Only question
Projects
None yet
Development

No branches or pull requests

3 participants