<?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: About s12g96 using backdoor secret key decryption problem in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815674#M15833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li Yu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You code looks good, perhaps I don't see something. But how do you verify&amp;nbsp;whether unsecure succeeds or&amp;nbsp;not? With Code Warrior?&amp;nbsp;Didn't you forget to use "hotplug" debugging instead of default "reset into special single chip mode"? Default debugging settings lead to&amp;nbsp;MCU reset, which reengages security.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2018 11:47:32 GMT</pubDate>
    <dc:creator>kef2</dc:creator>
    <dc:date>2018-07-17T11:47:32Z</dc:date>
    <item>
      <title>About s12g96 using backdoor secret key decryption problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815673#M15832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My processor is s12g96. I set the backdoor key to be four 1, and then use the following code to decrypt, but the decryption did not succeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const unsigned char NVFSEC_INIT @0x0000FF0FU = 0xBDU;&lt;/P&gt;&lt;P&gt;/* BAKEY0: KEY=1 */&lt;BR /&gt;static const unsigned int BAKEY0_INIT @0x0000FF00U = 0x01U;&lt;/P&gt;&lt;P&gt;/* BAKEY1: KEY=2 */&lt;BR /&gt;static const unsigned int BAKEY1_INIT @0x0000FF02U = 0x01U;&lt;BR /&gt;//&lt;BR /&gt;/* BAKEY2: KEY=3 */&lt;BR /&gt;static const unsigned int BAKEY2_INIT @0x0000FF04U = 0x01U;&lt;BR /&gt;//&lt;BR /&gt;/* BAKEY3: KEY=4 */&lt;BR /&gt;static const unsigned int BAKEY3_INIT @0x0000FF06U = 0x01U;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the decryption code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma push&lt;BR /&gt;#pragma CODE_SEG RAM_CODE&lt;BR /&gt;void PFlash_Verify_Backdoor_Access_Key()&lt;BR /&gt;{ &lt;BR /&gt; //验证秘钥&lt;BR /&gt; U8 i;&lt;BR /&gt; enter_cirtical(); //禁止中断&lt;BR /&gt; while((FSTAT &amp;amp; FSTAT_CCIF_MASK) == 0); //wait if command in progress&lt;BR /&gt; FSTAT = 0x30; //clear ACCERR and PVIOL&lt;/P&gt;&lt;P&gt;FCCOBIX = 0x00;&lt;BR /&gt; FCCOB = 0x0C00;&lt;BR /&gt; for(i=0;i&amp;lt;4;i++)&lt;BR /&gt; {&lt;BR /&gt; FCCOBIX++; /* Shift index register */&lt;BR /&gt; FCCOB = 0x01U; /*fill key0~3*/&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; FSTAT = 0x80; //launch command&lt;BR /&gt; while((FSTAT &amp;amp; FSTAT_CCIF_MASK) == 0); //wait for done&lt;BR /&gt; exit_cirtical(); //&lt;BR /&gt;}&lt;BR /&gt;#pragma pop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 09:02:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815673#M15832</guid>
      <dc:creator>suaihome</dc:creator>
      <dc:date>2018-07-16T09:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: About s12g96 using backdoor secret key decryption problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815674#M15833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li Yu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You code looks good, perhaps I don't see something. But how do you verify&amp;nbsp;whether unsecure succeeds or&amp;nbsp;not? With Code Warrior?&amp;nbsp;Didn't you forget to use "hotplug" debugging instead of default "reset into special single chip mode"? Default debugging settings lead to&amp;nbsp;MCU reset, which reengages security.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2018 11:47:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815674#M15833</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2018-07-17T11:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: About s12g96 using backdoor secret key decryption problem</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815675#M15834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Hi Li Yu,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Please ensure that your &lt;SPAN style="background: white;"&gt;BAKEY0_INIT&lt;/SPAN&gt; .. BAKEY3_INIT&lt;/SPAN&gt; constants are part of the compiled code and not optimized out. You may search their name in the map file.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;If they are optimized out as unused, please enter their name into ENTRIES section in prm file. That will prevent against optimizing it out as unused.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;Please look at G128-Security-CW51&lt;/SPAN&gt; example for your reference:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-93792"&gt;&lt;SPAN style="color: black;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/docs/DOC-93792" target="test_blank"&gt;https://community.nxp.com/docs/DOC-93792&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;I hope it helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2018 16:40:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/About-s12g96-using-backdoor-secret-key-decryption-problem/m-p/815675#M15834</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2018-07-17T16:40:39Z</dc:date>
    </item>
  </channel>
</rss>

