<?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: imx93: cryptsetup with CONFIG_TEE_CRYPTO=m does not work with foreign LUKS files</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2143917#M239708</link>
    <description>Can you provide your full configuration on how to encrypt the partition? I get problems when i try to start systemd from the encrypted partition.</description>
    <pubDate>Wed, 30 Jul 2025 22:12:59 GMT</pubDate>
    <dc:creator>omar_aberkan</dc:creator>
    <dc:date>2025-07-30T22:12:59Z</dc:date>
    <item>
      <title>imx93: cryptsetup with CONFIG_TEE_CRYPTO=m does not work with foreign LUKS files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2142845#M239672</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using linux-fslc-imx 6.6.74 on imx93-evk. Crypto config with CONFIG_TEE_CRYPTO=m is enabled, as I use it to encrypt a partition with dmsetup and a trusted key (works fine).&lt;/P&gt;&lt;P&gt;When trying to open an encrypted LUKS file with cryptsetup however, the call goes fine:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cryptsetup open luks.img luks&lt;/LI-CODE&gt;&lt;P&gt;But unfortunately, the data in /dev/mapper/luks is garbage (looks random). With CONFIG_TEE_CRYPTO=n, the issue disappears and the decrypted mapped block device appears fine.&lt;/P&gt;&lt;P&gt;I have tried aes-cbc-plain and aes-xts-plain64 with various key sizes (256, 512), and the problem remains.&lt;/P&gt;&lt;P&gt;How to reproduce:&lt;/P&gt;&lt;P&gt;1. Create an encrypted LUKS file on another computer and format it to ext4&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dd if=/dev/zero of=luks.img bs=1M count=128
cryptsetup luksFormat --key-size=256 --type luks2 --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --hash "sha256" --cipher=aes-xts-plain64 luks.img
sudo cryptsetup open luks.img luks
sudo mkfs.ext4 /dev/mapper/luks
sudo cryptsetup close luks&lt;/LI-CODE&gt;&lt;P&gt;2. On the board, simply open the LUKS:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cryptsetup open luks.img luks&lt;/LI-CODE&gt;&lt;P&gt;Problem: /dev/mapper/luks looks random, not ext4.&lt;/P&gt;&lt;P&gt;What is the correct way to use cryptsetup for foreign LUKS files when CONFIG_TEE_CRYPTO=m?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 15:57:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2142845#M239672</guid>
      <dc:creator>mjourdan</dc:creator>
      <dc:date>2025-07-29T15:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: imx93: cryptsetup with CONFIG_TEE_CRYPTO=m does not work with foreign LUKS files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2143917#M239708</link>
      <description>Can you provide your full configuration on how to encrypt the partition? I get problems when i try to start systemd from the encrypted partition.</description>
      <pubDate>Wed, 30 Jul 2025 22:12:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2143917#M239708</guid>
      <dc:creator>omar_aberkan</dc:creator>
      <dc:date>2025-07-30T22:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: imx93: cryptsetup with CONFIG_TEE_CRYPTO=m does not work with foreign LUKS files</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2155237#M240225</link>
      <description>&lt;P&gt;Ultimately I ended up disabling the module with&amp;nbsp;CONFIG_TEE_CRYPTO=n.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/116729"&gt;@omar_aberkan&lt;/a&gt;&amp;nbsp;it's a combination of `keyctl add trusted datakey` and `dmsetup create&amp;nbsp;crypt capi:xts(aes)-plain :32:trusted:datakey` following the instructions here:&amp;nbsp;&lt;A href="https://www.thegoodpenguin.co.uk/blog/secure-storage-with-i-mx-95-verdin-evk-using-trusted-keys-with-op-tee/" target="_blank"&gt;https://www.thegoodpenguin.co.uk/blog/secure-storage-with-i-mx-95-verdin-evk-using-trusted-keys-with-op-tee/&lt;/A&gt;. I only encrypt a data partition though, not the rootfs (the latter would be harder I imagine since you'd have to encrypt it outside the board).&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 12:14:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx93-cryptsetup-with-CONFIG-TEE-CRYPTO-m-does-not-work-with/m-p/2155237#M240225</guid>
      <dc:creator>mjourdan</dc:creator>
      <dc:date>2025-08-20T12:14:15Z</dc:date>
    </item>
  </channel>
</rss>

