-
Notifications
You must be signed in to change notification settings - Fork 3k
F756/F439: add mbedtls md5 hash feature #4695
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
Conversation
The macro |
targets/targets.json
Outdated
@@ -1066,6 +1066,7 @@ | |||
"inherits": ["FAMILY_STM32"], | |||
"core": "Cortex-M7F", | |||
"extra_labels_add": ["STM32F7", "STM32F756", "STM32F756xG", "STM32F756ZG"], | |||
"macros_add": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBEDTLS_MD5_C", "MBEDTLS_CONFIG_HW_SUPPORT"], |
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.
Hi, This should be :
"macros_add": ["USBHOST_OTHER","MBEDTLS_CONFIG_HW_SUPPORT"],
The MBEDTLS_MD5_C should be added in the mbed_app.json if needed.
Cheers
@@ -26,4 +26,7 @@ | |||
|
|||
#define MBEDTLS_SHA1_ALT | |||
|
|||
#define MBEDTLS_MD5_ALT | |||
|
|||
#define MBEDTLS_MD5_C |
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.
You should remove this define MBEDTLS_MD5_C
.
Thank you @0xc0170 |
@adustm I pushed a fix, should be fine now |
LGTM |
@yanesca Could you review? |
#ifndef MBEDTLS_DEVICE_H | ||
#define MBEDTLS_DEVICE_H | ||
|
||
#define MBEDTLS_AES_ALT |
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.
The PR title suggests that it adds MD5 support for F439ZI. This file adds both AES and MD5 support for F756ZG. Is this intentional?
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.
@adustm Please can you comment?
@adustm Could you comment on this? |
@adustm @LMESTM @jeromecoutant @bcostm Can anyone commment on this? |
rebased to resolve conflict
should I remove MBEDTLS_AES_ALT ? |
Hello Martin, This will avoid us to create another PR for F756ZG later on. MBEDTLS_AES_ALT for F756ZG is already present in the master branch. It should not be removed by your PR. Kind regards Armelle |
Thanks @adustm . I renamed the PR. I noticed after reading your reply, that the rebase did not end up with the correct result. features/mbedtls/targets/TARGET_STM/TARGET_STM32F7/TARGST_NUCLEO_F756ZG/mbedtls_device.h (this path is not correct), I'll try to correct the rebase again and fix it |
b645fcb
to
f6f787e
Compare
@adustm Rebased, please review (if possible to test?) |
Hi, I'll try to spend time on it tomorrow. cheers |
Hi Martin, the MD5 test is failing in the master branch, but is still ok in the former workshop branch. I'm trying to figure out why. Cheers |
Hello @0xc0170 It means that MD5 can work in standalone as it is today, but not if some SHA256 has been formerly enabled.
Or I wait for your PR to be merged, and I create a PR to fix that in md5 / SHA1 and SHA256 alt files (the 3 of them have the same problem). What do you prefer ?
Kind regards |
@adustm Fixed as proposed (check the last commit, 3 files were updated), rebased again. |
Thanks @0xc0170
(as stated above, I use a more complete version of the mbedtls-selftest to check all these) |
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
+ remove unused includes files
The hw block for mbedtls is shared, thus HASH algo value should be cleared in the init.
@adustm There was a change in mbedtls config for F7 nucleo again, I had to rebase, resolve conflicts. I'll keep an eye not to do any changes to related files here until this one gets it otherwise it wont. |
/morph test-nightly |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Rebasing / resolve conflicts is what I am doing since the creation of the 8 mbedtls hw acceleration in April... thank you for your effort |
From workshop branch, rebased on top of master
For more info, see #4160
@adustm @RobMeades please review first