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

New wolfcrypt Hardware Acceleration SHA Copy Tests #6134

Closed
wants to merge 2 commits into from

Conversation

gojimmypi
Copy link
Contributor

Description

As noted in #5989, there are some wolfcrypt tests that are missing. These are tests that in a software-only solution, would likely be not very interesting. However - given the common single current use of hardware acceleration, these new tests ensure the hardware state of a given SHA ctx is properly handled when copied. In particular, if the ctx is copied, and then processed, does it interfere with current hardware calculations in progress? It should not.

Note making the attached change will result in failure the ESP32 tests to fail unless #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH is defined, turning off HW and using only wolfcrypt software.

My next version of the hardware acceleration in my ED25519_SHA2_fix branch has a much more robust implementation that handles the copy gracefully. I prefer to have the tests in place prior to that PR to better illustrate before & after results.

I'd like to get some feedback before I go and implement this for all of the tests. For now this is a draft PR.

There's a slight chance that other hardware acceleration implementations might fail.

See also #5948

Fixes zd# n/a

Testing

Use wolfcrypt/test for both software-only, and hardware-accelerated SHA calculations.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@dgarske dgarske removed their assignment Feb 27, 2023
@gojimmypi
Copy link
Contributor Author

I'm closing this lingering PR. I'd still like to do this at some point.

I've added this to my Mothball section in #6234

@gojimmypi gojimmypi closed this Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants