This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: Calculating an SHA256 & HMACSHA256

Part Number: MSP432P401R

I am needing to generate a SHA256 hash and a HMACSHA256 hash of certain data that I have so that I can send it to the Amazon IoT service. 

Can anyone point me in the right direction to either a library that can generate such hashes, or a way to generate such hashes without a library?

  • You could give OpenSSL a try, they have functions for both. The SHA256 API can be found here: www.openssl.org/.../EVP_sha256.html and the HMAC functions are documented here: www.openssl.org/.../HMAC.html .
    However, be aware that OpenSSL is targeted at non-embedded devices and they are using a custom malloc() implementation for security reasons. So getting it to run might be a bit hard.
    Another library worth giving a shot is mbedTLS (formerly PolarSSL): tls.mbed.org/module-level-design-hashing .
    In the end, you should definitely watch out for any updates of the library you have chosen, in case any critical bugs appear.
    Cheers,
    Dan
  • You could give OpenSSL a try, they have functions for both. The SHA256 API can be found here: and the HMAC functions are documented here: .

    However, be aware that OpenSSL is targeted at non-embedded devices and they are using a custom malloc() implementation for security reasons. So getting it to run might be a bit hard.

    Another library worth giving a shot is mbedTLS (formerly PolarSSL): .

    In the end, you should definitely watch out for any updates of the library you have chosen, in case any critical bugs appear.

    Cheers,

    Dan

    P.S.: Sorry if this should appear twice, had some trouble submitting this post.

**Attention** This is a public forum