-
Notifications
You must be signed in to change notification settings - Fork 541
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
Conversation
add hash test cases to test the support for the hash algorithm in crypto device Signed-off-by: makejian <[email protected]>
2d9b8cd
to
da53c85
Compare
(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]>
Signed-off-by: makejian <[email protected]>
da53c85
to
3d83b8d
Compare
|
||
int mbedtls_hardware_poll(FAR void *data, | ||
FAR unsigned char *output, | ||
size_t len, size_t *olen) |
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.
FAR size_t *olen)
{ | ||
"", | ||
0, |
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.
remove 2 leading spaces
|
||
static const unsigned char sha512_result[3][64] = | ||
{ | ||
{ 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba, |
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.
remove 2 leading spaces
if (memcmp(a, b, len) == 0) | ||
return (0); |
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.
if (memcmp(a, b, len) == 0) | |
return (0); | |
if (memcmp(a, b, len) == 0) | |
{ | |
return 0; | |
} |
(1) add 'FAR' in mbedtls_hardware_poll (2) fix indentation issues in hash testcase Signed-off-by: makejian <[email protected]>
(1) add 'FAR' in mbedtls_hardware_poll (2) fix indentation issues in hash testcase Signed-off-by: makejian <[email protected]>
(1) add 'FAR' in mbedtls_hardware_poll (2) fix indentation issues in hash testcase Signed-off-by: makejian <[email protected]>
(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]