Hi,
The following questions is in regard to the application note AN5401 appendix A Generating M1 to M5,
In particular focusing on M4 and M5.
Just need to confirm it as I believe my assumption is correct.
Thanks,
Koorosh Hajiani
Solved! Go to Solution.
Hi@hajianik
You can’t calculate M4,M5 based only on values of M1,M2,M3 off-line! This calculation process is irreversible. I have confirmed this with our experts again.
Sorry for the wrong understanding of your question, it is necessary to remind you not to try illegal cracking, you need to ask your supplier to provide a complete M value
BR!
Jim.
Hi@hajianik
I thank your assumption is correct.
Here are a few documents for reference, you can try to find them on the official website.
BR!
Jim.
Thanks for your response.
So Could you tell me please;
The M1 and M2 and M3 numbers , particularly M2 :
Will have the new key value and the counter( the new key is associated with) embedded in them?
and if so where are they?
M1[0],M2[1],M2[2],M3[3] which one?
Thanks
Hi@hajianik
I don’t quite understand what ‘numbers’ mean.
This is a DEMO to calculate the value of M, you can refer to it.
2. I don't know if you have the DEMO project code, here I will post a link, if you don't have one, you can refer to it.
AN5401SW-
https://community.nxp.com/t5/S32K/Who-can-share-S32K-secure-boot-sample-AN5401SW-zip/td-p/797807
How to use-
Hope these reference routines can help you.
BR!
Jim.
Hi,
using the code in the project, we will generate values for M1[4] and M2[8] and M3[4] based on the new key value and the counter and the key slot and authorizing key.
NOW MY QUESTION IS VERY SIMPLE;
the COUNTER VALUE and THE NEW KEY VALUE which was used to generate M1,M2,M3, are in any way reflected in the values for M1,M2,M3 ? Are they in a decrypted form embedded in M1,M2,M3.
Could you answer that?
You keep referring me to this document,I've read those ,and I couldn't find the answer, that's why I'm asking NXP.
Thanks
Hi@hajianik
Both ‘COUNTER VALUE’ and ‘NEW KEY VAULE’ are used to generate M2.
CID : (COUNTER VALUE) Key Counter ,related to user key.
KEY(ID):NEW KEY VALUE.
The counter value related to user key.
Is this the answer you are looking for?
Note:
Each time the KEY content is updated, the MCU will automatically update the CID value. Therefore, when calculating the M value offline, you need to record the number of times the KEY has been modified.
Example1:Update KEY_1
Example2:Update KEY_1
Due to the geographical time difference, it was a bit late to reply to you. If I understand your question incorrectly, please let me know in time.
BR!
Jim.
Hi,
I already know that,and I've stated this in my previous posts.
My question for the last time is:
lets assume the following scenario:
Some customers will supply myself with the Values of M1,M2,M3 which are linked to a specific counter and a new key.
I have no other information, nothing else.
Can I calculate M4,M5 based only on values of M1,M2,M3 offline?
I KNOW HOW TO LOAD A KEY BY USING THE NXP SUPPLIED FUNCTIONS:
uint16_t LOAD_KEY(uint32_t *M4_out, uint32_t *M5_out, uint32_t *M1_in, uint32_t *M2_in, uint32_t *M3_in, uint8_t key_id)
AS I HAVE DONE IT MYSELF AND GET M4/M5, I want to use the offline calculation as a check to LOAD_KEY routine.
I do appreciate your effort in answering my question, it could be my English which is misunderstood, but at this point I think you could share this with an expert colleague where he/she might know this.
BR
Hi@hajianik
You can’t calculate M4,M5 based only on values of M1,M2,M3 off-line! This calculation process is irreversible. I have confirmed this with our experts again.
Sorry for the wrong understanding of your question, it is necessary to remind you not to try illegal cracking, you need to ask your supplier to provide a complete M value
BR!
Jim.