You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have your code running on a mobile phone developed under Android Studio. The baseline gives the correct answer for the empty message but if I change message[0] to 0x61, for example, I do not see the correct sha-256 for "a". For padding, I added message[1] = 0x80 followed by 54 zeros followed by the message length (1) in the next 8 bytes. I may very well have the padding wrong! Any suggestions would be appreciated. Thank you.
Problem solved: message length in the last 8 bytes needs a <<3! Thanks to mbedtls_sha256_finish at: https://github.com/Mbed-TLS/mbedtls/blob/development/library/sha256.c
The text was updated successfully, but these errors were encountered:
I have your code running on a mobile phone developed under Android Studio. The baseline gives the correct answer for the empty message but if I change message[0] to 0x61, for example, I do not see the correct sha-256 for "a". For padding, I added message[1] = 0x80 followed by 54 zeros followed by the message length (1) in the next 8 bytes. I may very well have the padding wrong! Any suggestions would be appreciated. Thank you.
Problem solved: message length in the last 8 bytes needs a <<3! Thanks to mbedtls_sha256_finish at:
https://github.com/Mbed-TLS/mbedtls/blob/development/library/sha256.c
The text was updated successfully, but these errors were encountered: