2012-02-09 12:59 PM
Hi everybody
I'm trying to use the encryption libraries
with an STM32F4Discovery board.However, the function HASH_SHA1 is not obtaining
the hash value, it only got zero.I am using this code to obtain the hash:
==========================================
uint8_t arrdata[50]; //filled in HID interface uint8_t arrsha1[20];RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_HASH, ENABLE);
HASH_SHA1(arrdata, 50, arrsha1);
========================================== arrsha1 always got zeroes.I've traced the HASH_SHA1 function, and I feel it is working correctly
However, I can't see where in the library is the HASH computed,
as the function only read the value from an array...Do you know if the encryuption libraries can be used with the
STM32F4Discovery board?Brisa
#hash-sha1-encryption2012-02-09 01:27 PM
Do you know if the encryuption libraries can be used with the
STM32F4Discovery board?Brisa
Have you ever tried to discover the difference between STM32F40xand STM32F41x chips ?And what chip do you have on Discovery board ?2012-02-09 02:28 PM
The board uses the STM32F407VGT6, and does not support hashing or encryption, presumably because of export restrictions that might otherwise exist.
http://www.st.com/internet/com/press_release/p3212.jsp
''The STM32F415 and STM32F417 parts add a crypto/hash processor to the STM32F405 and STM32F407. This crypto/hash processor includes hardware acceleration for AES 128, 192, 256, Triple DES, HASH (MD5, SHA-1). As an example of the performance achieved by the crypto/hash processor, the AES-256 encryption throughput reaches up to 149.33 Mbytes/s.'' Reading back the RCC clock register might be instructive as to whether the HASH unit is present/functional.2012-02-09 07:53 PM
Thanks.
I was aware of the difference between the series 40x/41x, but misinterpreted the description of the mcus
I had understood that *both* of them *have* hash/crypto processing, by software in the 40x and with specialized hardware in 41x series.Thanks for correct my mistake.
2012-02-10 06:45 AM
They do have a software encryption library, but this is not supplied with the firmware library, and requires a separate NDA. Depending on your location this might be difficult to obtain, but other examples of SHA,MD5,AES,etc are available on the internets.
2012-02-14 08:38 PM
Thanks Clive.
I'm talking with my local st representative, and had started the procedure to get the libraries, and yes, it will require an NDAThanks