Skip to main content
jim239955
Associate II
March 1, 2017
Question

SHA256 RSA digest

  • March 1, 2017
  • 1 reply
  • 2091 views
Posted on March 01, 2017 at 22:48

I have this working on a stmicroF427 part and I am trying to run the same code on a STmicroF103.  The only changes are that I used the M3 versions of the library on the F103 part, and the 427 system uses cube and the HAL libraries.  The code running on the 103 does not generate a correct digest.  I have verified that the data is good (there is a CRC also).  Can someone verify that this does work on the F103 part and that there are no setup steps that I may need to do to run this?

    This topic has been closed for replies.

    1 reply

    waclawek.jan
    Super User
    March 1, 2017
    Posted on March 01, 2017 at 23:29

    There's no HASH hardware in the 'STM32F427, so are you talking about some publicly available library?

    JW

    Tesla DeLorean
    Guru
    March 2, 2017
    Posted on March 02, 2017 at 00:43

    HAL Crypto Library by the sounds of it.

    HW CRC needs to be enabled on other platforms.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    jim239955
    jim239955Author
    Associate II
    March 2, 2017
    Posted on March 02, 2017 at 20:10

    On the ST32F427 we used HAL libraries on the ST32F103 we did not.  Both projects use the STMicro Crypt library.  I can see on the ST32F427 (cube) that I am using a function (__CRC_CLK_ENABLE ();) that sets the clock bit in the AHB1ENR register: SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_CRCEN);  I naively thought I could just do:  RCC->AHBENR |= RCC_AHBENR_CRCEN;  but that doesn't seem to do the trick.