Hi
When I use Csec module, I fail to update the loading key. After executing setAuthKey, I directly load the key using loadKey (line 184, line 185). In this case, the loading of the key is successful, and the return value is 1. Call loadKey, and the load will continue to fail, return the value of 0, what is the problem?
The following is a case where the loadKey return value is not success when debugging with IC5000.
已解决! 转到解答。
Yes, after loading of MASTER_ECU_KEY by setAuthKey function, you can load or update other keys by loadKey only with correct parameters.
Regards,
Lukas
Hi @ZEROOO
do you mean that loadkey at line 184 and 185 is working and loadkey at 189 and 196 is not working? If yes, it makes sense because the counters need to be updated.
But there's also next point - I really do not recommend to mix SDK and AN5401 together. More rework would be necessary in this case. For example, M1-M3 values are calculated inside the loadkey function. The calculate_M1_to_M5 won't have effect here at all.
Regards,
Lukas
Hi Lukas
I still don't understand something about the key update. In AN5401, calculate_M1_to_M5 is used to update the key first, which is to obtain the value of M1-M3, so LOAD_KEY is used to load and update the key. This is the idea of AN5401, right? In SDK, firstly, setAuthKey is used to load MASTER_ECU_KEY and set it as authorization Key, and then loadKey is used to update key. Is it because loadKey in SDK already includes M1-M3 calculation? So after setting setAuthKey, you can load updates directly using loadKey? loadKey in SDK only calculates M1-M3, M4-M5 is not needed in the process of updating key, then what is the function of computeM4M5 used for?
AN5401:
SDK:
Hi
I seem to understand how to update the secret key, I can simply think that after setting the authorization secret key, if I use SDK, I can directly complete the update of the secret key through loadKey function, need to pay attention to the parameter Settings, is that right?