Hello,
I am using Crypto_43_HSE RTD v5.0.0.
I want to load a new RAM_KEY in the HSE.
I configured the RAM Key in the following way:
CryptoKeyType is formed by: CipherProof, KeyMaterial, MacProof.
RAM KEY Key Material is configured as:
(no HseKeyFlags are configured)
with the related ram key catalog:
accessible by both MU instances 0 and 1.
I am trying to import the RAM Key as an encrypted key, thus by using calculation of M1M2M3. I am able to calculate M1, M2 and M3 correctly (I already checked the correctness by trying to import the NvM catalog keys and the import was successful).
The M1M2M3 values I have are configured according to the following parameters:
the calculated M1M2M3 values are:
static uint8 sKeyUpdateM1M2M3[64u] __attribute__((aligned)) =
{
/* M1 */
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe1,
/* M2 */
0x2b, 0x11, 0x1e, 0x2d, 0x93, 0xf4, 0x86, 0x56, 0x6b, 0xcb, 0xba, 0x1d, 0x7f, 0x7a, 0x97, 0x97, 0x29, 0x8d, 0x4e, 0xa0, 0x6, 0xa2, 0x80, 0xc1, 0x5d, 0xd2, 0xa3, 0xe5, 0x6f, 0x4f, 0x5b, 0x6,
/* M3 */
0x4c, 0x1b, 0xcb, 0x77, 0x87, 0xb3, 0x9, 0x19, 0xfb, 0x6e, 0x73, 0x9c, 0xa6, 0xab, 0x48, 0xf4,
};
When I try to call the Crypto_43_HSE_KeyElementSet with the cryptoKeyId=CryptoConf_CryptoKey_CryptoKey_SHE_RAM_KEY and by using the M1M2M3 values that I provided above, I get the result code =0x09 that should mean CRYPTO_E_KEY_NOT_VALID, returned upon HSE responding with status code HSE_SRV_RSP_KEY_INVALID.
What could be the cause of this issue? Is there any configuration step that I have missed?
Kind regards
解決済! 解決策の投稿を見る。
I solved the problem by changing the parameters used to calculate M1M2M3. According to AUTOSAR standard, the RAM Key must have flags and counter set to zero, and it can be updated only by using one of the other KEY_n (KEY1...KEY10) as authentication keys. By doing so, I was able to load the RAM Key correctly.
I solved the problem by changing the parameters used to calculate M1M2M3. According to AUTOSAR standard, the RAM Key must have flags and counter set to zero, and it can be updated only by using one of the other KEY_n (KEY1...KEY10) as authentication keys. By doing so, I was able to load the RAM Key correctly.
Also, I just wanted to add that I performed the HSE KeyCatalog formatting just one time at the HSE installation. At startup I only perform the Crypto_43_HSE_Init.