Hello,
I'm testing the speed of the HMAC calc module gererating hashes from a simple uint32 vector and a fixed 512bit key.
When I use directly the key I have (with SHAMD5HMACKeySet) everything works fine and the hash is generated as it should be.
The problem is when I try to use the SHAMD5HMACPPKeyGenerate to pre-process the key. It does process the key into another variable fine but when I use the SHAMD5HMACProcess function it gets stuck. The peripheral never gives back the result.
So far I've been using the code like this:
SysCtlPeripheralEnable(SYSCTL_PERIPH_CCM0); while(!SysCtlPeripheralReady(SYSCTL_PERIPH_CCM0));
bzero(g_ui32PPHMACKey, 64); SHAMD5Reset(SHAMD5_BASE); SHAMD5ConfigSet(SHAMD5_BASE, SHAMD5_ALGO_HMAC_SHA256); SHAMD5HMACPPKeyGenerate(SHAMD5_BASE, g_ui32HMACKey, g_ui32PPHMACKey); SHAMD5HMACPPKeySet(SHAMD5_BASE, g_ui32PPHMACKey); SHAMD5HMACProcess(SHAMD5_BASE, password, 16, hashResult);
The key is a uint32 vector with 16 positions (512 bits) initialized and the pre processed key is a similar vector but initialized with zero on all positions. This one does get values after the KeyGenerate function but the execution gets stuck on the Process function.
What should I do to use the function? My objective is to make the device work faster