<?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>i.MX ProcessorsのトピックRe: Example code on blob generation and usage on i.MX6UL platform</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559016#M86824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,Xiaodong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give me some example, how can I&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; recovery the dek from the&amp;nbsp;/home/root/blob &amp;nbsp;file,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I can not recovery the key,use these function,when I reboot the SOC:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_export()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_import()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_read()&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 10:25:32 GMT</pubDate>
    <dc:creator>jason_rsmgnu</dc:creator>
    <dc:date>2017-06-22T10:25:32Z</dc:date>
    <item>
      <title>Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559011#M86819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is example code on blob generation and usage on i.MX6UL platform.&lt;BR /&gt;It shows how to generate blob in secure memory, store blob in non-volatile memory, restore key from blob and use in cryptographic algorithm, the code is based on fsl-arm-yocto-bsp-imx-4.1.15-1.0.0_ga release.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337006"&gt;test_caam_keyblob.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 08:13:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559011#M86819</guid>
      <dc:creator>hongdong_chu</dc:creator>
      <dc:date>2016-08-25T08:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559012#M86820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference agaist&amp;nbsp;the sm_test in drivers\crypto\caam\sm_test.c by BSP release?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 08:57:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559012#M86820</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2016-08-25T08:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559013#M86821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;drivers\crypto\caam\sm_test.c in BSP release only includes blob export and import.&lt;/P&gt;&lt;P&gt;Example code includes blob export and import, store blob to rootfs, restore key from blob and use in cryptographic algorithm.&lt;/P&gt;&lt;P&gt;It is also shows how to call&amp;nbsp;CAAM AES algorithm in Linux kernel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 01:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559013#M86821</guid>
      <dc:creator>hongdong_chu</dc:creator>
      <dc:date>2016-08-26T01:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559014#M86822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot for your explaination. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 06:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559014#M86822</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2016-08-26T06:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559015#M86823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eric had&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;modified the example code to show how to generate blob for user space dek, the use case is:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; The alg_test.c is compiled to kernel module alg_test.ko.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; Assume that dek is generated in user space application and stored to rootfs, in the example, it is a 128-bit key and stored to dek.bin in rootfs/home/root.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; insmod alg_test.ko, it reads dek.bin from rootfs/home/root, generate dek blob, and store the blob to rootfs/home/root/blob, the blob is encrypted with device-specific OTPMK.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; rmmod alg_test.ko&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; From user space, dek.bin can be removed for safety. &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;6. Next time to use dek, it can be recovered from rootfs/home/root/blob. The recovery code is not included in attached example, customer can implement it in similar way according to example code in test_caam_keyblob.zip.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2016 05:25:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559015#M86823</guid>
      <dc:creator>xiaodong_zhang</dc:creator>
      <dc:date>2016-12-02T05:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559016#M86824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,Xiaodong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give me some example, how can I&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; recovery the dek from the&amp;nbsp;/home/root/blob &amp;nbsp;file,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I can not recovery the key,use these function,when I reboot the SOC:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_export()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_import()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sm_keystore_slot_read()&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 10:25:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559016#M86824</guid>
      <dc:creator>jason_rsmgnu</dc:creator>
      <dc:date>2017-06-22T10:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559017#M86825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested the first example code, the recovered key that is used in the encryption example is empty : key:00000000000000000000000000000000&lt;/P&gt;&lt;P&gt;My iMX6 device is open, is it diffrent on closed device ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559017#M86825</guid>
      <dc:creator>ayoubzaki</dc:creator>
      <dc:date>2017-09-12T13:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Example code on blob generation and usage on i.MX6UL platform</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559018#M86826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;if someone still looking for sample code for endcode/decode keys using CAAM (with Master key)&lt;/P&gt;&lt;P&gt;just try an attached (modified) code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This module desn't stay in RAM by causing error (ENOMEM) intentionally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module parameter encrypt=1 mens: get data from dek.txt encrypt and save to blob.bin&lt;/P&gt;&lt;P&gt;Module parameter encrypt=0 mens: get data from blob.bin decrypt and show as a text.&lt;/P&gt;&lt;P&gt;It uses 32 bytes for a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#insmod alg_test.ko encrypt=1&lt;BR /&gt;[ 7368.080346] Read password file: /data2/dek.txt&lt;BR /&gt;[ 7368.081182] Security module: sec-v4.0 OK&lt;BR /&gt;[ 7368.081697] Encrypt &amp;amp; write password&lt;BR /&gt;[ 7368.082386] Causing error to remove module&lt;BR /&gt;insmod: failed to load alg_test.ko: Out of memory &amp;lt;== It's OK&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1|root@tsr2_bl12080:/data2 # insmod alg_test.ko encrypt=0&lt;BR /&gt;[ 7370.370662] Read encrypted password file: /data2/blob.bin&lt;BR /&gt;[ 7370.371568] Security module: sec-v4.0 OK&lt;BR /&gt;[ 7370.372083] Decrypt password&lt;BR /&gt;&lt;STRONG&gt;[ 7370.372579] To jest tekst do zaszyfrowania p &lt;/STRONG&gt;&amp;lt;== decrypted content of &lt;STRONG&gt;blob.bin&lt;/STRONG&gt;&lt;BR /&gt;[ 7370.373490] Causing error to remove module&lt;BR /&gt;insmod: failed to load alg_test.ko: Out of memory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 13:53:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Example-code-on-blob-generation-and-usage-on-i-MX6UL-platform/m-p/559018#M86826</guid>
      <dc:creator>tadeuszgozdek</dc:creator>
      <dc:date>2019-07-15T13:53:13Z</dc:date>
    </item>
  </channel>
</rss>

