Hi,
I come back because the code tested using only USERKEK (blhost 11 key) works fine, but if I program an eval board with both USERKEK and SBKEK (blhost 3 key) it's stop working.
I do the following ;
m_handle.keyType = kHASHCRYPT_SecretKey;
status = HASHCRYPT_AES_SetKey(HASHCRYPT, &m_handle, keyAes, 32);
status = HASHCRYPT_AES_EncryptEcb(HASHCRYPT, &m_handle, plaintext, ciphertext, 16);
status = HASHCRYPT_AES_DecryptEcb(HASHCRYPT, &m_handle, ciphertext, output , 16);
When only USERKEK is written I can check that plaintext = output, but when I write both key (which are not equal) HASHCRYPT_AES_EncryptEcb return 1 and cyphertext is not correct (function fail on hashcrypt_check_need_key).
The code tested was the same, i just make a new blhost enroll and provising both key.