<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: csec calculating M4/M5 OFF LINE in S32K</title>
    <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1321296#M11630</link>
    <description>&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;So Could you tell me please;&lt;/P&gt;&lt;P&gt;The M1 and M2 and M3 numbers , particularly&amp;nbsp; M2 :&lt;/P&gt;&lt;P&gt;Will have the new key value and the counter( the new key is associated with) embedded in them?&lt;/P&gt;&lt;P&gt;and if so where are they?&lt;/P&gt;&lt;P&gt;M1[0],M2[1],M2[2],M3[3] which one?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 18:44:38 GMT</pubDate>
    <dc:creator>hajianik</dc:creator>
    <dc:date>2021-08-10T18:44:38Z</dc:date>
    <item>
      <title>csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1320527#M11605</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The following questions is in regard to the application note AN5401 appendix A Generating M1 to M5,&lt;/P&gt;&lt;P&gt;In particular focusing on M4 and M5.&lt;/P&gt;&lt;P&gt;Just need to confirm it as I believe my assumption is correct.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;To calculate the M4&amp;nbsp; for the key to be provisioned we need to know the counter value associated with the update.&lt;/LI&gt;&lt;LI&gt;To calculate the M5 for the key to be provisioned we need to know the value of the key to be provisioned.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 18:49:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1320527#M11605</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2021-08-09T18:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1320685#M11609</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/138997" target="_self" aria-label="View Profile of hajianik"&gt;&lt;SPAN class=""&gt;hajianik&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1628561561508.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152360i4C67AFFFD549CF5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_0-1628561561508.png" alt="Senlent_0-1628561561508.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_2-1628561616925.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152363i20B30C4FF07FD559/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_2-1628561616925.png" alt="Senlent_2-1628561616925.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I thank your assumption is correct.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Here are a few documents for reference, you can try to find them on the official website.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_3-1628561716882.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152364i1C5FA3F50E39D034/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_3-1628561716882.png" alt="Senlent_3-1628561716882.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Jim.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 02:25:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1320685#M11609</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-10T02:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1321296#M11630</link>
      <description>&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;So Could you tell me please;&lt;/P&gt;&lt;P&gt;The M1 and M2 and M3 numbers , particularly&amp;nbsp; M2 :&lt;/P&gt;&lt;P&gt;Will have the new key value and the counter( the new key is associated with) embedded in them?&lt;/P&gt;&lt;P&gt;and if so where are they?&lt;/P&gt;&lt;P&gt;M1[0],M2[1],M2[2],M3[3] which one?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 18:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1321296#M11630</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2021-08-10T18:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1321471#M11633</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/138997" target="_self" aria-label="View Profile of hajianik"&gt;&lt;SPAN class=""&gt;hajianik&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I don’t quite understand what ‘numbers’ mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;This is a DEMO to calculate the value of M, you can refer to it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1628649420978.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152540iF4AA683B5CD42815/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_0-1628649420978.png" alt="Senlent_0-1628649420978.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_1-1628649467357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152541i0B7B45C018F87CBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_1-1628649467357.png" alt="Senlent_1-1628649467357.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;AN5401SW-&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/Who-can-share-S32K-secure-boot-sample-AN5401SW-zip/td-p/797807" target="_self"&gt;https://community.nxp.com/t5/S32K/Who-can-share-S32K-secure-boot-sample-AN5401SW-zip/td-p/797807&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use-&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio/How-to-compile-AN5401SW-zip-in-S32-Design-studio-for-ARM/m-p/667885" target="_self"&gt;https://community.nxp.com/t5/S32-Design-Studio/How-to-compile-AN5401SW-zip-in-S32-Design-studio-for-ARM/m-p/667885&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope these reference routines can help you.&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;Jim.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 02:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1321471#M11633</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-11T02:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322032#M11654</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;NOW MY QUESTION IS VERY SIMPLE;&lt;/P&gt;&lt;P&gt;the COUNTER VALUE and&amp;nbsp; THE NEW KEY VALUE&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;Could you answer that?&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 17:32:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322032#M11654</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2021-08-11T17:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322295#M11655</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/138997" target="_self" aria-label="View Profile of hajianik"&gt;&lt;SPAN class=""&gt;hajianik&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Both ‘COUNTER VALUE’ and ‘NEW KEY VAULE’ are used to generate M2.&lt;/P&gt;
&lt;P&gt;CID : (COUNTER VALUE) Key Counter ,related to user key.&lt;/P&gt;
&lt;P&gt;KEY(ID):NEW KEY VALUE.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1628735833346.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152670iE16008D55817095E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_0-1628735833346.png" alt="Senlent_0-1628735833346.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The counter value related to user key.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_1-1628735833367.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152669iF36D679A76CC248A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_1-1628735833367.png" alt="Senlent_1-1628735833367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is this the answer you are looking for?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Example1:Update KEY_1&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_2-1628735833471.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152671i727874E4894789BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_2-1628735833471.png" alt="Senlent_2-1628735833471.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Example2:Update KEY_1&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_3-1628735833534.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152672i6646DDB04222BEF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_3-1628735833534.png" alt="Senlent_3-1628735833534.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 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.&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Jim.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 03:05:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322295#M11655</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-12T03:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322768#M11669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I already know that,and I've stated this in my previous posts.&lt;/P&gt;&lt;P&gt;My&amp;nbsp; question for the last time is:&lt;/P&gt;&lt;P&gt;lets assume the following scenario:&lt;/P&gt;&lt;P&gt;Some customers will supply myself with the Values of M1,M2,M3 which are linked to a specific counter and a new key.&lt;/P&gt;&lt;P&gt;I have no other information, nothing else.&lt;/P&gt;&lt;P&gt;Can I calculate M4,M5 based only on values of M1,M2,M3 offline?&lt;/P&gt;&lt;P&gt;I KNOW HOW TO LOAD&amp;nbsp; A KEY BY USING THE NXP SUPPLIED FUNCTIONS:&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;AS I HAVE DONE IT MYSELF AND GET M4/M5, I want to use the offline calculation as a check to LOAD_KEY routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 18:59:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1322768#M11669</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2021-08-12T18:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: csec calculating M4/M5 OFF LINE</title>
      <link>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1323035#M11683</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/138997" target="_self" aria-label="View Profile of hajianik"&gt;&lt;SPAN class=""&gt;hajianik&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;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.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1628837028633.png" style="width: 558px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152790iB399A0B51E3EBC25/image-dimensions/558x66?v=v2" width="558" height="66" role="button" title="Senlent_0-1628837028633.png" alt="Senlent_0-1628837028633.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 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&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;Jim.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:59:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/csec-calculating-M4-M5-OFF-LINE/m-p/1323035#M11683</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-13T06:59:40Z</dc:date>
    </item>
  </channel>
</rss>

