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

mbedtls: add mbedtls alternative implementation modules #1932

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

ThePassionate
Copy link

(1)use new mbedtls_config.h
(2)add sha1/sha256/sha512 alternative implementation from /dev/crypto
(3)add hardware entropy from /dev/random
Signed-off-by: makejian [email protected]

add hash test cases to test the support for the hash algorithm in crypto device
Signed-off-by: makejian <[email protected]>
crypto/mbedtls/Make.defs Outdated Show resolved Hide resolved
crypto/mbedtls/Make.defs Show resolved Hide resolved
makejian added 3 commits August 11, 2023 14:14
(1)add dev_alt to manage /dev/crypto
(2)add sha_alt to alternate sha1 algorithm
(3)use new mbedtls_config.h to admin configs of mbedtls
Signed-off-by: makejian <[email protected]>
add hardware entropy from /dev/random
Signed-off-by: makejian <[email protected]>
@xiaoxiang781216 xiaoxiang781216 merged commit af3ea2a into apache:master Aug 11, 2023
25 checks passed

int mbedtls_hardware_poll(FAR void *data,
FAR unsigned char *output,
size_t len, size_t *olen)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAR size_t *olen)

Comment on lines +50 to +52
{
"",
0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 2 leading spaces


static const unsigned char sha512_result[3][64] =
{
{ 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 2 leading spaces

Comment on lines +283 to +284
if (memcmp(a, b, len) == 0)
return (0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (memcmp(a, b, len) == 0)
return (0);
if (memcmp(a, b, len) == 0)
{
return 0;
}

ThePassionate pushed a commit to ThePassionate/nuttx-apps that referenced this pull request Aug 17, 2023
(1) add 'FAR' in mbedtls_hardware_poll
(2) fix indentation issues in hash testcase
Signed-off-by: makejian <[email protected]>
ThePassionate pushed a commit to ThePassionate/nuttx-apps that referenced this pull request Aug 17, 2023
(1) add 'FAR' in mbedtls_hardware_poll
(2) fix indentation issues in hash testcase
Signed-off-by: makejian <[email protected]>
xiaoxiang781216 pushed a commit that referenced this pull request Aug 17, 2023
(1) add 'FAR' in mbedtls_hardware_poll
(2) fix indentation issues in hash testcase
Signed-off-by: makejian <[email protected]>
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.

3 participants