<?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: Crypto implementation cbc-aes-tee modifies the key given to it. in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2336293#M244572</link>
    <description>&lt;P&gt;According to R&amp;amp;D team's reply, this is an expected behaviour.&lt;/P&gt;
&lt;P&gt;This TEE offload is not meant to be inter-operable, where encryption is done by offloading it to TEE, while corresponding decryption done by non-TEE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have raised one jira ticket&amp;nbsp;&lt;A id="key-val" class="issue-link" href="https://jira.sw.nxp.com/browse/LF-17796" rel="4116995 nofollow noopener noreferrer" data-issue-key="LF-17796" aria-current="page" target="_blank"&gt;LF-17796&lt;/A&gt;&amp;nbsp;to suggest R&amp;amp;D can decrease default priority of&amp;nbsp;"cbc-aes-tee" driver.&lt;/P&gt;
&lt;P&gt;Let's wait for feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2026 03:48:27 GMT</pubDate>
    <dc:creator>yipingwang</dc:creator>
    <dc:date>2026-03-20T03:48:27Z</dc:date>
    <item>
      <title>Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2335404#M244551</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am seeing some differing behavior for the kernel crypto implentation cbc-aes-tee (from NXP OP-TEE) compared to other cbc-aes implementations&amp;nbsp;(cbc-aes-ce, cbc-aes-neonbs, cbc-aes-generic). I am using the iMX93 with linux-imx 6.12.20-2.0.0, yocto walnascar with optee 4.6.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran into this issue when trying to install encrypted update bundles with RAUC. RAUC was able to decrypt the update bundle with openSSL but could not mount the bundle with dm_crypt. I found an issue on the RAUC Github page that described the problem. (Issue 1833, here is a link:&amp;nbsp;&lt;A href="https://github.com/rauc/rauc/issues/1833" target="_blank"&gt;https://github.com/rauc/rauc/issues/1833&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;I confirmed that this is the issue I am facing. The problem is that&amp;nbsp;cbc-aes-tee does not use the key pass to it from the kernel driver directly but treats it as a salt for deriving a new key. This goes against what the kernel&amp;nbsp;expects (specifically&amp;nbsp;crypto_skcipher_setkey) and is different from the other cbc-aes implementations (cbc-aes-ce, cbc-aes-neonbs, cbc-aes-generic). Other RAUC users have worked around this by lowering the priority of the OP-TEE's symmetric key cryptography implementations in the kernel's crypto API&amp;nbsp;so that the kernel prefers other implementations. This can be done by settingTEE_CRYPTO_CRA_PRIORITY to a low value in tee_skcipher.h. This causes the kernel to use&amp;nbsp;cbc-aes-ce instead of cbc-aes-tee on my board, which does solve the immediate problem with RAUC and dm_crypt. However, my coworkers think this is a little heavy-handed, and this does not fix the issue with&amp;nbsp;cbc-aes-tee.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've written a small program to demonstrate the problem. The program encrypts a message using openSSL, and then decrypts it using cbc-aes-ce, cbc-aes-neonbs, cbc-aes-generic, and finally cbc-aes-tee. The cbc-aes-tee implementation is the only one that does not work, because it does not use the key directly. I've attached the program source, the compiled program binary (gzipped so it would let me upload it), and the program's output after running it on my board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would love to get this fixed so that cbc-aes-tee behaves the same as the other implementations. Please let me know if there is anything I can do to help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2026 19:13:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2335404#M244551</guid>
      <dc:creator>danieljohnson</dc:creator>
      <dc:date>2026-03-18T19:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2335678#M244560</link>
      <description>&lt;P&gt;Discussing with the AE team.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2026 08:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2335678#M244560</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2026-03-19T08:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2336293#M244572</link>
      <description>&lt;P&gt;According to R&amp;amp;D team's reply, this is an expected behaviour.&lt;/P&gt;
&lt;P&gt;This TEE offload is not meant to be inter-operable, where encryption is done by offloading it to TEE, while corresponding decryption done by non-TEE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have raised one jira ticket&amp;nbsp;&lt;A id="key-val" class="issue-link" href="https://jira.sw.nxp.com/browse/LF-17796" rel="4116995 nofollow noopener noreferrer" data-issue-key="LF-17796" aria-current="page" target="_blank"&gt;LF-17796&lt;/A&gt;&amp;nbsp;to suggest R&amp;amp;D can decrease default priority of&amp;nbsp;"cbc-aes-tee" driver.&lt;/P&gt;
&lt;P&gt;Let's wait for feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2026 03:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2336293#M244572</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2026-03-20T03:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2337685#M244604</link>
      <description>&lt;P&gt;Thank you for the feedback.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If cbc-aes-tee is not meant to be compatible with the other cbc(aes) implementations, then I think it should not be available to &lt;SPAN&gt;the kernel crypto API to choose as an implementation of cbc(aes).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 14:19:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2337685#M244604</guid>
      <dc:creator>danieljohnson</dc:creator>
      <dc:date>2026-03-23T14:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2337686#M244605</link>
      <description>&lt;P&gt;Thank you, please let me know if there is any feedback from the team.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 14:21:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2337686#M244605</guid>
      <dc:creator>danieljohnson</dc:creator>
      <dc:date>2026-03-23T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Crypto implementation cbc-aes-tee modifies the key given to it.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2338207#M244621</link>
      <description>&lt;P&gt;This patch&amp;nbsp;&lt;A href="https://github.com/rauc/rauc/issues/1833#issuecomment-3632067956" target="_blank"&gt;https://github.com/rauc/rauc/issues/1833#issuecomment-3632067956&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;is under review.&lt;/P&gt;
&lt;P&gt;Customer can apply this patch to resolve their problem. The issue will be fixed in further BSP release.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 07:47:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Crypto-implementation-cbc-aes-tee-modifies-the-key-given-to-it/m-p/2338207#M244621</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2026-03-24T07:47:25Z</dc:date>
    </item>
  </channel>
</rss>

